From owner-svn-src-stable-10@freebsd.org Mon May 22 02:30:17 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 527E5D78F90; Mon, 22 May 2017 02:30:17 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EA3B1596; Mon, 22 May 2017 02:30:17 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M2UGLJ044790; Mon, 22 May 2017 02:30:16 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M2UGPN044789; Mon, 22 May 2017 02:30:16 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201705220230.v4M2UGPN044789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 22 May 2017 02:30:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318605 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 02:30:17 -0000 Author: sephe Date: Mon May 22 02:30:15 2017 New Revision: 318605 URL: https://svnweb.freebsd.org/changeset/base/318605 Log: MFC 318512 net/vlan: Revert 305177 Miss read the parentheses. Reported by: oleg@ Reviewed by: hps@ Sponsored by: Microsoft Modified: stable/10/sys/net/if_vlan_var.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_vlan_var.h ============================================================================== --- stable/10/sys/net/if_vlan_var.h Mon May 22 02:09:27 2017 (r318604) +++ stable/10/sys/net/if_vlan_var.h Mon May 22 02:30:15 2017 (r318605) @@ -46,7 +46,7 @@ struct ether_vlan_header { #define EVL_PRIOFTAG(tag) (((tag) >> 13) & 7) #define EVL_CFIOFTAG(tag) (((tag) >> 12) & 1) #define EVL_MAKETAG(vlid, pri, cfi) \ - ((((((pri) & 7) << 13) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK)) + ((((((pri) & 7) << 1) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK)) /* Set the VLAN ID in an mbuf packet header non-destructively. */ #define EVL_APPLY_VLID(m, vlid) \ From owner-svn-src-stable-10@freebsd.org Mon May 22 06:04:21 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8503BD7838A; Mon, 22 May 2017 06:04:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54EA41F82; Mon, 22 May 2017 06:04:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M64KGf034134; Mon, 22 May 2017 06:04:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M64KBH034133; Mon, 22 May 2017 06:04:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220604.v4M64KBH034133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:04:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318608 - stable/10/usr.sbin/rpcbind X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:04:21 -0000 Author: ngie Date: Mon May 22 06:04:20 2017 New Revision: 318608 URL: https://svnweb.freebsd.org/changeset/base/318608 Log: MFC r317154: Print out the signal number on exit in terminate(..) if WARMSTART is compiled into rpcbind. The signal number can provide helpful diagnostic info. Obtained from: Isilon OneFS Modified: stable/10/usr.sbin/rpcbind/rpcbind.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/rpcbind/rpcbind.c ============================================================================== --- stable/10/usr.sbin/rpcbind/rpcbind.c Mon May 22 06:03:51 2017 (r318607) +++ stable/10/usr.sbin/rpcbind/rpcbind.c Mon May 22 06:04:20 2017 (r318608) @@ -755,12 +755,13 @@ rbllist_add(rpcprog_t prog, rpcvers_t ve * Catch the signal and die */ static void -terminate(int dummy __unused) +terminate(int signum __unused) { close(rpcbindlockfd); #ifdef WARMSTART syslog(LOG_ERR, - "rpcbind terminating on signal. Restart with \"rpcbind -w\""); + "rpcbind terminating on signal %d. Restart with \"rpcbind -w\"", + signum); write_warmstart(); /* Dump yourself */ #endif exit(2); From owner-svn-src-stable-10@freebsd.org Mon May 22 06:05:16 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F4C7D78461; Mon, 22 May 2017 06:05:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF42B10FB; Mon, 22 May 2017 06:05:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M65Er3034253; Mon, 22 May 2017 06:05:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M65Ebd034252; Mon, 22 May 2017 06:05:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220605.v4M65Ebd034252@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:05:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318609 - stable/10/usr.bin/which X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:05:16 -0000 Author: ngie Date: Mon May 22 06:05:14 2017 New Revision: 318609 URL: https://svnweb.freebsd.org/changeset/base/318609 Log: MFC r317160: Clean up trailing whitespace No functional changes Modified: stable/10/usr.bin/which/which.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/which/which.c ============================================================================== --- stable/10/usr.bin/which/which.c Mon May 22 06:04:20 2017 (r318608) +++ stable/10/usr.bin/which/which.c Mon May 22 06:05:14 2017 (r318609) @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); static void usage(void); static int print_matches(char *, char *); - + static int silent; static int allpaths; @@ -81,7 +81,7 @@ main(int argc, char **argv) while (argc > 0) { memcpy(path, p, pathlen); - + if (strlen(*argv) >= FILENAME_MAX || print_matches(path, *argv) == -1) status = EXIT_FAILURE; From owner-svn-src-stable-10@freebsd.org Mon May 22 06:06:49 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F27D1D785B3; Mon, 22 May 2017 06:06:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF40E141A; Mon, 22 May 2017 06:06:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M66mdH034436; Mon, 22 May 2017 06:06:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M66mVH034435; Mon, 22 May 2017 06:06:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220606.v4M66mVH034435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:06:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318611 - stable/10/share/man/man3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:06:50 -0000 Author: ngie Date: Mon May 22 06:06:48 2017 New Revision: 318611 URL: https://svnweb.freebsd.org/changeset/base/318611 Log: MFC r315793: intro(3): fix markup - Use `Em` with `.It` macro when referring to other libraries, instead of `Xr`. - Use `.Em` instead of `.Xr` when referring to libraries. - Remove commented out lines. Modified: stable/10/share/man/man3/intro.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man3/intro.3 ============================================================================== --- stable/10/share/man/man3/intro.3 Mon May 22 06:05:35 2017 (r318610) +++ stable/10/share/man/man3/intro.3 Mon May 22 06:06:48 2017 (r318611) @@ -32,7 +32,7 @@ .\" @(#)intro.3 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 5, 1993 +.Dd March 22, 2017 .Dt INTRO 3 .Os .Sh NAME @@ -44,26 +44,16 @@ library functions, their error returns a common definitions and concepts. Most of these functions are available from the C library, .Em libc . -.\" (see -.\" .Xr libc 3 ) . Other libraries, such as the math library, .Em libm , must be indicated at compile time with the .Fl l option of the compiler. -.\" .Pp -.\" A subset of the -.\" .Xr libc functions -.\" are available from Fortran; -.\" they are described separately in -.\" .Xr intro 3f . .Pp The various libraries (followed by the loader flag): .Bl -tag -width "libc (-lc)" -.It Xr libc Pq Fl l Ns Ar c +.It Em libc Pq Fl l Ns Ar c Standard C library functions. -.\" (See -.\" .Xr libc 3 . ) When using the C compiler .Xr cc 1 , it is not necessary @@ -71,8 +61,8 @@ to supply the loader flag .Fl l Ns Ar c for these functions. There are several `libraries' or groups of functions included inside of -.Xr libc : -the standard +.Em libc +: the standard .Tn I/O routines, database routines, @@ -81,12 +71,12 @@ string operators, character tests and character operators, des encryption routines, storage allocation, time functions, signal handling and more. -.It Xr libcurses Pq Fl l Ns Ar curses Fl l Ns Ar termcap +.It Em libcurses Pq Fl l Ns Ar curses Fl l Ns Ar termcap Terminal independent screen management routines for two dimensional non-bitmap display terminals. (See .Xr ncurses 3 . ) -.It Xr libcompat Pq Fl l Ns Ar compat +.It Em libcompat Pq Fl l Ns Ar compat Functions which are obsolete but are available for compatibility with .Bx 4.3 . In particular, @@ -96,45 +86,30 @@ have been included for source code compa Use of these routines should, for the most part, be avoided. The manual page entry for each compatibility routine indicates the proper interface to use. -.It Xr libkvm Pq Fl l Ns Ar kvm +.It Em libkvm Pq Fl l Ns Ar kvm Functions used to access kernel memory are in this library. They can be used against both a running system and a crash dump. (See .Xr kvm 3 . ) -.It Xr libl Pq Fl l Ns Ar l +.It Em libl Pq Fl l Ns Ar l The library for .Xr lex 1 . -.\" .It Xr libln -.It Xr libm Pq Fl l Ns Ar m +.It Em libm Pq Fl l Ns Ar m The math library, .Em libm . The math library is loaded as needed by the Pascal compiler, -.\" .Xr pc 1 , but not by the C compiler which requires the .Fl l Ns Ar m flag. (See .Xr math 3 . ) -.It Xr libmp Pq Fl l Ns Ar mp -.\" .It Xr libom -.\" Old math library. -.\" .It Xr libplot Pq Fl l Ns Ar plot -.\" Device independent plotting functions. -.\" (See -.\" .Xr plot 3 . ) -.\" .It Xr libplotf77 Pq Fl l Ns Ar plotf77 -.\" The device independent plotting functions for fortran. -.\" (See -.\" .Xr plot 3 . ) -.\" .It Xr libresolv Pq Fl l Ns Ar resolv -.\" Routines for network address resolution. -.It Xr libtermcap Pq Fl l Ns Ar termcap +.It Em libmp Pq Fl l Ns Ar mp +.It Em libtermcap Pq Fl l Ns Ar termcap The terminal independent operation library package. (See .Xr termcap 3 . ) -.\" .It libvt0.a -.It Xr liby Pq Fl l Ns Ar y +.It Em liby Pq Fl l Ns Ar y The library for .Xr yacc 1 . .El @@ -150,17 +125,12 @@ the math library the math library compiled for profiling .El .Sh SEE ALSO -.\" .Xr libc 3 , .Xr cc 1 , .Xr ld 1 , .Xr nm 1 , .Xr intro 2 , .Xr math 3 , .Xr stdio 3 -.\" .Sh LIST OF FUNCTIONS -.\" .Bl -column "strncasecmpxxx" "system" -.\" .Sy Name Description -.\" .El .Sh HISTORY An .Nm From owner-svn-src-stable-10@freebsd.org Mon May 22 06:08:22 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BC0BD786D1; Mon, 22 May 2017 06:08:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBAA31719; Mon, 22 May 2017 06:08:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M68K7x034691; Mon, 22 May 2017 06:08:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M68Keu034690; Mon, 22 May 2017 06:08:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220608.v4M68Keu034690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:08:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318614 - stable/10/tools/build/options X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:08:22 -0000 Author: ngie Date: Mon May 22 06:08:20 2017 New Revision: 318614 URL: https://svnweb.freebsd.org/changeset/base/318614 Log: MFC r315766,r315768: r315766: Note that tools/build/options/makeman automatically generated src.conf(5) This (as a bonus) fixes mdoc warnings with src.conf(5) :).. r315768: Remove the .Pa portion I added to the .An macro in AUTHORS section That doesn't work (mandoc complains about the macro being empty). That's what I get for being clever and not verifying before committing things again *sigh*. Partyhat to: ngie Modified: stable/10/tools/build/options/makeman Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/build/options/makeman ============================================================================== --- stable/10/tools/build/options/makeman Mon May 22 06:08:19 2017 (r318613) +++ stable/10/tools/build/options/makeman Mon May 22 06:08:20 2017 (r318614) @@ -299,7 +299,8 @@ The file appeared in .Fx 7.0 . .Sh AUTHORS -This manual page was autogenerated. +This manual page was autogenerated by +.An tools/build/options/makeman . EOF } From owner-svn-src-stable-10@freebsd.org Mon May 22 06:09:49 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8AEED787F9; Mon, 22 May 2017 06:09:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FA3119E8; Mon, 22 May 2017 06:09:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M69mQl034785; Mon, 22 May 2017 06:09:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M69mKQ034784; Mon, 22 May 2017 06:09:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220609.v4M69mKQ034784@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:09:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318615 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:09:49 -0000 Author: ngie Date: Mon May 22 06:09:47 2017 New Revision: 318615 URL: https://svnweb.freebsd.org/changeset/base/318615 Log: MFC r315766,r315768: r315766: Note that tools/build/options/makeman automatically generated src.conf(5) This (as a bonus) fixes mdoc warnings with src.conf(5) :).. r315768: Remove the .Pa portion I added to the .An macro in AUTHORS section That doesn't work (mandoc complains about the macro being empty). That's what I get for being clever and not verifying before committing things again *sigh*. Partyhat to: ngie Modified: stable/10/share/man/man5/src.conf.5 Modified: stable/10/share/man/man5/src.conf.5 ============================================================================== --- stable/10/share/man/man5/src.conf.5 Mon May 22 06:08:20 2017 (r318614) +++ stable/10/share/man/man5/src.conf.5 Mon May 22 06:09:47 2017 (r318615) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: stable/10/tools/build/options/makeman 291805 2015-12-04 18:32:39Z bdrewery +.\" from FreeBSD: stable/10/tools/build/options/makeman 318614 2017-05-22 06:08:20Z ngie .\" $FreeBSD$ -.Dd January 6, 2017 +.Dd May 21, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1201,4 +1201,5 @@ The file appeared in .Fx 7.0 . .Sh AUTHORS -This manual page was autogenerated. +This manual page was autogenerated by +.An tools/build/options/makeman . From owner-svn-src-stable-10@freebsd.org Mon May 22 06:10:48 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1548AD78884; Mon, 22 May 2017 06:10:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA56C1B6F; Mon, 22 May 2017 06:10:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M6AkhL035631; Mon, 22 May 2017 06:10:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M6Akbv035630; Mon, 22 May 2017 06:10:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220610.v4M6Akbv035630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:10:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318616 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:10:48 -0000 Author: ngie Date: Mon May 22 06:10:46 2017 New Revision: 318616 URL: https://svnweb.freebsd.org/changeset/base/318616 Log: Revert r318615 to correct commit message Modified: stable/10/share/man/man5/src.conf.5 Modified: stable/10/share/man/man5/src.conf.5 ============================================================================== --- stable/10/share/man/man5/src.conf.5 Mon May 22 06:09:47 2017 (r318615) +++ stable/10/share/man/man5/src.conf.5 Mon May 22 06:10:46 2017 (r318616) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: stable/10/tools/build/options/makeman 318614 2017-05-22 06:08:20Z ngie +.\" from FreeBSD: stable/10/tools/build/options/makeman 291805 2015-12-04 18:32:39Z bdrewery .\" $FreeBSD$ -.Dd May 21, 2017 +.Dd January 6, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1201,5 +1201,4 @@ The file appeared in .Fx 7.0 . .Sh AUTHORS -This manual page was autogenerated by -.An tools/build/options/makeman . +This manual page was autogenerated. From owner-svn-src-stable-10@freebsd.org Mon May 22 06:12:32 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61BE1D78AE1; Mon, 22 May 2017 06:12:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CCD31F5F; Mon, 22 May 2017 06:12:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M6CV6m038562; Mon, 22 May 2017 06:12:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M6CVjx038561; Mon, 22 May 2017 06:12:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220612.v4M6CVjx038561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:12:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318617 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:12:32 -0000 Author: ngie Date: Mon May 22 06:12:30 2017 New Revision: 318617 URL: https://svnweb.freebsd.org/changeset/base/318617 Log: Regenerate src.conf(5) per r318614 Modified: stable/10/share/man/man5/src.conf.5 Modified: stable/10/share/man/man5/src.conf.5 ============================================================================== --- stable/10/share/man/man5/src.conf.5 Mon May 22 06:10:46 2017 (r318616) +++ stable/10/share/man/man5/src.conf.5 Mon May 22 06:12:30 2017 (r318617) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: stable/10/tools/build/options/makeman 291805 2015-12-04 18:32:39Z bdrewery +.\" from FreeBSD: stable/10/tools/build/options/makeman 318614 2017-05-22 06:08:20Z ngie .\" $FreeBSD$ -.Dd January 6, 2017 +.Dd May 21, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1201,4 +1201,5 @@ The file appeared in .Fx 7.0 . .Sh AUTHORS -This manual page was autogenerated. +This manual page was autogenerated by +.An tools/build/options/makeman . From owner-svn-src-stable-10@freebsd.org Mon May 22 06:21:00 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60E8CD780B3; Mon, 22 May 2017 06:21:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2119F1AE5; Mon, 22 May 2017 06:21:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M6KxaT042150; Mon, 22 May 2017 06:20:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M6KwLR042144; Mon, 22 May 2017 06:20:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220620.v4M6KwLR042144@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:20:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318623 - in stable/10: sbin/mount sbin/mount_cd9660 share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:21:00 -0000 Author: ngie Date: Mon May 22 06:20:58 2017 New Revision: 318623 URL: https://svnweb.freebsd.org/changeset/base/318623 Log: MFC r315775: Add a post-humous manpage for cd9660(5), the ISO-9660 file system Describe (briefly) how to compile the filesystem into the kernel and load as a module. Reference cd9660(5) in mount(8) and mount_cd9660(8). Added: stable/10/share/man/man5/cd9660.5 - copied unchanged from r315775, head/share/man/man5/cd9660.5 Modified: stable/10/sbin/mount/mount.8 stable/10/sbin/mount_cd9660/mount_cd9660.8 stable/10/share/man/man5/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mount/mount.8 ============================================================================== --- stable/10/sbin/mount/mount.8 Mon May 22 06:20:22 2017 (r318622) +++ stable/10/sbin/mount/mount.8 Mon May 22 06:20:58 2017 (r318623) @@ -28,7 +28,7 @@ .\" @(#)mount.8 8.8 (Berkeley) 6/16/94 .\" $FreeBSD$ .\" -.Dd November 1, 2015 +.Dd March 22, 2017 .Dt MOUNT 8 .Os .Sh NAME @@ -544,6 +544,7 @@ support for a particular file system mig .Xr nmount 2 , .Xr acl 3 , .Xr mac 4 , +.Xr cd9660 5 , .Xr devfs 5 , .Xr ext2fs 5 , .Xr fstab 5 , Modified: stable/10/sbin/mount_cd9660/mount_cd9660.8 ============================================================================== --- stable/10/sbin/mount_cd9660/mount_cd9660.8 Mon May 22 06:20:22 2017 (r318622) +++ stable/10/sbin/mount_cd9660/mount_cd9660.8 Mon May 22 06:20:58 2017 (r318623) @@ -32,7 +32,7 @@ .\" @(#)mount_cd9660.8 8.3 (Berkeley) 3/27/94 .\" $FreeBSD$ .\" -.Dd March 5, 2013 +.Dd March 22, 2017 .Dt MOUNT_CD9660 8 .Os .Sh NAME @@ -138,6 +138,7 @@ The following command can be used to mou .Xr cdcontrol 1 , .Xr mount 2 , .Xr unmount 2 , +.Xr cd9660 5 , .Xr fstab 5 , .Xr mount 8 .Sh HISTORY Modified: stable/10/share/man/man5/Makefile ============================================================================== --- stable/10/share/man/man5/Makefile Mon May 22 06:20:22 2017 (r318622) +++ stable/10/share/man/man5/Makefile Mon May 22 06:20:58 2017 (r318623) @@ -8,6 +8,7 @@ MAN= acct.5 \ ar.5 \ a.out.5 \ ${_boot.config.5} \ + cd9660.5 \ core.5 \ devfs.5 \ devfs.conf.5 \ Copied: stable/10/share/man/man5/cd9660.5 (from r315775, head/share/man/man5/cd9660.5) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man5/cd9660.5 Mon May 22 06:20:58 2017 (r318623, copy of r315775, head/share/man/man5/cd9660.5) @@ -0,0 +1,82 @@ +.\" +.\" Copyright (c) 2017 Ngie Cooper +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission +.\" +.\" THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd March 22, 2017 +.Dt CD9660 5 +.Os +.Sh NAME +.Nm cd9660 +.Nd "ISO-9660 file system" +.Sh SYNOPSIS +To link into the kernel: +.Bd -ragged -offset indent +.Cd "options CD9660" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +cd9660_load="YES" +.Sh DESCRIPTION +The +.Nm +driver will permit the +.Fx +kernel to access the +.Tn cd9660 +file system. +.Sh EXAMPLES +To mount a +.Nm +volume located on +.Pa /dev/cd0 : +.Pp +.Dl "mount -t cd9660 /dev/cd0 /mnt" +.Sh SEE ALSO +.Xr nmount 2 , +.Xr unmount 2 , +.Xr fstab 5 , +.Xr mount 8 , +.Xr mount_cd9660 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 4.4 Lite +.Sh AUTHORS +.An -nosplit +The +.Nm +kernel implementation was originally written by +.An Pace Willisson Aq Mt pace@blitz.com +and +.An Atsushi Murai Aq Mt amurai@spec.co.jp . +.Pp +This manual page was written by +.An Ngie Cooper Aq Mt ngie@FreeBSD.org . From owner-svn-src-stable-10@freebsd.org Mon May 22 06:29:21 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD9C3D7857A; Mon, 22 May 2017 06:29:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D958144D; Mon, 22 May 2017 06:29:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M6TKmI043451; Mon, 22 May 2017 06:29:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M6TK5O043449; Mon, 22 May 2017 06:29:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705220629.v4M6TK5O043449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 22 May 2017 06:29:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318626 - stable/10/sys/boot/efi/boot1 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 06:29:21 -0000 Author: ngie Date: Mon May 22 06:29:20 2017 New Revision: 318626 URL: https://svnweb.freebsd.org/changeset/base/318626 Log: MFC r316103: Remove redundant declarations They're already defined in libstand.h Modified: stable/10/sys/boot/efi/boot1/boot1.c stable/10/sys/boot/efi/boot1/boot_module.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/efi/boot1/boot1.c ============================================================================== --- stable/10/sys/boot/efi/boot1/boot1.c Mon May 22 06:26:22 2017 (r318625) +++ stable/10/sys/boot/efi/boot1/boot1.c Mon May 22 06:29:20 2017 (r318626) @@ -47,7 +47,6 @@ static const boot_module_t *boot_modules /* The initial number of handles used to query EFI for partitions. */ #define NUM_HANDLES_INIT 24 -void putchar(int c); EFI_STATUS efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE* Xsystab); EFI_SYSTEM_TABLE *systab; Modified: stable/10/sys/boot/efi/boot1/boot_module.h ============================================================================== --- stable/10/sys/boot/efi/boot1/boot_module.h Mon May 22 06:26:22 2017 (r318625) +++ stable/10/sys/boot/efi/boot1/boot_module.h Mon May 22 06:29:20 2017 (r318626) @@ -105,8 +105,6 @@ extern const boot_module_t zfs_module; /* Functions available to modules. */ extern void add_device(dev_info_t **devinfop, dev_info_t *devinfo); -extern void panic(const char *fmt, ...) __dead2; -extern int printf(const char *fmt, ...); extern int vsnprintf(char *str, size_t sz, const char *fmt, va_list ap); extern EFI_SYSTEM_TABLE *systab; From owner-svn-src-stable-10@freebsd.org Mon May 22 08:19:10 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F951D7857E; Mon, 22 May 2017 08:19:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E44E919A9; Mon, 22 May 2017 08:19:09 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4M8J8KL088215; Mon, 22 May 2017 08:19:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4M8J87s088213; Mon, 22 May 2017 08:19:08 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705220819.v4M8J87s088213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 22 May 2017 08:19:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318628 - stable/10/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 08:19:10 -0000 Author: hselasky Date: Mon May 22 08:19:08 2017 New Revision: 318628 URL: https://svnweb.freebsd.org/changeset/base/318628 Log: MFC r318531: mlx4: Use the CQ quota for SRIOV when creating completion EQs When creating EQs to handle CQ completion events for the PF or for VFs, we create enough EQE entries to handle completions for the max number of CQs that can use that EQ. When SRIOV is activated, the max number of CQs a VF (or the PF) can obtain is its CQ quota (determined by the Hypervisor resource tracker). Therefore, when creating an EQ, the number of EQE entries that the VF should request for that EQ is the CQ quota value (and not the total number of CQs available in the firmware). Under SRIOV, the PF, also must use its CQ quota, because the resource tracker also controls how many CQs the PF can obtain. Using the firmware total CQs instead of the CQ quota when creating EQs resulted wasting MTT entries, due to allocating more EQEs than were needed. Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/net/mlx4/eq.c stable/10/sys/ofed/drivers/net/mlx4/main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/net/mlx4/eq.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/eq.c Mon May 22 08:17:07 2017 (r318627) +++ stable/10/sys/ofed/drivers/net/mlx4/eq.c Mon May 22 08:19:08 2017 (r318628) @@ -1169,8 +1169,7 @@ int mlx4_init_eq_table(struct mlx4_dev * } for (i = 0; i < dev->caps.num_comp_vectors; ++i) { - err = mlx4_create_eq(dev, dev->caps.num_cqs - - dev->caps.reserved_cqs + + err = mlx4_create_eq(dev, dev->quotas.cq + MLX4_NUM_SPARE_EQE, (dev->flags & MLX4_FLAG_MSI_X) ? i : 0, &priv->eq_table.eq[i]); @@ -1190,8 +1189,7 @@ int mlx4_init_eq_table(struct mlx4_dev * for (i = dev->caps.num_comp_vectors + 1; i < dev->caps.num_comp_vectors + dev->caps.comp_pool + 1; ++i) { - err = mlx4_create_eq(dev, dev->caps.num_cqs - - dev->caps.reserved_cqs + + err = mlx4_create_eq(dev, dev->quotas.cq + MLX4_NUM_SPARE_EQE, (dev->flags & MLX4_FLAG_MSI_X) ? i : 0, &priv->eq_table.eq[i]); Modified: stable/10/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/main.c Mon May 22 08:17:07 2017 (r318627) +++ stable/10/sys/ofed/drivers/net/mlx4/main.c Mon May 22 08:19:08 2017 (r318628) @@ -3448,6 +3448,8 @@ slave_start: goto err_free_eq; } + mlx4_init_quotas(dev); + err = mlx4_setup_hca(dev); if (err == -EBUSY && (dev->flags & MLX4_FLAG_MSI_X) && !mlx4_is_mfunc(dev)) { @@ -3461,7 +3463,6 @@ slave_start: if (err) goto err_steer; - mlx4_init_quotas(dev); mlx4_init_hca_info(dev); for (port = 1; port <= dev->caps.num_ports; port++) { From owner-svn-src-stable-10@freebsd.org Mon May 22 15:51:18 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83317D78B44; Mon, 22 May 2017 15:51:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54AA21F87; Mon, 22 May 2017 15:51:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MFpHZ7075526; Mon, 22 May 2017 15:51:17 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MFpHRA075525; Mon, 22 May 2017 15:51:17 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221551.v4MFpHRA075525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 15:51:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318650 - in stable: 10/usr.bin/grep 11/usr.bin/grep X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 15:51:18 -0000 Author: gjb Date: Mon May 22 15:51:17 2017 New Revision: 318650 URL: https://svnweb.freebsd.org/changeset/base/318650 Log: MFC r313955 (emaste): bsdgrep: document ignored option -u MSDOS and Windows GNU grep uses -u to mean "print byte offsets as if running on an UNIX system." The option has no effect on systems that do not use CRLF line endings. PR: 171200 Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/grep/grep.1 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.bin/grep/grep.1 Directory Properties: stable/11/ (props changed) Modified: stable/10/usr.bin/grep/grep.1 ============================================================================== --- stable/10/usr.bin/grep/grep.1 Mon May 22 15:29:10 2017 (r318649) +++ stable/10/usr.bin/grep/grep.1 Mon May 22 15:51:17 2017 (r318650) @@ -352,6 +352,8 @@ Nonexistent and unreadable files are ign (i.e. their error messages are suppressed). .It Fl U , Fl Fl binary Search binary files, but do not attempt to print them. +.It Fl u +This option has no effect and is provided only for compatibility with GNU grep. .It Fl V , Fl Fl version Display version information and exit. .It Fl v , Fl Fl invert-match From owner-svn-src-stable-10@freebsd.org Mon May 22 16:11:47 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF3E9D78198; Mon, 22 May 2017 16:11:47 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F3651185; Mon, 22 May 2017 16:11:47 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MGBkxg088082; Mon, 22 May 2017 16:11:46 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MGBkVK088081; Mon, 22 May 2017 16:11:46 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705221611.v4MGBkVK088081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 22 May 2017 16:11:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318653 - in stable: 10/usr.bin/sort 11/usr.bin/sort X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 16:11:47 -0000 Author: gjb Date: Mon May 22 16:11:46 2017 New Revision: 318653 URL: https://svnweb.freebsd.org/changeset/base/318653 Log: MFC r305613 (gabor): Fix typo. PR: 211245 Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/sort/sort.1.in Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.bin/sort/sort.1.in Directory Properties: stable/11/ (props changed) Modified: stable/10/usr.bin/sort/sort.1.in ============================================================================== --- stable/10/usr.bin/sort/sort.1.in Mon May 22 16:07:17 2017 (r318652) +++ stable/10/usr.bin/sort/sort.1.in Mon May 22 16:11:46 2017 (r318653) @@ -133,7 +133,7 @@ also checks that there are no lines with .It Fl s Stable sort. This option maintains the original record order of records that have -and equal key. +an equal key. This is a non-standard feature, but it is widely accepted and used. .It Fl Fl version Print the version and silently exits. From owner-svn-src-stable-10@freebsd.org Mon May 22 19:36:28 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 319D6D785D3; Mon, 22 May 2017 19:36:28 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA9871160; Mon, 22 May 2017 19:36:27 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJaRwo072453; Mon, 22 May 2017 19:36:27 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJaQkj072448; Mon, 22 May 2017 19:36:26 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705221936.v4MJaQkj072448@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 22 May 2017 19:36:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318661 - in stable/10/sys: dev/qlnx/qlnxe modules/qlnx/qlnxe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:36:28 -0000 Author: davidcs Date: Mon May 22 19:36:26 2017 New Revision: 318661 URL: https://svnweb.freebsd.org/changeset/base/318661 Log: MFC r318382 1. Move Rx Processing to fp_taskqueue(). With this CPU utilization for processing interrupts drops to around 1% for 100G and under 1% for other speeds. 2. Use sysctls for TRACE_LRO_CNT and TRACE_TSO_PKT_LEN 3. remove unused mtx tx_lock 4. bind taskqueue kernel thread to the appropriate cpu core 5. when tx_ring is full, stop further transmits till at least 1/16th of the Tx Ring is empty. In our case 1K entries. Also if there are rx_pkts to process, put the taskqueue thread to sleep for 100ms, before enabling interrupts. 6. Use rx_pkt_threshold of 128. Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c stable/10/sys/dev/qlnx/qlnxe/qlnx_os.h stable/10/sys/modules/qlnx/qlnxe/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:34:37 2017 (r318660) +++ stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:36:26 2017 (r318661) @@ -191,6 +191,7 @@ struct qlnx_fastpath { struct mtx tx_mtx; char tx_mtx_name[32]; struct buf_ring *tx_br; + uint32_t tx_ring_full; struct task fp_task; struct taskqueue *fp_taskqueue; @@ -364,6 +365,8 @@ struct qlnx_host { /* debug */ uint32_t dbg_level; + uint32_t dbg_trace_lro_cnt; + uint32_t dbg_trace_tso_pkt_len; uint32_t dp_level; uint32_t dp_module; @@ -386,7 +389,6 @@ struct qlnx_host { /* tx related */ struct callout tx_callout; - struct mtx tx_lock; uint32_t txr_idx; /* rx related */ Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:34:37 2017 (r318660) +++ stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:36:26 2017 (r318661) @@ -382,16 +382,77 @@ qlnx_fp_taskqueue(void *context, int pen struct ifnet *ifp; struct mbuf *mp; int ret; + int lro_enable, tc; + int rx_int = 0, total_rx_count = 0; + struct thread *cthread; fp = context; if (fp == NULL) return; + cthread = curthread; + + thread_lock(cthread); + + if (!sched_is_bound(cthread)) + sched_bind(cthread, fp->rss_id); + + thread_unlock(cthread); + ha = (qlnx_host_t *)fp->edev; ifp = ha->ifp; + lro_enable = ha->ifp->if_capenable & IFCAP_LRO; + + rx_int = qlnx_rx_int(ha, fp, ha->rx_pkt_threshold, lro_enable); + + if (rx_int) { + fp->rx_pkts += rx_int; + total_rx_count += rx_int; + } + +#ifdef QLNX_SOFT_LRO + { + struct lro_ctrl *lro; + + lro = &fp->rxq->lro; + + if (lro_enable && total_rx_count) { + +#if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) + + if (ha->dbg_trace_lro_cnt) { + if (lro->lro_mbuf_count & ~1023) + fp->lro_cnt_1024++; + else if (lro->lro_mbuf_count & ~511) + fp->lro_cnt_512++; + else if (lro->lro_mbuf_count & ~255) + fp->lro_cnt_256++; + else if (lro->lro_mbuf_count & ~127) + fp->lro_cnt_128++; + else if (lro->lro_mbuf_count & ~63) + fp->lro_cnt_64++; + } + tcp_lro_flush_all(lro); + +#else + struct lro_entry *queued; + + while ((!SLIST_EMPTY(&lro->lro_active))) { + queued = SLIST_FIRST(&lro->lro_active); + SLIST_REMOVE_HEAD(&lro->lro_active, next); + tcp_lro_flush(lro, queued); + } +#endif /* #if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) */ + } + } +#endif /* #ifdef QLNX_SOFT_LRO */ + + ecore_sb_update_sb_idx(fp->sb_info); + rmb(); + mtx_lock(&fp->tx_mtx); if (((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != @@ -401,13 +462,19 @@ qlnx_fp_taskqueue(void *context, int pen goto qlnx_fp_taskqueue_exit; } - (void)qlnx_tx_int(ha, fp, fp->txq[0]); + for (tc = 0; tc < ha->num_tc; tc++) { + (void)qlnx_tx_int(ha, fp, fp->txq[tc]); + } mp = drbr_peek(ifp, fp->tx_br); while (mp != NULL) { - ret = qlnx_send(ha, fp, &mp); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + ret = qlnx_send(ha, fp, &mp); + } else { + ret = -1; + } if (ret) { @@ -428,14 +495,28 @@ qlnx_fp_taskqueue(void *context, int pen fp->tx_pkts_processed++; } + if (fp->tx_ring_full) + break; + mp = drbr_peek(ifp, fp->tx_br); } - (void)qlnx_tx_int(ha, fp, fp->txq[0]); + for (tc = 0; tc < ha->num_tc; tc++) { + (void)qlnx_tx_int(ha, fp, fp->txq[tc]); + } mtx_unlock(&fp->tx_mtx); qlnx_fp_taskqueue_exit: + if (rx_int) { + if (fp->fp_taskqueue != NULL) + taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); + } else { + if (fp->tx_ring_full) { + qlnx_mdelay(__func__, 100); + } + ecore_sb_ack(fp->sb_info, IGU_INT_ENABLE, 1); + } QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret)); return; @@ -504,7 +585,9 @@ qlnx_drain_fp_taskqueues(qlnx_host_t *ha fp = &ha->fp_array[i]; if (fp->fp_taskqueue != NULL) { + QLNX_UNLOCK(ha); taskqueue_drain(fp->fp_taskqueue, &fp->fp_task); + QLNX_LOCK(ha); } } return; @@ -540,7 +623,6 @@ qlnx_pci_attach(device_t dev) ha->pci_dev = dev; mtx_init(&ha->hw_lock, "qlnx_hw_lock", MTX_NETWORK_LOCK, MTX_DEF); - mtx_init(&ha->tx_lock, "qlnx_tx_lock", MTX_NETWORK_LOCK, MTX_DEF); ha->flags.lock_init = 1; @@ -944,7 +1026,6 @@ qlnx_release(qlnx_host_t *ha) pci_release_msi(dev); if (ha->flags.lock_init) { - mtx_destroy(&ha->tx_lock); mtx_destroy(&ha->hw_lock); } @@ -1226,7 +1307,6 @@ qlnx_add_fp_stats_sysctls(qlnx_host_t *h CTLFLAG_RD, &ha->fp_array[i].err_tx_cons_idx_conflict, "err_tx_cons_idx_conflict"); -#ifdef QLNX_TRACE_LRO_CNT SYSCTL_ADD_QUAD(ctx, node_children, OID_AUTO, "lro_cnt_64", CTLFLAG_RD, &ha->fp_array[i].lro_cnt_64, @@ -1251,7 +1331,6 @@ qlnx_add_fp_stats_sysctls(qlnx_host_t *h OID_AUTO, "lro_cnt_1024", CTLFLAG_RD, &ha->fp_array[i].lro_cnt_1024, "lro_cnt_1024"); -#endif /* #ifdef QLNX_TRACE_LRO_CNT */ /* Rx Related */ @@ -1710,6 +1789,18 @@ qlnx_add_sysctls(qlnx_host_t *ha) OID_AUTO, "dp_level", CTLFLAG_RW, &ha->dp_level, ha->dp_level, "DP Level"); + ha->dbg_trace_lro_cnt = 0; + SYSCTL_ADD_UINT(ctx, children, + OID_AUTO, "dbg_trace_lro_cnt", CTLFLAG_RW, + &ha->dbg_trace_lro_cnt, ha->dbg_trace_lro_cnt, + "Trace LRO Counts"); + + ha->dbg_trace_tso_pkt_len = 0; + SYSCTL_ADD_UINT(ctx, children, + OID_AUTO, "dbg_trace_tso_pkt_len", CTLFLAG_RW, + &ha->dbg_trace_tso_pkt_len, ha->dbg_trace_tso_pkt_len, + "Trace TSO packet lengths"); + ha->dp_module = 0; SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "dp_module", CTLFLAG_RW, @@ -1755,7 +1846,7 @@ qlnx_add_sysctls(qlnx_host_t *ha) &ha->tx_coalesce_usecs, ha->tx_coalesce_usecs, "tx_coalesce_usecs"); - ha->rx_pkt_threshold = 32; + ha->rx_pkt_threshold = 128; SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "rx_pkt_threshold", CTLFLAG_RW, &ha->rx_pkt_threshold, ha->rx_pkt_threshold, @@ -2162,7 +2253,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd ifp->if_mtu = ifr->ifr_mtu; ha->max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; - if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { qlnx_init_locked(ha); } @@ -2178,7 +2269,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd QLNX_LOCK(ha); if (ifp->if_flags & IFF_UP) { - if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { if ((ifp->if_flags ^ ha->if_flags) & IFF_PROMISC) { ret = qlnx_set_promisc(ha); @@ -2712,6 +2803,16 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f tx_data_bd = NULL; txq = fp->txq[0]; + + if (fp->tx_ring_full) { + elem_left = ecore_chain_get_elem_left(&txq->tx_pbl); + + if (elem_left < (TX_RING_SIZE >> 4)) + return (-1); + else + fp->tx_ring_full = 0; + } + idx = txq->sw_tx_prod; map = txq->sw_tx_ring[idx].map; @@ -2720,20 +2821,18 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f ret = bus_dmamap_load_mbuf_sg(ha->tx_tag, map, m_head, segs, &nsegs, BUS_DMA_NOWAIT); -#ifdef QLNX_TRACE_TSO_PKT_LEN - - if (!fp->tx_tso_min_pkt_len) { - fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len; - fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len; - } else { - if (fp->tx_tso_min_pkt_len > m_head->m_pkthdr.len) + if (ha->dbg_trace_tso_pkt_len) { + if (!fp->tx_tso_min_pkt_len) { fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len; - if (fp->tx_tso_max_pkt_len < m_head->m_pkthdr.len) - fp->tx_tso_max_pkt_len = m_head->m_pkthdr.len; + fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len; + } else { + if (fp->tx_tso_min_pkt_len > m_head->m_pkthdr.len) + fp->tx_tso_min_pkt_len = m_head->m_pkthdr.len; + if (fp->tx_tso_max_pkt_len < m_head->m_pkthdr.len) + fp->tx_tso_max_pkt_len = m_head->m_pkthdr.len; + } } -#endif /* #ifdef QLNX_TRACE_TSO_PKT_LEN */ - if (m_head->m_pkthdr.csum_flags & CSUM_TSO) offset = qlnx_tcp_offset(ha, m_head); @@ -2815,14 +2914,12 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f QL_ASSERT(ha, (nsegs != 0), ("qlnx_send: empty packet")); -#ifdef QLNX_TRACE_TSO_PKT_LEN - - if (nsegs < QLNX_FP_MAX_SEGS) - fp->tx_pkts[(nsegs - 1)]++; - else - fp->tx_pkts[(QLNX_FP_MAX_SEGS - 1)]++; - -#endif /* #ifdef QLNX_TRACE_TSO_PKT_LEN */ + if (ha->dbg_trace_tso_pkt_len) { + if (nsegs < QLNX_FP_MAX_SEGS) + fp->tx_pkts[(nsegs - 1)]++; + else + fp->tx_pkts[(QLNX_FP_MAX_SEGS - 1)]++; + } if ((nsegs + QLNX_TX_ELEM_RESERVE) > (int)(elem_left = ecore_chain_get_elem_left(&txq->tx_pbl))) { @@ -2843,6 +2940,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f __func__, nsegs, elem_left, fp->rss_id)); fp->err_tx_nsegs_gt_elem_left++; + fp->tx_ring_full = 1; ha->storm_stats_enable = 1; return (ENOBUFS); } @@ -3051,15 +3149,13 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f first_bd->data.nbds = nbd; -#ifdef QLNX_TRACE_TSO_PKT_LEN - - if (fp->tx_tso_max_nsegs < nsegs) - fp->tx_tso_max_nsegs = nsegs; - - if ((nsegs < fp->tx_tso_min_nsegs) || (!fp->tx_tso_min_nsegs)) - fp->tx_tso_min_nsegs = nsegs; + if (ha->dbg_trace_tso_pkt_len) { + if (fp->tx_tso_max_nsegs < nsegs) + fp->tx_tso_max_nsegs = nsegs; -#endif /* #ifdef QLNX_TRACE_TSO_PKT_LEN */ + if ((nsegs < fp->tx_tso_min_nsegs) || (!fp->tx_tso_min_nsegs)) + fp->tx_tso_min_nsegs = nsegs; + } txq->sw_tx_ring[idx].nsegs = nsegs; txq->sw_tx_prod = (txq->sw_tx_prod + 1) & (TX_RING_SIZE - 1); @@ -4188,11 +4284,9 @@ qlnx_fp_isr(void *arg) qlnx_ivec_t *ivec = arg; qlnx_host_t *ha; struct qlnx_fastpath *fp = NULL; - int idx, lro_enable, tc; - int rx_int = 0, total_rx_count = 0; + int idx; ha = ivec->ha; - lro_enable = ha->ifp->if_capenable & IFCAP_LRO; if (ha->state != QLNX_STATE_OPEN) { return; @@ -4214,73 +4308,8 @@ qlnx_fp_isr(void *arg) ha->err_fp_null++; } else { ecore_sb_ack(fp->sb_info, IGU_INT_DISABLE, 0); - - do { - for (tc = 0; tc < ha->num_tc; tc++) { - if (mtx_trylock(&fp->tx_mtx)) { - qlnx_tx_int(ha, fp, fp->txq[tc]); - mtx_unlock(&fp->tx_mtx); - } - } - - rx_int = qlnx_rx_int(ha, fp, ha->rx_pkt_threshold, - lro_enable); - - if (rx_int) { - fp->rx_pkts += rx_int; - total_rx_count += rx_int; - } - - } while (rx_int); - - -#ifdef QLNX_SOFT_LRO - { - struct lro_ctrl *lro; - - lro = &fp->rxq->lro; - - if (lro_enable && total_rx_count) { - -#if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) - -#ifdef QLNX_TRACE_LRO_CNT - if (lro->lro_mbuf_count & ~1023) - fp->lro_cnt_1024++; - else if (lro->lro_mbuf_count & ~511) - fp->lro_cnt_512++; - else if (lro->lro_mbuf_count & ~255) - fp->lro_cnt_256++; - else if (lro->lro_mbuf_count & ~127) - fp->lro_cnt_128++; - else if (lro->lro_mbuf_count & ~63) - fp->lro_cnt_64++; -#endif /* #ifdef QLNX_TRACE_LRO_CNT */ - - tcp_lro_flush_all(lro); - -#else - struct lro_entry *queued; - - while ((!SLIST_EMPTY(&lro->lro_active))) { - queued = SLIST_FIRST(&lro->lro_active); - SLIST_REMOVE_HEAD(&lro->lro_active, \ - next); - tcp_lro_flush(lro, queued); - } -#endif /* #if (__FreeBSD_version >= 1100101) || (defined QLNX_QSORT_LRO) */ - } - } -#endif /* #ifdef QLNX_SOFT_LRO */ - - if (fp->fp_taskqueue != NULL) - taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); - - ecore_sb_update_sb_idx(fp->sb_info); - rmb(); - ecore_sb_ack(fp->sb_info, IGU_INT_ENABLE, 1); - - return; + if (fp->fp_taskqueue != NULL) + taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); } return; @@ -5150,6 +5179,8 @@ qlnx_init_fp(qlnx_host_t *ha) snprintf(fp->name, sizeof(fp->name), "%s-fp-%d", qlnx_name_str, rss_id); + fp->tx_ring_full = 0; + /* reset all the statistics counters */ fp->tx_pkts_processed = 0; Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_os.h ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/qlnx_os.h Mon May 22 19:34:37 2017 (r318660) +++ stable/10/sys/dev/qlnx/qlnxe/qlnx_os.h Mon May 22 19:36:26 2017 (r318661) @@ -92,6 +92,7 @@ #include #include #include +#include static __inline int qlnx_ms_to_hz(int ms) { @@ -138,10 +139,6 @@ MALLOC_DECLARE(M_QLNXBUF); #define QLNX_LOCK(ha) mtx_lock(&ha->hw_lock) #define QLNX_UNLOCK(ha) mtx_unlock(&ha->hw_lock) - -#define QLNX_TX_LOCK(ha) mtx_lock(&ha->tx_lock); -#define QLNX_TX_UNLOCK(ha) mtx_unlock(&ha->tx_lock); - /* * structure encapsulating a DMA buffer */ Modified: stable/10/sys/modules/qlnx/qlnxe/Makefile ============================================================================== --- stable/10/sys/modules/qlnx/qlnxe/Makefile Mon May 22 19:34:37 2017 (r318660) +++ stable/10/sys/modules/qlnx/qlnxe/Makefile Mon May 22 19:36:26 2017 (r318661) @@ -63,8 +63,6 @@ CFLAGS += -DECORE_CONFIG_DIRECT_HWFN #CFLAGS += -DQLNX_SOFT_LRO #CFLAGS += -DQLNX_QSORT_LRO #CFLAGS += -DQLNX_MAX_COALESCE -#CFLAGS += -DQLNX_TRACE_LRO_CNT -#CFLAGS += -DQLNX_TRACE_TSO_PKT_LEN .include From owner-svn-src-stable-10@freebsd.org Mon May 22 19:40:58 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CECCD78770; Mon, 22 May 2017 19:40:58 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA6EB144B; Mon, 22 May 2017 19:40:57 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJevWT072777; Mon, 22 May 2017 19:40:57 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJeus5072774; Mon, 22 May 2017 19:40:56 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705221940.v4MJeus5072774@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 22 May 2017 19:40:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318662 - stable/10/sys/dev/qlnx/qlnxe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:40:58 -0000 Author: davidcs Date: Mon May 22 19:40:56 2017 New Revision: 318662 URL: https://svnweb.freebsd.org/changeset/base/318662 Log: MFC r318383 QL_DPRINT macro modfied to handle multiple args; print line#. Submitted by:Shminderjit.Singh@cavium.com Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h stable/10/sys/dev/qlnx/qlnxe/qlnx_ioctl.c stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:36:26 2017 (r318661) +++ stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h Mon May 22 19:40:56 2017 (r318662) @@ -483,35 +483,141 @@ typedef struct qlnx_host qlnx_host_t; #ifdef QLNX_DEBUG -#define QL_DPRINT1(ha, x) if (ha->dbg_level & 0x0001) device_printf x -#define QL_DPRINT2(ha, x) if (ha->dbg_level & 0x0002) device_printf x -#define QL_DPRINT3(ha, x) if (ha->dbg_level & 0x0004) device_printf x -#define QL_DPRINT4(ha, x) if (ha->dbg_level & 0x0008) device_printf x -#define QL_DPRINT5(ha, x) if (ha->dbg_level & 0x0010) device_printf x -#define QL_DPRINT6(ha, x) if (ha->dbg_level & 0x0020) device_printf x -#define QL_DPRINT7(ha, x) if (ha->dbg_level & 0x0040) device_printf x -#define QL_DPRINT8(ha, x) if (ha->dbg_level & 0x0080) device_printf x -#define QL_DPRINT9(ha, x) if (ha->dbg_level & 0x0100) device_printf x -#define QL_DPRINT11(ha, x) if (ha->dbg_level & 0x0400) device_printf x -#define QL_DPRINT12(ha, x) if (ha->dbg_level & 0x0800) device_printf x -#define QL_DPRINT13(ha, x) if (ha->dbg_level & 0x1000) device_printf x -#define QL_DPRINT14(ha, x) if (ha->dbg_level & 0x2000) device_printf x +#define QL_DPRINT1(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0001) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT2(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0002) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT3(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0004) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT4(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0008) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT5(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0010) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT6(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0020) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT7(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0040) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT8(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0080) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT9(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0100) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT11(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0400) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT12(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x0800) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + +#define QL_DPRINT13(ha, x, ...) \ + do { \ + if ((ha)->dbg_level & 0x1000) { \ + device_printf ((ha)->pci_dev, \ + "[%s:%d]" x, \ + __func__, __LINE__, \ + ## __VA_ARGS__); \ + } \ + } while (0) + #else -#define QL_DPRINT1(ha, x) -#define QL_DPRINT2(ha, x) -#define QL_DPRINT3(ha, x) -#define QL_DPRINT4(ha, x) -#define QL_DPRINT5(ha, x) -#define QL_DPRINT6(ha, x) -#define QL_DPRINT7(ha, x) -#define QL_DPRINT8(ha, x) -#define QL_DPRINT9(ha, x) -#define QL_DPRINT11(ha, x) -#define QL_DPRINT12(ha, x) -#define QL_DPRINT13(ha, x) -#define QL_DPRINT14(ha, x) +#define QL_DPRINT1(ha, x, ...) +#define QL_DPRINT2(ha, x, ...) +#define QL_DPRINT3(ha, x, ...) +#define QL_DPRINT4(ha, x, ...) +#define QL_DPRINT5(ha, x, ...) +#define QL_DPRINT6(ha, x, ...) +#define QL_DPRINT7(ha, x, ...) +#define QL_DPRINT8(ha, x, ...) +#define QL_DPRINT9(ha, x, ...) +#define QL_DPRINT11(ha, x, ...) +#define QL_DPRINT12(ha, x, ...) +#define QL_DPRINT13(ha, x, ...) #endif /* #ifdef QLNX_DEBUG */ Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_ioctl.c ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/qlnx_ioctl.c Mon May 22 19:36:26 2017 (r318661) +++ stable/10/sys/dev/qlnx/qlnxe/qlnx_ioctl.c Mon May 22 19:40:56 2017 (r318662) @@ -121,8 +121,7 @@ qlnx_grc_dump(qlnx_host_t *ha, uint32_t p_ptt = ecore_ptt_acquire(p_hwfn); if (!p_ptt) { - QL_DPRINT1(ha, (ha->pci_dev, "%s : ecore_ptt_acquire failed\n", - __func__)); + QL_DPRINT1(ha,"ecore_ptt_acquire failed\n"); return (rval); } @@ -133,9 +132,8 @@ qlnx_grc_dump(qlnx_host_t *ha, uint32_t rval = 0; ha->grcdump_taken = 1; } else - QL_DPRINT1(ha, (ha->pci_dev, - "%s : ecore_dbg_grc_dump failed [%d, 0x%x]\n", - __func__, hwfn_index, rval)); + QL_DPRINT1(ha,"ecore_dbg_grc_dump failed [%d, 0x%x]\n", + hwfn_index, rval); ecore_ptt_release(p_hwfn, p_ptt); @@ -177,8 +175,7 @@ qlnx_get_grc_dump(qlnx_host_t *ha, qlnx_ grcdump->grcdump_dwords[i] = dwords; - QL_DPRINT1(ha, (ha->pci_dev, "%s: grcdump_dwords[%d] = 0x%x\n", - __func__, i, dwords)); + QL_DPRINT1(ha,"grcdump_dwords[%d] = 0x%x\n", i, dwords); rval = copyout(ha->grcdump[i], grcdump->grcdump[i], ha->grcdump_size[i]); @@ -213,8 +210,7 @@ qlnx_idle_chk(qlnx_host_t *ha, uint32_t p_ptt = ecore_ptt_acquire(p_hwfn); if (!p_ptt) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s : ecore_ptt_acquire failed\n", __func__)); + QL_DPRINT1(ha,"ecore_ptt_acquire failed\n"); return (rval); } @@ -225,9 +221,8 @@ qlnx_idle_chk(qlnx_host_t *ha, uint32_t rval = 0; ha->idle_chk_taken = 1; } else - QL_DPRINT1(ha, (ha->pci_dev, - "%s : ecore_dbg_idle_chk_dump failed [%d, 0x%x]\n", - __func__, hwfn_index, rval)); + QL_DPRINT1(ha,"ecore_dbg_idle_chk_dump failed [%d, 0x%x]\n", + hwfn_index, rval); ecore_ptt_release(p_hwfn, p_ptt); @@ -271,8 +266,7 @@ qlnx_get_idle_chk(qlnx_host_t *ha, qlnx_ idle_chk->idle_chk_dwords[i] = dwords; - QL_DPRINT1(ha, (ha->pci_dev, "%s: idle_chk_dwords[%d] = 0x%x\n", - __func__, i, dwords)); + QL_DPRINT1(ha,"idle_chk_dwords[%d] = 0x%x\n", i, dwords); rval = copyout(ha->idle_chk[i], idle_chk->idle_chk[i], ha->idle_chk_size[i]); @@ -299,9 +293,8 @@ qlnx_get_trace_cmd_size(qlnx_host_t *ha, p_ptt = ecore_ptt_acquire(p_hwfn); if (!p_ptt) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s: ecore_ptt_acquire [%d, 0x%x]failed\n", - __func__, hwfn_index, cmd)); + QL_DPRINT1(ha, "ecore_ptt_acquire [%d, 0x%x]failed\n", + hwfn_index, cmd); return (0); } @@ -334,8 +327,7 @@ qlnx_get_trace_cmd_size(qlnx_host_t *ha, } if (rval != DBG_STATUS_OK) { - QL_DPRINT1(ha, (ha->pci_dev, "%s : cmd = 0x%x failed [0x%x]\n", - __func__, cmd, rval)); + QL_DPRINT1(ha,"cmd = 0x%x failed [0x%x]\n", cmd, rval); num_dwords = 0; } @@ -369,9 +361,8 @@ qlnx_get_trace(qlnx_host_t *ha, int hwfn buffer = qlnx_zalloc(trace->size[hwfn_index]); if (buffer == NULL) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s: qlnx_zalloc [%d, 0x%x]failed\n", - __func__, hwfn_index, trace->cmd)); + QL_DPRINT1(ha,"qlnx_zalloc [%d, 0x%x]failed\n", + hwfn_index, trace->cmd); return (ENXIO); } ecore_dbg_set_app_ver(ecore_dbg_get_fw_func_ver()); @@ -380,9 +371,8 @@ qlnx_get_trace(qlnx_host_t *ha, int hwfn p_ptt = ecore_ptt_acquire(p_hwfn); if (!p_ptt) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s: ecore_ptt_acquire [%d, 0x%x]failed\n", - __func__, hwfn_index, trace->cmd)); + QL_DPRINT1(ha, "ecore_ptt_acquire [%d, 0x%x]failed\n", + hwfn_index, trace->cmd); return (ENXIO); } @@ -420,8 +410,7 @@ qlnx_get_trace(qlnx_host_t *ha, int hwfn } if (rval != DBG_STATUS_OK) { - QL_DPRINT1(ha, (ha->pci_dev, "%s : cmd = 0x%x failed [0x%x]\n", - __func__, trace->cmd, rval)); + QL_DPRINT1(ha,"cmd = 0x%x failed [0x%x]\n", trace->cmd, rval); num_dwords = 0; } @@ -609,21 +598,18 @@ qlnx_write_nvram(qlnx_host_t *ha, qlnx_n ret = copyin(nvram->data, buf, nvram->data_len); - QL_DPRINT9(ha, - (ha->pci_dev, "%s: issue cmd = 0x%x data = %p " - " data_len = 0x%x ret = 0x%x exit\n", __func__, - cmd, nvram->data, nvram->data_len, ret)); + QL_DPRINT9(ha, "issue cmd = 0x%x data = %p \ + data_len = 0x%x ret = 0x%x exit\n", + cmd, nvram->data, nvram->data_len, ret); if (ret == 0) { ret = ecore_mcp_nvm_write(&ha->cdev, cmd, nvram->offset, buf, nvram->data_len); } - QL_DPRINT9(ha, - (ha->pci_dev, "%s: cmd = 0x%x data = %p " - " data_len = 0x%x resp = 0x%x ret = 0x%x exit\n", - __func__, cmd, nvram->data, nvram->data_len, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, "cmd = 0x%x data = %p \ + data_len = 0x%x resp = 0x%x ret = 0x%x exit\n", + cmd, nvram->data, nvram->data_len, ha->cdev.mcp_nvm_resp, ret); free(buf, M_QLNXBUF); @@ -644,10 +630,9 @@ qlnx_read_nvram(qlnx_host_t *ha, qlnx_nv ret = ecore_mcp_nvm_read(&ha->cdev, nvram->offset, buf, nvram->data_len); - QL_DPRINT9(ha, (ha->pci_dev, "%s: data = %p data_len = 0x%x " - " resp = 0x%x ret = 0x%x exit\n", __func__, - nvram->data, nvram->data_len, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, " data = %p data_len = 0x%x \ + resp = 0x%x ret = 0x%x exit\n", + nvram->data, nvram->data_len, ha->cdev.mcp_nvm_resp, ret); if (ret == 0) { ret = copyout(buf, nvram->data, nvram->data_len); @@ -672,10 +657,9 @@ qlnx_get_nvram_resp(qlnx_host_t *ha, qln ret = ecore_mcp_nvm_resp(&ha->cdev, buf); - QL_DPRINT9(ha, (ha->pci_dev, "%s: data = %p data_len = 0x%x " - " resp = 0x%x ret = 0x%x exit\n", __func__, - nvram->data, nvram->data_len, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, "data = %p data_len = 0x%x \ + resp = 0x%x ret = 0x%x exit\n", + nvram->data, nvram->data_len, ha->cdev.mcp_nvm_resp, ret); if (ret == 0) { ret = copyout(buf, nvram->data, nvram->data_len); @@ -708,28 +692,25 @@ qlnx_nvram(qlnx_host_t *ha, qlnx_nvram_t case QLNX_NVRAM_CMD_SET_SECURE_MODE: ret = ecore_mcp_nvm_set_secure_mode(&ha->cdev, nvram->offset); - QL_DPRINT9(ha, (ha->pci_dev, - "%s: QLNX_NVRAM_CMD_SET_SECURE_MODE " - " resp = 0x%x ret = 0x%x exit\n", __func__, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, "QLNX_NVRAM_CMD_SET_SECURE_MODE \ + resp = 0x%x ret = 0x%x exit\n", + ha->cdev.mcp_nvm_resp, ret); break; case QLNX_NVRAM_CMD_DEL_FILE: ret = ecore_mcp_nvm_del_file(&ha->cdev, nvram->offset); - QL_DPRINT9(ha, (ha->pci_dev, - "%s: QLNX_NVRAM_CMD_DEL_FILE " - " resp = 0x%x ret = 0x%x exit\n", __func__, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, "QLNX_NVRAM_CMD_DEL_FILE \ + resp = 0x%x ret = 0x%x exit\n", + ha->cdev.mcp_nvm_resp, ret); break; case QLNX_NVRAM_CMD_PUT_FILE_BEGIN: ret = ecore_mcp_nvm_put_file_begin(&ha->cdev, nvram->offset); - QL_DPRINT9(ha, (ha->pci_dev, - "%s: QLNX_NVRAM_CMD_PUT_FILE_BEGIN " - " resp = 0x%x ret = 0x%x exit\n", __func__, - ha->cdev.mcp_nvm_resp, ret)); + QL_DPRINT9(ha, "QLNX_NVRAM_CMD_PUT_FILE_BEGIN \ + resp = 0x%x ret = 0x%x exit\n", + ha->cdev.mcp_nvm_resp, ret); break; case QLNX_NVRAM_CMD_GET_NVRAM_RESP: Modified: stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:36:26 2017 (r318661) +++ stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c Mon May 22 19:40:56 2017 (r318662) @@ -303,7 +303,7 @@ qlnx_sp_intr(void *arg) ha = (qlnx_host_t *)p_hwfn->p_dev; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); for (i = 0; i < ha->cdev.num_hwfns; i++) { if (&ha->cdev.hwfns[i] == p_hwfn) { @@ -311,7 +311,7 @@ qlnx_sp_intr(void *arg) break; } } - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -353,8 +353,7 @@ qlnx_create_sp_taskqueues(qlnx_host_t *h taskqueue_start_threads(&ha->sp_taskqueue[i], 1, PI_NET, "%s", tq_name); - QL_DPRINT1(ha, (ha->pci_dev, "%s: %p\n", __func__, - ha->sp_taskqueue[i])); + QL_DPRINT1(ha, "%p\n", ha->sp_taskqueue[i]); } return (0); @@ -518,7 +517,7 @@ qlnx_fp_taskqueue_exit: ecore_sb_ack(fp->sb_info, IGU_INT_ENABLE, 1); } - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret)); + QL_DPRINT2(ha, "exit ret = %d\n", ret); return; } @@ -548,8 +547,7 @@ qlnx_create_fp_taskqueues(qlnx_host_t *h taskqueue_start_threads(&fp->fp_taskqueue, 1, PI_NET, "%s", tq_name); - QL_DPRINT1(ha, (ha->pci_dev, "%s: %p\n", __func__, - fp->fp_taskqueue)); + QL_DPRINT1(ha, "%p\n",fp->fp_taskqueue); } return (0); @@ -711,15 +709,14 @@ qlnx_pci_attach(device_t dev) else ha->num_rss = ha->msix_count - ha->cdev.num_hwfns; - QL_DPRINT1(ha, (dev, "%s:\n\t\t\tpci_reg [%p, 0x%08x 0x%08x]" + QL_DPRINT1(ha, "\n\t\t\tpci_reg [%p, 0x%08x 0x%08x]" "\n\t\t\tdbells [%p, 0x%08x 0x%08x]" "\n\t\t\tmsix [%p, 0x%08x 0x%08x 0x%x 0x%x]" "\n\t\t\t[ncpus = %d][num_rss = 0x%x] [num_tc = 0x%x]\n", - __func__, ha->pci_reg, rsrc_len_reg, + ha->pci_reg, rsrc_len_reg, ha->reg_rid, ha->pci_dbells, rsrc_len_dbells, ha->dbells_rid, ha->msix_bar, rsrc_len_msix, ha->msix_rid, pci_msix_count(dev), - ha->msix_count, mp_ncpus, ha->num_rss, ha->num_tc)); - + ha->msix_count, mp_ncpus, ha->num_rss, ha->num_tc); if (pci_alloc_msix(dev, &ha->msix_count)) { device_printf(dev, "%s: pci_alloc_msix[%d] failed\n", __func__, ha->msix_count); @@ -755,9 +752,9 @@ qlnx_pci_attach(device_t dev) goto qlnx_pci_attach_err; } - QL_DPRINT1(ha, (dev, "%s: p_hwfn [%p] sp_irq_rid %d" - " sp_irq %p sp_handle %p\n", __func__, p_hwfn, - ha->sp_irq_rid[i], ha->sp_irq[i], ha->sp_handle[i])); + QL_DPRINT1(ha, "p_hwfn [%p] sp_irq_rid %d" + " sp_irq %p sp_handle %p\n", p_hwfn, + ha->sp_irq_rid[i], ha->sp_irq[i], ha->sp_handle[i]); } @@ -800,8 +797,8 @@ qlnx_pci_attach(device_t dev) goto qlnx_pci_attach_err; ha->grcdump_size[i] = ha->grcdump_size[i] << 2; - QL_DPRINT1(ha, (dev, "grcdump_size[%d] = 0x%08x\n", - i, ha->grcdump_size[i])); + QL_DPRINT1(ha, "grcdump_size[%d] = 0x%08x\n", + i, ha->grcdump_size[i]); ha->grcdump[i] = qlnx_zalloc(ha->grcdump_size[i]); if (ha->grcdump[i] == NULL) { @@ -815,8 +812,8 @@ qlnx_pci_attach(device_t dev) goto qlnx_pci_attach_err; ha->idle_chk_size[i] = ha->idle_chk_size[i] << 2; - QL_DPRINT1(ha, (dev, "idle_chk_size[%d] = 0x%08x\n", - i, ha->idle_chk_size[i])); + QL_DPRINT1(ha, "idle_chk_size[%d] = 0x%08x\n", + i, ha->idle_chk_size[i]); ha->idle_chk[i] = qlnx_zalloc(ha->idle_chk_size[i]); @@ -855,8 +852,8 @@ qlnx_pci_attach(device_t dev) FW_MAJOR_VERSION, FW_MINOR_VERSION, FW_REVISION_VERSION, FW_ENGINEERING_VERSION); - QL_DPRINT1(ha, (dev, "%s: STORM_FW version %s MFW version %s\n", - __func__, ha->stormfw_ver, ha->mfw_ver)); + QL_DPRINT1(ha, "STORM_FW version %s MFW version %s\n", + ha->stormfw_ver, ha->mfw_ver); qlnx_init_ifnet(dev, ha); @@ -874,7 +871,7 @@ qlnx_pci_attach_err0: goto qlnx_pci_attach_err; } - QL_DPRINT2(ha, (dev, "%s: success\n", __func__)); + QL_DPRINT2(ha, "success\n"); return (0); @@ -958,7 +955,7 @@ qlnx_release(qlnx_host_t *ha) dev = ha->pci_dev; - QL_DPRINT2(ha, (dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); for (i = 0; i < QLNX_MAX_HW_FUNCS; i++) { if (ha->idle_chk[i] != NULL) { @@ -1041,7 +1038,7 @@ qlnx_release(qlnx_host_t *ha) (void) bus_release_resource(dev, SYS_RES_MEMORY, ha->msix_rid, ha->msix_bar); - QL_DPRINT2(ha, (dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -1053,14 +1050,14 @@ qlnx_trigger_dump(qlnx_host_t *ha) if (ha->ifp != NULL) ha->ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); - QL_DPRINT2(ha, (ha->pci_dev, "%s: start\n", __func__)); + QL_DPRINT2(ha, "enter\n"); for (i = 0; i < ha->cdev.num_hwfns; i++) { qlnx_grc_dump(ha, &ha->grcdump_dwords[i], i); qlnx_idle_chk(ha, &ha->idle_chk_dwords[i], i); } - QL_DPRINT2(ha, (ha->pci_dev, "%s: end\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -1779,12 +1776,11 @@ qlnx_add_sysctls(qlnx_host_t *ha) "\tpersonality = 6 => Default in Shared Memory\n"); ha->dbg_level = 0; - SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "debug", CTLFLAG_RW, &ha->dbg_level, ha->dbg_level, "Debug Level"); - ha->dp_level = 0; + ha->dp_level = 0x01; SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "dp_level", CTLFLAG_RW, &ha->dp_level, ha->dp_level, "DP Level"); @@ -1999,7 +1995,7 @@ qlnx_init_ifnet(device_t dev, qlnx_host_ ifmedia_set(&ha->media, (IFM_ETHER | IFM_AUTO)); - QL_DPRINT2(ha, (dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -2009,6 +2005,8 @@ qlnx_init_locked(qlnx_host_t *ha) { struct ifnet *ifp = ha->ifp; + QL_DPRINT1(ha, "Driver Initialization start \n"); + qlnx_stop(ha); if (qlnx_load(ha) == 0) { @@ -2026,13 +2024,13 @@ qlnx_init(void *arg) ha = (qlnx_host_t *)arg; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); QLNX_LOCK(ha); qlnx_init_locked(ha); QLNX_UNLOCK(ha); - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -2221,8 +2219,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd switch (cmd) { case SIOCSIFADDR: - QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFADDR (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "SIOCSIFADDR (0x%lx)\n", cmd); if (ifa->ifa_addr->sa_family == AF_INET) { ifp->if_flags |= IFF_UP; @@ -2231,10 +2228,8 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd qlnx_init_locked(ha); QLNX_UNLOCK(ha); } - QL_DPRINT4(ha, (ha->pci_dev, - "%s: SIOCSIFADDR (0x%lx) ipv4 [0x%08x]\n", - __func__, cmd, - ntohl(IA_SIN(ifa)->sin_addr.s_addr))); + QL_DPRINT4(ha, "SIOCSIFADDR (0x%lx) ipv4 [0x%08x]\n", + cmd, ntohl(IA_SIN(ifa)->sin_addr.s_addr)); arp_ifinit(ifp, ifa); } else { @@ -2243,8 +2238,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd break; case SIOCSIFMTU: - QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFMTU (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "SIOCSIFMTU (0x%lx)\n", cmd); if (ifr->ifr_mtu > QLNX_MAX_MTU) { ret = EINVAL; @@ -2263,8 +2257,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd break; case SIOCSIFFLAGS: - QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFFLAGS (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "SIOCSIFFLAGS (0x%lx)\n", cmd); QLNX_LOCK(ha); @@ -2292,8 +2285,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd break; case SIOCADDMULTI: - QL_DPRINT4(ha, (ha->pci_dev, - "%s: %s (0x%lx)\n", __func__, "SIOCADDMULTI", cmd)); + QL_DPRINT4(ha, "%s (0x%lx)\n", "SIOCADDMULTI", cmd); if (ifp->if_drv_flags & IFF_DRV_RUNNING) { if (qlnx_set_multi(ha, 1)) @@ -2302,8 +2294,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd break; case SIOCDELMULTI: - QL_DPRINT4(ha, (ha->pci_dev, - "%s: %s (0x%lx)\n", __func__, "SIOCDELMULTI", cmd)); + QL_DPRINT4(ha, "%s (0x%lx)\n", "SIOCDELMULTI", cmd); if (ifp->if_drv_flags & IFF_DRV_RUNNING) { if (qlnx_set_multi(ha, 0)) @@ -2313,9 +2304,8 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd case SIOCSIFMEDIA: case SIOCGIFMEDIA: - QL_DPRINT4(ha, (ha->pci_dev, - "%s: SIOCSIFMEDIA/SIOCGIFMEDIA (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "SIOCSIFMEDIA/SIOCGIFMEDIA (0x%lx)\n", cmd); + ret = ifmedia_ioctl(ifp, ifr, &ha->media, cmd); break; @@ -2323,8 +2313,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd mask = ifr->ifr_reqcap ^ ifp->if_capenable; - QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFCAP (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "SIOCSIFCAP (0x%lx)\n", cmd); if (mask & IFCAP_HWCSUM) ifp->if_capenable ^= IFCAP_HWCSUM; @@ -2367,8 +2356,7 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd p_ptt = ecore_ptt_acquire(p_hwfn); if (!p_ptt) { - QL_DPRINT1(ha, (ha->pci_dev, "%s :" - " ecore_ptt_acquire failed\n", __func__)); + QL_DPRINT1(ha, "ecore_ptt_acquire failed\n"); ret = -1; break; } @@ -2386,20 +2374,19 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd ret = copyout(&i2c, ifr->ifr_data, sizeof(i2c)); - QL_DPRINT8(ha, (ha->pci_dev, "SIOCGI2C copyout ret = %d" - " len = %d addr = 0x%02x offset = 0x%04x" - " data[0..7]=0x%02x 0x%02x 0x%02x 0x%02x 0x%02x" - " 0x%02x 0x%02x 0x%02x\n", + QL_DPRINT8(ha, "SIOCGI2C copyout ret = %d \ + len = %d addr = 0x%02x offset = 0x%04x \ + data[0..7]=0x%02x 0x%02x 0x%02x 0x%02x 0x%02x \ + 0x%02x 0x%02x 0x%02x\n", ret, i2c.len, i2c.dev_addr, i2c.offset, i2c.data[0], i2c.data[1], i2c.data[2], i2c.data[3], - i2c.data[4], i2c.data[5], i2c.data[6], i2c.data[7])); + i2c.data[4], i2c.data[5], i2c.data[6], i2c.data[7]); break; } #endif /* #if (__FreeBSD_version >= 1100101) */ default: - QL_DPRINT4(ha, (ha->pci_dev, "%s: default (0x%lx)\n", - __func__, cmd)); + QL_DPRINT4(ha, "default (0x%lx)\n", cmd); ret = ether_ioctl(ifp, cmd, data); break; } @@ -2416,14 +2403,14 @@ qlnx_media_change(struct ifnet *ifp) ha = (qlnx_host_t *)ifp->if_softc; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); ifm = &ha->media; if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER) ret = EINVAL; - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return (ret); } @@ -2435,7 +2422,7 @@ qlnx_media_status(struct ifnet *ifp, str ha = (qlnx_host_t *)ifp->if_softc; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); ifmr->ifm_status = IFM_AVALID; ifmr->ifm_active = IFM_ETHER; @@ -2451,8 +2438,7 @@ qlnx_media_status(struct ifnet *ifp, str (IFM_ETH_RXPAUSE | IFM_ETH_TXPAUSE); } - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit (%s)\n", __func__, - (ha->link_up ? "link_up" : "link_down"))); + QL_DPRINT2(ha, "exit (%s)\n", (ha->link_up ? "link_up" : "link_down")); return; } @@ -2478,20 +2464,19 @@ qlnx_free_tx_pkt(qlnx_host_t *ha, struct QL_RESET_ERR_INJECT(ha, QL_ERR_INJCT_TX_INT_MBUF_NULL); - QL_DPRINT1(ha, (ha->pci_dev, "%s: (mp == NULL) " + QL_DPRINT1(ha, "(mp == NULL) " " tx_idx = 0x%x" " ecore_prod_idx = 0x%x" " ecore_cons_idx = 0x%x" " hw_bd_cons = 0x%x" " txq_db_last = 0x%x" " elem_left = 0x%x\n", - __func__, fp->rss_id, ecore_chain_get_prod_idx(&txq->tx_pbl), ecore_chain_get_cons_idx(&txq->tx_pbl), le16toh(*txq->hw_cons_ptr), txq->tx_db.raw, - ecore_chain_get_elem_left(&txq->tx_pbl))); + ecore_chain_get_elem_left(&txq->tx_pbl)); fp->err_tx_free_pkt_null++; @@ -2552,20 +2537,20 @@ qlnx_tx_int(qlnx_host_t *ha, struct qlnx QL_RESET_ERR_INJECT(ha, QL_ERR_INJCT_TX_INT_DIFF); - QL_DPRINT1(ha, (ha->pci_dev, "%s: (diff = 0x%x) " + QL_DPRINT1(ha, "(diff = 0x%x) " " tx_idx = 0x%x" " ecore_prod_idx = 0x%x" " ecore_cons_idx = 0x%x" " hw_bd_cons = 0x%x" " txq_db_last = 0x%x" " elem_left = 0x%x\n", - __func__, diff, + diff, fp->rss_id, ecore_chain_get_prod_idx(&txq->tx_pbl), ecore_chain_get_cons_idx(&txq->tx_pbl), le16toh(*txq->hw_cons_ptr), txq->tx_db.raw, - ecore_chain_get_elem_left(&txq->tx_pbl))); + ecore_chain_get_elem_left(&txq->tx_pbl)); fp->err_tx_cons_idx_conflict++; @@ -2587,7 +2572,7 @@ qlnx_transmit(struct ifnet *ifp, struct struct qlnx_fastpath *fp; int rss_id = 0, ret = 0; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); #if __FreeBSD_version >= 1100000 if (M_HASHTYPE_GET(mp) != M_HASHTYPE_NONE) @@ -2615,7 +2600,7 @@ qlnx_transmit(struct ifnet *ifp, struct qlnx_transmit_exit: - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret)); + QL_DPRINT2(ha, "exit ret = %d\n", ret); return ret; } @@ -2629,7 +2614,7 @@ qlnx_qflush(struct ifnet *ifp) ha = (qlnx_host_t *)ifp->if_softc; - QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT2(ha, "enter\n"); for (rss_id = 0; rss_id < ha->num_rss; rss_id++) { @@ -2648,7 +2633,7 @@ qlnx_qflush(struct ifnet *ifp) mtx_unlock(&fp->tx_mtx); } } - QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); + QL_DPRINT2(ha, "exit\n"); return; } @@ -2792,7 +2777,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f uint32_t nbds_in_hdr = 0; uint32_t offset = 0; - QL_DPRINT8(ha, (ha->pci_dev, "%s: enter\n", __func__)); + QL_DPRINT8(ha, "enter\n"); if (!ha->link_up) return (-1); @@ -2844,8 +2829,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f struct mbuf *m; - QL_DPRINT8(ha, (ha->pci_dev, "%s: EFBIG [%d]\n", __func__, - m_head->m_pkthdr.len)); + QL_DPRINT8(ha, "EFBIG [%d]\n", m_head->m_pkthdr.len); fp->tx_defrag++; @@ -2855,9 +2839,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f fp->tx_pkts_freed++; m_freem(m_head); *m_headp = NULL; - QL_DPRINT1(ha, (ha->pci_dev, - "%s: m_defrag() = NULL [%d]\n", - __func__, ret)); + QL_DPRINT1(ha, "m_defrag() = NULL [%d]\n", ret); return (ENOBUFS); } @@ -2869,9 +2851,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f fp->err_tx_defrag_dmamap_load++; - QL_DPRINT1(ha, (ha->pci_dev, - "%s: bus_dmamap_load_mbuf_sg failed0[%d, %d]\n", - __func__, ret, m_head->m_pkthdr.len)); + QL_DPRINT1(ha, + "bus_dmamap_load_mbuf_sg failed0 [%d, %d]\n", + ret, m_head->m_pkthdr.len); fp->tx_pkts_freed++; m_freem(m_head); @@ -2885,9 +2867,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f fp->err_tx_non_tso_max_seg++; - QL_DPRINT1(ha, (ha->pci_dev, - "%s: (%d) nsegs too many for non-TSO[%d, %d]\n", - __func__, ret, nsegs, m_head->m_pkthdr.len)); + QL_DPRINT1(ha, + "(%d) nsegs too many for non-TSO [%d, %d]\n", + ret, nsegs, m_head->m_pkthdr.len); fp->tx_pkts_freed++; m_freem(m_head); @@ -2902,10 +2884,8 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f fp->err_tx_dmamap_load++; - QL_DPRINT1(ha, (ha->pci_dev, - "%s: bus_dmamap_load_mbuf_sg failed1[%d, %d]\n", - __func__, ret, m_head->m_pkthdr.len)); - + QL_DPRINT1(ha, "bus_dmamap_load_mbuf_sg failed1 [%d, %d]\n", + ret, m_head->m_pkthdr.len); fp->tx_pkts_freed++; m_freem(m_head); *m_headp = NULL; @@ -2924,9 +2904,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f if ((nsegs + QLNX_TX_ELEM_RESERVE) > (int)(elem_left = ecore_chain_get_elem_left(&txq->tx_pbl))) { - QL_DPRINT1(ha, (ha->pci_dev, "%s: (%d, 0x%x) insuffient BDs" - "in chain[%d] trying to free packets\n", - __func__, nsegs, elem_left, fp->rss_id)); + QL_DPRINT1(ha, "(%d, 0x%x) insuffient BDs" + " in chain[%d] trying to free packets\n", + nsegs, elem_left, fp->rss_id); fp->tx_nsegs_gt_elem_left++; @@ -2935,9 +2915,9 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f if ((nsegs + QLNX_TX_ELEM_RESERVE) > (int)(elem_left = ecore_chain_get_elem_left(&txq->tx_pbl))) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s: (%d, 0x%x) insuffient BDs in chain[%d]\n", - __func__, nsegs, elem_left, fp->rss_id)); + QL_DPRINT1(ha, + "(%d, 0x%x) insuffient BDs in chain[%d]\n", + nsegs, elem_left, fp->rss_id); fp->err_tx_nsegs_gt_elem_left++; fp->tx_ring_full = 1; @@ -3165,7 +3145,7 @@ qlnx_send(qlnx_host_t *ha, struct qlnx_f qlnx_txq_doorbell_wr32(ha, txq->doorbell_addr, txq->tx_db.raw); - QL_DPRINT8(ha, (ha->pci_dev, "%s: exit\n", __func__)); + QL_DPRINT8(ha, "exit\n"); return (0); } @@ -3185,6 +3165,8 @@ qlnx_stop(qlnx_host_t *ha) * propagate the if_drv_flags * state to each tx thread */ + QL_DPRINT1(ha, "QLNX STATE = %d\n",ha->state); + if (ha->state == QLNX_STATE_OPEN) { for (i = 0; i < ha->num_rss; i++) { struct qlnx_fastpath *fp = &ha->fp_array[i]; @@ -3277,8 +3259,7 @@ qlnx_rx_jumbo_chain(qlnx_host_t *ha, str mp = sw_rx_data->data; if (mp == NULL) { - QL_DPRINT1(ha, (ha->pci_dev, "%s: mp = NULL\n", - __func__)); + QL_DPRINT1(ha, "mp = NULL\n"); fp->err_rx_mp_null++; rxq->sw_rx_cons = (rxq->sw_rx_cons + 1) & (RX_RING_SIZE - 1); @@ -3293,10 +3274,8 @@ qlnx_rx_jumbo_chain(qlnx_host_t *ha, str if (qlnx_alloc_rx_buffer(ha, rxq) != 0) { - QL_DPRINT1(ha, (ha->pci_dev, - "%s: New buffer allocation failed, dropping" - " incoming packet and reusing its buffer\n", - __func__)); + QL_DPRINT1(ha, "New buffer allocation failed, dropping" + " incoming packet and reusing its buffer\n"); qlnx_reuse_rx_data(rxq); fp->err_rx_alloc_errors++; @@ -3356,29 +3335,29 @@ qlnx_tpa_start(qlnx_host_t *ha, dev = ha->pci_dev; agg_index = cqe->tpa_agg_index; - QL_DPRINT7(ha, (dev, "%s[%d]: enter\n " - "\t type = 0x%x\n" - "\t bitfields = 0x%x\n" - "\t seg_len = 0x%x\n" - "\t pars_flags = 0x%x\n" - "\t vlan_tag = 0x%x\n" - "\t rss_hash = 0x%x\n" - "\t len_on_first_bd = 0x%x\n" - "\t placement_offset = 0x%x\n" - "\t tpa_agg_index = 0x%x\n" - "\t header_len = 0x%x\n" - "\t ext_bd_len_list[0] = 0x%x\n" - "\t ext_bd_len_list[1] = 0x%x\n" - "\t ext_bd_len_list[2] = 0x%x\n" - "\t ext_bd_len_list[3] = 0x%x\n" - "\t ext_bd_len_list[4] = 0x%x\n", - __func__, fp->rss_id, cqe->type, cqe->bitfields, cqe->seg_len, + QL_DPRINT7(ha, "[rss_id = %d]: enter\n \ + \t type = 0x%x\n \ + \t bitfields = 0x%x\n \ + \t seg_len = 0x%x\n \ + \t pars_flags = 0x%x\n \ + \t vlan_tag = 0x%x\n \ + \t rss_hash = 0x%x\n \ + \t len_on_first_bd = 0x%x\n \ + \t placement_offset = 0x%x\n \ + \t tpa_agg_index = 0x%x\n \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@freebsd.org Mon May 22 19:57:21 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAAF1D79122; Mon, 22 May 2017 19:57:21 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8DC81DF1; Mon, 22 May 2017 19:57:21 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MJvK1g081648; Mon, 22 May 2017 19:57:20 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MJvKrb081647; Mon, 22 May 2017 19:57:20 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705221957.v4MJvKrb081647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 22 May 2017 19:57:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318675 - stable/10/sys/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 19:57:22 -0000 Author: rmacklem Date: Mon May 22 19:57:20 2017 New Revision: 318675 URL: https://svnweb.freebsd.org/changeset/base/318675 Log: MFC: r317906 Fix the client side krpc from doing TCP reconnects for ERESTART from sosend(). When sosend() replies ERESTART in the client side krpc, it indicates that the RPC message hasn't yet been sent and that the send queue is full or locked while a signal is posted for the process. Without this patch, this would result in a RPC_CANTSEND reply from clnt_vc_call(), which would cause clnt_reconnect_call() to create a new TCP transport connection. For most NFS servers, this wasn't a serious problem, although it did imply retries of outstanding RPCs, which could possibly have missed the DRC. For an NFSv4.1 mount to AmazonEFS, this caused a serious problem, since AmazonEFS often didn't retain the NFSv4.1 session and would reply with NFS4ERR_BAD_SESSION. This implies to the client a crash/reboot which requires open/lock state recovery. Three options were considered to fix this: - Return the ERESTART all the way up to the system call boundary and then have the system call redone. This is fraught with risk, due to convoluted code paths, asynchronous I/O RPCs etc. cperciva@ worked on this, but it is still a work in prgress and may not be feasible. - Set SB_NOINTR for the socket buffer. This fixes the problem, but makes the sosend() completely non interruptible, which kib@ considered inappropriate. It also would break forced dismount when a thread was blocked in sosend(). - Modify the retry loop in clnt_vc_call(), so that it loops for this case for up to 15sec. Testing showed that the sosend() usually succeeded by the 2nd retry. The extreme case observed was 111 loop iterations, or about 100msec of delay. This third alternative is what is implemented in this patch, since the change is: - localized - straightforward - forced dismount is not broken by it. This patch has been tested by cperciva@ extensively against AmazonEFS. Modified: stable/10/sys/rpc/clnt_vc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/rpc/clnt_vc.c ============================================================================== --- stable/10/sys/rpc/clnt_vc.c Mon May 22 19:44:26 2017 (r318674) +++ stable/10/sys/rpc/clnt_vc.c Mon May 22 19:57:20 2017 (r318675) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -107,6 +108,8 @@ static struct clnt_ops clnt_vc_ops = { static void clnt_vc_upcallsdone(struct ct_data *); +static int fake_wchan; + /* * Create a client handle for a connection. * Default options are set, which the user can change using clnt_control()'s. @@ -298,7 +301,7 @@ clnt_vc_call( uint32_t xid; struct mbuf *mreq = NULL, *results; struct ct_request *cr; - int error; + int error, trycnt; cr = malloc(sizeof(struct ct_request), M_RPC, M_WAITOK); @@ -328,8 +331,20 @@ clnt_vc_call( timeout = ct->ct_wait; /* use default timeout */ } + /* + * After 15sec of looping, allow it to return RPC_CANTSEND, which will + * cause the clnt_reconnect layer to create a new TCP connection. + */ + trycnt = 15 * hz; call_again: mtx_assert(&ct->ct_lock, MA_OWNED); + if (ct->ct_closing || ct->ct_closed) { + ct->ct_threads--; + wakeup(ct); + mtx_unlock(&ct->ct_lock); + free(cr, M_RPC); + return (RPC_CANTSEND); + } ct->ct_xid++; xid = ct->ct_xid; @@ -397,13 +412,16 @@ call_again: */ error = sosend(ct->ct_socket, NULL, NULL, mreq, NULL, 0, curthread); mreq = NULL; - if (error == EMSGSIZE) { + if (error == EMSGSIZE || (error == ERESTART && + (ct->ct_waitflag & PCATCH) == 0 && trycnt-- > 0)) { SOCKBUF_LOCK(&ct->ct_socket->so_snd); sbwait(&ct->ct_socket->so_snd); SOCKBUF_UNLOCK(&ct->ct_socket->so_snd); AUTH_VALIDATE(auth, xid, NULL, NULL); mtx_lock(&ct->ct_lock); TAILQ_REMOVE(&ct->ct_pending, cr, cr_link); + /* Sleep for 1 clock tick before trying the sosend() again. */ + msleep(&fake_wchan, &ct->ct_lock, 0, "rpclpsnd", 1); goto call_again; } From owner-svn-src-stable-10@freebsd.org Mon May 22 21:52:08 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A3E0D78991; Mon, 22 May 2017 21:52:08 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDDB1149B; Mon, 22 May 2017 21:52:07 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MLq6os030319; Mon, 22 May 2017 21:52:06 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MLq6hQ030318; Mon, 22 May 2017 21:52:06 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705222152.v4MLq6hQ030318@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 22 May 2017 21:52:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318683 - stable/10/sbin/mount_nfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 21:52:08 -0000 Author: rmacklem Date: Mon May 22 21:52:06 2017 New Revision: 318683 URL: https://svnweb.freebsd.org/changeset/base/318683 Log: MFC: r317931 Fix mount_nfs so that it doesn't create mounttab entries for NFSv4 mounts. The NFSv4 protocol doesn't use the Mount protocol, so it doesn't make sense to add an entry for an NFSv4 mount to /var/db/mounttab. Also, r308871 modified umount so that it doesn't remove any entry created by mount_nfs. Modified: stable/10/sbin/mount_nfs/mount_nfs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mount_nfs/mount_nfs.c ============================================================================== --- stable/10/sbin/mount_nfs/mount_nfs.c Mon May 22 21:41:34 2017 (r318682) +++ stable/10/sbin/mount_nfs/mount_nfs.c Mon May 22 21:52:06 2017 (r318683) @@ -650,7 +650,7 @@ getnfsargs(char *spec, struct iovec **io build_iovec(iov, iovlen, "hostname", nam, (size_t)-1); /* Add mounted file system to PATH_MOUNTTAB */ - if (!add_mtab(hostp, spec)) + if (mountmode != V4 && !add_mtab(hostp, spec)) warnx("can't update %s for %s:%s", PATH_MOUNTTAB, hostp, spec); return (1); } From owner-svn-src-stable-10@freebsd.org Mon May 22 22:10:03 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6E5CD78D09; Mon, 22 May 2017 22:10:03 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A67891CAD; Mon, 22 May 2017 22:10:03 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4MMA2rm034570; Mon, 22 May 2017 22:10:02 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4MMA2xV034569; Mon, 22 May 2017 22:10:02 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705222210.v4MMA2xV034569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 22 May 2017 22:10:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318685 - stable/10/sys/fs/nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 22:10:04 -0000 Author: rmacklem Date: Mon May 22 22:10:02 2017 New Revision: 318685 URL: https://svnweb.freebsd.org/changeset/base/318685 Log: MFC: r318287 Make nfscl_mtofh() return ENXIO when *nfhpp == NULL. r317272 introduced a case where nfscl_mtofh() could return 0 when *nfhpp is NULL. This patch makes it return ENXIO for this case. Modified: stable/10/sys/fs/nfsclient/nfs_clcomsubs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clcomsubs.c Mon May 22 22:02:06 2017 (r318684) +++ stable/10/sys/fs/nfsclient/nfs_clcomsubs.c Mon May 22 22:10:02 2017 (r318685) @@ -475,6 +475,7 @@ nfscl_mtofh(struct nfsrv_descript *nd, s if (*++tl != 0) { nd->nd_flag |= ND_NOMOREDATA; flag = 0; + error = ENXIO; /* Return ENXIO so *nfhpp isn't used. */ } } if (flag) { From owner-svn-src-stable-10@freebsd.org Tue May 23 12:40:52 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05937D7995F; Tue, 23 May 2017 12:40:52 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C97E21898; Tue, 23 May 2017 12:40:51 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NCeopn008494; Tue, 23 May 2017 12:40:50 GMT (envelope-from badger@FreeBSD.org) Received: (from badger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NCeoKx008493; Tue, 23 May 2017 12:40:50 GMT (envelope-from badger@FreeBSD.org) Message-Id: <201705231240.v4NCeoKx008493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: badger set sender to badger@FreeBSD.org using -f From: Eric Badger Date: Tue, 23 May 2017 12:40:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318743 - in stable: 10/sys/sys 11/sys/kern 11/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 12:40:52 -0000 Author: badger Date: Tue May 23 12:40:50 2017 New Revision: 318743 URL: https://svnweb.freebsd.org/changeset/base/318743 Log: move p_sigqueue to the end of struct proc In order to preserve KBI in stable branches, replace the existing p_sigqueue slot with padding and move the expanded (as of r315949) p_sigqueue to the end of the struct. This is a repeat of r317529 (which concerned td_sigqueue in struct thread) for p_sigqueue in struct proc. Virtualbox modules (and possibly others) are affected without this fix. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D10843 Modified: stable/10/sys/sys/proc.h Changes in other areas also in this revision: Modified: stable/11/sys/kern/kern_thread.c stable/11/sys/sys/proc.h Modified: stable/10/sys/sys/proc.h ============================================================================== --- stable/10/sys/sys/proc.h Tue May 23 12:03:59 2017 (r318742) +++ stable/10/sys/sys/proc.h Tue May 23 12:40:50 2017 (r318743) @@ -528,8 +528,8 @@ struct proc { LIST_HEAD(, proc) p_children; /* (e) Pointer to list of children. */ struct mtx p_mtx; /* (n) Lock for this struct. */ struct ksiginfo *p_ksi; /* Locked by parent proc lock */ - sigqueue_t p_sigqueue; /* (c) Sigs not delivered to a td. */ -#define p_siglist p_sigqueue.sq_signals + uint64_t padding1[4]; + void *padding2[4]; /* The following fields are all zeroed upon creation in fork. */ #define p_startzero p_oppid @@ -626,6 +626,8 @@ struct proc { u_int p_ptevents; /* (c) ptrace() event mask. */ uint16_t p_elf_machine; /* (x) ELF machine type */ uint64_t p_elf_flags; /* (x) ELF flags */ + sigqueue_t p_sigqueue; /* (c) Sigs not delivered to a td. */ +#define p_siglist p_sigqueue.sq_signals }; #define p_session p_pgrp->pg_session From owner-svn-src-stable-10@freebsd.org Tue May 23 12:44:25 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4ACB9D79AC2; Tue, 23 May 2017 12:44:25 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from sasl.smtp.pobox.com (pb-smtp2.pobox.com [64.147.108.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2376F1E9D; Tue, 23 May 2017 12:44:24 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 634857005E; Tue, 23 May 2017 08:43:47 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=subject:to :references:cc:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=sasl; bh=DFoPeyG9Pxp9 mDDGMSp8ux0mDlY=; b=wA5bMA+mQXT2jAkLLPH9hqr+5TE9pVYTVJSzUMKfpI6B 0Koh04dZq3iv//YG8sd5NYyare0fiNagJGi85+kA6GU5Eo1SkooCtePdA8eLS1mN 4cT7Wq984Pjvzv2nVTE47olIRnFqoOTkPxj5Y3WUeZOVxwkupOYFAOMF/8IuU+8= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 5CD697005D; Tue, 23 May 2017 08:43:47 -0400 (EDT) Received: from [192.168.1.103] (unknown [24.7.205.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 0F9017005C; Tue, 23 May 2017 08:43:45 -0400 (EDT) Subject: Re: svn commit: r317529 - in stable: 10/sys/sys 11/sys/sys To: Slawa Olhovchenkov References: <201704272228.v3RMSoIg000680@repo.freebsd.org> <20170509203244.GA3182@zxy.spb.ru> <6dc19869-1d5e-cd7d-9dca-64379c482f3f@FreeBSD.org> <20170510125721.GE3165@zxy.spb.ru> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org From: Eric Badger Message-ID: <7b33f65d-380a-bb0e-032f-d84253871536@FreeBSD.org> Date: Tue, 23 May 2017 07:43:43 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170510125721.GE3165@zxy.spb.ru> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pobox-Relay-ID: 759EB9AE-3FB5-11E7-8FED-61520C78B957-46178211!pb-smtp2.pobox.com X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 12:44:25 -0000 On 05/10/2017 07:57 AM, Slawa Olhovchenkov wrote: > On Tue, May 09, 2017 at 09:14:20PM -0500, Eric Badger wrote: > >> On 05/09/2017 03:32 PM, Slawa Olhovchenkov wrote: >>> On Thu, Apr 27, 2017 at 10:28:50PM +0000, Eric Badger wrote: >>> >>>> Author: badger >>>> Date: Thu Apr 27 22:28:49 2017 >>>> New Revision: 317529 >>>> URL: https://svnweb.freebsd.org/changeset/base/317529 >>>> >>>> Log: >>>> Move td_sigqueue to the end of struct thread >>>> >>>> In order to preserve KBI in stable branches, replace the existing >>>> td_sigqueue slot with padding and move the expanded (as of r315949) >>>> td_sigqueue to the end of the struct. >>>> >>>> Reported by: jhb >>>> Suggested by: kib >>>> Reviewed by: jhb, kib, vangyzen >>>> Sponsored by: Dell EMC >>>> Differential Revision: https://reviews.freebsd.org/D10515 >>>> >>>> Modified: >>>> stable/10/sys/sys/proc.h >>> >>> Is this resolve only crash related to nvidia-driver? >>> Like virtualbox related crash still occur. >>> >> >> Yes, this was intended to address nvidia driver crashes. Is the virtual >> box problem the same as the one described here? >> >> https://lists.freebsd.org/pipermail/freebsd-stable/2017-March/087028.html > > I am use GENERIC and GENERIC kernel just reboot, w/o create crush > dump. > I mean need to add DDB and KDB to kernel config? > This should be fixed as of r318743. Eric From owner-svn-src-stable-10@freebsd.org Tue May 23 19:45:32 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE027D7A2EA; Tue, 23 May 2017 19:45:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF6D61F85; Tue, 23 May 2017 19:45:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4NJjV3p085054; Tue, 23 May 2017 19:45:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4NJjVf1085053; Tue, 23 May 2017 19:45:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705231945.v4NJjVf1085053@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 23 May 2017 19:45:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318756 - stable/10/contrib/netbsd-tests/lib/libc/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 19:45:33 -0000 Author: ngie Date: Tue May 23 19:45:31 2017 New Revision: 318756 URL: https://svnweb.freebsd.org/changeset/base/318756 Log: :raw no longer SIGSEGVs on FreeBSD; revert the signal expectation This is a direct commit to ^/stable/10, since this expectation was only added to ^/stable/10's copy of t_raw.c. PR: 216954 Sponsored by: Dell EMC Isilon Modified: stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c Modified: stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c Tue May 23 19:03:07 2017 (r318755) +++ stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c Tue May 23 19:45:31 2017 (r318756) @@ -38,12 +38,6 @@ __RCSID("$NetBSD: t_rpc.c,v 1.10 2016/08 #define RPCBPROC_NULL 0 -/* XXX (ngie): for clarity on what needs to be reverted later. */ -#define __FreeBSD_bug_216954__ -#ifdef __FreeBSD_bug_216954__ -#include -#endif - static int reply(caddr_t replyp, struct netbuf * raddrp, struct netconfig * nconf) { @@ -331,12 +325,6 @@ ATF_TC_HEAD(raw, tc) ATF_TC_BODY(raw, tc) { -#ifdef __FreeBSD__ -#ifdef __FreeBSD_bug_216954__ - atf_tc_expect_signal(SIGSEGV, - "fails with SIGSEGV only on ^/stable/10 -- bug # 216954"); -#endif -#endif rawtest(NULL); } From owner-svn-src-stable-10@freebsd.org Wed May 24 05:30:38 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 228A4D79767; Wed, 24 May 2017 05:30:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7F521B39; Wed, 24 May 2017 05:30:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4O5UbVT028928; Wed, 24 May 2017 05:30:37 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4O5UbMt028927; Wed, 24 May 2017 05:30:37 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705240530.v4O5UbMt028927@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 05:30:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318775 - stable/10/sys/dev/cxgbe/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 05:30:38 -0000 Author: np Date: Wed May 24 05:30:36 2017 New Revision: 318775 URL: https://svnweb.freebsd.org/changeset/base/318775 Log: MFC r311846: cxgbe(4): Refresh t4_msg.h, mainly for definitions related to the crypto engine. Modified: stable/10/sys/dev/cxgbe/common/t4_msg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/common/t4_msg.h ============================================================================== --- stable/10/sys/dev/cxgbe/common/t4_msg.h Wed May 24 04:48:09 2017 (r318774) +++ stable/10/sys/dev/cxgbe/common/t4_msg.h Wed May 24 05:30:36 2017 (r318775) @@ -106,6 +106,7 @@ enum { CPL_RX_FCOE_DIF = 0x4A, CPL_RX_DATA_DIF = 0x4B, CPL_ERR_NOTIFY = 0x4D, + CPL_RX_TLS_CMP = 0x4E, CPL_RDMA_READ_REQ = 0x60, CPL_RX_ISCSI_DIF = 0x60, @@ -113,6 +114,11 @@ enum { CPL_SET_LE_REQ = 0x80, CPL_PASS_OPEN_REQ6 = 0x81, CPL_ACT_OPEN_REQ6 = 0x83, + CPL_TX_TLS_PDU = 0x88, + CPL_TX_TLS_SFO = 0x89, + + CPL_TX_SEC_PDU = 0x8A, + CPL_TX_TLS_ACK = 0x8B, CPL_RDMA_TERMINATE = 0xA2, CPL_RDMA_WRITE = 0xA4, @@ -129,6 +135,7 @@ enum { CPL_TRACE_PKT = 0xB0, CPL_RX2TX_DATA = 0xB1, + CPL_TLS_DATA = 0xB1, CPL_ISCSI_DATA = 0xB2, CPL_FCOE_DATA = 0xB3, @@ -136,6 +143,7 @@ enum { CPL_FW4_PLD = 0xC1, CPL_FW4_ACK = 0xC3, CPL_SRQ_TABLE_RPL = 0xCC, + CPL_RX_PHYS_DSGL = 0xD0, CPL_FW6_MSG = 0xE0, CPL_FW6_PLD = 0xE1, @@ -200,6 +208,7 @@ enum { ULP_MODE_RDMA = 4, ULP_MODE_TCPDDP = 5, ULP_MODE_FCOE = 6, + ULP_MODE_TLS = 8, }; enum { @@ -993,6 +1002,23 @@ struct cpl_abort_req_rss { __u8 status; }; +struct cpl_abort_req_rss6 { + RSS_HDR + union opcode_tid ot; + __u32 srqidx_status; +}; + +#define S_ABORT_RSS_STATUS 0 +#define M_ABORT_RSS_STATUS 0xff +#define V_ABORT_RSS_STATUS(x) ((x) << S_ABORT_RSS_STATUS) +#define G_ABORT_RSS_STATUS(x) (((x) >> S_ABORT_RSS_STATUS) & M_ABORT_RSS_STATUS) + +#define S_ABORT_RSS_SRQIDX 8 +#define M_ABORT_RSS_SRQIDX 0xffffff +#define V_ABORT_RSS_SRQIDX(x) ((x) << S_ABORT_RSS_SRQIDX) +#define G_ABORT_RSS_SRQIDX(x) (((x) >> S_ABORT_RSS_SRQIDX) & M_ABORT_RSS_SRQIDX) + + /* cpl_abort_req status command code in case of T6, * bit[0] specifies whether to send RST (0) to remote peer or suppress it (1) * bit[1] indicates ABORT_REQ was sent after a CLOSE_CON_REQ @@ -1014,6 +1040,12 @@ struct cpl_abort_rpl_rss { __u8 status; }; +struct cpl_abort_rpl_rss6 { + RSS_HDR + union opcode_tid ot; + __u32 srqidx_status; +}; + struct cpl_abort_rpl { WR_HDR; union opcode_tid ot; @@ -2612,6 +2644,7 @@ enum { FW_TYPE_RSSCPL = 4, FW_TYPE_WRERR_RPL = 5, FW_TYPE_PI_ERR = 6, + FW_TYPE_TLS_KEY = 7, }; struct cpl_fw2_pld { @@ -2712,7 +2745,8 @@ enum { ULP_TX_SC_IMM = 0x81, ULP_TX_SC_DSGL = 0x82, ULP_TX_SC_ISGL = 0x83, - ULP_TX_SC_PICTRL = 0x84 + ULP_TX_SC_PICTRL = 0x84, + ULP_TX_SC_MEMRD = 0x86 }; #define S_ULPTX_CMD 24 @@ -2763,6 +2797,12 @@ struct ulptx_idata { #define S_ULPTX_NSGE 0 #define M_ULPTX_NSGE 0xFFFF #define V_ULPTX_NSGE(x) ((x) << S_ULPTX_NSGE) +#define G_ULPTX_NSGE(x) (((x) >> S_ULPTX_NSGE) & M_ULPTX_NSGE) + +struct ulptx_sc_memrd { + __be32 cmd_to_len; + __be32 addr; +}; struct ulp_mem_io { WR_HDR; @@ -2817,6 +2857,21 @@ struct ulp_txpkt { }; /* ulp_txpkt.cmd_dest fields */ +#define S_ULP_TXPKT_DATAMODIFY 23 +#define M_ULP_TXPKT_DATAMODIFY 0x1 +#define V_ULP_TXPKT_DATAMODIFY(x) ((x) << S_ULP_TXPKT_DATAMODIFY) +#define G_ULP_TXPKT_DATAMODIFY(x) \ + (((x) >> S_ULP_TXPKT_DATAMODIFY) & M_ULP_TXPKT_DATAMODIFY_) +#define F_ULP_TXPKT_DATAMODIFY V_ULP_TXPKT_DATAMODIFY(1U) + +#define S_ULP_TXPKT_CHANNELID 22 +#define M_ULP_TXPKT_CHANNELID 0x1 +#define V_ULP_TXPKT_CHANNELID(x) ((x) << S_ULP_TXPKT_CHANNELID) +#define G_ULP_TXPKT_CHANNELID(x) \ + (((x) >> S_ULP_TXPKT_CHANNELID) & M_ULP_TXPKT_CHANNELID) +#define F_ULP_TXPKT_CHANNELID V_ULP_TXPKT_CHANNELID(1U) + +/* ulp_txpkt.cmd_dest fields */ #define S_ULP_TXPKT_DEST 16 #define M_ULP_TXPKT_DEST 0x3 #define V_ULP_TXPKT_DEST(x) ((x) << S_ULP_TXPKT_DEST) @@ -3044,4 +3099,542 @@ struct cpl_rx_mps_pkt { #define X_CPL_RX_MPS_PKT_TYPE_QFC (1 << 2) #define X_CPL_RX_MPS_PKT_TYPE_PTP (1 << 3) +struct cpl_tx_tls_sfo { + __be32 op_to_seg_len; + __be32 pld_len; + __be64 rsvd; + __be32 seqno_numivs; + __be32 ivgen_hdrlen; + __be64 scmd1; +}; + +/* cpl_tx_tls_sfo macros */ +#define S_CPL_TX_TLS_SFO_OPCODE 24 +#define M_CPL_TX_TLS_SFO_OPCODE 0xff +#define V_CPL_TX_TLS_SFO_OPCODE(x) ((x) << S_CPL_TX_TLS_SFO_OPCODE) +#define G_CPL_TX_TLS_SFO_OPCODE(x) \ + (((x) >> S_CPL_TX_TLS_SFO_OPCODE) & M_CPL_TX_TLS_SFO_OPCODE) + +#define S_CPL_TX_TLS_SFO_DATA_TYPE 20 +#define M_CPL_TX_TLS_SFO_DATA_TYPE 0xf +#define V_CPL_TX_TLS_SFO_DATA_TYPE(x) ((x) << S_CPL_TX_TLS_SFO_DATA_TYPE) +#define G_CPL_TX_TLS_SFO_DATA_TYPE(x) \ + (((x) >> S_CPL_TX_TLS_SFO_DATA_TYPE) & M_CPL_TX_TLS_SFO_DATA_TYPE) + +#define S_CPL_TX_TLS_SFO_CPL_LEN 16 +#define M_CPL_TX_TLS_SFO_CPL_LEN 0xf +#define V_CPL_TX_TLS_SFO_CPL_LEN(x) ((x) << S_CPL_TX_TLS_SFO_CPL_LEN) +#define G_CPL_TX_TLS_SFO_CPL_LEN(x) \ + (((x) >> S_CPL_TX_TLS_SFO_CPL_LEN) & M_CPL_TX_TLS_SFO_CPL_LEN) +#define S_CPL_TX_TLS_SFO_SEG_LEN 0 +#define M_CPL_TX_TLS_SFO_SEG_LEN 0xffff +#define V_CPL_TX_TLS_SFO_SEG_LEN(x) ((x) << S_CPL_TX_TLS_SFO_SEG_LEN) +#define G_CPL_TX_TLS_SFO_SEG_LEN(x) \ + (((x) >> S_CPL_TX_TLS_SFO_SEG_LEN) & M_CPL_TX_TLS_SFO_SEG_LEN) + +struct cpl_tls_data { + RSS_HDR + __be32 op_tid; + __be32 length_pkd; + __be32 seq; + __be32 r1; +}; + +#define S_CPL_TLS_DATA_OPCODE 24 +#define M_CPL_TLS_DATA_OPCODE 0xff +#define V_CPL_TLS_DATA_OPCODE(x) ((x) << S_CPL_TLS_DATA_OPCODE) +#define G_CPL_TLS_DATA_OPCODE(x) \ + (((x) >> S_CPL_TLS_DATA_OPCODE) & M_CPL_TLS_DATA_OPCODE) + +#define S_CPL_TLS_DATA_TID 0 +#define M_CPL_TLS_DATA_TID 0xffffff +#define V_CPL_TLS_DATA_TID(x) ((x) << S_CPL_TLS_DATA_TID) +#define G_CPL_TLS_DATA_TID(x) \ + (((x) >> S_CPL_TLS_DATA_TID) & M_CPL_TLS_DATA_TID) + +#define S_CPL_TLS_DATA_LENGTH 0 +#define M_CPL_TLS_DATA_LENGTH 0xffff +#define V_CPL_TLS_DATA_LENGTH(x) ((x) << S_CPL_TLS_DATA_LENGTH) +#define G_CPL_TLS_DATA_LENGTH(x) \ + (((x) >> S_CPL_TLS_DATA_LENGTH) & M_CPL_TLS_DATA_LENGTH) + +struct cpl_rx_tls_cmp { + RSS_HDR + __be32 op_tid; + __be32 pdulength_length; + __be32 seq; + __be32 ddp_report; + __be32 r; + __be32 ddp_valid; +}; + +#define S_CPL_RX_TLS_CMP_OPCODE 24 +#define M_CPL_RX_TLS_CMP_OPCODE 0xff +#define V_CPL_RX_TLS_CMP_OPCODE(x) ((x) << S_CPL_RX_TLS_CMP_OPCODE) +#define G_CPL_RX_TLS_CMP_OPCODE(x) \ + (((x) >> S_CPL_RX_TLS_CMP_OPCODE) & M_CPL_RX_TLS_CMP_OPCODE) + +#define S_CPL_RX_TLS_CMP_TID 0 +#define M_CPL_RX_TLS_CMP_TID 0xffffff +#define V_CPL_RX_TLS_CMP_TID(x) ((x) << S_CPL_RX_TLS_CMP_TID) +#define G_CPL_RX_TLS_CMP_TID(x) \ + (((x) >> S_CPL_RX_TLS_CMP_TID) & M_CPL_RX_TLS_CMP_TID) + +#define S_CPL_RX_TLS_CMP_PDULENGTH 16 +#define M_CPL_RX_TLS_CMP_PDULENGTH 0xffff +#define V_CPL_RX_TLS_CMP_PDULENGTH(x) ((x) << S_CPL_RX_TLS_CMP_PDULENGTH) +#define G_CPL_RX_TLS_CMP_PDULENGTH(x) \ + (((x) >> S_CPL_RX_TLS_CMP_PDULENGTH) & M_CPL_RX_TLS_CMP_PDULENGTH) + +#define S_CPL_RX_TLS_CMP_LENGTH 0 +#define M_CPL_RX_TLS_CMP_LENGTH 0xffff +#define V_CPL_RX_TLS_CMP_LENGTH(x) ((x) << S_CPL_RX_TLS_CMP_LENGTH) +#define G_CPL_RX_TLS_CMP_LENGTH(x) \ + (((x) >> S_CPL_RX_TLS_CMP_LENGTH) & M_CPL_RX_TLS_CMP_LENGTH) + +#define S_SCMD_SEQ_NO_CTRL 29 +#define M_SCMD_SEQ_NO_CTRL 0x3 +#define V_SCMD_SEQ_NO_CTRL(x) ((x) << S_SCMD_SEQ_NO_CTRL) +#define G_SCMD_SEQ_NO_CTRL(x) \ + (((x) >> S_SCMD_SEQ_NO_CTRL) & M_SCMD_SEQ_NO_CTRL) + +/* StsFieldPrsnt- Status field at the end of the TLS PDU */ +#define S_SCMD_STATUS_PRESENT 28 +#define M_SCMD_STATUS_PRESENT 0x1 +#define V_SCMD_STATUS_PRESENT(x) ((x) << S_SCMD_STATUS_PRESENT) +#define G_SCMD_STATUS_PRESENT(x) \ + (((x) >> S_SCMD_STATUS_PRESENT) & M_SCMD_STATUS_PRESENT) +#define F_SCMD_STATUS_PRESENT V_SCMD_STATUS_PRESENT(1U) + +/* ProtoVersion - Protocol Version 0: 1.2, 1:1.1, 2:DTLS, 3:Generic, + * 3-15: Reserved. */ +#define S_SCMD_PROTO_VERSION 24 +#define M_SCMD_PROTO_VERSION 0xf +#define V_SCMD_PROTO_VERSION(x) ((x) << S_SCMD_PROTO_VERSION) +#define G_SCMD_PROTO_VERSION(x) \ + (((x) >> S_SCMD_PROTO_VERSION) & M_SCMD_PROTO_VERSION) + +/* EncDecCtrl - Encryption/Decryption Control. 0: Encrypt, 1: Decrypt */ +#define S_SCMD_ENC_DEC_CTRL 23 +#define M_SCMD_ENC_DEC_CTRL 0x1 +#define V_SCMD_ENC_DEC_CTRL(x) ((x) << S_SCMD_ENC_DEC_CTRL) +#define G_SCMD_ENC_DEC_CTRL(x) \ + (((x) >> S_SCMD_ENC_DEC_CTRL) & M_SCMD_ENC_DEC_CTRL) +#define F_SCMD_ENC_DEC_CTRL V_SCMD_ENC_DEC_CTRL(1U) + +/* CipherAuthSeqCtrl - Cipher Authentication Sequence Control. */ +#define S_SCMD_CIPH_AUTH_SEQ_CTRL 22 +#define M_SCMD_CIPH_AUTH_SEQ_CTRL 0x1 +#define V_SCMD_CIPH_AUTH_SEQ_CTRL(x) \ + ((x) << S_SCMD_CIPH_AUTH_SEQ_CTRL) +#define G_SCMD_CIPH_AUTH_SEQ_CTRL(x) \ + (((x) >> S_SCMD_CIPH_AUTH_SEQ_CTRL) & M_SCMD_CIPH_AUTH_SEQ_CTRL) +#define F_SCMD_CIPH_AUTH_SEQ_CTRL V_SCMD_CIPH_AUTH_SEQ_CTRL(1U) + +/* CiphMode - Cipher Mode. 0: NOP, 1:AES-CBC, 2:AES-GCM, 3:AES-CTR, + * 4:Generic-AES, 5-15: Reserved. */ +#define S_SCMD_CIPH_MODE 18 +#define M_SCMD_CIPH_MODE 0xf +#define V_SCMD_CIPH_MODE(x) ((x) << S_SCMD_CIPH_MODE) +#define G_SCMD_CIPH_MODE(x) \ + (((x) >> S_SCMD_CIPH_MODE) & M_SCMD_CIPH_MODE) + +/* AuthMode - Auth Mode. 0: NOP, 1:SHA1, 2:SHA2-224, 3:SHA2-256 + * 4-15: Reserved */ +#define S_SCMD_AUTH_MODE 14 +#define M_SCMD_AUTH_MODE 0xf +#define V_SCMD_AUTH_MODE(x) ((x) << S_SCMD_AUTH_MODE) +#define G_SCMD_AUTH_MODE(x) \ + (((x) >> S_SCMD_AUTH_MODE) & M_SCMD_AUTH_MODE) + +/* HmacCtrl - HMAC Control. 0:NOP, 1:No truncation, 2:Support HMAC Truncation + * per RFC 4366, 3:IPSec 96 bits, 4-7:Reserved + */ +#define S_SCMD_HMAC_CTRL 11 +#define M_SCMD_HMAC_CTRL 0x7 +#define V_SCMD_HMAC_CTRL(x) ((x) << S_SCMD_HMAC_CTRL) +#define G_SCMD_HMAC_CTRL(x) \ + (((x) >> S_SCMD_HMAC_CTRL) & M_SCMD_HMAC_CTRL) + +/* IvSize - IV size in units of 2 bytes */ +#define S_SCMD_IV_SIZE 7 +#define M_SCMD_IV_SIZE 0xf +#define V_SCMD_IV_SIZE(x) ((x) << S_SCMD_IV_SIZE) +#define G_SCMD_IV_SIZE(x) \ + (((x) >> S_SCMD_IV_SIZE) & M_SCMD_IV_SIZE) + +/* NumIVs - Number of IVs */ +#define S_SCMD_NUM_IVS 0 +#define M_SCMD_NUM_IVS 0x7f +#define V_SCMD_NUM_IVS(x) ((x) << S_SCMD_NUM_IVS) +#define G_SCMD_NUM_IVS(x) \ + (((x) >> S_SCMD_NUM_IVS) & M_SCMD_NUM_IVS) + +/* EnbDbgId - If this is enabled upper 20 (63:44) bits if SeqNumber + * (below) are used as Cid (connection id for debug status), these + * bits are padded to zero for forming the 64 bit + * sequence number for TLS + */ +#define S_SCMD_ENB_DBGID 31 +#define M_SCMD_ENB_DBGID 0x1 +#define V_SCMD_ENB_DBGID(x) ((x) << S_SCMD_ENB_DBGID) +#define G_SCMD_ENB_DBGID(x) \ + (((x) >> S_SCMD_ENB_DBGID) & M_SCMD_ENB_DBGID) + +/* IV generation in SW. */ +#define S_SCMD_IV_GEN_CTRL 30 +#define M_SCMD_IV_GEN_CTRL 0x1 +#define V_SCMD_IV_GEN_CTRL(x) ((x) << S_SCMD_IV_GEN_CTRL) +#define G_SCMD_IV_GEN_CTRL(x) \ + (((x) >> S_SCMD_IV_GEN_CTRL) & M_SCMD_IV_GEN_CTRL) +#define F_SCMD_IV_GEN_CTRL V_SCMD_IV_GEN_CTRL(1U) + +/* More frags */ +#define S_SCMD_MORE_FRAGS 20 +#define M_SCMD_MORE_FRAGS 0x1 +#define V_SCMD_MORE_FRAGS(x) ((x) << S_SCMD_MORE_FRAGS) +#define G_SCMD_MORE_FRAGS(x) (((x) >> S_SCMD_MORE_FRAGS) & M_SCMD_MORE_FRAGS) + +/*last frag */ +#define S_SCMD_LAST_FRAG 19 +#define M_SCMD_LAST_FRAG 0x1 +#define V_SCMD_LAST_FRAG(x) ((x) << S_SCMD_LAST_FRAG) +#define G_SCMD_LAST_FRAG(x) (((x) >> S_SCMD_LAST_FRAG) & M_SCMD_LAST_FRAG) + +/* TlsCompPdu */ +#define S_SCMD_TLS_COMPPDU 18 +#define M_SCMD_TLS_COMPPDU 0x1 +#define V_SCMD_TLS_COMPPDU(x) ((x) << S_SCMD_TLS_COMPPDU) +#define G_SCMD_TLS_COMPPDU(x) (((x) >> S_SCMD_TLS_COMPPDU) & M_SCMD_TLS_COMPPDU) + +/* KeyCntxtInline - Key context inline after the scmd OR PayloadOnly*/ +#define S_SCMD_KEY_CTX_INLINE 17 +#define M_SCMD_KEY_CTX_INLINE 0x1 +#define V_SCMD_KEY_CTX_INLINE(x) ((x) << S_SCMD_KEY_CTX_INLINE) +#define G_SCMD_KEY_CTX_INLINE(x) \ + (((x) >> S_SCMD_KEY_CTX_INLINE) & M_SCMD_KEY_CTX_INLINE) +#define F_SCMD_KEY_CTX_INLINE V_SCMD_KEY_CTX_INLINE(1U) + +/* TLSFragEnable - 0: Host created TLS PDUs, 1: TLS Framgmentation in ASIC */ +#define S_SCMD_TLS_FRAG_ENABLE 16 +#define M_SCMD_TLS_FRAG_ENABLE 0x1 +#define V_SCMD_TLS_FRAG_ENABLE(x) ((x) << S_SCMD_TLS_FRAG_ENABLE) +#define G_SCMD_TLS_FRAG_ENABLE(x) \ + (((x) >> S_SCMD_TLS_FRAG_ENABLE) & M_SCMD_TLS_FRAG_ENABLE) +#define F_SCMD_TLS_FRAG_ENABLE V_SCMD_TLS_FRAG_ENABLE(1U) + +/* MacOnly - Only send the MAC and discard PDU. This is valid for hash only + * modes, in this case TLS_TX will drop the PDU and only + * send back the MAC bytes. */ +#define S_SCMD_MAC_ONLY 15 +#define M_SCMD_MAC_ONLY 0x1 +#define V_SCMD_MAC_ONLY(x) ((x) << S_SCMD_MAC_ONLY) +#define G_SCMD_MAC_ONLY(x) \ + (((x) >> S_SCMD_MAC_ONLY) & M_SCMD_MAC_ONLY) +#define F_SCMD_MAC_ONLY V_SCMD_MAC_ONLY(1U) + +/* AadIVDrop - Drop the AAD and IV fields. Useful in protocols + * which have complex AAD and IV formations Eg:AES-CCM + */ +#define S_SCMD_AADIVDROP 14 +#define M_SCMD_AADIVDROP 0x1 +#define V_SCMD_AADIVDROP(x) ((x) << S_SCMD_AADIVDROP) +#define G_SCMD_AADIVDROP(x) \ + (((x) >> S_SCMD_AADIVDROP) & M_SCMD_AADIVDROP) +#define F_SCMD_AADIVDROP V_SCMD_AADIVDROP(1U) + +/* HdrLength - Length of all headers excluding TLS header + * present before start of crypto PDU/payload. */ +#define S_SCMD_HDR_LEN 0 +#define M_SCMD_HDR_LEN 0x3fff +#define V_SCMD_HDR_LEN(x) ((x) << S_SCMD_HDR_LEN) +#define G_SCMD_HDR_LEN(x) \ + (((x) >> S_SCMD_HDR_LEN) & M_SCMD_HDR_LEN) + +struct cpl_tx_sec_pdu { + __be32 op_ivinsrtofst; + __be32 pldlen; + __be32 aadstart_cipherstop_hi; + __be32 cipherstop_lo_authinsert; + __be32 seqno_numivs; + __be32 ivgen_hdrlen; + __be64 scmd1; +}; + +#define S_CPL_TX_SEC_PDU_OPCODE 24 +#define M_CPL_TX_SEC_PDU_OPCODE 0xff +#define V_CPL_TX_SEC_PDU_OPCODE(x) ((x) << S_CPL_TX_SEC_PDU_OPCODE) +#define G_CPL_TX_SEC_PDU_OPCODE(x) \ + (((x) >> S_CPL_TX_SEC_PDU_OPCODE) & M_CPL_TX_SEC_PDU_OPCODE) + +/* RX Channel Id */ +#define S_CPL_TX_SEC_PDU_RXCHID 22 +#define M_CPL_TX_SEC_PDU_RXCHID 0x1 +#define V_CPL_TX_SEC_PDU_RXCHID(x) ((x) << S_CPL_TX_SEC_PDU_RXCHID) +#define G_CPL_TX_SEC_PDU_RXCHID(x) \ +(((x) >> S_CPL_TX_SEC_PDU_RXCHID) & M_CPL_TX_SEC_PDU_RXCHID) +#define F_CPL_TX_SEC_PDU_RXCHID V_CPL_TX_SEC_PDU_RXCHID(1U) + +/* Ack Follows */ +#define S_CPL_TX_SEC_PDU_ACKFOLLOWS 21 +#define M_CPL_TX_SEC_PDU_ACKFOLLOWS 0x1 +#define V_CPL_TX_SEC_PDU_ACKFOLLOWS(x) ((x) << S_CPL_TX_SEC_PDU_ACKFOLLOWS) +#define G_CPL_TX_SEC_PDU_ACKFOLLOWS(x) \ +(((x) >> S_CPL_TX_SEC_PDU_ACKFOLLOWS) & M_CPL_TX_SEC_PDU_ACKFOLLOWS) +#define F_CPL_TX_SEC_PDU_ACKFOLLOWS V_CPL_TX_SEC_PDU_ACKFOLLOWS(1U) + +/* Loopback bit in cpl_tx_sec_pdu */ +#define S_CPL_TX_SEC_PDU_ULPTXLPBK 20 +#define M_CPL_TX_SEC_PDU_ULPTXLPBK 0x1 +#define V_CPL_TX_SEC_PDU_ULPTXLPBK(x) ((x) << S_CPL_TX_SEC_PDU_ULPTXLPBK) +#define G_CPL_TX_SEC_PDU_ULPTXLPBK(x) \ +(((x) >> S_CPL_TX_SEC_PDU_ULPTXLPBK) & M_CPL_TX_SEC_PDU_ULPTXLPBK) +#define F_CPL_TX_SEC_PDU_ULPTXLPBK V_CPL_TX_SEC_PDU_ULPTXLPBK(1U) + +/* Length of cpl header encapsulated */ +#define S_CPL_TX_SEC_PDU_CPLLEN 16 +#define M_CPL_TX_SEC_PDU_CPLLEN 0xf +#define V_CPL_TX_SEC_PDU_CPLLEN(x) ((x) << S_CPL_TX_SEC_PDU_CPLLEN) +#define G_CPL_TX_SEC_PDU_CPLLEN(x) \ + (((x) >> S_CPL_TX_SEC_PDU_CPLLEN) & M_CPL_TX_SEC_PDU_CPLLEN) + +/* PlaceHolder */ +#define S_CPL_TX_SEC_PDU_PLACEHOLDER 10 +#define M_CPL_TX_SEC_PDU_PLACEHOLDER 0x1 +#define V_CPL_TX_SEC_PDU_PLACEHOLDER(x) ((x) << S_CPL_TX_SEC_PDU_PLACEHOLDER) +#define G_CPL_TX_SEC_PDU_PLACEHOLDER(x) \ + (((x) >> S_CPL_TX_SEC_PDU_PLACEHOLDER) & \ + M_CPL_TX_SEC_PDU_PLACEHOLDER) + +/* IvInsrtOffset: Insertion location for IV */ +#define S_CPL_TX_SEC_PDU_IVINSRTOFST 0 +#define M_CPL_TX_SEC_PDU_IVINSRTOFST 0x3ff +#define V_CPL_TX_SEC_PDU_IVINSRTOFST(x) ((x) << S_CPL_TX_SEC_PDU_IVINSRTOFST) +#define G_CPL_TX_SEC_PDU_IVINSRTOFST(x) \ + (((x) >> S_CPL_TX_SEC_PDU_IVINSRTOFST) & \ + M_CPL_TX_SEC_PDU_IVINSRTOFST) + +/* AadStartOffset: Offset in bytes for AAD start from + * the first byte following + * the pkt headers (0-255 + * bytes) */ +#define S_CPL_TX_SEC_PDU_AADSTART 24 +#define M_CPL_TX_SEC_PDU_AADSTART 0xff +#define V_CPL_TX_SEC_PDU_AADSTART(x) ((x) << S_CPL_TX_SEC_PDU_AADSTART) +#define G_CPL_TX_SEC_PDU_AADSTART(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AADSTART) & \ + M_CPL_TX_SEC_PDU_AADSTART) + +/* AadStopOffset: offset in bytes for AAD stop/end from the first byte following + * the pkt headers (0-511 bytes) */ +#define S_CPL_TX_SEC_PDU_AADSTOP 15 +#define M_CPL_TX_SEC_PDU_AADSTOP 0x1ff +#define V_CPL_TX_SEC_PDU_AADSTOP(x) ((x) << S_CPL_TX_SEC_PDU_AADSTOP) +#define G_CPL_TX_SEC_PDU_AADSTOP(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AADSTOP) & M_CPL_TX_SEC_PDU_AADSTOP) + +/* CipherStartOffset: offset in bytes for encryption/decryption start from the + * first byte following the pkt headers (0-1023 + * bytes) */ +#define S_CPL_TX_SEC_PDU_CIPHERSTART 5 +#define M_CPL_TX_SEC_PDU_CIPHERSTART 0x3ff +#define V_CPL_TX_SEC_PDU_CIPHERSTART(x) ((x) << S_CPL_TX_SEC_PDU_CIPHERSTART) +#define G_CPL_TX_SEC_PDU_CIPHERSTART(x) \ + (((x) >> S_CPL_TX_SEC_PDU_CIPHERSTART) & \ + M_CPL_TX_SEC_PDU_CIPHERSTART) + +/* CipherStopOffset: offset in bytes for encryption/decryption end + * from end of the payload of this command (0-511 bytes) */ +#define S_CPL_TX_SEC_PDU_CIPHERSTOP_HI 0 +#define M_CPL_TX_SEC_PDU_CIPHERSTOP_HI 0x1f +#define V_CPL_TX_SEC_PDU_CIPHERSTOP_HI(x) \ + ((x) << S_CPL_TX_SEC_PDU_CIPHERSTOP_HI) +#define G_CPL_TX_SEC_PDU_CIPHERSTOP_HI(x) \ + (((x) >> S_CPL_TX_SEC_PDU_CIPHERSTOP_HI) & \ + M_CPL_TX_SEC_PDU_CIPHERSTOP_HI) + +#define S_CPL_TX_SEC_PDU_CIPHERSTOP_LO 28 +#define M_CPL_TX_SEC_PDU_CIPHERSTOP_LO 0xf +#define V_CPL_TX_SEC_PDU_CIPHERSTOP_LO(x) \ + ((x) << S_CPL_TX_SEC_PDU_CIPHERSTOP_LO) +#define G_CPL_TX_SEC_PDU_CIPHERSTOP_LO(x) \ + (((x) >> S_CPL_TX_SEC_PDU_CIPHERSTOP_LO) & \ + M_CPL_TX_SEC_PDU_CIPHERSTOP_LO) + +/* AuthStartOffset: offset in bytes for authentication start from + * the first byte following the pkt headers (0-1023) + * */ +#define S_CPL_TX_SEC_PDU_AUTHSTART 18 +#define M_CPL_TX_SEC_PDU_AUTHSTART 0x3ff +#define V_CPL_TX_SEC_PDU_AUTHSTART(x) ((x) << S_CPL_TX_SEC_PDU_AUTHSTART) +#define G_CPL_TX_SEC_PDU_AUTHSTART(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AUTHSTART) & \ + M_CPL_TX_SEC_PDU_AUTHSTART) + +/* AuthStopOffset: offset in bytes for authentication + * end from end of the payload of this command (0-511 Bytes) */ +#define S_CPL_TX_SEC_PDU_AUTHSTOP 9 +#define M_CPL_TX_SEC_PDU_AUTHSTOP 0x1ff +#define V_CPL_TX_SEC_PDU_AUTHSTOP(x) ((x) << S_CPL_TX_SEC_PDU_AUTHSTOP) +#define G_CPL_TX_SEC_PDU_AUTHSTOP(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AUTHSTOP) & \ + M_CPL_TX_SEC_PDU_AUTHSTOP) + +/* AuthInsrtOffset: offset in bytes for authentication insertion + * from end of the payload of this command (0-511 bytes) */ +#define S_CPL_TX_SEC_PDU_AUTHINSERT 0 +#define M_CPL_TX_SEC_PDU_AUTHINSERT 0x1ff +#define V_CPL_TX_SEC_PDU_AUTHINSERT(x) ((x) << S_CPL_TX_SEC_PDU_AUTHINSERT) +#define G_CPL_TX_SEC_PDU_AUTHINSERT(x) \ + (((x) >> S_CPL_TX_SEC_PDU_AUTHINSERT) & \ + M_CPL_TX_SEC_PDU_AUTHINSERT) + +struct cpl_rx_phys_dsgl { + __be32 op_to_tid; + __be32 pcirlxorder_to_noofsgentr; + struct rss_header rss_hdr_int; +}; + +#define S_CPL_RX_PHYS_DSGL_OPCODE 24 +#define M_CPL_RX_PHYS_DSGL_OPCODE 0xff +#define V_CPL_RX_PHYS_DSGL_OPCODE(x) ((x) << S_CPL_RX_PHYS_DSGL_OPCODE) +#define G_CPL_RX_PHYS_DSGL_OPCODE(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_OPCODE) & M_CPL_RX_PHYS_DSGL_OPCODE) + +#define S_CPL_RX_PHYS_DSGL_ISRDMA 23 +#define M_CPL_RX_PHYS_DSGL_ISRDMA 0x1 +#define V_CPL_RX_PHYS_DSGL_ISRDMA(x) ((x) << S_CPL_RX_PHYS_DSGL_ISRDMA) +#define G_CPL_RX_PHYS_DSGL_ISRDMA(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_ISRDMA) & M_CPL_RX_PHYS_DSGL_ISRDMA) +#define F_CPL_RX_PHYS_DSGL_ISRDMA V_CPL_RX_PHYS_DSGL_ISRDMA(1U) + +#define S_CPL_RX_PHYS_DSGL_RSVD1 20 +#define M_CPL_RX_PHYS_DSGL_RSVD1 0x7 +#define V_CPL_RX_PHYS_DSGL_RSVD1(x) ((x) << S_CPL_RX_PHYS_DSGL_RSVD1) +#define G_CPL_RX_PHYS_DSGL_RSVD1(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_RSVD1) & M_CPL_RX_PHYS_DSGL_RSVD1) + +#define S_CPL_RX_PHYS_DSGL_PCIRLXORDER 31 +#define M_CPL_RX_PHYS_DSGL_PCIRLXORDER 0x1 +#define V_CPL_RX_PHYS_DSGL_PCIRLXORDER(x) \ + ((x) << S_CPL_RX_PHYS_DSGL_PCIRLXORDER) +#define G_CPL_RX_PHYS_DSGL_PCIRLXORDER(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_PCIRLXORDER) & \ + M_CPL_RX_PHYS_DSGL_PCIRLXORDER) +#define F_CPL_RX_PHYS_DSGL_PCIRLXORDER V_CPL_RX_PHYS_DSGL_PCIRLXORDER(1U) + +#define S_CPL_RX_PHYS_DSGL_PCINOSNOOP 30 +#define M_CPL_RX_PHYS_DSGL_PCINOSNOOP 0x1 +#define V_CPL_RX_PHYS_DSGL_PCINOSNOOP(x) \ + ((x) << S_CPL_RX_PHYS_DSGL_PCINOSNOOP) +#define G_CPL_RX_PHYS_DSGL_PCINOSNOOP(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_PCINOSNOOP) & \ + M_CPL_RX_PHYS_DSGL_PCINOSNOOP) +#define F_CPL_RX_PHYS_DSGL_PCINOSNOOP V_CPL_RX_PHYS_DSGL_PCINOSNOOP(1U) + +#define S_CPL_RX_PHYS_DSGL_PCITPHNTENB 29 +#define M_CPL_RX_PHYS_DSGL_PCITPHNTENB 0x1 +#define V_CPL_RX_PHYS_DSGL_PCITPHNTENB(x) \ + ((x) << S_CPL_RX_PHYS_DSGL_PCITPHNTENB) +#define G_CPL_RX_PHYS_DSGL_PCITPHNTENB(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_PCITPHNTENB) & \ + M_CPL_RX_PHYS_DSGL_PCITPHNTENB) +#define F_CPL_RX_PHYS_DSGL_PCITPHNTENB V_CPL_RX_PHYS_DSGL_PCITPHNTENB(1U) + +#define S_CPL_RX_PHYS_DSGL_PCITPHNT 27 +#define M_CPL_RX_PHYS_DSGL_PCITPHNT 0x3 +#define V_CPL_RX_PHYS_DSGL_PCITPHNT(x) ((x) << S_CPL_RX_PHYS_DSGL_PCITPHNT) +#define G_CPL_RX_PHYS_DSGL_PCITPHNT(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_PCITPHNT) & \ + M_CPL_RX_PHYS_DSGL_PCITPHNT) + +#define S_CPL_RX_PHYS_DSGL_DCAID 16 +#define M_CPL_RX_PHYS_DSGL_DCAID 0x7ff +#define V_CPL_RX_PHYS_DSGL_DCAID(x) ((x) << S_CPL_RX_PHYS_DSGL_DCAID) +#define G_CPL_RX_PHYS_DSGL_DCAID(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_DCAID) & \ + M_CPL_RX_PHYS_DSGL_DCAID) + +#define S_CPL_RX_PHYS_DSGL_NOOFSGENTR 0 +#define M_CPL_RX_PHYS_DSGL_NOOFSGENTR 0xffff +#define V_CPL_RX_PHYS_DSGL_NOOFSGENTR(x) \ + ((x) << S_CPL_RX_PHYS_DSGL_NOOFSGENTR) +#define G_CPL_RX_PHYS_DSGL_NOOFSGENTR(x) \ + (((x) >> S_CPL_RX_PHYS_DSGL_NOOFSGENTR) & \ + M_CPL_RX_PHYS_DSGL_NOOFSGENTR) + +/* CPL_TX_TLS_ACK */ +struct cpl_tx_tls_ack { + __be32 op_to_Rsvd2; + __be32 PldLen; + __be64 Rsvd3; +}; + +#define S_CPL_TX_TLS_ACK_OPCODE 24 +#define M_CPL_TX_TLS_ACK_OPCODE 0xff +#define V_CPL_TX_TLS_ACK_OPCODE(x) ((x) << S_CPL_TX_TLS_ACK_OPCODE) +#define G_CPL_TX_TLS_ACK_OPCODE(x) \ + (((x) >> S_CPL_TX_TLS_ACK_OPCODE) & M_CPL_TX_TLS_ACK_OPCODE) + +#define S_CPL_TX_TLS_ACK_RSVD1 23 +#define M_CPL_TX_TLS_ACK_RSVD1 0x1 +#define V_CPL_TX_TLS_ACK_RSVD1(x) ((x) << S_CPL_TX_TLS_ACK_RSVD1) +#define G_CPL_TX_TLS_ACK_RSVD1(x) \ + (((x) >> S_CPL_TX_TLS_ACK_RSVD1) & M_CPL_TX_TLS_ACK_RSVD1) +#define F_CPL_TX_TLS_ACK_RSVD1 V_CPL_TX_TLS_ACK_RSVD1(1U) + +#define S_CPL_TX_TLS_ACK_RXCHID 22 +#define M_CPL_TX_TLS_ACK_RXCHID 0x1 +#define V_CPL_TX_TLS_ACK_RXCHID(x) ((x) << S_CPL_TX_TLS_ACK_RXCHID) +#define G_CPL_TX_TLS_ACK_RXCHID(x) \ + (((x) >> S_CPL_TX_TLS_ACK_RXCHID) & M_CPL_TX_TLS_ACK_RXCHID) +#define F_CPL_TX_TLS_ACK_RXCHID V_CPL_TX_TLS_ACK_RXCHID(1U) + +#define S_CPL_TX_TLS_ACK_FWMSG 21 +#define M_CPL_TX_TLS_ACK_FWMSG 0x1 +#define V_CPL_TX_TLS_ACK_FWMSG(x) ((x) << S_CPL_TX_TLS_ACK_FWMSG) +#define G_CPL_TX_TLS_ACK_FWMSG(x) \ + (((x) >> S_CPL_TX_TLS_ACK_FWMSG) & M_CPL_TX_TLS_ACK_FWMSG) +#define F_CPL_TX_TLS_ACK_FWMSG V_CPL_TX_TLS_ACK_FWMSG(1U) + +#define S_CPL_TX_TLS_ACK_ULPTXLPBK 20 +#define M_CPL_TX_TLS_ACK_ULPTXLPBK 0x1 +#define V_CPL_TX_TLS_ACK_ULPTXLPBK(x) ((x) << S_CPL_TX_TLS_ACK_ULPTXLPBK) +#define G_CPL_TX_TLS_ACK_ULPTXLPBK(x) \ + (((x) >> S_CPL_TX_TLS_ACK_ULPTXLPBK) & M_CPL_TX_TLS_ACK_ULPTXLPBK) +#define F_CPL_TX_TLS_ACK_ULPTXLPBK V_CPL_TX_TLS_ACK_ULPTXLPBK(1U) + +#define S_CPL_TX_TLS_ACK_CPLLEN 16 +#define M_CPL_TX_TLS_ACK_CPLLEN 0xf +#define V_CPL_TX_TLS_ACK_CPLLEN(x) ((x) << S_CPL_TX_TLS_ACK_CPLLEN) +#define G_CPL_TX_TLS_ACK_CPLLEN(x) \ + (((x) >> S_CPL_TX_TLS_ACK_CPLLEN) & M_CPL_TX_TLS_ACK_CPLLEN) + +#define S_CPL_TX_TLS_ACK_COMPLONERR 15 +#define M_CPL_TX_TLS_ACK_COMPLONERR 0x1 +#define V_CPL_TX_TLS_ACK_COMPLONERR(x) ((x) << S_CPL_TX_TLS_ACK_COMPLONERR) +#define G_CPL_TX_TLS_ACK_COMPLONERR(x) \ + (((x) >> S_CPL_TX_TLS_ACK_COMPLONERR) & M_CPL_TX_TLS_ACK_COMPLONERR) +#define F_CPL_TX_TLS_ACK_COMPLONERR V_CPL_TX_TLS_ACK_COMPLONERR(1U) + +#define S_CPL_TX_TLS_ACK_LCB 14 +#define M_CPL_TX_TLS_ACK_LCB 0x1 +#define V_CPL_TX_TLS_ACK_LCB(x) ((x) << S_CPL_TX_TLS_ACK_LCB) +#define G_CPL_TX_TLS_ACK_LCB(x) \ + (((x) >> S_CPL_TX_TLS_ACK_LCB) & M_CPL_TX_TLS_ACK_LCB) +#define F_CPL_TX_TLS_ACK_LCB V_CPL_TX_TLS_ACK_LCB(1U) + +#define S_CPL_TX_TLS_ACK_PHASH 13 +#define M_CPL_TX_TLS_ACK_PHASH 0x1 +#define V_CPL_TX_TLS_ACK_PHASH(x) ((x) << S_CPL_TX_TLS_ACK_PHASH) +#define G_CPL_TX_TLS_ACK_PHASH(x) \ + (((x) >> S_CPL_TX_TLS_ACK_PHASH) & M_CPL_TX_TLS_ACK_PHASH) +#define F_CPL_TX_TLS_ACK_PHASH V_CPL_TX_TLS_ACK_PHASH(1U) + +#define S_CPL_TX_TLS_ACK_RSVD2 0 +#define M_CPL_TX_TLS_ACK_RSVD2 0x1fff +#define V_CPL_TX_TLS_ACK_RSVD2(x) ((x) << S_CPL_TX_TLS_ACK_RSVD2) +#define G_CPL_TX_TLS_ACK_RSVD2(x) \ + (((x) >> S_CPL_TX_TLS_ACK_RSVD2) & M_CPL_TX_TLS_ACK_RSVD2) + #endif /* T4_MSG_H */ From owner-svn-src-stable-10@freebsd.org Wed May 24 11:11:15 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAE90D7A9AF; Wed, 24 May 2017 11:11:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B675A1C21; Wed, 24 May 2017 11:11:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OBBDkm068741; Wed, 24 May 2017 11:11:13 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OBBDJx068740; Wed, 24 May 2017 11:11:13 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705241111.v4OBBDJx068740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 11:11:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318784 - stable/10/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 11:11:15 -0000 Author: avg Date: Wed May 24 11:11:13 2017 New Revision: 318784 URL: https://svnweb.freebsd.org/changeset/base/318784 Log: MFC r316853: dtrace: fix normalization of stddev aggregation Sponsored by: Panzura Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Wed May 24 11:10:55 2017 (r318783) +++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Wed May 24 11:11:13 2017 (r318784) @@ -389,8 +389,10 @@ dt_stddev(uint64_t *data, uint64_t norma * The standard approximation for standard deviation is * sqrt(average(x**2) - average(x)**2), i.e. the square root * of the average of the squares minus the square of the average. + * When normalizing, we should divide the sum of x**2 by normal**2. */ dt_divide_128(data + 2, normal, avg_of_squares); + dt_divide_128(avg_of_squares, normal, avg_of_squares); dt_divide_128(avg_of_squares, data[0], avg_of_squares); norm_avg = (int64_t)data[1] / (int64_t)normal / (int64_t)data[0]; From owner-svn-src-stable-10@freebsd.org Wed May 24 11:38:44 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8FE7D7B268; Wed, 24 May 2017 11:38:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A6A61BB2; Wed, 24 May 2017 11:38:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OBch9m081397; Wed, 24 May 2017 11:38:43 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OBchlq081396; Wed, 24 May 2017 11:38:43 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201705241138.v4OBchlq081396@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 24 May 2017 11:38:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318786 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 11:38:44 -0000 Author: avg Date: Wed May 24 11:38:43 2017 New Revision: 318786 URL: https://svnweb.freebsd.org/changeset/base/318786 Log: MFC r316854: rename vfs.zfs.debug_flags to vfs.zfs.debugflags Since this is a stable branch vfs.zfs.debug_flags sysctl is also kept. The corresponing tunable could never work. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Wed May 24 11:38:31 2017 (r318785) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Wed May 24 11:38:43 2017 (r318786) @@ -286,10 +286,14 @@ sysctl_vfs_zfs_debug_flags(SYSCTL_HANDLE return (0); } -TUNABLE_INT("vfs.zfs.debug_flags", &zfs_flags); -SYSCTL_PROC(_vfs_zfs, OID_AUTO, debug_flags, +TUNABLE_INT("vfs.zfs.debugflags", &zfs_flags); +SYSCTL_PROC(_vfs_zfs, OID_AUTO, debugflags, CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RW, 0, sizeof(int), sysctl_vfs_zfs_debug_flags, "IU", "Debug flags for ZFS testing."); +SYSCTL_PROC(_vfs_zfs, OID_AUTO, debug_flags, + CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RW, 0, sizeof(int), + sysctl_vfs_zfs_debug_flags, "IU", + "Debug flags for ZFS testing (deprecated, see vfs.zfs.debugflags)."); /* * If destroy encounters an EIO while reading metadata (e.g. indirect From owner-svn-src-stable-10@freebsd.org Wed May 24 17:52:58 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CE9DD7C052; Wed, 24 May 2017 17:52:58 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 544B21D3D; Wed, 24 May 2017 17:52:58 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OHqvwg039807; Wed, 24 May 2017 17:52:57 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OHqvHU039805; Wed, 24 May 2017 17:52:57 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705241752.v4OHqvHU039805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 17:52:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318797 - in stable/10/sys/dev/cxgbe: . common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 17:52:58 -0000 Author: np Date: Wed May 24 17:52:56 2017 New Revision: 318797 URL: https://svnweb.freebsd.org/changeset/base/318797 Log: MFC r316774: cxgbe: Query some more RDMA related parameters from the firmware. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/common/common.h stable/10/sys/dev/cxgbe/offload.h stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/10/sys/dev/cxgbe/common/common.h Wed May 24 17:51:07 2017 (r318796) +++ stable/10/sys/dev/cxgbe/common/common.h Wed May 24 17:52:56 2017 (r318797) @@ -366,6 +366,9 @@ struct adapter_params { unsigned int ofldq_wr_cred; unsigned int eo_wr_cred; + + unsigned int max_ordird_qp; + unsigned int max_ird_adapter; }; #define CHELSIO_T4 0x4 Modified: stable/10/sys/dev/cxgbe/offload.h ============================================================================== --- stable/10/sys/dev/cxgbe/offload.h Wed May 24 17:51:07 2017 (r318796) +++ stable/10/sys/dev/cxgbe/offload.h Wed May 24 17:52:56 2017 (r318797) @@ -121,6 +121,7 @@ struct t4_virt_res { struct t4_range pbl; struct t4_range qp; struct t4_range cq; + struct t4_range srq; struct t4_range ocq; struct t4_range l2t; }; Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed May 24 17:51:07 2017 (r318796) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed May 24 17:52:56 2017 (r318797) @@ -3301,6 +3301,21 @@ get_params__post_init(struct adapter *sc sc->vres.cq.size = val[3] - val[2] + 1; sc->vres.ocq.start = val[4]; sc->vres.ocq.size = val[5] - val[4] + 1; + + param[0] = FW_PARAM_PFVF(SRQ_START); + param[1] = FW_PARAM_PFVF(SRQ_END); + param[2] = FW_PARAM_DEV(MAXORDIRD_QP); + param[3] = FW_PARAM_DEV(MAXIRD_ADAPTER); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 4, param, val); + if (rc != 0) { + device_printf(sc->dev, + "failed to query RDMA parameters(3): %d.\n", rc); + return (rc); + } + sc->vres.srq.start = val[0]; + sc->vres.srq.size = val[1] - val[0] + 1; + sc->params.max_ordird_qp = val[2]; + sc->params.max_ird_adapter = val[3]; } if (sc->iscsicaps) { param[0] = FW_PARAM_PFVF(ISCSI_START); From owner-svn-src-stable-10@freebsd.org Wed May 24 18:16:22 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3169FD7CB6F; Wed, 24 May 2017 18:16:22 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F381F12D3; Wed, 24 May 2017 18:16:21 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OIGKja048293; Wed, 24 May 2017 18:16:20 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OIGKBn048285; Wed, 24 May 2017 18:16:20 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705241816.v4OIGKBn048285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 18:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318799 - in stable/10: contrib/ofed/libcxgb4/src sys/dev/cxgb/ulp/iw_cxgb sys/dev/cxgbe/iw_cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 18:16:22 -0000 Author: np Date: Wed May 24 18:16:20 2017 New Revision: 318799 URL: https://svnweb.freebsd.org/changeset/base/318799 Log: MFC r311880, r314167, r316118, r316571, r316573, r316580, r316936-r316937, r316940, and r317410. r311880: The iw_cxgb and iw_cxgbe drivers should not use a FreeBSD device_t where a linuxkpi style device is expected. If OFED/linuxkpi actually starts using this field then we'll have to figure out whether to create fake devices for these drivers or have linuxkpi deal with NULL device. This mismatch was first reported as part of D6585. r314167: cxgbe/iw_cxgbe: Minor changes for T6. r316118: cxgbe/iw_cxgbe: T6 has no limit on the amount of memory that can be registered in one ib_reg_phys_mr. r316571: cxgbe/iw_cxgbe: Remove bad cast that resulted in incorrect length for memory regions larger than 4GB. r316573: cxgbe/iw_cxgbe: Replace a magic constant with something more readable (and accurate). T4 and later have an extra bit for page shift so the maximum page size is 8TB (shift of 12 + 31) instead of 128MB (12 + 15). This saves space in the chip's PBL (physical buffer list) when registering very large memory regions. r316580: cxgbe/iw_cxgbe: Remove another bad cast. This should have been included in r316571. r316936: cxgbe/iw_cxgbe: hw supports 64K (not 32K) Protection Domains. r316937: cxgbe/iw_cxgbe: Report accurate page_size_cap in ib_query_device. r316940: cxgbe/iw_cxgbe: Report the actual values of various parameters as configured by the firmware. r317410: cxgbe/iw_cxgbe: Pull in some updates to c4iw_wait_for_reply from the iw_cxgb4 Linux driver. Modified: stable/10/contrib/ofed/libcxgb4/src/t4.h stable/10/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c stable/10/sys/dev/cxgbe/iw_cxgbe/device.c stable/10/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h stable/10/sys/dev/cxgbe/iw_cxgbe/mem.c stable/10/sys/dev/cxgbe/iw_cxgbe/provider.c stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c stable/10/sys/dev/cxgbe/iw_cxgbe/t4.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/ofed/libcxgb4/src/t4.h ============================================================================== --- stable/10/contrib/ofed/libcxgb4/src/t4.h Wed May 24 18:14:57 2017 (r318798) +++ stable/10/contrib/ofed/libcxgb4/src/t4.h Wed May 24 18:16:20 2017 (r318799) @@ -102,7 +102,7 @@ #define T4_MAX_CQ_DEPTH (T4_MAX_IQ_SIZE - 1) #define T4_MAX_NUM_STAG (1<<15) #define T4_MAX_MR_SIZE (~0ULL - 1) -#define T4_PAGESIZE_MASK 0xffff000 /* 4KB-128MB */ +#define T4_PAGESIZE_MASK 0xffffffff000 /* 4KB-8TB */ #define T4_STAG_UNSET 0xffffffff #define T4_FW_MAJ 0 Modified: stable/10/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c ============================================================================== --- stable/10/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Wed May 24 18:14:57 2017 (r318798) +++ stable/10/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Wed May 24 18:16:20 2017 (r318799) @@ -1085,7 +1085,7 @@ int iwch_register_device(struct iwch_dev memcpy(dev->ibdev.node_desc, IWCH_NODE_DESC, sizeof(IWCH_NODE_DESC)); dev->ibdev.phys_port_cnt = sc->params.nports; dev->ibdev.num_comp_vectors = 1; - dev->ibdev.dma_device = dev->rdev.adap->dev; + dev->ibdev.dma_device = NULL; dev->ibdev.query_device = iwch_query_device; dev->ibdev.query_port = iwch_query_port; dev->ibdev.modify_port = iwch_modify_port; Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/device.c ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/device.c Wed May 24 18:14:57 2017 (r318798) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/device.c Wed May 24 18:16:20 2017 (r318799) @@ -332,7 +332,7 @@ c4iw_modevent(module_t mod, int cmd, voi case MOD_LOAD: rc = c4iw_mod_load(); if (rc == 0) - printf("iw_cxgbe: Chelsio T4/T5 RDMA driver loaded.\n"); + printf("iw_cxgbe: Chelsio T4/T5/T6 RDMA driver loaded.\n"); break; case MOD_UNLOAD: Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Wed May 24 18:14:57 2017 (r318798) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Wed May 24 18:16:20 2017 (r318799) @@ -157,49 +157,70 @@ static inline int c4iw_num_stags(struct return (int)(rdev->adap->vres.stag.size >> 5); } -#define C4IW_WR_TO (10*HZ) +#define C4IW_WR_TO (60*HZ) struct c4iw_wr_wait { int ret; - atomic_t completion; + struct completion completion; }; static inline void c4iw_init_wr_wait(struct c4iw_wr_wait *wr_waitp) { wr_waitp->ret = 0; - atomic_set(&wr_waitp->completion, 0); + init_completion(&wr_waitp->completion); } static inline void c4iw_wake_up(struct c4iw_wr_wait *wr_waitp, int ret) { wr_waitp->ret = ret; - atomic_set(&wr_waitp->completion, 1); - wakeup(wr_waitp); + complete(&wr_waitp->completion); } static inline int c4iw_wait_for_reply(struct c4iw_rdev *rdev, struct c4iw_wr_wait *wr_waitp, - u32 hwtid, u32 qpid, const char *func) + u32 hwtid, u32 qpid, const char *func) { struct adapter *sc = rdev->adap; unsigned to = C4IW_WR_TO; + int ret; + int timedout = 0; + struct timeval t1, t2; - while (!atomic_read(&wr_waitp->completion)) { - tsleep(wr_waitp, 0, "c4iw_wait", to); - if (SIGPENDING(curthread)) { - printf("%s - Device %s not responding - " - "tid %u qpid %u\n", func, - device_get_nameunit(sc->dev), hwtid, qpid); - if (c4iw_fatal_error(rdev)) { - wr_waitp->ret = -EIO; - break; - } - to = to << 2; - } - } + if (c4iw_fatal_error(rdev)) { + wr_waitp->ret = -EIO; + goto out; + } + + getmicrotime(&t1); + do { + ret = wait_for_completion_timeout(&wr_waitp->completion, to); + if (!ret) { + getmicrotime(&t2); + timevalsub(&t2, &t1); + printf("%s - Device %s not responding after %ld.%06ld " + "seconds - tid %u qpid %u\n", func, + device_get_nameunit(sc->dev), t2.tv_sec, t2.tv_usec, + hwtid, qpid); + if (c4iw_fatal_error(rdev)) { + wr_waitp->ret = -EIO; + break; + } + to = to << 2; + timedout = 1; + } + } while (!ret); + +out: + if (timedout) { + getmicrotime(&t2); + timevalsub(&t2, &t1); + printf("%s - Device %s reply after %ld.%06ld seconds - " + "tid %u qpid %u\n", func, device_get_nameunit(sc->dev), + t2.tv_sec, t2.tv_usec, hwtid, qpid); + } if (wr_waitp->ret) - CTR4(KTR_IW_CXGBE, "%s: FW reply %d tid %u qpid %u", - device_get_nameunit(sc->dev), wr_waitp->ret, hwtid, qpid); + CTR4(KTR_IW_CXGBE, "%p: FW reply %d tid %u qpid %u", sc, + wr_waitp->ret, hwtid, qpid); return (wr_waitp->ret); } Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/mem.c ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/mem.c Wed May 24 18:14:57 2017 (r318798) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/mem.c Wed May 24 18:16:20 2017 (r318799) @@ -46,12 +46,15 @@ __FBSDID("$FreeBSD$"); #define T4_ULPTX_MIN_IO 32 #define C4IW_MAX_INLINE_SIZE 96 -static int mr_exceeds_hw_limits(struct c4iw_dev *dev, u64 length) +static int +mr_exceeds_hw_limits(struct c4iw_dev *dev, u64 length) { - return (is_t4(dev->rdev.adap) || + + return ((is_t4(dev->rdev.adap) || is_t5(dev->rdev.adap)) && - length >= 8*1024*1024*1024ULL; + length >= 8*1024*1024*1024ULL); } + static int write_adapter_mem(struct c4iw_rdev *rdev, u32 addr, u32 len, void *data) { @@ -342,7 +345,8 @@ static int build_phys_page_list(struct i } /* Find largest page shift we can use to cover buffers */ - for (*shift = PAGE_SHIFT; *shift < 27; ++(*shift)) + for (*shift = PAGE_SHIFT; *shift < PAGE_SHIFT + M_FW_RI_TPTE_PS; + ++(*shift)) if ((1ULL << *shift) & mask) break; @@ -439,7 +443,7 @@ int c4iw_reregister_phys_mem(struct ib_m mhp->attr.zbva = 0; mhp->attr.va_fbo = *iova_start; mhp->attr.page_size = shift - 12; - mhp->attr.len = (u32) total_size; + mhp->attr.len = total_size; mhp->attr.pbl_size = npages; } @@ -511,7 +515,7 @@ struct ib_mr *c4iw_register_phys_mem(str mhp->attr.va_fbo = *iova_start; mhp->attr.page_size = shift - 12; - mhp->attr.len = (u32) total_size; + mhp->attr.len = total_size; mhp->attr.pbl_size = npages; ret = register_mem(rhp, php, mhp, shift); if (ret) Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/provider.c ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/provider.c Wed May 24 18:14:57 2017 (r318798) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/provider.c Wed May 24 18:16:20 2017 (r318799) @@ -188,7 +188,7 @@ static int c4iw_mmap(struct ib_ucontext "%s:6 USER DB-GTS addr %p region %p, reglen %u", __func__, addr, va_udbs_res, len_udbs_res); #ifdef DOT5 - if (is_t5(rdev->lldi.adapter_type) && map_udb_as_wc) + if (!is_t4(rdev->lldi.adapter_type) && map_udb_as_wc) vma->vm_page_prot = t4_pgprot_wc(vma->vm_page_prot); else #endif @@ -305,6 +305,7 @@ c4iw_query_device(struct ib_device *ibde { struct c4iw_dev *dev = to_c4iw_dev(ibdev); struct adapter *sc = dev->rdev.adap; + const int spg_ndesc = sc->params.sge.spg_len / EQ_ESIZE; CTR3(KTR_IW_CXGBE, "%s ibdev %p, props %p", __func__, ibdev, props); @@ -318,13 +319,15 @@ c4iw_query_device(struct ib_device *ibde props->vendor_id = pci_get_vendor(sc->dev); props->vendor_part_id = pci_get_device(sc->dev); props->max_mr_size = T4_MAX_MR_SIZE; - props->max_qp = T4_MAX_NUM_QP; - props->max_qp_wr = T4_MAX_QP_DEPTH; + props->max_qp = sc->vres.qp.size / 2; + props->max_qp_wr = T4_MAX_QP_DEPTH(spg_ndesc); props->max_sge = T4_MAX_RECV_SGE; props->max_sge_rd = 1; - props->max_qp_rd_atom = c4iw_max_read_depth; - props->max_qp_init_rd_atom = c4iw_max_read_depth; - props->max_cq = T4_MAX_NUM_CQ; + props->max_res_rd_atom = sc->params.max_ird_adapter; + props->max_qp_rd_atom = min(sc->params.max_ordird_qp, + c4iw_max_read_depth); + props->max_qp_init_rd_atom = props->max_qp_rd_atom; + props->max_cq = sc->vres.qp.size; props->max_cqe = T4_MAX_CQ_DEPTH; props->max_mr = c4iw_num_stags(&dev->rdev); props->max_pd = T4_MAX_NUM_PD; @@ -427,7 +430,7 @@ c4iw_register_device(struct c4iw_dev *de strlcpy(ibdev->node_desc, C4IW_NODE_DESC, sizeof(ibdev->node_desc)); ibdev->phys_port_cnt = sc->params.nports; ibdev->num_comp_vectors = 1; - ibdev->dma_device = sc->dev; + ibdev->dma_device = NULL; ibdev->query_device = c4iw_query_device; ibdev->query_port = c4iw_query_port; ibdev->modify_port = c4iw_modify_port; Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c Wed May 24 18:14:57 2017 (r318798) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c Wed May 24 18:16:20 2017 (r318799) @@ -132,6 +132,7 @@ static int create_qp(struct c4iw_rdev *r int ret; int eqsize; struct wrqe *wr; + const int spg_ndesc = sc->params.sge.spg_len / EQ_ESIZE; wq->sq.qid = c4iw_get_qpid(rdev, uctx); if (!wq->sq.qid) @@ -213,8 +214,7 @@ static int create_qp(struct c4iw_rdev *r res->u.sqrq.op = FW_RI_RES_OP_WRITE; /* eqsize is the number of 64B entries plus the status page size. */ - eqsize = wq->sq.size * T4_SQ_NUM_SLOTS + - (sc->params.sge.spg_len / EQ_ESIZE); + eqsize = wq->sq.size * T4_SQ_NUM_SLOTS + spg_ndesc; res->u.sqrq.fetchszm_to_iqid = cpu_to_be32( V_FW_RI_RES_WR_HOSTFCMODE(0) | /* no host cidx updates */ @@ -236,8 +236,7 @@ static int create_qp(struct c4iw_rdev *r res->u.sqrq.op = FW_RI_RES_OP_WRITE; /* eqsize is the number of 64B entries plus the status page size. */ - eqsize = wq->rq.size * T4_RQ_NUM_SLOTS + - (sc->params.sge.spg_len / EQ_ESIZE); + eqsize = wq->rq.size * T4_RQ_NUM_SLOTS + spg_ndesc; res->u.sqrq.fetchszm_to_iqid = cpu_to_be32( V_FW_RI_RES_WR_HOSTFCMODE(0) | /* no host cidx updates */ V_FW_RI_RES_WR_CPRIO(0) | /* don't keep in chip cache */ @@ -1522,7 +1521,7 @@ c4iw_create_qp(struct ib_pd *pd, struct struct c4iw_create_qp_resp uresp; int sqsize, rqsize; struct c4iw_ucontext *ucontext; - int ret; + int ret, spg_ndesc; struct c4iw_mm_entry *mm1, *mm2, *mm3, *mm4; CTR2(KTR_IW_CXGBE, "%s ib_pd %p", __func__, pd); @@ -1540,12 +1539,13 @@ c4iw_create_qp(struct ib_pd *pd, struct if (attrs->cap.max_inline_data > T4_MAX_SEND_INLINE) return ERR_PTR(-EINVAL); + spg_ndesc = rhp->rdev.adap->params.sge.spg_len / EQ_ESIZE; rqsize = roundup(attrs->cap.max_recv_wr + 1, 16); - if (rqsize > T4_MAX_RQ_SIZE) + if (rqsize > T4_MAX_RQ_SIZE(spg_ndesc)) return ERR_PTR(-E2BIG); sqsize = roundup(attrs->cap.max_send_wr + 1, 16); - if (sqsize > T4_MAX_SQ_SIZE) + if (sqsize > T4_MAX_SQ_SIZE(spg_ndesc)) return ERR_PTR(-E2BIG); ucontext = pd->uobject ? to_c4iw_ucontext(pd->uobject->context) : NULL; @@ -1555,9 +1555,10 @@ c4iw_create_qp(struct ib_pd *pd, struct if (!qhp) return ERR_PTR(-ENOMEM); qhp->wq.sq.size = sqsize; - qhp->wq.sq.memsize = (sqsize + 1) * sizeof *qhp->wq.sq.queue; + qhp->wq.sq.memsize = (sqsize + spg_ndesc) * sizeof *qhp->wq.sq.queue + + 16 * sizeof(__be64); qhp->wq.rq.size = rqsize; - qhp->wq.rq.memsize = (rqsize + 1) * sizeof *qhp->wq.rq.queue; + qhp->wq.rq.memsize = (rqsize + spg_ndesc) * sizeof *qhp->wq.rq.queue; if (ucontext) { qhp->wq.sq.memsize = roundup(qhp->wq.sq.memsize, PAGE_SIZE); Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/t4.h ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/t4.h Wed May 24 18:14:57 2017 (r318798) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/t4.h Wed May 24 18:16:20 2017 (r318799) @@ -59,21 +59,17 @@ #define CIDXINC_SHIFT 0 #define CIDXINC(x) ((x) << CIDXINC_SHIFT) -#define T4_MAX_NUM_QP (1<<16) -#define T4_MAX_NUM_CQ (1<<15) -#define T4_MAX_NUM_PD (1<<15) -#define T4_EQ_STATUS_ENTRIES (L1_CACHE_BYTES > 64 ? 2 : 1) -#define T4_MAX_EQ_SIZE (65520 - T4_EQ_STATUS_ENTRIES) -#define T4_MAX_IQ_SIZE (65520 - 1) -#define T4_MAX_RQ_SIZE (8192 - T4_EQ_STATUS_ENTRIES) -#define T4_MAX_SQ_SIZE (T4_MAX_EQ_SIZE - 1) -#define T4_MAX_QP_DEPTH (T4_MAX_RQ_SIZE - 1) -#define T4_MAX_CQ_DEPTH (T4_MAX_IQ_SIZE - 1) +#define T4_MAX_NUM_PD 65536 +#define T4_MAX_EQ_SIZE 65520 +#define T4_MAX_IQ_SIZE 65520 +#define T4_MAX_RQ_SIZE(n) (8192 - (n) - 1) +#define T4_MAX_SQ_SIZE(n) (T4_MAX_EQ_SIZE - (n) - 1) +#define T4_MAX_QP_DEPTH(n) (T4_MAX_RQ_SIZE(n)) +#define T4_MAX_CQ_DEPTH (T4_MAX_IQ_SIZE - 2) #define T4_MAX_MR_SIZE (~0ULL - 1) -#define T4_PAGESIZE_MASK 0xffff000 /* 4KB-128MB */ +#define T4_PAGESIZE_MASK 0xffffffff000 /* 4KB-8TB */ #define T4_STAG_UNSET 0xffffffff #define T4_FW_MAJ 0 -#define T4_EQ_STATUS_ENTRIES (L1_CACHE_BYTES > 64 ? 2 : 1) #define A_PCIE_MA_SYNC 0x30b4 struct t4_status_page { From owner-svn-src-stable-10@freebsd.org Wed May 24 19:19:03 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72F7FD7CBF5; Wed, 24 May 2017 19:19:03 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 422E1132C; Wed, 24 May 2017 19:19:03 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OJJ2YC072721; Wed, 24 May 2017 19:19:02 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OJJ2Md072720; Wed, 24 May 2017 19:19:02 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705241919.v4OJJ2Md072720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 19:19:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318802 - stable/10/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 19:19:03 -0000 Author: np Date: Wed May 24 19:19:02 2017 New Revision: 318802 URL: https://svnweb.freebsd.org/changeset/base/318802 Log: MFC r314131: Avoid NULL dereference in a couple of sysctl handlers in ibcore. iw_cxgbe sets ib_device->dma_device to NULL (since r311880). Sponsored by: Chelsio Communications Modified: stable/10/sys/ofed/drivers/infiniband/core/uverbs_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/infiniband/core/uverbs_main.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/uverbs_main.c Wed May 24 19:18:36 2017 (r318801) +++ stable/10/sys/ofed/drivers/infiniband/core/uverbs_main.c Wed May 24 19:19:02 2017 (r318802) @@ -782,7 +782,7 @@ show_dev_device(struct device *device, s { struct ib_uverbs_device *dev = dev_get_drvdata(device); - if (!dev) + if (!dev || !dev->ib_dev->dma_device) return -ENODEV; return sprintf(buf, "0x%04x\n", @@ -795,7 +795,7 @@ show_dev_vendor(struct device *device, s { struct ib_uverbs_device *dev = dev_get_drvdata(device); - if (!dev) + if (!dev || !dev->ib_dev->dma_device) return -ENODEV; return sprintf(buf, "0x%04x\n", From owner-svn-src-stable-10@freebsd.org Wed May 24 20:01:14 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00C15D7CA96; Wed, 24 May 2017 20:01:14 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D20C21EE2; Wed, 24 May 2017 20:01:13 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OK1COs091681; Wed, 24 May 2017 20:01:12 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OK1C5H091677; Wed, 24 May 2017 20:01:12 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242001.v4OK1C5H091677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 20:01:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318804 - stable/10/sys/dev/cxgbe/tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:01:14 -0000 Author: np Date: Wed May 24 20:01:12 2017 New Revision: 318804 URL: https://svnweb.freebsd.org/changeset/base/318804 Log: MFC r313346: cxgbe/t4_tom: Fix CLIP entry refcounting on the passive side. Every IPv6 connection being handled by the TOE should have a reference on its CLIP entry. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/tom/t4_connect.c stable/10/sys/dev/cxgbe/tom/t4_listen.c stable/10/sys/dev/cxgbe/tom/t4_tom.c stable/10/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_connect.c Wed May 24 19:57:22 2017 (r318803) +++ stable/10/sys/dev/cxgbe/tom/t4_connect.c Wed May 24 20:01:12 2017 (r318804) @@ -402,7 +402,7 @@ t4_connect(struct toedev *tod, struct so if ((inp->inp_vflag & INP_IPV6) == 0) DONT_OFFLOAD_ACTIVE_OPEN(ENOTSUP); - toep->ce = hold_lip(td, &inp->in6p_laddr); + toep->ce = hold_lip(td, &inp->in6p_laddr, NULL); if (toep->ce == NULL) DONT_OFFLOAD_ACTIVE_OPEN(ENOENT); Modified: stable/10/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_listen.c Wed May 24 19:57:22 2017 (r318803) +++ stable/10/sys/dev/cxgbe/tom/t4_listen.c Wed May 24 20:01:12 2017 (r318804) @@ -207,7 +207,7 @@ alloc_lctx(struct adapter *sc, struct in !IN6_ARE_ADDR_EQUAL(&in6addr_any, &inp->in6p_laddr)) { struct tom_data *td = sc->tom_softc; - lctx->ce = hold_lip(td, &inp->in6p_laddr); + lctx->ce = hold_lip(td, &inp->in6p_laddr, NULL); if (lctx->ce == NULL) { free(lctx, M_CXGBE); return (NULL); @@ -1639,6 +1639,8 @@ reset: INP_WLOCK_ASSERT(new_inp); MPASS(so->so_vnet == lctx->vnet); toep->vnet = lctx->vnet; + if (inc.inc_flags & INC_ISIPV6) + toep->ce = hold_lip(sc->tom_softc, &inc.inc6_laddr, lctx->ce); /* * This is for the unlikely case where the syncache entry that we added Modified: stable/10/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_tom.c Wed May 24 19:57:22 2017 (r318803) +++ stable/10/sys/dev/cxgbe/tom/t4_tom.c Wed May 24 20:01:12 2017 (r318804) @@ -745,12 +745,12 @@ search_lip(struct tom_data *td, struct i } struct clip_entry * -hold_lip(struct tom_data *td, struct in6_addr *lip) +hold_lip(struct tom_data *td, struct in6_addr *lip, struct clip_entry *ce) { - struct clip_entry *ce; mtx_lock(&td->clip_table_lock); - ce = search_lip(td, lip); + if (ce == NULL) + ce = search_lip(td, lip); if (ce != NULL) ce->refcount++; mtx_unlock(&td->clip_table_lock); Modified: stable/10/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_tom.h Wed May 24 19:57:22 2017 (r318803) +++ stable/10/sys/dev/cxgbe/tom/t4_tom.h Wed May 24 20:01:12 2017 (r318804) @@ -293,7 +293,8 @@ uint64_t calc_opt0(struct socket *, stru uint64_t select_ntuple(struct vi_info *, struct l2t_entry *); void set_tcpddp_ulp_mode(struct toepcb *); int negative_advice(int); -struct clip_entry *hold_lip(struct tom_data *, struct in6_addr *); +struct clip_entry *hold_lip(struct tom_data *, struct in6_addr *, + struct clip_entry *); void release_lip(struct tom_data *, struct clip_entry *); /* t4_connect.c */ From owner-svn-src-stable-10@freebsd.org Wed May 24 20:13:51 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A982D7CE63; Wed, 24 May 2017 20:13:51 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A67717FC; Wed, 24 May 2017 20:13:50 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OKDoM5097338; Wed, 24 May 2017 20:13:50 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OKDoxC097337; Wed, 24 May 2017 20:13:50 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201705242013.v4OKDoxC097337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Wed, 24 May 2017 20:13:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318806 - stable/10/sys/dev/tws X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:13:51 -0000 Author: jpaetzel Date: Wed May 24 20:13:49 2017 New Revision: 318806 URL: https://svnweb.freebsd.org/changeset/base/318806 Log: MFC 318401 Increase the number of LUNs this hardware can support. Experimentally we know this value works, but the hardware may support an even higher value. PR: 213876 Reported by: J.Catrysse@proximedia.be Modified: stable/10/sys/dev/tws/tws.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/tws/tws.h ============================================================================== --- stable/10/sys/dev/tws/tws.h Wed May 24 20:10:38 2017 (r318805) +++ stable/10/sys/dev/tws/tws.h Wed May 24 20:13:49 2017 (r318806) @@ -67,7 +67,7 @@ extern int tws_queue_depth; #define TWS_DRIVER_VERSION_STRING "10.80.00.005" #define TWS_MAX_NUM_UNITS 65 -#define TWS_MAX_NUM_LUNS 16 +#define TWS_MAX_NUM_LUNS 32 #define TWS_MAX_IRQS 2 #define TWS_SCSI_INITIATOR_ID 66 #define TWS_MAX_IO_SIZE 0x20000 /* 128kB */ From owner-svn-src-stable-10@freebsd.org Wed May 24 20:29:22 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A0E2D8038F; Wed, 24 May 2017 20:29:22 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 159D31518; Wed, 24 May 2017 20:29:22 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OKTLtW002035; Wed, 24 May 2017 20:29:21 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OKTKf4002033; Wed, 24 May 2017 20:29:20 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242029.v4OKTKf4002033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 20:29:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318809 - in stable/10: share/man/man4 sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:29:22 -0000 Author: np Date: Wed May 24 20:29:20 2017 New Revision: 318809 URL: https://svnweb.freebsd.org/changeset/base/318809 Log: MFC r313318: cxgbe(4): Allow tunables that control the number of queues to be set to '-n' to tell the driver to create _up to_ 'n' queues if enough cores are available. For example, setting hw.cxgbe.nrxq10g="-32" will result in 16 queues if the system has 16 cores, 32 if it has 32. There is no change in the default number of queues of any type. Sponsored by: Chelsio Communications Modified: stable/10/share/man/man4/cxgbe.4 stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/cxgbe.4 ============================================================================== --- stable/10/share/man/man4/cxgbe.4 Wed May 24 20:28:48 2017 (r318808) +++ stable/10/share/man/man4/cxgbe.4 Wed May 24 20:29:20 2017 (r318809) @@ -168,6 +168,10 @@ Tunables can be set at the .Xr loader 8 prompt before booting the kernel or stored in .Xr loader.conf 5 . +There are multiple tunables that control the number of queues of various +types. +A negative value for such a tunable instructs the driver to create +up to that many queues if there are enough CPU cores available. .Bl -tag -width indent .It Va hw.cxgbe.ntxq10g Number of tx queues used for a 10Gb or higher-speed port. Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed May 24 20:28:48 2017 (r318808) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed May 24 20:29:20 2017 (r318809) @@ -221,8 +221,8 @@ SLIST_HEAD(, uld_info) t4_uld_list; * Tunables. See tweak_tunables() too. * * Each tunable is set to a default value here if it's known at compile-time. - * Otherwise it is set to -1 as an indication to tweak_tunables() that it should - * provide a reasonable default when the driver is loaded. + * Otherwise it is set to -n as an indication to tweak_tunables() that it should + * provide a reasonable default (upto n) when the driver is loaded. * * Tunables applicable to both T4 and T5 are under hw.cxgbe. Those specific to * T5 are under hw.cxl. @@ -232,27 +232,27 @@ SLIST_HEAD(, uld_info) t4_uld_list; * Number of queues for tx and rx, 10G and 1G, NIC and offload. */ #define NTXQ_10G 16 -int t4_ntxq10g = -1; +int t4_ntxq10g = -NTXQ_10G; TUNABLE_INT("hw.cxgbe.ntxq10g", &t4_ntxq10g); #define NRXQ_10G 8 -int t4_nrxq10g = -1; +int t4_nrxq10g = -NRXQ_10G; TUNABLE_INT("hw.cxgbe.nrxq10g", &t4_nrxq10g); #define NTXQ_1G 4 -int t4_ntxq1g = -1; +int t4_ntxq1g = -NTXQ_1G; TUNABLE_INT("hw.cxgbe.ntxq1g", &t4_ntxq1g); #define NRXQ_1G 2 -int t4_nrxq1g = -1; +int t4_nrxq1g = -NRXQ_1G; TUNABLE_INT("hw.cxgbe.nrxq1g", &t4_nrxq1g); #define NTXQ_VI 1 -static int t4_ntxq_vi = -1; +static int t4_ntxq_vi = -NTXQ_VI; TUNABLE_INT("hw.cxgbe.ntxq_vi", &t4_ntxq_vi); #define NRXQ_VI 1 -static int t4_nrxq_vi = -1; +static int t4_nrxq_vi = -NRXQ_VI; TUNABLE_INT("hw.cxgbe.nrxq_vi", &t4_nrxq_vi); static int t4_rsrv_noflowq = 0; @@ -260,37 +260,37 @@ TUNABLE_INT("hw.cxgbe.rsrv_noflowq", &t4 #ifdef TCP_OFFLOAD #define NOFLDTXQ_10G 8 -static int t4_nofldtxq10g = -1; +static int t4_nofldtxq10g = -NOFLDTXQ_10G; TUNABLE_INT("hw.cxgbe.nofldtxq10g", &t4_nofldtxq10g); #define NOFLDRXQ_10G 2 -static int t4_nofldrxq10g = -1; +static int t4_nofldrxq10g = -NOFLDRXQ_10G; TUNABLE_INT("hw.cxgbe.nofldrxq10g", &t4_nofldrxq10g); #define NOFLDTXQ_1G 2 -static int t4_nofldtxq1g = -1; +static int t4_nofldtxq1g = -NOFLDTXQ_1G; TUNABLE_INT("hw.cxgbe.nofldtxq1g", &t4_nofldtxq1g); #define NOFLDRXQ_1G 1 -static int t4_nofldrxq1g = -1; +static int t4_nofldrxq1g = -NOFLDRXQ_1G; TUNABLE_INT("hw.cxgbe.nofldrxq1g", &t4_nofldrxq1g); #define NOFLDTXQ_VI 1 -static int t4_nofldtxq_vi = -1; +static int t4_nofldtxq_vi = -NOFLDTXQ_VI; TUNABLE_INT("hw.cxgbe.nofldtxq_vi", &t4_nofldtxq_vi); #define NOFLDRXQ_VI 1 -static int t4_nofldrxq_vi = -1; +static int t4_nofldrxq_vi = -NOFLDRXQ_VI; TUNABLE_INT("hw.cxgbe.nofldrxq_vi", &t4_nofldrxq_vi); #endif #ifdef DEV_NETMAP #define NNMTXQ_VI 2 -static int t4_nnmtxq_vi = -1; +static int t4_nnmtxq_vi = -NNMTXQ_VI; TUNABLE_INT("hw.cxgbe.nnmtxq_vi", &t4_nnmtxq_vi); #define NNMRXQ_VI 2 -static int t4_nnmrxq_vi = -1; +static int t4_nnmrxq_vi = -NNMRXQ_VI; TUNABLE_INT("hw.cxgbe.nnmrxq_vi", &t4_nnmrxq_vi); #endif @@ -9408,6 +9408,22 @@ uld_active(struct adapter *sc, int uld_i #endif /* + * t = ptr to tunable. + * nc = number of CPUs. + * c = compiled in default for that tunable. + */ +static void +calculate_nqueues(int *t, int nc, const int c) +{ + int nq; + + if (*t > 0) + return; + nq = *t < 0 ? -*t : c; + *t = min(nc, nq); +} + +/* * Come up with reasonable defaults for some of the tunables, provided they're * not set by the user (in which case we'll use the values as is). */ @@ -9420,7 +9436,7 @@ tweak_tunables(void) #ifdef RSS t4_ntxq10g = rss_getnumbuckets(); #else - t4_ntxq10g = min(nc, NTXQ_10G); + calculate_nqueues(&t4_ntxq10g, nc, NTXQ_10G); #endif } @@ -9429,18 +9445,17 @@ tweak_tunables(void) /* XXX: way too many for 1GbE? */ t4_ntxq1g = rss_getnumbuckets(); #else - t4_ntxq1g = min(nc, NTXQ_1G); + calculate_nqueues(&t4_ntxq1g, nc, NTXQ_1G); #endif } - if (t4_ntxq_vi < 1) - t4_ntxq_vi = min(nc, NTXQ_VI); + calculate_nqueues(&t4_ntxq_vi, nc, NTXQ_VI); if (t4_nrxq10g < 1) { #ifdef RSS t4_nrxq10g = rss_getnumbuckets(); #else - t4_nrxq10g = min(nc, NRXQ_10G); + calculate_nqueues(&t4_nrxq10g, nc, NRXQ_10G); #endif } @@ -9449,31 +9464,19 @@ tweak_tunables(void) /* XXX: way too many for 1GbE? */ t4_nrxq1g = rss_getnumbuckets(); #else - t4_nrxq1g = min(nc, NRXQ_1G); + calculate_nqueues(&t4_nrxq1g, nc, NRXQ_1G); #endif } - if (t4_nrxq_vi < 1) - t4_nrxq_vi = min(nc, NRXQ_VI); + calculate_nqueues(&t4_nrxq_vi, nc, NRXQ_VI); #ifdef TCP_OFFLOAD - if (t4_nofldtxq10g < 1) - t4_nofldtxq10g = min(nc, NOFLDTXQ_10G); - - if (t4_nofldtxq1g < 1) - t4_nofldtxq1g = min(nc, NOFLDTXQ_1G); - - if (t4_nofldtxq_vi < 1) - t4_nofldtxq_vi = min(nc, NOFLDTXQ_VI); - - if (t4_nofldrxq10g < 1) - t4_nofldrxq10g = min(nc, NOFLDRXQ_10G); - - if (t4_nofldrxq1g < 1) - t4_nofldrxq1g = min(nc, NOFLDRXQ_1G); - - if (t4_nofldrxq_vi < 1) - t4_nofldrxq_vi = min(nc, NOFLDRXQ_VI); + calculate_nqueues(&t4_nofldtxq10g, nc, NOFLDTXQ_10G); + calculate_nqueues(&t4_nofldtxq1g, nc, NOFLDTXQ_1G); + calculate_nqueues(&t4_nofldtxq_vi, nc, NOFLDTXQ_VI); + calculate_nqueues(&t4_nofldrxq10g, nc, NOFLDRXQ_10G); + calculate_nqueues(&t4_nofldrxq1g, nc, NOFLDRXQ_1G); + calculate_nqueues(&t4_nofldrxq_vi, nc, NOFLDRXQ_VI); if (t4_toecaps_allowed == -1) t4_toecaps_allowed = FW_CAPS_CONFIG_TOE; @@ -9500,11 +9503,8 @@ tweak_tunables(void) #endif #ifdef DEV_NETMAP - if (t4_nnmtxq_vi < 1) - t4_nnmtxq_vi = min(nc, NNMTXQ_VI); - - if (t4_nnmrxq_vi < 1) - t4_nnmrxq_vi = min(nc, NNMRXQ_VI); + calculate_nqueues(&t4_nnmtxq_vi, nc, NNMTXQ_VI); + calculate_nqueues(&t4_nnmrxq_vi, nc, NNMRXQ_VI); #endif if (t4_tmr_idx_10g < 0 || t4_tmr_idx_10g >= SGE_NTIMERS) From owner-svn-src-stable-10@freebsd.org Wed May 24 20:34:21 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F23AD806ED; Wed, 24 May 2017 20:34:21 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F43B1B8F; Wed, 24 May 2017 20:34:20 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OKYKUM006264; Wed, 24 May 2017 20:34:20 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OKYJgQ006262; Wed, 24 May 2017 20:34:19 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242034.v4OKYJgQ006262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 20:34:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318811 - in stable/10/release: . tools X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 20:34:21 -0000 Author: np Date: Wed May 24 20:34:19 2017 New Revision: 318811 URL: https://svnweb.freebsd.org/changeset/base/318811 Log: MFC r307008: Add the ability to override the size of the swap partition when building VM images. The default continues to be 1G. Sponsored by: Chelsio Communications Modified: stable/10/release/Makefile.vm stable/10/release/tools/vmimage.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/release/Makefile.vm ============================================================================== --- stable/10/release/Makefile.vm Wed May 24 20:33:49 2017 (r318810) +++ stable/10/release/Makefile.vm Wed May 24 20:34:19 2017 (r318811) @@ -8,6 +8,7 @@ VMTARGETS= vm-image VMFORMATS?= vhd vmdk qcow2 raw VMSIZE?= 20G +SWAPSIZE?= 1G VMBASE?= vm VHD_DESC= Azure, VirtualPC, Hyper-V, Xen disk image Modified: stable/10/release/tools/vmimage.subr ============================================================================== --- stable/10/release/tools/vmimage.subr Wed May 24 20:33:49 2017 (r318810) +++ stable/10/release/tools/vmimage.subr Wed May 24 20:34:19 2017 (r318811) @@ -11,7 +11,7 @@ trap "cleanup" INT QUIT TRAP ABRT TERM write_partition_layout() { if [ -z "${NOSWAP}" ]; then - SWAPOPT="-p freebsd-swap/swapfs::1G" + SWAPOPT="-p freebsd-swap/swapfs::${SWAPSIZE}" fi _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR)" From owner-svn-src-stable-10@freebsd.org Wed May 24 21:54:05 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE59AD80698; Wed, 24 May 2017 21:54:05 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8658A123D; Wed, 24 May 2017 21:54:05 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OLs4Jk040652; Wed, 24 May 2017 21:54:04 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OLs4t1040650; Wed, 24 May 2017 21:54:04 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242154.v4OLs4t1040650@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 21:54:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318826 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 21:54:05 -0000 Author: np Date: Wed May 24 21:54:04 2017 New Revision: 318826 URL: https://svnweb.freebsd.org/changeset/base/318826 Log: MFC r309725: cxgbe(4): netmap does not set IFCAP_NETMAP in an ifnet's if_capabilities any more (since r307394). Do it in the driver instead. Modified: stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/t4_netmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed May 24 21:53:47 2017 (r318825) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed May 24 21:54:04 2017 (r318826) @@ -1370,6 +1370,10 @@ cxgbe_vi_attach(device_t dev, struct vi_ if (vi->nofldrxq != 0) ifp->if_capabilities |= IFCAP_TOE; #endif +#ifdef DEV_NETMAP + if (vi->nnmrxq != 0) + ifp->if_capabilities |= IFCAP_NETMAP; +#endif ifp->if_capenable = T4_CAP_ENABLE; ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO | CSUM_UDP_IPV6 | CSUM_TCP_IPV6; @@ -1388,7 +1392,7 @@ cxgbe_vi_attach(device_t dev, struct vi_ ether_ifattach(ifp, vi->hw_addr); #ifdef DEV_NETMAP - if (vi->nnmrxq != 0) + if (ifp->if_capabilities & IFCAP_NETMAP) cxgbe_nm_attach(vi); #endif sb = sbuf_new_auto(); Modified: stable/10/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_netmap.c Wed May 24 21:53:47 2017 (r318825) +++ stable/10/sys/dev/cxgbe/t4_netmap.c Wed May 24 21:54:04 2017 (r318826) @@ -874,7 +874,7 @@ cxgbe_nm_attach(struct vi_info *vi) na.nm_register = cxgbe_netmap_reg; na.num_tx_rings = vi->nnmtxq; na.num_rx_rings = vi->nnmrxq; - netmap_attach(&na); /* This adds IFCAP_NETMAP to if_capabilities */ + netmap_attach(&na); } void From owner-svn-src-stable-10@freebsd.org Wed May 24 22:48:18 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0510D804B0; Wed, 24 May 2017 22:48:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F92D19A5; Wed, 24 May 2017 22:48:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OMmH9a062102; Wed, 24 May 2017 22:48:17 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OMmHJF062101; Wed, 24 May 2017 22:48:17 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242248.v4OMmHJF062101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 22:48:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318836 - stable/10/sys/dev/cxgbe/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 22:48:18 -0000 Author: np Date: Wed May 24 22:48:17 2017 New Revision: 318836 URL: https://svnweb.freebsd.org/changeset/base/318836 Log: MFC r316172: cxgbe: Don't call t4_edc_err_read for errors not related to the EDCs. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/10/sys/dev/cxgbe/common/t4_hw.c Wed May 24 22:47:45 2017 (r318835) +++ stable/10/sys/dev/cxgbe/common/t4_hw.c Wed May 24 22:48:17 2017 (r318836) @@ -4329,7 +4329,8 @@ static void mem_intr_handler(struct adap if (v & F_ECC_CE_INT_CAUSE) { u32 cnt = G_ECC_CECNT(t4_read_reg(adapter, cnt_addr)); - t4_edc_err_read(adapter, idx); + if (idx <= MEM_EDC1) + t4_edc_err_read(adapter, idx); t4_write_reg(adapter, cnt_addr, V_ECC_CECNT(M_ECC_CECNT)); CH_WARN_RATELIMIT(adapter, From owner-svn-src-stable-10@freebsd.org Wed May 24 23:08:47 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A6F4D80A05; Wed, 24 May 2017 23:08:47 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22679137A; Wed, 24 May 2017 23:08:47 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ON8khv070686; Wed, 24 May 2017 23:08:46 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ON8kfF070685; Wed, 24 May 2017 23:08:46 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705242308.v4ON8kfF070685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 23:08:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318838 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 23:08:47 -0000 Author: np Date: Wed May 24 23:08:45 2017 New Revision: 318838 URL: https://svnweb.freebsd.org/changeset/base/318838 Log: MFC r316506: cxgbe(4): Program the global RSS key once instead of once per ifnet. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed May 24 23:08:17 2017 (r318837) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed May 24 23:08:45 2017 (r318838) @@ -4042,6 +4042,10 @@ int adapter_full_init(struct adapter *sc) { int rc, i; +#ifdef RSS + uint32_t raw_rss_key[RSS_KEYSIZE / sizeof(uint32_t)]; + uint32_t rss_key[RSS_KEYSIZE / sizeof(uint32_t)]; +#endif ASSERT_SYNCHRONIZED_OP(sc); ADAPTER_LOCK_ASSERT_NOTOWNED(sc); @@ -4067,6 +4071,14 @@ adapter_full_init(struct adapter *sc) taskqueue_start_threads(&sc->tq[i], 1, PI_NET, "%s tq%d", device_get_nameunit(sc->dev), i); } +#ifdef RSS + MPASS(RSS_KEYSIZE == 40); + rss_getkey((void *)&raw_rss_key[0]); + for (i = 0; i < nitems(rss_key); i++) { + rss_key[i] = htobe32(raw_rss_key[nitems(rss_key) - 1 - i]); + } + t4_write_rss_key(sc, &rss_key[0], -1); +#endif if (!(sc->flags & IS_VF)) t4_intr_enable(sc); @@ -4174,8 +4186,6 @@ vi_full_init(struct vi_info *vi) int nbuckets = rss_getnumbuckets(); int hashconfig = rss_gethashconfig(); int extra; - uint32_t raw_rss_key[RSS_KEYSIZE / sizeof(uint32_t)]; - uint32_t rss_key[RSS_KEYSIZE / sizeof(uint32_t)]; #endif ASSERT_SYNCHRONIZED_OP(sc); @@ -4205,17 +4215,10 @@ vi_full_init(struct vi_info *vi) vi->rss_size); } #ifdef RSS - MPASS(RSS_KEYSIZE == 40); if (vi->nrxq != nbuckets) { if_printf(ifp, "nrxq (%d) != kernel RSS buckets (%d);" "performance will be impacted.\n", vi->nrxq, nbuckets); } - - rss_getkey((void *)&raw_rss_key[0]); - for (i = 0; i < nitems(rss_key); i++) { - rss_key[i] = htobe32(raw_rss_key[nitems(rss_key) - 1 - i]); - } - t4_write_rss_key(sc, &rss_key[0], -1); #endif rss = malloc(vi->rss_size * sizeof (*rss), M_CXGBE, M_ZERO | M_WAITOK); for (i = 0; i < vi->rss_size;) { From owner-svn-src-stable-10@freebsd.org Thu May 25 00:16:43 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01FE7D7BEF8; Thu, 25 May 2017 00:16:43 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B445F1346; Thu, 25 May 2017 00:16:42 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P0GffD099544; Thu, 25 May 2017 00:16:41 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P0GfcJ099541; Thu, 25 May 2017 00:16:41 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705250016.v4P0GfcJ099541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 25 May 2017 00:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318840 - in stable/10/sys/dev/cxgbe: . common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 00:16:43 -0000 Author: np Date: Thu May 25 00:16:41 2017 New Revision: 318840 URL: https://svnweb.freebsd.org/changeset/base/318840 Log: MFC r316971: cxgbe: Add a tunable to configure the SGE time scaler, which is available starting with T6. The values in the timer holdoff registers are multiplied by the scaling factor before use. dev...holdoff_timers shows the final values of the timers in microseconds. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/common/common.h stable/10/sys/dev/cxgbe/common/t4_hw.c stable/10/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/10/sys/dev/cxgbe/common/common.h Thu May 25 00:16:01 2017 (r318839) +++ stable/10/sys/dev/cxgbe/common/common.h Thu May 25 00:16:41 2017 (r318840) @@ -210,7 +210,7 @@ struct tp_rdma_stats { }; struct sge_params { - int timer_val[SGE_NTIMERS]; + int timer_val[SGE_NTIMERS]; /* final, scaled values */ int counter_val[SGE_NCOUNTERS]; int fl_starve_threshold; int fl_starve_threshold2; Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/10/sys/dev/cxgbe/common/t4_hw.c Thu May 25 00:16:01 2017 (r318839) +++ stable/10/sys/dev/cxgbe/common/t4_hw.c Thu May 25 00:16:41 2017 (r318840) @@ -7904,7 +7904,7 @@ int t4_init_sge_params(struct adapter *a { u32 r; struct sge_params *sp = &adapter->params.sge; - unsigned i; + unsigned i, tscale = 1; r = t4_read_reg(adapter, A_SGE_INGRESS_RX_THRESHOLD); sp->counter_val[0] = G_THRESHOLD_0(r); @@ -7912,15 +7912,24 @@ int t4_init_sge_params(struct adapter *a sp->counter_val[2] = G_THRESHOLD_2(r); sp->counter_val[3] = G_THRESHOLD_3(r); + if (chip_id(adapter) >= CHELSIO_T6) { + r = t4_read_reg(adapter, A_SGE_ITP_CONTROL); + tscale = G_TSCALE(r); + if (tscale == 0) + tscale = 1; + else + tscale += 2; + } + r = t4_read_reg(adapter, A_SGE_TIMER_VALUE_0_AND_1); - sp->timer_val[0] = core_ticks_to_us(adapter, G_TIMERVALUE0(r)); - sp->timer_val[1] = core_ticks_to_us(adapter, G_TIMERVALUE1(r)); + sp->timer_val[0] = core_ticks_to_us(adapter, G_TIMERVALUE0(r)) * tscale; + sp->timer_val[1] = core_ticks_to_us(adapter, G_TIMERVALUE1(r)) * tscale; r = t4_read_reg(adapter, A_SGE_TIMER_VALUE_2_AND_3); - sp->timer_val[2] = core_ticks_to_us(adapter, G_TIMERVALUE2(r)); - sp->timer_val[3] = core_ticks_to_us(adapter, G_TIMERVALUE3(r)); + sp->timer_val[2] = core_ticks_to_us(adapter, G_TIMERVALUE2(r)) * tscale; + sp->timer_val[3] = core_ticks_to_us(adapter, G_TIMERVALUE3(r)) * tscale; r = t4_read_reg(adapter, A_SGE_TIMER_VALUE_4_AND_5); - sp->timer_val[4] = core_ticks_to_us(adapter, G_TIMERVALUE4(r)); - sp->timer_val[5] = core_ticks_to_us(adapter, G_TIMERVALUE5(r)); + sp->timer_val[4] = core_ticks_to_us(adapter, G_TIMERVALUE4(r)) * tscale; + sp->timer_val[5] = core_ticks_to_us(adapter, G_TIMERVALUE5(r)) * tscale; r = t4_read_reg(adapter, A_SGE_CONM_CTRL); sp->fl_starve_threshold = G_EGRTHRESHOLD(r) * 2 + 1; Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Thu May 25 00:16:01 2017 (r318839) +++ stable/10/sys/dev/cxgbe/t4_sge.c Thu May 25 00:16:41 2017 (r318840) @@ -149,6 +149,13 @@ TUNABLE_INT("hw.cxgbe.largest_rx_cluster static int safest_rx_cluster = PAGE_SIZE; TUNABLE_INT("hw.cxgbe.safest_rx_cluster", &safest_rx_cluster); +/* + * The interrupt holdoff timers are multiplied by this value on T6+. + * 1 and 3-17 (both inclusive) are legal values. + */ +static int tscale = 1; +TUNABLE_INT("hw.cxgbe.tscale", &tscale); + struct txpkts { u_int wr_type; /* type 0 or type 1 */ u_int npkt; /* # of packets in this work request */ @@ -390,6 +397,12 @@ t4_sge_modload(void) cong_drop = 0; } + if (tscale != 1 && (tscale < 3 || tscale > 17)) { + printf("Invalid hw.cxgbe.tscale value (%d)," + " using 1 instead.\n", tscale); + tscale = 1; + } + extfree_refs = counter_u64_alloc(M_WAITOK); extfree_rels = counter_u64_alloc(M_WAITOK); counter_u64_zero(extfree_refs); @@ -582,6 +595,15 @@ t4_tweak_chip_settings(struct adapter *s V_TIMERVALUE5(us_to_core_ticks(sc, intr_timer[5])); t4_write_reg(sc, A_SGE_TIMER_VALUE_4_AND_5, v); + if (chip_id(sc) >= CHELSIO_T6) { + m = V_TSCALE(M_TSCALE); + if (tscale == 1) + v = 0; + else + v = V_TSCALE(tscale - 2); + t4_set_reg_field(sc, A_SGE_ITP_CONTROL, m, v); + } + /* 4K, 16K, 64K, 256K DDP "page sizes" */ v = V_HPZ0(0) | V_HPZ1(2) | V_HPZ2(4) | V_HPZ3(6); t4_write_reg(sc, A_ULP_RX_TDDP_PSZ, v); From owner-svn-src-stable-10@freebsd.org Thu May 25 01:01:37 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B5F6D80BCD; Thu, 25 May 2017 01:01:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46C681CFE; Thu, 25 May 2017 01:01:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P11atF017199; Thu, 25 May 2017 01:01:36 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P11aNn017197; Thu, 25 May 2017 01:01:36 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705250101.v4P11aNn017197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 25 May 2017 01:01:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318844 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:01:37 -0000 Author: np Date: Thu May 25 01:01:35 2017 New Revision: 318844 URL: https://svnweb.freebsd.org/changeset/base/318844 Log: MFC r317820 and r317837. r317820: cxgbe(4): Update the list of PCIe devices claimed by the driver. At this point any board with a T6 should just work. r317837: cxgbe(4): Update the VF device ids too. This should have been part of r317820. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/t4_vf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Thu May 25 01:00:57 2017 (r318843) +++ stable/10/sys/dev/cxgbe/t4_main.c Thu May 25 01:01:35 2017 (r318844) @@ -611,13 +611,25 @@ struct { #endif }, t6_pciids[] = { {0xc006, "Chelsio Terminator 6 FPGA"}, /* T6 PE10K6 FPGA (PF0) */ - {0x6400, "Chelsio T6225-DBG"}, /* 2 x 10/25G, debug */ + {0x6400, "Chelsio T6-DBG-25"}, /* 2 x 10/25G, debug */ {0x6401, "Chelsio T6225-CR"}, /* 2 x 10/25G */ {0x6402, "Chelsio T6225-SO-CR"}, /* 2 x 10/25G, nomem */ + {0x6403, "Chelsio T6425-CR"}, /* 4 x 10/25G */ + {0x6404, "Chelsio T6425-SO-CR"}, /* 4 x 10/25G, nomem */ + {0x6405, "Chelsio T6225-OCP-SO"}, /* 2 x 10/25G, nomem */ + {0x6406, "Chelsio T62100-OCP-SO"}, /* 2 x 40/50/100G, nomem */ {0x6407, "Chelsio T62100-LP-CR"}, /* 2 x 40/50/100G */ {0x6408, "Chelsio T62100-SO-CR"}, /* 2 x 40/50/100G, nomem */ + {0x6409, "Chelsio T6210-BT"}, /* 2 x 10GBASE-T */ {0x640d, "Chelsio T62100-CR"}, /* 2 x 40/50/100G */ - {0x6410, "Chelsio T62100-DBG"}, /* 2 x 40/50/100G, debug */ + {0x6410, "Chelsio T6-DBG-100"}, /* 2 x 40/50/100G, debug */ + {0x6411, "Chelsio T6225-LL-CR"}, /* 2 x 10/25G */ + {0x6414, "Chelsio T61100-OCP-SO"}, /* 1 x 40/50/100G, nomem */ + {0x6415, "Chelsio T6201-BT"}, /* 2 x 1000BASE-T */ + + /* Custom */ + {0x6480, "Chelsio T6225 80"}, + {0x6481, "Chelsio T62100 81"}, }; #ifdef TCP_OFFLOAD Modified: stable/10/sys/dev/cxgbe/t4_vf.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_vf.c Thu May 25 01:00:57 2017 (r318843) +++ stable/10/sys/dev/cxgbe/t4_vf.c Thu May 25 01:01:35 2017 (r318844) @@ -114,11 +114,25 @@ struct { {0x5813, "Chelsio T580-CHR VF"}, #endif }, t6vf_pciids[] = { + {0x6800, "Chelsio T6-DBG-25 VF"}, /* 2 x 10/25G, debug */ {0x6801, "Chelsio T6225-CR VF"}, /* 2 x 10/25G */ {0x6802, "Chelsio T6225-SO-CR VF"}, /* 2 x 10/25G, nomem */ + {0x6803, "Chelsio T6425-CR VF"}, /* 4 x 10/25G */ + {0x6804, "Chelsio T6425-SO-CR VF"}, /* 4 x 10/25G, nomem */ + {0x6805, "Chelsio T6225-OCP-SO VF"}, /* 2 x 10/25G, nomem */ + {0x6806, "Chelsio T62100-OCP-SO VF"}, /* 2 x 40/50/100G, nomem */ {0x6807, "Chelsio T62100-LP-CR VF"}, /* 2 x 40/50/100G */ {0x6808, "Chelsio T62100-SO-CR VF"}, /* 2 x 40/50/100G, nomem */ + {0x6809, "Chelsio T6210-BT VF"}, /* 2 x 10GBASE-T */ {0x680d, "Chelsio T62100-CR VF"}, /* 2 x 40/50/100G */ + {0x6810, "Chelsio T6-DBG-100 VF"}, /* 2 x 40/50/100G, debug */ + {0x6811, "Chelsio T6225-LL-CR VF"}, /* 2 x 10/25G */ + {0x6814, "Chelsio T61100-OCP-SO VF"}, /* 1 x 40/50/100G, nomem */ + {0x6815, "Chelsio T6201-BT VF"}, /* 2 x 1000BASE-T */ + + /* Custom */ + {0x6880, "Chelsio T6225 80 VF"}, + {0x6881, "Chelsio T62100 81 VF"}, }; static d_ioctl_t t4vf_ioctl; From owner-svn-src-stable-10@freebsd.org Thu May 25 01:31:13 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED1E7D7C790; Thu, 25 May 2017 01:31:13 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9C38199C; Thu, 25 May 2017 01:31:13 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P1VChe031782; Thu, 25 May 2017 01:31:12 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P1VCIP031781; Thu, 25 May 2017 01:31:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705250131.v4P1VCIP031781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 May 2017 01:31:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318849 - in stable: 10/release 11/release X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:31:14 -0000 Author: gjb Date: Thu May 25 01:31:12 2017 New Revision: 318849 URL: https://svnweb.freebsd.org/changeset/base/318849 Log: MFC r308737, r308779: r308737: Pass SWAPSIZE in env(1) when invoking mk-vmimage.sh, otherwise mkimg(1) does not create the second partition after r307008. r308779: Pass SWAPSIZE in env(1) when invoking mk-vmimage.sh for the vm-image target, missed in r308737. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile.vm Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/release/Makefile.vm Directory Properties: stable/11/ (props changed) Modified: stable/10/release/Makefile.vm ============================================================================== --- stable/10/release/Makefile.vm Thu May 25 01:17:07 2017 (r318848) +++ stable/10/release/Makefile.vm Thu May 25 01:31:12 2017 (r318849) @@ -58,7 +58,7 @@ ${_CW:tu}CONF?= ${.CURDIR}/tools/${_CW:t cw-${_CW:tl}: mkdir -p ${.OBJDIR}/${.TARGET} - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ -i ${.OBJDIR}/${_CW:tl}.img -s ${VMSIZE} -f ${${_CW}_FORMAT} \ @@ -101,7 +101,7 @@ vm-image: .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) . for FORMAT in ${VMFORMATS} mkdir -p ${.OBJDIR}/${.TARGET} - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ -i ${.OBJDIR}/${FORMAT}.img -s ${VMSIZE} -f ${FORMAT} \ From owner-svn-src-stable-10@freebsd.org Thu May 25 01:43:30 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39917D8042C; Thu, 25 May 2017 01:43:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A6001C28; Thu, 25 May 2017 01:43:29 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P1hTQX037730; Thu, 25 May 2017 01:43:29 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P1hS67037721; Thu, 25 May 2017 01:43:28 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705250143.v4P1hS67037721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 25 May 2017 01:43:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318851 - in stable/10/sys: conf dev/cxgbe dev/cxgbe/common modules/cxgbe/if_cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:43:30 -0000 Author: np Date: Thu May 25 01:43:28 2017 New Revision: 318851 URL: https://svnweb.freebsd.org/changeset/base/318851 Log: MFC r317702, r317847, r318307 r317702: cxgbe(4): Support routines for Tx traffic scheduling. - Create a new file, t4_sched.c, and move all of the code related to traffic management from t4_main.c and t4_sge.c to this file. - Track both Channel Rate Limiter (ch_rl) and Class Rate Limiter (cl_rl) parameters in the PF driver. - Initialize all the cl_rl limiters with somewhat arbitrary default rates and provide routines to update them on the fly. - Provide routines to reserve and release traffic classes. r317847: cxgbe(4): The Tx scheduler initialization either works or doesn't. It doesn't need a refresh in either case. r318307: cxgbe(4): Avoid an out of bounds access when an attempt to unbind a tx queue from a traffic class fails. Sponsored by: Chelsio Communications Added: stable/10/sys/dev/cxgbe/t4_sched.c - copied, changed from r317702, head/sys/dev/cxgbe/t4_sched.c Modified: stable/10/sys/conf/files stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/common/common.h stable/10/sys/dev/cxgbe/common/t4_hw.c stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/t4_sge.c stable/10/sys/dev/cxgbe/t4_vf.c stable/10/sys/modules/cxgbe/if_cxgbe/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Thu May 25 01:40:40 2017 (r318850) +++ stable/10/sys/conf/files Thu May 25 01:43:28 2017 (r318851) @@ -1151,6 +1151,8 @@ dev/cxgbe/t4_main.c optional cxgbe pci compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_netmap.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" +dev/cxgbe/t4_sched.c optional cxgbe pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_sge.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_l2t.c optional cxgbe pci \ Modified: stable/10/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/10/sys/dev/cxgbe/adapter.h Thu May 25 01:40:40 2017 (r318850) +++ stable/10/sys/dev/cxgbe/adapter.h Thu May 25 01:43:28 2017 (r318851) @@ -225,15 +225,36 @@ struct vi_info { uint8_t hw_addr[ETHER_ADDR_LEN]; /* factory MAC address, won't change */ }; +struct tx_ch_rl_params { + enum fw_sched_params_rate ratemode; /* %port (REL) or kbps (ABS) */ + uint32_t maxrate; +}; + enum { - /* tx_sched_class flags */ - TX_SC_OK = (1 << 0), /* Set up in hardware, active. */ + TX_CLRL_REFRESH = (1 << 0), /* Need to update hardware state. */ + TX_CLRL_ERROR = (1 << 1), /* Error, hardware state unknown. */ }; -struct tx_sched_class { +struct tx_cl_rl_params { int refcount; - int flags; - struct t4_sched_class_params params; + u_int flags; + enum fw_sched_params_rate ratemode; /* %port REL or ABS value */ + enum fw_sched_params_unit rateunit; /* kbps or pps (when ABS) */ + enum fw_sched_params_mode mode; /* aggr or per-flow */ + uint32_t maxrate; + uint16_t pktsize; +}; + +/* Tx scheduler parameters for a channel/port */ +struct tx_sched_params { + /* Channel Rate Limiter */ + struct tx_ch_rl_params ch_rl; + + /* Class WRR */ + /* XXX */ + + /* Class Rate Limiter */ + struct tx_cl_rl_params cl_rl[]; }; struct port_info { @@ -245,7 +266,7 @@ struct port_info { int up_vis; int uld_vis; - struct tx_sched_class *tc; /* traffic classes for this channel */ + struct tx_sched_params *sched_params; struct mtx pi_lock; char lockname[16]; @@ -817,6 +838,9 @@ struct adapter { struct memwin memwin[NUM_MEMWIN]; /* memory windows */ + struct mtx tc_lock; + struct task tc_task; + const char *last_op; const void *last_op_thr; int last_op_flags; @@ -1098,8 +1122,6 @@ int t4_detach_common(device_t); int t4_filter_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *); int t4_map_bars_0_and_4(struct adapter *); int t4_map_bar_2(struct adapter *); -int t4_set_sched_class(struct adapter *, struct t4_sched_params *); -int t4_set_sched_queue(struct adapter *, struct t4_sched_queue *); int t4_setup_intr_handlers(struct adapter *); void t4_sysctls(struct adapter *); int begin_synchronized_op(struct adapter *, struct vi_info *, int, char *); @@ -1160,6 +1182,15 @@ int t4_set_tracer(struct adapter *, stru int t4_trace_pkt(struct sge_iq *, const struct rss_header *, struct mbuf *); int t5_trace_pkt(struct sge_iq *, const struct rss_header *, struct mbuf *); +/* t4_sched.c */ +int t4_set_sched_class(struct adapter *, struct t4_sched_params *); +int t4_set_sched_queue(struct adapter *, struct t4_sched_queue *); +int t4_init_tx_sched(struct adapter *); +int t4_free_tx_sched(struct adapter *); +void t4_update_tx_sched(struct adapter *); +int t4_reserve_cl_rl_kbps(struct adapter *, int, u_int, int *); +void t4_release_cl_rl_kbps(struct adapter *, int, int); + static inline struct wrqe * alloc_wrqe(int wr_len, struct sge_wrq *wrq) { Modified: stable/10/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/10/sys/dev/cxgbe/common/common.h Thu May 25 01:40:40 2017 (r318850) +++ stable/10/sys/dev/cxgbe/common/common.h Thu May 25 01:43:28 2017 (r318851) @@ -774,6 +774,13 @@ int t4_sched_params(struct adapter *adap int rateunit, int ratemode, int channel, int cl, int minrate, int maxrate, int weight, int pktsize, int sleep_ok); +int t4_sched_params_ch_rl(struct adapter *adapter, int channel, int ratemode, + unsigned int maxrate, int sleep_ok); +int t4_sched_params_cl_wrr(struct adapter *adapter, int channel, int cl, + int weight, int sleep_ok); +int t4_sched_params_cl_rl_kbps(struct adapter *adapter, int channel, int cl, + int mode, unsigned int maxrate, int pktsize, + int sleep_ok); int t4_config_watchdog(struct adapter *adapter, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int timeout, unsigned int action); Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/10/sys/dev/cxgbe/common/t4_hw.c Thu May 25 01:40:40 2017 (r318850) +++ stable/10/sys/dev/cxgbe/common/t4_hw.c Thu May 25 01:43:28 2017 (r318851) @@ -9393,6 +9393,79 @@ int t4_sched_params(struct adapter *adap NULL, sleep_ok); } +int t4_sched_params_ch_rl(struct adapter *adapter, int channel, int ratemode, + unsigned int maxrate, int sleep_ok) +{ + struct fw_sched_cmd cmd; + + memset(&cmd, 0, sizeof(cmd)); + cmd.op_to_write = cpu_to_be32(V_FW_CMD_OP(FW_SCHED_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_WRITE); + cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); + + cmd.u.params.sc = FW_SCHED_SC_PARAMS; + cmd.u.params.type = FW_SCHED_TYPE_PKTSCHED; + cmd.u.params.level = FW_SCHED_PARAMS_LEVEL_CH_RL; + cmd.u.params.ch = channel; + cmd.u.params.rate = ratemode; /* REL or ABS */ + cmd.u.params.max = cpu_to_be32(maxrate);/* % or kbps */ + + return t4_wr_mbox_meat(adapter,adapter->mbox, &cmd, sizeof(cmd), + NULL, sleep_ok); +} + +int t4_sched_params_cl_wrr(struct adapter *adapter, int channel, int cl, + int weight, int sleep_ok) +{ + struct fw_sched_cmd cmd; + + if (weight < 0 || weight > 100) + return -EINVAL; + + memset(&cmd, 0, sizeof(cmd)); + cmd.op_to_write = cpu_to_be32(V_FW_CMD_OP(FW_SCHED_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_WRITE); + cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); + + cmd.u.params.sc = FW_SCHED_SC_PARAMS; + cmd.u.params.type = FW_SCHED_TYPE_PKTSCHED; + cmd.u.params.level = FW_SCHED_PARAMS_LEVEL_CL_WRR; + cmd.u.params.ch = channel; + cmd.u.params.cl = cl; + cmd.u.params.weight = cpu_to_be16(weight); + + return t4_wr_mbox_meat(adapter,adapter->mbox, &cmd, sizeof(cmd), + NULL, sleep_ok); +} + +int t4_sched_params_cl_rl_kbps(struct adapter *adapter, int channel, int cl, + int mode, unsigned int maxrate, int pktsize, int sleep_ok) +{ + struct fw_sched_cmd cmd; + + memset(&cmd, 0, sizeof(cmd)); + cmd.op_to_write = cpu_to_be32(V_FW_CMD_OP(FW_SCHED_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_WRITE); + cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); + + cmd.u.params.sc = FW_SCHED_SC_PARAMS; + cmd.u.params.type = FW_SCHED_TYPE_PKTSCHED; + cmd.u.params.level = FW_SCHED_PARAMS_LEVEL_CL_RL; + cmd.u.params.mode = mode; + cmd.u.params.ch = channel; + cmd.u.params.cl = cl; + cmd.u.params.unit = FW_SCHED_PARAMS_UNIT_BITRATE; + cmd.u.params.rate = FW_SCHED_PARAMS_RATE_ABS; + cmd.u.params.max = cpu_to_be32(maxrate); + cmd.u.params.pktsize = cpu_to_be16(pktsize); + + return t4_wr_mbox_meat(adapter,adapter->mbox, &cmd, sizeof(cmd), + NULL, sleep_ok); +} + /* * t4_config_watchdog - configure (enable/disable) a watchdog timer * @adapter: the adapter Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Thu May 25 01:40:40 2017 (r318850) +++ stable/10/sys/dev/cxgbe/t4_main.c Thu May 25 01:43:28 2017 (r318851) @@ -998,9 +998,6 @@ t4_attach(device_t dev) mtx_init(&pi->pi_lock, pi->lockname, 0, MTX_DEF); sc->chan_map[pi->tx_chan] = i; - pi->tc = malloc(sizeof(struct tx_sched_class) * - sc->chip_params->nsched_cls, M_CXGBE, M_ZERO | M_WAITOK); - if (port_top_speed(pi) >= 10) { n10g++; } else { @@ -1088,6 +1085,7 @@ t4_attach(device_t dev) M_ZERO | M_WAITOK); t4_init_l2t(sc, M_WAITOK); + t4_init_tx_sched(sc); /* * Second pass over the ports. This time we know the number of rx and @@ -1251,6 +1249,9 @@ t4_detach_common(device_t dev) for (i = 0; i < sc->intr_count; i++) t4_free_irq(sc, &sc->irq[i]); + if ((sc->flags & (IS_VF | FW_OK)) == FW_OK) + t4_free_tx_sched(sc); + for (i = 0; i < MAX_NPORTS; i++) { pi = sc->port[i]; if (pi) { @@ -1260,7 +1261,6 @@ t4_detach_common(device_t dev) mtx_destroy(&pi->pi_lock); free(pi->vi, M_CXGBE); - free(pi->tc, M_CXGBE); free(pi, M_CXGBE); } } @@ -5204,9 +5204,9 @@ cxgbe_sysctls(struct port_info *pi) * dev.(cxgbe|cxl).X.tc. */ oid = SYSCTL_ADD_NODE(ctx, children, OID_AUTO, "tc", CTLFLAG_RD, NULL, - "Tx scheduler traffic classes"); + "Tx scheduler traffic classes (cl_rl)"); for (i = 0; i < sc->chip_params->nsched_cls; i++) { - struct tx_sched_class *tc = &pi->tc[i]; + struct tx_cl_rl_params *tc = &pi->sched_params->cl_rl[i]; snprintf(name, sizeof(name), "%d", i); children2 = SYSCTL_CHILDREN(SYSCTL_ADD_NODE(ctx, @@ -7722,10 +7722,9 @@ static int sysctl_tc_params(SYSCTL_HANDLER_ARGS) { struct adapter *sc = arg1; - struct tx_sched_class *tc; - struct t4_sched_class_params p; + struct tx_cl_rl_params tc; struct sbuf *sb; - int i, rc, port_id, flags, mbps, gbps; + int i, rc, port_id, mbps, gbps; rc = sysctl_wire_old_buffer(req, 0); if (rc != 0) @@ -7740,52 +7739,34 @@ sysctl_tc_params(SYSCTL_HANDLER_ARGS) MPASS(sc->port[port_id] != NULL); i = arg2 & 0xffff; MPASS(i < sc->chip_params->nsched_cls); - tc = &sc->port[port_id]->tc[i]; - - rc = begin_synchronized_op(sc, NULL, HOLD_LOCK | SLEEP_OK | INTR_OK, - "t4tc_p"); - if (rc) - goto done; - flags = tc->flags; - p = tc->params; - end_synchronized_op(sc, LOCK_HELD); - if ((flags & TX_SC_OK) == 0) { - sbuf_printf(sb, "none"); - goto done; - } + mtx_lock(&sc->tc_lock); + tc = sc->port[port_id]->sched_params->cl_rl[i]; + mtx_unlock(&sc->tc_lock); - if (p.level == SCHED_CLASS_LEVEL_CL_WRR) { - sbuf_printf(sb, "cl-wrr weight %u", p.weight); - goto done; - } else if (p.level == SCHED_CLASS_LEVEL_CL_RL) - sbuf_printf(sb, "cl-rl"); - else if (p.level == SCHED_CLASS_LEVEL_CH_RL) - sbuf_printf(sb, "ch-rl"); - else { - rc = ENXIO; + if (tc.flags & TX_CLRL_ERROR) { + sbuf_printf(sb, "error"); goto done; } - if (p.ratemode == SCHED_CLASS_RATEMODE_REL) { + if (tc.ratemode == SCHED_CLASS_RATEMODE_REL) { /* XXX: top speed or actual link speed? */ gbps = port_top_speed(sc->port[port_id]); - sbuf_printf(sb, " %u%% of %uGbps", p.maxrate, gbps); - } - else if (p.ratemode == SCHED_CLASS_RATEMODE_ABS) { - switch (p.rateunit) { + sbuf_printf(sb, " %u%% of %uGbps", tc.maxrate, gbps); + } else if (tc.ratemode == SCHED_CLASS_RATEMODE_ABS) { + switch (tc.rateunit) { case SCHED_CLASS_RATEUNIT_BITS: - mbps = p.maxrate / 1000; - gbps = p.maxrate / 1000000; - if (p.maxrate == gbps * 1000000) + mbps = tc.maxrate / 1000; + gbps = tc.maxrate / 1000000; + if (tc.maxrate == gbps * 1000000) sbuf_printf(sb, " %uGbps", gbps); - else if (p.maxrate == mbps * 1000) + else if (tc.maxrate == mbps * 1000) sbuf_printf(sb, " %uMbps", mbps); else - sbuf_printf(sb, " %uKbps", p.maxrate); + sbuf_printf(sb, " %uKbps", tc.maxrate); break; case SCHED_CLASS_RATEUNIT_PKTS: - sbuf_printf(sb, " %upps", p.maxrate); + sbuf_printf(sb, " %upps", tc.maxrate); break; default: rc = ENXIO; @@ -7793,7 +7774,7 @@ sysctl_tc_params(SYSCTL_HANDLER_ARGS) } } - switch (p.mode) { + switch (tc.mode) { case SCHED_CLASS_MODE_CLASS: sbuf_printf(sb, " aggregate"); break; @@ -8695,225 +8676,6 @@ read_i2c(struct adapter *sc, struct t4_i return (rc); } -static int -in_range(int val, int lo, int hi) -{ - - return (val < 0 || (val <= hi && val >= lo)); -} - -static int -set_sched_class_config(struct adapter *sc, int minmax) -{ - int rc; - - if (minmax < 0) - return (EINVAL); - - rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4sscc"); - if (rc) - return (rc); - rc = -t4_sched_config(sc, FW_SCHED_TYPE_PKTSCHED, minmax, 1); - end_synchronized_op(sc, 0); - - return (rc); -} - -static int -set_sched_class_params(struct adapter *sc, struct t4_sched_class_params *p, - int sleep_ok) -{ - int rc, top_speed, fw_level, fw_mode, fw_rateunit, fw_ratemode; - struct port_info *pi; - struct tx_sched_class *tc; - - if (p->level == SCHED_CLASS_LEVEL_CL_RL) - fw_level = FW_SCHED_PARAMS_LEVEL_CL_RL; - else if (p->level == SCHED_CLASS_LEVEL_CL_WRR) - fw_level = FW_SCHED_PARAMS_LEVEL_CL_WRR; - else if (p->level == SCHED_CLASS_LEVEL_CH_RL) - fw_level = FW_SCHED_PARAMS_LEVEL_CH_RL; - else - return (EINVAL); - - if (p->mode == SCHED_CLASS_MODE_CLASS) - fw_mode = FW_SCHED_PARAMS_MODE_CLASS; - else if (p->mode == SCHED_CLASS_MODE_FLOW) - fw_mode = FW_SCHED_PARAMS_MODE_FLOW; - else - return (EINVAL); - - if (p->rateunit == SCHED_CLASS_RATEUNIT_BITS) - fw_rateunit = FW_SCHED_PARAMS_UNIT_BITRATE; - else if (p->rateunit == SCHED_CLASS_RATEUNIT_PKTS) - fw_rateunit = FW_SCHED_PARAMS_UNIT_PKTRATE; - else - return (EINVAL); - - if (p->ratemode == SCHED_CLASS_RATEMODE_REL) - fw_ratemode = FW_SCHED_PARAMS_RATE_REL; - else if (p->ratemode == SCHED_CLASS_RATEMODE_ABS) - fw_ratemode = FW_SCHED_PARAMS_RATE_ABS; - else - return (EINVAL); - - /* Vet our parameters ... */ - if (!in_range(p->channel, 0, sc->chip_params->nchan - 1)) - return (ERANGE); - - pi = sc->port[sc->chan_map[p->channel]]; - if (pi == NULL) - return (ENXIO); - MPASS(pi->tx_chan == p->channel); - top_speed = port_top_speed(pi) * 1000000; /* Gbps -> Kbps */ - - if (!in_range(p->cl, 0, sc->chip_params->nsched_cls) || - !in_range(p->minrate, 0, top_speed) || - !in_range(p->maxrate, 0, top_speed) || - !in_range(p->weight, 0, 100)) - return (ERANGE); - - /* - * Translate any unset parameters into the firmware's - * nomenclature and/or fail the call if the parameters - * are required ... - */ - if (p->rateunit < 0 || p->ratemode < 0 || p->channel < 0 || p->cl < 0) - return (EINVAL); - - if (p->minrate < 0) - p->minrate = 0; - if (p->maxrate < 0) { - if (p->level == SCHED_CLASS_LEVEL_CL_RL || - p->level == SCHED_CLASS_LEVEL_CH_RL) - return (EINVAL); - else - p->maxrate = 0; - } - if (p->weight < 0) { - if (p->level == SCHED_CLASS_LEVEL_CL_WRR) - return (EINVAL); - else - p->weight = 0; - } - if (p->pktsize < 0) { - if (p->level == SCHED_CLASS_LEVEL_CL_RL || - p->level == SCHED_CLASS_LEVEL_CH_RL) - return (EINVAL); - else - p->pktsize = 0; - } - - rc = begin_synchronized_op(sc, NULL, - sleep_ok ? (SLEEP_OK | INTR_OK) : HOLD_LOCK, "t4sscp"); - if (rc) - return (rc); - tc = &pi->tc[p->cl]; - tc->params = *p; - rc = -t4_sched_params(sc, FW_SCHED_TYPE_PKTSCHED, fw_level, fw_mode, - fw_rateunit, fw_ratemode, p->channel, p->cl, p->minrate, p->maxrate, - p->weight, p->pktsize, sleep_ok); - if (rc == 0) - tc->flags |= TX_SC_OK; - else { - /* - * Unknown state at this point, see tc->params for what was - * attempted. - */ - tc->flags &= ~TX_SC_OK; - } - end_synchronized_op(sc, sleep_ok ? 0 : LOCK_HELD); - - return (rc); -} - -int -t4_set_sched_class(struct adapter *sc, struct t4_sched_params *p) -{ - - if (p->type != SCHED_CLASS_TYPE_PACKET) - return (EINVAL); - - if (p->subcmd == SCHED_CLASS_SUBCMD_CONFIG) - return (set_sched_class_config(sc, p->u.config.minmax)); - - if (p->subcmd == SCHED_CLASS_SUBCMD_PARAMS) - return (set_sched_class_params(sc, &p->u.params, 1)); - - return (EINVAL); -} - -int -t4_set_sched_queue(struct adapter *sc, struct t4_sched_queue *p) -{ - struct port_info *pi = NULL; - struct vi_info *vi; - struct sge_txq *txq; - uint32_t fw_mnem, fw_queue, fw_class; - int i, rc; - - rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4setsq"); - if (rc) - return (rc); - - if (p->port >= sc->params.nports) { - rc = EINVAL; - goto done; - } - - /* XXX: Only supported for the main VI. */ - pi = sc->port[p->port]; - vi = &pi->vi[0]; - if (!(vi->flags & VI_INIT_DONE)) { - /* tx queues not set up yet */ - rc = EAGAIN; - goto done; - } - - if (!in_range(p->queue, 0, vi->ntxq - 1) || - !in_range(p->cl, 0, sc->chip_params->nsched_cls - 1)) { - rc = EINVAL; - goto done; - } - - /* - * Create a template for the FW_PARAMS_CMD mnemonic and value (TX - * Scheduling Class in this case). - */ - fw_mnem = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) | - V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DMAQ_EQ_SCHEDCLASS_ETH)); - fw_class = p->cl < 0 ? 0xffffffff : p->cl; - - /* - * If op.queue is non-negative, then we're only changing the scheduling - * on a single specified TX queue. - */ - if (p->queue >= 0) { - txq = &sc->sge.txq[vi->first_txq + p->queue]; - fw_queue = (fw_mnem | V_FW_PARAMS_PARAM_YZ(txq->eq.cntxt_id)); - rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, &fw_queue, - &fw_class); - goto done; - } - - /* - * Change the scheduling on all the TX queues for the - * interface. - */ - for_each_txq(vi, i, txq) { - fw_queue = (fw_mnem | V_FW_PARAMS_PARAM_YZ(txq->eq.cntxt_id)); - rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, &fw_queue, - &fw_class); - if (rc) - goto done; - } - - rc = 0; -done: - end_synchronized_op(sc, 0); - return (rc); -} - int t4_os_find_pci_capability(struct adapter *sc, int cap) { Copied and modified: stable/10/sys/dev/cxgbe/t4_sched.c (from r317702, head/sys/dev/cxgbe/t4_sched.c) ============================================================================== --- head/sys/dev/cxgbe/t4_sched.c Tue May 2 20:38:10 2017 (r317702, copy source) +++ stable/10/sys/dev/cxgbe/t4_sched.c Thu May 25 01:43:28 2017 (r318851) @@ -357,7 +357,6 @@ t4_init_tx_sched(struct adapter *sc) n * sizeof(*tc), M_CXGBE, M_ZERO | M_WAITOK); tc = &pi->sched_params->cl_rl[0]; for (j = 0; j < n; j++, tc++) { - tc->flags = TX_CLRL_REFRESH; tc->refcount = 0; tc->ratemode = FW_SCHED_PARAMS_RATE_ABS; tc->rateunit = FW_SCHED_PARAMS_UNIT_BITRATE; @@ -365,8 +364,11 @@ t4_init_tx_sched(struct adapter *sc) tc->maxrate = init_kbps[min(j, nitems(init_kbps) - 1)]; tc->pktsize = ETHERMTU; /* XXX */ - t4_sched_params_cl_rl_kbps(sc, pi->tx_chan, j, tc->mode, - tc->maxrate, tc->pktsize, 1); + if (t4_sched_params_cl_rl_kbps(sc, pi->tx_chan, j, + tc->mode, tc->maxrate, tc->pktsize, 1) == 0) + tc->flags = 0; + else + tc->flags = TX_CLRL_ERROR; } } Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Thu May 25 01:40:40 2017 (r318850) +++ stable/10/sys/dev/cxgbe/t4_sge.c Thu May 25 01:43:28 2017 (r318851) @@ -5187,7 +5187,7 @@ sysctl_tc(SYSCTL_HANDLER_ARGS) struct port_info *pi; struct adapter *sc; struct sge_txq *txq; - struct tx_sched_class *tc; + struct tx_cl_rl_params *tc; int qidx = arg2, rc, tc_idx; uint32_t fw_queue, fw_class; @@ -5201,14 +5201,14 @@ sysctl_tc(SYSCTL_HANDLER_ARGS) if (rc != 0 || req->newptr == NULL) return (rc); + if (sc->flags & IS_VF) + return (EPERM); + /* Note that -1 is legitimate input (it means unbind). */ if (tc_idx < -1 || tc_idx >= sc->chip_params->nsched_cls) return (EINVAL); - rc = begin_synchronized_op(sc, vi, SLEEP_OK | INTR_OK, "t4stc"); - if (rc) - return (rc); - + mtx_lock(&sc->tc_lock); if (tc_idx == txq->tc_idx) { rc = 0; /* No change, nothing to do. */ goto done; @@ -5222,35 +5222,45 @@ sysctl_tc(SYSCTL_HANDLER_ARGS) fw_class = 0xffffffff; /* Unbind. */ else { /* - * Bind to a different class. Ethernet txq's are only allowed - * to bind to cl-rl mode-class for now. XXX: too restrictive. + * Bind to a different class. */ - tc = &pi->tc[tc_idx]; - if (tc->flags & TX_SC_OK && - tc->params.level == SCHED_CLASS_LEVEL_CL_RL && - tc->params.mode == SCHED_CLASS_MODE_CLASS) { - /* Ok to proceed. */ - fw_class = tc_idx; - } else { - rc = tc->flags & TX_SC_OK ? EBUSY : ENXIO; + tc = &pi->sched_params->cl_rl[tc_idx]; + if (tc->flags & TX_CLRL_ERROR) { + /* Previous attempt to set the cl-rl params failed. */ + rc = EIO; goto done; + } else { + /* + * Ok to proceed. Place a reference on the new class + * while still holding on to the reference on the + * previous class, if any. + */ + fw_class = tc_idx; + tc->refcount++; } } + mtx_unlock(&sc->tc_lock); + rc = begin_synchronized_op(sc, vi, SLEEP_OK | INTR_OK, "t4stc"); + if (rc) + return (rc); rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, &fw_queue, &fw_class); + end_synchronized_op(sc, 0); + + mtx_lock(&sc->tc_lock); if (rc == 0) { if (txq->tc_idx != -1) { - tc = &pi->tc[txq->tc_idx]; + tc = &pi->sched_params->cl_rl[txq->tc_idx]; MPASS(tc->refcount > 0); tc->refcount--; } - if (tc_idx != -1) { - tc = &pi->tc[tc_idx]; - tc->refcount++; - } txq->tc_idx = tc_idx; + } else if (tc_idx != -1) { + tc = &pi->sched_params->cl_rl[tc_idx]; + MPASS(tc->refcount > 0); + tc->refcount--; } done: - end_synchronized_op(sc, 0); + mtx_unlock(&sc->tc_lock); return (rc); } Modified: stable/10/sys/dev/cxgbe/t4_vf.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_vf.c Thu May 25 01:40:40 2017 (r318850) +++ stable/10/sys/dev/cxgbe/t4_vf.c Thu May 25 01:43:28 2017 (r318851) @@ -675,9 +675,6 @@ t4vf_attach(device_t dev) mtx_init(&pi->pi_lock, pi->lockname, 0, MTX_DEF); sc->chan_map[pi->tx_chan] = i; - pi->tc = malloc(sizeof(struct tx_sched_class) * - sc->chip_params->nsched_cls, M_CXGBE, M_ZERO | M_WAITOK); - if (port_top_speed(pi) >= 10) { n10g++; } else { Modified: stable/10/sys/modules/cxgbe/if_cxgbe/Makefile ============================================================================== --- stable/10/sys/modules/cxgbe/if_cxgbe/Makefile Thu May 25 01:40:40 2017 (r318850) +++ stable/10/sys/modules/cxgbe/if_cxgbe/Makefile Thu May 25 01:43:28 2017 (r318851) @@ -20,6 +20,7 @@ SRCS+= t4_l2t.c SRCS+= t4_main.c SRCS+= t4_mp_ring.c SRCS+= t4_netmap.c +SRCS+= t4_sched.c SRCS+= t4_sge.c SRCS+= t4_tracer.c From owner-svn-src-stable-10@freebsd.org Thu May 25 01:45:44 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B39B6D806DB; Thu, 25 May 2017 01:45:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65D681208; Thu, 25 May 2017 01:45:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P1jh8Q038228; Thu, 25 May 2017 01:45:43 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P1jhi5038226; Thu, 25 May 2017 01:45:43 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705250145.v4P1jhi5038226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 May 2017 01:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318853 - in stable: 10/release 10/release/scripts 11/release 11/release/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 01:45:44 -0000 Author: gjb Date: Thu May 25 01:45:43 2017 New Revision: 318853 URL: https://svnweb.freebsd.org/changeset/base/318853 Log: MFC r318646: Allow PORTSDIR to be overridden in the pkg-stage target. PR: 218393 Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile stable/10/release/scripts/pkg-stage.sh Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/release/Makefile stable/11/release/scripts/pkg-stage.sh Directory Properties: stable/11/ (props changed) Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Thu May 25 01:43:39 2017 (r318852) +++ stable/10/release/Makefile Thu May 25 01:45:43 2017 (r318853) @@ -307,7 +307,7 @@ packagesystem: base.txz kernel.txz ${EXT pkg-stage: .if !defined(NOPKG) - env REPOS_DIR=${.CURDIR}/pkg_repos/ \ + env PORTSDIR=${PORTSDIR} REPOS_DIR=${.CURDIR}/pkg_repos/ \ sh ${.CURDIR}/scripts/pkg-stage.sh mkdir -p ${.OBJDIR}/dvd/packages/repos/ cp ${.CURDIR}/scripts/FreeBSD_install_cdrom.conf \ Modified: stable/10/release/scripts/pkg-stage.sh ============================================================================== --- stable/10/release/scripts/pkg-stage.sh Thu May 25 01:43:39 2017 (r318852) +++ stable/10/release/scripts/pkg-stage.sh Thu May 25 01:45:43 2017 (r318853) @@ -10,6 +10,7 @@ export PKG_DBDIR="/tmp/pkg" export PERMISSIVE="YES" export REPO_AUTOUPDATE="NO" export PKGCMD="/usr/sbin/pkg -d" +export PORTSDIR="${PORTSDIR:-/usr/ports}" _DVD_PACKAGES="archivers/unzip devel/subversion @@ -32,8 +33,8 @@ x11/kde4 x11/xorg" # If NOPORTS is set for the release, do not attempt to build pkg(8). -if [ ! -f /usr/ports/Makefile ]; then - echo "*** /usr/ports is missing! ***" +if [ ! -f ${PORTSDIR}/Makefile ]; then + echo "*** ${PORTSDIR} is missing! ***" echo "*** Skipping pkg-stage.sh ***" echo "*** Unset NOPORTS to fix this ***" exit 0 @@ -41,7 +42,7 @@ fi if [ ! -x /usr/local/sbin/pkg ]; then /etc/rc.d/ldconfig restart - /usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean + /usr/bin/make -C ${PORTSDIR}/ports-mgmt/pkg install clean fi export DVD_DIR="dvd/packages" @@ -57,7 +58,7 @@ fi # Ensure the ports listed in _DVD_PACKAGES exist to sanitize the # final list. for _P in ${_DVD_PACKAGES}; do - if [ -d "/usr/ports/${_P}" ]; then + if [ -d "${PORTSDIR}/${_P}" ]; then DVD_PACKAGES="${DVD_PACKAGES} ${_P}" else echo "*** Skipping nonexistent port: ${_P}" From owner-svn-src-stable-10@freebsd.org Thu May 25 02:00:38 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C277D801E8; Thu, 25 May 2017 02:00:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 692F413C0; Thu, 25 May 2017 02:00:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P20b3K043692; Thu, 25 May 2017 02:00:37 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P20bsZ043689; Thu, 25 May 2017 02:00:37 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705250200.v4P20bsZ043689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 25 May 2017 02:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318855 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 02:00:38 -0000 Author: np Date: Thu May 25 02:00:37 2017 New Revision: 318855 URL: https://svnweb.freebsd.org/changeset/base/318855 Log: MFC r318014, r318091, r318125, and r318263. r318014: cxgbe(4): Fixes related to the knob that controls link autonegotiation. - Do not leak the adapter lock in sysctl_autoneg. - Accept only 0 or 1 as valid settings for autonegotiation. - A fixed speed must be requested by the driver when autonegotiation is disabled otherwise the firmware will reject the l1cfg command. Use the top speed supported by the port for now. r318091: cxgbe(4): Do not assume that if_qflush is always followed by inteface-down. r318125: Adjust whitespace and fix a comment. No functional change. r318263: cxgbe(4): netmap-only interrupts for a VI do not have an associated rxq or ofld_rxq and should be ignored by vi_intr_iq. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/10/sys/dev/cxgbe/adapter.h Thu May 25 01:59:58 2017 (r318854) +++ stable/10/sys/dev/cxgbe/adapter.h Thu May 25 02:00:37 2017 (r318855) @@ -198,11 +198,11 @@ struct vi_info { int first_intr; /* These need to be int as they are used in sysctl */ - int ntxq; /* # of tx queues */ - int first_txq; /* index of first tx queue */ - int rsrv_noflowq; /* Reserve queue 0 for non-flowid packets */ - int nrxq; /* # of rx queues */ - int first_rxq; /* index of first rx queue */ + int ntxq; /* # of tx queues */ + int first_txq; /* index of first tx queue */ + int rsrv_noflowq; /* Reserve queue 0 for non-flowid packets */ + int nrxq; /* # of rx queues */ + int first_rxq; /* index of first rx queue */ int nofldtxq; /* # of offload tx queues */ int first_ofld_txq; /* index of first offload tx queue */ int nofldrxq; /* # of offload rx queues */ @@ -391,6 +391,7 @@ enum { EQ_TYPEMASK = 0x3, /* 2 lsbits hold the type (see above) */ EQ_ALLOCATED = (1 << 2), /* firmware resources allocated */ EQ_ENABLED = (1 << 3), /* open for business */ + EQ_QFLUSH = (1 << 4), /* if_qflush in progress */ }; /* Listed in order of preference. Update t4_sysctls too if you change these */ @@ -696,7 +697,7 @@ struct sge_nm_txq { struct sge { int nrxq; /* total # of Ethernet rx queues */ - int ntxq; /* total # of Ethernet tx tx queues */ + int ntxq; /* total # of Ethernet tx queues */ int nofldrxq; /* total # of TOE rx queues */ int nofldtxq; /* total # of TOE tx queues */ int nnmrxq; /* total # of netmap rx queues */ @@ -1078,6 +1079,24 @@ port_top_speed(const struct port_info *p } static inline int +port_top_speed_raw(const struct port_info *pi) +{ + + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_100G) + return (FW_PORT_CAP_SPEED_100G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_40G) + return (FW_PORT_CAP_SPEED_40G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_25G) + return (FW_PORT_CAP_SPEED_25G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_10G) + return (FW_PORT_CAP_SPEED_10G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_1G) + return (FW_PORT_CAP_SPEED_1G); + + return (0); +} + +static inline int tx_resume_threshold(struct sge_eq *eq) { Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Thu May 25 01:59:58 2017 (r318854) +++ stable/10/sys/dev/cxgbe/t4_main.c Thu May 25 02:00:37 2017 (r318855) @@ -983,6 +983,7 @@ t4_attach(device_t dev) lc->autoneg = t4_autoneg ? AUTONEG_ENABLE : AUTONEG_DISABLE; } + lc->requested_speed = port_top_speed_raw(pi); rc = -t4_link_l1cfg(sc, sc->mbox, pi->tx_chan, lc); if (rc != 0) { @@ -1794,12 +1795,15 @@ cxgbe_qflush(struct ifnet *ifp) if (vi->flags & VI_INIT_DONE) { for_each_txq(vi, i, txq) { TXQ_LOCK(txq); - txq->eq.flags &= ~EQ_ENABLED; + txq->eq.flags |= EQ_QFLUSH; TXQ_UNLOCK(txq); while (!mp_ring_is_idle(txq->r)) { mp_ring_check_drainage(txq->r, 0); pause("qflush", 1); } + TXQ_LOCK(txq); + txq->eq.flags &= ~EQ_QFLUSH; + TXQ_UNLOCK(txq); } } if_qflush(ifp); @@ -5738,7 +5742,12 @@ sysctl_autoneg(SYSCTL_HANDLER_ARGS) if ((lc->supported & FW_PORT_CAP_ANEG) == 0) return (ENOTSUP); - val = val ? AUTONEG_ENABLE : AUTONEG_DISABLE; + if (val == 0) + val = AUTONEG_DISABLE; + else if (val == 1) + val = AUTONEG_ENABLE; + else + return (EINVAL); if (lc->autoneg == val) return (0); /* no change */ @@ -5751,6 +5760,7 @@ sysctl_autoneg(SYSCTL_HANDLER_ARGS) rc = -t4_link_l1cfg(sc, sc->mbox, pi->tx_chan, lc); if (rc != 0) lc->autoneg = old; + end_synchronized_op(sc, 0); return (rc); } Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Thu May 25 01:59:58 2017 (r318854) +++ stable/10/sys/dev/cxgbe/t4_sge.c Thu May 25 02:00:37 2017 (r318855) @@ -947,6 +947,11 @@ vi_intr_iq(struct vi_info *vi, int idx) return (&sc->sge.fwq); nintr = vi->nintr; +#ifdef DEV_NETMAP + /* Do not consider any netmap-only interrupts */ + if (vi->flags & INTR_RXQ && vi->nnmrxq > vi->nrxq) + nintr -= vi->nnmrxq - vi->nrxq; +#endif KASSERT(nintr != 0, ("%s: vi %p has no exclusive interrupts, total interrupts = %d", __func__, vi, sc->intr_count)); @@ -2396,6 +2401,13 @@ cannot_use_txpkts(struct mbuf *m) return (needs_tso(m)); } +static inline int +discard_tx(struct sge_eq *eq) +{ + + return ((eq->flags & (EQ_ENABLED | EQ_QFLUSH)) != EQ_ENABLED); +} + /* * r->items[cidx] to r->items[pidx], with a wraparound at r->size, are ready to * be consumed. Return the actual number consumed. 0 indicates a stall. @@ -2421,7 +2433,7 @@ eth_tx(struct mp_ring *r, u_int cidx, u_ total = 0; TXQ_LOCK(txq); - if (__predict_false((eq->flags & EQ_ENABLED) == 0)) { + if (__predict_false(discard_tx(eq))) { while (cidx != pidx) { m0 = r->items[cidx]; m_freem(m0); From owner-svn-src-stable-10@freebsd.org Thu May 25 09:34:30 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABCADD81D46; Thu, 25 May 2017 09:34:30 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D50D1A62; Thu, 25 May 2017 09:34:30 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4P9YTWB033058; Thu, 25 May 2017 09:34:29 GMT (envelope-from jlh@FreeBSD.org) Received: (from jlh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4P9YT6S033057; Thu, 25 May 2017 09:34:29 GMT (envelope-from jlh@FreeBSD.org) Message-Id: <201705250934.v4P9YT6S033057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jlh set sender to jlh@FreeBSD.org using -f From: Jeremie Le Hen Date: Thu, 25 May 2017 09:34:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318865 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 09:34:30 -0000 Author: jlh Date: Thu May 25 09:34:29 2017 New Revision: 318865 URL: https://svnweb.freebsd.org/changeset/base/318865 Log: MFC r318863: Replace stale handbook URL with the proper oneb. Modified: stable/10/UPDATING Directory Properties: stable/10/ (props changed) Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Thu May 25 09:27:33 2017 (r318864) +++ stable/10/UPDATING Thu May 25 09:34:29 2017 (r318865) @@ -6,7 +6,7 @@ COMMON ITEMS: section later in the file. basically know what you are doing. If not, then please consult the FreeBSD handbook: - http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html + https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-src.html Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. From owner-svn-src-stable-10@freebsd.org Thu May 25 17:23:28 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C41AD814B2; Thu, 25 May 2017 17:23:28 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8DCE18BB; Thu, 25 May 2017 17:23:27 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PHNQjw028044; Thu, 25 May 2017 17:23:26 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PHNQb0028042; Thu, 25 May 2017 17:23:26 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201705251723.v4PHNQb0028042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Thu, 25 May 2017 17:23:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318886 - stable/10/sys/netpfil/ipfw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 17:23:28 -0000 Author: truckman Date: Thu May 25 17:23:26 2017 New Revision: 318886 URL: https://svnweb.freebsd.org/changeset/base/318886 Log: MFC r318511 The result of right shifting a negative signed value is implementation defined. On machines without arithmetic shift instructions, zero bits may be shifted in from the left, giving a large positive result instead of the desired divide-by power-of-2. Fix this by operating on the absolute value and compensating for the possible negation later. Reverse the order of the underflow/overflow tests and the exponential decay calculation to avoid the possibility of an erroneous overflow detection if p is a sufficiently small non-negative value. Also check for negative values of prob before doing the exponential decay to avoid another instance of of right shifting a negative value. Tested by: Rasool Al-Saadi Modified: stable/10/sys/netpfil/ipfw/dn_aqm_pie.c stable/10/sys/netpfil/ipfw/dn_sched_fq_pie.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/ipfw/dn_aqm_pie.c ============================================================================== --- stable/10/sys/netpfil/ipfw/dn_aqm_pie.c Thu May 25 17:22:13 2017 (r318885) +++ stable/10/sys/netpfil/ipfw/dn_aqm_pie.c Thu May 25 17:23:26 2017 (r318886) @@ -206,6 +206,7 @@ calculate_drop_prob(void *x) int64_t p, prob, oldprob; struct dn_aqm_pie_parms *pprms; struct pie_status *pst = (struct pie_status *) x; + int p_isneg; pprms = pst->parms; prob = pst->drop_prob; @@ -221,6 +222,12 @@ calculate_drop_prob(void *x) ((int64_t)pst->current_qdelay - (int64_t)pprms->qdelay_ref); p +=(int64_t) pprms->beta * ((int64_t)pst->current_qdelay - (int64_t)pst->qdelay_old); + + /* take absolute value so right shift result is well defined */ + p_isneg = p < 0; + if (p_isneg) { + p = -p; + } /* We PIE_MAX_PROB shift by 12-bits to increase the division precision */ p *= (PIE_MAX_PROB << 12) / AQM_TIME_1S; @@ -243,37 +250,47 @@ calculate_drop_prob(void *x) oldprob = prob; - /* Cap Drop adjustment */ - if ((pprms->flags & PIE_CAPDROP_ENABLED) && prob >= PIE_MAX_PROB / 10 - && p > PIE_MAX_PROB / 50 ) - p = PIE_MAX_PROB / 50; + if (p_isneg) { + prob = prob - p; - prob = prob + p; - - /* decay the drop probability exponentially */ - if (pst->current_qdelay == 0 && pst->qdelay_old == 0) - /* 0.98 ~= 1- 1/64 */ - prob = prob - (prob >> 6); + /* check for multiplication underflow */ + if (prob > oldprob) { + prob= 0; + D("underflow"); + } + } else { + /* Cap Drop adjustment */ + if ((pprms->flags & PIE_CAPDROP_ENABLED) && + prob >= PIE_MAX_PROB / 10 && + p > PIE_MAX_PROB / 50 ) { + p = PIE_MAX_PROB / 50; + } + prob = prob + p; - /* check for multiplication overflow/underflow */ - if (p>0) { + /* check for multiplication overflow */ if (proboldprob) { - prob= 0; - D("underflow"); - } - /* make drop probability between 0 and PIE_MAX_PROB*/ - if (prob < 0) + /* + * decay the drop probability exponentially + * and restrict it to range 0 to PIE_MAX_PROB + */ + if (prob < 0) { prob = 0; - else if (prob > PIE_MAX_PROB) - prob = PIE_MAX_PROB; + } else { + if (pst->current_qdelay == 0 && pst->qdelay_old == 0) { + /* 0.98 ~= 1- 1/64 */ + prob = prob - (prob >> 6); + } + + if (prob > PIE_MAX_PROB) { + prob = PIE_MAX_PROB; + } + } pst->drop_prob = prob; Modified: stable/10/sys/netpfil/ipfw/dn_sched_fq_pie.c ============================================================================== --- stable/10/sys/netpfil/ipfw/dn_sched_fq_pie.c Thu May 25 17:22:13 2017 (r318885) +++ stable/10/sys/netpfil/ipfw/dn_sched_fq_pie.c Thu May 25 17:23:26 2017 (r318886) @@ -377,6 +377,7 @@ fq_calculate_drop_prob(void *x) struct dn_aqm_pie_parms *pprms; int64_t p, prob, oldprob; aqm_time_t now; + int p_isneg; now = AQM_UNOW; pprms = pst->parms; @@ -393,6 +394,12 @@ fq_calculate_drop_prob(void *x) ((int64_t)pst->current_qdelay - (int64_t)pprms->qdelay_ref); p +=(int64_t) pprms->beta * ((int64_t)pst->current_qdelay - (int64_t)pst->qdelay_old); + + /* take absolute value so right shift result is well defined */ + p_isneg = p < 0; + if (p_isneg) { + p = -p; + } /* We PIE_MAX_PROB shift by 12-bits to increase the division precision */ p *= (PIE_MAX_PROB << 12) / AQM_TIME_1S; @@ -415,37 +422,47 @@ fq_calculate_drop_prob(void *x) oldprob = prob; - /* Cap Drop adjustment */ - if ((pprms->flags & PIE_CAPDROP_ENABLED) && prob >= PIE_MAX_PROB / 10 - && p > PIE_MAX_PROB / 50 ) - p = PIE_MAX_PROB / 50; + if (p_isneg) { + prob = prob - p; - prob = prob + p; - - /* decay the drop probability exponentially */ - if (pst->current_qdelay == 0 && pst->qdelay_old == 0) - /* 0.98 ~= 1- 1/64 */ - prob = prob - (prob >> 6); + /* check for multiplication underflow */ + if (prob > oldprob) { + prob= 0; + D("underflow"); + } + } else { + /* Cap Drop adjustment */ + if ((pprms->flags & PIE_CAPDROP_ENABLED) && + prob >= PIE_MAX_PROB / 10 && + p > PIE_MAX_PROB / 50 ) { + p = PIE_MAX_PROB / 50; + } + prob = prob + p; - /* check for multiplication over/under flow */ - if (p>0) { + /* check for multiplication overflow */ if (proboldprob) { - prob= 0; - D("underflow"); - } - /* make drop probability between 0 and PIE_MAX_PROB*/ - if (prob < 0) + /* + * decay the drop probability exponentially + * and restrict it to range 0 to PIE_MAX_PROB + */ + if (prob < 0) { prob = 0; - else if (prob > PIE_MAX_PROB) - prob = PIE_MAX_PROB; + } else { + if (pst->current_qdelay == 0 && pst->qdelay_old == 0) { + /* 0.98 ~= 1- 1/64 */ + prob = prob - (prob >> 6); + } + + if (prob > PIE_MAX_PROB) { + prob = PIE_MAX_PROB; + } + } pst->drop_prob = prob; From owner-svn-src-stable-10@freebsd.org Thu May 25 22:41:36 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FABCD8099C; Thu, 25 May 2017 22:41:36 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FF961B79; Thu, 25 May 2017 22:41:36 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4PMfZjg063287; Thu, 25 May 2017 22:41:35 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4PMfZcv063285; Thu, 25 May 2017 22:41:35 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201705252241.v4PMfZcv063285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Thu, 25 May 2017 22:41:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318905 - stable/10/sys/netpfil/ipfw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 22:41:36 -0000 Author: truckman Date: Thu May 25 22:41:34 2017 New Revision: 318905 URL: https://svnweb.freebsd.org/changeset/base/318905 Log: MFC r318527 Fix the queue delay estimation in PIE/FQ-PIE when the timestamp (TS) method is used. When packet timestamp is used, the "current_qdelay" keeps storing the last queue delay value calculated in the dequeue function. Therefore, when a burst of packets arrives followed by a pause, the "current_qdelay" will store a high value caused by the burst and stick to that value during the pause because the queue delay measurement is done inside the dequeue function. This causes the drop probability calculation function to calculate high drop probability value instead of zero and prevents the burst allowance mechanism from working properly. Fix this problem by resetting "current_qdelay" inside the drop probability calculation function when the queue length is zero and TS option is used. Submitted by: Rasool Al-Saadi Modified: stable/10/sys/netpfil/ipfw/dn_aqm_pie.c stable/10/sys/netpfil/ipfw/dn_sched_fq_pie.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/ipfw/dn_aqm_pie.c ============================================================================== --- stable/10/sys/netpfil/ipfw/dn_aqm_pie.c Thu May 25 22:39:48 2017 (r318904) +++ stable/10/sys/netpfil/ipfw/dn_aqm_pie.c Thu May 25 22:41:34 2017 (r318905) @@ -211,11 +211,16 @@ calculate_drop_prob(void *x) pprms = pst->parms; prob = pst->drop_prob; - /* calculate current qdelay */ - if (pprms->flags & PIE_DEPRATEEST_ENABLED) { + /* calculate current qdelay using DRE method. + * If TS is used and no data in the queue, reset current_qdelay + * as it stays at last value during dequeue process. + */ + if (pprms->flags & PIE_DEPRATEEST_ENABLED) pst->current_qdelay = ((uint64_t)pst->pq->ni.len_bytes * pst->avg_dq_time) >> PIE_DQ_THRESHOLD_BITS; - } + else + if (!pst->pq->ni.len_bytes) + pst->current_qdelay = 0; /* calculate drop probability */ p = (int64_t)pprms->alpha * Modified: stable/10/sys/netpfil/ipfw/dn_sched_fq_pie.c ============================================================================== --- stable/10/sys/netpfil/ipfw/dn_sched_fq_pie.c Thu May 25 22:39:48 2017 (r318904) +++ stable/10/sys/netpfil/ipfw/dn_sched_fq_pie.c Thu May 25 22:41:34 2017 (r318905) @@ -383,11 +383,16 @@ fq_calculate_drop_prob(void *x) pprms = pst->parms; prob = pst->drop_prob; - /* calculate current qdelay */ - if (pprms->flags & PIE_DEPRATEEST_ENABLED) { + /* calculate current qdelay using DRE method. + * If TS is used and no data in the queue, reset current_qdelay + * as it stays at last value during dequeue process. + */ + if (pprms->flags & PIE_DEPRATEEST_ENABLED) pst->current_qdelay = ((uint64_t)q->stats.len_bytes * pst->avg_dq_time) >> PIE_DQ_THRESHOLD_BITS; - } + else + if (!q->stats.len_bytes) + pst->current_qdelay = 0; /* calculate drop probability */ p = (int64_t)pprms->alpha * From owner-svn-src-stable-10@freebsd.org Fri May 26 00:26:10 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5987FD7AE67; Fri, 26 May 2017 00:26:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 294F61FE2; Fri, 26 May 2017 00:26:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4Q0Q9VI004792; Fri, 26 May 2017 00:26:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4Q0Q9ol004791; Fri, 26 May 2017 00:26:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705260026.v4Q0Q9ol004791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 26 May 2017 00:26:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318910 - stable/10/cddl/contrib/opensolaris/lib/libzpool/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 00:26:10 -0000 Author: mav Date: Fri May 26 00:26:08 2017 New Revision: 318910 URL: https://svnweb.freebsd.org/changeset/base/318910 Log: MFC r318516: Fix time handling in cv_timedwait_hires(). pthread_cond_timedwait() receives absolute time, not relative. Passing wrong time there caused two threads of zdb to spin in a tight loop. Modified: stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Fri May 26 00:25:08 2017 (r318909) +++ stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Fri May 26 00:26:08 2017 (r318910) @@ -363,7 +363,7 @@ cv_timedwait_hires(kcondvar_t *cv, kmute int flag) { int error; - timestruc_t ts; + timespec_t ts; hrtime_t delta; ASSERT(flag == 0 || flag == CALLOUT_FLAG_ABSOLUTE); @@ -376,8 +376,13 @@ top: if (delta <= 0) return (-1); - ts.tv_sec = delta / NANOSEC; - ts.tv_nsec = delta % NANOSEC; + clock_gettime(CLOCK_REALTIME, &ts); + ts.tv_sec += delta / NANOSEC; + ts.tv_nsec += delta % NANOSEC; + if (ts.tv_nsec >= NANOSEC) { + ts.tv_sec++; + ts.tv_nsec -= NANOSEC; + } ASSERT(mutex_owner(mp) == curthread); mp->m_owner = NULL; From owner-svn-src-stable-10@freebsd.org Fri May 26 13:09:17 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC738D8161A; Fri, 26 May 2017 13:09:17 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C8A31DCF; Fri, 26 May 2017 13:09:17 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QD9GHs018887; Fri, 26 May 2017 13:09:16 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QD9GWn018886; Fri, 26 May 2017 13:09:16 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705261309.v4QD9GWn018886@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 26 May 2017 13:09:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318949 - stable/10/tools/build/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 13:09:17 -0000 Author: gjb Date: Fri May 26 13:09:16 2017 New Revision: 318949 URL: https://svnweb.freebsd.org/changeset/base/318949 Log: MFC r318748: Honor WITHOUT_TFTP for check-old* and delete-old* targets. PR: 217949 Sponsored by: The FreeBSD Foundation Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri May 26 13:06:13 2017 (r318948) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri May 26 13:09:16 2017 (r318949) @@ -5308,6 +5308,13 @@ OLD_FILES+=${TESTS_FILES} . endif .endif # Test suite. +.if ${MK_TFTP} == no +OLD_FILES+=usr/bin/tftp +OLD_FILES+=usr/libexec/tftpd +OLD_FILES+=usr/share/man/man1/tftp.1.gz +OLD_FILES+=usr/share/man/man8/tftpd.8.gz +.endif + #.if ${MK_TOOLCHAIN} == no # to be filled in #.endif From owner-svn-src-stable-10@freebsd.org Fri May 26 19:02:48 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DD87D83AF5; Fri, 26 May 2017 19:02:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A2561FEF; Fri, 26 May 2017 19:02:47 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4QJ2l34067290; Fri, 26 May 2017 19:02:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4QJ2loW067289; Fri, 26 May 2017 19:02:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705261902.v4QJ2loW067289@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 26 May 2017 19:02:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318963 - in stable: 10/release/tools 11/release/tools X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 19:02:48 -0000 Author: gjb Date: Fri May 26 19:02:46 2017 New Revision: 318963 URL: https://svnweb.freebsd.org/changeset/base/318963 Log: MFC r314935 (thompsa): Change ec2.conf to use the pkg tool from a chroot rather than trying to bootstrap it and fail from the livecd readonly filesystem. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/tools/ec2.conf Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/release/tools/ec2.conf Directory Properties: stable/11/ (props changed) Modified: stable/10/release/tools/ec2.conf ============================================================================== --- stable/10/release/tools/ec2.conf Fri May 26 17:44:47 2017 (r318962) +++ stable/10/release/tools/ec2.conf Fri May 26 19:02:46 2017 (r318963) @@ -32,7 +32,8 @@ vm_extra_pre_umount() { # catalogue and install or update pkg when the instance first # launches, so these files would just be replaced anyway; removing # them from the image allows it to boot faster. - env ASSUME_ALWAYS_YES=yes pkg -c ${DESTDIR} delete -f -y pkg + chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ + /usr/sbin/pkg delete -f -y pkg rm ${DESTDIR}/var/db/pkg/repo-*.sqlite # The size of the EC2 root disk can be configured at instance launch From owner-svn-src-stable-10@freebsd.org Sat May 27 08:18:01 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50F82D84EF3; Sat, 27 May 2017 08:18:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2931C165D; Sat, 27 May 2017 08:18:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4R8I09n089098; Sat, 27 May 2017 08:18:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4R8HxU1089091; Sat, 27 May 2017 08:17:59 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705270817.v4R8HxU1089091@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 27 May 2017 08:17:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318977 - in stable/10/sys: arm/arm x86/x86 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 08:18:01 -0000 Author: hselasky Date: Sat May 27 08:17:59 2017 New Revision: 318977 URL: https://svnweb.freebsd.org/changeset/base/318977 Log: MFC r318353: Avoid use of contiguous memory allocations in busdma when possible. This patch improves the boundary checks in busdma to allow more cases using the regular page based kernel memory allocator. Especially in the case of having a non-zero boundary in the parent DMA tag. For example AMD64 based platforms set the PCI DMA tag boundary to PCI_DMA_BOUNDARY, 4GB, which before this patch caused contiguous memory allocations to be preferred when allocating more than PAGE_SIZE bytes. Even if the required alignment was less than PAGE_SIZE bytes. This patch also fixes the nsegments check for using kmem_alloc_attr() when the maximum segment size is less than PAGE_SIZE bytes. Updated some comments describing the code in question. Differential Revision: https://reviews.freebsd.org/D10645 Reviewed by: kib, jhb, gallatin, scottl Sponsored by: Mellanox Technologies Modified: stable/10/sys/arm/arm/busdma_machdep-v6.c stable/10/sys/arm/arm/busdma_machdep.c stable/10/sys/x86/x86/busdma_bounce.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- stable/10/sys/arm/arm/busdma_machdep-v6.c Sat May 27 07:47:52 2017 (r318976) +++ stable/10/sys/arm/arm/busdma_machdep-v6.c Sat May 27 08:17:59 2017 (r318977) @@ -780,7 +780,9 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi * (the allocator aligns buffers to their size boundaries). * - There's no need to handle lowaddr/highaddr exclusion zones. * else allocate non-contiguous pages if... - * - The page count that could get allocated doesn't exceed nsegments. + * - The page count that could get allocated doesn't exceed + * nsegments also when the maximum segment size is less + * than PAGE_SIZE. * - The alignment constraint isn't larger than a page boundary. * - There are no boundary-crossing constraints. * else allocate a block of contiguous pages because one or more of the @@ -789,8 +791,10 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi if (bufzone != NULL && dmat->alignment <= bufzone->size && !exclusion_bounce(dmat)) { *vaddr = uma_zalloc(bufzone->umazone, mflags); - } else if (dmat->nsegments >= btoc(dmat->maxsize) && - dmat->alignment <= PAGE_SIZE && dmat->boundary == 0) { + } else if (dmat->nsegments >= + howmany(dmat->maxsize, MIN(dmat->maxsegsz, PAGE_SIZE)) && + dmat->alignment <= PAGE_SIZE && + (dmat->boundary % PAGE_SIZE) == 0) { *vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->maxsize, mflags, 0, dmat->lowaddr, memattr); } else { Modified: stable/10/sys/arm/arm/busdma_machdep.c ============================================================================== --- stable/10/sys/arm/arm/busdma_machdep.c Sat May 27 07:47:52 2017 (r318976) +++ stable/10/sys/arm/arm/busdma_machdep.c Sat May 27 08:17:59 2017 (r318977) @@ -749,8 +749,10 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi if (bufzone != NULL && dmat->alignment <= bufzone->size && !_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr)) { vaddr = uma_zalloc(bufzone->umazone, mflags); - } else if (dmat->nsegments >= btoc(dmat->maxsize) && - dmat->alignment <= PAGE_SIZE && dmat->boundary == 0) { + } else if (dmat->nsegments >= + howmany(dmat->maxsize, MIN(dmat->maxsegsz, PAGE_SIZE)) && + dmat->alignment <= PAGE_SIZE && + (dmat->boundary % PAGE_SIZE) == 0) { vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->maxsize, mflags, 0, dmat->lowaddr, memattr); } else { Modified: stable/10/sys/x86/x86/busdma_bounce.c ============================================================================== --- stable/10/sys/x86/x86/busdma_bounce.c Sat May 27 07:47:52 2017 (r318976) +++ stable/10/sys/x86/x86/busdma_bounce.c Sat May 27 08:17:59 2017 (r318977) @@ -400,23 +400,36 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dm else attr = VM_MEMATTR_DEFAULT; - /* - * XXX: - * (dmat->alignment <= dmat->maxsize) is just a quick hack; the exact - * alignment guarantees of malloc need to be nailed down, and the - * code below should be rewritten to take that into account. + /* + * Allocate the buffer from the malloc(9) allocator if... + * - It's small enough to fit into a single power of two sized bucket. + * - The alignment is less than or equal to the maximum size + * - The low address requirement is fulfilled. + * else allocate non-contiguous pages if... + * - The page count that could get allocated doesn't exceed + * nsegments also when the maximum segment size is less + * than PAGE_SIZE. + * - The alignment constraint isn't larger than a page boundary. + * - There are no boundary-crossing constraints. + * else allocate a block of contiguous pages because one or more of the + * constraints is something that only the contig allocator can fulfill. + * + * NOTE: The (dmat->common.alignment <= dmat->maxsize) check + * below is just a quick hack. The exact alignment guarantees + * of malloc(9) need to be nailed down, and the code below + * should be rewritten to take that into account. * - * In the meantime, we'll warn the user if malloc gets it wrong. + * In the meantime warn the user if malloc gets it wrong. */ if ((dmat->common.maxsize <= PAGE_SIZE) && (dmat->common.alignment <= dmat->common.maxsize) && dmat->common.lowaddr >= ptoa((vm_paddr_t)Maxmem) && attr == VM_MEMATTR_DEFAULT) { *vaddr = malloc(dmat->common.maxsize, M_DEVBUF, mflags); - } else if (dmat->common.nsegments >= btoc(dmat->common.maxsize) && + } else if (dmat->common.nsegments >= + howmany(dmat->common.maxsize, MIN(dmat->common.maxsegsz, PAGE_SIZE)) && dmat->common.alignment <= PAGE_SIZE && - (dmat->common.boundary == 0 || - dmat->common.boundary >= dmat->common.lowaddr)) { + (dmat->common.boundary % PAGE_SIZE) == 0) { /* Page-based multi-segment allocations allowed */ *vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->common.maxsize, mflags, 0ul, dmat->common.lowaddr, From owner-svn-src-stable-10@freebsd.org Sat May 27 08:27:13 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AE9BD8129D; Sat, 27 May 2017 08:27:13 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E61CE1C7F; Sat, 27 May 2017 08:27:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4R8RB1t093060; Sat, 27 May 2017 08:27:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4R8RBqp093058; Sat, 27 May 2017 08:27:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705270827.v4R8RBqp093058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 27 May 2017 08:27:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318979 - in stable/10/sys: dev/sound/pcm tools/sound X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 08:27:13 -0000 Author: hselasky Date: Sat May 27 08:27:11 2017 New Revision: 318979 URL: https://svnweb.freebsd.org/changeset/base/318979 Log: MFC r318820: Increase the allowed maximum number of audio channels from 31 to 127 in the PCM feeder mixer. Without this change a value of 32 channels is treated like zero, due to using a mask of 0x1f, causing a kernel assert when trying to playback bitperfect 32-channel audio. Also update the AWK script which is generating the division tables to handle more than 18 channels. This commit complements r282650. Modified: stable/10/sys/dev/sound/pcm/feeder_mixer.c stable/10/sys/tools/sound/snd_fxdiv_gen.awk Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/pcm/feeder_mixer.c ============================================================================== --- stable/10/sys/dev/sound/pcm/feeder_mixer.c Sat May 27 08:25:08 2017 (r318978) +++ stable/10/sys/dev/sound/pcm/feeder_mixer.c Sat May 27 08:27:11 2017 (r318979) @@ -131,10 +131,10 @@ static struct feed_mixer_info feed_mixer sizeof(feed_mixer_info_tab[0]))) #define FEEDMIXER_DATA(i, c) ((void *) \ - ((uintptr_t)((((i) & 0x1f) << 5) | \ - ((c) & 0x1f)))) -#define FEEDMIXER_INFOIDX(d) ((uint32_t)((uintptr_t)(d) >> 5) & 0x1f) -#define FEEDMIXER_CHANNELS(d) ((uint32_t)((uintptr_t)(d)) & 0x1f) + ((uintptr_t)((((i) & 0x1f) << 7) | \ + ((c) & 0x7f)))) +#define FEEDMIXER_INFOIDX(d) ((uint32_t)((uintptr_t)(d) >> 7) & 0x1f) +#define FEEDMIXER_CHANNELS(d) ((uint32_t)((uintptr_t)(d)) & 0x7f) static int feed_mixer_init(struct pcm_feeder *f) Modified: stable/10/sys/tools/sound/snd_fxdiv_gen.awk ============================================================================== --- stable/10/sys/tools/sound/snd_fxdiv_gen.awk Sat May 27 08:25:08 2017 (r318978) +++ stable/10/sys/tools/sound/snd_fxdiv_gen.awk Sat May 27 08:27:11 2017 (r318979) @@ -74,7 +74,7 @@ BEGIN { FXSHIFT = 16; FXONE = shl(1, FXSHIFT); - SND_CHN_MAX = 18; + SND_CHN_MAX = 127; PCM_8_BPS = 1; PCM_16_BPS = 2; @@ -103,9 +103,9 @@ BEGIN { printf("/*\n"); printf(" * Fast unsigned 32bit integer division and rounding, accurate for\n"); printf(" * x = 1 - %d. This table should be enough to handle possible\n", FXONE); - printf(" * division for 1 - 72 (more can be generated though..).\n"); + printf(" * division for 1 - 508 (more can be generated though..).\n"); printf(" *\n"); - printf(" * 72 = SND_CHN_MAX * PCM_32_BPS, which is why....\n"); + printf(" * 508 = SND_CHN_MAX * PCM_32_BPS, which is why....\n"); printf(" */\n\n"); printf("static const uint32_t snd_fxdiv_table[][2] = {\n"); From owner-svn-src-stable-10@freebsd.org Sat May 27 11:21:22 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 066F0D83E0C; Sat, 27 May 2017 11:21:22 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C625818B5; Sat, 27 May 2017 11:21:21 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RBLKl2063641; Sat, 27 May 2017 11:21:20 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RBLK4s063640; Sat, 27 May 2017 11:21:20 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705271121.v4RBLK4s063640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 27 May 2017 11:21:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318984 - stable/10/share/misc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 11:21:22 -0000 Author: bapt Date: Sat May 27 11:21:20 2017 New Revision: 318984 URL: https://svnweb.freebsd.org/changeset/base/318984 Log: MFC r318900: update pci_vendors to 2017.05.25 Modified: stable/10/share/misc/pci_vendors Directory Properties: stable/10/ (props changed) Modified: stable/10/share/misc/pci_vendors ============================================================================== --- stable/10/share/misc/pci_vendors Sat May 27 11:12:11 2017 (r318983) +++ stable/10/share/misc/pci_vendors Sat May 27 11:21:20 2017 (r318984) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2017.04.03 -# Date: 2017-04-03 03:15:02 +# Version: 2017.05.25 +# Date: 2017-05-25 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -76,16 +76,16 @@ 0925 VIA Technologies, Inc. (Wrong ID) 0a89 BREA Technologies Inc 0b0b Rhino Equipment Corp. - 0105 Rhino R1T1 - 0205 Rhino R4FXO + 0105 R1T1 + 0205 R4FXO 0206 RCB4FXO 4-channel FXO analog telphony card - 0305 Rhino R4T1 - 0405 Rhino R8FXX + 0305 R4T1 + 0405 R8FXX 0406 RCB8FXX 8-channel modular analog telphony card - 0505 Rhino R24FXX + 0505 R24FXX 0506 RCB24FXS 24-Channel FXS analog telphony card - 0605 Rhino R2T1 - 0705 Rhino R24FXS + 0605 R2T1 + 0705 R24FXS 0706 RCB24FXO 24-Channel FXO analog telphony card 0905 R1T3 Single T3 Digital Telephony Card 0906 RCB24FXX 24-channel modular analog telphony card @@ -249,6 +249,7 @@ 0014 MegaRAID Tri-Mode SAS3516 1028 1fd4 PERC H745P MX 1d49 0602 ThinkSystem RAID 930-16i 4GB Flash PCIe 12Gb Adapter + 1d49 0604 ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter 0015 MegaRAID Tri-Mode SAS3416 0016 MegaRAID Tri-Mode SAS3508 1028 1fc9 PERC H840 Adapter @@ -430,6 +431,7 @@ 0062 SAS1078 PCI-Express Fusion-MPT SAS 1000 0062 SAS1078 PCI-Express Fusion-MPT SAS 0064 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] + 1000 30c0 SAS 9201-16i 0065 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] 006e SAS2308 PCI-Express Fusion-MPT SAS-2 0070 SAS2004 PCI-Express Fusion-MPT SAS-2 [Spitfire] @@ -544,6 +546,7 @@ 0097 SAS3008 PCI-Express Fusion-MPT SAS-3 1000 3090 SAS9311-8i 1000 30e0 SAS9300-8i + 1000 3130 SAS 9300-16i 1028 1f45 HBA330 Adapter 1028 1f46 12Gbps HBA 1028 1f53 HBA330 Mini @@ -1100,7 +1103,7 @@ 1028 0085 Rage 3D LT Pro 4c46 Rage Mobility 128 AGP 2X/Mobility M3 1002 0155 IBM Thinkpad A22p - 1014 0155 IBM Thinkpad A22p + 1014 0155 Thinkpad A22p 1028 00b1 Latitude C600 4c47 3D Rage IIC PCI / Mobility Radeon 7500/7500C 4c49 3D Rage LT PRO PCI @@ -2213,6 +2216,7 @@ 1043 04a8 Radeon RX 480 1043 04b0 Radeon RX 470 1043 04fb Radeon RX 480 + 1043 04fd Radeon RX 480 8GB 1462 3411 Radeon RX 470 1462 3413 Radeon RX 480 148c 2372 Radeon RX 480 @@ -2939,7 +2943,7 @@ 6985 Polaris12 6986 Polaris12 6987 Polaris12 - 699f Polaris12 + 699f Lexa PRO [Radeon RX 550] 700f RS100 AGP Bridge 7010 RS200/RS250 AGP Bridge 7100 R520 [Radeon X1800 XT] @@ -3955,6 +3959,7 @@ 1438 Liverpool Processor Root Port 1439 Family 16h Processor Functions 5:1 145b Zeppelin Non-Transparent Bridge + 145c USB3 Host Controller 1510 Family 14h Processor Root Complex 174b 1001 PURE Fusion Mini 1512 Family 14h Processor Root Port @@ -4039,6 +4044,7 @@ 43a1 Hudson PCI to PCI bridge (PCIE port 1) 43a2 Hudson PCI to PCI bridge (PCIE port 2) 43a3 Hudson PCI to PCI bridge (PCIE port 3) + 43bb USB 3.1 XHCI Controller 7006 AMD-751 [Irongate] System Controller 7007 AMD-751 [Irongate] AGP Bridge 700a AMD-IGR4 AGP Host to PCI Bridge @@ -6025,9 +6031,9 @@ 1077 e4f8 FastLinQ QL45611H 100GbE Adapter (SR-IOV VF) 2020 ISP2020A Fast!SCSI Basic Adapter 2031 ISP8324-based 16Gb Fibre Channel to PCI Express Adapter - 103c 17e7 HP SN1000Q 16Gb Single Port Fibre Channel Adapter - 103c 17e8 HP SN1000Q 16Gb Dual Port Fibre Channel Adapter - 103c 1939 HP QMH2672 16Gb Dual Port Fibre Channel Adapter + 103c 17e7 SN1000Q 16Gb Single Port Fibre Channel Adapter + 103c 17e8 SN1000Q 16Gb Dual Port Fibre Channel Adapter + 103c 1939 QMH2672 16Gb Dual Port Fibre Channel Adapter 103c 8002 3830C 16G Fibre Channel Host Bus Adapter 2071 ISP2714-based 16/32Gb Fibre Channel to PCIe Adapter 1077 0283 QLE2764 Quad Port 32Gb Fibre Channel to PCIe Adapter @@ -6047,10 +6053,10 @@ 1077 02a8 QLE2692 Dual Port 16Gb FC to PCIe Gen3 x8 Adapter 1077 02ab QLE2740 Single Port 32Gb FC to PCIe Gen3 x8 Adapter 1077 02ac QLE2742 Dual Port 32Gb FC to PCIe Gen3 x8 Adapter - 1590 00f9 HPE StoreFabric SN1100Q 16Gb Single Port Fibre Channel Host Bus Adapter - 1590 00fa HPE StoreFabric SN1100Q 16Gb Dual Port Fibre Channel Host Bus Adapter - 1590 0203 HPE StoreFabric SN1600Q 32Gb Single Port Fibre Channel Host Bus Adapter - 1590 0204 HPE StoreFabric SN1600Q 32Gb Dual Port Fibre Channel Host Bus Adapter + 1590 00f9 StoreFabric SN1100Q 16Gb Single Port Fibre Channel Host Bus Adapter + 1590 00fa StoreFabric SN1100Q 16Gb Dual Port Fibre Channel Host Bus Adapter + 1590 0203 StoreFabric SN1600Q 32Gb Single Port Fibre Channel Host Bus Adapter + 1590 0204 StoreFabric SN1600Q 32Gb Dual Port Fibre Channel Host Bus Adapter 2300 QLA2300 64-bit Fibre Channel Adapter 2312 ISP2312-based 2Gb Fibre Channel to PCI-X HBA 103c 0131 2Gb Fibre Channel - Single port [A7538A] @@ -6065,7 +6071,7 @@ 103c 3262 StorageWorks 81Q 103c 3263 StorageWorks 82Q 1077 0167 QME2572 Dual Port FC8 HBA Mezzanine - 1590 00fc HPE StoreFabric 84Q 8Gb Quad Port Fibre Channel Host Bus Adapter + 1590 00fc StoreFabric 84Q 8Gb Quad Port Fibre Channel Host Bus Adapter 3022 ISP4022-based Ethernet NIC 3032 ISP4032-based Ethernet IPv6 NIC 4010 ISP4010-based iSCSI TOE HBA @@ -8954,7 +8960,7 @@ 0396 G73 0397 G73M [GeForce Go 7700] 0398 G73M [GeForce Go 7600] - 1025 006c Acer 9814 WKMI + 1025 006c Aspire 9814WKMi 0399 G73M [GeForce Go 7600 GT] 039a G73M [Quadro NVS 300M] 039b G73M [GeForce Go 7900 SE] @@ -9912,6 +9918,7 @@ 0dfa GF108GLM [Quadro 1000M] 0dfc GF108GLM [NVS 5200M] 0e08 GF119 HDMI Audio Controller + 1043 83a0 ENGT520 SILENT # 1024MB with passive cooling (heatsink) 10b0 104a Gainward GeForce GT 610 0e09 GF110 High Definition Audio Controller @@ -10045,6 +10052,7 @@ 103a GK110GL [Quadro K6000] 103c GK110GL [Quadro K5200] 1040 GF119 [GeForce GT 520] + 1043 83a0 ENGT520 SILENT 1042 GF119 [GeForce 510] 1048 GF119 [GeForce 605] 1049 GF119 [GeForce GT 620 OEM] @@ -10694,6 +10702,7 @@ 17fd GM200GL [Tesla M40] 1b00 GP102 [TITAN X] 1b01 GP102 + 1b02 GP102 [TITAN Xp] 1b06 GP102 [GeForce GTX 1080 Ti] 1b30 GP102GL [Quadro P6000] 1b38 GP102GL [Tesla P40] @@ -10738,7 +10747,7 @@ 1cb1 GP107GL [Quardo P1000] 1cb2 GP107GL [Quardo P600] 1cb3 GP107GL [Quardo P400] - 1d01 GP108 + 1d01 GP108 [GeForce GT 1030] 1d81 GV100 10df Emulex Corporation 0720 OneConnect NIC (Skyhawk) @@ -10771,6 +10780,12 @@ e260 OneConnect FCoE Initiator (Lancer) e268 OneConnect 10Gb FCoE Converged Network Adapter (Lancer-VF) e300 Lancer Gen6: LPe32000 Fibre Channel Host Adapter + 10df e310 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e311 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e312 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e322 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e323 Lancer Gen6: LPe31000 Fibre Channel Host Adapter + 10df e325 Lancer Gen6: LPe31000 Fibre Channel Host Adapter f011 Saturn: LightPulse Fibre Channel Host Adapter f015 Saturn: LightPulse Fibre Channel Host Adapter f085 LP850 Fibre Channel Host Adapter @@ -11562,8 +11577,8 @@ 1043 8095 A7V8X Motherboard (Realtek ALC650 codec) 1043 80a1 A7V8X-X Motherboard 1043 80b0 A7V600/K8V-X/K8V Deluxe motherboard (ADI AD1980 codec [SoundMAX]) - 1043 80f3 ASUSTek SK8V motherboard - 1043 810d Asus P5VD1-X (AD1888 codec [SoundMax]) + 1043 80f3 SK8V motherboard + 1043 810d P5VD1-X (AD1888 codec [SoundMax]) 1043 812a A8V Deluxe motherboard (Realtek ALC850 codec) 10ec 8168 High Definition Audio 1106 3059 L7VMM2 Motherboard @@ -12248,7 +12263,7 @@ 0070 6701 WinTV HVR-1110 1019 4cb5 Elitegroup ECS TVP3XP FM1236 Tuner Card (NTSC,FM) 1043 0210 FlyTV mini Asus Digimatrix - 1043 4843 ASUS TV-FM 7133 + 1043 4843 TV-FM 7133 1043 4845 TV-FM 7135 1043 4862 P7131 Dual 1043 4876 My Cinema-P7131 Hybrid @@ -12322,7 +12337,7 @@ 0000 4071 Behold TV 407 FM 1019 4cb4 Elitegroup ECS TVP3XP FM1216 Tuner Card(PAL-BG,FM) 1043 0210 Digimatrix TV - 1043 4840 ASUS TV-FM 7134 + 1043 4840 TV-FM 7134 1043 4842 TV-FM 7134 1131 0000 SAA713x-based TV tuner card 1131 2004 EUROPA V3 reference design @@ -13039,7 +13054,7 @@ 103c 30c1 Compaq 6910p 1043 1237 A6J-Q008 1043 1967 V6800V - 1043 1987 Asus A4K and Z81K notebooks, possibly others ( mid-2005 machines ) + 1043 1987 A4K and Z81K notebooks, possibly others ( mid-2005 machines ) 104d 80df Vaio PCG-FX403 104d 80e7 VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP 104d 814e VAIO GRZ390Z @@ -13048,7 +13063,7 @@ 144d c00c P30/P35 notebook 14ef 0220 PCD-RP-220S 17aa 201c ThinkPad X60/X60s - 17aa 20c4 ThinkPad T61 + 17aa 20c4 ThinkPad T61/R61 17aa 20c6 ThinkPad R61 0477 RL5c477 0478 RL5c478 @@ -13098,7 +13113,7 @@ 103c 30cc Pavilion dv6700 103c 30cf Pavilion dv9668eg Laptop 1043 1237 A6J-Q008 - 1043 1967 ASUS V6800V + 1043 1967 V6800V 10f7 8338 Panasonic CF-Y5 laptop 144d c018 X20 IV 17aa 201d ThinkPad X60/X60s @@ -13114,14 +13129,15 @@ 103c 30c1 Compaq 6910p 103c 30cc Pavilion dv6700 103c 30cf Pavilion dv9668eg Laptop + 17aa 20c5 ThinkPad R61 17aa 20c7 ThinkPad R61 0841 R5C841 CardBus/SD/SDIO/MMC/MS/MSPro/xD/IEEE1394 0843 R5C843 MMC Host Controller 1025 0121 Aspire 5920G 1028 01d7 XPS M1210 1028 01f3 Inspiron 1420 - 1028 01f5 Dell Inspiron 1501 - 1028 024f Dell Latitude e6500 + 1028 01f5 Inspiron 1501 + 1028 024f Latitude e6500 103c 03b5 Presario V3242AU 103c 30b7 Presario V6133CL 103c 30cf Pavilion dv9500/9600/9700 series @@ -13144,9 +13160,11 @@ 1028 040a Latitude E6410 1028 040b Latitude E6510 e823 PCIe SDXC/MMC Host Controller + 17aa 21cf ThinkPad T520 e832 R5C832 PCIe IEEE 1394 Controller 1028 040a Latitude E6410 1028 040b Latitude E6510 + 17aa 21cf ThinkPad T520 e852 PCIe xD-Picture Card Controller 1181 Telmatics International 1183 Fujikura Ltd @@ -15143,7 +15161,7 @@ 0206 GPS180PEX GPS Receiver (PCI Express) 0207 GLN180PEX GPS/GLONASS receiver (PCI Express) 0208 GPS180AMC GPS Receiver (PCI Express / MicroTCA / AdvancedMC) - 0209 GRC181PEX GPS/GLONASS/BEIDOU receiver (PCI Express) + 0209 GNS181PEX GPS/Galileo/GLONASS/BEIDOU receiver (PCI Express) 0301 TCR510PCI IRIG Timecode Reader 0302 TCR167PCI IRIG Timecode Reader 0303 TCR511PCI IRIG Timecode Reader @@ -15746,8 +15764,8 @@ 1409 0103 PAR4008A 1409 0104 PAR4018A 140a DSP Research Inc -# Formerly RAMiX, Inc. -140b GE Intelligent Platforms +# Formerly RAMiX, GE Fanuc, GE Intelligent Platforms +140b Abaco Systems, Inc. 140c Elmic Systems Inc 140d Matsushita Electric Works Ltd 140e Goepel Electronic GmbH @@ -16062,6 +16080,7 @@ 509e T520-509E Unified Wire Ethernet Controller 509f T540-509F Unified Wire Ethernet Controller 50a0 T540-50A0 Unified Wire Ethernet Controller + 50a1 T540-50A1 Unified Wire Ethernet Controller 5401 T520-CR Unified Wire Ethernet Controller 5402 T522-CR Unified Wire Ethernet Controller 5403 T540-CR Unified Wire Ethernet Controller @@ -16113,6 +16132,7 @@ 549e T520-509E Unified Wire Ethernet Controller 549f T540-509F Unified Wire Ethernet Controller 54a0 T540-50A0 Unified Wire Ethernet Controller + 54a1 T540-50A1 Unified Wire Ethernet Controller 5501 T520-CR Unified Wire Storage Controller 5502 T522-CR Unified Wire Storage Controller 5503 T540-CR Unified Wire Storage Controller @@ -16164,6 +16184,7 @@ 559e T520-509E Unified Wire Storage Controller 559f T540-509F Unified Wire Storage Controller 55a0 T540-50A0 Unified Wire Storage Controller + 55a1 T540-50A1 Unified Wire Storage Controller 5601 T520-CR Unified Wire Storage Controller 5602 T522-CR Unified Wire Storage Controller 5603 T540-CR Unified Wire Storage Controller @@ -16215,6 +16236,7 @@ 569e T520-509E Unified Wire Storage Controller 569f T540-509F Unified Wire Storage Controller 56a0 T540-50A0 Unified Wire Storage Controller + 56a1 T540-50A1 Unified Wire Storage Controller 5701 T520-CR Unified Wire Ethernet Controller 5702 T522-CR Unified Wire Ethernet Controller 5703 T540-CR Unified Wire Ethernet Controller @@ -16305,6 +16327,7 @@ 589e T520-509E Unified Wire Ethernet Controller [VF] 589f T540-509F Unified Wire Ethernet Controller [VF] 58a0 T540-50A0 Unified Wire Ethernet Controller [VF] + 58a1 T540-50A1 Unified Wire Ethernet Controller [VF] 6001 T6225-CR Unified Wire Ethernet Controller 6002 T6225-SO-CR Unified Wire Ethernet Controller 6003 T6425-CR Unified Wire Ethernet Controller @@ -16470,6 +16493,8 @@ 1028 1fc2 Express Flash NVMe PM1725 1.6TB SFF 1028 1fc4 Express Flash NVMe PM1725 1.6TB AIC a822 NVMe SSD Controller 172Xa + 1014 0621 PCIe3 1.6TB NVMe Flash Adapter II x8 + 1014 0622 PCIe3 3.2TB NVMe Flash Adapter II x8 1028 1fd9 Express Flash PM1725a 800GB SFF 1028 1fda Express Flash PM1725a 1.6TB SFF 1028 1fdb Express Flash PM1725a 3.2TB SFF @@ -16663,7 +16688,10 @@ 14ca PE Logic Corp. 14cb Billionton Systems Inc 14cc NAKAYO Telecommunications Inc -14cd Universal Scientific Ind. +14cd Universal Global Scientific Industrial Co.,Ltd + 0001 USI-1514-1GbaseT [OCP1] + 0002 USI-4227-SFP [OCP2] + 0003 USI-X557-10GbaseT [OCP3] 14ce Whistle Communications 14cf TEK Microsystems Inc. 14d0 Ericsson Axe R & D @@ -16767,6 +16795,7 @@ 1028 02f1 PowerEdge R510 BCM5716 Gigabit Ethernet 163c NetXtreme II BCM5716S Gigabit Ethernet 163d NetXtreme II BCM57811 10-Gigabit Ethernet + 1043 858a PEB-10G/57811-1S 163e NetXtreme II BCM57811 10 Gigabit Ethernet Multi Function 163f NetXtreme II BCM57811 10-Gigabit Ethernet Virtual Function 1641 NetXtreme BCM57787 Gigabit Ethernet PCIe @@ -16892,7 +16921,7 @@ 1734 1061 PRIMERGY RX/TX S2 series onboard LAN 165a NetXtreme BCM5722 Gigabit Ethernet PCI Express # Dual NIC server - 1014 0378 IBM System x3350 (Machine type 4192) + 1014 0378 System x3350 (Machine type 4192) 1028 020f PowerEdge R300 Broadcom NetXtreme 5722 1028 0210 PowerEdge T300 Broadcom NetXtreme 5722 1028 0225 PowerEdge T105 Broadcom NetXtreme 5722 @@ -16992,6 +17021,7 @@ 1693 NetLink BCM5787M Gigabit Ethernet PCI Express 1025 0121 Aspire 5920G 103c 30c0 6710b + 17aa 20d5 ThinkPad R61 1694 NetLink BCM57790 Gigabit Ethernet PCIe 1696 NetXtreme BCM5782 Gigabit Ethernet 103c 12bc d530 CMT (DG746A) @@ -17128,6 +17158,8 @@ 16d5 BCM57407 NetXtreme-E 10GBase-T Ethernet Controller 16d6 BCM57412 NetXtreme-E 10Gb RDMA Ethernet Controller 16d7 BCM57414 NetXtreme-E 10Gb/25Gb RDMA Ethernet Controller + 14e4 1202 BCM957412M4122 OCP 1x25G Type1 wRoCE + 14e4 1404 BCM957414M4142 OCP 2x25G Type1 wRoCE 1590 020e Ethernet 25Gb 2-port 631SFP28 Adapter 1590 0211 Ethernet 25Gb 2-port 631FLR-SFP28 Adapter 16d8 BCM57416 NetXtreme-E 10GBase-T RDMA Ethernet Controller @@ -17622,7 +17654,7 @@ 1002 00f8 ATI TV Wonder Pro 1002 00f9 ATI TV Wonder 1002 a101 HDTV Wonder - 1043 4823 ASUS PVR-416 + 1043 4823 PVR-416 107d 6611 Winfast TV 2000XP Expert 107d 6613 Leadtek Winfast 2000XP Expert 107d 6620 Leadtek Winfast DV2000 @@ -17668,7 +17700,7 @@ 0070 9002 Nova-T DVB-T Model 909 0070 9402 WinTV-HVR1100 DVB-T/Hybrid 0070 9600 WinTV 88x MPEG Encoder - 1043 4823 ASUS PVR-416 + 1043 4823 PVR-416 107d 663c Leadtek PVR 2000 107d 665f WinFast DTV1000-T 14f1 0187 Conexant DVB-T reference design @@ -18099,6 +18131,18 @@ 103c 18ce InfiniBand QDR/EN 10Gb Dual Port 544M Adapter 103c 18cf InfiniBand FDR/EN 10/40Gb Dual Port 544M Adapter 103c 18d6 InfiniBand FDR/EN 10/40Gb Dual Port 544QSFP Adapter + 15b3 0025 ConnectX-3 IB QDR Dual Port Mezzanine Card + 15b3 0026 ConnectX-3 IB FDR Dual Port Mezzanine Card + 15b3 0059 ConnectX-3 VPI IB FDR/40 GbE Single Port QSFP+ Mezzanine Card + 15b3 0065 ConnectX-3 VPI IB FDR/40 GbE Dual Port QSFP+ Adapter + 15b3 0066 ConnectX-3 IB FDR10 Dual Port Mezzanine Card + 15b3 0067 ConnectX-3 VPI IB FDR/40 GbE Single Port QSFP+ Adapter + 15b3 0071 ConnectX-3 VPI IB FDR/40 GbE Dual Port QSFP+ Mezzanine Card +# SVID = 15B3 SSID = 0078 + 15b3 0078 ConnectX-3 10 GbE Dual Port KR Mezzanine Card + 15b3 0079 ConnectX-3 40 GbE Dual Port QSFP+ Adapter +# SVID = 15B3 SSID = 0080 + 15b3 0080 ConnectX-3 10 GbE Dual Port SFP+ Adapter 1004 MT27500/MT27520 Family [ConnectX-3/ConnectX-3 Pro Virtual Function] 1005 MT27510 Family 1006 MT27511 Family @@ -18111,6 +18155,9 @@ 117c 0091 FastFrame NQ42 117c 0092 FastFrame NQ11 117c 0093 FastFrame NQ12 + 15b3 0078 ConnectX-3 Pro 10 GbE Dual Port KR Mezzanine Card + 15b3 0079 ConnectX-3 Pro 40 GbE Dual Port QSFP+ Adapter + 15b3 0080 ConnectX-3 Pro 10 GbE Dual Port SFP+ Adapter 1009 MT27530 Family 100a MT27531 Family 100b MT27540 Family @@ -18122,8 +18169,16 @@ 1011 MT27600 [Connect-IB] 1012 MT27600 Family [Connect-IB Virtual Function] 1013 MT27700 Family [ConnectX-4] + 15b3 0006 MCX416A-BCAT, ConnectX-4 EN, 40/56GbE 2P, PCIe3.0 x16 + 15b3 0033 ConnectX-4 VPI IB EDR/100 GbE Single Port QSFP28 Adapter + 15b3 0034 ConnectX-4 VPI IB EDR/100 GbE Dual Port QSFP28 Adapter + 15b3 0050 ConnectX-4 100 GbE Dual Port QSFP28 Adapter 1014 MT27700 Family [ConnectX-4 Virtual Function] 1015 MT27710 Family [ConnectX-4 Lx] + 15b3 0016 ConnectX-4 Lx 25 GbE Dual Port SFP28 Adapter + 15b3 0020 MCX4411A-ACQN, ConnectX-4 Lx EN OCP, 1x25Gb + 15b3 0021 MCX4421A-ACQN ConnectX-4 Lx EN OCP,2x25G + 15b3 0025 ConnectX-4 Lx 25 GbE Dual Port SFP28 rNDC 1016 MT27710 Family [ConnectX-4 Lx Virtual Function] 1017 MT27800 Family [ConnectX-5] 1018 MT27800 Family [ConnectX-5 Virtual Function] @@ -18711,6 +18766,7 @@ 0033 AR958x 802.11abgn Wireless Network Adapter 168c a120 AR9582 802.11a/n WLAN Mini-PCIe Adapter 0034 AR9462 Wireless Network Adapter + 1028 020b Wireless 1601 802.11abgn Adapter 1028 0300 Wireless 1802 802.11abgn Adapter 1a56 2003 Killer Wireless-N 1202 Half-size Mini PCIe Card 0036 QCA9565 / AR9565 Wireless Network Adapter @@ -20220,7 +20276,12 @@ 1af4 1100 QEMU Virtual Machine 0006 PCI Rocker Ethernet switch device 0007 PCI SD Card Host Controller Interface + 0008 QEMU PCIe Host bridge + 0009 QEMU PCI Expander bridge 000a PCI-PCI bridge (multiseat) + 000b QEMU PCIe Expander bridge + 000c QEMU PCIe Root port + 000d QEMU XHCI Host Controller 0100 QXL paravirtual graphic card 1af4 1100 QEMU Virtual Machine 1b37 Signal Processing Devices Sweden AB @@ -20446,6 +20507,8 @@ 0006 ExaNIC X10-HPT 1cf7 Subspace Dynamics 1d00 Pure Storage +1d18 RME + 0001 Fireface UFX+ 1d1d CNEX Labs 1f1f QEMU NVM Express LightNVM Controller 2807 8800 series NVMe SSD @@ -20460,6 +20523,7 @@ 1d44 DPT a400 PM2x24/PM3224 1d49 Lenovo +1d4c Diamanti, Inc. 1d5c Fantasia Trading LLC 1d61 Technobox, Inc. 1d62 Nebbiolo Technologies @@ -21148,10 +21212,13 @@ 0001 I-30xx Scanner Interface 5555 Genroco, Inc 0003 TURBOstor HFP-832 [HiPPI NIC] + 3b00 Epiphan DVI2PCIe video capture card 5646 Vector Fabrics BV 5654 VoiceTronix Pty Ltd 5678 Dawicontrol Computersysteme GmbH 5700 Netpower +# alternately Extreme Engineering Solutions, Inc. +5845 X-ES, Inc. 584d AuzenTech Co., Ltd. 5851 Exacq Technologies 8008 tDVR8008 8-port video capture card @@ -21261,7 +21328,7 @@ 8086 1315 Centrino Wireless-N 1000 BGN 8086 1316 Centrino Wireless-N 1000 BG 0085 Centrino Advanced-N 6205 [Taylor Peak] - 8086 1311 Centrino Advanced-N 6205 AGN + 8086 1311 Centrino Advanced-N 6205 (802.11a/b/g/n) 8086 1316 Centrino Advanced-N 6205 ABG 0087 Centrino Advanced-N + WiMAX 6250 [Kilmer Peak] 8086 1301 Centrino Advanced-N + WiMAX 6250 2x2 AGN @@ -21307,6 +21374,7 @@ 1028 04da Vostro 3750 106b 00dc MacBookPro8,2 [Core i7, 15", 2011] 144d c652 NP300E5C series laptop + 17aa 21cf ThinkPad T520 0105 Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port 106b 00dc MacBookPro8,2 [Core i7, 15", 2011] 0106 2nd Generation Core Processor Family Integrated Graphics Controller @@ -21324,6 +21392,7 @@ 0122 2nd Generation Core Processor Family Integrated Graphics Controller 0126 2nd Generation Core Processor Family Integrated Graphics Controller 1028 04cc Vostro 3350 + 17aa 21cf ThinkPad T520 0150 Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller 1043 84ca P8 series motherboard 15d9 0624 X9SCM-F Motherboard @@ -22821,8 +22890,9 @@ 4c53 1090 Cx9/Vx9 mainboard 1462 82870P2 P64H2 Hot Plug Controller 1501 82567V-3 Gigabit Network Connection - 1502 82579LM Gigabit Network Connection + 1502 82579LM Gigabit Network Connection (Lewisville) 1028 04a3 Precision M4600 + 17aa 21ce ThinkPad T520 8086 357a Server Board S1200BTS 1503 82579V Gigabit Network Connection 1043 849c P8P67 Deluxe Motherboard @@ -22961,6 +23031,8 @@ 1059 0111 T4007 1GbE interface 1059 0120 T4008 1GbE interface 1059 0130 T4009 1GbE interface + 1059 0140 T2035 1GbE interface + 1059 0150 RD-01068 1GbE interface 1538 I210 Gigabit Network Connection 1539 I211 Gigabit Network Connection 153a Ethernet Connection I217-LM @@ -23021,8 +23093,8 @@ 1028 1f99 Ethernet 10G 4P X710/I350 rNDC 1028 1f9c Ethernet 10G 4P X710 SFP+ rNDC 103c 0000 Ethernet 10Gb 562SFP+ Adapter - 103c 22fc HP Ethernet 10Gb 2-port 562FLR-SFP+ Adapter - 103c 22fd HP Ethernet 10Gb 2-port 562SFP+ Adapter + 103c 22fc Ethernet 10Gb 2-port 562FLR-SFP+ Adapter + 103c 22fd Ethernet 10Gb 2-port 562SFP+ Adapter 1137 0000 Ethernet Converged NIC X710-DA 1137 013b Ethernet Converged NIC X710-DA4 1137 020a Ethernet Converged NIC X710-DA2 @@ -23044,9 +23116,11 @@ 8086 000a Ethernet Controller X710 for 10GbE SFP+ 8086 000b Ethernet Server Adapter X710-DA2 for OCP 8086 000d Ethernet Controller X710 for 10GbE SFP+ + 8086 000e Ethernet Server Adapter OCP X710-2 8086 0010 Ethernet Converged Network Adapter X710 8086 4005 Ethernet Controller X710 for 10GbE SFP+ 8086 4006 Ethernet Controller X710 for 10GbE SFP+ + 8086 4007 Ethernet Controller X710 for 10GbE SFP+ 1575 DSL6340 Thunderbolt 3 NHI [Alpine Ridge 2C 2015] 1576 DSL6340 Thunderbolt 3 Bridge [Alpine Ridge 2C 2015] 1577 DSL6540 Thunderbolt 3 NHI [Alpine Ridge 4C 2015] @@ -23060,6 +23134,7 @@ 1028 0000 Ethernet 10G X710-k bNDC 1028 1f98 Ethernet 10G 4P X710-k bNDC 1028 1f9e Ethernet 10G 2P X710-k bNDC + 1059 0150 RD-01068 10GbE-KR interface 1590 0000 Ethernet 2-port 563i Adapter 1590 00f8 Ethernet 2-port 563i Adapter 8086 0000 Ethernet Converged Network Adapter XL710-Q2 @@ -23087,8 +23162,8 @@ 108e 0000 Ethernet Controller X710 for 10GBASE-T 108e 4857 Ethernet Controller X710 for 10GBASE-T 1587 Ethernet Controller XL710 for 20GbE backplane - 103c 0000 HPE Ethernet 10/20Gb 2-port 660FLB Adapter - 103c 22fe HPE Ethernet 10/20Gb 2-port 660FLB Adapter + 103c 0000 Ethernet 10/20Gb 2-port 660FLB Adapter + 103c 22fe Ethernet 10/20Gb 2-port 660FLB Adapter 1588 Ethernet Controller XL710 for 20GbE backplane 103c 0000 Ethernet 10/20Gb 2-port 660M Adapter 103c 22ff Ethernet 10/20Gb 2-port 660M Adapter @@ -23099,6 +23174,7 @@ 8086 0001 Ethernet Converged Network Adapter X710-T4 8086 0002 Ethernet Converged Network Adapter X710-T4 8086 0003 Ethernet Converged Network Adapter X710-T + 8086 00a0 Ethernet Converged Network Adapter X710-T4 8086 1003 Ethernet Converged Network Adapter X710-T 158a Ethernet Controller XXV710 for 25GbE backplane 158b Ethernet Controller XXV710 for 25GbE SFP28 @@ -23111,6 +23187,7 @@ 8086 0006 Ethernet Network Adapter OCP XXV710-2 8086 0007 Ethernet Network Adapter OCP XXV710-1 8086 0008 Ethernet Network Adapter OCP XXV710-1 + 8086 4001 Ethernet Network Adapter XXV710-2 15a0 Ethernet Connection (2) I218-LM 15a1 Ethernet Connection (2) I218-V 15a2 Ethernet Connection (3) I218-LM @@ -23121,6 +23198,7 @@ 15a9 X552 Virtual Function 15aa Ethernet Connection X552 10 GbE Backplane 1059 0120 T4008 10GbE interface + 1059 0150 RD-01068 10GbE interface 15ab Ethernet Connection X552 10 GbE Backplane 15ac Ethernet Connection X552 10 GbE SFP+ 15ad Ethernet Connection X552/X557-AT 10GBASE-T @@ -23192,6 +23270,7 @@ 163b Broadwell-U Integrated Graphics 163d Broadwell-U Integrated Graphics 163e Broadwell-U Integrated Graphics + 1889 Ethernet Adaptive Virtual Function 1900 Skylake Host Bridge/DRAM Registers 1901 Skylake PCIe Controller (x16) 1902 HD Graphics 510 @@ -23294,37 +23373,43 @@ 1b48 82597EX 10GbE Ethernet Controller 8086 a01f PRO/10GbE LR Server Adapter 8086 a11f PRO/10GbE LR Server Adapter - 1c00 6 Series/C200 Series Chipset Family 4 port SATA IDE Controller - 1c01 6 Series/C200 Series Chipset Family 4 port SATA IDE Controller - 1c02 6 Series/C200 Series Chipset Family SATA AHCI Controller + 1c00 6 Series/C200 Series Chipset Family Desktop SATA Controller (IDE mode, ports 0-3) + 1c01 6 Series/C200 Series Chipset Family Mobile SATA Controller (IDE mode, ports 0-3) + 1c02 6 Series/C200 Series Chipset Family 6 port Desktop SATA AHCI Controller 1028 04aa XPS 8300 1043 844d P8 series motherboard 8086 7270 Server Board S1200BTS - 1c03 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller + 1c03 6 Series/C200 Series Chipset Family 6 port Mobile SATA AHCI Controller 1028 04a3 Precision M4600 1028 04b2 Vostro 3350 1028 04da Vostro 3750 + 17aa 21cf ThinkPad T520 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] - 1c04 6 Series/C200 Series Chipset Family SATA RAID Controller + 1c04 6 Series/C200 Series Desktop SATA RAID Controller 103c 3118 Smart Array B110i SATA RAID Controller - 1c05 6 Series/C200 Series Chipset Family SATA RAID Controller - 1c08 6 Series/C200 Series Chipset Family 2 port SATA IDE Controller - 1c09 6 Series/C200 Series Chipset Family 2 port SATA IDE Controller + 1c05 6 Series/C200 Series Mobile SATA RAID Controller + 1c06 Z68 Express Chipset SATA RAID Controller + 1c08 6 Series/C200 Series Chipset Family Desktop SATA Controller (IDE mode, ports 4-5) + 1c09 6 Series/C200 Series Chipset Family Mobile SATA Controller (IDE mode, ports 4-5) 1c10 6 Series/C200 Series Chipset Family PCI Express Root Port 1 1028 04aa XPS 8300 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c12 6 Series/C200 Series Chipset Family PCI Express Root Port 2 1028 04aa XPS 8300 + 17aa 21cf ThinkPad T520 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] 1c14 6 Series/C200 Series Chipset Family PCI Express Root Port 3 1028 04da Vostro 3750 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] 1c16 6 Series/C200 Series Chipset Family PCI Express Root Port 4 1028 04aa XPS 8300 + 17aa 21cf ThinkPad T520 1c18 6 Series/C200 Series Chipset Family PCI Express Root Port 5 1028 04da Vostro 3750 + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS 1c1a 6 Series/C200 Series Chipset Family PCI Express Root Port 6 1028 04da Vostro 3750 @@ -23340,6 +23425,7 @@ 1028 04da Vostro 3750 1043 8418 P8P67 Deluxe Motherboard 1043 841b P8H67 Series Motherboard + 17aa 21cf ThinkPad T520 # Realtek ALC888 audio codec 8086 2008 DQ67SW board 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] @@ -23349,6 +23435,7 @@ 1028 04b2 Vostro 3350 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c24 6 Series/C200 Series Chipset Family Thermal Management Controller 1c25 6 Series/C200 Series Chipset Family DMI to PCI Bridge @@ -23358,6 +23445,7 @@ 1028 04b2 Vostro 3350 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c27 6 Series/C200 Series Chipset Family USB Universal Host Controller #1 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] @@ -23369,6 +23457,7 @@ 1028 04b2 Vostro 3350 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Server Board S1200BTS / Apple MacBook Pro 8,1/8,2 1c33 6 Series/C200 Series Chipset Family LAN Controller 1c35 6 Series/C200 Series Chipset Family VECI Controller @@ -23378,6 +23467,7 @@ 1028 04b2 Vostro 3350 1028 04da Vostro 3750 1043 844d P8 series motherboard + 17aa 21cf ThinkPad T520 8086 7270 Apple MacBookPro8,2 [Core i7, 15", 2011] 1c3b 6 Series/C200 Series Chipset Family MEI Controller #2 1c3c 6 Series/C200 Series Chipset Family IDE-r Controller @@ -23405,6 +23495,7 @@ 1c4e Q67 Express Chipset Family LPC Controller 1c4f QM67 Express Chipset Family LPC Controller 1028 04a3 Precision M4600 + 17aa 21cf ThinkPad T520 1c50 B65 Express Chipset Family LPC Controller 1c51 6 Series/C200 Series Chipset Family LPC Controller 1c52 C202 Chipset Family LPC Controller @@ -23532,12 +23623,12 @@ 1e1e 7 Series/C210 Series Chipset Family PCI Express Root Port 8 1849 1e1e Motherboard 1e20 7 Series/C216 Chipset Family High Definition Audio Controller - 1028 054b Dell XPS One 2710 + 1028 054b XPS One 2710 1043 108d VivoBook X202EV 1043 1477 N56VZ 1043 1517 Zenbook Prime UX31A 1043 8415 P8H77-I Motherboard - 1043 8445 ASUS P8Z77-V LX Motherboard + 1043 8445 P8Z77-V LX Motherboard 144d c652 NP300E5C series laptop 1849 1898 Z77 Extreme4 motherboard 1e22 7 Series/C216 Chipset Family SMBus Controller @@ -23685,10 +23776,10 @@ 201c Sky Lake-E Non-Transparent Bridge Registers 2021 Sky Lake-E CBDMA Registers 2024 Sky Lake-E MM/Vt-d Configuration Registers - 2030 Sky Lake-E PCI Express Root Port 1A - 2031 Sky Lake-E PCI Express Root Port 1B - 2032 Sky Lake-E PCI Express Root Port 1C - 2033 Sky Lake-E PCI Express Root Port 1D + 2030 Sky Lake-E PCI Express Root Port A + 2031 Sky Lake-E PCI Express Root Port B + 2032 Sky Lake-E PCI Express Root Port C + 2033 Sky Lake-E PCI Express Root Port D 2035 Sky Lake-E RAS Configuration Registers 204c Sky Lake-E M3KTI Registers 204d Sky Lake-E M3KTI Registers @@ -24533,7 +24624,7 @@ 258a E7221 Integrated Graphics Controller 2590 Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller 1014 0575 ThinkPad X41 / Z60t - 1028 0182 Dell Latitude C610 + 1028 0182 Latitude C610 103c 0934 Compaq nw8240/nx8220 103c 099c NX6110/NC6120 104d 81b7 Vaio VGN-S3XP @@ -24822,7 +24913,7 @@ 1014 05b7 ThinkPad Z60t # based on the PTGD1-LA motherboard 103c 2a09 PufferM-UL8E - 1043 1173 Asus A6VC + 1043 1173 A6VC 1043 814e P5GD1-VW Mainboard 1462 7028 915P/G Neo2 1af4 1100 QEMU Virtual Machine @@ -24848,7 +24939,7 @@ 1028 0177 Dimension 8400 1028 0179 Optiplex GX280 1028 0182 Latitude D610 Laptop - 1028 0187 Dell Precision M70 Laptop + 1028 0187 Precision M70 Laptop 1028 0188 Inspiron 6000 laptop 103c 0934 Compaq nw8240/nx8220 103c 0944 Compaq NC6220 @@ -25222,7 +25313,7 @@ 103c 30a3 Compaq nw8440 103c 30d5 530 Laptop 1043 1123 A6J-Q008 - 1043 13c4 Asus G2P + 1043 13c4 G2P 1043 817f P5LD2-VM Mainboard (Realtek ALC 882 codec) 1043 8290 P5KPL-VM Motherboard 1043 82ea P5KPL-CM Motherboard @@ -25240,7 +25331,7 @@ 152d 0753 Softmodem 1734 10ad Conexant softmodem SmartCP 17aa 2010 ThinkPad R60/T60/X60 series - 17aa 3802 Lenovo 3000 C200 audio [Realtek ALC861VD] + 17aa 3802 3000 C200 audio [Realtek ALC861VD] 8086 1112 DeskTop Board D945GTP 8086 27d8 DeskTop Board D945GTP 8086 d618 DeskTop Board D510MO @@ -25311,6 +25402,7 @@ 103c 30d9 Presario C700 104d 9005 Vaio VGN-FZ260E 104d 902d VAIO VGN-NR120E + 17aa 20a5 ThinkPad R61 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] 2820 82801H (ICH8 Family) 4 port SATA Controller [IDE mode] 1028 01da OptiPlex 745 @@ -25337,6 +25429,7 @@ 2828 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [IDE mode] 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b + 17aa 20a8 ThinkPad R61 e4bf cc47 CCG-RUMBA 2829 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] 1025 0121 Aspire 5920G @@ -25353,7 +25446,7 @@ 1028 040b Latitude E6510 e4bf 50c1 PC1-GROOVE 2830 82801H (ICH8 Family) USB UHCI Controller #1 - 1025 0121 Acer Aspire 5920G + 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b @@ -25413,7 +25506,7 @@ 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2835 82801H (ICH8 Family) USB UHCI Controller #5 - 1025 0121 Acer Aspire 5920G + 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b @@ -25441,7 +25534,7 @@ 17c0 4083 Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 283a 82801H (ICH8 Family) USB2 EHCI Controller #2 - 1025 0121 Acer Aspire 5920G + 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b @@ -25496,14 +25589,14 @@ 1025 0145 Realtek ALC889 (Aspire 8920G w. Dolby Theather) 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 - 1028 01f9 Dell Latitude D630 - 1028 01ff Dell Precision M4300 + 1028 01f9 Latitude D630 + 1028 01ff Precision M4300 1028 0256 Studio 1735 103c 2802 Compaq dc7700p 103c 30c0 Compaq 6710b 103c 30c1 Compaq 6910p 103c 30cc Pavilion dv6700 - 1043 1339 Asus M51S series + 1043 1339 M51S series 1043 81ec P5B 104d 9005 Vaio VGN-FZ260E 104d 9008 Vaio VGN-SZ79SN_C @@ -25843,7 +25936,7 @@ 29f7 3200/3210 Chipset Serial KT Controller 29f9 3210 Chipset Host-Secondary PCI Express Bridge 2a00 Mobile PM965/GM965/GL960 Memory Controller Hub - 1025 0121 Acer Aspire 5920G + 1025 0121 Aspire 5920G 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b 103c 30c1 Compaq 6910p @@ -25862,16 +25955,16 @@ 103c 30c0 Compaq 6710b 103c 30d9 Presario C700 104d 902d VAIO VGN-NR120E - 17aa 20b5 ThinkPad T61/R61 - 17c0 4082 Medion WIM 2210 Notebook PC [MD96850] + 17aa 20b5 GM965 [X3100] on ThinkPad T61/R61 + 17c0 4082 GM965 on Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2a03 Mobile GM965/GL960 Integrated Graphics Controller (secondary) 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b 103c 30d9 Presario C700 104d 902d VAIO VGN-NR120E - 17aa 20b5 ThinkPad T61/R61 - 17c0 4082 Medion WIM 2210 Notebook PC [MD96850] + 17aa 20b5 GM965 [X3100] on ThinkPad T61/R61 + 17c0 4082 GM965 on Medion WIM 2210 Notebook PC [MD96850] e4bf cc47 CCG-RUMBA 2a04 Mobile PM965/GM965 MEI Controller 103c 30c1 Compaq 6910p @@ -26074,7 +26167,7 @@ 2e16 4 Series Chipset PT IDER Controller 2e17 4 Series Chipset Serial KT Controller 2e20 4 Series Chipset DRAM Controller - 1028 0283 Dell Vostro 220 + 1028 0283 Vostro 220 1043 82d3 P5Q Deluxe Motherboard 1458 5000 GA-EP45-DS5/GA-EG45M-DS2H Motherboard 2e21 4 Series Chipset PCI Express Root Port @@ -26585,16 +26678,20 @@ 37d1 Ethernet Connection X722 for 1GbE 1590 0216 Ethernet 1Gb 2-port 368i Adapter 1590 0217 Ethernet 1Gb 2-port 368FLR-MMT Adapter + 1590 0247 Ethernet 1Gb 4-port 369i Adapter 17aa 4020 Intel Ethernet Connection X722 for 1GbE 17aa 4021 Intel Ethernet Connection X722 for 1GbE 17aa 4022 Intel Ethernet Connection X722 for 1GbE 37d2 Ethernet Connection X722 for 10GBASE-T + 14cd 0030 Ethernet OCP 2x10G RJ45 Phy Card [USI-X557-10GbaseT] 1590 0218 Ethernet 10Gb 2-port 568FLR-MMT Adapter - 17aa 4020 Intel Ethernet Connection X722 for 10GBASE - 17aa 4021 Intel Ethernet Connection X722 for 10GBASE + 17aa 4020 Ethernet Connection X722 for 10GBASE-T + 17aa 4021 Ethernet Connection X722 for 10GBASE-T 17aa 4022 Ethernet Connection X722 for 10GBASE-T 37d3 Ethernet Connection X722 for 10GbE SFP+ 1590 0219 Ethernet 10Gb 2-port 568FLR-MMSFP+ Adapter + 17aa 4020 Ethernet Connection X722 for 10GbE SFP+ + 17aa 4021 Ethernet Connection X722 for 10GbE SFP+ 37d4 Ethernet Connection X722 for 10GbE QSFP+ 37d9 X722 Hyper-V Virtual Function 3a00 82801JD/DO (ICH10 Family) 4-port SATA IDE Controller @@ -26865,7 +26962,7 @@ 1028 02da OptiPlex 980 1028 040a Latitude E6410 1028 040b Latitude E6510 - 1043 1373 ASUSTek G73-series gaming laptop + 1043 1373 G73-series gaming laptop 144d c06a R730 Laptop 15d9 060d C7SIM-Q Motherboard 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] @@ -27013,7 +27110,7 @@ 4224 PRO/Wireless 2915ABG [Calexico2] Network Connection 4227 PRO/Wireless 3945ABG [Golan] Network Connection 8086 1010 ThinkPad R60e - 8086 1011 ThinkPad T60/R60e/X60s + 8086 1011 ThinkPad T60/R60e/X60s/R61 8086 1014 PRO/Wireless 3945BG Network Connection 4229 PRO/Wireless 4965 AG or AGN [Kedron] Network Connection 8086 1100 Vaio VGN-SZ79SN_C @@ -27132,6 +27229,8 @@ 5845 QEMU NVM Express Controller 1af4 1100 QEMU Virtual Machine 5902 HD Graphics 610 + 590f Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers + 5910 Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers 5912 HD Graphics 630 5a84 Celeron N3350/Pentium N4200/Atom E3900 Series Integrated Graphics Controller 5a88 Celeron N3350/Pentium N4200/Atom E3900 Series Imaging Unit @@ -28223,7 +28322,7 @@ 9004 7888 AHA-2930UW SCSI Controller 8b78 ABA-1030 ec78 AHA-4944W/UW -# acquired by PMC-Sierra +# acquired by Microsemi 9005 Adaptec 0010 AHA-2940U2/U2W 9005 2180 AHA-2940U2 SCSI Controller @@ -28835,9 +28934,11 @@ f1d0 AJA Video cafe Kona SD cfee Xena LS/SD-22-DA/SD-DA daff KONA LHi + db01 Corvid22 db09 Corvid 24 dcaf Kona HD dfee Xena HD-DA + eb0e Corvid 44 efac Xena SD-MM/SD-22-MM facd Xena HD-MM f5f5 F5 Networks, Inc. From owner-svn-src-stable-10@freebsd.org Sat May 27 22:57:09 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FF80D85955; Sat, 27 May 2017 22:57:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD3ED1E82; Sat, 27 May 2017 22:57:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RMv7Dt053177; Sat, 27 May 2017 22:57:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RMv7X8053176; Sat, 27 May 2017 22:57:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272257.v4RMv7X8053176@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 22:57:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319003 - stable/10/lib/libgeom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 22:57:09 -0000 Author: ngie Date: Sat May 27 22:57:07 2017 New Revision: 319003 URL: https://svnweb.freebsd.org/changeset/base/319003 Log: MFC r317288,r317289: r317288: libgeom(3): apply minor polish - Use .Dv when mentioning NULL per mdoc(7). - Reword `g_device_path`, `g_open_by_ident`, and `g_providername`'s descriptions so they're less wordy. - Fix a typo in `g_device_path` (can not -> cannot). Tested with: igor, make manlint r317289: libgeom(3): note that stdio.h is required when referencing gctl_dump(3) gctl_dump(3) is only exposed when stdio.h is #include'd first, per its addition in r112510. The reasoning noted for the conditional "exposure" of the function was to "limit #include pollution". This addresses an issue I found with the documentation when looking at bug 218809, which in turn addresses a -Wimplicit-function-declaration compiler warning in `tools/regression/geom_gpt/test.c` (it uses gctl_dump(3)). Modified: stable/10/lib/libgeom/libgeom.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libgeom/libgeom.3 ============================================================================== --- stable/10/lib/libgeom/libgeom.3 Sat May 27 22:40:20 2017 (r319002) +++ stable/10/lib/libgeom/libgeom.3 Sat May 27 22:57:07 2017 (r319003) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 4, 2010 +.Dd April 22, 2017 .Dt LIBGEOM 3 .Os .Sh NAME @@ -63,6 +63,10 @@ .Sh LIBRARY .Lb libgeom .Sh SYNOPSIS +.Bd -literal +/* stdio.h is only required for `gctl_dump` */ +.Ed +.In stdio.h .In libgeom.h .Ss "Statistics Functions" .Ft void @@ -324,8 +328,8 @@ The .Fn g_device_path function returns the full path to a provider given a partial or full path to the device node. -If the device can not be found or is not a valid geom provider, NULL is -returned. +.Dv NULL +is returned if the device cannot be found or is not a valid geom provider. .Pp The .Fn g_get_ident @@ -344,20 +348,19 @@ string. .Pp The .Fn g_open_by_ident -function opens provider using its ident, unlike +function opens provider using its identification, unlike .Fn g_open -which uses provider's name. -If the +which uses the provider's name. +The function will store the provider's name in the .Fa name -argument is not -.Dv NULL , -the function will store provider's name there. +parameter if it is not +.Dv NULL . .Pp The .Fn g_providername function returns the provider name of an open file descriptor. -If the file descriptor does not point to a valid geom provider, NULL is -returned. +.Dv NULL +is returned the file descriptor does not point to a valid geom provider. .Pp All functions except .Fn g_providername From owner-svn-src-stable-10@freebsd.org Sat May 27 23:04:49 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB840D85C77; Sat, 27 May 2017 23:04:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 938261600; Sat, 27 May 2017 23:04:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RN4mLk057309; Sat, 27 May 2017 23:04:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RN4mKT057308; Sat, 27 May 2017 23:04:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272304.v4RN4mKT057308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 23:04:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319007 - in stable/10: contrib/netbsd-tests/fs/tmpfs tests/sys/fs/tmpfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 23:04:49 -0000 Author: ngie Date: Sat May 27 23:04:48 2017 New Revision: 319007 URL: https://svnweb.freebsd.org/changeset/base/319007 Log: MFC r318546: sys/fs/tmpfs/vnd_test: make md(4) allocation dynamic The previous logic was flawed in the sense that it assumed that /dev/md3 was always available. This was a caveat I noted in r306038, that I hadn't gotten around to solving before now. Cache the device for the mountpoint after executing mdmfs, then use the cached value in basic_cleanup(..) when unmounting/disconnecting the md(4) device. Apply sed expressions to use reuse logic in the NetBSD code that could also be applied to FreeBSD, just with different tools. Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh stable/10/tests/sys/fs/tmpfs/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh ============================================================================== --- stable/10/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh Sat May 27 23:04:40 2017 (r319006) +++ stable/10/contrib/netbsd-tests/fs/tmpfs/t_vnd.sh Sat May 27 23:04:48 2017 (r319007) @@ -28,6 +28,10 @@ # Verifies that vnd works with files stored in tmpfs. # +# Begin FreeBSD +MD_DEVICE_FILE=md.device +# End FreeBSD + atf_test_case basic cleanup basic_head() { atf_set "descr" "Verifies that vnd works with files stored in tmpfs" @@ -41,7 +45,10 @@ basic_body() { # Begin FreeBSD if true; then atf_check -s eq:0 -o empty -e empty mkdir mnt - atf_check -s eq:0 -o empty -e empty mdmfs -F disk.img md3 mnt + atf_check -s eq:0 -o empty -e empty mdmfs -F disk.img md mnt + md_dev=$(df mnt | awk 'NR != 1 { print $1 }' | xargs basename) + atf_check test -c /dev/$md_dev # Sanity check + echo -n $md_dev > $TMPDIR/$MD_DEVICE_FILE else # End FreeBSD atf_check -s eq:0 -o empty -e empty vndconfig /dev/vnd3 disk.img @@ -67,31 +74,23 @@ basic_body() { done atf_check -s eq:0 -o empty -e empty umount mnt - # Begin FreeBSD - if true; then - atf_check -s eq:0 -o empty -e empty mdconfig -d -u 3 - else - # End FreeBSD atf_check -s eq:0 -o empty -e empty vndconfig -u /dev/vnd3 - # Begin FreeBSD - fi - # End FreeBSD test_unmount touch done } basic_cleanup() { + # Begin FreeBSD + if md_dev=$(cat $TMPDIR/$MD_DEVICE_FILE); then + echo "Will try disconnecting $md_dev" + else + echo "$MD_DEVICE_FILE doesn't exist in $TMPDIR; returning early" + return 0 + fi + # End FreeBSD if [ ! -f done ]; then umount mnt 2>/dev/null 1>&2 - # Begin FreeBSD - if true; then - [ ! -c /dev/md3 ] || mdconfig -d -u 3 - else - # End FreeBSD vndconfig -u /dev/vnd3 2>/dev/null 1>&2 - # Begin FreeBSD - fi - # End FreeBSD fi } Modified: stable/10/tests/sys/fs/tmpfs/Makefile ============================================================================== --- stable/10/tests/sys/fs/tmpfs/Makefile Sat May 27 23:04:40 2017 (r319006) +++ stable/10/tests/sys/fs/tmpfs/Makefile Sat May 27 23:04:48 2017 (r319007) @@ -54,6 +54,9 @@ ATF_TESTS_SH_SED_mount_test= \ ATF_TESTS_SH_SED_readdir_test= -e 's,mknod fifo p,mkfifo fifo,g' ATF_TESTS_SH_SED_sizes_test= -e 's,-o -s,-o size=,g' ATF_TESTS_SH_SED_statvfs_test= -e 's,-o -s,-o size=,g' +ATF_TESTS_SH_SED_vnd_test= \ + -e 's,vndconfig -u /dev/vnd3,mdconfig -d -u $$md_dev,g' \ + -e 's,/dev/vnd3,/dev/$$md_dev,g' ATF_TESTS_SH_SED_vnode_leak_test= -e 's,-o -s,-o size=,g' .include From owner-svn-src-stable-10@freebsd.org Sat May 27 23:26:12 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3011BD842C1; Sat, 27 May 2017 23:26:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B4B613E2; Sat, 27 May 2017 23:26:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RNQBgh065782; Sat, 27 May 2017 23:26:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RNQAWU065778; Sat, 27 May 2017 23:26:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272326.v4RNQAWU065778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 23:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319012 - in stable/10: etc/mtree lib/libkvm lib/libkvm/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 23:26:12 -0000 Author: ngie Date: Sat May 27 23:26:10 2017 New Revision: 319012 URL: https://svnweb.freebsd.org/changeset/base/319012 Log: MFC r316099: lib/libkvm: start adding basic tests for kvm(3) - kvm_close: add a testcase to verify support for errno = EINVAL / -1 (see D10065) when kd == NULL is provided to the libcall. - kvm_geterr: -- Add a negative testcase for kd == NULL returning "" (see D10022). -- Add two positive testcases: --- test the error case using kvm_write on a O_RDONLY descriptor. --- test the "no error" case using kvm_read(3) and kvm_nlist(3) as helper routines and by injecting a bogus error message via _kvm_err (an internal API) _kvm_err was used as there isn't a formalized way to clear the error output, and because kvm_nlist always returns ENOENT with the NULL terminator today. - kvm_open, kvm_open2: -- Add some basic negative tests for kvm_open(3) and kvm_open2(3). Testing positive cases with a specific `corefile`/`execfile`/`resolver` requires more work and would require user intervention today in order to reliably test this out. MFC note: lib/libkvm/kvm_open2_test is not compiled/tested because ^/stable/10 lacks the kvm_open2(3) libcall. Added: stable/10/lib/libkvm/tests/ - copied from r316099, head/lib/libkvm/tests/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/lib/libkvm/Makefile stable/10/lib/libkvm/tests/Makefile stable/10/lib/libkvm/tests/kvm_geterr_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Sat May 27 23:24:33 2017 (r319011) +++ stable/10/etc/mtree/BSD.tests.dist Sat May 27 23:26:10 2017 (r319012) @@ -310,6 +310,8 @@ .. libcrypt .. + libkvm + .. libmp .. libnv Modified: stable/10/lib/libkvm/Makefile ============================================================================== --- stable/10/lib/libkvm/Makefile Sat May 27 23:24:33 2017 (r319011) +++ stable/10/lib/libkvm/Makefile Sat May 27 23:26:10 2017 (r319012) @@ -34,4 +34,10 @@ MLINKS+=kvm_getprocs.3 kvm_getargv.3 kvm MLINKS+=kvm_open.3 kvm_close.3 kvm_open.3 kvm_openfiles.3 MLINKS+=kvm_read.3 kvm_write.3 +.include + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: stable/10/lib/libkvm/tests/Makefile ============================================================================== --- head/lib/libkvm/tests/Makefile Tue Mar 28 17:37:49 2017 (r316099) +++ stable/10/lib/libkvm/tests/Makefile Sat May 27 23:26:10 2017 (r319012) @@ -5,11 +5,13 @@ ATF_TESTS_C+= kvm_close_test ATF_TESTS_C+= kvm_geterr_test ATF_TESTS_C+= kvm_open_test -ATF_TESTS_C+= kvm_open2_test +# NB: kvm_open2(3) isn't available on ^/stable/10 +#ATF_TESTS_C+= kvm_open2_test CFLAGS.kvm_geterr_test+= -I${.CURDIR:H} -LIBADD+= kvm +DPADD+= ${LIBKVM} +LDADD+= -lkvm WARNS?= 6 Modified: stable/10/lib/libkvm/tests/kvm_geterr_test.c ============================================================================== --- head/lib/libkvm/tests/kvm_geterr_test.c Tue Mar 28 17:37:49 2017 (r316099) +++ stable/10/lib/libkvm/tests/kvm_geterr_test.c Sat May 27 23:26:10 2017 (r319012) @@ -56,6 +56,8 @@ ATF_TC_BODY(kvm_geterr_negative_test_NUL ATF_REQUIRE(!errbuf_has_error(kvm_geterr(NULL))); } +/* 1100090 was where kvm_open2(3) was introduced. */ +#if __FreeBSD_version >= 1100091 ATF_TC(kvm_geterr_positive_test_error); ATF_TC_HEAD(kvm_geterr_positive_test_error, tc) { @@ -125,13 +127,16 @@ ATF_TC_BODY(kvm_geterr_positive_test_no_ ATF_REQUIRE_MSG(kvm_close(kd) == 0, "kvm_close failed: %s", strerror(errno)); } +#endif ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, kvm_geterr_negative_test_NULL); +#if __FreeBSD_version >= 1100091 ATF_TP_ADD_TC(tp, kvm_geterr_positive_test_error); ATF_TP_ADD_TC(tp, kvm_geterr_positive_test_no_error); +#endif return (atf_no_error()); } From owner-svn-src-stable-10@freebsd.org Sat May 27 23:32:01 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 045E4D84676; Sat, 27 May 2017 23:32:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D547419BC; Sat, 27 May 2017 23:32:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RNVxx1070125; Sat, 27 May 2017 23:31:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RNVxkw070122; Sat, 27 May 2017 23:31:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272331.v4RNVxkw070122@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 23:31:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r319014 - stable/10/tools/regression/geom_gpt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 23:32:01 -0000 Author: ngie Date: Sat May 27 23:31:59 2017 New Revision: 319014 URL: https://svnweb.freebsd.org/changeset/base/319014 Log: MFC r317290,r317291,r317292,r317293,r317294,r317295,r317304,r317306,r317307,r317308,r317309: r317290: Fix -Wimplicit-function-declaration compilation warning by moving libgeom.h #include below the stdio.h #include. gctl_dump(3) needs stdio.h, per reasoning noted in r317289. PR: 218809 r317291: Rename gctl.t to gctl_test.t and test.c to gctl_test_helper.c This is being done to reduce ambiguity and to make the tests more portable in the future to other locations in the source tree. r317292: gctl_test.t: use make to compile gctl_test_helper instead of calling cc directly r317293: gctl_test_helper: apply polish - Staticize variables to fix warnings. - Sprinkle asserts around for calls that can fail - Apply style(9) for main(..) definition. - ANSIify usage(..) definition. r317294: Bump WARNS to 6 per previous commits which fixed warnings Tested with: clang (4.0), gcc (4.2.1, 6.3.0) r317295: The GPT class no longer exists; use the PART class instead r317304: gctl_test_helper: add diagnostic output for parse_retval(..) This will help end-users better diagnose issues with the function. r317306: gctl_test.t: minor tweaks - Declare $count with the `my` scope operator to permit `use strict`. - Add `use strict`. - Use `use warnings` instead of using `-w` in the shebang. - Don't unlink $cmd when done (prevents unnecessary rebuilding). - Improve the error message when running with insufficient permissions, e.g., non-root. r317307: Use verb=delete not verb=remove The `remove` verb hasn't been present in geom_part*(4) for well over a decade, if ever. I couldn't find any references to it in ^/stable/5 at least, which is around the timeframe that this test was written. r317308: gctl_test.t: more tweaks to try and update the code and get it functional (again?) - Make the logfile for $out be built off the basename for $cmd, instead of $cmd. (r317292 broke this assumption). - Rename $mntpt to $mntpt_prefix for clarity, as this variable is a prefix for mountpoints. - Reindent the umount directive block while here to match the rest of the code. r317309: gctl_test.t: improve error reporting with mdcfg and mount directives If the commands had failed previously, it would press on and result in a series of cascading failures. Fail early and continue on to the next case instead of executing additional commands after a previously failed series of steps. Added: stable/10/tools/regression/geom_gpt/Makefile - copied, changed from r317292, head/tools/regression/geom_gpt/Makefile stable/10/tools/regression/geom_gpt/gctl_test.t - copied, changed from r317291, head/tools/regression/geom_gpt/gctl_test.t stable/10/tools/regression/geom_gpt/gctl_test_helper.c - copied, changed from r317291, head/tools/regression/geom_gpt/gctl_test_helper.c Deleted: stable/10/tools/regression/geom_gpt/gctl.t stable/10/tools/regression/geom_gpt/test.c Modified: Directory Properties: stable/10/ (props changed) Copied and modified: stable/10/tools/regression/geom_gpt/Makefile (from r317292, head/tools/regression/geom_gpt/Makefile) ============================================================================== --- head/tools/regression/geom_gpt/Makefile Sat Apr 22 20:15:47 2017 (r317292, copy source) +++ stable/10/tools/regression/geom_gpt/Makefile Sat May 27 23:31:59 2017 (r319014) @@ -3,6 +3,9 @@ PROG= gctl_test_helper MAN= -LIBADD+= geom +DPADD+= ${LIBGEOM} +LDADD+= -lgeom + +WARNS?= 6 .include Copied and modified: stable/10/tools/regression/geom_gpt/gctl_test.t (from r317291, head/tools/regression/geom_gpt/gctl_test.t) ============================================================================== --- head/tools/regression/geom_gpt/gctl_test.t Sat Apr 22 20:06:11 2017 (r317291, copy source) +++ stable/10/tools/regression/geom_gpt/gctl_test.t Sat May 27 23:31:59 2017 (r319014) @@ -1,4 +1,4 @@ -#!/usr/bin/env perl -w +#!/usr/bin/env perl # # Copyright (c) 2005, 2006 Marcel Moolenaar # All rights reserved. @@ -26,13 +26,13 @@ # # $FreeBSD$ -my $srcdir = `dirname $0`; -chomp $srcdir; +use strict; +use warnings; + +use File::Basename; -my $cmd = "/tmp/gctl-$$"; -my $out = "$cmd.out"; my $disk = "/tmp/disk-$$"; -my $mntpt = "/tmp/mount-$$"; +my $mntpt_prefix = "/tmp/mount-$$"; my %steps = ( "000" => "gctl", @@ -70,9 +70,9 @@ my %steps = ( "054" => "conf", "060" => "gctl verb=add geom=%dev% type=516e7cb6-6ecf-11d6-8ff8-00022d09712b start=34 end=546 entry:8=1", "061" => "mount %dev%p1", - "062" => "gctl verb=remove geom=%dev% entry=1", + "062" => "gctl verb=delete geom=%dev% entry=1", "063" => "umount %dev%p1", - "064" => "gctl verb=remove geom=%dev% entry=1", + "064" => "gctl verb=delete geom=%dev% entry=1", "065" => "conf", "100" => "mdcfg destroy", "110" => "mdcfg create corrupted", @@ -132,20 +132,23 @@ if (exists $ENV{'TEST_VERBOSE'}) { } # Compile the driver... -my $st = system("cc -o $cmd -g $srcdir/gctl_test_helper.c -lgeom"); +my $st = system("make obj && make all"); if ($st != 0) { print "1..0 # SKIP error compiling test.c\n"; exit 0; } +chomp(my $cmd = `make '-V\${.OBJDIR}/\${PROG}'`); + +my $out = basename($cmd) . ".out"; # Make sure we have permission to use gctl... if (`$cmd` =~ "^FAIL Permission denied") { - print "1..0 # SKIP not enough permission\n"; + print "1..0 # SKIP insufficient permissions\n"; unlink $cmd; exit 0; } -$count = keys (%steps); +my $count = keys (%steps); print "1..$count\n"; my $nr = 1; @@ -158,13 +161,15 @@ foreach my $key (sort keys %steps) { $res =~ s/%dev%/$dev/g; if ($action =~ "^gctl") { + my $errmsg = ""; system("$cmd $verbose $args | tee $out 2>&1"); - $st = `tail -1 $out`; - if ($st =~ "^$res") { - print "ok $nr \# gctl($key)\n"; - } else { - print "not ok $nr \# gctl($key) - $st\n"; + chomp($st = `tail -1 $out`); + if ($st ne $res) { + $errmsg = "\"$st\" (actual) != \"$res\" (expected)\n"; } + printf("%sok $nr \# gctl($key)%s\n", + ($errmsg eq "" ? "" : "not "), + ($errmsg eq "" ? "" : " - $errmsg")); unlink $out; } elsif ($action =~ "^mdcfg") { if ($args =~ "^create") { @@ -191,17 +196,23 @@ foreach my $key (sort keys %steps) { } unlink $out; } elsif ($action =~ "^mount") { - system("mkdir $mntpt-$args"); - system("newfs $args"); - system("mount -t ufs /dev/$args $mntpt-$args"); - print "ok $nr \# mount($key)\n"; + my $errmsg = ""; + mkdir("$mntpt_prefix-$args"); + if (system("newfs /dev/$args") == 0) { + if (system("mount /dev/$args $mntpt_prefix-$args") != 0) { + $errmsg = "mount failed"; + } + } else { + $errmsg = "newfs failed"; + } + printf("%sok $nr # mount($key)%s\n", + ($errmsg eq "" ? "" : "not "), + ($errmsg eq "" ? "" : " - $errmsg")); } elsif ($action =~ "^umount") { - system("umount $mntpt-$args"); - system("rmdir $mntpt-$args"); - print "ok $nr \# umount($key)\n"; + system("umount $mntpt_prefix-$args"); + system("rmdir $mntpt_prefix-$args"); + print "ok $nr \# umount($key)\n"; } $nr += 1; } - -unlink $cmd; exit 0; Copied and modified: stable/10/tools/regression/geom_gpt/gctl_test_helper.c (from r317291, head/tools/regression/geom_gpt/gctl_test_helper.c) ============================================================================== --- head/tools/regression/geom_gpt/gctl_test_helper.c Sat Apr 22 20:06:11 2017 (r317291, copy source) +++ stable/10/tools/regression/geom_gpt/gctl_test_helper.c Sat May 27 23:31:59 2017 (r319014) @@ -28,6 +28,8 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include #include @@ -42,11 +44,11 @@ struct retval { char *value; }; -struct retval *retval; -int verbose; +static struct retval *retval; +static int verbose; static void -usage() +usage(void) { fprintf(stdout, "usage: %s [-v] param[:len][=value] ...\n", getprogname()); @@ -105,16 +107,18 @@ parse(char *arg, char **param, char **va return (0); } -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { struct retval *rv; struct gctl_req *req; char *param, *value; const char *s; - int c, len; + int c, len, parse_retval; req = gctl_get_handle(); - gctl_ro_param(req, "class", -1, "GPT"); + assert(req != NULL); + gctl_ro_param(req, "class", -1, "PART"); while ((c = getopt(argc, argv, "v")) != -1) { switch (c) { @@ -129,10 +133,12 @@ int main(int argc, char *argv[]) } } - while (optind < argc) { - if (!parse(argv[optind++], ¶m, &value, &len)) { + for (; optind < argc; optind++) { + parse_retval = parse(argv[optind], ¶m, &value, &len); + if (parse_retval == 0) { if (len > 0) { rv = malloc(sizeof(struct retval)); + assert(rv != NULL); rv->param = param; rv->value = value; rv->retval = retval; @@ -140,7 +146,9 @@ int main(int argc, char *argv[]) gctl_rw_param(req, param, len, value); } else gctl_ro_param(req, param, -1, value); - } + } else + warnc(parse_retval, "failed to parse argument (%s)", + argv[optind]); } if (verbose)