From owner-svn-src-stable-9@FreeBSD.ORG Mon Nov 24 01:59:09 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFB4E5CF; Mon, 24 Nov 2014 01:59:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC8435E0; Mon, 24 Nov 2014 01:59:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAO1x9lD022418; Mon, 24 Nov 2014 01:59:09 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAO1x9Sn022417; Mon, 24 Nov 2014 01:59:09 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201411240159.sAO1x9Sn022417@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Mon, 24 Nov 2014 01:59:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r274944 - stable/9/lib/libc/stdio X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 01:59:09 -0000 Author: kevlo Date: Mon Nov 24 01:59:08 2014 New Revision: 274944 URL: https://svnweb.freebsd.org/changeset/base/274944 Log: MFC r273760: Fix prototypes. Modified: stable/9/lib/libc/stdio/open_memstream.3 (contents, props changed) Modified: stable/9/lib/libc/stdio/open_memstream.3 ============================================================================== --- stable/9/lib/libc/stdio/open_memstream.3 Mon Nov 24 01:56:33 2014 (r274943) +++ stable/9/lib/libc/stdio/open_memstream.3 Mon Nov 24 01:59:08 2014 (r274944) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 27, 2013 +.Dd October 28, 2014 .Dt OPEN_MEMSTREAM 3 .Os .Sh NAME @@ -37,10 +37,10 @@ .Sh SYNOPSIS .In stdio.h .Ft FILE * -.Fn open_memstream "char **bufp" "size_t **sizep" +.Fn open_memstream "char **bufp" "size_t *sizep" .In wchar.h .Ft FILE * -.Fn open_wmemstream "wchar_t **bufp" "size_t **sizep" +.Fn open_wmemstream "wchar_t **bufp" "size_t *sizep" .Sh DESCRIPTION The .Fn open_memstream From owner-svn-src-stable-9@FreeBSD.ORG Tue Nov 25 12:19:06 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F1C69A5; Tue, 25 Nov 2014 12:19:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20C4BFDB; Tue, 25 Nov 2014 12:19:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPCJ5XM025726; Tue, 25 Nov 2014 12:19:06 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPCJ5Ac025725; Tue, 25 Nov 2014 12:19:05 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201411251219.sAPCJ5Ac025725@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 25 Nov 2014 12:19:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r275031 - in stable: 10/contrib/libarchive/cpio 9/contrib/libarchive/cpio X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 12:19:06 -0000 Author: dim Date: Tue Nov 25 12:19:05 2014 New Revision: 275031 URL: https://svnweb.freebsd.org/changeset/base/275031 Log: MFC r274846: Fix the following -Werror warning from clang 3.5.0, while building usr.bin/cpio on amd64 (or any arch with 64-bit time_t): contrib/libarchive/cpio/cpio.c:1143:6: error: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value] if (abs(mtime - now) > (365/2)*86400) ^ contrib/libarchive/cpio/cpio.c:1143:6: note: use function 'labs' instead if (abs(mtime - now) > (365/2)*86400) ^~~ labs 1 error generated. This is because time_t is a long on amd64. To avoid the warning, just copy the equivalent test from a few lines before, which is used in the Windows case, and which is type safe. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D1198 Modified: stable/9/contrib/libarchive/cpio/cpio.c Directory Properties: stable/9/contrib/libarchive/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/libarchive/cpio/cpio.c Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/libarchive/cpio/cpio.c ============================================================================== --- stable/9/contrib/libarchive/cpio/cpio.c Tue Nov 25 11:23:12 2014 (r275030) +++ stable/9/contrib/libarchive/cpio/cpio.c Tue Nov 25 12:19:05 2014 (r275031) @@ -1016,7 +1016,8 @@ list_item_verbose(struct cpio *cpio, str else fmt = cpio->day_first ? "%d %b %H:%M" : "%b %d %H:%M"; #else - if (abs(mtime - now) > (365/2)*86400) + if (mtime - now > 365*86400/2 + || mtime - now < -365*86400/2) fmt = cpio->day_first ? "%e %b %Y" : "%b %e %Y"; else fmt = cpio->day_first ? "%e %b %H:%M" : "%b %e %H:%M"; From owner-svn-src-stable-9@FreeBSD.ORG Tue Nov 25 12:45:32 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D193B49F; Tue, 25 Nov 2014 12:45:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC207374; Tue, 25 Nov 2014 12:45:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPCjW7t040234; Tue, 25 Nov 2014 12:45:32 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPCjWPC040233; Tue, 25 Nov 2014 12:45:32 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201411251245.sAPCjWPC040233@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 25 Nov 2014 12:45:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r275034 - in stable: 10/usr.bin/locate/locate 7/usr.bin/locate/locate 8/usr.bin/locate/locate 9/usr.bin/locate/locate X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 12:45:33 -0000 Author: dim Date: Tue Nov 25 12:45:31 2014 New Revision: 275034 URL: https://svnweb.freebsd.org/changeset/base/275034 Log: MFC r274847: Fix the following -Werror warnings from clang 3.5.0, while building usr.bin/locate: usr.bin/locate/locate/util.c:249:29: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value] MAXPATHLEN, abs(i) < abs(htonl(i)) ? i : htonl(i)); ^ usr.bin/locate/locate/util.c:249:29: note: remove the call to 'abs' since unsigned values cannot be negative MAXPATHLEN, abs(i) < abs(htonl(i)) ? i : htonl(i)); ^~~ usr.bin/locate/locate/util.c:274:32: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value] MAXPATHLEN, abs(word) < abs(htonl(word)) ? word : ^ usr.bin/locate/locate/util.c:274:32: note: remove the call to 'abs' since unsigned values cannot be negative MAXPATHLEN, abs(word) < abs(htonl(word)) ? word : ^~~ The problem is that ntohl() always returns an unsigned quantity. In this case, it's expected to be cast back to a signed integer, but to stop complaints about abs() we just store it into an integer, and don't call ntohl() again. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D1196 Modified: stable/9/usr.bin/locate/locate/util.c Directory Properties: stable/9/usr.bin/locate/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.bin/locate/locate/util.c stable/7/usr.bin/locate/locate/util.c stable/8/usr.bin/locate/locate/util.c Directory Properties: stable/10/ (props changed) stable/7/usr.bin/locate/ (props changed) stable/8/usr.bin/locate/ (props changed) Modified: stable/9/usr.bin/locate/locate/util.c ============================================================================== --- stable/9/usr.bin/locate/locate/util.c Tue Nov 25 12:44:18 2014 (r275033) +++ stable/9/usr.bin/locate/locate/util.c Tue Nov 25 12:45:31 2014 (r275034) @@ -235,7 +235,7 @@ getwm(p) char buf[INTSIZE]; int i; } u; - register int i; + register int i, hi; for (i = 0; i < (int)INTSIZE; i++) u.buf[i] = *p++; @@ -243,10 +243,11 @@ getwm(p) i = u.i; if (i > MAXPATHLEN || i < -(MAXPATHLEN)) { - i = ntohl(i); - if (i > MAXPATHLEN || i < -(MAXPATHLEN)) + hi = ntohl(i); + if (hi > MAXPATHLEN || hi < -(MAXPATHLEN)) errx(1, "integer out of +-MAXPATHLEN (%d): %u", - MAXPATHLEN, abs(i) < abs(htonl(i)) ? i : htonl(i)); + MAXPATHLEN, abs(i) < abs(hi) ? i : hi); + return(hi); } return(i); } @@ -263,16 +264,16 @@ int getwf(fp) FILE *fp; { - register int word; + register int word, hword; word = getw(fp); if (word > MAXPATHLEN || word < -(MAXPATHLEN)) { - word = ntohl(word); - if (word > MAXPATHLEN || word < -(MAXPATHLEN)) + hword = ntohl(word); + if (hword > MAXPATHLEN || hword < -(MAXPATHLEN)) errx(1, "integer out of +-MAXPATHLEN (%d): %u", - MAXPATHLEN, abs(word) < abs(htonl(word)) ? word : - htonl(word)); + MAXPATHLEN, abs(word) < abs(hword) ? word : hword); + return(hword); } return(word); } From owner-svn-src-stable-9@FreeBSD.ORG Tue Nov 25 12:58:21 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E737CD8C; Tue, 25 Nov 2014 12:58:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D26236A7; Tue, 25 Nov 2014 12:58:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPCwLa2047045; Tue, 25 Nov 2014 12:58:21 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPCwLJh047044; Tue, 25 Nov 2014 12:58:21 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201411251258.sAPCwLJh047044@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 25 Nov 2014 12:58:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r275036 - in stable: 10/contrib/binutils/gas/config 9/contrib/binutils/gas/config X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 12:58:22 -0000 Author: dim Date: Tue Nov 25 12:58:21 2014 New Revision: 275036 URL: https://svnweb.freebsd.org/changeset/base/275036 Log: MFC r274856: Avoid undefined behaviour in gas's rotate_left() macro for n == 0. Otherwise, clang can effectively remove the first iteration of the for loops where this macro is invoked, and as a result, "cmp r0, #99" fails to assemble. Obtained from: joerg at netbsd Modified: stable/9/contrib/binutils/gas/config/tc-arm.c Directory Properties: stable/9/contrib/binutils/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/binutils/gas/config/tc-arm.c Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/binutils/gas/config/tc-arm.c ============================================================================== --- stable/9/contrib/binutils/gas/config/tc-arm.c Tue Nov 25 12:52:00 2014 (r275035) +++ stable/9/contrib/binutils/gas/config/tc-arm.c Tue Nov 25 12:58:21 2014 (r275036) @@ -6057,7 +6057,7 @@ parse_operands (char *str, const unsigne /* Functions for operand encoding. ARM, then Thumb. */ -#define rotate_left(v, n) (v << n | v >> (32 - n)) +#define rotate_left(v, n) (v << (n % 32) | v >> ((32 - n) % 32)) /* If VAL can be encoded in the immediate field of an ARM instruction, return the encoded form. Otherwise, return FAIL. */ From owner-svn-src-stable-9@FreeBSD.ORG Tue Nov 25 13:12:46 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 901CA447; Tue, 25 Nov 2014 13:12:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B9298D8; Tue, 25 Nov 2014 13:12:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPDCk4P056171; Tue, 25 Nov 2014 13:12:46 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPDCkks056170; Tue, 25 Nov 2014 13:12:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201411251312.sAPDCkks056170@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 25 Nov 2014 13:12:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r275038 - in stable: 10/usr.sbin/rtadvd 8/usr.sbin/rtadvd 9/usr.sbin/rtadvd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 13:12:46 -0000 Author: dim Date: Tue Nov 25 13:12:45 2014 New Revision: 275038 URL: https://svnweb.freebsd.org/changeset/base/275038 Log: MFC r274898: Fix the following -Werror warnings from clang 3.5.0, while building usr.sbin/rtadvd: usr.sbin/rtadvd/rtadvd.c:1291:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value] abs(preferred_time - pfx->pfx_pltimeexpire) > rai->rai_clockskew) { ^ usr.sbin/rtadvd/rtadvd.c:1291:7: note: remove the call to 'abs' since unsigned values cannot be negative abs(preferred_time - pfx->pfx_pltimeexpire) > rai->rai_clockskew) { ^~~ usr.sbin/rtadvd/rtadvd.c:1324:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value] abs(valid_time - pfx->pfx_vltimeexpire) > rai->rai_clockskew) { ^ usr.sbin/rtadvd/rtadvd.c:1324:7: note: remove the call to 'abs' since unsigned values cannot be negative abs(valid_time - pfx->pfx_vltimeexpire) > rai->rai_clockskew) { ^~~ 2 errors generated. These warnings occur because both preferred_time and pfx_pltimeexpire are uint32_t's, so the subtraction expression is also unsigned, and calling abs() is a no-op. However, the intention was to look at the absolute difference between the two unsigned quantities. Introduce a small static function to clarify what we're doing, and call that instead. Reviewed by: hrs Differential Revision: https://reviews.freebsd.org/D1197 Modified: stable/9/usr.sbin/rtadvd/rtadvd.c Directory Properties: stable/9/usr.sbin/rtadvd/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.sbin/rtadvd/rtadvd.c stable/8/usr.sbin/rtadvd/rtadvd.c Directory Properties: stable/10/ (props changed) stable/8/usr.sbin/rtadvd/ (props changed) Modified: stable/9/usr.sbin/rtadvd/rtadvd.c ============================================================================== --- stable/9/usr.sbin/rtadvd/rtadvd.c Tue Nov 25 13:06:47 2014 (r275037) +++ stable/9/usr.sbin/rtadvd/rtadvd.c Tue Nov 25 13:12:45 2014 (r275038) @@ -1231,6 +1231,12 @@ ra_input(int len, struct nd_router_adver return; } +static uint32_t +udiff(uint32_t u, uint32_t v) +{ + return (u >= v ? u - v : v - u); +} + /* return a non-zero value if the received prefix is inconsitent with ours */ static int prefix_check(struct nd_opt_prefix_info *pinfo, @@ -1289,7 +1295,7 @@ prefix_check(struct nd_opt_prefix_info * preferred_time += now.tv_sec; if (!pfx->pfx_timer && rai->rai_clockskew && - abs(preferred_time - pfx->pfx_pltimeexpire) > rai->rai_clockskew) { + udiff(preferred_time, pfx->pfx_pltimeexpire) > rai->rai_clockskew) { syslog(LOG_INFO, "<%s> preferred lifetime for %s/%d" " (decr. in real time) inconsistent on %s:" @@ -1322,7 +1328,7 @@ prefix_check(struct nd_opt_prefix_info * valid_time += now.tv_sec; if (!pfx->pfx_timer && rai->rai_clockskew && - abs(valid_time - pfx->pfx_vltimeexpire) > rai->rai_clockskew) { + udiff(valid_time, pfx->pfx_vltimeexpire) > rai->rai_clockskew) { syslog(LOG_INFO, "<%s> valid lifetime for %s/%d" " (decr. in real time) inconsistent on %s:" From owner-svn-src-stable-9@FreeBSD.ORG Tue Nov 25 13:29:15 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2966AD6; Tue, 25 Nov 2014 13:29:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2C50A8B; Tue, 25 Nov 2014 13:29:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPDTEtm061867; Tue, 25 Nov 2014 13:29:14 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPDTEBj061866; Tue, 25 Nov 2014 13:29:14 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201411251329.sAPDTEBj061866@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 25 Nov 2014 13:29:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r275039 - in stable: 10/usr.sbin/bsnmpd/modules/snmp_hostres 7/usr.sbin/bsnmpd/modules/snmp_hostres 8/usr.sbin/bsnmpd/modules/snmp_hostres 9/usr.sbin/bsnmpd/modules/snmp_hostres X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 13:29:15 -0000 Author: dim Date: Tue Nov 25 13:29:13 2014 New Revision: 275039 URL: https://svnweb.freebsd.org/changeset/base/275039 Log: MFC r274900: Fix the following -Werror warnings from clang 3.5.0, while building bsnmpd's snmp_hostres module: usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:204:20: error: absolute value function 'abs' given an argument of type 'const long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value] str[9] = (u_char)(abs(tm->tm_gmtoff) / 3600); ^ usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:204:20: note: use function 'labs' instead str[9] = (u_char)(abs(tm->tm_gmtoff) / 3600); ^~~ labs usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:205:22: error: absolute value function 'abs' given an argument of type 'const long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value] str[10] = (u_char)((abs(tm->tm_gmtoff) % 3600) / 60); ^ usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:205:22: note: use function 'labs' instead str[10] = (u_char)((abs(tm->tm_gmtoff) % 3600) / 60); ^~~ labs Since tm::tm_gmtoff is a long, use labs(3) instead. Modified: stable/9/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c Directory Properties: stable/9/usr.sbin/bsnmpd/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c stable/7/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c stable/8/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c Directory Properties: stable/10/ (props changed) stable/7/usr.sbin/bsnmpd/ (props changed) stable/8/usr.sbin/bsnmpd/ (props changed) Modified: stable/9/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c ============================================================================== --- stable/9/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c Tue Nov 25 13:12:45 2014 (r275038) +++ stable/9/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c Tue Nov 25 13:29:13 2014 (r275039) @@ -201,8 +201,8 @@ make_date_time(u_char *str, const struct else str[8] = '+'; - str[9] = (u_char)(abs(tm->tm_gmtoff) / 3600); - str[10] = (u_char)((abs(tm->tm_gmtoff) % 3600) / 60); + str[9] = (u_char)(labs(tm->tm_gmtoff) / 3600); + str[10] = (u_char)((labs(tm->tm_gmtoff) % 3600) / 60); return (11); } From owner-svn-src-stable-9@FreeBSD.ORG Tue Nov 25 15:49:52 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8265586E; Tue, 25 Nov 2014 15:49:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63610CBB; Tue, 25 Nov 2014 15:49:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPFnqpE029222; Tue, 25 Nov 2014 15:49:52 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPFnpeG029219; Tue, 25 Nov 2014 15:49:51 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201411251549.sAPFnpeG029219@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 25 Nov 2014 15:49:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r275047 - in stable/9: lib lib/libdpv lib/libfigpar share/mk sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 15:49:52 -0000 Author: dteske Date: Tue Nov 25 15:49:51 2014 New Revision: 275047 URL: https://svnweb.freebsd.org/changeset/base/275047 Log: MFC r274116: Add new libraries/utilities for data throughput visualization. dpv(3): dialog progress view library dpv(1): stream data from stdin or multiple paths with dialog progress view figpar(3): configuration file parsing library MFC r274124: Temporarily _disable_ compilation of dpv(1,3) NB: MFC broken into two halves (first half to bring in the new dirs so mergeinfo can be properly recorded on them -- the second half of MFC). Reviews: D714 Relnotes: New libdpv/libfigpar and dpv(1) utility Reviewed by: jelischer, shurd Discussed at: MeetBSD California 2014 Vendor/Dev Summit Discussed on: -current Thanks to: ngie, ian, jelischer, shurd, bapt Added: stable/9/lib/libdpv/ - copied from r274116, head/lib/libdpv/ stable/9/lib/libfigpar/ - copied from r274116, head/lib/libfigpar/ - copied from r274116, head/usr.bin/dpv/ Directory Properties: stable/9/usr.bin/dpv/ (props changed) Modified: stable/9/lib/Makefile (contents, props changed) stable/9/share/mk/bsd.libnames.mk stable/9/sys/sys/param.h Directory Properties: stable/9/lib/ (props changed) stable/9/share/mk/ (props changed) stable/9/sys/sys/ (props changed) stable/9/usr.bin/ (props changed) Modified: stable/9/lib/Makefile ============================================================================== --- stable/9/lib/Makefile Tue Nov 25 15:24:05 2014 (r275046) +++ stable/9/lib/Makefile Tue Nov 25 15:49:51 2014 (r275047) @@ -72,6 +72,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libefi} \ libexpat \ libfetch \ + libfigpar \ libftpio \ libgeom \ ${_libgpib} \ Modified: stable/9/share/mk/bsd.libnames.mk ============================================================================== --- stable/9/share/mk/bsd.libnames.mk Tue Nov 25 15:24:05 2014 (r275046) +++ stable/9/share/mk/bsd.libnames.mk Tue Nov 25 15:49:51 2014 (r275047) @@ -45,11 +45,13 @@ LIBDEVSTAT?= ${DESTDIR}${LIBDIR}/libdevs LIBDIALOG?= ${DESTDIR}${LIBDIR}/libdialog.a LIBDISK?= ${DESTDIR}${LIBDIR}/libdisk.a LIBDNS?= ${DESTDIR}${LIBDIR}/libdns.a +LIBDPV?= ${DESTDIR}${LIBDIR}/libdpv.a LIBDTRACE?= ${DESTDIR}${LIBDIR}/libdtrace.a LIBDWARF?= ${DESTDIR}${LIBDIR}/libdwarf.a LIBEDIT?= ${DESTDIR}${LIBDIR}/libedit.a LIBELF?= ${DESTDIR}${LIBDIR}/libelf.a LIBFETCH?= ${DESTDIR}${LIBDIR}/libfetch.a +LIBFIGPAR?= ${DESTDIR}${LIBDIR}/libfigpar.a LIBFL?= "don't use LIBFL, use LIBL" LIBFORM?= ${DESTDIR}${LIBDIR}/libform.a LIBFTPIO?= ${DESTDIR}${LIBDIR}/libftpio.a Modified: stable/9/sys/sys/param.h ============================================================================== --- stable/9/sys/sys/param.h Tue Nov 25 15:24:05 2014 (r275046) +++ stable/9/sys/sys/param.h Tue Nov 25 15:49:51 2014 (r275047) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 903506 /* Master, propagated to newvers */ +#define __FreeBSD_version 903507 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable-9@FreeBSD.ORG Tue Nov 25 16:45:43 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17FE9D6; Tue, 25 Nov 2014 16:45:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 023D13F8; Tue, 25 Nov 2014 16:45:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPGjgBq057628; Tue, 25 Nov 2014 16:45:42 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPGjeNr057618; Tue, 25 Nov 2014 16:45:40 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201411251645.sAPGjeNr057618@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 25 Nov 2014 16:45:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r275051 - in stable/9: . gnu/lib/libdialog lib/libdpv usr.bin/dpv X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 16:45:43 -0000 Author: dteske Date: Tue Nov 25 16:45:40 2014 New Revision: 275051 URL: https://svnweb.freebsd.org/changeset/base/275051 Log: MFC r274120, r274121, r274123, r274146, r274192, r274203, r274209, r274226, r274270, and r274851: dpv(1,3)/figpar(3) fixes after r275047 Thanks to: ngie, ian, jelischer, shurd, bapt Modified: stable/9/Makefile.inc1 (contents, props changed) stable/9/gnu/lib/libdialog/Makefile stable/9/lib/libdpv/Makefile stable/9/lib/libdpv/dialog_util.c stable/9/lib/libdpv/dialogrc.c stable/9/lib/libdpv/dialogrc.h stable/9/lib/libdpv/dpv.c stable/9/usr.bin/dpv/Makefile stable/9/usr.bin/dpv/dpv.c Directory Properties: stable/9/ (props changed) stable/9/gnu/lib/libdialog/ (props changed) stable/9/lib/libdpv/ (props changed) stable/9/usr.bin/dpv/ (props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Tue Nov 25 16:24:31 2014 (r275050) +++ stable/9/Makefile.inc1 Tue Nov 25 16:45:40 2014 (r275051) @@ -1353,6 +1353,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 ${_kerberos5_lib_libroken} \ lib/libbz2 lib/libcom_err lib/libcrypt \ lib/libelf lib/libexpat \ + lib/libfigpar \ ${_lib_libgssapi} ${_lib_libipx} \ lib/libkiconv lib/libkvm lib/liblzma lib/libmd \ lib/ncurses/ncurses lib/ncurses/ncursesw \ @@ -1363,7 +1364,8 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 ${_cddl_lib_libzfs_core} \ lib/libutil ${_lib_libypclnt} lib/libz lib/msun \ ${_secure_lib_libcrypto} ${_lib_libldns} \ - ${_secure_lib_libssh} ${_secure_lib_libssl} + ${_secure_lib_libssh} ${_secure_lib_libssl} \ + gnu/lib/libdialog .if ${MK_LIBTHR} != "no" _lib_libthr= lib/libthr @@ -1443,6 +1445,8 @@ _lib_libypclnt= lib/libypclnt lib/libradius__L: lib/libmd__L .endif +gnu/lib/libdialog__L: lib/msun__L lib/ncurses/ncursesw__L + .for _lib in ${_prereq_libs} ${_lib}__PL: .PHONY .if exists(${.CURDIR}/${_lib}) Modified: stable/9/gnu/lib/libdialog/Makefile ============================================================================== --- stable/9/gnu/lib/libdialog/Makefile Tue Nov 25 16:24:31 2014 (r275050) +++ stable/9/gnu/lib/libdialog/Makefile Tue Nov 25 16:45:40 2014 (r275051) @@ -13,6 +13,9 @@ SRCS= argv.c arrows.c buttons.c calenda INCS= dialog.h dlg_colors.h dlg_config.h dlg_keys.h MAN= dialog.3 +DPADD= ${LIBNCURSESW} ${LIBM} +LDADD= -lncursesw -lm + CFLAGS+= -I${.CURDIR} -I${DIALOG} -D_XOPEN_SOURCE_EXTENDED .PATH: ${DIALOG} WARNS?= 1 Modified: stable/9/lib/libdpv/Makefile ============================================================================== --- stable/9/lib/libdpv/Makefile Tue Nov 25 16:24:31 2014 (r275050) +++ stable/9/lib/libdpv/Makefile Tue Nov 25 16:45:40 2014 (r275051) @@ -6,11 +6,13 @@ INCS= dpv.h MAN= dpv.3 MLINKS= dpv.3 dpv_free.3 -CFLAGS+= -I${.CURDIR} -LDFLAGS+= -ldialog -lfigpar -lncurses -lutil +DPADD= ${LIBDIALOG} ${LIBFIGPAR} ${LIBNCURSESW} ${LIBUTIL} +LDADD= -ldialog -lfigpar -lncursesw -lutil SRCS= dialog_util.c dialogrc.c dprompt.c dpv.c status.c util.c +CFLAGS+= -I${.CURDIR} + WARNS?= 6 .include Modified: stable/9/lib/libdpv/dialog_util.c ============================================================================== --- stable/9/lib/libdpv/dialog_util.c Tue Nov 25 16:24:31 2014 (r275050) +++ stable/9/lib/libdpv/dialog_util.c Tue Nov 25 16:45:40 2014 (r275051) @@ -62,7 +62,7 @@ char *title = NULL; char *backtitle = NULL; int dheight = 0; int dwidth = 0; -char *dargv[64] = { NULL }; +static char *dargv[64] = { NULL }; /* TTY/Screen characteristics */ static struct winsize *maxsize = NULL; Modified: stable/9/lib/libdpv/dialogrc.c ============================================================================== --- stable/9/lib/libdpv/dialogrc.c Tue Nov 25 16:24:31 2014 (r275050) +++ stable/9/lib/libdpv/dialogrc.c Tue Nov 25 16:45:40 2014 (r275051) @@ -49,58 +49,58 @@ char gauge_color[STR_BUFSIZE] = "47b"; / char separator[STR_BUFSIZE] = ""; /* Function prototypes */ -static int setattr(struct config *, uint32_t, char *, char *); -static int setbool(struct config *, uint32_t, char *, char *); -static int setnum(struct config *, uint32_t, char *, char *); -static int setstr(struct config *, uint32_t, char *, char *); +static int setattr(struct fp_config *, uint32_t, char *, char *); +static int setbool(struct fp_config *, uint32_t, char *, char *); +static int setnum(struct fp_config *, uint32_t, char *, char *); +static int setstr(struct fp_config *, uint32_t, char *, char *); /* * Anatomy of DIALOGRC (~/.dialogrc by default) * NOTE: Must appear after private function prototypes (above) * NB: Brace-initialization of union requires cast to *first* member of union */ -static struct config dialogrc_config[] = { - /* TYPE Directive DEFAULT HANDLER */ - {TYPE_INT, "aspect", {(void *)0}, &setnum}, - {TYPE_STR, "separate_widget", {separator}, &setstr}, - {TYPE_INT, "tab_len", {(void *)0}, &setnum}, - {TYPE_BOOL, "visit_items", {(void *)0}, &setbool}, - {TYPE_BOOL, "use_shadow", {(void *)1}, &setbool}, - {TYPE_BOOL, "use_colors", {(void *)1}, &setbool}, - {TYPE_STR, "screen_color", {NULL}, &setattr}, - {TYPE_STR, "shadow_color", {NULL}, &setattr}, - {TYPE_STR, "dialog_color", {NULL}, &setattr}, - {TYPE_STR, "title_color", {NULL}, &setattr}, - {TYPE_STR, "border_color", {NULL}, &setattr}, - {TYPE_STR, "button_active_color", {NULL}, &setattr}, - {TYPE_STR, "button_inactive_color", {NULL}, &setattr}, - {TYPE_STR, "button_key_active_color", {NULL}, &setattr}, - {TYPE_STR, "button_key_inactive_color", {NULL}, &setattr}, - {TYPE_STR, "button_label_active_color", {NULL}, &setattr}, - {TYPE_STR, "button_label_inactive_color", {NULL}, &setattr}, - {TYPE_STR, "inputbox_color", {NULL}, &setattr}, - {TYPE_STR, "inputbox_border_color", {NULL}, &setattr}, - {TYPE_STR, "searchbox_color", {NULL}, &setattr}, - {TYPE_STR, "searchbox_title_color", {NULL}, &setattr}, - {TYPE_STR, "searchbox_border_color", {NULL}, &setattr}, - {TYPE_STR, "position_indicator_color", {NULL}, &setattr}, - {TYPE_STR, "menubox_color", {NULL}, &setattr}, - {TYPE_STR, "menubox_border_color", {NULL}, &setattr}, - {TYPE_STR, "item_color", {NULL}, &setattr}, - {TYPE_STR, "item_selected_color", {NULL}, &setattr}, - {TYPE_STR, "tag_color", {NULL}, &setattr}, - {TYPE_STR, "tag_selected_color", {NULL}, &setattr}, - {TYPE_STR, "tag_key_color", {NULL}, &setattr}, - {TYPE_STR, "tag_key_selected_color", {NULL}, &setattr}, - {TYPE_STR, "check_color", {NULL}, &setattr}, - {TYPE_STR, "check_selected_color", {NULL}, &setattr}, - {TYPE_STR, "uarrow_color", {NULL}, &setattr}, - {TYPE_STR, "darrow_color", {NULL}, &setattr}, - {TYPE_STR, "itemhelp_color", {NULL}, &setattr}, - {TYPE_STR, "form_active_text_color", {NULL}, &setattr}, - {TYPE_STR, "form_text_color", {NULL}, &setattr}, - {TYPE_STR, "form_item_readonly_color", {NULL}, &setattr}, - {TYPE_STR, "gauge_color", {gauge_color}, &setattr}, +static struct fp_config dialogrc_config[] = { + /* TYPE Directive DEFAULT HANDLER */ + {FP_TYPE_INT, "aspect", {(void *)0}, &setnum}, + {FP_TYPE_STR, "separate_widget", {separator}, &setstr}, + {FP_TYPE_INT, "tab_len", {(void *)0}, &setnum}, + {FP_TYPE_BOOL, "visit_items", {(void *)0}, &setbool}, + {FP_TYPE_BOOL, "use_shadow", {(void *)1}, &setbool}, + {FP_TYPE_BOOL, "use_colors", {(void *)1}, &setbool}, + {FP_TYPE_STR, "screen_color", {NULL}, &setattr}, + {FP_TYPE_STR, "shadow_color", {NULL}, &setattr}, + {FP_TYPE_STR, "dialog_color", {NULL}, &setattr}, + {FP_TYPE_STR, "title_color", {NULL}, &setattr}, + {FP_TYPE_STR, "border_color", {NULL}, &setattr}, + {FP_TYPE_STR, "button_active_color", {NULL}, &setattr}, + {FP_TYPE_STR, "button_inactive_color", {NULL}, &setattr}, + {FP_TYPE_STR, "button_key_active_color", {NULL}, &setattr}, + {FP_TYPE_STR, "button_key_inactive_color", {NULL}, &setattr}, + {FP_TYPE_STR, "button_label_active_color", {NULL}, &setattr}, + {FP_TYPE_STR, "button_label_inactive_color",{NULL}, &setattr}, + {FP_TYPE_STR, "inputbox_color", {NULL}, &setattr}, + {FP_TYPE_STR, "inputbox_border_color", {NULL}, &setattr}, + {FP_TYPE_STR, "searchbox_color", {NULL}, &setattr}, + {FP_TYPE_STR, "searchbox_title_color", {NULL}, &setattr}, + {FP_TYPE_STR, "searchbox_border_color", {NULL}, &setattr}, + {FP_TYPE_STR, "position_indicator_color", {NULL}, &setattr}, + {FP_TYPE_STR, "menubox_color", {NULL}, &setattr}, + {FP_TYPE_STR, "menubox_border_color", {NULL}, &setattr}, + {FP_TYPE_STR, "item_color", {NULL}, &setattr}, + {FP_TYPE_STR, "item_selected_color", {NULL}, &setattr}, + {FP_TYPE_STR, "tag_color", {NULL}, &setattr}, + {FP_TYPE_STR, "tag_selected_color", {NULL}, &setattr}, + {FP_TYPE_STR, "tag_key_color", {NULL}, &setattr}, + {FP_TYPE_STR, "tag_key_selected_color", {NULL}, &setattr}, + {FP_TYPE_STR, "check_color", {NULL}, &setattr}, + {FP_TYPE_STR, "check_selected_color", {NULL}, &setattr}, + {FP_TYPE_STR, "uarrow_color", {NULL}, &setattr}, + {FP_TYPE_STR, "darrow_color", {NULL}, &setattr}, + {FP_TYPE_STR, "itemhelp_color", {NULL}, &setattr}, + {FP_TYPE_STR, "form_active_text_color", {NULL}, &setattr}, + {FP_TYPE_STR, "form_text_color", {NULL}, &setattr}, + {FP_TYPE_STR, "form_item_readonly_color", {NULL}, &setattr}, + {FP_TYPE_STR, "gauge_color", {gauge_color}, &setattr}, {0, NULL, {0}, NULL} }; @@ -108,7 +108,7 @@ static struct config dialogrc_config[] = * figpar call-back for interpreting value as .dialogrc `Attribute' */ static int -setattr(struct config *option, uint32_t line __unused, +setattr(struct fp_config *option, uint32_t line __unused, char *directive __unused, char *value) { char *cp = value; @@ -204,7 +204,7 @@ write_attrbuf: * figpar call-back for interpreting value as .dialogrc `Boolean' */ static int -setbool(struct config *option, uint32_t line __unused, +setbool(struct fp_config *option, uint32_t line __unused, char *directive __unused, char *value) { @@ -227,8 +227,8 @@ setbool(struct config *option, uint32_t * figpar call-back for interpreting value as .dialogrc `Number' */ static int -setnum(struct config *option, uint32_t line __unused, char *directive __unused, - char *value) +setnum(struct fp_config *option, uint32_t line __unused, + char *directive __unused, char *value) { if (option == NULL) { @@ -247,8 +247,8 @@ setnum(struct config *option, uint32_t l * figpar call-back for interpreting value as .dialogrc `String' */ static int -setstr(struct config *option, uint32_t line __unused, char *directive __unused, - char *value) +setstr(struct fp_config *option, uint32_t line __unused, + char *directive __unused, char *value) { size_t len; @@ -315,7 +315,7 @@ parse_dialogrc(void) } /* Process file (either $DIALOGRC if set, or `$HOME/.dialogrc') */ - res = parse_config(dialogrc_config, path, NULL, BREAK_ON_EQUALS); + res = parse_config(dialogrc_config, path, NULL, FP_BREAK_ON_EQUALS); /* Set some globals based on what we parsed */ use_shadow = dialogrc_config_option("use_shadow")->value.boolean; @@ -328,10 +328,10 @@ parse_dialogrc(void) /* * Return a pointer to the `.dialogrc' config option specific to `directive' or - * static dummy_config (full of NULLs) if none found (see get_config_option(3); - * part of figpar(3)). + * static fp_dummy_config (full of NULLs) if none found (see + * get_config_option(3); part of figpar(3)). */ -struct config * +struct fp_config * dialogrc_config_option(const char *directive) { return (get_config_option(dialogrc_config, directive)); Modified: stable/9/lib/libdpv/dialogrc.h ============================================================================== --- stable/9/lib/libdpv/dialogrc.h Tue Nov 25 16:24:31 2014 (r275050) +++ stable/9/lib/libdpv/dialogrc.h Tue Nov 25 16:45:40 2014 (r275051) @@ -48,9 +48,9 @@ extern char gauge_color[]; extern char separator[]; __BEGIN_DECLS -void dialogrc_free(void); -int parse_dialogrc(void); -struct config *dialogrc_config_option(const char *_directive); +void dialogrc_free(void); +int parse_dialogrc(void); +struct fp_config *dialogrc_config_option(const char *_directive); __END_DECLS #endif /* !_DIALOGRC_H_ */ Modified: stable/9/lib/libdpv/dpv.c ============================================================================== --- stable/9/lib/libdpv/dpv.c Tue Nov 25 16:24:31 2014 (r275050) +++ stable/9/lib/libdpv/dpv.c Tue Nov 25 16:45:40 2014 (r275051) @@ -77,8 +77,8 @@ char *msg_pending = NULL; /* dpv_config. char *pprompt = NULL; /* dpv_config.pprompt */ /* Status-Line format for when using dialog(3) */ -const char *status_format_custom = NULL; -char status_format_default[DPV_STATUS_FORMAT_MAX]; +static const char *status_format_custom = NULL; +static char status_format_default[DPV_STATUS_FORMAT_MAX]; /* * Takes a pointer to a dpv_config structure containing layout details and Modified: stable/9/usr.bin/dpv/Makefile ============================================================================== --- stable/9/usr.bin/dpv/Makefile Tue Nov 25 16:24:31 2014 (r275050) +++ stable/9/usr.bin/dpv/Makefile Tue Nov 25 16:45:40 2014 (r275051) @@ -4,8 +4,8 @@ PROG= dpv CFLAGS+= -I${.CURDIR} -DPADD+= ${LIBDPV} ${LIBDIALOG} ${LIBFIGPAR} ${LIBNCURSES} ${LIBUTIL} -LDADD+= -ldpv -ldialog -lfigpar -lncurses -lutil +DPADD= ${LIBDPV} ${LIBDIALOG} ${LIBFIGPAR} ${LIBNCURSESW} ${LIBUTIL} ${LIBM} +LDADD= -ldpv -ldialog -lfigpar -lncursesw -lutil -lm WARNS?= 6 Modified: stable/9/usr.bin/dpv/dpv.c ============================================================================== --- stable/9/usr.bin/dpv/dpv.c Tue Nov 25 16:24:31 2014 (r275050) +++ stable/9/usr.bin/dpv/dpv.c Tue Nov 25 16:45:40 2014 (r275051) @@ -177,7 +177,7 @@ operate_on_bytes(struct dpv_file_node *f fsync(out); } - overall_read += r; + dpv_overall_read += r; file->read += r; /* Calculate percentage of completion (if possible) */ @@ -226,7 +226,7 @@ operate_on_lines(struct dpv_file_node *f /* Process the buffer for number of lines */ for (p = buf; p != NULL && *p != '\0';) if ((p = strchr(p, '\n')) != NULL) - overall_read++, p++, file->read++; + dpv_overall_read++, p++, file->read++; /* Calculate percentage of completion (if possible) */ if (file->length >= 0) { From owner-svn-src-stable-9@FreeBSD.ORG Tue Nov 25 17:08:16 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DA09B4B; Tue, 25 Nov 2014 17:08:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5990C8B5; Tue, 25 Nov 2014 17:08:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPH8G0R067971; Tue, 25 Nov 2014 17:08:16 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPH8Fi4067969; Tue, 25 Nov 2014 17:08:15 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201411251708.sAPH8Fi4067969@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 25 Nov 2014 17:08:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r275056 - in stable/9: lib usr.bin X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 17:08:16 -0000 Author: dteske Date: Tue Nov 25 17:08:15 2014 New Revision: 275056 URL: https://svnweb.freebsd.org/changeset/base/275056 Log: Similar to r274192: Enable dpv(1,3): Introduced [disabled] via r275047. This is a direct commit to stable/9 because stable/10 and above use a better dependency calculation routine (versus simple ordering). Thanks to: ngie, ian, jelischer, shurd, bapt Modified: stable/9/lib/Makefile stable/9/usr.bin/Makefile Modified: stable/9/lib/Makefile ============================================================================== --- stable/9/lib/Makefile Tue Nov 25 17:07:56 2014 (r275055) +++ stable/9/lib/Makefile Tue Nov 25 17:08:15 2014 (r275056) @@ -22,6 +22,7 @@ # libsbuf must be built before libcam. # libtacplus must be built before libpam. # libutil must be built before libpam. +# libfigpar must be built before libdpv (but after ncurses and libutil). # libypclnt must be built before libpam. # libgssapi must be built before librpcsec_gss # @@ -48,6 +49,7 @@ SUBDIR_ORDERED= ${_csu} \ libsbuf \ libtacplus \ libutil \ + libfigpar \ ${_libypclnt} \ ${_libcxxrt} \ ${_libcplusplus} @@ -67,12 +69,12 @@ SUBDIR= ${SUBDIR_ORDERED} \ libdevinfo \ libdevstat \ libdisk \ + libdpv \ libdwarf \ libedit \ ${_libefi} \ libexpat \ libfetch \ - libfigpar \ libftpio \ libgeom \ ${_libgpib} \ Modified: stable/9/usr.bin/Makefile ============================================================================== --- stable/9/usr.bin/Makefile Tue Nov 25 17:07:56 2014 (r275055) +++ stable/9/usr.bin/Makefile Tue Nov 25 17:08:15 2014 (r275056) @@ -36,6 +36,7 @@ SUBDIR= alias \ ctlstat \ cut \ dirname \ + dpv \ du \ ee \ elf2aout \ From owner-svn-src-stable-9@FreeBSD.ORG Tue Nov 25 22:16:45 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5381DE3D; Tue, 25 Nov 2014 22:16:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34D00F51; Tue, 25 Nov 2014 22:16:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAPMGjGA018171; Tue, 25 Nov 2014 22:16:45 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAPMGh8g018165; Tue, 25 Nov 2014 22:16:43 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201411252216.sAPMGh8g018165@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 25 Nov 2014 22:16:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r275081 - in stable/9: . gnu/lib/libdialog lib lib/libdpv lib/libfigpar share/mk sys/sys usr.bin usr.bin/dpv X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2014 22:16:45 -0000 Author: dteske Date: Tue Nov 25 22:16:43 2014 New Revision: 275081 URL: https://svnweb.freebsd.org/changeset/base/275081 Log: Revert revisions 275047, 275051, and 275056. Oops, dpv(1,3) requires dialog-1.2-20130923 or higher (which I introduced to HEAD via r255852 prior to the creation of the stable/10 branch; however it never got merged to stable/9 so we can't have dpv in stable/9). Brief summary of reverted revisions: r275047: Add dpv(1,3)/figpar(3) r275051: Fixes r275056: Enable compilation of dpv(1,3) Pointy-hat: me Deleted: stable/9/lib/libdpv/ stable/9/lib/libfigpar/ stable/9/usr.bin/dpv/ Modified: stable/9/Makefile.inc1 (contents, props changed) stable/9/gnu/lib/libdialog/Makefile stable/9/lib/Makefile (contents, props changed) stable/9/share/mk/bsd.libnames.mk stable/9/sys/sys/param.h stable/9/usr.bin/Makefile Directory Properties: stable/9/ (props changed) stable/9/gnu/lib/libdialog/ (props changed) stable/9/lib/ (props changed) stable/9/share/mk/ (props changed) stable/9/sys/sys/ (props changed) stable/9/usr.bin/ (props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Tue Nov 25 22:10:31 2014 (r275080) +++ stable/9/Makefile.inc1 Tue Nov 25 22:16:43 2014 (r275081) @@ -1353,7 +1353,6 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 ${_kerberos5_lib_libroken} \ lib/libbz2 lib/libcom_err lib/libcrypt \ lib/libelf lib/libexpat \ - lib/libfigpar \ ${_lib_libgssapi} ${_lib_libipx} \ lib/libkiconv lib/libkvm lib/liblzma lib/libmd \ lib/ncurses/ncurses lib/ncurses/ncursesw \ @@ -1364,8 +1363,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 ${_cddl_lib_libzfs_core} \ lib/libutil ${_lib_libypclnt} lib/libz lib/msun \ ${_secure_lib_libcrypto} ${_lib_libldns} \ - ${_secure_lib_libssh} ${_secure_lib_libssl} \ - gnu/lib/libdialog + ${_secure_lib_libssh} ${_secure_lib_libssl} .if ${MK_LIBTHR} != "no" _lib_libthr= lib/libthr @@ -1445,8 +1443,6 @@ _lib_libypclnt= lib/libypclnt lib/libradius__L: lib/libmd__L .endif -gnu/lib/libdialog__L: lib/msun__L lib/ncurses/ncursesw__L - .for _lib in ${_prereq_libs} ${_lib}__PL: .PHONY .if exists(${.CURDIR}/${_lib}) Modified: stable/9/gnu/lib/libdialog/Makefile ============================================================================== --- stable/9/gnu/lib/libdialog/Makefile Tue Nov 25 22:10:31 2014 (r275080) +++ stable/9/gnu/lib/libdialog/Makefile Tue Nov 25 22:16:43 2014 (r275081) @@ -13,9 +13,6 @@ SRCS= argv.c arrows.c buttons.c calenda INCS= dialog.h dlg_colors.h dlg_config.h dlg_keys.h MAN= dialog.3 -DPADD= ${LIBNCURSESW} ${LIBM} -LDADD= -lncursesw -lm - CFLAGS+= -I${.CURDIR} -I${DIALOG} -D_XOPEN_SOURCE_EXTENDED .PATH: ${DIALOG} WARNS?= 1 Modified: stable/9/lib/Makefile ============================================================================== --- stable/9/lib/Makefile Tue Nov 25 22:10:31 2014 (r275080) +++ stable/9/lib/Makefile Tue Nov 25 22:16:43 2014 (r275081) @@ -22,7 +22,6 @@ # libsbuf must be built before libcam. # libtacplus must be built before libpam. # libutil must be built before libpam. -# libfigpar must be built before libdpv (but after ncurses and libutil). # libypclnt must be built before libpam. # libgssapi must be built before librpcsec_gss # @@ -49,7 +48,6 @@ SUBDIR_ORDERED= ${_csu} \ libsbuf \ libtacplus \ libutil \ - libfigpar \ ${_libypclnt} \ ${_libcxxrt} \ ${_libcplusplus} @@ -69,7 +67,6 @@ SUBDIR= ${SUBDIR_ORDERED} \ libdevinfo \ libdevstat \ libdisk \ - libdpv \ libdwarf \ libedit \ ${_libefi} \ Modified: stable/9/share/mk/bsd.libnames.mk ============================================================================== --- stable/9/share/mk/bsd.libnames.mk Tue Nov 25 22:10:31 2014 (r275080) +++ stable/9/share/mk/bsd.libnames.mk Tue Nov 25 22:16:43 2014 (r275081) @@ -45,13 +45,11 @@ LIBDEVSTAT?= ${DESTDIR}${LIBDIR}/libdevs LIBDIALOG?= ${DESTDIR}${LIBDIR}/libdialog.a LIBDISK?= ${DESTDIR}${LIBDIR}/libdisk.a LIBDNS?= ${DESTDIR}${LIBDIR}/libdns.a -LIBDPV?= ${DESTDIR}${LIBDIR}/libdpv.a LIBDTRACE?= ${DESTDIR}${LIBDIR}/libdtrace.a LIBDWARF?= ${DESTDIR}${LIBDIR}/libdwarf.a LIBEDIT?= ${DESTDIR}${LIBDIR}/libedit.a LIBELF?= ${DESTDIR}${LIBDIR}/libelf.a LIBFETCH?= ${DESTDIR}${LIBDIR}/libfetch.a -LIBFIGPAR?= ${DESTDIR}${LIBDIR}/libfigpar.a LIBFL?= "don't use LIBFL, use LIBL" LIBFORM?= ${DESTDIR}${LIBDIR}/libform.a LIBFTPIO?= ${DESTDIR}${LIBDIR}/libftpio.a Modified: stable/9/sys/sys/param.h ============================================================================== --- stable/9/sys/sys/param.h Tue Nov 25 22:10:31 2014 (r275080) +++ stable/9/sys/sys/param.h Tue Nov 25 22:16:43 2014 (r275081) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 903507 /* Master, propagated to newvers */ +#define __FreeBSD_version 903506 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: stable/9/usr.bin/Makefile ============================================================================== --- stable/9/usr.bin/Makefile Tue Nov 25 22:10:31 2014 (r275080) +++ stable/9/usr.bin/Makefile Tue Nov 25 22:16:43 2014 (r275081) @@ -36,7 +36,6 @@ SUBDIR= alias \ ctlstat \ cut \ dirname \ - dpv \ du \ ee \ elf2aout \ From owner-svn-src-stable-9@FreeBSD.ORG Wed Nov 26 00:47:37 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A01F7499; Wed, 26 Nov 2014 00:47:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C559103; Wed, 26 Nov 2014 00:47:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQ0lbLW090153; Wed, 26 Nov 2014 00:47:37 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQ0lboA090151; Wed, 26 Nov 2014 00:47:37 GMT (envelope-from np@FreeBSD.org) Message-Id: <201411260047.sAQ0lboA090151@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 26 Nov 2014 00:47:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r275093 - in stable/9/sys/dev/cxgbe: . common X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 00:47:37 -0000 Author: np Date: Wed Nov 26 00:47:36 2014 New Revision: 275093 URL: https://svnweb.freebsd.org/changeset/base/275093 Log: MFC r274724: cxgbe(4): figure out the max payload size and save it for later. Modified: stable/9/sys/dev/cxgbe/common/common.h stable/9/sys/dev/cxgbe/t4_main.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/9/sys/dev/cxgbe/common/common.h Wed Nov 26 00:44:48 2014 (r275092) +++ stable/9/sys/dev/cxgbe/common/common.h Wed Nov 26 00:47:36 2014 (r275093) @@ -238,6 +238,7 @@ struct vpd_params { struct pci_params { unsigned int vpd_cap_addr; + unsigned int mps; unsigned short speed; unsigned short width; }; Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Wed Nov 26 00:44:48 2014 (r275092) +++ stable/9/sys/dev/cxgbe/t4_main.c Wed Nov 26 00:47:36 2014 (r275093) @@ -568,6 +568,8 @@ t4_attach(device_t dev) v = pci_read_config(dev, i + PCIER_DEVICE_CTL, 2); v |= PCIEM_CTL_RELAXED_ORD_ENABLE; pci_write_config(dev, i + PCIER_DEVICE_CTL, v, 2); + + sc->params.pci.mps = 128 << ((v & PCIEM_CTL_MAX_PAYLOAD) >> 5); } snprintf(sc->lockname, sizeof(sc->lockname), "%s", From owner-svn-src-stable-9@FreeBSD.ORG Wed Nov 26 09:43:32 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C445D28F; Wed, 26 Nov 2014 09:43:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95742CE8; Wed, 26 Nov 2014 09:43:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQ9hWOp042263; Wed, 26 Nov 2014 09:43:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQ9hW44042261; Wed, 26 Nov 2014 09:43:32 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201411260943.sAQ9hW44042261@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 26 Nov 2014 09:43:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r275108 - in stable/9/contrib/ofed: librdmacm/examples librdmacm/examples/build usr.lib X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 09:43:32 -0000 Author: hselasky Date: Wed Nov 26 09:43:31 2014 New Revision: 275108 URL: https://svnweb.freebsd.org/changeset/base/275108 Log: MFC r273774: Make some infiniband example utilities easily buildable: - Add new Makefiles. - Add more include directories when building. - Fixed a printf() formatting string. Sponsored by: Mellanox Technologies Added: stable/9/contrib/ofed/librdmacm/examples/build/ - copied from r273774, head/contrib/ofed/librdmacm/examples/build/ Modified: stable/9/contrib/ofed/librdmacm/examples/rping.c stable/9/contrib/ofed/usr.lib/Makefile.inc Directory Properties: stable/9/contrib/ (props changed) Modified: stable/9/contrib/ofed/librdmacm/examples/rping.c ============================================================================== --- stable/9/contrib/ofed/librdmacm/examples/rping.c Wed Nov 26 09:37:35 2014 (r275107) +++ stable/9/contrib/ofed/librdmacm/examples/rping.c Wed Nov 26 09:43:31 2014 (r275108) @@ -1148,8 +1148,9 @@ int main(int argc, char *argv[]) if ((cb->size < RPING_MIN_BUFSIZE) || (cb->size > (RPING_BUFSIZE - 1))) { fprintf(stderr, "Invalid size %d " - "(valid range is %Zd to %d)\n", - cb->size, RPING_MIN_BUFSIZE, RPING_BUFSIZE); + "(valid range is %d to %d)\n", + (int)cb->size, (int)(RPING_MIN_BUFSIZE), + (int)(RPING_BUFSIZE)); ret = EINVAL; } else DEBUG_LOG("size %d\n", (int) atoi(optarg)); Modified: stable/9/contrib/ofed/usr.lib/Makefile.inc ============================================================================== --- stable/9/contrib/ofed/usr.lib/Makefile.inc Wed Nov 26 09:37:35 2014 (r275107) +++ stable/9/contrib/ofed/usr.lib/Makefile.inc Wed Nov 26 09:43:31 2014 (r275108) @@ -7,11 +7,18 @@ COMPLIBDIR= ${OPENSMDIR}/complib VENDORLIBDIR= ${OPENSMDIR}/libvendor IBVERBSDIR= ${.CURDIR}/../../libibverbs IBINC= ${.CURDIR}/../../include +RDMACMDIR= ${.CURDIR}/../../librdmacm + +CFLAGS+= -I${.CURDIR} \ + -I${IBINC}/infiniband \ + -I${IBINC} \ + -I${IBCOMMONDIR}/include/infiniband \ + -I${IBCOMMONDIR}/include \ + -I${IBMADDIR}/include/infiniband \ + -I${IBMADDIR}/include \ + -I${UMADDIR}/include/infiniband \ + -I${UMADDIR}/include \ + -I${OPENSMDIR}/include \ + -I${RDMACMDIR}/include \ + -I${IBVERBSDIR}/include -CFLAGS+= -I${.CURDIR} -I${IBINC}/infiniband -CFLAGS+= -I${IBCOMMONDIR}/include/infiniband -CFLAGS+= -I${IBMADDIR}/include/infiniband -CFLAGS+= -I${UMADDIR}/include/infiniband -CFLAGS+= -I${OPENSMDIR}/include -# CFLAGS+= -I${UMADDIR}/include -# CFLAGS+= -I${IBVERBSDIR}/include From owner-svn-src-stable-9@FreeBSD.ORG Sat Nov 29 04:21:42 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 388FCF84; Sat, 29 Nov 2014 04:21:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23F79F5; Sat, 29 Nov 2014 04:21:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAT4Lg3R035101; Sat, 29 Nov 2014 04:21:42 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAT4LeTX034182; Sat, 29 Nov 2014 04:21:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201411290421.sAT4LeTX034182@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 29 Nov 2014 04:21:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r275229 - stable/9/contrib/ofed/libmlx4/src X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2014 04:21:42 -0000 Author: hselasky Date: Sat Nov 29 04:21:40 2014 New Revision: 275229 URL: https://svnweb.freebsd.org/changeset/base/275229 Log: MFC r275109: Add support for 64-byte CQE size. Sponsored by: Mellanox Technologies Modified: stable/9/contrib/ofed/libmlx4/src/cq.c stable/9/contrib/ofed/libmlx4/src/mlx4-abi.h stable/9/contrib/ofed/libmlx4/src/mlx4.c stable/9/contrib/ofed/libmlx4/src/mlx4.h stable/9/contrib/ofed/libmlx4/src/verbs.c Directory Properties: stable/9/contrib/ (props changed) Modified: stable/9/contrib/ofed/libmlx4/src/cq.c ============================================================================== --- stable/9/contrib/ofed/libmlx4/src/cq.c Sat Nov 29 04:18:56 2014 (r275228) +++ stable/9/contrib/ofed/libmlx4/src/cq.c Sat Nov 29 04:21:40 2014 (r275229) @@ -109,15 +109,16 @@ struct mlx4_err_cqe { static struct mlx4_cqe *get_cqe(struct mlx4_cq *cq, int entry) { - return cq->buf.buf + entry * MLX4_CQ_ENTRY_SIZE; + return cq->buf.buf + entry * cq->cqe_size; } static void *get_sw_cqe(struct mlx4_cq *cq, int n) { struct mlx4_cqe *cqe = get_cqe(cq, n & cq->ibv_cq.cqe); + struct mlx4_cqe *tcqe = cq->cqe_size == 64 ? cqe + 1 : cqe; - return (!!(cqe->owner_sr_opcode & MLX4_CQE_OWNER_MASK) ^ - !!(n & (cq->ibv_cq.cqe + 1))) ? NULL : cqe; + return (!!(tcqe->owner_sr_opcode & MLX4_CQE_OWNER_MASK) ^ + !!(n & (cq->ibv_cq.cqe + 1))) ? NULL : tcqe; } static struct mlx4_cqe *next_cqe_sw(struct mlx4_cq *cq) @@ -402,6 +403,7 @@ void __mlx4_cq_clean(struct mlx4_cq *cq, uint8_t owner_bit; int nfreed = 0; int is_xrc_srq = 0; + int cqe_inc = cq->cqe_size == 64 ? 1 : 0; if (srq && srq->ibv_srq.xrc_cq) is_xrc_srq = 1; @@ -423,6 +425,7 @@ void __mlx4_cq_clean(struct mlx4_cq *cq, */ while ((int) --prod_index - (int) cq->cons_index >= 0) { cqe = get_cqe(cq, prod_index & cq->ibv_cq.cqe); + cqe += cqe_inc; if (is_xrc_srq && (ntohl(cqe->g_mlpath_rqpn & 0xffffff) == srq->srqn) && !(cqe->owner_sr_opcode & MLX4_CQE_IS_SEND_MASK)) { @@ -434,6 +437,7 @@ void __mlx4_cq_clean(struct mlx4_cq *cq, ++nfreed; } else if (nfreed) { dest = get_cqe(cq, (prod_index + nfreed) & cq->ibv_cq.cqe); + dest += cqe_inc; owner_bit = dest->owner_sr_opcode & MLX4_CQE_OWNER_MASK; memcpy(dest, cqe, sizeof *cqe); dest->owner_sr_opcode = owner_bit | @@ -473,28 +477,32 @@ void mlx4_cq_resize_copy_cqes(struct mlx { struct mlx4_cqe *cqe; int i; + int cqe_inc = cq->cqe_size == 64 ? 1 : 0; i = cq->cons_index; cqe = get_cqe(cq, (i & old_cqe)); + cqe += cqe_inc; while ((cqe->owner_sr_opcode & MLX4_CQE_OPCODE_MASK) != MLX4_CQE_OPCODE_RESIZE) { cqe->owner_sr_opcode = (cqe->owner_sr_opcode & ~MLX4_CQE_OWNER_MASK) | (((i + 1) & (cq->ibv_cq.cqe + 1)) ? MLX4_CQE_OWNER_MASK : 0); - memcpy(buf + ((i + 1) & cq->ibv_cq.cqe) * MLX4_CQ_ENTRY_SIZE, - cqe, MLX4_CQ_ENTRY_SIZE); + memcpy(buf + ((i + 1) & cq->ibv_cq.cqe) * cq->cqe_size, + cqe - cqe_inc, cq->cqe_size); ++i; cqe = get_cqe(cq, (i & old_cqe)); + cqe += cqe_inc; } ++cq->cons_index; } -int mlx4_alloc_cq_buf(struct mlx4_device *dev, struct mlx4_buf *buf, int nent) +int mlx4_alloc_cq_buf(struct mlx4_device *dev, struct mlx4_buf *buf, int nent, + int entry_size) { - if (mlx4_alloc_buf(buf, align(nent * MLX4_CQ_ENTRY_SIZE, dev->page_size), + if (mlx4_alloc_buf(buf, align(nent * entry_size, dev->page_size), dev->page_size)) return -1; - memset(buf->buf, 0, nent * MLX4_CQ_ENTRY_SIZE); + memset(buf->buf, 0, nent * entry_size); return 0; } Modified: stable/9/contrib/ofed/libmlx4/src/mlx4-abi.h ============================================================================== --- stable/9/contrib/ofed/libmlx4/src/mlx4-abi.h Sat Nov 29 04:18:56 2014 (r275228) +++ stable/9/contrib/ofed/libmlx4/src/mlx4-abi.h Sat Nov 29 04:21:40 2014 (r275229) @@ -40,9 +40,11 @@ struct mlx4_alloc_ucontext_resp { struct ibv_get_context_resp ibv_resp; + __u32 dev_caps; __u32 qp_tab_size; __u16 bf_reg_size; __u16 bf_regs_per_page; + __u32 cqe_size; }; struct mlx4_alloc_pd_resp { Modified: stable/9/contrib/ofed/libmlx4/src/mlx4.c ============================================================================== --- stable/9/contrib/ofed/libmlx4/src/mlx4.c Sat Nov 29 04:18:56 2014 (r275228) +++ stable/9/contrib/ofed/libmlx4/src/mlx4.c Sat Nov 29 04:21:40 2014 (r275229) @@ -201,6 +201,7 @@ static struct ibv_context *mlx4_alloc_co context->bf_buf_size = 0; } + context->cqe_size = resp.cqe_size; pthread_spin_init(&context->uar_lock, PTHREAD_PROCESS_PRIVATE); context->ibv_ctx.ops = mlx4_ctx_ops; Modified: stable/9/contrib/ofed/libmlx4/src/mlx4.h ============================================================================== --- stable/9/contrib/ofed/libmlx4/src/mlx4.h Sat Nov 29 04:18:56 2014 (r275228) +++ stable/9/contrib/ofed/libmlx4/src/mlx4.h Sat Nov 29 04:21:40 2014 (r275229) @@ -103,10 +103,6 @@ #endif enum { - MLX4_CQ_ENTRY_SIZE = 0x20 -}; - -enum { MLX4_STAT_RATE_OFFSET = 5 }; @@ -192,6 +188,7 @@ struct mlx4_context { int max_qp_wr; int max_sge; int max_cqe; + int cqe_size; struct { struct mlx4_srq **table; @@ -226,6 +223,7 @@ struct mlx4_cq { uint32_t *set_ci_db; uint32_t *arm_db; int arm_sn; + int cqe_size; }; struct mlx4_srq { @@ -369,7 +367,8 @@ int mlx4_dereg_mr(struct ibv_mr *mr); struct ibv_cq *mlx4_create_cq(struct ibv_context *context, int cqe, struct ibv_comp_channel *channel, int comp_vector); -int mlx4_alloc_cq_buf(struct mlx4_device *dev, struct mlx4_buf *buf, int nent); +int mlx4_alloc_cq_buf(struct mlx4_device *dev, struct mlx4_buf *buf, int nent, + int entry_size); int mlx4_resize_cq(struct ibv_cq *cq, int cqe); int mlx4_destroy_cq(struct ibv_cq *cq); int mlx4_poll_cq(struct ibv_cq *cq, int ne, struct ibv_wc *wc); Modified: stable/9/contrib/ofed/libmlx4/src/verbs.c ============================================================================== --- stable/9/contrib/ofed/libmlx4/src/verbs.c Sat Nov 29 04:18:56 2014 (r275228) +++ stable/9/contrib/ofed/libmlx4/src/verbs.c Sat Nov 29 04:21:40 2014 (r275229) @@ -168,6 +168,7 @@ struct ibv_cq *mlx4_create_cq(struct ibv struct mlx4_create_cq_resp resp; struct mlx4_cq *cq; int ret; + struct mlx4_context *mctx = to_mctx(context); /* Sanity check CQ size before proceeding */ if (cqe > 0x3fffff) @@ -184,9 +185,11 @@ struct ibv_cq *mlx4_create_cq(struct ibv cqe = align_queue_size(cqe + 1); - if (mlx4_alloc_cq_buf(to_mdev(context->device), &cq->buf, cqe)) + if (mlx4_alloc_cq_buf(to_mdev(context->device), &cq->buf, cqe, mctx->cqe_size)) goto err; + cq->cqe_size = mctx->cqe_size; + cq->set_ci_db = mlx4_alloc_db(to_mctx(context), MLX4_DB_TYPE_CQ); if (!cq->set_ci_db) goto err_buf; @@ -247,7 +250,8 @@ int mlx4_resize_cq(struct ibv_cq *ibcq, goto out; } - ret = mlx4_alloc_cq_buf(to_mdev(ibcq->context->device), &buf, cqe); + ret = mlx4_alloc_cq_buf(to_mdev(ibcq->context->device), &buf, cqe, + cq->cqe_size); if (ret) goto out; From owner-svn-src-stable-9@FreeBSD.ORG Sat Nov 29 05:08:30 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5133C605; Sat, 29 Nov 2014 05:08:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24B8775A; Sat, 29 Nov 2014 05:08:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAT58Ubb055495; Sat, 29 Nov 2014 05:08:30 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAT58UqA055494; Sat, 29 Nov 2014 05:08:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201411290508.sAT58UqA055494@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 29 Nov 2014 05:08:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r275231 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2014 05:08:30 -0000 Author: hselasky Date: Sat Nov 29 05:08:29 2014 New Revision: 275231 URL: https://svnweb.freebsd.org/changeset/base/275231 Log: MFC r274017, r274088 and r275205: Provide an on-stack temporary buffer for small IOCTL requests. Avoiding a memory allocation per IOCTL request can give a significant speedup for applications which heavily rely on IOCTLs. Modified: stable/9/sys/kern/sys_generic.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/sys_generic.c ============================================================================== --- stable/9/sys/kern/sys_generic.c Sat Nov 29 05:07:24 2014 (r275230) +++ stable/9/sys/kern/sys_generic.c Sat Nov 29 05:08:29 2014 (r275231) @@ -74,6 +74,20 @@ __FBSDID("$FreeBSD$"); #include +/* + * The following macro defines how many bytes will be allocated from + * the stack instead of memory allocated when passing the IOCTL data + * structures from userspace and to the kernel. Some IOCTLs having + * small data structures are used very frequently and this small + * buffer on the stack gives a significant speedup improvement for + * those requests. The value of this define should be greater or equal + * to 64 bytes and should also be power of two. The data structure is + * currently hard-aligned to a 8-byte boundary on the stack. This + * should currently be sufficient for all supported platforms. + */ +#define SYS_IOCTL_SMALL_SIZE 128 /* bytes */ +#define SYS_IOCTL_SMALL_ALIGN 8 /* bytes */ + int iosize_max_clamp = 1; SYSCTL_INT(_debug, OID_AUTO, iosize_max_clamp, CTLFLAG_RW, &iosize_max_clamp, 0, "Clamp max i/o size to INT_MAX"); @@ -640,6 +654,7 @@ struct ioctl_args { int sys_ioctl(struct thread *td, struct ioctl_args *uap) { + u_char smalldata[SYS_IOCTL_SMALL_SIZE] __aligned(SYS_IOCTL_SMALL_ALIGN); u_long com; int arg, error; u_int size; @@ -674,17 +689,18 @@ sys_ioctl(struct thread *td, struct ioct arg = (intptr_t)uap->data; data = (void *)&arg; size = 0; - } else - data = malloc((u_long)size, M_IOCTLOPS, M_WAITOK); + } else { + if (size > SYS_IOCTL_SMALL_SIZE) + data = malloc((u_long)size, M_IOCTLOPS, M_WAITOK); + else + data = smalldata; + } } else data = (void *)&uap->data; if (com & IOC_IN) { error = copyin(uap->data, data, (u_int)size); - if (error) { - if (size > 0) - free(data, M_IOCTLOPS); - return (error); - } + if (error != 0) + goto out; } else if (com & IOC_OUT) { /* * Zero the buffer so the user always @@ -698,7 +714,8 @@ sys_ioctl(struct thread *td, struct ioct if (error == 0 && (com & IOC_OUT)) error = copyout(data, uap->data, (u_int)size); - if (size > 0) +out: + if (size > SYS_IOCTL_SMALL_SIZE) free(data, M_IOCTLOPS); return (error); } From owner-svn-src-stable-9@FreeBSD.ORG Sat Nov 29 23:10:20 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09B99346; Sat, 29 Nov 2014 23:10:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D02A1156; Sat, 29 Nov 2014 23:10:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sATNAJFr068876; Sat, 29 Nov 2014 23:10:19 GMT (envelope-from bryanv@FreeBSD.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sATNAJQs068875; Sat, 29 Nov 2014 23:10:19 GMT (envelope-from bryanv@FreeBSD.org) Message-Id: <201411292310.sATNAJQs068875@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bryanv set sender to bryanv@FreeBSD.org using -f From: Bryan Venteicher Date: Sat, 29 Nov 2014 23:10:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r275275 - stable/9/sys/dev/virtio/network X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2014 23:10:20 -0000 Author: bryanv Date: Sat Nov 29 23:10:19 2014 New Revision: 275275 URL: https://svnweb.freebsd.org/changeset/base/275275 Log: MFC r274325: Enable LRO by default when available on vtnet interfaces The prior change to not enable LRO by default has confused several people. The configurations where LRO is problematic is not the typical use case for VirtIO, and due to other issues, this often requires checksum offloading to be disabled anyways. Modified: stable/9/sys/dev/virtio/network/if_vtnet.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- stable/9/sys/dev/virtio/network/if_vtnet.c Sat Nov 29 23:05:01 2014 (r275274) +++ stable/9/sys/dev/virtio/network/if_vtnet.c Sat Nov 29 23:10:19 2014 (r275275) @@ -966,9 +966,14 @@ vtnet_setup_interface(struct vtnet_softc ifp->if_capabilities |= IFCAP_VLAN_HWTSO; } - if (virtio_with_feature(dev, VIRTIO_NET_F_GUEST_CSUM)) + if (virtio_with_feature(dev, VIRTIO_NET_F_GUEST_CSUM)) { ifp->if_capabilities |= IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6; + if (virtio_with_feature(dev, VIRTIO_NET_F_GUEST_TSO4) || + virtio_with_feature(dev, VIRTIO_NET_F_GUEST_TSO6)) + ifp->if_capabilities |= IFCAP_LRO; + } + if (ifp->if_capabilities & IFCAP_HWCSUM) { /* * VirtIO does not support VLAN tagging, but we can fake @@ -986,12 +991,6 @@ vtnet_setup_interface(struct vtnet_softc * Capabilities after here are not enabled by default. */ - if (ifp->if_capabilities & IFCAP_RXCSUM) { - if (virtio_with_feature(dev, VIRTIO_NET_F_GUEST_TSO4) || - virtio_with_feature(dev, VIRTIO_NET_F_GUEST_TSO6)) - ifp->if_capabilities |= IFCAP_LRO; - } - if (sc->vtnet_flags & VTNET_FLAG_VLAN_FILTER) { ifp->if_capabilities |= IFCAP_VLAN_HWFILTER;