From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 00:44:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD3B6A92; Sun, 7 Sep 2014 00:44:59 +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 A8BD71A26; Sun, 7 Sep 2014 00:44:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s870ixuE029315; Sun, 7 Sep 2014 00:44:59 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s870ixEv029314; Sun, 7 Sep 2014 00:44:59 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409070044.s870ixEv029314@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 7 Sep 2014 00:44: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: r271214 - stable/10/etc/rc.d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 00:44:59 -0000 Author: gjb Date: Sun Sep 7 00:44:59 2014 New Revision: 271214 URL: http://svnweb.freebsd.org/changeset/base/271214 Log: MFC r271078: Fix typo: s/_maske/_mask/ Approved by: re (rodrigc) Sponsored by: The FreeBSD Foundation Modified: stable/10/etc/rc.d/jail Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/jail ============================================================================== --- stable/10/etc/rc.d/jail Sat Sep 6 22:38:32 2014 (r271213) +++ stable/10/etc/rc.d/jail Sun Sep 7 00:44:59 2014 (r271214) @@ -319,7 +319,7 @@ jail_extract_address() _mask=${_mask:-/32} elif [ "${_type}" = "inet6" ]; then - # In case _maske is not set for IPv6, use /128. + # In case _mask is not set for IPv6, use /128. _mask=${_mask:-/128} fi } From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 00:46:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F458BC8; Sun, 7 Sep 2014 00:46:58 +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 5A9E01A33; Sun, 7 Sep 2014 00:46:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s870kwm4029599; Sun, 7 Sep 2014 00:46:58 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s870kwa5029598; Sun, 7 Sep 2014 00:46:58 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409070046.s870kwa5029598@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 7 Sep 2014 00:46:58 +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: r271215 - stable/9/etc/rc.d X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 00:46:58 -0000 Author: gjb Date: Sun Sep 7 00:46:57 2014 New Revision: 271215 URL: http://svnweb.freebsd.org/changeset/base/271215 Log: MFC r271078: Fix typo: s/_maske/_mask/ Sponsored by: The FreeBSD Foundation Modified: stable/9/etc/rc.d/jail Directory Properties: stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) Modified: stable/9/etc/rc.d/jail ============================================================================== --- stable/9/etc/rc.d/jail Sun Sep 7 00:44:59 2014 (r271214) +++ stable/9/etc/rc.d/jail Sun Sep 7 00:46:57 2014 (r271215) @@ -439,7 +439,7 @@ jail_extract_address() _mask=${_mask:-/32} elif [ "${_type}" = "inet6" ]; then - # In case _maske is not set for IPv6, use /128. + # In case _mask is not set for IPv6, use /128. _mask=${_mask:-/128} fi } From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 05:44:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CCDA27A; Sun, 7 Sep 2014 05:44:15 +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 711E4139D; Sun, 7 Sep 2014 05:44:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s875iF7K065314; Sun, 7 Sep 2014 05:44:15 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s875iFSD065313; Sun, 7 Sep 2014 05:44:15 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409070544.s875iFSD065313@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 7 Sep 2014 05:44:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271216 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 05:44:15 -0000 Author: glebius Date: Sun Sep 7 05:44:14 2014 New Revision: 271216 URL: http://svnweb.freebsd.org/changeset/base/271216 Log: Fix for r271182. Submitted by: mjg Pointy hat to: me, submitter and everyone who urged me to commit Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Sun Sep 7 00:46:57 2014 (r271215) +++ head/sys/kern/uipc_socket.c Sun Sep 7 05:44:14 2014 (r271216) @@ -3245,6 +3245,7 @@ static int filt_soread(struct knote *kn, long hint) { struct socket *so; + int ret; so = kn->kn_fp->f_data; SOCKBUF_LOCK_ASSERT(&so->so_rcv); @@ -3267,11 +3268,12 @@ filt_soread(struct knote *kn, long hint) CURVNET_SET(so->so_vnet); if (V_socket_hhh[HHOOK_FILT_SOREAD]->hhh_nhooks > 0) - /* This hook returning non-zero indicates an event, not error */ - return (hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD)); + ret = hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD); + else + ret = 0; CURVNET_RESTORE(); - - return (0); + + return (ret); } static void From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 05:44:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E54BE3B5; Sun, 7 Sep 2014 05:44:46 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 68B1713A3; Sun, 7 Sep 2014 05:44:45 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s875ibUK026979 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 7 Sep 2014 09:44:37 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s875ibJn026978; Sun, 7 Sep 2014 09:44:37 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 7 Sep 2014 09:44:37 +0400 From: Gleb Smirnoff To: Mateusz Guzik Subject: Re: svn commit: r271182 - head/sys/kern Message-ID: <20140907054437.GI17059@FreeBSD.org> References: <201409051950.s85JoI3r000416@svn.freebsd.org> <20140905195410.GA722@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140905195410.GA722@dft-labs.eu> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 05:44:47 -0000 On Fri, Sep 05, 2014 at 09:54:11PM +0200, Mateusz Guzik wrote: M> > + CURVNET_SET(so->so_vnet); M> > if (V_socket_hhh[HHOOK_FILT_SOREAD]->hhh_nhooks > 0) M> > /* This hook returning non-zero indicates an event, not error */ M> > return (hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD)); M> > + CURVNET_RESTORE(); M> > M> M> should not this be something like: M> error = hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD); M> CURVNET_RESTORE(); M> return (error); M> ? Thanks, Mateusz. Fixed. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 05:47:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1DE1F4F6; Sun, 7 Sep 2014 05:47:00 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7882813AC; Sun, 7 Sep 2014 05:46:58 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s875ku83026995 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 7 Sep 2014 09:46:56 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s875ku9E026994; Sun, 7 Sep 2014 09:46:56 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 7 Sep 2014 09:46:56 +0400 From: Gleb Smirnoff To: Adrian Chadd Subject: Re: svn commit: r271213 - head/sys/mips/include Message-ID: <20140907054656.GJ17059@FreeBSD.org> References: <201409062238.s86McXJE068463@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201409062238.s86McXJE068463@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 05:47:00 -0000 Thanks, Adrian. I noticed that some arches that use SFBUF_MAP actually override only the sf_buf_unmap() routine, and sf_buf_map() matches the default one. Might be a good idea to add SFBUF_UNMAP macro, and override sf_buf_map()/sf_buf_unmap() separately, to reduce copy-n-paste a little bit. On Sat, Sep 06, 2014 at 10:38:33PM +0000, Adrian Chadd wrote: A> Author: adrian A> Date: Sat Sep 6 22:38:32 2014 A> New Revision: 271213 A> URL: http://svnweb.freebsd.org/changeset/base/271213 A> A> Log: A> Implement local sfbuf_map and sfbuf_unmap for MIPS32. A> A> The pre-rework behaviour was not to keep the cached mappings around after A> the sfbuf was used but instead to recycle said mappings. A> A> PR: kern/193400 A> A> Modified: A> head/sys/mips/include/sf_buf.h A> head/sys/mips/include/vmparam.h A> A> Modified: head/sys/mips/include/sf_buf.h A> ============================================================================== A> --- head/sys/mips/include/sf_buf.h Sat Sep 6 22:37:47 2014 (r271212) A> +++ head/sys/mips/include/sf_buf.h Sat Sep 6 22:38:32 2014 (r271213) A> @@ -48,4 +48,23 @@ sf_buf_page(struct sf_buf *sf) A> } A> A> #endif /* __mips_n64 */ A> + A> +#ifndef __mips_n64 /* in 32 bit mode we manage our own mappings */ A> + A> +static inline void A> +sf_buf_map(struct sf_buf *sf, int flags) A> +{ A> + A> + pmap_qenter(sf->kva, &sf->m, 1); A> +} A> + A> +static inline int A> +sf_buf_unmap(struct sf_buf *sf) A> +{ A> + pmap_qremove(sf->kva, 1); A> + return (1); A> +} A> + A> +#endif /* ! __mips_n64 */ A> + A> #endif /* !_MACHINE_SF_BUF_H_ */ A> A> Modified: head/sys/mips/include/vmparam.h A> ============================================================================== A> --- head/sys/mips/include/vmparam.h Sat Sep 6 22:37:47 2014 (r271212) A> +++ head/sys/mips/include/vmparam.h Sat Sep 6 22:38:32 2014 (r271213) A> @@ -189,6 +189,7 @@ A> A> #ifndef __mips_n64 A> #define SFBUF A> +#define SFBUF_MAP A> #endif A> A> #endif /* !_MACHINE_VMPARAM_H_ */ A> -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 05:47:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56E92631; Sun, 7 Sep 2014 05:47:49 +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 4345A13AF; Sun, 7 Sep 2014 05:47:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s875lnrE065801; Sun, 7 Sep 2014 05:47:49 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s875ln5V065800; Sun, 7 Sep 2014 05:47:49 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409070547.s875ln5V065800@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 7 Sep 2014 05:47:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271217 - head/sys/mips/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 05:47:49 -0000 Author: glebius Date: Sun Sep 7 05:47:48 2014 New Revision: 271217 URL: http://svnweb.freebsd.org/changeset/base/271217 Log: style(9) Modified: head/sys/mips/include/sf_buf.h Modified: head/sys/mips/include/sf_buf.h ============================================================================== --- head/sys/mips/include/sf_buf.h Sun Sep 7 05:44:14 2014 (r271216) +++ head/sys/mips/include/sf_buf.h Sun Sep 7 05:47:48 2014 (r271217) @@ -47,9 +47,7 @@ sf_buf_page(struct sf_buf *sf) return ((vm_page_t)sf); } -#endif /* __mips_n64 */ - -#ifndef __mips_n64 /* in 32 bit mode we manage our own mappings */ +#else /* !__mips_n64 */ static inline void sf_buf_map(struct sf_buf *sf, int flags) @@ -61,10 +59,11 @@ sf_buf_map(struct sf_buf *sf, int flags) static inline int sf_buf_unmap(struct sf_buf *sf) { + pmap_qremove(sf->kva, 1); return (1); } -#endif /* ! __mips_n64 */ +#endif /* __mips_n64 */ #endif /* !_MACHINE_SF_BUF_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 05:53:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF4AAA70; Sun, 7 Sep 2014 05:53:58 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 31DAB14D1; Sun, 7 Sep 2014 05:53:57 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s875rtQs027039 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 7 Sep 2014 09:53:55 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s875rt4s027038; Sun, 7 Sep 2014 09:53:55 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 7 Sep 2014 09:53:55 +0400 From: Gleb Smirnoff To: Robert Watson Subject: Re: svn commit: r271174 - head/sys/sys Message-ID: <20140907055355.GK17059@FreeBSD.org> References: <201409051646.s85GkSm0008980@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201409051646.s85GkSm0008980@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 05:53:58 -0000 Robert, On Fri, Sep 05, 2014 at 04:46:28PM +0000, Robert Watson wrote: R> Author: rwatson R> Date: Fri Sep 5 16:46:28 2014 R> New Revision: 271174 R> URL: http://svnweb.freebsd.org/changeset/base/271174 R> R> Log: R> Clarify a diagnostic printf() in the mbuf code: M_EXT doesn't necessarily R> imply a cluster is attached; it could also refer to some other sort of R> external storage (e.g., an sf_buf). R> R> MFC after: 3 days R> Sponsored by: EMC / Isilon Storage Division R> R> Modified: R> head/sys/sys/mbuf.h R> R> Modified: head/sys/sys/mbuf.h R> ============================================================================== R> --- head/sys/sys/mbuf.h Fri Sep 5 16:40:47 2014 (r271173) R> +++ head/sys/sys/mbuf.h Fri Sep 5 16:46:28 2014 (r271174) R> @@ -672,7 +672,7 @@ m_clget(struct mbuf *m, int how) R> { R> R> if (m->m_flags & M_EXT) R> - printf("%s: %p mbuf already has cluster\n", __func__, m); R> + printf("%s: %p mbuf already has external storage\n", __func__, m); R> m->m_ext.ext_buf = (char *)NULL; R> uma_zalloc_arg(zone_clust, m, how); R> /* R> @@ -698,7 +698,7 @@ m_cljget(struct mbuf *m, int how, int si R> uma_zone_t zone; R> R> if (m && m->m_flags & M_EXT) R> - printf("%s: %p mbuf already has cluster\n", __func__, m); R> + printf("%s: %p mbuf already has external storage\n", __func__, m); R> if (m != NULL) R> m->m_ext.ext_buf = NULL; Shouldn't these be KASSERTs? I'm pretty sure that Andre put it as printf(9) because he was not sure it is correct. But since that time we never seen these prints in the wild, so they can be safely converted to KASSERTs. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 06:01:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67FA4BF4; Sun, 7 Sep 2014 06:01:44 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DB4E214F9; Sun, 7 Sep 2014 06:01:43 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s8761fwr027102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 7 Sep 2014 10:01:41 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s8761f0P027101; Sun, 7 Sep 2014 10:01:41 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 7 Sep 2014 10:01:41 +0400 From: Gleb Smirnoff To: Michael Tuexen Subject: Re: svn commit: r271204 - head/sys/netinet Message-ID: <20140907060141.GL17059@FreeBSD.org> References: <201409061912.s86JCF13069516@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201409061912.s86JCF13069516@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 06:01:44 -0000 Michael, On Sat, Sep 06, 2014 at 07:12:15PM +0000, Michael Tuexen wrote: M> Author: tuexen M> Date: Sat Sep 6 19:12:14 2014 M> New Revision: 271204 M> URL: http://svnweb.freebsd.org/changeset/base/271204 M> M> Log: M> Fix the handling of sysctl variables when used with VIMAGE. M> While there do some cleanup of the code. Note that after r261590 you don't need SYSCTL_VNET_* macros. You can use base SYSCTL_* macros adding CTLFLAG_VNET. SCTP was/is the major user of SYSCTL_VNET_* macros. If it is cleansed, then I can fix the rest and then we probably can remove their declarations. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 06:12:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D939E84; Sun, 7 Sep 2014 06:12:34 +0000 (UTC) Received: from cyrus.watson.org (cyrus.watson.org [198.74.231.69]) by mx1.freebsd.org (Postfix) with ESMTP id 495AF1796; Sun, 7 Sep 2014 06:12:34 +0000 (UTC) Received: from aca80381.ipt.aol.com (unknown [123.63.148.51]) by cyrus.watson.org (Postfix) with ESMTPSA id F05C746B7F; Sun, 7 Sep 2014 02:12:30 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r271174 - head/sys/sys From: "Robert N. M. Watson" In-Reply-To: <20140907055355.GK17059@FreeBSD.org> Date: Sun, 7 Sep 2014 11:42:24 +0530 Content-Transfer-Encoding: quoted-printable Message-Id: <68A880D5-01DD-4CFA-9429-B5EDE9891DCA@FreeBSD.org> References: <201409051646.s85GkSm0008980@svn.freebsd.org> <20140907055355.GK17059@FreeBSD.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 06:12:34 -0000 On 7 Sep 2014, at 11:23, Gleb Smirnoff wrote: > R> Modified: head/sys/sys/mbuf.h > R> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > R> --- head/sys/sys/mbuf.h Fri Sep 5 16:40:47 2014 = (r271173) > R> +++ head/sys/sys/mbuf.h Fri Sep 5 16:46:28 2014 = (r271174) > R> @@ -672,7 +672,7 @@ m_clget(struct mbuf *m, int how) > R> { > R> =20 > R> if (m->m_flags & M_EXT) > R> - printf("%s: %p mbuf already has cluster\n", __func__, = m); > R> + printf("%s: %p mbuf already has external storage\n", = __func__, m); > R> m->m_ext.ext_buf =3D (char *)NULL; > R> uma_zalloc_arg(zone_clust, m, how); > R> /* > R> @@ -698,7 +698,7 @@ m_cljget(struct mbuf *m, int how, int si > R> uma_zone_t zone; > R> =20 > R> if (m && m->m_flags & M_EXT) > R> - printf("%s: %p mbuf already has cluster\n", __func__, = m); > R> + printf("%s: %p mbuf already has external storage\n", = __func__, m); > R> if (m !=3D NULL) > R> m->m_ext.ext_buf =3D NULL; >=20 > Shouldn't these be KASSERTs? I'm pretty sure that Andre put it as = printf(9) > because he was not sure it is correct. But since that time we never = seen > these prints in the wild, so they can be safely converted to KASSERTs. Hi Gleb: I agree that they should be KASSERT()s -- almost all if (x) panic(..) = should be -- but was working offline at the time and so didn't have a = chance to spelunk the mailing lists or GNATS/Bugzilla to see if I could = find references to the panics so left the current form as is. I am = currently on travel but have a TODO to do some spelunking when I get = back. I spotted a number of other similar constructs in the mbuf code, = which I'm currently working through fairly closely looking at the = variable-size mbuf changes, which depend on a number of cleanups. (The = ones I've made thus far are cosmetic, but less purely cosmetic ones will = follow soon.) Robert= From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 07:23:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9A8C8F1; Sun, 7 Sep 2014 07:23:33 +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 D55171CBC; Sun, 7 Sep 2014 07:23:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s877NXhi012298; Sun, 7 Sep 2014 07:23:33 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s877NX9Q012297; Sun, 7 Sep 2014 07:23:33 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201409070723.s877NX9Q012297@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 7 Sep 2014 07:23:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271218 - head/sys/dev/sound/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 07:23:34 -0000 Author: hselasky Date: Sun Sep 7 07:23:33 2014 New Revision: 271218 URL: http://svnweb.freebsd.org/changeset/base/271218 Log: Update mixer description for FastTrackPro. MFC after: 3 days Modified: head/sys/dev/sound/usb/uaudio.c Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Sun Sep 7 05:47:48 2014 (r271217) +++ head/sys/dev/sound/usb/uaudio.c Sun Sep 7 07:23:33 2014 (r271218) @@ -2724,14 +2724,14 @@ uaudio_mixer_controls_create_ftu(struct uaudio_mixer_add_ctl(sc, &MIX(sc)); - MIX(sc).wValue[0] = MAKE_WORD(9, chy + 1); + MIX(sc).wValue[0] = MAKE_WORD(9, chy + 1 + 8); MIX(sc).type = MIX_SIGNED_16; MIX(sc).ctl = SOUND_MIXER_NRDEVICES; MIX(sc).name = "effect_send"; MIX(sc).nchan = 1; MIX(sc).update[0] = 1; snprintf(MIX(sc).desc, sizeof(MIX(sc).desc), - "Effect Send DIn%d Volume", chy + 1 + 8); + "Effect Send DIn%d Volume", chy + 1); uaudio_mixer_add_ctl(sc, &MIX(sc)); } From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 07:49:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8C6A34F; Sun, 7 Sep 2014 07:49:49 +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 D48B61E5C; Sun, 7 Sep 2014 07:49:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s877nnVM023116; Sun, 7 Sep 2014 07:49:49 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s877nn0g023115; Sun, 7 Sep 2014 07:49:49 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201409070749.s877nn0g023115@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 7 Sep 2014 07:49:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271219 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 07:49:50 -0000 Author: tuexen Date: Sun Sep 7 07:49:49 2014 New Revision: 271219 URL: http://svnweb.freebsd.org/changeset/base/271219 Log: Use SYSCTL_PROC instead of SYSCTL_VNET_PROC. Suggested by: glebius@ MFC after: 1 week Modified: head/sys/netinet/sctp_sysctl.c Modified: head/sys/netinet/sctp_sysctl.c ============================================================================== --- head/sys/netinet/sctp_sysctl.c Sun Sep 7 07:23:33 2014 (r271218) +++ head/sys/netinet/sctp_sysctl.c Sun Sep 7 07:49:49 2014 (r271219) @@ -825,8 +825,8 @@ sctp_sysctl_handle_trace_log_clear(SYSCT } \ return (error); \ } \ - SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, mib_name, \ - CTLTYPE_UINT | CTLFLAG_RW, NULL, 0, \ + SYSCTL_PROC(_net_inet_sctp, OID_AUTO, mib_name, \ + CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW, NULL, 0, \ sctp_sysctl_handle_##mib_name, "UI", prefix##_DESC); /* @@ -838,9 +838,9 @@ SCTP_UINT_SYSCTL(recvspace, sctp_recvspa SCTP_UINT_SYSCTL(auto_asconf, sctp_auto_asconf, SCTPCTL_AUTOASCONF) SCTP_UINT_SYSCTL(ecn_enable, sctp_ecn_enable, SCTPCTL_ECN_ENABLE) SCTP_UINT_SYSCTL(pr_enable, sctp_pr_enable, SCTPCTL_PR_ENABLE) -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, auth_enable, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_PROC(_net_inet_sctp, OID_AUTO, auth_enable, CTLFLAG_VNET | CTLTYPE_UINT | CTLFLAG_RW, NULL, 0, sctp_sysctl_handle_auth, "IU", SCTPCTL_AUTH_ENABLE_DESC); -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, asconf_enable, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_PROC(_net_inet_sctp, OID_AUTO, asconf_enable, CTLFLAG_VNET | CTLTYPE_UINT | CTLFLAG_RW, NULL, 0, sctp_sysctl_handle_asconf, "IU", SCTPCTL_ASCONF_ENABLE_DESC); SCTP_UINT_SYSCTL(reconfig_enable, sctp_reconfig_enable, SCTPCTL_RECONFIG_ENABLE) SCTP_UINT_SYSCTL(nrsack_enable, sctp_nrsack_enable, SCTPCTL_NRSACK_ENABLE) @@ -893,12 +893,12 @@ SCTP_UINT_SYSCTL(default_frag_interleave SCTP_UINT_SYSCTL(mobility_base, sctp_mobility_base, SCTPCTL_MOBILITY_BASE) SCTP_UINT_SYSCTL(mobility_fasthandoff, sctp_mobility_fasthandoff, SCTPCTL_MOBILITY_FASTHANDOFF) #if defined(SCTP_LOCAL_TRACE_BUF) -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, log, CTLTYPE_STRUCT | CTLFLAG_RD, +SYSCTL_PROC(_net_inet_sctp, OID_AUTO, log, CTLFLAG_VNET | CTLTYPE_STRUCT | CTLFLAG_RD, NULL, 0, sctp_sysctl_handle_trace_log, "S,sctplog", "SCTP logging (struct sctp_log)"); -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, clear_trace, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_PROC(_net_inet_sctp, OID_AUTO, clear_trace, CTLFLAG_VNET | CTLTYPE_UINT | CTLFLAG_RW, NULL, 0, sctp_sysctl_handle_trace_log_clear, "IU", "Clear SCTP Logging buffer"); #endif -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, udp_tunneling_port, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_PROC(_net_inet_sctp, OID_AUTO, udp_tunneling_port, CTLFLAG_VNET | CTLTYPE_UINT | CTLFLAG_RW, NULL, 0, sctp_sysctl_handle_udp_tunneling, "IU", SCTPCTL_UDP_TUNNELING_PORT_DESC); SCTP_UINT_SYSCTL(enable_sack_immediately, sctp_enable_sack_immediately, SCTPCTL_SACK_IMMEDIATELY_ENABLE) SCTP_UINT_SYSCTL(nat_friendly_init, sctp_inits_include_nat_friendly, SCTPCTL_NAT_FRIENDLY_INITS) @@ -918,7 +918,7 @@ SCTP_UINT_SYSCTL(debug, sctp_debug_on, S #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_UINT_SYSCTL(output_unlocked, sctp_output_unlocked, SCTPCTL_OUTPUT_UNLOCKED) #endif -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, stats, CTLTYPE_STRUCT | CTLFLAG_RW, +SYSCTL_PROC(_net_inet_sctp, OID_AUTO, stats, CTLFLAG_VNET | CTLTYPE_STRUCT | CTLFLAG_RW, NULL, 0, sctp_sysctl_handle_stats, "S,sctpstat", "SCTP statistics (struct sctp_stat)"); -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, assoclist, CTLTYPE_OPAQUE | CTLFLAG_RD, +SYSCTL_PROC(_net_inet_sctp, OID_AUTO, assoclist, CTLFLAG_VNET | CTLTYPE_OPAQUE | CTLFLAG_RD, NULL, 0, sctp_sysctl_handle_assoclist, "S,xassoc", "List of active SCTP associations"); From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 07:57:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C373661A; Sun, 7 Sep 2014 07:57:02 +0000 (UTC) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail-n.franken.de", Issuer "Thawte DV SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8477D1F23; Sun, 7 Sep 2014 07:57:02 +0000 (UTC) Received: from [192.168.1.200] (p54818BEE.dip0.t-ipconnect.de [84.129.139.238]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id 3037A1C0E9748; Sun, 7 Sep 2014 09:56:58 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r271204 - head/sys/netinet From: Michael Tuexen In-Reply-To: <20140907060141.GL17059@FreeBSD.org> Date: Sun, 7 Sep 2014 09:56:57 +0200 Content-Transfer-Encoding: 7bit Message-Id: References: <201409061912.s86JCF13069516@svn.freebsd.org> <20140907060141.GL17059@FreeBSD.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 07:57:02 -0000 On 07 Sep 2014, at 08:01, Gleb Smirnoff wrote: > Michael, > > On Sat, Sep 06, 2014 at 07:12:15PM +0000, Michael Tuexen wrote: > M> Author: tuexen > M> Date: Sat Sep 6 19:12:14 2014 > M> New Revision: 271204 > M> URL: http://svnweb.freebsd.org/changeset/base/271204 > M> > M> Log: > M> Fix the handling of sysctl variables when used with VIMAGE. > M> While there do some cleanup of the code. > > Note that after r261590 you don't need SYSCTL_VNET_* macros. You > can use base SYSCTL_* macros adding CTLFLAG_VNET. > > SCTP was/is the major user of SYSCTL_VNET_* macros. If it is > cleansed, then I can fix the rest and then we probably can remove > their declarations. Done in http://svnweb.freebsd.org/changeset/base/271219 Thanks for suggesting the change! Best regards Michael > > -- > Totus tuus, Glebius. > From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 08:16:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 83D04AB5; Sun, 7 Sep 2014 08:16:28 +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 6EFF9112B; Sun, 7 Sep 2014 08:16:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s878GSer036851; Sun, 7 Sep 2014 08:16:28 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s878GRPj036844; Sun, 7 Sep 2014 08:16:27 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201409070816.s878GRPj036844@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 7 Sep 2014 08:16:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271220 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 08:16:28 -0000 Author: andrew Date: Sun Sep 7 08:16:27 2014 New Revision: 271220 URL: http://svnweb.freebsd.org/changeset/base/271220 Log: Create a common i.MX53 config and use it with the two existing i.MX53 boards. This is just intended to split the common config entries out, further cleanup is expected. Reviewed by: ian@, rpaulo@ (earlier version) Differential Revision: https://reviews.freebsd.org/D731 Added: head/sys/arm/conf/IMX53 (contents, props changed) Modified: head/sys/arm/conf/DIGI-CCWMX53 head/sys/arm/conf/IMX53-QSB Modified: head/sys/arm/conf/DIGI-CCWMX53 ============================================================================== --- head/sys/arm/conf/DIGI-CCWMX53 Sun Sep 7 07:49:49 2014 (r271219) +++ head/sys/arm/conf/DIGI-CCWMX53 Sun Sep 7 08:16:27 2014 (r271220) @@ -17,51 +17,13 @@ # # $FreeBSD$ -ident DIGI-CCWMX53 +#NO_UNIVERSE -include "../freescale/imx/std.imx53" +include "IMX53" +ident DIGI-CCWMX53 makeoptions WITHOUT_MODULES="ahc" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -#options DEBUG - -options SCHED_4BSD # 4BSD scheduler -#options PREEMPTION # Enable kernel thread preemption -options INET # InterNETworking -options INET6 # IPv6 communications protocols -#options SCTP # Stream Control Transmission Protocol -options FFS # Berkeley Fast Filesystem -options SOFTUPDATES # Enable FFS soft updates support -options UFS_ACL # Support for access control lists -options UFS_DIRHASH # Improve performance on big directories -options UFS_GJOURNAL # Enable gjournal-based UFS journaling -#options MD_ROOT # MD is a potential root device -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server -options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem -options MSDOSFS # MSDOS Filesystem -options CD9660 # ISO 9660 Filesystem -#options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT # GUID Partition Tables. -options GEOM_LABEL # Provides labelization -#options COMPAT_FREEBSD5 # Compatible with FreeBSD5 -#options COMPAT_FREEBSD6 # Compatible with FreeBSD6 -#options COMPAT_FREEBSD7 # Compatible with FreeBSD7 -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE # ktrace(1) support -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -options INCLUDE_CONFIG_FILE # Include this file in kernel -options VFP # vfp/neon - # required for netbooting #options BOOTP #options BOOTP_COMPAT @@ -71,117 +33,6 @@ options VFP # vfp/neon #options ROOTDEVNAME=\"ufs:ada0s2a\" - -# kernel/memory size reduction -#options MUTEX_NOINLINE -#options NO_FFS_SNAPSHOT -#options NO_SWAPPING -#options NO_SYSCTL_DESCR -#options RWLOCK_NOINLINE - -# Debugging support. Always need this: -options KDB # Enable kernel debugger support. -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic. -# For full debugger support use this instead: -options DDB # Support DDB. -#options GDB # Support remote GDB. -options DEADLKRES # Enable the deadlock resolver -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles - -# The `bpf' device enables the Berkeley Packet Filter. -# Be aware of the administrative consequences of enabling this! -# Note that 'bpf' is required for DHCP. -device bpf # Berkeley packet filter - -# Pseudo devices. -device loop # Network loopback -device random # Entropy device -device ether # Ethernet support -#device vlan # 802.1Q VLAN support -#device tun # Packet tunnel. -#device md # Memory "disks" -#device gif # IPv6 and IPv4 tunneling -#device faith # IPv6-to-IPv4 relaying (translation) -#device firmware # firmware assist module - -# Ethernet -device ffec # Freescale Fast Ethernet Controller -device miibus # Standard mii bus - -# Serial (COM) ports -device uart # Multi-uart driver -options ALT_BREAK_TO_DEBUGGER - -device ata -device atapci # Only for helper functions -device imxata -options ATA_STATIC_ID # Static device numbering - -device gpio -device gpioled - -device fsliic -device iic -device iicbus - -# SCSI peripherals -device scbus # SCSI bus (required for ATA/SCSI) -device da # Direct Access (disks) -device cd # CD -device pass # Passthrough device (direct ATA/SCSI access) - -# USB support -options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. -options USB_DEBUG # enable debug msgs -device ehci # OHCI USB interface -device usb # USB Bus (required) -device umass # Disks/Mass storage - Requires scbus and da -device uhid # "Human Interface Devices" -#device ukbd # Allow keyboard like HIDs to control console -device ums - -# USB Ethernet, requires miibus -#device miibus -#device aue # ADMtek USB Ethernet -#device axe # ASIX Electronics USB Ethernet -#device cdce # Generic USB over Ethernet -#device cue # CATC USB Ethernet -#device kue # Kawasaki LSI USB Ethernet -#device rue # RealTek RTL8150 USB Ethernet -#device udav # Davicom DM9601E USB - -# USB Wireless -#device rum # Ralink Technology RT2501USB wireless NICs - -# Watchdog timer. -# WARNING: can't be disabled!!! -device imxwdt # Watchdog - -# Wireless NIC cards -device wlan # 802.11 support -device wlan_wep # 802.11 WEP support -device wlan_ccmp # 802.11 CCMP support -device wlan_tkip # 802.11 TKIP support -device wlan_amrr # AMRR transmit rate control algorithm - -# MMC -#device sdhci # SD controller -#device mmc # SD/MMC protocol -#device mmcsd # SDCard disk device - - # Flattened Device Tree -options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=digi-ccwmx53.dts - -# NOTE: serial console will be disabled if syscons enabled -# Uncomment following lines for framebuffer/syscons support -#device sc -#device vt -#device kbdmux -#options SC_DFLT_FONT # compile font in -#makeoptions SC_DFLT_FONT=cp437 Added: head/sys/arm/conf/IMX53 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/IMX53 Sun Sep 7 08:16:27 2014 (r271220) @@ -0,0 +1,173 @@ +# Kernel configuration for i.MX53 boards +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +ident IMX53 + +include "../freescale/imx/std.imx53" + +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +#options DEBUG + +options SCHED_4BSD # 4BSD scheduler +#options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +#options SCTP # Stream Control Transmission Protocol +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +#options MD_ROOT # MD is a potential root device +options NFSCL # New Network Filesystem Client +#options NFSD # New Network Filesystem Server +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL +options TMPFS # Efficient memory filesystem +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +#options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme +options GEOM_PART_GPT # GUID Partition Tables. +options GEOM_LABEL # Provides labelization +#options COMPAT_FREEBSD5 # Compatible with FreeBSD5 +#options COMPAT_FREEBSD6 # Compatible with FreeBSD6 +#options COMPAT_FREEBSD7 # Compatible with FreeBSD7 +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options INCLUDE_CONFIG_FILE # Include this file in kernel +options VFP # vfp/neon + +# kernel/memory size reduction +#options MUTEX_NOINLINE +#options NO_FFS_SNAPSHOT +#options NO_SWAPPING +#options NO_SYSCTL_DESCR +#options RWLOCK_NOINLINE + +# Debugging support. Always need this: +options KDB # Enable kernel debugger support. +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic. +# For full debugger support use this instead: +options DDB # Support DDB. +#options GDB # Support remote GDB. +options DEADLKRES # Enable the deadlock resolver +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS # Enable checks to detect deadlocks and cycles + +# The `bpf' device enables the Berkeley Packet Filter. +# Be aware of the administrative consequences of enabling this! +# Note that 'bpf' is required for DHCP. +device bpf # Berkeley packet filter + +# Pseudo devices. +device loop # Network loopback +device random # Entropy device +device ether # Ethernet support +#device vlan # 802.1Q VLAN support +#device tun # Packet tunnel. +device md # Memory "disks" +#device gif # IPv6 and IPv4 tunneling +#device faith # IPv6-to-IPv4 relaying (translation) +#device firmware # firmware assist module + +# Ethernet +device ffec # Freescale Fast Ethernet Controller +device miibus # Standard mii bus + +# Serial (COM) ports +device uart # Multi-uart driver +options ALT_BREAK_TO_DEBUGGER + +device ata +device atapci # Only for helper functions +device imxata +options ATA_STATIC_ID # Static device numbering + +device gpio +device gpioled + +device fsliic +device iic +device iicbus + +# SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) +device da # Direct Access (disks) +device cd # CD +device pass # Passthrough device (direct ATA/SCSI access) + +# USB support +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. +options USB_DEBUG # enable debug msgs +device ehci # OHCI USB interface +device usb # USB Bus (required) +device umass # Disks/Mass storage - Requires scbus and da +device uhid # "Human Interface Devices" +#device ukbd # Allow keyboard like HIDs to control console +device ums + +# USB Ethernet, requires miibus +#device miibus +#device aue # ADMtek USB Ethernet +#device axe # ASIX Electronics USB Ethernet +#device cdce # Generic USB over Ethernet +#device cue # CATC USB Ethernet +#device kue # Kawasaki LSI USB Ethernet +#device rue # RealTek RTL8150 USB Ethernet +#device udav # Davicom DM9601E USB + +# USB Wireless +#device rum # Ralink Technology RT2501USB wireless NICs + +# Watchdog timer. +# WARNING: can't be disabled!!! +device imxwdt # Watchdog + +# Wireless NIC cards +device wlan # 802.11 support +device wlan_wep # 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 TKIP support +device wlan_amrr # AMRR transmit rate control algorithm + +# MMC +#device sdhci # SD controller +#device mmc # SD/MMC protocol +#device mmcsd # SDCard disk device + + +# Flattened Device Tree +options FDT + +# NOTE: serial console will be disabled if syscons enabled +# Uncomment following lines for framebuffer/syscons support +#device sc +#device vt +#device kbdmux +#options SC_DFLT_FONT # compile font in +#makeoptions SC_DFLT_FONT=cp437 Modified: head/sys/arm/conf/IMX53-QSB ============================================================================== --- head/sys/arm/conf/IMX53-QSB Sun Sep 7 07:49:49 2014 (r271219) +++ head/sys/arm/conf/IMX53-QSB Sun Sep 7 08:16:27 2014 (r271220) @@ -17,49 +17,12 @@ # # $FreeBSD$ -ident IMX53-QSB - -include "../freescale/imx/std.imx53" +#NO_UNIVERSE -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -#options DEBUG +include "IMX53" +ident IMX53-QSB options HZ=250 # 4ms scheduling quantum -options SCHED_4BSD # 4BSD scheduler -#options PREEMPTION # Enable kernel thread preemption -options INET # InterNETworking -options INET6 # IPv6 communications protocols -#options SCTP # Stream Control Transmission Protocol -options FFS # Berkeley Fast Filesystem -options SOFTUPDATES # Enable FFS soft updates support -options UFS_ACL # Support for access control lists -options UFS_DIRHASH # Improve performance on big directories -options UFS_GJOURNAL # Enable gjournal-based UFS journaling -#options MD_ROOT # MD is a potential root device -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server -options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem -options MSDOSFS # MSDOS Filesystem -options CD9660 # ISO 9660 Filesystem -#options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT # GUID Partition Tables. -options GEOM_LABEL # Provides labelization -#options COMPAT_FREEBSD5 # Compatible with FreeBSD5 -#options COMPAT_FREEBSD6 # Compatible with FreeBSD6 -#options COMPAT_FREEBSD7 # Compatible with FreeBSD7 -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE # ktrace(1) support -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -options INCLUDE_CONFIG_FILE # Include this file in kernel -options VFP # vfp/neon # required for netbooting #options BOOTP @@ -70,111 +33,6 @@ options VFP # vfp/neon #options ROOTDEVNAME=\"ufs:ada0s2a\" - -# kernel/memory size reduction -#options MUTEX_NOINLINE -#options NO_FFS_SNAPSHOT -#options NO_SWAPPING -#options NO_SYSCTL_DESCR -#options RWLOCK_NOINLINE - -# Debugging support. Always need this: -options KDB # Enable kernel debugger support. -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic. -# For full debugger support use this instead: -options DDB # Support DDB. -#options GDB # Support remote GDB. -#options DEADLKRES # Enable the deadlock resolver -#options INVARIANTS # Enable calls of extra sanity checking -#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles - -# The `bpf' device enables the Berkeley Packet Filter. -# Be aware of the administrative consequences of enabling this! -# Note that 'bpf' is required for DHCP. -device bpf # Berkeley packet filter - -# Pseudo devices. -device loop # Network loopback -device random # Entropy device -device ether # Ethernet support -#device vlan # 802.1Q VLAN support -#device tun # Packet tunnel. -device md # Memory "disks" -#device gif # IPv6 and IPv4 tunneling -#device faith # IPv6-to-IPv4 relaying (translation) -#device firmware # firmware assist module - -# Ethernet -device ffec # Freescale Fast Ethernet Controller -device miibus # Standard mii bus - -# Serial (COM) ports -device uart # Multi-uart driver -options ALT_BREAK_TO_DEBUGGER - -#device ata -#device atapci # Only for helper functions -#device imxata -#options ATA_STATIC_ID # Static device numbering - -device gpio -device gpioled - -device fsliic -device iic -device iicbus - -# SCSI peripherals -device scbus # SCSI bus (required for ATA/SCSI) -device da # Direct Access (disks) -device cd # CD -device pass # Passthrough device (direct ATA/SCSI access) - -# USB support -options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. -#options USB_DEBUG # enable debug msgs -device ehci # OHCI USB interface -device usb # USB Bus (required) -device umass # Disks/Mass storage - Requires scbus and da -#device uhid # "Human Interface Devices" -#device ukbd # Allow keyboard like HIDs to control console -#device ums - -# USB Ethernet, requires miibus -#device miibus -#device aue # ADMtek USB Ethernet -#device axe # ASIX Electronics USB Ethernet -#device cdce # Generic USB over Ethernet -#device cue # CATC USB Ethernet -#device kue # Kawasaki LSI USB Ethernet -#device rue # RealTek RTL8150 USB Ethernet -#device udav # Davicom DM9601E USB - -# USB Wireless -#device rum # Ralink Technology RT2501USB wireless NICs - -# Watchdog timer. -# WARNING: can't be disabled!!! -device imxwdt # Watchdog - -# Wireless NIC cards -device wlan # 802.11 support -device wlan_wep # 802.11 WEP support -device wlan_ccmp # 802.11 CCMP support -device wlan_tkip # 802.11 TKIP support -device wlan_amrr # AMRR transmit rate control algorithm - # Flattened Device Tree -options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=imx53-qsb.dts - -# NOTE: serial console will be disabled if syscons enabled -# Uncomment following lines for framebuffer/syscons support -#device sc -#device kbdmux -#options SC_DFLT_FONT # compile font in -#makeoptions SC_DFLT_FONT=cp437 - From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 09:06:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA2E9A4C; Sun, 7 Sep 2014 09:06:28 +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 B4C70176E; Sun, 7 Sep 2014 09:06:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8796SRN060083; Sun, 7 Sep 2014 09:06:28 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8796RpC060071; Sun, 7 Sep 2014 09:06:27 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201409070906.s8796RpC060071@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 7 Sep 2014 09:06:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271221 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 09:06:28 -0000 Author: tuexen Date: Sun Sep 7 09:06:26 2014 New Revision: 271221 URL: http://svnweb.freebsd.org/changeset/base/271221 Log: Use union sctp_sockstore instead of struct sockaddr_storage. This eliminiates some warnings when building in userland. Thanks to Patrick Laimbock for reporting this issue. Remove also some unnecessary casts. There should be no functional change. MFC after: 1 week Modified: head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Sun Sep 7 08:16:27 2014 (r271220) +++ head/sys/netinet/sctp_asconf.c Sun Sep 7 09:06:26 2014 (r271221) @@ -148,7 +148,7 @@ sctp_process_asconf_add_ip(struct sockad { struct sctp_nets *net; struct mbuf *m_reply = NULL; - struct sockaddr_storage sa_store; + union sctp_sockstore store; struct sctp_paramhdr *ph; uint16_t param_type, aparam_length; @@ -177,7 +177,7 @@ sctp_process_asconf_add_ip(struct sockad #if defined(INET) || defined(INET6) param_length = ntohs(ph->param_length); #endif - sa = (struct sockaddr *)&sa_store; + sa = &store.sa; switch (param_type) { #ifdef INET case SCTP_IPV4_ADDRESS: @@ -186,7 +186,7 @@ sctp_process_asconf_add_ip(struct sockad return (NULL); } v4addr = (struct sctp_ipv4addr_param *)ph; - sin = (struct sockaddr_in *)&sa_store; + sin = &store.sin; bzero(sin, sizeof(*sin)); sin->sin_family = AF_INET; sin->sin_len = sizeof(struct sockaddr_in); @@ -209,7 +209,7 @@ sctp_process_asconf_add_ip(struct sockad return (NULL); } v6addr = (struct sctp_ipv6addr_param *)ph; - sin6 = (struct sockaddr_in6 *)&sa_store; + sin6 = &store.sin6; bzero(sin6, sizeof(*sin6)); sin6->sin6_family = AF_INET6; sin6->sin6_len = sizeof(struct sockaddr_in6); @@ -302,7 +302,7 @@ sctp_process_asconf_delete_ip(struct soc struct sctp_tcb *stcb, int response_required) { struct mbuf *m_reply = NULL; - struct sockaddr_storage sa_store; + union sctp_sockstore store; struct sctp_paramhdr *ph; uint16_t param_type, aparam_length; @@ -331,7 +331,7 @@ sctp_process_asconf_delete_ip(struct soc #if defined(INET) || defined(INET6) param_length = ntohs(ph->param_length); #endif - sa = (struct sockaddr *)&sa_store; + sa = &store.sa; switch (param_type) { #ifdef INET case SCTP_IPV4_ADDRESS: @@ -340,7 +340,7 @@ sctp_process_asconf_delete_ip(struct soc return (NULL); } v4addr = (struct sctp_ipv4addr_param *)ph; - sin = (struct sockaddr_in *)&sa_store; + sin = &store.sin; bzero(sin, sizeof(*sin)); sin->sin_family = AF_INET; sin->sin_len = sizeof(struct sockaddr_in); @@ -360,7 +360,7 @@ sctp_process_asconf_delete_ip(struct soc return (NULL); } v6addr = (struct sctp_ipv6addr_param *)ph; - sin6 = (struct sockaddr_in6 *)&sa_store; + sin6 = &store.sin6; bzero(sin6, sizeof(*sin6)); sin6->sin6_family = AF_INET6; sin6->sin6_len = sizeof(struct sockaddr_in6); @@ -437,7 +437,7 @@ sctp_process_asconf_set_primary(struct s struct sctp_tcb *stcb, int response_required) { struct mbuf *m_reply = NULL; - struct sockaddr_storage sa_store; + union sctp_sockstore store; struct sctp_paramhdr *ph; uint16_t param_type, aparam_length; @@ -465,7 +465,7 @@ sctp_process_asconf_set_primary(struct s #if defined(INET) || defined(INET6) param_length = ntohs(ph->param_length); #endif - sa = (struct sockaddr *)&sa_store; + sa = &store.sa; switch (param_type) { #ifdef INET case SCTP_IPV4_ADDRESS: @@ -474,7 +474,7 @@ sctp_process_asconf_set_primary(struct s return (NULL); } v4addr = (struct sctp_ipv4addr_param *)ph; - sin = (struct sockaddr_in *)&sa_store; + sin = &store.sin; bzero(sin, sizeof(*sin)); sin->sin_family = AF_INET; sin->sin_len = sizeof(struct sockaddr_in); @@ -492,7 +492,7 @@ sctp_process_asconf_set_primary(struct s return (NULL); } v6addr = (struct sctp_ipv6addr_param *)ph; - sin6 = (struct sockaddr_in6 *)&sa_store; + sin6 = &store.sin6; bzero(sin6, sizeof(*sin6)); sin6->sin6_family = AF_INET6; sin6->sin6_len = sizeof(struct sockaddr_in6); @@ -1268,7 +1268,7 @@ sctp_asconf_queue_mgmt(struct sctp_tcb * { struct sockaddr_in6 *sin6; - sin6 = (struct sockaddr_in6 *)&ifa->address.sa; + sin6 = &ifa->address.sin6; aa->ap.addrp.ph.param_type = SCTP_IPV6_ADDRESS; aa->ap.addrp.ph.param_length = (sizeof(struct sctp_ipv6addr_param)); aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_paramhdr) + @@ -1283,7 +1283,7 @@ sctp_asconf_queue_mgmt(struct sctp_tcb * { struct sockaddr_in *sin; - sin = (struct sockaddr_in *)&ifa->address.sa; + sin = &ifa->address.sin; aa->ap.addrp.ph.param_type = SCTP_IPV4_ADDRESS; aa->ap.addrp.ph.param_length = (sizeof(struct sctp_ipv4addr_param)); aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_paramhdr) + @@ -1925,7 +1925,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb * { struct sockaddr_in6 *sin6; - sin6 = (struct sockaddr_in6 *)&ifa->address.sin6; + sin6 = &ifa->address.sin6; if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { /* we skip unspecifed addresses */ return; @@ -1958,7 +1958,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb * SCTP_IPV6_V6ONLY(inp6)) return; - sin = (struct sockaddr_in *)&ifa->address.sa; + sin = &ifa->address.sin; if (sin->sin_addr.s_addr == 0) { /* we skip unspecifed addresses */ return; @@ -2115,7 +2115,7 @@ sctp_asconf_iterator_stcb(struct sctp_in else continue; } - sin6 = (struct sockaddr_in6 *)&ifa->address.sin6; + sin6 = &ifa->address.sin6; if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { /* we skip unspecifed addresses */ continue; @@ -2149,7 +2149,7 @@ sctp_asconf_iterator_stcb(struct sctp_in SCTP_IPV6_V6ONLY(inp6)) continue; - sin = (struct sockaddr_in *)&ifa->address.sa; + sin = &ifa->address.sin; if (sin->sin_addr.s_addr == 0) { /* we skip unspecifed addresses */ continue; @@ -2466,7 +2466,7 @@ sctp_find_valid_localaddr(struct sctp_tc if (stcb->asoc.scope.ipv4_addr_legal) { struct sockaddr_in *sin; - sin = (struct sockaddr_in *)&sctp_ifa->address.sa; + sin = &sctp_ifa->address.sin; if (sin->sin_addr.s_addr == 0) { /* skip unspecifed addresses */ continue; @@ -2500,7 +2500,7 @@ sctp_find_valid_localaddr(struct sctp_tc if (sctp_ifa->localifa_flags & SCTP_ADDR_IFA_UNUSEABLE) { continue; } - sin6 = (struct sockaddr_in6 *)&sctp_ifa->address.sa; + sin6 = &sctp_ifa->address.sin6; if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { /* * we skip unspecifed @@ -3125,7 +3125,7 @@ sctp_check_address_list_all(struct sctp_ switch (sctp_ifa->address.sa.sa_family) { #ifdef INET case AF_INET: - sin = (struct sockaddr_in *)&sctp_ifa->address.sin; + sin = &sctp_ifa->address.sin; if (prison_check_ip4(stcb->sctp_ep->ip_inp.inp.inp_cred, &sin->sin_addr) != 0) { continue; @@ -3139,7 +3139,7 @@ sctp_check_address_list_all(struct sctp_ #endif #ifdef INET6 case AF_INET6: - sin6 = (struct sockaddr_in6 *)&sctp_ifa->address.sin6; + sin6 = &sctp_ifa->address.sin6; if (prison_check_ip6(stcb->sctp_ep->ip_inp.inp.inp_cred, &sin6->sin6_addr) != 0) { continue; Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sun Sep 7 08:16:27 2014 (r271220) +++ head/sys/netinet/sctp_input.c Sun Sep 7 09:06:26 2014 (r271221) @@ -562,21 +562,12 @@ static void sctp_handle_heartbeat_ack(struct sctp_heartbeat_chunk *cp, struct sctp_tcb *stcb, struct sctp_nets *net) { - struct sockaddr_storage store; + union sctp_sockstore store; struct sctp_nets *r_net, *f_net; struct timeval tv; int req_prim = 0; uint16_t old_error_counter; -#ifdef INET - struct sockaddr_in *sin; - -#endif -#ifdef INET6 - struct sockaddr_in6 *sin6; - -#endif - if (ntohs(cp->ch.chunk_length) != sizeof(struct sctp_heartbeat_chunk)) { /* Invalid length */ return; @@ -586,12 +577,11 @@ sctp_handle_heartbeat_ack(struct sctp_he #ifdef INET case AF_INET: if (cp->heartbeat.hb_info.addr_len == sizeof(struct sockaddr_in)) { - sin = (struct sockaddr_in *)&store; - sin->sin_family = cp->heartbeat.hb_info.addr_family; - sin->sin_len = cp->heartbeat.hb_info.addr_len; - sin->sin_port = stcb->rport; - memcpy(&sin->sin_addr, cp->heartbeat.hb_info.address, - sizeof(sin->sin_addr)); + store.sin.sin_family = cp->heartbeat.hb_info.addr_family; + store.sin.sin_len = cp->heartbeat.hb_info.addr_len; + store.sin.sin_port = stcb->rport; + memcpy(&store.sin.sin_addr, cp->heartbeat.hb_info.address, + sizeof(store.sin.sin_addr)); } else { return; } @@ -600,12 +590,11 @@ sctp_handle_heartbeat_ack(struct sctp_he #ifdef INET6 case AF_INET6: if (cp->heartbeat.hb_info.addr_len == sizeof(struct sockaddr_in6)) { - sin6 = (struct sockaddr_in6 *)&store; - sin6->sin6_family = cp->heartbeat.hb_info.addr_family; - sin6->sin6_len = cp->heartbeat.hb_info.addr_len; - sin6->sin6_port = stcb->rport; - memcpy(&sin6->sin6_addr, cp->heartbeat.hb_info.address, - sizeof(sin6->sin6_addr)); + store.sin6.sin6_family = cp->heartbeat.hb_info.addr_family; + store.sin6.sin6_len = cp->heartbeat.hb_info.addr_len; + store.sin6.sin6_port = stcb->rport; + memcpy(&store.sin6.sin6_addr, cp->heartbeat.hb_info.address, + sizeof(store.sin6.sin6_addr)); } else { return; } @@ -614,7 +603,7 @@ sctp_handle_heartbeat_ack(struct sctp_he default: return; } - r_net = sctp_findnet(stcb, (struct sockaddr *)&store); + r_net = sctp_findnet(stcb, &store.sa); if (r_net == NULL) { SCTPDBG(SCTP_DEBUG_INPUT1, "Huh? I can't find the address I sent it to, discard\n"); return; @@ -2030,22 +2019,13 @@ sctp_process_cookie_new(struct mbuf *m, struct sctp_tcb *stcb; struct sctp_init_chunk *init_cp, init_buf; struct sctp_init_ack_chunk *initack_cp, initack_buf; - struct sockaddr_storage sa_store; - struct sockaddr *initack_src = (struct sockaddr *)&sa_store; + union sctp_sockstore store; struct sctp_association *asoc; int init_offset, initack_offset, initack_limit; int retval; int error = 0; uint8_t auth_chunk_buf[SCTP_PARAM_BUFFER_SIZE]; -#ifdef INET - struct sockaddr_in *sin; - -#endif -#ifdef INET6 - struct sockaddr_in6 *sin6; - -#endif #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; @@ -2269,23 +2249,21 @@ sctp_process_cookie_new(struct mbuf *m, #ifdef INET case SCTP_IPV4_ADDRESS: /* source addr is IPv4 */ - sin = (struct sockaddr_in *)initack_src; - memset(sin, 0, sizeof(*sin)); - sin->sin_family = AF_INET; - sin->sin_len = sizeof(struct sockaddr_in); - sin->sin_addr.s_addr = cookie->laddress[0]; + memset(&store.sin, 0, sizeof(struct sockaddr_in)); + store.sin.sin_family = AF_INET; + store.sin.sin_len = sizeof(struct sockaddr_in); + store.sin.sin_addr.s_addr = cookie->laddress[0]; break; #endif #ifdef INET6 case SCTP_IPV6_ADDRESS: /* source addr is IPv6 */ - sin6 = (struct sockaddr_in6 *)initack_src; - memset(sin6, 0, sizeof(*sin6)); - sin6->sin6_family = AF_INET6; - sin6->sin6_len = sizeof(struct sockaddr_in6); - sin6->sin6_scope_id = cookie->scope_id; - memcpy(&sin6->sin6_addr, cookie->laddress, - sizeof(sin6->sin6_addr)); + memset(&store.sin6, 0, sizeof(struct sockaddr_in6)); + store.sin6.sin6_family = AF_INET6; + store.sin6.sin6_len = sizeof(struct sockaddr_in6); + store.sin6.sin6_scope_id = cookie->scope_id; + memcpy(&store.sin6.sin6_addr, cookie->laddress, + sizeof(store.sin6.sin6_addr)); break; #endif default: @@ -2366,7 +2344,7 @@ sctp_process_cookie_new(struct mbuf *m, sctp_check_address_list(stcb, m, initack_offset + sizeof(struct sctp_init_ack_chunk), initack_limit - (initack_offset + sizeof(struct sctp_init_ack_chunk)), - initack_src, cookie->local_scope, cookie->site_scope, + &store.sa, cookie->local_scope, cookie->site_scope, cookie->ipv4_scope, cookie->loopback_scope); Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sun Sep 7 08:16:27 2014 (r271220) +++ head/sys/netinet/sctp_output.c Sun Sep 7 09:06:26 2014 (r271221) @@ -1881,7 +1881,7 @@ sctp_is_address_in_scope(struct sctp_ifa if (scope->ipv4_addr_legal) { struct sockaddr_in *sin; - sin = (struct sockaddr_in *)&ifa->address.sin; + sin = &ifa->address.sin; if (sin->sin_addr.s_addr == 0) { /* not in scope , unspecified */ return (0); @@ -1912,7 +1912,7 @@ sctp_is_address_in_scope(struct sctp_ifa return (0); } /* ok to use deprecated addresses? */ - sin6 = (struct sockaddr_in6 *)&ifa->address.sin6; + sin6 = &ifa->address.sin6; if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { /* skip unspecifed addresses */ return (0); @@ -1987,7 +1987,7 @@ sctp_add_addr_to_mbuf(struct mbuf *m, st struct sctp_ipv4addr_param *ipv4p; struct sockaddr_in *sin; - sin = (struct sockaddr_in *)&ifa->address.sin; + sin = &ifa->address.sin; ipv4p = (struct sctp_ipv4addr_param *)parmh; parmh->param_type = htons(SCTP_IPV4_ADDRESS); parmh->param_length = htons(plen); @@ -2002,7 +2002,7 @@ sctp_add_addr_to_mbuf(struct mbuf *m, st struct sctp_ipv6addr_param *ipv6p; struct sockaddr_in6 *sin6; - sin6 = (struct sockaddr_in6 *)&ifa->address.sin6; + sin6 = &ifa->address.sin6; ipv6p = (struct sctp_ipv6addr_param *)parmh; parmh->param_type = htons(SCTP_IPV6_ADDRESS); parmh->param_length = htons(plen); @@ -13552,7 +13552,7 @@ sctp_v4src_match_nexthop(struct sctp_ifa } ifa = (struct ifaddr *)sifa->ifa; mask = (struct sockaddr_in *)(ifa->ifa_netmask); - sin = (struct sockaddr_in *)&sifa->address.sin; + sin = &sifa->address.sin; srcnetaddr.s_addr = (sin->sin_addr.s_addr & mask->sin_addr.s_addr); SCTPDBG(SCTP_DEBUG_OUTPUT1, "match_nexthop4: src address is "); SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, &sifa->address.sa); Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sun Sep 7 08:16:27 2014 (r271220) +++ head/sys/netinet/sctp_pcb.c Sun Sep 7 09:06:26 2014 (r271221) @@ -625,7 +625,7 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, vo { struct sockaddr_in *sin; - sin = (struct sockaddr_in *)&sctp_ifap->address.sin; + sin = &sctp_ifap->address.sin; if (SCTP_IFN_IS_IFT_LOOP(sctp_ifap->ifn_p) || (IN4_ISLOOPBACK_ADDRESS(&sin->sin_addr))) { sctp_ifap->src_is_loop = 1; @@ -645,7 +645,7 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, vo /* ok to use deprecated addresses? */ struct sockaddr_in6 *sin6; - sin6 = (struct sockaddr_in6 *)&sctp_ifap->address.sin6; + sin6 = &sctp_ifap->address.sin6; if (SCTP_IFN_IS_IFT_LOOP(sctp_ifap->ifn_p) || (IN6_IS_ADDR_LOOPBACK(&sin6->sin6_addr))) { sctp_ifap->src_is_loop = 1; @@ -974,7 +974,7 @@ sctp_does_stcb_own_this_addr(struct sctp { struct sockaddr_in *sin, *rsin; - sin = (struct sockaddr_in *)&laddr->ifa->address.sin; + sin = &laddr->ifa->address.sin; rsin = (struct sockaddr_in *)to; if (sin->sin_addr.s_addr == rsin->sin_addr.s_addr) { SCTP_IPI_ADDR_RUNLOCK(); @@ -988,7 +988,7 @@ sctp_does_stcb_own_this_addr(struct sctp { struct sockaddr_in6 *sin6, *rsin6; - sin6 = (struct sockaddr_in6 *)&laddr->ifa->address.sin6; + sin6 = &laddr->ifa->address.sin6; rsin6 = (struct sockaddr_in6 *)to; if (SCTP6_ARE_ADDR_EQUAL(sin6, rsin6)) { SCTP_IPI_ADDR_RUNLOCK(); @@ -2330,7 +2330,7 @@ sctp_findassociation_ep_asconf(struct mb struct sctp_inpcb **inp_p, struct sctp_nets **netp, uint32_t vrf_id) { struct sctp_tcb *stcb; - struct sockaddr_storage remote_store; + union sctp_sockstore remote_store; struct sctp_paramhdr parm_buf, *phdr; int ptype; int zero_address = 0; @@ -2372,7 +2372,7 @@ sctp_findassociation_ep_asconf(struct mb __FUNCTION__); return (NULL); } - sin6 = (struct sockaddr_in6 *)&remote_store; + sin6 = &remote_store.sin6; sin6->sin6_family = AF_INET6; sin6->sin6_len = sizeof(*sin6); sin6->sin6_port = sh->src_port; @@ -2399,7 +2399,7 @@ sctp_findassociation_ep_asconf(struct mb __FUNCTION__); return (NULL); } - sin = (struct sockaddr_in *)&remote_store; + sin = &remote_store.sin; sin->sin_family = AF_INET; sin->sin_len = sizeof(*sin); sin->sin_port = sh->src_port; @@ -2422,7 +2422,7 @@ sctp_findassociation_ep_asconf(struct mb } } else { stcb = sctp_findassociation_ep_addr(inp_p, - (struct sockaddr *)&remote_store, netp, + &remote_store.sa, netp, dst, NULL); } return (stcb); @@ -3126,31 +3126,21 @@ continue_anyway: * too (before adding). */ struct sctp_ifa *ifa; - struct sockaddr_storage store_sa; + union sctp_sockstore store; - memset(&store_sa, 0, sizeof(store_sa)); + memset(&store, 0, sizeof(store)); switch (addr->sa_family) { #ifdef INET case AF_INET: - { - struct sockaddr_in *sin; - - sin = (struct sockaddr_in *)&store_sa; - memcpy(sin, addr, sizeof(struct sockaddr_in)); - sin->sin_port = 0; - break; - } + memcpy(&store.sin, addr, sizeof(struct sockaddr_in)); + store.sin.sin_port = 0; + break; #endif #ifdef INET6 case AF_INET6: - { - struct sockaddr_in6 *sin6; - - sin6 = (struct sockaddr_in6 *)&store_sa; - memcpy(sin6, addr, sizeof(struct sockaddr_in6)); - sin6->sin6_port = 0; - break; - } + memcpy(&store.sin6, addr, sizeof(struct sockaddr_in6)); + store.sin6.sin6_port = 0; + break; #endif default: break; @@ -3168,7 +3158,7 @@ continue_anyway: * pass things in via the sctp_ifap argument * (Panda). */ - ifa = sctp_find_ifa_by_addr((struct sockaddr *)&store_sa, + ifa = sctp_find_ifa_by_addr(&store.sa, vrf_id, SCTP_ADDR_NOT_LOCKED); } if (ifa == NULL) { Modified: head/sys/netinet/sctp_sysctl.c ============================================================================== --- head/sys/netinet/sctp_sysctl.c Sun Sep 7 08:16:27 2014 (r271220) +++ head/sys/netinet/sctp_sysctl.c Sun Sep 7 09:06:26 2014 (r271221) @@ -252,7 +252,7 @@ sctp_sysctl_copy_out_local_addresses(str if (ipv4_addr_legal) { struct sockaddr_in *sin; - sin = (struct sockaddr_in *)&sctp_ifa->address.sa; + sin = &sctp_ifa->address.sin; if (sin->sin_addr.s_addr == 0) continue; if (prison_check_ip4(inp->ip_inp.inp.inp_cred, @@ -271,7 +271,7 @@ sctp_sysctl_copy_out_local_addresses(str if (ipv6_addr_legal) { struct sockaddr_in6 *sin6; - sin6 = (struct sockaddr_in6 *)&sctp_ifa->address.sa; + sin6 = &sctp_ifa->address.sin6; if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) continue; if (prison_check_ip6(inp->ip_inp.inp.inp_cred, Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Sun Sep 7 08:16:27 2014 (r271220) +++ head/sys/netinet/sctp_usrreq.c Sun Sep 7 09:06:26 2014 (r271221) @@ -1188,7 +1188,7 @@ sctp_fill_up_addresses_vrf(struct sctp_i if (ipv4_addr_legal) { struct sockaddr_in *sin; - sin = (struct sockaddr_in *)&sctp_ifa->address.sa; + sin = &sctp_ifa->address.sin; if (sin->sin_addr.s_addr == 0) { /* * we skip @@ -1233,7 +1233,7 @@ sctp_fill_up_addresses_vrf(struct sctp_i if (ipv6_addr_legal) { struct sockaddr_in6 *sin6; - sin6 = (struct sockaddr_in6 *)&sctp_ifa->address.sa; + sin6 = &sctp_ifa->address.sin6; if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { /* * we skip @@ -6922,7 +6922,7 @@ sctp_ingetaddr(struct socket *so, struct if (laddr->ifa->address.sa.sa_family == AF_INET) { struct sockaddr_in *sin_a; - sin_a = (struct sockaddr_in *)&laddr->ifa->address.sa; + sin_a = &laddr->ifa->address.sin; sin->sin_addr = sin_a->sin_addr; fnd = 1; break; Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sun Sep 7 08:16:27 2014 (r271220) +++ head/sys/netinet/sctputil.c Sun Sep 7 09:06:26 2014 (r271221) @@ -6710,7 +6710,7 @@ sctp_local_addr_count(struct sctp_tcb *s if (ipv4_addr_legal) { struct sockaddr_in *sin; - sin = (struct sockaddr_in *)&sctp_ifa->address.sa; + sin = &sctp_ifa->address.sin; if (sin->sin_addr.s_addr == 0) { /* * skip unspecified @@ -6738,7 +6738,7 @@ sctp_local_addr_count(struct sctp_tcb *s if (ipv6_addr_legal) { struct sockaddr_in6 *sin6; - sin6 = (struct sockaddr_in6 *)&sctp_ifa->address.sa; + sin6 = &sctp_ifa->address.sin6; if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { continue; } Modified: head/sys/netinet6/sctp6_usrreq.c ============================================================================== --- head/sys/netinet6/sctp6_usrreq.c Sun Sep 7 08:16:27 2014 (r271220) +++ head/sys/netinet6/sctp6_usrreq.c Sun Sep 7 09:06:26 2014 (r271221) @@ -844,7 +844,7 @@ sctp6_connect(struct socket *so, struct #ifdef INET struct in6pcb *inp6; struct sockaddr_in6 *sin6; - struct sockaddr_storage ss; + union sctp_sockstore store; #endif @@ -928,8 +928,8 @@ sctp6_connect(struct socket *so, struct } if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) { /* convert v4-mapped into v4 addr */ - in6_sin6_2_sin((struct sockaddr_in *)&ss, sin6); - addr = (struct sockaddr *)&ss; + in6_sin6_2_sin(&store.sin, sin6); + addr = &store.sa; } #endif /* INET */ /* Now do we connect? */ @@ -1057,7 +1057,7 @@ sctp6_getaddr(struct socket *so, struct if (laddr->ifa->address.sa.sa_family == AF_INET6) { struct sockaddr_in6 *sin_a; - sin_a = (struct sockaddr_in6 *)&laddr->ifa->address.sin6; + sin_a = &laddr->ifa->address.sin6; sin6->sin6_addr = sin_a->sin6_addr; fnd = 1; break; From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 11:57:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAC3A600; Sun, 7 Sep 2014 11:57:08 +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 D60FB1771; Sun, 7 Sep 2014 11:57:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s87Bv8hJ041285; Sun, 7 Sep 2014 11:57:08 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s87Bv8TA041284; Sun, 7 Sep 2014 11:57:08 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409071157.s87Bv8TA041284@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 7 Sep 2014 11:57:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271222 - head/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 11:57:09 -0000 Author: delphij Date: Sun Sep 7 11:57:08 2014 New Revision: 271222 URL: http://svnweb.freebsd.org/changeset/base/271222 Log: Fix typo. Submitted by: Dmitry Morozovsky MFC after: 3 days Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Sun Sep 7 09:06:26 2014 (r271221) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Sun Sep 7 11:57:08 2014 (r271222) @@ -414,7 +414,7 @@ or smaller can take advantage of this fe When this feature is enabled, the contents of highly-compressible blocks are stored in the block "pointer" itself .Po a misnomer in this case, as it contains -the compresseed data, rather than a pointer to its location on disk +the compressed data, rather than a pointer to its location on disk .Pc . Thus the space of the block From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 12:07:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06F0AC9B; Sun, 7 Sep 2014 12:07:27 +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 E62A41890; Sun, 7 Sep 2014 12:07:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s87C7Qpt046261; Sun, 7 Sep 2014 12:07:26 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s87C7Q9n046260; Sun, 7 Sep 2014 12:07:26 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409071207.s87C7Q9n046260@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 7 Sep 2014 12:07:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r271223 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 12:07:27 -0000 Author: delphij Date: Sun Sep 7 12:07:26 2014 New Revision: 271223 URL: http://svnweb.freebsd.org/changeset/base/271223 Log: 5117 space map reallocation can cause corruption Reviewed by: Matthew Ahrens Reviewed by: Sebastien Roy Reviewed by: Richard Elling Approved by: Richard Lowe Author: George Wilson illumos/illumos-gate@e503a685964805f048b35c2a4e70e0638344f2b7 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c Sun Sep 7 11:57:08 2014 (r271222) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c Sun Sep 7 12:07:26 2014 (r271223) @@ -684,6 +684,11 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) return; } + if (dn->dn_next_nlevels[txgoff]) { + dnode_increase_indirection(dn, tx); + dn->dn_next_nlevels[txgoff] = 0; + } + if (dn->dn_next_nblkptr[txgoff]) { /* this should only happen on a realloc */ ASSERT(dn->dn_allocated_txg == tx->tx_txg); @@ -708,11 +713,6 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) mutex_exit(&dn->dn_mtx); } - if (dn->dn_next_nlevels[txgoff]) { - dnode_increase_indirection(dn, tx); - dn->dn_next_nlevels[txgoff] = 0; - } - dbuf_sync_list(list, tx); if (!DMU_OBJECT_IS_SPECIAL(dn->dn_object)) { From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 12:13:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9EAB4FD7; Sun, 7 Sep 2014 12:13:50 +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 6FF95194C; Sun, 7 Sep 2014 12:13:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s87CDork050950; Sun, 7 Sep 2014 12:13:50 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s87CDoct050949; Sun, 7 Sep 2014 12:13:50 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409071213.s87CDoct050949@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 7 Sep 2014 12:13:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r271224 - vendor/illumos/dist/lib/libzfs/common X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 12:13:50 -0000 Author: delphij Date: Sun Sep 7 12:13:49 2014 New Revision: 271224 URL: http://svnweb.freebsd.org/changeset/base/271224 Log: 5116 zpool history -i goes into infinite loop Reviewed by: Christopher Siden Reviewed by: Dan Kimmel Reviewed by: George Wilson Reviewed by: Richard Elling Reviewed by: Boris Protopopov Approved by: Dan McDonald Author: Matthew Ahrens illumos/illumos-gate@3339867a862f63acdad71abd574d5d79e18d8579 Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Sun Sep 7 12:07:26 2014 (r271223) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Sun Sep 7 12:13:49 2014 (r271224) @@ -3698,22 +3698,24 @@ zpool_history_unpack(char *buf, uint64_t return (0); } -#define HIS_BUF_LEN (128*1024) - /* * Retrieve the command history of a pool. */ int zpool_get_history(zpool_handle_t *zhp, nvlist_t **nvhisp) { - char buf[HIS_BUF_LEN]; + char *buf; + int buflen = 128 * 1024; uint64_t off = 0; nvlist_t **records = NULL; uint_t numrecords = 0; int err, i; + buf = malloc(buflen); + if (buf == NULL) + return (ENOMEM); do { - uint64_t bytes_read = sizeof (buf); + uint64_t bytes_read = buflen; uint64_t leftover; if ((err = get_history(zhp, buf, &off, &bytes_read)) != 0) @@ -3727,10 +3729,23 @@ zpool_get_history(zpool_handle_t *zhp, n &leftover, &records, &numrecords)) != 0) break; off -= leftover; + if (leftover == bytes_read) { + /* + * no progress made, because buffer is not big enough + * to hold this record; resize and retry. + */ + buflen *= 2; + free(buf); + buf = malloc(buflen); + if (buf == NULL) + return (ENOMEM); + } /* CONSTCOND */ } while (1); + free(buf); + if (!err) { verify(nvlist_alloc(nvhisp, NV_UNIQUE_NAME, 0) == 0); verify(nvlist_add_nvlist_array(*nvhisp, ZPOOL_HIST_RECORD, From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 12:18:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 619811A2; Sun, 7 Sep 2014 12:18:13 +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 4D1711961; Sun, 7 Sep 2014 12:18:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s87CIDUo051561; Sun, 7 Sep 2014 12:18:13 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s87CIDBU051560; Sun, 7 Sep 2014 12:18:13 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409071218.s87CIDBU051560@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 7 Sep 2014 12:18:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r271225 - vendor/illumos/dist/cmd/zpool X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 12:18:13 -0000 Author: delphij Date: Sun Sep 7 12:18:12 2014 New Revision: 271225 URL: http://svnweb.freebsd.org/changeset/base/271225 Log: 5118 When verifying or creating a storage pool, error messages only show one device Reviewed by: Adam Leventhal Reviewed by: Dan Kimmel Reviewed by: Matt Ahrens Reviewed by: Boris Protopopov Approved by: Dan McDonald Author: Basil Crow illumos/illumos-gate@75fbdf9b9f63da7e23a9814982b78a782559c086 Modified: vendor/illumos/dist/cmd/zpool/zpool_vdev.c Modified: vendor/illumos/dist/cmd/zpool/zpool_vdev.c ============================================================================== --- vendor/illumos/dist/cmd/zpool/zpool_vdev.c Sun Sep 7 12:13:49 2014 (r271224) +++ vendor/illumos/dist/cmd/zpool/zpool_vdev.c Sun Sep 7 12:18:12 2014 (r271225) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ /* @@ -1027,8 +1028,8 @@ is_spare(nvlist_t *config, const char *p * Go through and find any devices that are in use. We rely on libdiskmgt for * the majority of this task. */ -static int -check_in_use(nvlist_t *config, nvlist_t *nv, boolean_t force, +static boolean_t +is_device_in_use(nvlist_t *config, nvlist_t *nv, boolean_t force, boolean_t replacing, boolean_t isspare) { nvlist_t **child; @@ -1037,6 +1038,7 @@ check_in_use(nvlist_t *config, nvlist_t int ret; char buf[MAXPATHLEN]; uint64_t wholedisk; + boolean_t anyinuse = B_FALSE; verify(nvlist_lookup_string(nv, ZPOOL_CONFIG_TYPE, &type) == 0); @@ -1059,38 +1061,37 @@ check_in_use(nvlist_t *config, nvlist_t (void) strlcpy(buf, path, sizeof (buf)); if (is_spare(config, buf)) - return (0); + return (B_FALSE); } if (strcmp(type, VDEV_TYPE_DISK) == 0) ret = check_device(path, force, isspare); - - if (strcmp(type, VDEV_TYPE_FILE) == 0) + else if (strcmp(type, VDEV_TYPE_FILE) == 0) ret = check_file(path, force, isspare); - return (ret); + return (ret != 0); } for (c = 0; c < children; c++) - if ((ret = check_in_use(config, child[c], force, - replacing, B_FALSE)) != 0) - return (ret); + if (is_device_in_use(config, child[c], force, replacing, + B_FALSE)) + anyinuse = B_TRUE; if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_SPARES, &child, &children) == 0) for (c = 0; c < children; c++) - if ((ret = check_in_use(config, child[c], force, - replacing, B_TRUE)) != 0) - return (ret); + if (is_device_in_use(config, child[c], force, replacing, + B_TRUE)) + anyinuse = B_TRUE; if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_L2CACHE, &child, &children) == 0) for (c = 0; c < children; c++) - if ((ret = check_in_use(config, child[c], force, - replacing, B_FALSE)) != 0) - return (ret); + if (is_device_in_use(config, child[c], force, replacing, + B_FALSE)) + anyinuse = B_TRUE; - return (0); + return (anyinuse); } static const char * @@ -1442,7 +1443,7 @@ make_root_vdev(zpool_handle_t *zhp, int * uses (such as a dedicated dump device) that even '-f' cannot * override. */ - if (check_in_use(poolconfig, newroot, force, replacing, B_FALSE) != 0) { + if (is_device_in_use(poolconfig, newroot, force, replacing, B_FALSE)) { nvlist_free(newroot); return (NULL); } From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 13:13:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 494566C0; Sun, 7 Sep 2014 13:13: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 3480F1E51; Sun, 7 Sep 2014 13:13: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 s87DDhdg079903; Sun, 7 Sep 2014 13:13:43 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s87DDhCs079901; Sun, 7 Sep 2014 13:13:43 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409071313.s87DDhCs079901@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 7 Sep 2014 13:13:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271226 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 13:13:43 -0000 Author: delphij Date: Sun Sep 7 13:13:42 2014 New Revision: 271226 URL: http://svnweb.freebsd.org/changeset/base/271226 Log: MFV r271223: In dnode_sync(), do dnode_increase_indirection() before processing the dn_next_nblkptr. Illumos issue: 5117 space map reallocation can cause corruption MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Sun Sep 7 12:18:12 2014 (r271225) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Sun Sep 7 13:13:42 2014 (r271226) @@ -684,6 +684,11 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) return; } + if (dn->dn_next_nlevels[txgoff]) { + dnode_increase_indirection(dn, tx); + dn->dn_next_nlevels[txgoff] = 0; + } + if (dn->dn_next_nblkptr[txgoff]) { /* this should only happen on a realloc */ ASSERT(dn->dn_allocated_txg == tx->tx_txg); @@ -708,11 +713,6 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) mutex_exit(&dn->dn_mtx); } - if (dn->dn_next_nlevels[txgoff]) { - dnode_increase_indirection(dn, tx); - dn->dn_next_nlevels[txgoff] = 0; - } - dbuf_sync_list(list, tx); if (!DMU_OBJECT_IS_SPECIAL(dn->dn_object)) { From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 13:22:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12AECAD0; Sun, 7 Sep 2014 13:22:15 +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 F20821F33; Sun, 7 Sep 2014 13:22: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 s87DME9Y084378; Sun, 7 Sep 2014 13:22:14 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s87DMEdQ084377; Sun, 7 Sep 2014 13:22:14 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409071322.s87DMEdQ084377@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 7 Sep 2014 13:22:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271227 - head/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 13:22:15 -0000 Author: delphij Date: Sun Sep 7 13:22:14 2014 New Revision: 271227 URL: http://svnweb.freebsd.org/changeset/base/271227 Log: MFV r271225: Iterate through all the children instead of returning error when we hit the first error. This makes the error message give more information rather than just the first device that causes problem. Illumos issue: 5118 When verifying or creating a storage pool, error messages only show one device MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c Sun Sep 7 13:13:42 2014 (r271226) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c Sun Sep 7 13:22:14 2014 (r271227) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ /* @@ -1068,8 +1069,8 @@ is_spare(nvlist_t *config, const char *p * Go through and find any devices that are in use. We rely on libdiskmgt for * the majority of this task. */ -static int -check_in_use(nvlist_t *config, nvlist_t *nv, boolean_t force, +static boolean_t +is_device_in_use(nvlist_t *config, nvlist_t *nv, boolean_t force, boolean_t replacing, boolean_t isspare) { nvlist_t **child; @@ -1078,6 +1079,7 @@ check_in_use(nvlist_t *config, nvlist_t int ret; char buf[MAXPATHLEN]; uint64_t wholedisk; + boolean_t anyinuse = B_FALSE; verify(nvlist_lookup_string(nv, ZPOOL_CONFIG_TYPE, &type) == 0); @@ -1102,38 +1104,37 @@ check_in_use(nvlist_t *config, nvlist_t (void) strlcpy(buf, path, sizeof (buf)); if (is_spare(config, buf)) - return (0); + return (B_FALSE); } if (strcmp(type, VDEV_TYPE_DISK) == 0) ret = check_device(path, force, isspare); - - if (strcmp(type, VDEV_TYPE_FILE) == 0) + else if (strcmp(type, VDEV_TYPE_FILE) == 0) ret = check_file(path, force, isspare); - return (ret); + return (ret != 0); } for (c = 0; c < children; c++) - if ((ret = check_in_use(config, child[c], force, - replacing, B_FALSE)) != 0) - return (ret); + if (is_device_in_use(config, child[c], force, replacing, + B_FALSE)) + anyinuse = B_TRUE; if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_SPARES, &child, &children) == 0) for (c = 0; c < children; c++) - if ((ret = check_in_use(config, child[c], force, - replacing, B_TRUE)) != 0) - return (ret); + if (is_device_in_use(config, child[c], force, replacing, + B_TRUE)) + anyinuse = B_TRUE; if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_L2CACHE, &child, &children) == 0) for (c = 0; c < children; c++) - if ((ret = check_in_use(config, child[c], force, - replacing, B_FALSE)) != 0) - return (ret); + if (is_device_in_use(config, child[c], force, replacing, + B_FALSE)) + anyinuse = B_TRUE; - return (0); + return (anyinuse); } static const char * @@ -1487,7 +1488,7 @@ make_root_vdev(zpool_handle_t *zhp, int * uses (such as a dedicated dump device) that even '-f' cannot * override. */ - if (check_in_use(poolconfig, newroot, force, replacing, B_FALSE) != 0) { + if (is_device_in_use(poolconfig, newroot, force, replacing, B_FALSE)) { nvlist_free(newroot); return (NULL); } From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 13:22:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 9A1BFC10; Sun, 7 Sep 2014 13:22:52 +0000 (UTC) Date: Sun, 7 Sep 2014 13:22:52 +0000 From: Alexey Dokuchaev To: Alexander Motin Subject: Re: svn commit: r271193 - stable/10/sys/dev/sound/pcm Message-ID: <20140907132252.GB35819@FreeBSD.org> References: <201409061524.s86FOmLs056184@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201409061524.s86FOmLs056184@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 13:22:52 -0000 On Sat, Sep 06, 2014 at 03:24:48PM +0000, Alexander Motin wrote: > New Revision: 271193 > URL: http://svnweb.freebsd.org/changeset/base/271193 > > Log: > MFC r269228: > Add support for SOUND_MIXER_INFO IOCTL, used by gstreamer. If these changes are also applicable to stable/8, I'd appreciate if you could MFC them there as well. Thank you, ./danfe From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 15:56:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13642B4E; Sun, 7 Sep 2014 15:56:45 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF88B15A2; Sun, 7 Sep 2014 15:56:44 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.82 (FreeBSD)) (envelope-from ) id 1XQepV-000LUV-5a; Sun, 07 Sep 2014 19:56:41 +0400 Date: Sun, 7 Sep 2014 19:56:41 +0400 From: Slawa Olhovchenkov To: Andriy Gapon Subject: Re: svn commit: r260713 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <20140907155641.GB72244@zxy.spb.ru> References: <201401161324.s0GDOADB008512@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201401161324.s0GDOADB008512@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 15:56:45 -0000 On Thu, Jan 16, 2014 at 01:24:10PM +0000, Andriy Gapon wrote: > Author: avg > Date: Thu Jan 16 13:24:10 2014 > New Revision: 260713 > URL: http://svnweb.freebsd.org/changeset/base/260713 > > Log: > fix a bug in ZFS mirror code for handling multiple DVAa > > The bug was introduced in r256956 "Improve ZFS N-way mirror read > performance". > The code in vdev_mirror_dva_select erroneously considers already > tried DVAs for the next attempt. Thus, it is possible that a failing DVA > would be retried forever. > As a secondary effect, if the attempts fail with checksum error, then > checksum error reports are accumulated until the original request > ultimately fails or succeeds. But because retrying is going on indefinitely > the cheksum reports accumulation will effectively be a memory leak. > > Reviewed by: gibbs > MFC after: 13 days > Sponsored by: HybridCluster No NFC yet From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 16:01:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B609FA4; Sun, 7 Sep 2014 16:01:51 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2310815D2; Sun, 7 Sep 2014 16:01:51 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.82 (FreeBSD)) (envelope-from ) id 1XQeuT-000LaH-9L; Sun, 07 Sep 2014 20:01:49 +0400 Date: Sun, 7 Sep 2014 20:01:49 +0400 From: Slawa Olhovchenkov To: Steven Hartland Subject: Re: svn commit: r256956 - in head/sys: cam/ata cam/scsi cddl/contrib/opensolaris/uts/common/fs/zfs cddl/contrib/opensolaris/uts/common/fs/zfs/sys geom sys Message-ID: <20140907160149.GC72244@zxy.spb.ru> References: <201310230954.r9N9sxAZ011750@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201310230954.r9N9sxAZ011750@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 16:01:51 -0000 On Wed, Oct 23, 2013 at 09:54:59AM +0000, Steven Hartland wrote: > Author: smh > Date: Wed Oct 23 09:54:58 2013 > New Revision: 256956 > URL: http://svnweb.freebsd.org/changeset/base/256956 > > Log: > Improve ZFS N-way mirror read performance by using load and locality > information. > > The existing algorithm selects a preferred leaf vdev based on offset of the zio > request modulo the number of members in the mirror. It assumes the devices are > of equal performance and that spreading the requests randomly over both drives > will be sufficient to saturate them. In practice this results in the leaf vdevs > being under utilized. > > The new algorithm takes into the following additional factors: > * Load of the vdevs (number outstanding I/O requests) > * The locality of last queued I/O vs the new I/O request. > > Within the locality calculation additional knowledge about the underlying vdev > is considered such as; is the device backing the vdev a rotating media device. > > This results in performance increases across the board as well as significant > increases for predominantly streaming loads and for configurations which don't > have evenly performing devices. > > The following are results from a setup with 3 Way Mirror with 2 x HD's and > 1 x SSD from a basic test running multiple parrallel dd's. > > With pre-fetch disabled (vfs.zfs.prefetch_disable=1): > > == Stripe Balanced (default) == > Read 15360MB using bs: 1048576, readers: 3, took 161 seconds @ 95 MB/s > == Load Balanced (zfslinux) == > Read 15360MB using bs: 1048576, readers: 3, took 297 seconds @ 51 MB/s > == Load Balanced (locality freebsd) == > Read 15360MB using bs: 1048576, readers: 3, took 54 seconds @ 284 MB/s > > With pre-fetch enabled (vfs.zfs.prefetch_disable=0): > > == Stripe Balanced (default) == > Read 15360MB using bs: 1048576, readers: 3, took 91 seconds @ 168 MB/s > == Load Balanced (zfslinux) == > Read 15360MB using bs: 1048576, readers: 3, took 108 seconds @ 142 MB/s > == Load Balanced (locality freebsd) == > Read 15360MB using bs: 1048576, readers: 3, took 48 seconds @ 320 MB/s > > In addition to the performance changes the code was also restructured, with > the help of Justin Gibbs, to provide a more logical flow which also ensures > vdevs loads are only calculated from the set of valid candidates. > > The following additional sysctls where added to allow the administrator > to tune the behaviour of the load algorithm: > * vfs.zfs.vdev.mirror.rotating_inc > * vfs.zfs.vdev.mirror.rotating_seek_inc > * vfs.zfs.vdev.mirror.rotating_seek_offset > * vfs.zfs.vdev.mirror.non_rotating_inc > * vfs.zfs.vdev.mirror.non_rotating_seek_inc > > These changes where based on work started by the zfsonlinux developers: > https://github.com/zfsonlinux/zfs/pull/1487 > > Reviewed by: gibbs, mav, will > MFC after: 2 weeks > Sponsored by: Multiplay No MFC yet. From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 17:07:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3388C2C; Sun, 7 Sep 2014 17:07:19 +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 DEEC31EC4; Sun, 7 Sep 2014 17:07: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 s87H7Ja9090656; Sun, 7 Sep 2014 17:07:19 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s87H7JiX090654; Sun, 7 Sep 2014 17:07:19 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201409071707.s87H7JiX090654@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 7 Sep 2014 17:07:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271228 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 17:07:20 -0000 Author: tuexen Date: Sun Sep 7 17:07:19 2014 New Revision: 271228 URL: http://svnweb.freebsd.org/changeset/base/271228 Log: Address another warnings reported by Patrick Laimbock when compiling in userspace. While there, improve consistency. MFC after: 1 week Modified: head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Sun Sep 7 13:22:14 2014 (r271227) +++ head/sys/netinet/sctp_asconf.c Sun Sep 7 17:07:19 2014 (r271228) @@ -2772,18 +2772,16 @@ sctp_process_initack_addresses(struct sc struct sctp_paramhdr tmp_param, *ph; uint16_t plen, ptype; struct sctp_ifa *sctp_ifa; + union sctp_sockstore store; #ifdef INET6 struct sctp_ipv6addr_param addr6_store; - struct sockaddr_in6 sin6; #endif #ifdef INET struct sctp_ipv4addr_param addr4_store; - struct sockaddr_in sin; #endif - struct sockaddr *sa; uint32_t vrf_id; SCTPDBG(SCTP_DEBUG_ASCONF2, "processing init-ack addresses\n"); @@ -2796,21 +2794,6 @@ sctp_process_initack_addresses(struct sc if ((offset + sizeof(struct sctp_paramhdr)) > length) { return; } - /* init the addresses */ -#ifdef INET6 - bzero(&sin6, sizeof(sin6)); - sin6.sin6_family = AF_INET6; - sin6.sin6_len = sizeof(sin6); - sin6.sin6_port = stcb->rport; -#endif - -#ifdef INET - bzero(&sin, sizeof(sin)); - sin.sin_family = AF_INET; - sin.sin_len = sizeof(sin); - sin.sin_port = stcb->rport; -#endif - /* go through the addresses in the init-ack */ ph = (struct sctp_paramhdr *) sctp_m_getptr(m, offset, sizeof(struct sctp_paramhdr), @@ -2833,9 +2816,11 @@ sctp_process_initack_addresses(struct sc a6p == NULL) { return; } - memcpy(&sin6.sin6_addr, a6p->addr, - sizeof(struct in6_addr)); - sa = (struct sockaddr *)&sin6; + memset(&store, 0, sizeof(union sctp_sockstore)); + store.sin6.sin6_family = AF_INET6; + store.sin6.sin6_len = sizeof(struct sockaddr_in6); + store.sin6.sin6_port = stcb->rport; + memcpy(&store.sin6.sin6_addr, a6p->addr, sizeof(struct in6_addr)); break; } #endif @@ -2852,8 +2837,11 @@ sctp_process_initack_addresses(struct sc a4p == NULL) { return; } - sin.sin_addr.s_addr = a4p->addr; - sa = (struct sockaddr *)&sin; + memset(&store, 0, sizeof(union sctp_sockstore)); + store.sin.sin_family = AF_INET; + store.sin.sin_len = sizeof(struct sockaddr_in); + store.sin.sin_port = stcb->rport; + store.sin.sin_addr.s_addr = a4p->addr; break; } #endif @@ -2867,7 +2855,7 @@ sctp_process_initack_addresses(struct sc } else { vrf_id = SCTP_DEFAULT_VRFID; } - sctp_ifa = sctp_find_ifa_by_addr(sa, vrf_id, + sctp_ifa = sctp_find_ifa_by_addr(&store.sa, vrf_id, SCTP_ADDR_NOT_LOCKED); if (sctp_ifa == NULL) { /* address doesn't exist anymore */ @@ -2878,7 +2866,7 @@ sctp_process_initack_addresses(struct sc SCTP_PCB_FLAGS_DO_ASCONF)) && stcb->asoc.asconf_supported) { /* queue an ASCONF DEL_IP_ADDRESS */ - status = sctp_asconf_queue_sa_delete(stcb, sa); + status = sctp_asconf_queue_sa_delete(stcb, &store.sa); /* * if queued ok, and in correct state, send * out the ASCONF. Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sun Sep 7 13:22:14 2014 (r271227) +++ head/sys/netinet/sctp_input.c Sun Sep 7 17:07:19 2014 (r271228) @@ -593,8 +593,7 @@ sctp_handle_heartbeat_ack(struct sctp_he store.sin6.sin6_family = cp->heartbeat.hb_info.addr_family; store.sin6.sin6_len = cp->heartbeat.hb_info.addr_len; store.sin6.sin6_port = stcb->rport; - memcpy(&store.sin6.sin6_addr, cp->heartbeat.hb_info.address, - sizeof(store.sin6.sin6_addr)); + memcpy(&store.sin6.sin6_addr, cp->heartbeat.hb_info.address, sizeof(struct in6_addr)); } else { return; } @@ -2262,8 +2261,7 @@ sctp_process_cookie_new(struct mbuf *m, store.sin6.sin6_family = AF_INET6; store.sin6.sin6_len = sizeof(struct sockaddr_in6); store.sin6.sin6_scope_id = cookie->scope_id; - memcpy(&store.sin6.sin6_addr, cookie->laddress, - sizeof(store.sin6.sin6_addr)); + memcpy(&store.sin6.sin6_addr, cookie->laddress, sizeof(struct in6_addr)); break; #endif default: From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 17:16:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8AD8B1DA; Sun, 7 Sep 2014 17:16:00 +0000 (UTC) Received: from smtp1.multiplay.co.uk (smtp1.multiplay.co.uk [85.236.96.35]) by mx1.freebsd.org (Postfix) with ESMTP id 21EFB114D; Sun, 7 Sep 2014 17:15:59 +0000 (UTC) Received: by smtp1.multiplay.co.uk (Postfix, from userid 65534) id 0884620E7088A; Sun, 7 Sep 2014 17:15:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.multiplay.co.uk X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=8.0 tests=AWL,BAYES_00,DOS_OE_TO_MX, FSL_HELO_NON_FQDN_1,RDNS_DYNAMIC,STOX_REPLY_TYPE autolearn=no version=3.3.1 Received: from r2d2 (82-69-141-170.dsl.in-addr.zen.co.uk [82.69.141.170]) by smtp1.multiplay.co.uk (Postfix) with ESMTPS id 3FA6F20E70885; Sun, 7 Sep 2014 17:15:57 +0000 (UTC) Message-ID: <620AD65419CE4565ADBFDD9967C9FD91@multiplay.co.uk> From: "Steven Hartland" To: "Slawa Olhovchenkov" References: <201310230954.r9N9sxAZ011750@svn.freebsd.org> <20140907160149.GC72244@zxy.spb.ru> Subject: Re: svn commit: r256956 - in head/sys: cam/ata cam/scsi cddl/contrib/opensolaris/uts/common/fs/zfs cddl/contrib/opensolaris/uts/common/fs/zfs/sys geom sys Date: Sun, 7 Sep 2014 18:16:01 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 17:16:00 -0000 ----- Original Message ----- From: "Slawa Olhovchenkov" To: "Steven Hartland" Cc: ; ; Sent: Sunday, September 07, 2014 5:01 PM Subject: Re: svn commit: r256956 - in head/sys: cam/ata cam/scsi cddl/contrib/opensolaris/uts/common/fs/zfs cddl/contrib/opensolaris/uts/common/fs/zfs/sys geom sys > On Wed, Oct 23, 2013 at 09:54:59AM +0000, Steven Hartland wrote: > >> Author: smh >> Date: Wed Oct 23 09:54:58 2013 >> New Revision: 256956 >> URL: http://svnweb.freebsd.org/changeset/base/256956 >> >> Log: >> Improve ZFS N-way mirror read performance by using load and locality >> information. >> >> The existing algorithm selects a preferred leaf vdev based on offset of the zio >> request modulo the number of members in the mirror. It assumes the devices are >> of equal performance and that spreading the requests randomly over both drives >> will be sufficient to saturate them. In practice this results in the leaf vdevs >> being under utilized. >> >> The new algorithm takes into the following additional factors: >> * Load of the vdevs (number outstanding I/O requests) >> * The locality of last queued I/O vs the new I/O request. >> >> Within the locality calculation additional knowledge about the underlying vdev >> is considered such as; is the device backing the vdev a rotating media device. >> >> This results in performance increases across the board as well as significant >> increases for predominantly streaming loads and for configurations which don't >> have evenly performing devices. >> >> The following are results from a setup with 3 Way Mirror with 2 x HD's and >> 1 x SSD from a basic test running multiple parrallel dd's. >> >> With pre-fetch disabled (vfs.zfs.prefetch_disable=1): >> >> == Stripe Balanced (default) == >> Read 15360MB using bs: 1048576, readers: 3, took 161 seconds @ 95 MB/s >> == Load Balanced (zfslinux) == >> Read 15360MB using bs: 1048576, readers: 3, took 297 seconds @ 51 MB/s >> == Load Balanced (locality freebsd) == >> Read 15360MB using bs: 1048576, readers: 3, took 54 seconds @ 284 MB/s >> >> With pre-fetch enabled (vfs.zfs.prefetch_disable=0): >> >> == Stripe Balanced (default) == >> Read 15360MB using bs: 1048576, readers: 3, took 91 seconds @ 168 MB/s >> == Load Balanced (zfslinux) == >> Read 15360MB using bs: 1048576, readers: 3, took 108 seconds @ 142 MB/s >> == Load Balanced (locality freebsd) == >> Read 15360MB using bs: 1048576, readers: 3, took 48 seconds @ 320 MB/s >> >> In addition to the performance changes the code was also restructured, with >> the help of Justin Gibbs, to provide a more logical flow which also ensures >> vdevs loads are only calculated from the set of valid candidates. >> >> The following additional sysctls where added to allow the administrator >> to tune the behaviour of the load algorithm: >> * vfs.zfs.vdev.mirror.rotating_inc >> * vfs.zfs.vdev.mirror.rotating_seek_inc >> * vfs.zfs.vdev.mirror.rotating_seek_offset >> * vfs.zfs.vdev.mirror.non_rotating_inc >> * vfs.zfs.vdev.mirror.non_rotating_seek_inc >> >> These changes where based on work started by the zfsonlinux developers: >> https://github.com/zfsonlinux/zfs/pull/1487 >> >> Reviewed by: gibbs, mav, will >> MFC after: 2 weeks >> Sponsored by: Multiplay > > No MFC yet. Grr not seen any MFC reminder :( Will send a request to re@ for permission along with r260713. Regards Steve From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 18:05:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 584059F9; Sun, 7 Sep 2014 18:05:38 +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 29EB11955; Sun, 7 Sep 2014 18:05:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s87I5ckM021154; Sun, 7 Sep 2014 18:05:38 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s87I5b1m021150; Sun, 7 Sep 2014 18:05:37 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201409071805.s87I5b1m021150@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 7 Sep 2014 18:05:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271230 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 18:05:38 -0000 Author: tuexen Date: Sun Sep 7 18:05:37 2014 New Revision: 271230 URL: http://svnweb.freebsd.org/changeset/base/271230 Log: Address warnings generated by the clang analyzer. MFC after: 1 week Modified: head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sun Sep 7 17:42:32 2014 (r271229) +++ head/sys/netinet/sctp_input.c Sun Sep 7 18:05:37 2014 (r271230) @@ -2882,9 +2882,9 @@ sctp_handle_cookie_ack(struct sctp_cooki SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_cookie_ack: handling COOKIE-ACK\n"); - if (stcb == NULL) + if ((stcb == NULL) || (net == NULL)) { return; - + } asoc = &stcb->asoc; sctp_stop_all_cookie_timers(stcb); Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sun Sep 7 17:42:32 2014 (r271229) +++ head/sys/netinet/sctp_output.c Sun Sep 7 18:05:37 2014 (r271230) @@ -5921,8 +5921,8 @@ do_a_abort: parameter_len = (uint16_t) sizeof(struct sctp_paramhdr); ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+chunk_len); ph->param_type = htons(SCTP_HAS_NAT_SUPPORT); - ph->param_length = htons(sizeof(struct sctp_paramhdr)); - chunk_len += sizeof(struct sctp_paramhdr); + ph->param_length = htons(parameter_len); + chunk_len += parameter_len; } /* And now tell the peer which extensions we support */ num_ext = 0; Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sun Sep 7 17:42:32 2014 (r271229) +++ head/sys/netinet/sctp_pcb.c Sun Sep 7 18:05:37 2014 (r271230) @@ -6123,7 +6123,6 @@ sctp_load_addresses_from_init(struct sct peer_supports_prsctp = 0; peer_supports_auth = 0; peer_supports_asconf = 0; - peer_supports_asconf = 0; peer_supports_reconfig = 0; peer_supports_nrsack = 0; peer_supports_pktdrop = 0; From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 18:32:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAA081A1; Sun, 7 Sep 2014 18:32: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 CA7231BEF; Sun, 7 Sep 2014 18:32: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 s87IWgRY035306; Sun, 7 Sep 2014 18:32:42 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s87IWgNx035305; Sun, 7 Sep 2014 18:32:42 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201409071832.s87IWgNx035305@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 7 Sep 2014 18:32:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271232 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 18:32:43 -0000 Author: andrew Date: Sun Sep 7 18:32:42 2014 New Revision: 271232 URL: http://svnweb.freebsd.org/changeset/base/271232 Log: Generalise the va to pa code and use it when starting secondary cores Reviewed by: ian@, rpaulo@ Differential Revision: https://reviews.freebsd.org/D736 Modified: head/sys/arm/arm/locore.S Modified: head/sys/arm/arm/locore.S ============================================================================== --- head/sys/arm/arm/locore.S Sun Sep 7 18:30:29 2014 (r271231) +++ head/sys/arm/arm/locore.S Sun Sep 7 18:32:42 2014 (r271232) @@ -152,21 +152,7 @@ Lunmapped: /* Find the delta between VA and PA */ adr r0, Lpagetable - ldr r1, [r0] - sub r2, r1, r0 - /* At this point: r2 = VA - PA */ - - /* - * Find the physical address of the table. After these two - * instructions: - * r1 = va(pagetable) - * - * r0 = va(pagetable) - (VA - PA) - * = va(pagetable) - VA + PA - * = pa(pagetable) - */ - ldr r1, [r0, #4] - sub r0, r1, r2 + bl translate_va_to_pa #ifndef _ARM_ARCH_6 /* @@ -289,6 +275,41 @@ virt_done: /* NOTREACHED */ END(_start) +#define VA_TO_PA_POINTER(name, table) \ +name: ;\ + .word . ;\ + .word table + +/* + * Returns the physical address of a magic va to pa pointer. + * r0 - The pagetable data pointer. This must be built using the + * VA_TO_PA_POINTER macro. + * e.g. + * VA_TO_PA_POINTER(Lpagetable, pagetable) + * ... + * adr r0, Lpagetable + * bl translate_va_to_pa + * r0 will now contain the physical address of pagetable + * r1, r2 - Trashed + */ +translate_va_to_pa: + ldr r1, [r0] + sub r2, r1, r0 + /* At this point: r2 = VA - PA */ + + /* + * Find the physical address of the table. After these two + * instructions: + * r1 = va(pagetable) + * + * r0 = va(pagetable) - (VA - PA) + * = va(pagetable) - VA + PA + * = pa(pagetable) + */ + ldr r1, [r0, #4] + sub r0, r1, r2 + RET + /* * Builds the page table * r0 - The table base address @@ -320,9 +341,7 @@ build_pagetables: RET -Lpagetable: - .word . - .word pagetable +VA_TO_PA_POINTER(Lpagetable, pagetable) Lvirtaddr: .word KERNVIRTADDR @@ -368,8 +387,7 @@ pagetable: .Lmpvirt_done: .word mpvirt_done -Lstartup_pagetable_secondary: - .word temp_pagetable +VA_TO_PA_POINTER(Lstartup_pagetable_secondary, temp_pagetable) ASENTRY_NP(mpentry) @@ -396,10 +414,12 @@ ASENTRY_NP(mpentry) bl armv7_idcache_inv_all /* Modifies r0-r3, ip */ #endif - ldr r0, Lstartup_pagetable_secondary - bic r0, r0, #0xf0000000 - orr r0, r0, #PHYSADDR + /* Load the page table physical address */ + adr r0, Lstartup_pagetable_secondary + bl translate_va_to_pa + /* Load the address the secondary page table */ ldr r0, [r0] + orr r0, r0, #2 /* Set TTB shared memory flag */ mcr p15, 0, r0, c2, c0, 0 /* Set TTB */ mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */ From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 18:42:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D821F573; Sun, 7 Sep 2014 18:42: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 A90191CE6; Sun, 7 Sep 2014 18:42: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 s87IgkwJ040291; Sun, 7 Sep 2014 18:42:46 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s87IgkXr040288; Sun, 7 Sep 2014 18:42:46 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201409071842.s87IgkXr040288@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 7 Sep 2014 18:42: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: r271233 - in stable/9/sys: amd64/conf conf i386/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 18:42:47 -0000 Author: markj Date: Sun Sep 7 18:42:45 2014 New Revision: 271233 URL: http://svnweb.freebsd.org/changeset/base/271233 Log: MFC r271137: Add mrsas(4) to GENERIC for i386 and amd64. Modified: stable/9/sys/amd64/conf/GENERIC stable/9/sys/conf/NOTES stable/9/sys/i386/conf/GENERIC Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/amd64/conf/GENERIC ============================================================================== --- stable/9/sys/amd64/conf/GENERIC Sun Sep 7 18:32:42 2014 (r271232) +++ stable/9/sys/amd64/conf/GENERIC Sun Sep 7 18:42:45 2014 (r271233) @@ -151,6 +151,7 @@ device aacraid # Adaptec by PMC RAID device ida # Compaq Smart RAID device mfi # LSI MegaRAID SAS device mlx # Mylex DAC960 family +device mrsas # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s #XXX pointer/int warnings #device pst # Promise Supertrak SX6000 device twe # 3ware ATA RAID Modified: stable/9/sys/conf/NOTES ============================================================================== --- stable/9/sys/conf/NOTES Sun Sep 7 18:32:42 2014 (r271232) +++ stable/9/sys/conf/NOTES Sun Sep 7 18:42:45 2014 (r271233) @@ -1673,6 +1673,7 @@ device amrp # SCSI Passthrough interfa device mfi # LSI MegaRAID SAS device mfip # LSI MegaRAID SAS passthrough, requires CAM options MFI_DEBUG +device mrsas # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s # # 3ware ATA RAID Modified: stable/9/sys/i386/conf/GENERIC ============================================================================== --- stable/9/sys/i386/conf/GENERIC Sun Sep 7 18:32:42 2014 (r271232) +++ stable/9/sys/i386/conf/GENERIC Sun Sep 7 18:42:45 2014 (r271233) @@ -158,6 +158,7 @@ device aacraid # Adaptec by PMC RAID device ida # Compaq Smart RAID device mfi # LSI MegaRAID SAS device mlx # Mylex DAC960 family +device mrsas # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s device pst # Promise Supertrak SX6000 device twe # 3ware ATA RAID From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 18:43:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 778486AE; Sun, 7 Sep 2014 18:43:27 +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 49C3F1CF0; Sun, 7 Sep 2014 18:43:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s87IhRSG040476; Sun, 7 Sep 2014 18:43:27 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s87IhQjH040473; Sun, 7 Sep 2014 18:43:26 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201409071843.s87IhQjH040473@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 7 Sep 2014 18:43: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: r271234 - in stable/10/sys: amd64/conf conf i386/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 18:43:27 -0000 Author: markj Date: Sun Sep 7 18:43:26 2014 New Revision: 271234 URL: http://svnweb.freebsd.org/changeset/base/271234 Log: MFC r271137: Add mrsas(4) to GENERIC for i386 and amd64. Approved by: re (gjb) Modified: stable/10/sys/amd64/conf/GENERIC stable/10/sys/conf/NOTES stable/10/sys/i386/conf/GENERIC Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/conf/GENERIC ============================================================================== --- stable/10/sys/amd64/conf/GENERIC Sun Sep 7 18:42:45 2014 (r271233) +++ stable/10/sys/amd64/conf/GENERIC Sun Sep 7 18:43:26 2014 (r271234) @@ -156,6 +156,7 @@ device aacraid # Adaptec by PMC RAID device ida # Compaq Smart RAID device mfi # LSI MegaRAID SAS device mlx # Mylex DAC960 family +device mrsas # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s #XXX pointer/int warnings #device pst # Promise Supertrak SX6000 device twe # 3ware ATA RAID Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Sun Sep 7 18:42:45 2014 (r271233) +++ stable/10/sys/conf/NOTES Sun Sep 7 18:43:26 2014 (r271234) @@ -1672,6 +1672,7 @@ device amrp # SCSI Passthrough interfa device mfi # LSI MegaRAID SAS device mfip # LSI MegaRAID SAS passthrough, requires CAM options MFI_DEBUG +device mrsas # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s # # 3ware ATA RAID Modified: stable/10/sys/i386/conf/GENERIC ============================================================================== --- stable/10/sys/i386/conf/GENERIC Sun Sep 7 18:42:45 2014 (r271233) +++ stable/10/sys/i386/conf/GENERIC Sun Sep 7 18:43:26 2014 (r271234) @@ -162,6 +162,7 @@ device aacraid # Adaptec by PMC RAID device ida # Compaq Smart RAID device mfi # LSI MegaRAID SAS device mlx # Mylex DAC960 family +device mrsas # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s device pst # Promise Supertrak SX6000 device twe # 3ware ATA RAID From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 18:57:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE5A29A2; Sun, 7 Sep 2014 18:57:19 +0000 (UTC) Received: from mail-yk0-x229.google.com (mail-yk0-x229.google.com [IPv6:2607:f8b0:4002:c07::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5598D1DCD; Sun, 7 Sep 2014 18:57:19 +0000 (UTC) Received: by mail-yk0-f169.google.com with SMTP id q200so8345015ykb.0 for ; Sun, 07 Sep 2014 11:57:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=gfshtmIgcrkbIJJCOw4YjtX/sIltHYGjXS442QqumXA=; b=gruQNxY58AD/vDz+w0EL1EYQLTOyImJmFuBXi8NvYfErMAU36TaLLnd4DgM/9TxbBq 6Sq7JrqfJyu6h/jkF/QAp7NftEQcpEJUurkG3qtqkUB6vBXeVbTkXUT5bZZ2M1dtrEWK SBMnzlFDsLDg8jehdMTnrjP+eqML9y1cJ7U6FM0Ev93/v3nsfkqQn+HM9HkTL37Um/ty t5QdJ0kS1xLbGr+l8dXHNnm669DsLXoip3SznkcWiFfZj4SuIYN5NseMoYXr8g4e9Ovo JoXMh0A7fvNfO8HGjkuPS12878VuwX6CvpUirTNQ/XkTcr7XDFCFTWPUQgxb9LuL8lHP lXrg== MIME-Version: 1.0 X-Received: by 10.236.96.167 with SMTP id r27mr35646170yhf.42.1410116238277; Sun, 07 Sep 2014 11:57:18 -0700 (PDT) Sender: antoine.brodin.freebsd@gmail.com Received: by 10.170.164.197 with HTTP; Sun, 7 Sep 2014 11:57:18 -0700 (PDT) In-Reply-To: <53e12558.5d33.563f584f@svn.freebsd.org> References: <53e12558.5d33.563f584f@svn.freebsd.org> Date: Sun, 7 Sep 2014 20:57:18 +0200 X-Google-Sender-Auth: uMCK_hBXjGqgRwFJkSeiCKxkyaU Message-ID: Subject: Re: svn commit: r269603 - in head: etc/mtree lib/libnv lib/libnv/tests tools/regression/lib/libnv From: Antoine Brodin To: Garrett Cooper Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 18:57:19 -0000 On Tue, Aug 5, 2014 at 8:41 PM, Garrett Cooper wrote: > Author: ngie > Date: Tue Aug 5 18:41:27 2014 > New Revision: 269603 > URL: http://svnweb.freebsd.org/changeset/base/269603 > > Log: > Integrate lib/libnv into the build/kyua > > Rename all of the TAP test applications from to _test > to match the convention described in the TestSuite wiki page > > Phabric: D538 > Approved by: jmmv (mentor) > Sponsored by: EMC / Isilon Storage Division > > Added: > head/lib/libnv/tests/ > head/lib/libnv/tests/Makefile (contents, props changed) > head/lib/libnv/tests/nvlist_add_test.c > - copied unchanged from r269562, head/tools/regression/lib/libnv/nvlist_add.c > head/lib/libnv/tests/nvlist_exists_test.c > - copied unchanged from r269545, head/tools/regression/lib/libnv/nvlist_exists.c > head/lib/libnv/tests/nvlist_free_test.c > - copied unchanged from r269545, head/tools/regression/lib/libnv/nvlist_free.c > head/lib/libnv/tests/nvlist_get_test.c > - copied unchanged from r269545, head/tools/regression/lib/libnv/nvlist_get.c > head/lib/libnv/tests/nvlist_move_test.c > - copied unchanged from r269545, head/tools/regression/lib/libnv/nvlist_move.c > head/lib/libnv/tests/nvlist_send_recv_test.c > - copied unchanged from r269545, head/tools/regression/lib/libnv/nvlist_send_recv.c > Deleted: > head/tools/regression/lib/libnv/ > Modified: > head/etc/mtree/BSD.tests.dist > head/lib/libnv/Makefile Hi, It seems that after this commit libnv moved from /lib to /usr/lib. Cheers, Antoine From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 19:33:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20C9D3C0; Sun, 7 Sep 2014 19:33:39 +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 0C3C711E9; Sun, 7 Sep 2014 19:33:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s87JXc4P064154; Sun, 7 Sep 2014 19:33:38 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s87JXcKE064153; Sun, 7 Sep 2014 19:33:38 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201409071933.s87JXcKE064153@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 7 Sep 2014 19:33:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271235 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 19:33:39 -0000 Author: andrew Date: Sun Sep 7 19:33:38 2014 New Revision: 271235 URL: http://svnweb.freebsd.org/changeset/base/271235 Log: Remove Lvirtaddr and Lphysaddr, these don't appear to be used. Modified: head/sys/arm/arm/locore.S Modified: head/sys/arm/arm/locore.S ============================================================================== --- head/sys/arm/arm/locore.S Sun Sep 7 18:43:26 2014 (r271234) +++ head/sys/arm/arm/locore.S Sun Sep 7 19:33:38 2014 (r271235) @@ -343,10 +343,6 @@ build_pagetables: VA_TO_PA_POINTER(Lpagetable, pagetable) -Lvirtaddr: - .word KERNVIRTADDR -Lphysaddr: - .word KERNPHYSADDR Lreal_start: .word _start Lend: From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 20:11:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E5A8B62; Sun, 7 Sep 2014 20:11:23 +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 88A3115AA; Sun, 7 Sep 2014 20:11:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s87KBN0c082492; Sun, 7 Sep 2014 20:11:23 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s87KBN8d082491; Sun, 7 Sep 2014 20:11:23 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201409072011.s87KBN8d082491@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Sun, 7 Sep 2014 20:11:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271236 - stable/10/sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 20:11:23 -0000 Author: rodrigc Date: Sun Sep 7 20:11:23 2014 New Revision: 271236 URL: http://svnweb.freebsd.org/changeset/base/271236 Log: MFC r262351: Remove KASSERT from in6p_lookup_mcast_ifp(). When the devel/jenkins port, version 1.551 was started, the kernel would panic if INVARIANTS was enabled in the kernel config. Suggested by: bms Approved by: re (gjb) Modified: stable/10/sys/netinet6/in6_mcast.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/in6_mcast.c ============================================================================== --- stable/10/sys/netinet6/in6_mcast.c Sun Sep 7 19:33:38 2014 (r271235) +++ stable/10/sys/netinet6/in6_mcast.c Sun Sep 7 20:11:23 2014 (r271236) @@ -1779,8 +1779,6 @@ in6p_lookup_mcast_ifp(const struct inpcb ("%s: not INP_IPV6 inpcb", __func__)); KASSERT(gsin6->sin6_family == AF_INET6, ("%s: not AF_INET6 group", __func__)); - KASSERT(IN6_IS_ADDR_MULTICAST(&gsin6->sin6_addr), - ("%s: not multicast", __func__)); ifp = NULL; memset(&ro6, 0, sizeof(struct route_in6)); From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 20:14:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 308A2EB9; Sun, 7 Sep 2014 20:14:34 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtp002.mac.com [17.172.220.237]) (using TLSv1 with cipher DES-CBC3-SHA (168/168 bits)) (Client CN "smtp.me.com", Issuer "VeriSign Class 3 Extended Validation SSL SGC CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0104215D3; Sun, 7 Sep 2014 20:14:33 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7u4-27.10(7.0.4.27.9) 64bit (built Jun 6 2014)) with ESMTPSA id <0NBJ00L8HS7OQE10@st11p02mm-asmtp002.mac.com>; Sun, 07 Sep 2014 20:14:15 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.12.52,1.0.27,0.0.0000 definitions=2014-09-07_03:2014-09-05,2014-09-07,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1409070227 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.0 \(1973.6\)) Subject: Re: svn commit: r270261 - head/sys/sys From: Rui Paulo In-reply-to: <201408210901.s7L91gZ7049822@svn.freebsd.org> Date: Sun, 07 Sep 2014 13:14:12 -0700 Content-transfer-encoding: quoted-printable Message-id: <0DD8929C-983D-49FD-A904-7A4FF9A3D2CB@me.com> References: <201408210901.s7L91gZ7049822@svn.freebsd.org> To: Davide Italiano X-Mailer: Apple Mail (2.1973.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 20:14:34 -0000 On Aug 21, 2014, at 02:01, Davide Italiano wrote: >=20 > Author: davide > Date: Thu Aug 21 09:01:42 2014 > New Revision: 270261 > URL: http://svnweb.freebsd.org/changeset/base/270261 >=20 > Log: > Revert r270227. GCC doesn't like the lack of LL suffix, > so this makes powerpc build failing. >=20 > Modified: > head/sys/sys/time.h >=20 > Modified: head/sys/sys/time.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/sys/time.h Thu Aug 21 08:25:46 2014 = (r270260) > +++ head/sys/sys/time.h Thu Aug 21 09:01:42 2014 = (r270261) > @@ -129,7 +129,7 @@ bintime_shift(struct bintime *_bt, int _ > #define SBT_1MS (SBT_1S / 1000) > #define SBT_1US (SBT_1S / 1000000) > #define SBT_1NS (SBT_1S / 1000000000) > -#define SBT_MAX 0x7fffffffffffffff > +#define SBT_MAX 0x7fffffffffffffffLL I also think this is more correct. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 20:27:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72A3D32E; Sun, 7 Sep 2014 20:27:49 +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 5D85A1833; Sun, 7 Sep 2014 20:27:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s87KRnK4088945; Sun, 7 Sep 2014 20:27:49 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s87KRn8L088943; Sun, 7 Sep 2014 20:27:49 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201409072027.s87KRn8L088943@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 7 Sep 2014 20:27:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271237 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 20:27:49 -0000 Author: sbruno Date: Sun Sep 7 20:27:48 2014 New Revision: 271237 URL: http://svnweb.freebsd.org/changeset/base/271237 Log: Remove redundant kern conf entries that are inherited via include Move cfg to spi1 as that's where it is located from the factory Modified: head/sys/mips/conf/WZR-300HP head/sys/mips/conf/WZR-300HP.hints Modified: head/sys/mips/conf/WZR-300HP ============================================================================== --- head/sys/mips/conf/WZR-300HP Sun Sep 7 20:11:23 2014 (r271236) +++ head/sys/mips/conf/WZR-300HP Sun Sep 7 20:27:48 2014 (r271237) @@ -21,12 +21,6 @@ options AR71XX_REALMEM=64*1024*1024 options AR71XX_ENV_UBOOT options BOOTVERBOSE -# Don't include the SCSI/CAM strings in the default build -options SCSI_NO_SENSE_STRINGS -options SCSI_NO_OP_STRINGS - -# .. And no sysctl strings -options NO_SYSCTL_DESCR # GEOM modules device geom_map # to get access to the SPI flash partitions Modified: head/sys/mips/conf/WZR-300HP.hints ============================================================================== --- head/sys/mips/conf/WZR-300HP.hints Sun Sep 7 20:11:23 2014 (r271236) +++ head/sys/mips/conf/WZR-300HP.hints Sun Sep 7 20:27:48 2014 (r271237) @@ -108,7 +108,7 @@ hint.map.4.name="rootfs" hint.map.4.readonly=1 #hint.map.5.at="flash/spi1" -hint.map.5.at="flash/spi0" +hint.map.5.at="flash/spi1" hint.map.5.start=0x00FF0000 hint.map.5.end= 0x01000000 hint.map.5.name="cfg" From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 20:41:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 92DAE6BD; Sun, 7 Sep 2014 20:41:35 +0000 (UTC) Received: from mail-lb0-x22e.google.com (mail-lb0-x22e.google.com [IPv6:2a00:1450:4010:c04::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B412819E0; Sun, 7 Sep 2014 20:41:34 +0000 (UTC) Received: by mail-lb0-f174.google.com with SMTP id n15so6231886lbi.33 for ; Sun, 07 Sep 2014 13:41:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=1QNwc+lGGNm6Rd/JNwFuZZdYOn8MwW4BK/oXr0Rf+kQ=; b=PiWgKneCUXU0y9W68yq+bfSFJqFq2OL0O1JKEYrcg7ZPUSM2pCzEzJ/R6ey9+lsoxc Pg/QdSLG38sqoVaq0NF6RsrVGlfZNxBFKugH5HNHizIOlreWeZS7XsMKzyrf9kV27+dW aCYXZbiJQqM0udfDZjP7mRXe9eu7KIXvXUbM/kh8fJJy1FrW3h10uKp5SFgEkrpHZwLL FLyzvx+dvwXH84P6xnEvRnkq6xgQWFjppT6ufAISa+JC4e3MS6ebRa8OsBK4F5lod49x fRmj8IVaVpF97r4CWWYjcMdDCndGtsXx4x/ZLv7Ez5CZzapIT1Ck0C/v0jiDuAo+hMDH JCJA== MIME-Version: 1.0 X-Received: by 10.152.21.98 with SMTP id u2mr3845888lae.80.1410122492424; Sun, 07 Sep 2014 13:41:32 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.25.207.196 with HTTP; Sun, 7 Sep 2014 13:41:32 -0700 (PDT) In-Reply-To: <0DD8929C-983D-49FD-A904-7A4FF9A3D2CB@me.com> References: <201408210901.s7L91gZ7049822@svn.freebsd.org> <0DD8929C-983D-49FD-A904-7A4FF9A3D2CB@me.com> Date: Sun, 7 Sep 2014 13:41:32 -0700 X-Google-Sender-Auth: l1xFkgDREdNX84D0aKPlrEKLgfs Message-ID: Subject: Re: svn commit: r270261 - head/sys/sys From: Davide Italiano To: Rui Paulo Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 20:41:35 -0000 On Sun, Sep 7, 2014 at 1:14 PM, Rui Paulo wrote: > On Aug 21, 2014, at 02:01, Davide Italiano wrote: >> >> Author: davide >> Date: Thu Aug 21 09:01:42 2014 >> New Revision: 270261 >> URL: http://svnweb.freebsd.org/changeset/base/270261 >> >> Log: >> Revert r270227. GCC doesn't like the lack of LL suffix, >> so this makes powerpc build failing. >> >> Modified: >> head/sys/sys/time.h >> >> Modified: head/sys/sys/time.h >> ============================================================================== >> --- head/sys/sys/time.h Thu Aug 21 08:25:46 2014 (r270260) >> +++ head/sys/sys/time.h Thu Aug 21 09:01:42 2014 (r270261) >> @@ -129,7 +129,7 @@ bintime_shift(struct bintime *_bt, int _ >> #define SBT_1MS (SBT_1S / 1000) >> #define SBT_1US (SBT_1S / 1000000) >> #define SBT_1NS (SBT_1S / 1000000000) >> -#define SBT_MAX 0x7fffffffffffffff >> +#define SBT_MAX 0x7fffffffffffffffLL > > I also think this is more correct. > It's actually redundant for all the architectures supported. Bruce provided explanation about why as a reply on the original commit. -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 20:53:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55AB98E0; Sun, 7 Sep 2014 20:53:34 +0000 (UTC) Received: from mail-pa0-x233.google.com (mail-pa0-x233.google.com [IPv6:2607:f8b0:400e:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E6311ADB; Sun, 7 Sep 2014 20:53:34 +0000 (UTC) Received: by mail-pa0-f51.google.com with SMTP id kx10so1693793pab.10 for ; Sun, 07 Sep 2014 13:53:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=hRq4BA+qP+yvtAf+6rX3vM6FKUSrFqg7nEufoWRujf8=; b=z40wjqFdD6glTwkzF7zYwfFUfibX9IjN10Zdl6a7UnZ7miqUtmZB8OqNzAYZh0DPeQ 9MfmKuaQMl9S8JO/9XBRrC9PMtu3VeU17z0rjVcK0/Z6qhNe/5FvfTZsrO1YDPYOh9uF yezjJ5bEZzjI/EeOS/nQ3dD9ARBl3eZmSHafI6aNgcS7izD81RxKABxm7fH1Lk3AtDrW 3P+rdFN54Uxpu2jJMlyO+ssIBopGmWfKoL2bCG1yv9zUMPbss3frqaNf6cx+z7fr4GQE U/ilc+UNmRGZnvpdx1So7bvQjNo1Bz6L0NGLZZ6fcD/ywto/HhLN+t7krww2HOJLWh69 HXjg== X-Received: by 10.66.119.175 with SMTP id kv15mr14346574pab.30.1410123213594; Sun, 07 Sep 2014 13:53:33 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:644f:a9af:8645:807a? ([2601:8:ab80:7d6:644f:a9af:8645:807a]) by mx.google.com with ESMTPSA id nd6sm7077631pbc.28.2014.09.07.13.53.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 07 Sep 2014 13:53:33 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_589DFCCC-27FF-4899-9E41-027CC4255374"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r269603 - in head: etc/mtree lib/libnv lib/libnv/tests tools/regression/lib/libnv From: yaneurabeya@gmail.com In-Reply-To: Date: Sun, 7 Sep 2014 13:53:31 -0700 Message-Id: References: <53e12558.5d33.563f584f@svn.freebsd.org> To: Antoine Brodin X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Garrett Cooper X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 20:53:34 -0000 --Apple-Mail=_589DFCCC-27FF-4899-9E41-027CC4255374 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Sep 7, 2014, at 11:57, Antoine Brodin wrote: > On Tue, Aug 5, 2014 at 8:41 PM, Garrett Cooper = wrote: >> Author: ngie >> Date: Tue Aug 5 18:41:27 2014 >> New Revision: 269603 >> URL: http://svnweb.freebsd.org/changeset/base/269603 >>=20 >> Log: >> Integrate lib/libnv into the build/kyua >>=20 >> Rename all of the TAP test applications from to _test >> to match the convention described in the TestSuite wiki page >>=20 >> Phabric: D538 >> Approved by: jmmv (mentor) >> Sponsored by: EMC / Isilon Storage Division >>=20 >> Added: >> head/lib/libnv/tests/ >> head/lib/libnv/tests/Makefile (contents, props changed) >> head/lib/libnv/tests/nvlist_add_test.c >> - copied unchanged from r269562, = head/tools/regression/lib/libnv/nvlist_add.c >> head/lib/libnv/tests/nvlist_exists_test.c >> - copied unchanged from r269545, = head/tools/regression/lib/libnv/nvlist_exists.c >> head/lib/libnv/tests/nvlist_free_test.c >> - copied unchanged from r269545, = head/tools/regression/lib/libnv/nvlist_free.c >> head/lib/libnv/tests/nvlist_get_test.c >> - copied unchanged from r269545, = head/tools/regression/lib/libnv/nvlist_get.c >> head/lib/libnv/tests/nvlist_move_test.c >> - copied unchanged from r269545, = head/tools/regression/lib/libnv/nvlist_move.c >> head/lib/libnv/tests/nvlist_send_recv_test.c >> - copied unchanged from r269545, = head/tools/regression/lib/libnv/nvlist_send_recv.c >> Deleted: >> head/tools/regression/lib/libnv/ >> Modified: >> head/etc/mtree/BSD.tests.dist >> head/lib/libnv/Makefile >=20 > Hi, >=20 > It seems that after this commit libnv moved from /lib to /usr/lib. You=92re right. SHLIBDIR is being overridden from bsd.own.mk. This patch = will fix it: $ git diff=20 diff --git a/lib/libnv/Makefile b/lib/libnv/Makefile index cad1ea4..4a7c76a 100644 --- a/lib/libnv/Makefile +++ b/lib/libnv/Makefile @@ -1,9 +1,10 @@ # $FreeBSD$ =20 +SHLIBDIR?=3D /lib + .include =20 LIB=3D nv -SHLIBDIR?=3D /lib SHLIB_MAJOR=3D 0 =20 SRCS=3D dnvlist.c $ make -VSHLIBDIR /lib I=92ll put it out for review soon. Thanks :)! -Garrett --Apple-Mail=_589DFCCC-27FF-4899-9E41-027CC4255374 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUDMXLAAoJEMZr5QU6S73euMUH/2gGjsUARzHoEVUsozY9+e6F zq+//GCGNmrcWBpAFwGryskuWbODKbnrGu/YJRCWMdRVvAs7mf+vdVuTjnbFG/oc Yx0VVodburzI6zAFym3Rr64zw/e4S6wgE9EKx78ipP/3ZVA784KSuQFNaX8uU10b 2VRfwhI0IekIo8J2XrliI4FVZEL2mFUbeB0S5iY5xjlObNK1oOS1i9k3CbM+sfj3 ASASNFfZSed0fCYeXr84dBFPvybLxeY2fRXuV55x/pKVyNVTPcsiqTFiHj6qMsj3 dv1TnLqcbfLoZB8WBBhvY0+6407axSUtoNl9tpshCRAOt3b4d3Elk9XKbM8Y5bg= =Tbn3 -----END PGP SIGNATURE----- --Apple-Mail=_589DFCCC-27FF-4899-9E41-027CC4255374-- From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 21:00:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48C14B3B; Sun, 7 Sep 2014 21:00:37 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtp002.mac.com [17.172.220.237]) (using TLSv1 with cipher DES-CBC3-SHA (168/168 bits)) (Client CN "smtp.me.com", Issuer "VeriSign Class 3 Extended Validation SSL SGC CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1AF431B4B; Sun, 7 Sep 2014 21:00:36 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7u4-27.10(7.0.4.27.9) 64bit (built Jun 6 2014)) with ESMTPSA id <0NBJ00KVQRJMG810@st11p02mm-asmtp002.mac.com>; Sun, 07 Sep 2014 19:59:49 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.12.52,1.0.27,0.0.0000 definitions=2014-09-07_03:2014-09-05,2014-09-07,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1409070224 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.0 \(1973.6\)) Subject: Re: svn commit: r269992 - in head/sys: amd64/conf i386/conf From: Rui Paulo In-reply-to: <201408141829.s7EITtZe033846@svn.freebsd.org> Date: Sun, 07 Sep 2014 12:59:45 -0700 Content-transfer-encoding: quoted-printable Message-id: <15A7FA13-F41B-436D-8EE6-D1774BF28F7C@me.com> References: <201408141829.s7EITtZe033846@svn.freebsd.org> To: Gavin Atkinson X-Mailer: Apple Mail (2.1973.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 21:00:37 -0000 On Aug 14, 2014, at 11:29, Gavin Atkinson wrote: >=20 > Author: gavin > Date: Thu Aug 14 18:29:55 2014 > New Revision: 269992 > URL: http://svnweb.freebsd.org/changeset/base/269992 >=20 > Log: > Update i386/NOTES and amd64/NOTES files to contain the complete list = of > firmwares for iwn(4) and sort them. >=20 > MFC after: 1 week >=20 > Modified: > head/sys/amd64/conf/NOTES > head/sys/i386/conf/NOTES >=20 > Modified: head/sys/amd64/conf/NOTES > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/amd64/conf/NOTES Thu Aug 14 18:16:27 2014 = (r269991) > +++ head/sys/amd64/conf/NOTES Thu Aug 14 18:29:55 2014 = (r269992) > @@ -307,7 +307,8 @@ options DRM_DEBUG # Include debug print > # Requires the ipw firmware module > # iwi: Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 = adapters > # Requires the iwi firmware module > -# iwn: Intel Wireless WiFi Link 4965/1000/5000/6000 802.11 = network adapters > +# iwn: Intel Wireless WiFi Link = 1000/105/135/2000/4965/5000/6000/6050 abgn > +# 802.11 network adapters > # Requires the iwn firmware module > # mlx4ib: Mellanox ConnectX HCA InfiniBand > # mlxen: Mellanox ConnectX HCA Ethernet > @@ -347,12 +348,18 @@ device wpi # Intel 3945ABG = wireless NI > # iwiibssfw: IBSS mode firmware > # iwimonitorfw: Monitor mode firmware > # Intel Wireless WiFi Link 4965/1000/5000/6000 series firmware: > -# iwnfw: Single module to support the = 4965/1000/5000/5150/6000 > -# iwn4965fw: Specific module for the 4965 only > +# iwnfw: Single module to support all devices > # iwn1000fw: Specific module for the 1000 only > +# iwn105fw: Specific module for the 105 only > +# iwn135fw: Specific module for the 135 only > +# iwn2000fw: Specific module for the 2000 only > +# iwn2030fw: Specific module for the 2030 only > +# iwn4965fw: Specific module for the 4965 only > # iwn5000fw: Specific module for the 5000 only > # iwn5150fw: Specific module for the 5150 only > # iwn6000fw: Specific module for the 6000 only > +# iwn6000g2afw: Specific module for the 6000g2a only > +# iwn6000g2bfw: Specific module for the 6000g2b only > # iwn6050fw: Specific module for the 6050 only > # wpifw: Intel 3945ABG Wireless LAN Controller firmware Why do we need to keep maintaining this when it's already in the man = page? -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 21:10:53 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF511F8B; Sun, 7 Sep 2014 21:10:53 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id B516F1D0A; Sun, 7 Sep 2014 21:10:51 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id AAA25144; Mon, 08 Sep 2014 00:10:34 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1XQjjF-0009l9-TR; Mon, 08 Sep 2014 00:10:33 +0300 Message-ID: <540CC991.3070604@FreeBSD.org> Date: Mon, 08 Sep 2014 00:09:37 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Slawa Olhovchenkov Subject: Re: svn commit: r260713 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201401161324.s0GDOADB008512@svn.freebsd.org> <20140907155641.GB72244@zxy.spb.ru> In-Reply-To: <20140907155641.GB72244@zxy.spb.ru> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 21:10:53 -0000 on 07/09/2014 18:56 Slawa Olhovchenkov said the following: > On Thu, Jan 16, 2014 at 01:24:10PM +0000, Andriy Gapon wrote: > >> Author: avg >> Date: Thu Jan 16 13:24:10 2014 >> New Revision: 260713 >> URL: http://svnweb.freebsd.org/changeset/base/260713 >> >> Log: >> fix a bug in ZFS mirror code for handling multiple DVAa >> >> The bug was introduced in r256956 "Improve ZFS N-way mirror read >> performance". >> The code in vdev_mirror_dva_select erroneously considers already >> tried DVAs for the next attempt. Thus, it is possible that a failing DVA >> would be retried forever. >> As a secondary effect, if the attempts fail with checksum error, then >> checksum error reports are accumulated until the original request >> ultimately fails or succeeds. But because retrying is going on indefinitely >> the cheksum reports accumulation will effectively be a memory leak. >> >> Reviewed by: gibbs >> MFC after: 13 days >> Sponsored by: HybridCluster > > No NFC yet > Is r256956 MFC-ed yet? -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 21:18:24 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7578B39A; Sun, 7 Sep 2014 21:18:24 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E50D1D7B; Sun, 7 Sep 2014 21:18:24 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.82 (FreeBSD)) (envelope-from ) id 1XQjqo-0000mm-BP; Mon, 08 Sep 2014 01:18:22 +0400 Date: Mon, 8 Sep 2014 01:18:22 +0400 From: Slawa Olhovchenkov To: Andriy Gapon Subject: Re: svn commit: r260713 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <20140907211822.GD1763@zxy.spb.ru> References: <201401161324.s0GDOADB008512@svn.freebsd.org> <20140907155641.GB72244@zxy.spb.ru> <540CC991.3070604@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <540CC991.3070604@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 21:18:24 -0000 On Mon, Sep 08, 2014 at 12:09:37AM +0300, Andriy Gapon wrote: > on 07/09/2014 18:56 Slawa Olhovchenkov said the following: > > On Thu, Jan 16, 2014 at 01:24:10PM +0000, Andriy Gapon wrote: > > > >> Author: avg > >> Date: Thu Jan 16 13:24:10 2014 > >> New Revision: 260713 > >> URL: http://svnweb.freebsd.org/changeset/base/260713 > >> > >> Log: > >> fix a bug in ZFS mirror code for handling multiple DVAa > >> > >> The bug was introduced in r256956 "Improve ZFS N-way mirror read > >> performance". > >> The code in vdev_mirror_dva_select erroneously considers already > >> tried DVAs for the next attempt. Thus, it is possible that a failing DVA > >> would be retried forever. > >> As a secondary effect, if the attempts fail with checksum error, then > >> checksum error reports are accumulated until the original request > >> ultimately fails or succeeds. But because retrying is going on indefinitely > >> the cheksum reports accumulation will effectively be a memory leak. > >> > >> Reviewed by: gibbs > >> MFC after: 13 days > >> Sponsored by: HybridCluster > > > > No NFC yet > > > > Is r256956 MFC-ed yet? Yes, I already see r256956 not MFC too. From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 21:26:03 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41708689; Sun, 7 Sep 2014 21:26:03 +0000 (UTC) Received: from smtp1.multiplay.co.uk (smtp1.multiplay.co.uk [85.236.96.35]) by mx1.freebsd.org (Postfix) with ESMTP id 027321E59; Sun, 7 Sep 2014 21:26:02 +0000 (UTC) Received: by smtp1.multiplay.co.uk (Postfix, from userid 65534) id 676C420E7088A; Sun, 7 Sep 2014 21:26:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.multiplay.co.uk X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=8.0 tests=AWL,BAYES_00,DOS_OE_TO_MX, FSL_HELO_NON_FQDN_1,RDNS_DYNAMIC,STOX_REPLY_TYPE autolearn=no version=3.3.1 Received: from r2d2 (82-69-141-170.dsl.in-addr.zen.co.uk [82.69.141.170]) by smtp1.multiplay.co.uk (Postfix) with ESMTPS id CAA2220E70885; Sun, 7 Sep 2014 21:25:58 +0000 (UTC) Message-ID: <00D872A5601148E8AB294954A163BEBD@multiplay.co.uk> From: "Steven Hartland" To: "Andriy Gapon" , "Slawa Olhovchenkov" References: <201401161324.s0GDOADB008512@svn.freebsd.org> <20140907155641.GB72244@zxy.spb.ru> <540CC991.3070604@FreeBSD.org> Subject: Re: svn commit: r260713 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Date: Sun, 7 Sep 2014 22:25:58 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 21:26:03 -0000 ----- Original Message ----- From: "Andriy Gapon" > on 07/09/2014 18:56 Slawa Olhovchenkov said the following: >> On Thu, Jan 16, 2014 at 01:24:10PM +0000, Andriy Gapon wrote: >> >>> Author: avg >>> Date: Thu Jan 16 13:24:10 2014 >>> New Revision: 260713 >>> URL: http://svnweb.freebsd.org/changeset/base/260713 >>> >>> Log: >>> fix a bug in ZFS mirror code for handling multiple DVAa >>> >>> The bug was introduced in r256956 "Improve ZFS N-way mirror read >>> performance". >>> The code in vdev_mirror_dva_select erroneously considers already >>> tried DVAs for the next attempt. Thus, it is possible that a failing DVA >>> would be retried forever. >>> As a secondary effect, if the attempts fail with checksum error, then >>> checksum error reports are accumulated until the original request >>> ultimately fails or succeeds. But because retrying is going on indefinitely >>> the cheksum reports accumulation will effectively be a memory leak. >>> >>> Reviewed by: gibbs >>> MFC after: 13 days >>> Sponsored by: HybridCluster >> >> No NFC yet >> > > Is r256956 MFC-ed yet? Nope I missed it, have applied for both to be MFC'ed. Regards Steve From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 21:30:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5352B83A; Sun, 7 Sep 2014 21:30:50 +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 3285E1E98; Sun, 7 Sep 2014 21:30:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s87LUo8U018339; Sun, 7 Sep 2014 21:30:50 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s87LUl52018324; Sun, 7 Sep 2014 21:30:47 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201409072130.s87LUl52018324@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 7 Sep 2014 21:30: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: r271238 - in stable/10/sys: cam/ata cam/scsi cddl/contrib/opensolaris/uts/common/fs/zfs cddl/contrib/opensolaris/uts/common/fs/zfs/sys geom sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 21:30:50 -0000 Author: smh Date: Sun Sep 7 21:30:47 2014 New Revision: 271238 URL: http://svnweb.freebsd.org/changeset/base/271238 Log: MFC r256956: Improve ZFS N-way mirror read performance by using load and locality information. MFC r260713: Fix ZFS mirror code for handling multiple DVA's Also make the addition of the d_rotation_rate binary compatible. This allows storage drivers compiled for 10.0 to work by preserving the ABI for disks. Approved by: re (gjb) Sponsored by: Multiplay Modified: stable/10/sys/cam/ata/ata_da.c stable/10/sys/cam/scsi/scsi_all.h stable/10/sys/cam/scsi/scsi_da.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c stable/10/sys/geom/geom.h stable/10/sys/geom/geom_disk.c stable/10/sys/geom/geom_disk.h stable/10/sys/geom/geom_subr.c stable/10/sys/sys/ata.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ata/ata_da.c ============================================================================== --- stable/10/sys/cam/ata/ata_da.c Sun Sep 7 20:27:48 2014 (r271237) +++ stable/10/sys/cam/ata/ata_da.c Sun Sep 7 21:30:47 2014 (r271238) @@ -1229,12 +1229,13 @@ adaregister(struct cam_periph *periph, v "kern.cam.ada.%d.write_cache", periph->unit_number); TUNABLE_INT_FETCH(announce_buf, &softc->write_cache); /* Disable queue sorting for non-rotational media by default. */ - if (cgd->ident_data.media_rotation_rate == 1) + if (cgd->ident_data.media_rotation_rate == ATA_RATE_NON_ROTATING) softc->sort_io_queue = 0; else softc->sort_io_queue = -1; adagetparams(periph, cgd); softc->disk = disk_alloc(); + softc->disk->d_rotation_rate = cgd->ident_data.media_rotation_rate; softc->disk->d_devstat = devstat_new_entry(periph->periph_name, periph->unit_number, softc->params.secsize, DEVSTAT_ALL_SUPPORTED, Modified: stable/10/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.h Sun Sep 7 20:27:48 2014 (r271237) +++ stable/10/sys/cam/scsi/scsi_all.h Sun Sep 7 21:30:47 2014 (r271238) @@ -2302,7 +2302,7 @@ struct scsi_vpd_block_characteristics u_int8_t page_length[2]; u_int8_t medium_rotation_rate[2]; #define SVPD_BDC_RATE_NOT_REPORTED 0x00 -#define SVPD_BDC_RATE_NONE_ROTATING 0x01 +#define SVPD_BDC_RATE_NON_ROTATING 0x01 u_int8_t reserved1; u_int8_t nominal_form_factor; #define SVPD_BDC_FORM_NOT_REPORTED 0x00 Modified: stable/10/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_da.c Sun Sep 7 20:27:48 2014 (r271237) +++ stable/10/sys/cam/scsi/scsi_da.c Sun Sep 7 21:30:47 2014 (r271238) @@ -3390,9 +3390,18 @@ dadone(struct cam_periph *periph, union * Disable queue sorting for non-rotational media * by default. */ - if (scsi_2btoul(bdc->medium_rotation_rate) == - SVPD_BDC_RATE_NONE_ROTATING) + u_int old_rate = softc->disk->d_rotation_rate; + + softc->disk->d_rotation_rate = + scsi_2btoul(bdc->medium_rotation_rate); + if (softc->disk->d_rotation_rate == + SVPD_BDC_RATE_NON_ROTATING) { softc->sort_io_queue = 0; + } + if (softc->disk->d_rotation_rate != old_rate) { + disk_attr_changed(softc->disk, + "GEOM::rotation_rate", M_NOWAIT); + } } else { int error; error = daerror(done_ccb, CAM_RETRY_SELTO, @@ -3427,6 +3436,8 @@ dadone(struct cam_periph *periph, union ptr = (uint16_t *)ata_params; if ((csio->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { + uint16_t old_rate; + for (i = 0; i < sizeof(*ata_params) / 2; i++) ptr[i] = le16toh(ptr[i]); if (ata_params->support_dsm & ATA_SUPPORT_DSM_TRIM && @@ -3442,8 +3453,18 @@ dadone(struct cam_periph *periph, union * Disable queue sorting for non-rotational media * by default. */ - if (ata_params->media_rotation_rate == 1) + old_rate = softc->disk->d_rotation_rate; + softc->disk->d_rotation_rate = + ata_params->media_rotation_rate; + if (softc->disk->d_rotation_rate == + ATA_RATE_NON_ROTATING) { softc->sort_io_queue = 0; + } + + if (softc->disk->d_rotation_rate != old_rate) { + disk_attr_changed(softc->disk, + "GEOM::rotation_rate", M_NOWAIT); + } } else { int error; error = daerror(done_ccb, CAM_RETRY_SELTO, Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h Sun Sep 7 20:27:48 2014 (r271237) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h Sun Sep 7 21:30:47 2014 (r271238) @@ -120,6 +120,9 @@ extern void vdev_queue_init(vdev_t *vd); extern void vdev_queue_fini(vdev_t *vd); extern zio_t *vdev_queue_io(zio_t *zio); extern void vdev_queue_io_done(zio_t *zio); +extern int vdev_queue_length(vdev_t *vd); +extern uint64_t vdev_queue_lastoffset(vdev_t *vd); +extern void vdev_queue_register_lastoffset(vdev_t *vd, zio_t *zio); extern void vdev_config_dirty(vdev_t *vd); extern void vdev_config_clean(vdev_t *vd); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h Sun Sep 7 20:27:48 2014 (r271237) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h Sun Sep 7 21:30:47 2014 (r271238) @@ -116,6 +116,7 @@ struct vdev_queue { uint64_t vq_last_offset; hrtime_t vq_io_complete_ts; /* time last i/o completed */ kmutex_t vq_lock; + uint64_t vq_lastoffset; }; /* @@ -227,7 +228,10 @@ struct vdev { spa_aux_vdev_t *vdev_aux; /* for l2cache vdevs */ zio_t *vdev_probe_zio; /* root of current probe */ vdev_aux_t vdev_label_aux; /* on-disk aux state */ - struct trim_map *vdev_trimmap; + struct trim_map *vdev_trimmap; /* map on outstanding trims */ + uint16_t vdev_rotation_rate; /* rotational rate of the media */ +#define VDEV_RATE_UNKNOWN 0 +#define VDEV_RATE_NON_ROTATING 1 /* * For DTrace to work in userland (libzpool) context, these fields must Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sun Sep 7 20:27:48 2014 (r271237) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sun Sep 7 21:30:47 2014 (r271238) @@ -42,9 +42,11 @@ * Virtual device vector for GEOM. */ +static g_attrchanged_t vdev_geom_attrchanged; struct g_class zfs_vdev_class = { .name = "ZFS::VDEV", .version = G_VERSION, + .attrchanged = vdev_geom_attrchanged, }; DECLARE_GEOM_CLASS(zfs_vdev_class, zfs_vdev); @@ -62,6 +64,34 @@ SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, bio_ &vdev_geom_bio_delete_disable, 0, "Disable BIO_DELETE"); static void +vdev_geom_set_rotation_rate(vdev_t *vd, struct g_consumer *cp) +{ + int error; + uint16_t rate; + + error = g_getattr("GEOM::rotation_rate", cp, &rate); + if (error == 0) + vd->vdev_rotation_rate = rate; + else + vd->vdev_rotation_rate = VDEV_RATE_UNKNOWN; +} + +static void +vdev_geom_attrchanged(struct g_consumer *cp, const char *attr) +{ + vdev_t *vd; + + vd = cp->private; + if (vd == NULL) + return; + + if (strcmp(attr, "GEOM::rotation_rate") == 0) { + vdev_geom_set_rotation_rate(vd, cp); + return; + } +} + +static void vdev_geom_orphan(struct g_consumer *cp) { vdev_t *vd; @@ -689,6 +719,11 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi vd->vdev_physpath = kmem_alloc(bufsize, KM_SLEEP); snprintf(vd->vdev_physpath, bufsize, "/dev/%s", pp->name); + /* + * Determine the device's rotation rate. + */ + vdev_geom_set_rotation_rate(vd, cp); + return (0); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Sun Sep 7 20:27:48 2014 (r271237) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Sun Sep 7 21:30:47 2014 (r271238) @@ -41,27 +41,97 @@ typedef struct mirror_child { vdev_t *mc_vd; uint64_t mc_offset; int mc_error; + int mc_load; uint8_t mc_tried; uint8_t mc_skipped; uint8_t mc_speculative; } mirror_child_t; typedef struct mirror_map { + int *mm_preferred; + int mm_preferred_cnt; int mm_children; - int mm_replacing; - int mm_preferred; - int mm_root; - mirror_child_t mm_child[1]; + boolean_t mm_replacing; + boolean_t mm_root; + mirror_child_t mm_child[]; } mirror_map_t; -int vdev_mirror_shift = 21; +static int vdev_mirror_shift = 21; + +SYSCTL_DECL(_vfs_zfs_vdev); +static SYSCTL_NODE(_vfs_zfs_vdev, OID_AUTO, mirror, CTLFLAG_RD, 0, + "ZFS VDEV Mirror"); + +/* + * The load configuration settings below are tuned by default for + * the case where all devices are of the same rotational type. + * + * If there is a mixture of rotating and non-rotating media, setting + * non_rotating_seek_inc to 0 may well provide better results as it + * will direct more reads to the non-rotating vdevs which are more + * likely to have a higher performance. + */ + +/* Rotating media load calculation configuration. */ +static int rotating_inc = 0; +TUNABLE_INT("vfs.zfs.vdev.mirror.rotating_inc", &rotating_inc); +SYSCTL_INT(_vfs_zfs_vdev_mirror, OID_AUTO, rotating_inc, CTLFLAG_RW, + &rotating_inc, 0, "Rotating media load increment for non-seeking I/O's"); + +static int rotating_seek_inc = 5; +TUNABLE_INT("vfs.zfs.vdev.mirror.rotating_seek_inc", &rotating_seek_inc); +SYSCTL_INT(_vfs_zfs_vdev_mirror, OID_AUTO, rotating_seek_inc, CTLFLAG_RW, + &rotating_seek_inc, 0, "Rotating media load increment for seeking I/O's"); + +static int rotating_seek_offset = 1 * 1024 * 1024; +TUNABLE_INT("vfs.zfs.vdev.mirror.rotating_seek_offset", &rotating_seek_offset); +SYSCTL_INT(_vfs_zfs_vdev_mirror, OID_AUTO, rotating_seek_offset, CTLFLAG_RW, + &rotating_seek_offset, 0, "Offset in bytes from the last I/O which " + "triggers a reduced rotating media seek increment"); + +/* Non-rotating media load calculation configuration. */ +static int non_rotating_inc = 0; +TUNABLE_INT("vfs.zfs.vdev.mirror.non_rotating_inc", &non_rotating_inc); +SYSCTL_INT(_vfs_zfs_vdev_mirror, OID_AUTO, non_rotating_inc, CTLFLAG_RW, + &non_rotating_inc, 0, + "Non-rotating media load increment for non-seeking I/O's"); + +static int non_rotating_seek_inc = 1; +TUNABLE_INT("vfs.zfs.vdev.mirror.non_rotating_seek_inc", + &non_rotating_seek_inc); +SYSCTL_INT(_vfs_zfs_vdev_mirror, OID_AUTO, non_rotating_seek_inc, CTLFLAG_RW, + &non_rotating_seek_inc, 0, + "Non-rotating media load increment for seeking I/O's"); + + +static inline size_t +vdev_mirror_map_size(int children) +{ + return (offsetof(mirror_map_t, mm_child[children]) + + sizeof(int) * children); +} + +static inline mirror_map_t * +vdev_mirror_map_alloc(int children, boolean_t replacing, boolean_t root) +{ + mirror_map_t *mm; + + mm = kmem_zalloc(vdev_mirror_map_size(children), KM_SLEEP); + mm->mm_children = children; + mm->mm_replacing = replacing; + mm->mm_root = root; + mm->mm_preferred = (int *)((uintptr_t)mm + + offsetof(mirror_map_t, mm_child[children])); + + return mm; +} static void vdev_mirror_map_free(zio_t *zio) { mirror_map_t *mm = zio->io_vsd; - kmem_free(mm, offsetof(mirror_map_t, mm_child[mm->mm_children])); + kmem_free(mm, vdev_mirror_map_size(mm->mm_children)); } static const zio_vsd_ops_t vdev_mirror_vsd_ops = { @@ -69,55 +139,80 @@ static const zio_vsd_ops_t vdev_mirror_v zio_vsd_default_cksum_report }; +static int +vdev_mirror_load(mirror_map_t *mm, vdev_t *vd, uint64_t zio_offset) +{ + uint64_t lastoffset; + int load; + + /* All DVAs have equal weight at the root. */ + if (mm->mm_root) + return (INT_MAX); + + /* + * We don't return INT_MAX if the device is resilvering i.e. + * vdev_resilver_txg != 0 as when tested performance was slightly + * worse overall when resilvering with compared to without. + */ + + /* Standard load based on pending queue length. */ + load = vdev_queue_length(vd); + lastoffset = vdev_queue_lastoffset(vd); + + if (vd->vdev_rotation_rate == VDEV_RATE_NON_ROTATING) { + /* Non-rotating media. */ + if (lastoffset == zio_offset) + return (load + non_rotating_inc); + + /* + * Apply a seek penalty even for non-rotating devices as + * sequential I/O'a can be aggregated into fewer operations + * on the device, thus avoiding unnecessary per-command + * overhead and boosting performance. + */ + return (load + non_rotating_seek_inc); + } + + /* Rotating media I/O's which directly follow the last I/O. */ + if (lastoffset == zio_offset) + return (load + rotating_inc); + + /* + * Apply half the seek increment to I/O's within seek offset + * of the last I/O queued to this vdev as they should incure less + * of a seek increment. + */ + if (ABS(lastoffset - zio_offset) < rotating_seek_offset) + return (load + (rotating_seek_inc / 2)); + + /* Apply the full seek increment to all other I/O's. */ + return (load + rotating_seek_inc); +} + + static mirror_map_t * -vdev_mirror_map_alloc(zio_t *zio) +vdev_mirror_map_init(zio_t *zio) { mirror_map_t *mm = NULL; mirror_child_t *mc; vdev_t *vd = zio->io_vd; - int c, d; + int c; if (vd == NULL) { dva_t *dva = zio->io_bp->blk_dva; spa_t *spa = zio->io_spa; - c = BP_GET_NDVAS(zio->io_bp); - - mm = kmem_zalloc(offsetof(mirror_map_t, mm_child[c]), KM_SLEEP); - mm->mm_children = c; - mm->mm_replacing = B_FALSE; - mm->mm_preferred = spa_get_random(c); - mm->mm_root = B_TRUE; - - /* - * Check the other, lower-index DVAs to see if they're on - * the same vdev as the child we picked. If they are, use - * them since they are likely to have been allocated from - * the primary metaslab in use at the time, and hence are - * more likely to have locality with single-copy data. - */ - for (c = mm->mm_preferred, d = c - 1; d >= 0; d--) { - if (DVA_GET_VDEV(&dva[d]) == DVA_GET_VDEV(&dva[c])) - mm->mm_preferred = d; - } - + mm = vdev_mirror_map_alloc(BP_GET_NDVAS(zio->io_bp), B_FALSE, + B_TRUE); for (c = 0; c < mm->mm_children; c++) { mc = &mm->mm_child[c]; - mc->mc_vd = vdev_lookup_top(spa, DVA_GET_VDEV(&dva[c])); mc->mc_offset = DVA_GET_OFFSET(&dva[c]); } } else { - c = vd->vdev_children; - - mm = kmem_zalloc(offsetof(mirror_map_t, mm_child[c]), KM_SLEEP); - mm->mm_children = c; - mm->mm_replacing = (vd->vdev_ops == &vdev_replacing_ops || - vd->vdev_ops == &vdev_spare_ops); - mm->mm_preferred = mm->mm_replacing ? 0 : - (zio->io_offset >> vdev_mirror_shift) % c; - mm->mm_root = B_FALSE; - + mm = vdev_mirror_map_alloc(vd->vdev_children, + (vd->vdev_ops == &vdev_replacing_ops || + vd->vdev_ops == &vdev_spare_ops), B_FALSE); for (c = 0; c < mm->mm_children; c++) { mc = &mm->mm_child[c]; mc->mc_vd = vd->vdev_child[c]; @@ -211,50 +306,124 @@ vdev_mirror_scrub_done(zio_t *zio) } /* - * Try to find a child whose DTL doesn't contain the block we want to read. + * Check the other, lower-index DVAs to see if they're on the same + * vdev as the child we picked. If they are, use them since they + * are likely to have been allocated from the primary metaslab in + * use at the time, and hence are more likely to have locality with + * single-copy data. + */ +static int +vdev_mirror_dva_select(zio_t *zio, int p) +{ + dva_t *dva = zio->io_bp->blk_dva; + mirror_map_t *mm = zio->io_vsd; + int preferred; + int c; + + preferred = mm->mm_preferred[p]; + for (p-- ; p >= 0; p--) { + c = mm->mm_preferred[p]; + if (DVA_GET_VDEV(&dva[c]) == DVA_GET_VDEV(&dva[preferred])) + preferred = c; + } + return (preferred); +} + +static int +vdev_mirror_preferred_child_randomize(zio_t *zio) +{ + mirror_map_t *mm = zio->io_vsd; + int p; + + if (mm->mm_root) { + p = spa_get_random(mm->mm_preferred_cnt); + return (vdev_mirror_dva_select(zio, p)); + } + + /* + * To ensure we don't always favour the first matching vdev, + * which could lead to wear leveling issues on SSD's, we + * use the I/O offset as a pseudo random seed into the vdevs + * which have the lowest load. + */ + p = (zio->io_offset >> vdev_mirror_shift) % mm->mm_preferred_cnt; + return (mm->mm_preferred[p]); +} + +/* + * Try to find a vdev whose DTL doesn't contain the block we want to read + * prefering vdevs based on determined load. + * * If we can't, try the read on any vdev we haven't already tried. */ static int vdev_mirror_child_select(zio_t *zio) { mirror_map_t *mm = zio->io_vsd; - mirror_child_t *mc; uint64_t txg = zio->io_txg; - int i, c; + int c, lowest_load; ASSERT(zio->io_bp == NULL || BP_PHYSICAL_BIRTH(zio->io_bp) == txg); - /* - * Try to find a child whose DTL doesn't contain the block to read. - * If a child is known to be completely inaccessible (indicated by - * vdev_readable() returning B_FALSE), don't even try. - */ - for (i = 0, c = mm->mm_preferred; i < mm->mm_children; i++, c++) { - if (c >= mm->mm_children) - c = 0; + lowest_load = INT_MAX; + mm->mm_preferred_cnt = 0; + for (c = 0; c < mm->mm_children; c++) { + mirror_child_t *mc; + mc = &mm->mm_child[c]; if (mc->mc_tried || mc->mc_skipped) continue; + if (!vdev_readable(mc->mc_vd)) { mc->mc_error = SET_ERROR(ENXIO); mc->mc_tried = 1; /* don't even try */ mc->mc_skipped = 1; continue; } - if (!vdev_dtl_contains(mc->mc_vd, DTL_MISSING, txg, 1)) - return (c); - mc->mc_error = SET_ERROR(ESTALE); - mc->mc_skipped = 1; - mc->mc_speculative = 1; + + if (vdev_dtl_contains(mc->mc_vd, DTL_MISSING, txg, 1)) { + mc->mc_error = SET_ERROR(ESTALE); + mc->mc_skipped = 1; + mc->mc_speculative = 1; + continue; + } + + mc->mc_load = vdev_mirror_load(mm, mc->mc_vd, mc->mc_offset); + if (mc->mc_load > lowest_load) + continue; + + if (mc->mc_load < lowest_load) { + lowest_load = mc->mc_load; + mm->mm_preferred_cnt = 0; + } + mm->mm_preferred[mm->mm_preferred_cnt] = c; + mm->mm_preferred_cnt++; + } + + if (mm->mm_preferred_cnt == 1) { + vdev_queue_register_lastoffset( + mm->mm_child[mm->mm_preferred[0]].mc_vd, zio); + return (mm->mm_preferred[0]); + } + + if (mm->mm_preferred_cnt > 1) { + int c = vdev_mirror_preferred_child_randomize(zio); + + vdev_queue_register_lastoffset(mm->mm_child[c].mc_vd, zio); + return (c); } /* * Every device is either missing or has this txg in its DTL. * Look for any child we haven't already tried before giving up. */ - for (c = 0; c < mm->mm_children; c++) - if (!mm->mm_child[c].mc_tried) + for (c = 0; c < mm->mm_children; c++) { + if (!mm->mm_child[c].mc_tried) { + vdev_queue_register_lastoffset(mm->mm_child[c].mc_vd, + zio); return (c); + } + } /* * Every child failed. There's no place left to look. @@ -269,7 +438,7 @@ vdev_mirror_io_start(zio_t *zio) mirror_child_t *mc; int c, children; - mm = vdev_mirror_map_alloc(zio); + mm = vdev_mirror_map_init(zio); if (zio->io_type == ZIO_TYPE_READ) { if ((zio->io_flags & ZIO_FLAG_SCRUB) && !mm->mm_replacing) { Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Sun Sep 7 20:27:48 2014 (r271237) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Sun Sep 7 21:30:47 2014 (r271238) @@ -289,6 +289,8 @@ vdev_queue_init(vdev_t *vd) vdev_queue_offset_compare, sizeof (zio_t), offsetof(struct zio, io_queue_node)); } + + vq->vq_lastoffset = 0; } void @@ -815,3 +817,26 @@ vdev_queue_io_done(zio_t *zio) mutex_exit(&vq->vq_lock); } + +/* + * As these three methods are only used for load calculations we're not concerned + * if we get an incorrect value on 32bit platforms due to lack of vq_lock mutex + * use here, instead we prefer to keep it lock free for performance. + */ +int +vdev_queue_length(vdev_t *vd) +{ + return (avl_numnodes(&vd->vdev_queue.vq_active_tree)); +} + +uint64_t +vdev_queue_lastoffset(vdev_t *vd) +{ + return (vd->vdev_queue.vq_lastoffset); +} + +void +vdev_queue_register_lastoffset(vdev_t *vd, zio_t *zio) +{ + vd->vdev_queue.vq_lastoffset = zio->io_offset + zio->io_size; +} Modified: stable/10/sys/geom/geom.h ============================================================================== --- stable/10/sys/geom/geom.h Sun Sep 7 20:27:48 2014 (r271237) +++ stable/10/sys/geom/geom.h Sun Sep 7 21:30:47 2014 (r271238) @@ -274,6 +274,7 @@ int g_handleattr(struct bio *bp, const c int len); int g_handleattr_int(struct bio *bp, const char *attribute, int val); int g_handleattr_off_t(struct bio *bp, const char *attribute, off_t val); +int g_handleattr_uint16_t(struct bio *bp, const char *attribute, uint16_t val); int g_handleattr_str(struct bio *bp, const char *attribute, const char *str); struct g_consumer * g_new_consumer(struct g_geom *gp); struct g_geom * g_new_geomf(struct g_class *mp, const char *fmt, ...) Modified: stable/10/sys/geom/geom_disk.c ============================================================================== --- stable/10/sys/geom/geom_disk.c Sun Sep 7 20:27:48 2014 (r271237) +++ stable/10/sys/geom/geom_disk.c Sun Sep 7 21:30:47 2014 (r271238) @@ -412,23 +412,32 @@ g_disk_start(struct bio *bp) break; else if (g_handleattr_str(bp, "GEOM::ident", dp->d_ident)) break; - else if (g_handleattr(bp, "GEOM::hba_vendor", - &dp->d_hba_vendor, 2)) + else if (g_handleattr_uint16_t(bp, "GEOM::hba_vendor", + dp->d_hba_vendor)) break; - else if (g_handleattr(bp, "GEOM::hba_device", - &dp->d_hba_device, 2)) + else if (g_handleattr_uint16_t(bp, "GEOM::hba_device", + dp->d_hba_device)) break; - else if (g_handleattr(bp, "GEOM::hba_subvendor", - &dp->d_hba_subvendor, 2)) + else if (g_handleattr_uint16_t(bp, "GEOM::hba_subvendor", + dp->d_hba_subvendor)) break; - else if (g_handleattr(bp, "GEOM::hba_subdevice", - &dp->d_hba_subdevice, 2)) + else if (g_handleattr_uint16_t(bp, "GEOM::hba_subdevice", + dp->d_hba_subdevice)) break; else if (!strcmp(bp->bio_attribute, "GEOM::kerneldump")) g_disk_kerneldump(bp, dp); else if (!strcmp(bp->bio_attribute, "GEOM::setstate")) g_disk_setstate(bp, sc); - else + else if (!strcmp(bp->bio_attribute, "GEOM::rotation_rate")) { + uint64_t v; + + if ((dp->d_flags & DISKFLAG_LACKS_ROTRATE) == 0) + v = dp->d_rotation_rate; + else + v = 0; /* rate unknown */ + g_handleattr_uint16_t(bp, "GEOM::rotation_rate", v); + break; + } else error = ENOIOCTL; break; case BIO_FLUSH: @@ -694,6 +703,8 @@ disk_create(struct disk *dp, int version dp->d_name, dp->d_unit); return; } + if (version < DISK_VERSION_04) + dp->d_flags |= DISKFLAG_LACKS_ROTRATE; KASSERT(dp->d_strategy != NULL, ("disk_create need d_strategy")); KASSERT(dp->d_name != NULL, ("disk_create need d_name")); KASSERT(*dp->d_name != 0, ("disk_create need d_name")); Modified: stable/10/sys/geom/geom_disk.h ============================================================================== --- stable/10/sys/geom/geom_disk.h Sun Sep 7 20:27:48 2014 (r271237) +++ stable/10/sys/geom/geom_disk.h Sun Sep 7 21:30:47 2014 (r271238) @@ -100,6 +100,9 @@ struct disk { /* Fields private to the driver */ void *d_drv1; + + /* New field - don't use if DISKFLAG_LACKS_ROTRATE is set */ + uint16_t d_rotation_rate; }; #define DISKFLAG_NEEDSGIANT 0x1 @@ -108,6 +111,7 @@ struct disk { #define DISKFLAG_CANFLUSHCACHE 0x8 #define DISKFLAG_UNMAPPED_BIO 0x10 #define DISKFLAG_DIRECT_COMPLETION 0x20 +#define DISKFLAG_LACKS_ROTRATE 0x40 struct disk *disk_alloc(void); void disk_create(struct disk *disk, int version); @@ -122,7 +126,8 @@ int disk_resize(struct disk *dp, int fla #define DISK_VERSION_01 0x5856105a #define DISK_VERSION_02 0x5856105b #define DISK_VERSION_03 0x5856105c -#define DISK_VERSION DISK_VERSION_03 +#define DISK_VERSION_04 0x5856105d +#define DISK_VERSION DISK_VERSION_04 #endif /* _KERNEL */ #endif /* _GEOM_GEOM_DISK_H_ */ Modified: stable/10/sys/geom/geom_subr.c ============================================================================== --- stable/10/sys/geom/geom_subr.c Sun Sep 7 20:27:48 2014 (r271237) +++ stable/10/sys/geom/geom_subr.c Sun Sep 7 21:30:47 2014 (r271238) @@ -952,6 +952,13 @@ g_handleattr_int(struct bio *bp, const c } int +g_handleattr_uint16_t(struct bio *bp, const char *attribute, uint16_t val) +{ + + return (g_handleattr(bp, attribute, &val, sizeof val)); +} + +int g_handleattr_off_t(struct bio *bp, const char *attribute, off_t val) { Modified: stable/10/sys/sys/ata.h ============================================================================== --- stable/10/sys/sys/ata.h Sun Sep 7 20:27:48 2014 (r271237) +++ stable/10/sys/sys/ata.h Sun Sep 7 21:30:47 2014 (r271238) @@ -262,6 +262,8 @@ struct ata_params { /*215*/ u_int16_t nv_cache_size_1; u_int16_t nv_cache_size_2; /*217*/ u_int16_t media_rotation_rate; +#define ATA_RATE_NOT_REPORTED 0x0000 +#define ATA_RATE_NON_ROTATING 0x0001 u_int16_t reserved218; /*219*/ u_int16_t nv_cache_opt; /*220*/ u_int16_t wrv_mode; From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 21:32:32 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B37FB9A6; Sun, 7 Sep 2014 21:32:32 +0000 (UTC) Received: from smtp1.multiplay.co.uk (smtp1.multiplay.co.uk [85.236.96.35]) by mx1.freebsd.org (Postfix) with ESMTP id 752C61F3C; Sun, 7 Sep 2014 21:32:32 +0000 (UTC) Received: by smtp1.multiplay.co.uk (Postfix, from userid 65534) id BC6E220E7088A; Sun, 7 Sep 2014 21:32:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=0.9 required=8.0 tests=AWL,BAYES_00,DOS_OE_TO_MX, FSL_HELO_NON_FQDN_1,RDNS_DYNAMIC autolearn=no version=3.3.1 Received: from r2d2 (82-69-141-170.dsl.in-addr.zen.co.uk [82.69.141.170]) by smtp1.multiplay.co.uk (Postfix) with ESMTP id 1392B20E70885; Sun, 7 Sep 2014 21:32:29 +0000 (UTC) Message-ID: From: "Steven Hartland" To: "Andriy Gapon" , "Slawa Olhovchenkov" References: <201401161324.s0GDOADB008512@svn.freebsd.org> <20140907155641.GB72244@zxy.spb.ru> <540CC991.3070604@FreeBSD.org> <00D872A5601148E8AB294954A163BEBD@multiplay.co.uk> Subject: Re: svn commit: r260713 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Date: Sun, 7 Sep 2014 22:32:33 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 21:32:32 -0000 ----- Original Message ----- From: "Steven Hartland" >> on 07/09/2014 18:56 Slawa Olhovchenkov said the following: >>> On Thu, Jan 16, 2014 at 01:24:10PM +0000, Andriy Gapon wrote: >>> >>>> Author: avg >>>> Date: Thu Jan 16 13:24:10 2014 >>>> New Revision: 260713 >>>> URL: http://svnweb.freebsd.org/changeset/base/260713 >>>> >>>> Log: >>>> fix a bug in ZFS mirror code for handling multiple DVAa >>>> >>>> The bug was introduced in r256956 "Improve ZFS N-way mirror read >>>> performance". >>>> The code in vdev_mirror_dva_select erroneously considers already >>>> tried DVAs for the next attempt. Thus, it is possible that a failing DVA >>>> would be retried forever. >>>> As a secondary effect, if the attempts fail with checksum error, then >>>> checksum error reports are accumulated until the original request >>>> ultimately fails or succeeds. But because retrying is going on indefinitely >>>> the cheksum reports accumulation will effectively be a memory leak. >>>> >>>> Reviewed by: gibbs >>>> MFC after: 13 days >>>> Sponsored by: HybridCluster >>> >>> No NFC yet >>> >> >> Is r256956 MFC-ed yet? > > Nope I missed it, have applied for both to be MFC'ed. Approval was granted, both have now been MFC'ed. Thanks Slawa for heads up that I missed that one. Regards Steve From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 21:40:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7353BB3A; Sun, 7 Sep 2014 21:40:15 +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 5E17C1F76; Sun, 7 Sep 2014 21:40:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s87LeFZH022507; Sun, 7 Sep 2014 21:40:15 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s87LeFUK022506; Sun, 7 Sep 2014 21:40:15 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201409072140.s87LeFUK022506@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sun, 7 Sep 2014 21:40:15 +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: r271239 - stable/10/sys/ia64/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 21:40:15 -0000 Author: marcel Date: Sun Sep 7 21:40:14 2014 New Revision: 271239 URL: http://svnweb.freebsd.org/changeset/base/271239 Log: Fix previous commit: unbreak build of libkvm by including sys/systm.h only when _KERNEL is defined. Approved by: re@ (implicit) Modified: stable/10/sys/ia64/include/pcpu.h Modified: stable/10/sys/ia64/include/pcpu.h ============================================================================== --- stable/10/sys/ia64/include/pcpu.h Sun Sep 7 21:30:47 2014 (r271238) +++ stable/10/sys/ia64/include/pcpu.h Sun Sep 7 21:40:14 2014 (r271239) @@ -31,7 +31,6 @@ #define _MACHINE_PCPU_H_ #include -#include #include struct pcpu_stats { @@ -72,6 +71,8 @@ struct pcpu_md { #ifdef _KERNEL +#include + struct pcpu; register struct pcpu * volatile pcpup __asm__("r13"); From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 21:46:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6734CD2; Sun, 7 Sep 2014 21:46:54 +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 91EA11056; Sun, 7 Sep 2014 21:46:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s87LksZV026507; Sun, 7 Sep 2014 21:46:54 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s87LksmU026506; Sun, 7 Sep 2014 21:46:54 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201409072146.s87LksmU026506@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 7 Sep 2014 21:46:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271240 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 21:46:54 -0000 Author: andrew Date: Sun Sep 7 21:46:54 2014 New Revision: 271240 URL: http://svnweb.freebsd.org/changeset/base/271240 Log: When entering the kernel with the MMU off assume we are running from a va == pa map. I'm not sure the code would work if we are not running from the identity map as the ARM core may attempt to read the next instruction from an invalid memory location. Modified: head/sys/arm/arm/locore.S Modified: head/sys/arm/arm/locore.S ============================================================================== --- head/sys/arm/arm/locore.S Sun Sep 7 21:40:14 2014 (r271239) +++ head/sys/arm/arm/locore.S Sun Sep 7 21:46:54 2014 (r271240) @@ -127,10 +127,6 @@ Lram_offset: .word from_ram-_C_LABEL(_st from_ram: nop #endif - adr r7, Lunmapped - bic r7, r7, #0xf0000000 - orr r7, r7, #PHYSADDR - disable_mmu: /* Disable MMU for a while */ @@ -144,7 +140,8 @@ disable_mmu: nop nop nop - mov pc, r7 + CPWAIT(r0) + Lunmapped: /* * Build page table from scratch. From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 22:56:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 359E78D6; Sun, 7 Sep 2014 22:56:58 +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 216B6185F; Sun, 7 Sep 2014 22:56:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s87MuvEM059454; Sun, 7 Sep 2014 22:56:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s87MuvIl059453; Sun, 7 Sep 2014 22:56:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409072256.s87MuvIl059453@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 7 Sep 2014 22:56:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271241 - head/lib/libnv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 22:56:58 -0000 Author: ngie Date: Sun Sep 7 22:56:57 2014 New Revision: 271241 URL: http://svnweb.freebsd.org/changeset/base/271241 Log: Include src.opts.mk after SHLIBDIR has been defined so libnv is installed to /lib , not /usr/lib MFC after: 3 days Approved by: rpaulo (mentor) Submitted by: antoine Pointyhat to: me Phabric: D739 Modified: head/lib/libnv/Makefile Modified: head/lib/libnv/Makefile ============================================================================== --- head/lib/libnv/Makefile Sun Sep 7 21:46:54 2014 (r271240) +++ head/lib/libnv/Makefile Sun Sep 7 22:56:57 2014 (r271241) @@ -1,9 +1,10 @@ # $FreeBSD$ +SHLIBDIR?= /lib + .include LIB= nv -SHLIBDIR?= /lib SHLIB_MAJOR= 0 SRCS= dnvlist.c From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 22:58:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4ACC2A21; Sun, 7 Sep 2014 22:58:27 +0000 (UTC) Received: from mail-pa0-x235.google.com (mail-pa0-x235.google.com [IPv6:2607:f8b0:400e:c03::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 03D78186B; Sun, 7 Sep 2014 22:58:26 +0000 (UTC) Received: by mail-pa0-f53.google.com with SMTP id rd3so1188554pab.12 for ; Sun, 07 Sep 2014 15:58:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=ViUDwSMSD44+bZHSHHpnZc+BrqHApwkbe0f6TTSwonM=; b=zkb/yzU52u1sZfPrDFCLH3twdIuVzbJgVNzrKsMSPodeKrDv2z4atpT4mL/hQAY2WG J7L7x6X2LiTCNKXZuVz0y0XvB5xKrcRiGVZLPx1V60YjR8O5UWxKpS3jlCodnXodGYtP DFr4LkcRNLyEzA7h5uYTU3KhoSS1YjYwG+t/kWx3f8UFNATnUWMyDLi9VLZu8+Yoezn0 cgHOrU16AIWD0bUi7572uQ1TJCMKbfAn7UDvqjh65Fmbal8jpo6CqqkmZV63gvmnLJsX fajvXnmcusE9C9KTdRZxGhkVSMPmRuU09L1rcr1OgE+jZrzIwsGFQ5vGFFOC35tFd7/w iwMw== X-Received: by 10.66.123.75 with SMTP id ly11mr41374701pab.82.1410130706544; Sun, 07 Sep 2014 15:58:26 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:644f:a9af:8645:807a? ([2601:8:ab80:7d6:644f:a9af:8645:807a]) by mx.google.com with ESMTPSA id gf5sm7155680pbc.89.2014.09.07.15.58.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 07 Sep 2014 15:58:26 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_FFFB60F9-63C5-4521-9792-2351F966089E"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r269603 - in head: etc/mtree lib/libnv lib/libnv/tests tools/regression/lib/libnv From: yaneurabeya@gmail.com In-Reply-To: Date: Sun, 7 Sep 2014 15:58:24 -0700 Message-Id: References: <53e12558.5d33.563f584f@svn.freebsd.org> To: Antoine Brodin X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Garrett Cooper X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 22:58:27 -0000 --Apple-Mail=_FFFB60F9-63C5-4521-9792-2351F966089E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Sep 7, 2014, at 13:53, yaneurabeya@gmail.com wrote: > You=92re right. SHLIBDIR is being overridden from bsd.own.mk. This = patch will fix it: >=20 > $ git diff=20 > diff --git a/lib/libnv/Makefile b/lib/libnv/Makefile > index cad1ea4..4a7c76a 100644 > --- a/lib/libnv/Makefile > +++ b/lib/libnv/Makefile > @@ -1,9 +1,10 @@ > # $FreeBSD$ >=20 > +SHLIBDIR?=3D /lib > + > .include >=20 > LIB=3D nv > -SHLIBDIR?=3D /lib > SHLIB_MAJOR=3D 0 >=20 > SRCS=3D dnvlist.c > $ make -VSHLIBDIR > /lib >=20 > I=92ll put it out for review soon. Fixed in r271241 =97 thanks! -Garrett --Apple-Mail=_FFFB60F9-63C5-4521-9792-2351F966089E Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUDOMQAAoJEMZr5QU6S73eQxcH/2F4NB9Be1i7mM9NEEuSOJEy XY8RuagrKA9U0ZmRDy3l1PDaUW3OqYxD4E+W/3wSd0Pr+HT9KH7cpPn++gVlZUjy CngFq+cwoiSnU0vQ1aPeCyY6MTJtOQH1b8cMBsLt8nsm2L8GV0kMIzoMqxXI37uh ad6Cv1WuPajKkSoB+TdgPeAep4nE9UEDd7XFC0F3myTIiSyaRpQ74D+jikldDYRk YkflzTHBzqlv7w8hSKlEQfTDQ5VfIKxSvP/tLPbAcirpzmhBWOfW/hJj0TWVB52c Yub+CYXz7G9CWCb6qLUikMGLkZJ5XeTbCftwwktJI3RdBVFqXF5XkxIFCQFsamY= =E4rd -----END PGP SIGNATURE----- --Apple-Mail=_FFFB60F9-63C5-4521-9792-2351F966089E-- From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 00:19:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBE288FB; Mon, 8 Sep 2014 00:19:04 +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 ABF8B1F10; Mon, 8 Sep 2014 00:19:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s880J4v6002176; Mon, 8 Sep 2014 00:19:04 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s880J4c8002174; Mon, 8 Sep 2014 00:19:04 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201409080019.s880J4c8002174@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Mon, 8 Sep 2014 00:19:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271243 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 00:19:05 -0000 Author: alc Date: Mon Sep 8 00:19:03 2014 New Revision: 271243 URL: http://svnweb.freebsd.org/changeset/base/271243 Log: Make two functions static and eliminate an unused #define. Modified: head/sys/vm/vm_map.c head/sys/vm/vm_map.h Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Mon Sep 8 00:16:34 2014 (r271242) +++ head/sys/vm/vm_map.c Mon Sep 8 00:19:03 2014 (r271243) @@ -133,6 +133,9 @@ static void _vm_map_init(vm_map_t map, p static void vm_map_entry_deallocate(vm_map_entry_t entry, boolean_t system_map); static void vm_map_entry_dispose(vm_map_t map, vm_map_entry_t entry); static void vm_map_entry_unwire(vm_map_t map, vm_map_entry_t entry); +static void vm_map_pmap_enter(vm_map_t map, vm_offset_t addr, vm_prot_t prot, + vm_object_t object, vm_pindex_t pindex, vm_size_t size, int flags); +static void vm_map_simplify_entry(vm_map_t map, vm_map_entry_t entry); #ifdef INVARIANTS static void vm_map_zdtor(void *mem, int size, void *arg); static void vmspace_zdtor(void *mem, int size, void *arg); @@ -1504,7 +1507,7 @@ again: * possibly extended). When merging, this routine may delete one or * both neighbors. */ -void +static void vm_map_simplify_entry(vm_map_t map, vm_map_entry_t entry) { vm_map_entry_t next, prev; @@ -1809,7 +1812,7 @@ vm_map_submap( * being created speculatively, cached pages are not reactivated and * mapped. */ -void +static void vm_map_pmap_enter(vm_map_t map, vm_offset_t addr, vm_prot_t prot, vm_object_t object, vm_pindex_t pindex, vm_size_t size, int flags) { Modified: head/sys/vm/vm_map.h ============================================================================== --- head/sys/vm/vm_map.h Mon Sep 8 00:16:34 2014 (r271242) +++ head/sys/vm/vm_map.h Mon Sep 8 00:19:03 2014 (r271243) @@ -302,9 +302,8 @@ long vmspace_resident_count(struct vmspa #endif /* _KERNEL */ -/* XXX: number of kernel maps and entries to statically allocate */ +/* XXX: number of kernel maps to statically allocate */ #define MAX_KMAP 10 -#define MAX_KMAPENT 128 /* * Copy-on-write flags for vm_map operations @@ -380,15 +379,12 @@ int vm_map_lookup_locked(vm_map_t *, vm_ vm_pindex_t *, vm_prot_t *, boolean_t *); void vm_map_lookup_done (vm_map_t, vm_map_entry_t); boolean_t vm_map_lookup_entry (vm_map_t, vm_offset_t, vm_map_entry_t *); -void vm_map_pmap_enter(vm_map_t map, vm_offset_t addr, vm_prot_t prot, - vm_object_t object, vm_pindex_t pindex, vm_size_t size, int flags); int vm_map_protect (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t, boolean_t); int vm_map_remove (vm_map_t, vm_offset_t, vm_offset_t); void vm_map_startup (void); int vm_map_submap (vm_map_t, vm_offset_t, vm_offset_t, vm_map_t); int vm_map_sync(vm_map_t, vm_offset_t, vm_offset_t, boolean_t, boolean_t); int vm_map_madvise (vm_map_t, vm_offset_t, vm_offset_t, int); -void vm_map_simplify_entry (vm_map_t, vm_map_entry_t); int vm_map_stack (vm_map_t, vm_offset_t, vm_size_t, vm_prot_t, vm_prot_t, int); int vm_map_growstack (struct proc *p, vm_offset_t addr); int vm_map_unwire(vm_map_t map, vm_offset_t start, vm_offset_t end, From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 02:15:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53DEF620; Mon, 8 Sep 2014 02:15:02 +0000 (UTC) Received: from smtp2.wemm.org (smtp2.wemm.org [IPv6:2001:470:67:39d::78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 33C011AA0; Mon, 8 Sep 2014 02:15:02 +0000 (UTC) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id EA7631CA; Sun, 7 Sep 2014 19:15:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1410142501; bh=WXMOhq+NYqewHeKZFG8WzyzcEMSaq/DMmTdlk5IRWdg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=UPmwqhpYcDXaZSuc8UZCh4pF2d8ruixmzYJC9plfsxfE/nDsFemhVqHSIgj2E95AN qX9jDiYRsdUfP010Gpx3fXl2NNWD0ZKp7IGF2xo71cX87H93Iy5RwPwB17vaYKi86Q wSsmiSP5fswcZcXeNM7Y7j3ae+VCDOUK5lSuH0Xw= From: Peter Wemm To: Alan Cox Subject: Re: svn commit: r271243 - head/sys/vm Date: Sun, 07 Sep 2014 19:14:55 -0700 Message-ID: <5093630.OkGduFpJtx@overcee.wemm.org> User-Agent: KMail/4.12.5 (FreeBSD/11.0-CURRENT; KDE/4.12.5; amd64; ; ) In-Reply-To: <201409080019.s880J4c8002174@svn.freebsd.org> References: <201409080019.s880J4c8002174@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart78344113.o1dqan9hZU"; micalg="pgp-sha1"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 02:15:02 -0000 --nextPart78344113.o1dqan9hZU Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" On Monday, September 08, 2014 12:19:04 AM Alan Cox wrote: > Log: > Make two functions static and eliminate an unused #define. Unfortunately, the code (and compiler) disagrees.. > @@ -1504,7 +1507,7 @@ again: > *=09possibly extended). When merging, this routine may delete one = or > *=09both neighbors. > */ > -void > +static void > vm_map_simplify_entry(vm_map_t map, vm_map_entry_t entry) > { > =09vm_map_entry_t next, prev; sys/security/mac/mac_process.c:366:4: error: implicit declaration of fu= nction=20 'vm_map_simplify_entry' is invalid in C99 [-Werror,-Wimplicit-function-= declaration] vm_map_simplify_entry(map, vme); The code in question: static void mac_proc_vm_revoke_recurse(struct thread *td, struct ucred *cred, struct vm_map *map) { vm_map_entry_t vme; ... vm_map_simplify_entry(map, vme); ^^^^^^^^^^^^^^^^^^^^^^ } } vm_map_unlock(map); } =2D-=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI= 6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 --nextPart78344113.o1dqan9hZU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABAgAGBQJUDREkAAoJEDXWlwnsgJ4EjoMH+wbDu7i0CVihaUINZxFVDxH3 H+lV2+w+gGThAgpCVnZJCBOleCOzm4ffS13tXXd55lqqXpln0/UjXVi67coZoNql eELUMhIUD74VDaEVbMbj1uWzRPWYXhw2jEfvFPA01SN0UVN/gBiS5n+vTXcizLJq Z2UL74gLFdlk6UoOEKkpWya1cnKoS+hvMe5epMntyt0oQ4GHurEEL6a8zyYbtV39 VhWN0NrXe1t/wfpVHVgbp7uxnxd9rtHk4jLtCK+gkMwsdf+p9VklvQ5fsuw3orKm zd8QE4fp1w3PTWgkzmPtVswXKgRQrj9ybbwj7ytxSVE8x1XJsppYy+7f9GPpino= =eD0W -----END PGP SIGNATURE----- --nextPart78344113.o1dqan9hZU-- From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 02:18:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 939717BE; Mon, 8 Sep 2014 02:18:22 +0000 (UTC) Received: from pp1.rice.edu (proofpoint1.mail.rice.edu [128.42.201.100]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 545221ACE; Mon, 8 Sep 2014 02:18:21 +0000 (UTC) Received: from pps.filterd (pp1.rice.edu [127.0.0.1]) by pp1.rice.edu (8.14.5/8.14.5) with SMTP id s882HL0q001698; Sun, 7 Sep 2014 21:18:14 -0500 Received: from mh11.mail.rice.edu (mh11.mail.rice.edu [128.42.199.30]) by pp1.rice.edu with ESMTP id 1p8w07g3ht-1; Sun, 07 Sep 2014 21:18:14 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh11.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh11.mail.rice.edu (Postfix) with ESMTPSA id ADA004C00A5; Sun, 7 Sep 2014 21:18:13 -0500 (CDT) Message-ID: <540D11E2.9020804@rice.edu> Date: Sun, 07 Sep 2014 21:18:10 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Peter Wemm , Alan Cox Subject: Re: svn commit: r271243 - head/sys/vm References: <201409080019.s880J4c8002174@svn.freebsd.org> <5093630.OkGduFpJtx@overcee.wemm.org> In-Reply-To: <5093630.OkGduFpJtx@overcee.wemm.org> X-Enigmail-Version: 1.6 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=1.99840144432528e-15 kscore.compositescore=9.42127164060835e-08 circleOfTrustscore=0 compositescore=0.601496849000349 urlsuspect_oldscore=0.00149684900034924 suspectscore=3 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=0 rbsscore=0.601496849000349 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1409080026 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 02:18:22 -0000 On 09/07/2014 21:14, Peter Wemm wrote: > On Monday, September 08, 2014 12:19:04 AM Alan Cox wrote: > >> Log: >> Make two functions static and eliminate an unused #define. > > Unfortunately, the code (and compiler) disagrees.. > >> @@ -1504,7 +1507,7 @@ again: >> * possibly extended). When merging, this routine may delete one or >> * both neighbors. >> */ >> -void >> +static void >> vm_map_simplify_entry(vm_map_t map, vm_map_entry_t entry) >> { >> vm_map_entry_t next, prev; > > > sys/security/mac/mac_process.c:366:4: error: implicit declaration of function > 'vm_map_simplify_entry' is invalid in C99 [-Werror,-Wimplicit-function- > declaration] > vm_map_simplify_entry(map, vme); > > The code in question: > > static void > mac_proc_vm_revoke_recurse(struct thread *td, struct ucred *cred, > struct vm_map *map) > { > vm_map_entry_t vme; > ... > vm_map_simplify_entry(map, vme); > ^^^^^^^^^^^^^^^^^^^^^^ > } > } > vm_map_unlock(map); > } > > Ya, I just saw that, and was rather surprised. From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 02:25:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 242729B0; Mon, 8 Sep 2014 02:25:03 +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 EB1C51B9C; Mon, 8 Sep 2014 02:25:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s882P27v062745; Mon, 8 Sep 2014 02:25:02 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s882P28u062741; Mon, 8 Sep 2014 02:25:02 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201409080225.s882P28u062741@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Mon, 8 Sep 2014 02:25:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271244 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 02:25:03 -0000 Author: alc Date: Mon Sep 8 02:25:01 2014 New Revision: 271244 URL: http://svnweb.freebsd.org/changeset/base/271244 Log: Oops. vm_map_simplify_entry() is used by mac_proc_vm_revoke_recurse(), so it can't be static. Modified: head/sys/vm/vm_map.c head/sys/vm/vm_map.h Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Mon Sep 8 00:19:03 2014 (r271243) +++ head/sys/vm/vm_map.c Mon Sep 8 02:25:01 2014 (r271244) @@ -135,7 +135,6 @@ static void vm_map_entry_dispose(vm_map_ static void vm_map_entry_unwire(vm_map_t map, vm_map_entry_t entry); static void vm_map_pmap_enter(vm_map_t map, vm_offset_t addr, vm_prot_t prot, vm_object_t object, vm_pindex_t pindex, vm_size_t size, int flags); -static void vm_map_simplify_entry(vm_map_t map, vm_map_entry_t entry); #ifdef INVARIANTS static void vm_map_zdtor(void *mem, int size, void *arg); static void vmspace_zdtor(void *mem, int size, void *arg); @@ -1507,7 +1506,7 @@ again: * possibly extended). When merging, this routine may delete one or * both neighbors. */ -static void +void vm_map_simplify_entry(vm_map_t map, vm_map_entry_t entry) { vm_map_entry_t next, prev; Modified: head/sys/vm/vm_map.h ============================================================================== --- head/sys/vm/vm_map.h Mon Sep 8 00:19:03 2014 (r271243) +++ head/sys/vm/vm_map.h Mon Sep 8 02:25:01 2014 (r271244) @@ -381,6 +381,7 @@ void vm_map_lookup_done (vm_map_t, vm_ma boolean_t vm_map_lookup_entry (vm_map_t, vm_offset_t, vm_map_entry_t *); int vm_map_protect (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t, boolean_t); int vm_map_remove (vm_map_t, vm_offset_t, vm_offset_t); +void vm_map_simplify_entry(vm_map_t map, vm_map_entry_t entry); void vm_map_startup (void); int vm_map_submap (vm_map_t, vm_offset_t, vm_offset_t, vm_map_t); int vm_map_sync(vm_map_t, vm_offset_t, vm_offset_t, boolean_t, boolean_t); From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 02:37:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1758D2C; Mon, 8 Sep 2014 02:37: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 8DAA01C88; Mon, 8 Sep 2014 02:37: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 s882bjAX067636; Mon, 8 Sep 2014 02:37:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s882bjr9067635; Mon, 8 Sep 2014 02:37:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409080237.s882bjr9067635@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 8 Sep 2014 02:37:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271245 - head/sys/modules/if_gif X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 02:37:45 -0000 Author: gjb Date: Mon Sep 8 02:37:45 2014 New Revision: 271245 URL: http://svnweb.freebsd.org/changeset/base/271245 Log: Silence a bmake(1) warning in the gif(4) module build when built with WITHOUT_INET6. LGTM: sbruno Sponsored by: The FreeBSD Foundation Modified: head/sys/modules/if_gif/Makefile Modified: head/sys/modules/if_gif/Makefile ============================================================================== --- head/sys/modules/if_gif/Makefile Mon Sep 8 02:25:01 2014 (r271244) +++ head/sys/modules/if_gif/Makefile Mon Sep 8 02:37:45 2014 (r271245) @@ -9,7 +9,7 @@ KMOD= if_gif SRCS= if_gif.c in_gif.c opt_inet.h opt_inet6.h opt_mrouting.h .if defined(KERNBUILDDIR) -OPT_INET6!= cat ${KERNBUILDDIR}/opt_inet6.h +OPT_INET6!= cat ${KERNBUILDDIR}/opt_inet6.h; echo .if empty(OPT_INET6) MK_INET6_SUPPORT=no .endif From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 03:12:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D4542AB; Mon, 8 Sep 2014 03:12: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 7E7AF1037; Mon, 8 Sep 2014 03:12: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 s883Cg5u086362; Mon, 8 Sep 2014 03:12:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s883CgZo086361; Mon, 8 Sep 2014 03:12:42 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201409080312.s883CgZo086361@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 8 Sep 2014 03:12:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271246 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 03:12:42 -0000 Author: adrian Date: Mon Sep 8 03:12:42 2014 New Revision: 271246 URL: http://svnweb.freebsd.org/changeset/base/271246 Log: Bring over some more status codes from the Linux iwlwifi driver. The (eventual) intention is to create MIB counters for transmitted frame completion to count how many packets with each status are transmitted. Note the difference between A-MPDU and non A-MPDU status. Obtained from: Linux iwlwifi/dvm driver Modified: head/sys/dev/iwn/if_iwnreg.h Modified: head/sys/dev/iwn/if_iwnreg.h ============================================================================== --- head/sys/dev/iwn/if_iwnreg.h Mon Sep 8 02:37:45 2014 (r271245) +++ head/sys/dev/iwn/if_iwnreg.h Mon Sep 8 03:12:42 2014 (r271246) @@ -1267,18 +1267,91 @@ struct iwn_ucode_info { } __packed; /* Structures for IWN_TX_DONE notification. */ -#define IWN_TX_STATUS_MSK 0xff -#define TX_STATUS_SUCCESS 0x01 -#define TX_STATUS_DIRECT_DONE 0x02 - -#define IWN_TX_SUCCESS 0x00 -#define IWN_TX_FAIL 0x80 /* all failures have 0x80 set */ -#define IWN_TX_FAIL_SHORT_LIMIT 0x82 /* too many RTS retries */ -#define IWN_TX_FAIL_LONG_LIMIT 0x83 /* too many retries */ -#define IWN_TX_FAIL_FIFO_UNDERRRUN 0x84 /* tx fifo not kept running */ -#define IWN_TX_FAIL_DEST_IN_PS 0x88 /* sta found in power save */ -#define IWN_TX_FAIL_TX_LOCKED 0x90 /* waiting to see traffic */ -#define IWN_TX_FAIL_STA_INVALID 0x8b /* XXX STA invalid (???) */ + +/* + * TX command response is sent after *agn* transmission attempts. + * + * both postpone and abort status are expected behavior from uCode. there is + * no special operation required from driver; except for RFKILL_FLUSH, + * which required tx flush host command to flush all the tx frames in queues + */ +#define IWN_TX_STATUS_MSK 0x000000ff +#define IWN_TX_STATUS_DELAY_MSK 0x00000040 +#define IWN_TX_STATUS_ABORT_MSK 0x00000080 +#define IWN_TX_PACKET_MODE_MSK 0x0000ff00 +#define IWN_TX_FIFO_NUMBER_MSK 0x00070000 +#define IWN_TX_RESERVED 0x00780000 +#define IWN_TX_POWER_PA_DETECT_MSK 0x7f800000 +#define IWN_TX_ABORT_REQUIRED_MSK 0x80000000 + +/* Success status */ +#define IWN_TX_STATUS_SUCCESS 0x01 +#define IWN_TX_STATUS_DIRECT_DONE 0x02 + +/* postpone TX */ +#define IWN_TX_STATUS_POSTPONE_DELAY 0x40 +#define IWN_TX_STATUS_POSTPONE_FEW_BYTES 0x41 +#define IWN_TX_STATUS_POSTPONE_BT_PRIO 0x42 +#define IWN_TX_STATUS_POSTPONE_QUIET_PERIOD 0x43 +#define IWN_TX_STATUS_POSTPONE_CALC_TTAK 0x44 + +/* Failures */ +#define IWN_TX_FAIL 0x80 /* all failures have 0x80 set */ +#define IWN_TX_STATUS_FAIL_INTERNAL_CROSSED_RETRY 0x81 +#define IWN_TX_FAIL_SHORT_LIMIT 0x82 /* too many RTS retries */ +#define IWN_TX_FAIL_LONG_LIMIT 0x83 /* too many retries */ +#define IWN_TX_FAIL_FIFO_UNDERRRUN 0x84 /* tx fifo not kept running */ +#define IWN_TX_STATUS_FAIL_DRAIN_FLOW 0x85 +#define IWN_TX_STATUS_FAIL_RFKILL_FLUSH 0x86 +#define IWN_TX_STATUS_FAIL_LIFE_EXPIRE 0x87 +#define IWN_TX_FAIL_DEST_IN_PS 0x88 /* sta found in power save */ +#define IWN_TX_STATUS_FAIL_HOST_ABORTED 0x89 +#define IWN_TX_STATUS_FAIL_BT_RETRY 0x8a +#define IWN_TX_FAIL_STA_INVALID 0x8b /* XXX STA invalid (???) */ +#define IWN_TX_STATUS_FAIL_FRAG_DROPPED 0x8c +#define IWN_TX_STATUS_FAIL_TID_DISABLE 0x8d +#define IWN_TX_STATUS_FAIL_FIFO_FLUSHED 0x8e +#define IWN_TX_STATUS_FAIL_INSUFFICIENT_CF_POLL 0x8f +#define IWN_TX_FAIL_TX_LOCKED 0x90 /* waiting to see traffic */ +#define IWN_TX_STATUS_FAIL_NO_BEACON_ON_RADAR 0x91 + +/* + * TX command response for A-MPDU packet responses. + * + * The status response is different to the non A-MPDU responses. + * In addition, the sequence number is treated as the sequence + * number of the TX command, NOT the 802.11 sequence number! + */ +#define IWN_AGG_TX_STATE_TRANSMITTED 0x00 +#define IWN_AGG_TX_STATE_UNDERRUN_MSK 0x01 +#define IWN_AGG_TX_STATE_FEW_BYTES_MSK 0x04 +#define IWN_AGG_TX_STATE_ABORT_MSK 0x08 + +#define IWN_AGG_TX_STATE_LAST_SENT_TTL_MSK 0x10 +#define IWN_AGG_TX_STATE_LAST_SENT_TRY_CNT_MSK 0x20 + +#define IWN_AGG_TX_STATE_SCD_QUERY_MSK 0x80 + +#define IWN_AGG_TX_STATE_TEST_BAD_CRC32_MSK 0x100 + +#define IWN_AGG_TX_STATE_RESPONSE_MSK 0x1ff +#define IWN_AGG_TX_STATE_DUMP_TX_MSK 0x200 +#define IWN_AGG_TX_STATE_DELAY_TX_MSK 0x400 + +#define IWN_AGG_TX_STATUS_MSK 0x00000fff +#define IWN_AGG_TX_TRY_MSK 0x0000f000 + +#define IWN_AGG_TX_STATE_LAST_SENT_MSK \ + (IWN_AGG_TX_STATE_LAST_SENT_TTL_MSK | \ + IWN_AGG_TX_STATE_LAST_SENT_TRY_CNT_MSK) + +/* # tx attempts for first frame in aggregation */ +#define IWN_AGG_TX_STATE_TRY_CNT_POS 12 +#define IWN_AGG_TX_STATE_TRY_CNT_MSK 0xf000 + +/* Command ID and sequence number of Tx command for this frame */ +#define IWN_AGG_TX_STATE_SEQ_NUM_POS 16 +#define IWN_AGG_TX_STATE_SEQ_NUM_MSK 0xffff0000 struct iwn4965_tx_stat { uint8_t nframes; @@ -1405,6 +1478,12 @@ struct iwn_compressed_ba { uint64_t bitmap; uint16_t qid; uint16_t ssn; + /* extra fields starting with iwn5000 */ +#if 0 + uint8_t txed; /* number of frames sent */ + uint8_t txed_2_done; /* number of frames acked */ + uint16_t reserved1; +#endif } __packed; /* Structure for IWN_START_SCAN notification. */ From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 03:16:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D64634A8; Mon, 8 Sep 2014 03:16:28 +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 C13981078; Mon, 8 Sep 2014 03:16:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s883GSHR086901; Mon, 8 Sep 2014 03:16:28 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s883GS9Y086899; Mon, 8 Sep 2014 03:16:28 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201409080316.s883GS9Y086899@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 8 Sep 2014 03:16:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271247 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 03:16:29 -0000 Author: adrian Date: Mon Sep 8 03:16:28 2014 New Revision: 271247 URL: http://svnweb.freebsd.org/changeset/base/271247 Log: (more) correctly account TX completion status for A-MPDU session frames. The rules turn out to be: * for non-aggregation session TX queues - it's either sent or not sent. * for aggregation session TX queues - if nframes=1, then the status reflects the completed transmission. * however, for nframes > 1, then this is just a status reflecting what the initial transmission did. The compressed BA (immediate or delayed) may not have yet been received, so the actual frame status is in the compressed BA updates. Whilst here, I fiddled with debugging and formatting a bit. There's also RTS attempts (what the atheros chips call "short retries") which weren't being logged and they aren't yet being used in the rate control statistics updates. For now, at least log them. TODO: * This still isn't 100% correct! So I have to tinker with this some more. (The failures aren't always failures..) * Extend the rate control API in net80211 so it can take both short and long retry counts. Tested: * Intel 5100, STA mode Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon Sep 8 03:12:42 2014 (r271246) +++ head/sys/dev/iwn/if_iwn.c Mon Sep 8 03:16:28 2014 (r271247) @@ -3125,6 +3125,7 @@ iwn_rx_compressed_ba(struct iwn_softc *s KASSERT(ni != NULL, ("no node")); KASSERT(m != NULL, ("no mbuf")); + DPRINTF(sc, IWN_DEBUG_XMIT, "%s: freeing m=%p\n", __func__, m); ieee80211_tx_complete(ni, m, 1); txq->queued--; @@ -3151,9 +3152,11 @@ iwn_rx_compressed_ba(struct iwn_softc *s return; /* - * XXX does this correctly process an almost empty bitmap? - * (since it bails out when it sees an empty bitmap, but there - * may be failed bits there..) + * Walk the bitmap and calculate how many successful and failed + * attempts are made. + * + * Yes, the rate control code doesn't know these are A-MPDU + * subframes and that it's okay to fail some of these. */ ni = tap->txa_ni; bitmap = (le64toh(ba->bitmap) >> shift) & wn->agg[tid].bitmap; @@ -3172,7 +3175,8 @@ iwn_rx_compressed_ba(struct iwn_softc *s bitmap >>= 1; } - DPRINTF(sc, IWN_DEBUG_TRACE | IWN_DEBUG_XMIT, "->%s: end; %d ok; %d err\n",__func__, tx_ok, tx_err); + DPRINTF(sc, IWN_DEBUG_TRACE | IWN_DEBUG_XMIT, + "->%s: end; %d ok; %d err\n",__func__, tx_ok, tx_err); } @@ -3423,9 +3427,12 @@ iwn4965_tx_done(struct iwn_softc *sc, st ring = &sc->txq[qid]; DPRINTF(sc, IWN_DEBUG_XMIT, "%s: " - "qid %d idx %d retries %d nkill %d rate %x duration %d status %x\n", - __func__, desc->qid, desc->idx, stat->ackfailcnt, - stat->btkillcnt, stat->rate, le16toh(stat->duration), + "qid %d idx %d RTS retries %d ACK retries %d nkill %d rate %x duration %d status %x\n", + __func__, desc->qid, desc->idx, + stat->rtsfailcnt, + stat->ackfailcnt, + stat->btkillcnt, + stat->rate, le16toh(stat->duration), le32toh(stat->status)); bus_dmamap_sync(ring->data_dmat, data->map, BUS_DMASYNC_POSTREAD); @@ -3450,9 +3457,12 @@ iwn5000_tx_done(struct iwn_softc *sc, st ring = &sc->txq[qid]; DPRINTF(sc, IWN_DEBUG_XMIT, "%s: " - "qid %d idx %d retries %d nkill %d rate %x duration %d status %x\n", - __func__, desc->qid, desc->idx, stat->ackfailcnt, - stat->btkillcnt, stat->rate, le16toh(stat->duration), + "qid %d idx %d RTS retries %d ACK retries %d nkill %d rate %x duration %d status %x\n", + __func__, desc->qid, desc->idx, + stat->rtsfailcnt, + stat->ackfailcnt, + stat->btkillcnt, + stat->rate, le16toh(stat->duration), le32toh(stat->status)); #ifdef notyet @@ -3595,6 +3605,8 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, uint8_t tid; int bit, i, lastidx, *res, seqno, shift, start; + /* XXX TODO: status is le16 field! Grr */ + DPRINTF(sc, IWN_DEBUG_TRACE, "->%s begin\n", __func__); DPRINTF(sc, IWN_DEBUG_XMIT, "%s: nframes=%d, status=0x%08x\n", __func__, @@ -3606,6 +3618,18 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, wn = (void *)tap->txa_ni; ni = tap->txa_ni; + /* + * XXX TODO: ACK and RTS failures would be nice here! + */ + + /* + * A-MPDU single frame status - if we failed to transmit it + * in A-MPDU, then it may be a permanent failure. + * + * XXX TODO: check what the Linux iwlwifi driver does here; + * there's some permanent and temporary failures that may be + * handled differently. + */ if (nframes == 1) { if ((*status & 0xff) != 1 && (*status & 0xff) != 2) { #ifdef NOT_YET @@ -3616,24 +3640,26 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, * notification is pushed up to the rate control * layer. */ - ieee80211_ratectl_tx_complete(ni->ni_vap, ni, - IEEE80211_RATECTL_TX_FAILURE, &nframes, NULL); + ieee80211_ratectl_tx_complete(ni->ni_vap, + ni, + IEEE80211_RATECTL_TX_FAILURE, + &ackfailcnt, + NULL); + } else { + /* + * If nframes=1, then we won't be getting a BA for + * this frame. Ensure that we correctly update the + * rate control code with how many retries were + * needed to send it. + */ + ieee80211_ratectl_tx_complete(ni->ni_vap, + ni, + IEEE80211_RATECTL_TX_SUCCESS, + &ackfailcnt, + NULL); } } - /* - * We succeeded with some frames, so let's update how many - * retries were needed for this frame. - * - * XXX we can't yet pass tx_complete tx_cnt and success_cnt, - * le sigh. - */ - ieee80211_ratectl_tx_complete(ni->ni_vap, - ni, - IEEE80211_RATECTL_TX_SUCCESS, - &ackfailcnt, - NULL); - bitmap = 0; start = idx; for (i = 0; i < nframes; i++) { @@ -3671,6 +3697,7 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, ssn = tap->txa_start & 0xfff; } + /* This is going nframes DWORDS into the descriptor? */ seqno = le32toh(*(status + nframes)) & 0xfff; for (lastidx = (seqno & 0xff); ring->read != lastidx;) { data = &ring->data[ring->read]; @@ -3684,7 +3711,7 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, KASSERT(ni != NULL, ("no node")); KASSERT(m != NULL, ("no mbuf")); - + DPRINTF(sc, IWN_DEBUG_XMIT, "%s: freeing m=%p\n", __func__, m); ieee80211_tx_complete(ni, m, 1); ring->queued--; From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 04:20:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B8FD99E; Mon, 8 Sep 2014 04:20:00 +0000 (UTC) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id D2B0C17A8; Mon, 8 Sep 2014 04:19:59 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 776913C1DB8; Mon, 8 Sep 2014 14:19:45 +1000 (EST) Date: Mon, 8 Sep 2014 14:19:44 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Rui Paulo Subject: Re: svn commit: r270261 - head/sys/sys In-Reply-To: <0DD8929C-983D-49FD-A904-7A4FF9A3D2CB@me.com> Message-ID: <20140908131951.D880@besplex.bde.org> References: <201408210901.s7L91gZ7049822@svn.freebsd.org> <0DD8929C-983D-49FD-A904-7A4FF9A3D2CB@me.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=BdjhjNd2 c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=I7rZfSrdNaYA:10 a=GOI3ijG3_T8A:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=6I5d2MoRAAAA:8 a=UyTiIiJ66uMYDvbjWXgA:9 a=CjuIK1q_8ugA:10 a=SV7veod9ZcQA:10 Cc: Davide Italiano , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 04:20:00 -0000 On Sun, 7 Sep 2014, Rui Paulo wrote: > On Aug 21, 2014, at 02:01, Davide Italiano wrote: >> >> Author: davide >> Date: Thu Aug 21 09:01:42 2014 >> New Revision: 270261 >> URL: http://svnweb.freebsd.org/changeset/base/270261 >> >> Log: >> Revert r270227. GCC doesn't like the lack of LL suffix, >> so this makes powerpc build failing. >> >> Modified: >> head/sys/sys/time.h >> >> Modified: head/sys/sys/time.h >> ============================================================================== >> --- head/sys/sys/time.h Thu Aug 21 08:25:46 2014 (r270260) >> +++ head/sys/sys/time.h Thu Aug 21 09:01:42 2014 (r270261) >> @@ -129,7 +129,7 @@ bintime_shift(struct bintime *_bt, int _ >> #define SBT_1MS (SBT_1S / 1000) >> #define SBT_1US (SBT_1S / 1000000) >> #define SBT_1NS (SBT_1S / 1000000000) >> -#define SBT_MAX 0x7fffffffffffffff >> +#define SBT_MAX 0x7fffffffffffffffLL > > I also think this is more correct. This is abominably less correct: - it uses the long long abomination - the long long abomination doesn't even give the correct type on any 64-bit arch, except possibly on broken development versions of arm or mips where the long long abomination is used for int64_t. The correct type is sbintime_t = int64_t. This is plain long on all 64-bit arches except possibly the broken ones. - the unsuffixed constant automatically has the correct type (the smallest one that works), except possibly in preprocessor expressions where the rules are quite different - the correct type is already used for all the other SBT constants visible in the diff. Just 1 line outside of the diff there is an example of a correct definition: % #define SBT_1S ((sbintime_t)1 << 32) The cast in this makes it unsuitable for use in preprocessor expressions, but since that is apparently not a problem for any of the old definitions it should be even less of a problem for a new definition. None of this is documented. If it were documented, the documenation should say that none of these macros is suitable for use in a preprocessor expressions. The abomination is being used to work around a compiler warning for broken C90 compilers on 32-bit systems. These compilers support long long and don't warn for it, but they need to support large constants to go with the long longs and they do warn for those unless they have an LL suffix. The idea is to require all uses of long long to be explicit. This may have been better for 32-bit arches in 1990, but it was worse for 64-bit arches even then (except broken ones that made long 32 bits). These arches never needed long long. powerpc is apparently still using the 1990 compiler options that give this warning. That's in the kernel. Compiler options in userland are different and more variable. Since SBT_* are undocumented, any use of them outside the kernel is a bug and we only have to make the kernel use work. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 05:14:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3832FF06; Mon, 8 Sep 2014 05:14:59 +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 244ED13D9; Mon, 8 Sep 2014 05:14:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s885ExBC041053; Mon, 8 Sep 2014 05:14:59 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s885EwpZ041052; Mon, 8 Sep 2014 05:14:58 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201409080514.s885EwpZ041052@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Mon, 8 Sep 2014 05:14:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271248 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 05:14:59 -0000 Author: peter Date: Mon Sep 8 05:14:58 2014 New Revision: 271248 URL: http://svnweb.freebsd.org/changeset/base/271248 Log: Temporarily remove the warning added r270781 - it prints the warning regardless of whether the usage is correct or not and this generates a LOT of noise, even when you have specified a mask. Modified: head/etc/rc.d/jail Modified: head/etc/rc.d/jail ============================================================================== --- head/etc/rc.d/jail Mon Sep 8 03:16:28 2014 (r271247) +++ head/etc/rc.d/jail Mon Sep 8 05:14:58 2014 (r271248) @@ -321,8 +321,6 @@ jail_extract_address() elif [ "${_type}" = "inet6" ]; then # In case _mask is not set for IPv6, use /128. _mask=${_mask:-/128} - warn "$_type $_addr: an IPv6 address should always be " \ - "specified with a prefix length. /128 is used." fi } From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 07:16:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A2C54A0; Mon, 8 Sep 2014 07:16:01 +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 3623D1FBF; Mon, 8 Sep 2014 07:16:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s887G1YC095472; Mon, 8 Sep 2014 07:16:01 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s887G1LD095471; Mon, 8 Sep 2014 07:16:01 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201409080716.s887G1LD095471@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 8 Sep 2014 07:16:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271249 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 07:16:01 -0000 Author: adrian Date: Mon Sep 8 07:16:00 2014 New Revision: 271249 URL: http://svnweb.freebsd.org/changeset/base/271249 Log: Implement htprotmode handling. This is separate to 11g protection - the default is to RTS protect 11n frames, including A-MPDU frames. Tested: * Intel 5100, STA mode Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon Sep 8 05:14:58 2014 (r271248) +++ head/sys/dev/iwn/if_iwn.c Mon Sep 8 07:16:00 2014 (r271249) @@ -4206,11 +4206,11 @@ iwn_check_rate_needs_protection(struct i return (0); /* - * If it's an 11n rate, then for now we enable - * protection. + * If it's an 11n rate - no protection. + * We'll do it via a specific 11n check. */ if (rate & IEEE80211_RATE_MCS) { - return (1); + return (0); } /* @@ -4440,6 +4440,9 @@ iwn_tx_data(struct iwn_softc *sc, struct flags |= IWN_TX_NEED_CTS; else if (ic->ic_protmode == IEEE80211_PROT_RTSCTS) flags |= IWN_TX_NEED_RTS; + } else if ((rate & IEEE80211_RATE_MCS) && + (ic->ic_htprotmode == IEEE80211_PROT_RTSCTS)) { + flags |= IWN_TX_NEED_RTS; } /* XXX HT protection? */ From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 07:37:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 493928D8; Mon, 8 Sep 2014 07:37:04 +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 343AD125B; Mon, 8 Sep 2014 07:37:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s887b4fP004777; Mon, 8 Sep 2014 07:37:04 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s887b4iO004776; Mon, 8 Sep 2014 07:37:04 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201409080737.s887b4iO004776@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Mon, 8 Sep 2014 07:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271250 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 07:37:04 -0000 Author: dumbbell Date: Mon Sep 8 07:37:03 2014 New Revision: 271250 URL: http://svnweb.freebsd.org/changeset/base/271250 Log: vt(4): Change the terminal and buffer sizes, even without a font This fixes a bug where scroll lock would not work for tty #0 when using vt_vga's textmode. The reason was that this window is created with a static 256x100 buffer, larger than the real size of 80x25. Now, in vt_change_font() and vt_compute_drawable_area(), we still perform operations even of the window has no font loaded (this is the case in textmode here vw->vw_font == NULL). One of these operation resizes the buffer accordingly. In vt_compute_drawable_area(), we take the terminal size as is (ie. 80x25) for the drawable area. The font argument to vt_set_border() is removed (it was never used) and the code now uses the computed drawable area instead of re-doing its own calculation. Reported by: Harald Schmalzbauer Tested by: Harald Schmalzbauer MFC after: 3 days Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Mon Sep 8 07:16:00 2014 (r271249) +++ head/sys/dev/vt/vt_core.c Mon Sep 8 07:37:03 2014 (r271250) @@ -430,10 +430,16 @@ vt_compute_drawable_area(struct vt_windo struct vt_device *vd; struct vt_font *vf; - if (vw->vw_font == NULL) + vd = vw->vw_device; + + if (vw->vw_font == NULL) { + vw->vw_draw_area.tr_begin.tp_col = 0; + vw->vw_draw_area.tr_begin.tp_row = 0; + vw->vw_draw_area.tr_end.tp_col = vd->vd_width; + vw->vw_draw_area.tr_end.tp_row = vd->vd_height; return; + } - vd = vw->vw_device; vf = vw->vw_font; /* @@ -1300,30 +1306,40 @@ vtterm_opened(struct terminal *tm, int o } static int -vt_set_border(struct vt_window *vw, struct vt_font *vf, term_color_t c) +vt_set_border(struct vt_window *vw, term_color_t c) { struct vt_device *vd = vw->vw_device; - int x, y, off_x, off_y; if (vd->vd_driver->vd_drawrect == NULL) return (ENOTSUP); - x = vd->vd_width - 1; - y = vd->vd_height - 1; - off_x = vw->vw_draw_area.tr_begin.tp_col; - off_y = vw->vw_draw_area.tr_begin.tp_row; - /* Top bar. */ - if (off_y > 0) - vd->vd_driver->vd_drawrect(vd, 0, 0, x, off_y - 1, 1, c); + if (vw->vw_draw_area.tr_begin.tp_row > 0) + vd->vd_driver->vd_drawrect(vd, + 0, 0, + vd->vd_width - 1, vw->vw_draw_area.tr_begin.tp_row - 1, + 1, c); + /* Left bar. */ - if (off_x > 0) - vd->vd_driver->vd_drawrect(vd, 0, off_y, off_x - 1, y - off_y, + if (vw->vw_draw_area.tr_begin.tp_col > 0) + vd->vd_driver->vd_drawrect(vd, + 0, 0, + vw->vw_draw_area.tr_begin.tp_col - 1, vd->vd_height - 1, + 1, c); + + /* Right bar. */ + if (vw->vw_draw_area.tr_end.tp_col < vd->vd_width) + vd->vd_driver->vd_drawrect(vd, + vw->vw_draw_area.tr_end.tp_col - 1, 0, + vd->vd_width - 1, vd->vd_height - 1, + 1, c); + + /* Bottom bar. */ + if (vw->vw_draw_area.tr_end.tp_row < vd->vd_height) + vd->vd_driver->vd_drawrect(vd, + 0, vw->vw_draw_area.tr_end.tp_row - 1, + vd->vd_width - 1, vd->vd_height - 1, 1, c); - /* Right bar. May be 1 pixel wider than necessary due to rounding. */ - vd->vd_driver->vd_drawrect(vd, x - off_x, off_y, x, y - off_y, 1, c); - /* Bottom bar. May be 1 mixel taller than necessary due to rounding. */ - vd->vd_driver->vd_drawrect(vd, 0, y - off_y, x, y, 1, c); return (0); } @@ -1355,11 +1371,6 @@ vt_change_font(struct vt_window *vw, str VT_UNLOCK(vd); return (EBUSY); } - if (vd->vd_flags & VDF_TEXTMODE) { - /* Our device doesn't need fonts. */ - VT_UNLOCK(vd); - return (ENOTTY); - } vw->vw_flags |= VWF_BUSY; VT_UNLOCK(vd); @@ -1374,7 +1385,7 @@ vt_change_font(struct vt_window *vw, str /* Actually apply the font to the current window. */ VT_LOCK(vd); - if (vw->vw_font != vf) { + if (vw->vw_font != vf && vw->vw_font != NULL && vf != NULL) { /* * In case vt_change_font called to update size we don't need * to update font link. @@ -1397,7 +1408,7 @@ vt_change_font(struct vt_window *vw, str /* Force a full redraw the next timer tick. */ if (vd->vd_curwindow == vw) { - vt_set_border(vw, vf, TC_BLACK); + vt_set_border(vw, TC_BLACK); vd->vd_flags |= VDF_INVALID; vt_resume_flush_timer(vw->vw_device, 0); } From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 08:12:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E47EF61C; Mon, 8 Sep 2014 08:12: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 D08E91804; Mon, 8 Sep 2014 08:12: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 s888C9LB022440; Mon, 8 Sep 2014 08:12:09 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s888C9x6022439; Mon, 8 Sep 2014 08:12:09 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201409080812.s888C9x6022439@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 8 Sep 2014 08:12:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271251 - head/sys/libkern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 08:12:10 -0000 Author: bz Date: Mon Sep 8 08:12:09 2014 New Revision: 271251 URL: http://svnweb.freebsd.org/changeset/base/271251 Log: Use __DECONST to avoid compiler warnings (and thus build failures) with gcc on sparc64, mips, and powerpc after r271173. Modified: head/sys/libkern/memmem.c Modified: head/sys/libkern/memmem.c ============================================================================== --- head/sys/libkern/memmem.c Mon Sep 8 07:37:03 2014 (r271250) +++ head/sys/libkern/memmem.c Mon Sep 8 08:12:09 2014 (r271251) @@ -52,9 +52,9 @@ memmem(const void *l, size_t l_len, cons return memchr(l, (int)*cs, l_len); /* the last position where its possible to find "s" in "l" */ - last = (char *)cl + l_len - s_len; + last = __DECONST(char *, cl) + l_len - s_len; - for (cur = (char *)cl; cur <= last; cur++) + for (cur = __DECONST(char *, cl); cur <= last; cur++) if (cur[0] == cs[0] && memcmp(cur, cs, s_len) == 0) return cur; From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 08:25:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 003C382C; Mon, 8 Sep 2014 08:25:33 +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 D3E3518E6; Mon, 8 Sep 2014 08:25:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s888PXOU027389; Mon, 8 Sep 2014 08:25:33 GMT (envelope-from kadesai@FreeBSD.org) Received: (from kadesai@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s888PXk3027387; Mon, 8 Sep 2014 08:25:33 GMT (envelope-from kadesai@FreeBSD.org) Message-Id: <201409080825.s888PXk3027387@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kadesai set sender to kadesai@FreeBSD.org using -f From: Kashyap D Desai Date: Mon, 8 Sep 2014 08:25:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271252 - stable/10/sys/dev/mrsas X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 08:25:34 -0000 Author: kadesai Date: Mon Sep 8 08:25:33 2014 New Revision: 271252 URL: http://svnweb.freebsd.org/changeset/base/271252 Log: MFC r270973 r270973 Fix for WITNESS warning while doing xpt_rescan. This happen when converting any JBOD to RAID or creating any new RAID from Unconfigured Drives. Without this fix, user may see call trace if WITNESS is enabled. System may panic when reconfiguring the RAID. Reviewed by: ambrisko Approved by: re (gleb) --- Modified: stable/10/sys/dev/mrsas/mrsas.h stable/10/sys/dev/mrsas/mrsas_cam.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mrsas/mrsas.h ============================================================================== --- stable/10/sys/dev/mrsas/mrsas.h Mon Sep 8 08:12:09 2014 (r271251) +++ stable/10/sys/dev/mrsas/mrsas.h Mon Sep 8 08:25:33 2014 (r271252) @@ -101,7 +101,7 @@ __FBSDID("$FreeBSD$"); */ #define BYTE_ALIGNMENT 1 #define MRSAS_MAX_NAME_LENGTH 32 -#define MRSAS_VERSION "06.704.01.00-fbsd" +#define MRSAS_VERSION "06.704.01.01-fbsd" #define MRSAS_ULONG_MAX 0xFFFFFFFFFFFFFFFF #define MRSAS_DEFAULT_TIMEOUT 0x14 //temp #define DONE 0 Modified: stable/10/sys/dev/mrsas/mrsas_cam.c ============================================================================== --- stable/10/sys/dev/mrsas/mrsas_cam.c Mon Sep 8 08:12:09 2014 (r271251) +++ stable/10/sys/dev/mrsas/mrsas_cam.c Mon Sep 8 08:25:33 2014 (r271252) @@ -1116,18 +1116,16 @@ int mrsas_bus_scan(struct mrsas_softc *s union ccb *ccb_0; union ccb *ccb_1; - mtx_lock(&sc->sim_lock); if ((ccb_0 = xpt_alloc_ccb()) == NULL) { - mtx_unlock(&sc->sim_lock); return(ENOMEM); } if ((ccb_1 = xpt_alloc_ccb()) == NULL) { xpt_free_ccb(ccb_0); - mtx_unlock(&sc->sim_lock); return(ENOMEM); } + mtx_lock(&sc->sim_lock); if (xpt_create_path(&ccb_0->ccb_h.path, xpt_periph, cam_sim_path(sc->sim_0), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP){ xpt_free_ccb(ccb_0); @@ -1144,9 +1142,9 @@ int mrsas_bus_scan(struct mrsas_softc *s return(EIO); } + mtx_unlock(&sc->sim_lock); xpt_rescan(ccb_0); xpt_rescan(ccb_1); - mtx_unlock(&sc->sim_lock); return(0); } @@ -1161,19 +1159,18 @@ int mrsas_bus_scan_sim(struct mrsas_soft { union ccb *ccb; - mtx_lock(&sc->sim_lock); if ((ccb = xpt_alloc_ccb()) == NULL) { - mtx_unlock(&sc->sim_lock); return(ENOMEM); } + mtx_lock(&sc->sim_lock); if (xpt_create_path(&ccb->ccb_h.path, xpt_periph, cam_sim_path(sim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP){ xpt_free_ccb(ccb); mtx_unlock(&sc->sim_lock); return(EIO); } - xpt_rescan(ccb); mtx_unlock(&sc->sim_lock); + xpt_rescan(ccb); return(0); } From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 08:44:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DADD6D06; Mon, 8 Sep 2014 08:44:50 +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 C6A151AE5; Mon, 8 Sep 2014 08:44:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s888ioZo036468; Mon, 8 Sep 2014 08:44:50 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s888iojU036467; Mon, 8 Sep 2014 08:44:50 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201409080844.s888iojU036467@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Mon, 8 Sep 2014 08:44:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271253 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 08:44:51 -0000 Author: dumbbell Date: Mon Sep 8 08:44:50 2014 New Revision: 271253 URL: http://svnweb.freebsd.org/changeset/base/271253 Log: pause_sbt(): Take the cold path (ie. use DELAY()) if KDB is active This fixes a panic in the i915 driver when one uses debug.kdb.enter=1 under vt(4). PR: 193269 Reported by: emaste@ Submitted by: avg@ MFC after: 3 days Modified: head/sys/kern/kern_synch.c Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Mon Sep 8 08:25:33 2014 (r271252) +++ head/sys/kern/kern_synch.c Mon Sep 8 08:44:50 2014 (r271253) @@ -362,7 +362,7 @@ pause_sbt(const char *wmesg, sbintime_t if (sbt == 0) sbt = tick_sbt; - if (cold) { + if (cold || kdb_active) { /* * We delay one second at a time to avoid overflowing the * system specific DELAY() function(s): From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 09:04:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE2C4235; Mon, 8 Sep 2014 09:04:22 +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 DA2A71CD9; Mon, 8 Sep 2014 09:04:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8894MWm045577; Mon, 8 Sep 2014 09:04:22 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8894M9H045576; Mon, 8 Sep 2014 09:04:22 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201409080904.s8894M9H045576@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Mon, 8 Sep 2014 09:04:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271254 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 09:04:23 -0000 Author: hrs Date: Mon Sep 8 09:04:22 2014 New Revision: 271254 URL: http://svnweb.freebsd.org/changeset/base/271254 Log: - Make hhook_run_socket() vnet-aware instead of adding CURVNET_SET() around the function calls. - Fix a memory leak and stats in the case that hhook_run_socket() fails in soalloc(). PR: 193265 Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Mon Sep 8 08:44:50 2014 (r271253) +++ head/sys/kern/uipc_socket.c Mon Sep 8 09:04:22 2014 (r271254) @@ -391,25 +391,24 @@ soalloc(struct vnet *vnet) sx_init(&so->so_snd.sb_sx, "so_snd_sx"); sx_init(&so->so_rcv.sb_sx, "so_rcv_sx"); TAILQ_INIT(&so->so_aiojobq); - mtx_lock(&so_global_mtx); - so->so_gencnt = ++so_gencnt; - ++numopensockets; #ifdef VIMAGE VNET_ASSERT(vnet != NULL, ("%s:%d vnet is NULL, so=%p", __func__, __LINE__, so)); - vnet->vnet_sockcnt++; so->so_vnet = vnet; #endif - mtx_unlock(&so_global_mtx); - - CURVNET_SET(vnet); /* We shouldn't need the so_global_mtx */ - if (V_socket_hhh[HHOOK_SOCKET_CREATE]->hhh_nhooks > 0) { - if (hhook_run_socket(so, NULL, HHOOK_SOCKET_CREATE)) - /* Do we need more comprehensive error returns? */ - so = NULL; + if (hhook_run_socket(so, NULL, HHOOK_SOCKET_CREATE)) { + /* Do we need more comprehensive error returns? */ + uma_zfree(socket_zone, so); + return (NULL); } - CURVNET_RESTORE(); + mtx_lock(&so_global_mtx); + so->so_gencnt = ++so_gencnt; + ++numopensockets; +#ifdef VIMAGE + vnet->vnet_sockcnt++; +#endif + mtx_unlock(&so_global_mtx); return (so); } @@ -447,10 +446,7 @@ sodealloc(struct socket *so) #ifdef MAC mac_socket_destroy(so); #endif - CURVNET_SET(so->so_vnet); - if (V_socket_hhh[HHOOK_SOCKET_CLOSE]->hhh_nhooks > 0) - hhook_run_socket(so, NULL, HHOOK_SOCKET_CLOSE); - CURVNET_RESTORE(); + hhook_run_socket(so, NULL, HHOOK_SOCKET_CLOSE); crfree(so->so_cred); khelp_destroy_osd(&so->osd); @@ -2406,10 +2402,13 @@ hhook_run_socket(struct socket *so, void struct socket_hhook_data hhook_data = { .so = so, .hctx = hctx, - .m = NULL + .m = NULL, + .status = 0 }; - hhook_run_hooks(V_socket_hhh[h_id], &hhook_data, &so->osd); + CURVNET_SET(so->so_vnet); + HHOOKS_RUN_IF(V_socket_hhh[h_id], &hhook_data, &so->osd); + CURVNET_RESTORE(); /* Ugly but needed, since hhooks return void for now */ return (hhook_data.status); @@ -3245,7 +3244,6 @@ static int filt_soread(struct knote *kn, long hint) { struct socket *so; - int ret; so = kn->kn_fp->f_data; SOCKBUF_LOCK_ASSERT(&so->so_rcv); @@ -3266,14 +3264,8 @@ filt_soread(struct knote *kn, long hint) return 1; } - CURVNET_SET(so->so_vnet); - if (V_socket_hhh[HHOOK_FILT_SOREAD]->hhh_nhooks > 0) - ret = hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD); - else - ret = 0; - CURVNET_RESTORE(); - - return (ret); + /* This hook returning non-zero indicates an event, not error */ + return (hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD)); } static void @@ -3298,10 +3290,7 @@ filt_sowrite(struct knote *kn, long hint SOCKBUF_LOCK_ASSERT(&so->so_snd); kn->kn_data = sbspace(&so->so_snd); - CURVNET_SET(so->so_vnet); - if (V_socket_hhh[HHOOK_FILT_SOWRITE]->hhh_nhooks > 0) - hhook_run_socket(so, kn, HHOOK_FILT_SOWRITE); - CURVNET_RESTORE(); + hhook_run_socket(so, kn, HHOOK_FILT_SOWRITE); if (so->so_snd.sb_state & SBS_CANTSENDMORE) { kn->kn_flags |= EV_EOF; From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 09:16:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7EAC47A; Mon, 8 Sep 2014 09:16:07 +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 A41111DDF; Mon, 8 Sep 2014 09:16:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s889G7FG050439; Mon, 8 Sep 2014 09:16:07 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s889G7ma050438; Mon, 8 Sep 2014 09:16:07 GMT (envelope-from des@FreeBSD.org) Message-Id: <201409080916.s889G7ma050438@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Mon, 8 Sep 2014 09:16:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271255 - head/usr.sbin/unbound/local-setup X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 09:16:07 -0000 Author: des Date: Mon Sep 8 09:16:07 2014 New Revision: 271255 URL: http://svnweb.freebsd.org/changeset/base/271255 Log: Fix support for IPv6 nameservers. PR: 188931 Submitted by: Takefu MFC after: 3 days Modified: head/usr.sbin/unbound/local-setup/local-unbound-setup.sh Modified: head/usr.sbin/unbound/local-setup/local-unbound-setup.sh ============================================================================== --- head/usr.sbin/unbound/local-setup/local-unbound-setup.sh Mon Sep 8 09:04:22 2014 (r271254) +++ head/usr.sbin/unbound/local-setup/local-unbound-setup.sh Mon Sep 8 09:16:07 2014 (r271255) @@ -178,7 +178,7 @@ gen_forward_conf() { echo "forward-zone:" echo " name: ." for forwarder ; do - if expr "${forwarder}" : "^[0-9:.]\{1,\}$" >/dev/null ; then + if expr "${forwarder}" : "^[0-9A-Fa-f:.]\{1,\}$" >/dev/null ; then echo " forward-addr: ${forwarder}" else echo " forward-host: ${forwarder}" From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 09:19:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B84CB625; Mon, 8 Sep 2014 09:19:01 +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 A43BD1E08; Mon, 8 Sep 2014 09:19:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s889J156050815; Mon, 8 Sep 2014 09:19:01 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s889J1QL050814; Mon, 8 Sep 2014 09:19:01 GMT (envelope-from des@FreeBSD.org) Message-Id: <201409080919.s889J1QL050814@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Mon, 8 Sep 2014 09:19:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271256 - head/lib/libpam/modules/pam_login_access X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 09:19:01 -0000 Author: des Date: Mon Sep 8 09:19:01 2014 New Revision: 271256 URL: http://svnweb.freebsd.org/changeset/base/271256 Log: Fail rather than segfault if neither PAM_TTY nor PAM_RHOST is set. PR: 83099 MFC after: 3 days Modified: head/lib/libpam/modules/pam_login_access/pam_login_access.c Modified: head/lib/libpam/modules/pam_login_access/pam_login_access.c ============================================================================== --- head/lib/libpam/modules/pam_login_access/pam_login_access.c Mon Sep 8 09:16:07 2014 (r271255) +++ head/lib/libpam/modules/pam_login_access/pam_login_access.c Mon Sep 8 09:19:01 2014 (r271256) @@ -79,7 +79,14 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int gethostname(hostname, sizeof hostname); - if (rhost == NULL || *(const char *)rhost == '\0') { + if (rhost != NULL && *(const char *)rhost != '\0') { + PAM_LOG("Checking login.access for user %s from host %s", + (const char *)user, (const char *)rhost); + if (login_access(user, rhost) != 0) + return (PAM_SUCCESS); + PAM_VERBOSE_ERROR("%s is not allowed to log in from %s", + user, rhost); + } else if (tty != NULL || *(const char *)tty != '\0') { PAM_LOG("Checking login.access for user %s on tty %s", (const char *)user, (const char *)tty); if (login_access(user, tty) != 0) @@ -87,12 +94,8 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int PAM_VERBOSE_ERROR("%s is not allowed to log in on %s", user, tty); } else { - PAM_LOG("Checking login.access for user %s from host %s", - (const char *)user, (const char *)rhost); - if (login_access(user, rhost) != 0) - return (PAM_SUCCESS); - PAM_VERBOSE_ERROR("%s is not allowed to log in from %s", - user, rhost); + PAM_VERBOSE_ERROR("PAM_RHOST or PAM_TTY required"); + return (PAM_AUTHINFO_UNAVAIL); } return (PAM_AUTH_ERR); From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 09:33:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F40C98F0; Mon, 8 Sep 2014 09:33: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 D47BD1FCE; Mon, 8 Sep 2014 09:33: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 s889XhQf059265; Mon, 8 Sep 2014 09:33:43 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s889XhXr059263; Mon, 8 Sep 2014 09:33:43 GMT (envelope-from des@FreeBSD.org) Message-Id: <201409080933.s889XhXr059263@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Mon, 8 Sep 2014 09:33:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271257 - in head/etc: defaults rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 09:33:44 -0000 Author: des Date: Mon Sep 8 09:33:43 2014 New Revision: 271257 URL: http://svnweb.freebsd.org/changeset/base/271257 Log: Use the correct idiom for default values, and ensure that the script works correctly if the user overrides them. PR: 193255 Submitted by: hrs@ MFC after: 3 days Modified: head/etc/defaults/rc.conf head/etc/rc.d/local_unbound Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Mon Sep 8 09:19:01 2014 (r271256) +++ head/etc/defaults/rc.conf Mon Sep 8 09:33:43 2014 (r271257) @@ -267,6 +267,13 @@ hastd_program="/sbin/hastd" # path to ha hastd_flags="" # Optional flags to hastd. ctld_enable="NO" # CAM Target Layer / iSCSI target daemon. local_unbound_enable="NO" # local caching resolver +local_unbound_program="/usr/sbin/unbound" +local_unbound_workdir=/var/unbound +local_unbound_config="${local_unbound_workdir}/unbound.conf" +local_unbound_flags="-c${local_unbound_config}" +local_unbound_forwardconf="${local_unbound_workdir}/forward.conf}" +local_unbound_anchor="${local_unbound_workdir}/root.key" +local_unbound_forwarders="" # # kerberos. Do not run the admin daemons on slave servers Modified: head/etc/rc.d/local_unbound ============================================================================== --- head/etc/rc.d/local_unbound Mon Sep 8 09:19:01 2014 (r271256) +++ head/etc/rc.d/local_unbound Mon Sep 8 09:33:43 2014 (r271257) @@ -13,7 +13,6 @@ name="local_unbound" desc="local caching forwarding resolver" rcvar="local_unbound_enable" -command="/usr/sbin/unbound" extra_commands="anchor configtest reload setup" start_precmd="local_unbound_prestart" reload_precmd="local_unbound_configtest" @@ -22,18 +21,9 @@ configtest_cmd="local_unbound_configtest setup_cmd="local_unbound_setup" pidfile="/var/run/${name}.pid" -: ${local_unbound_workdir:=/var/unbound} -: ${local_unbound_config:=${local_unbound_workdir}/unbound.conf} -: ${local_unbound_flags:=-c${local_unbound_config}} -: ${local_unbound_forwardconf:=${local_unbound_workdir}/forward.conf} -: ${local_unbound_anchor:=${local_unbound_workdir}/root.key} -: ${local_unbound_forwarders:=} - -load_rc_config $name - do_as_unbound() { - echo "$@" | su -m unbound + echo "$@" | /usr/bin/su -m unbound } # @@ -41,7 +31,8 @@ do_as_unbound() # local_unbound_anchor() { - do_as_unbound /usr/sbin/unbound-anchor -a ${local_unbound_anchor} + do_as_unbound ${local_unbound_program%/*}/unbound-anchor \ + -a ${local_unbound_anchor} # we can't trust the exit code - check if the file exists [ -f ${local_unbound_anchor} ] } @@ -51,7 +42,8 @@ local_unbound_anchor() # local_unbound_configtest() { - do_as_unbound /usr/sbin/unbound-checkconf ${local_unbound_config} + do_as_unbound ${local_unbound_program%/*}/unbound-checkconf \ + ${local_unbound_config} } # @@ -61,7 +53,7 @@ local_unbound_configtest() local_unbound_setup() { echo "Performing initial setup." - /usr/sbin/local-unbound-setup -n \ + ${local_unbound_program%/*}/local-unbound-setup -n \ -u unbound \ -w ${local_unbound_workdir} \ -c ${local_unbound_config} \ From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 09:49:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46312BA2; Mon, 8 Sep 2014 09:49:26 +0000 (UTC) Received: from mail-pa0-x22b.google.com (mail-pa0-x22b.google.com [IPv6:2607:f8b0:400e:c03::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 07A8511BE; Mon, 8 Sep 2014 09:49:26 +0000 (UTC) Received: by mail-pa0-f43.google.com with SMTP id fa1so2043019pad.30 for ; Mon, 08 Sep 2014 02:49:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=XUHxHObA8aHUYLe6ZPxX/WNLM7jgN2sL0++scVZXCN8=; b=Fu1OqCaAAE1Cz2oNk/ibeVT0N3bN7K86ckd48zKtQjxw9X+U3xD9PXFfVPUaJjCADj LEK8Bm6B39rqweD7ujvdcSPTqXGGXbkPUwUVaPwrGzEPlxkateUuvtKDPwcgyQ/5AoLD lJdXNMuEpH0UPUaf0lSQA/gYdXgOyQjHqQfcxCXRG81vk3Gapr7kT8e42WeubaOuoNOj 33N6YMUw6EuOriJAQT6hm140rFudC+qnPxq0Z6nlrB35JkW0TKbFUJRmyImgBiiocjvD DGw7BY53Yk/JSwGwtt8ctgMFAh23OPtzbvMXdE5efjNaJkx94t9GIu4myXFWqn/tEG4E uGgQ== X-Received: by 10.70.40.194 with SMTP id z2mr44708561pdk.119.1410169765496; Mon, 08 Sep 2014 02:49:25 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:9979:67f4:9602:180c? ([2601:8:ab80:7d6:9979:67f4:9602:180c]) by mx.google.com with ESMTPSA id dn5sm8428667pbb.2.2014.09.08.02.49.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 08 Sep 2014 02:49:24 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_C670BD79-9FF0-453E-A6E7-76E07904D788"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r271257 - in head/etc: defaults rc.d From: yaneurabeya@gmail.com In-Reply-To: <201409080933.s889XhXr059263@svn.freebsd.org> Date: Mon, 8 Sep 2014 02:49:23 -0700 Message-Id: <5AB92BF8-E53D-471E-BF53-24CA390BC797@gmail.com> References: <201409080933.s889XhXr059263@svn.freebsd.org> To: =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 09:49:26 -0000 --Apple-Mail=_C670BD79-9FF0-453E-A6E7-76E07904D788 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Sep 8, 2014, at 2:33, Dag-Erling Sm=F8rgrav wrote: > Author: des > Date: Mon Sep 8 09:33:43 2014 > New Revision: 271257 > URL: http://svnweb.freebsd.org/changeset/base/271257 >=20 > Log: > Use the correct idiom for default values, and ensure that the script > works correctly if the user overrides them. >=20 > PR: 193255 > Submitted by: hrs@ > MFC after: 3 days >=20 > Modified: > head/etc/defaults/rc.conf > head/etc/rc.d/local_unbound >=20 > Modified: head/etc/defaults/rc.conf > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/etc/defaults/rc.conf Mon Sep 8 09:19:01 2014 = (r271256) > +++ head/etc/defaults/rc.conf Mon Sep 8 09:33:43 2014 = (r271257) > @@ -267,6 +267,13 @@ hastd_program=3D"/sbin/hastd" # path to ha > hastd_flags=3D"" # Optional flags to hastd. > ctld_enable=3D"NO" # CAM Target Layer / iSCSI target = daemon. > local_unbound_enable=3D"NO" # local caching resolver > +local_unbound_program=3D"/usr/sbin/unbound" > +local_unbound_workdir=3D/var/unbound > +local_unbound_config=3D"${local_unbound_workdir}/unbound.conf" > +local_unbound_flags=3D"-c${local_unbound_config}" > +local_unbound_forwardconf=3D"${local_unbound_workdir}/forward.conf}=94 Hi, Is this a typo (dangling =93}=94 at the end)? Thanks! -Garrett --Apple-Mail=_C670BD79-9FF0-453E-A6E7-76E07904D788 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUDXujAAoJEMZr5QU6S73eY8QH/0TywMBt1VHQ++K+TIQHNIkR NypjzETQMVixEFoJe3VwUYEDdGDyyq4CpsqfEx7l/HSHBSxDFjyN3CKYilbauVM4 h3SmnaaL0M2J6HBPOwxk0d8eEsK+oBeXnBh6WOA9PoQWHbbZDLka30Uzeqquelgx vO7hPpGn8VXittlTtZdKiuzqXlyI+J0kqN/840HRPHgVWql9vt0OOE9N2j/rbv53 q/JKh7t71P/hOJ4rKSLgsiGQyDY9idJ+PepQHsIJz0mWl23MfJahGRt78iOzKgQx gOsVghSyTkR/mEIOqMYapw5GEn8K65nJ9yjJYKWHLAHI4F/iiasVQWuP4aLZMmc= =OuL7 -----END PGP SIGNATURE----- --Apple-Mail=_C670BD79-9FF0-453E-A6E7-76E07904D788-- From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 10:47:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4AAF934; Mon, 8 Sep 2014 10:47:36 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 66A64195E; Mon, 8 Sep 2014 10:47:35 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 0BAB776DC; Mon, 8 Sep 2014 10:47:34 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 74C2D392; Mon, 8 Sep 2014 12:47:26 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: yaneurabeya@gmail.com Subject: Re: svn commit: r271257 - in head/etc: defaults rc.d References: <201409080933.s889XhXr059263@svn.freebsd.org> <5AB92BF8-E53D-471E-BF53-24CA390BC797@gmail.com> Date: Mon, 08 Sep 2014 12:47:25 +0200 In-Reply-To: <5AB92BF8-E53D-471E-BF53-24CA390BC797@gmail.com> (yaneurabeya@gmail.com's message of "Mon, 8 Sep 2014 02:49:23 -0700") Message-ID: <86tx4i1j9e.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 10:47:36 -0000 yaneurabeya@gmail.com writes: > Dag-Erling Sm=C3=B8rgrav writes: > > +local_unbound_flags=3D"-c${local_unbound_config}" > > +local_unbound_forwardconf=3D"${local_unbound_workdir}/forward.conf}=E2= =80=9D > Is this a typo (dangling =E2=80=9C}=E2=80=9D at the end)? Ouch, yes. Peter also pointed out a nit in the line right before that. I will fix both at once. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 10:57:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 268E9BFF; Mon, 8 Sep 2014 10:57:44 +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 122411A6F; Mon, 8 Sep 2014 10:57:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88Avhn3096857; Mon, 8 Sep 2014 10:57:43 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88Avhm3096855; Mon, 8 Sep 2014 10:57:43 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201409081057.s88Avhm3096855@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 8 Sep 2014 10:57:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271258 - head/contrib/smbfs/mount_smbfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 10:57:44 -0000 Author: trasz Date: Mon Sep 8 10:57:43 2014 New Revision: 271258 URL: http://svnweb.freebsd.org/changeset/base/271258 Log: Make mount_smbfs(8) preserve the "automounted" mount flag. The issue here is that we have to pass this flag as a string, in iov, because it doesn't fit in mntflags, which is an int. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/contrib/smbfs/mount_smbfs/mount_smbfs.c Modified: head/contrib/smbfs/mount_smbfs/mount_smbfs.c ============================================================================== --- head/contrib/smbfs/mount_smbfs/mount_smbfs.c Mon Sep 8 09:33:43 2014 (r271257) +++ head/contrib/smbfs/mount_smbfs/mount_smbfs.c Mon Sep 8 10:57:43 2014 (r271258) @@ -81,7 +81,7 @@ main(int argc, char *argv[]) #else struct xvfsconf vfc; #endif - char *next; + char *next, *p, *val; int opt, error, mntflags, caseopt, fd; uid_t uid; gid_t gid; @@ -194,6 +194,13 @@ main(int argc, char *argv[]) }; case 'o': getmntopts(optarg, mopts, &mntflags, 0); + p = strchr(optarg, '='); + val = NULL; + if (p != NULL) { + *p = '\0'; + val = p + 1; + } + build_iovec(&iov, &iovlen, optarg, val, (size_t)-1); break; case 'c': switch (optarg[0]) { From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 11:01:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4454DF7; Mon, 8 Sep 2014 11:01:57 +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 A04991B47; Mon, 8 Sep 2014 11:01:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88B1vHg000951; Mon, 8 Sep 2014 11:01:57 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88B1vib000950; Mon, 8 Sep 2014 11:01:57 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201409081101.s88B1vib000950@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 8 Sep 2014 11:01:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271259 - head/contrib/smbfs/lib/smb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 11:01:57 -0000 Author: trasz Date: Mon Sep 8 11:01:57 2014 New Revision: 271259 URL: http://svnweb.freebsd.org/changeset/base/271259 Log: Make it possible to use empty user name ("-U ''") for mount_smbfs(8). It's just like "-U guest", except that it actually works, at least with Samba 4, which seems to return authentication failure for "-U guest". MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/contrib/smbfs/lib/smb/ctx.c Modified: head/contrib/smbfs/lib/smb/ctx.c ============================================================================== --- head/contrib/smbfs/lib/smb/ctx.c Mon Sep 8 10:57:43 2014 (r271258) +++ head/contrib/smbfs/lib/smb/ctx.c Mon Sep 8 11:01:57 2014 (r271259) @@ -191,10 +191,6 @@ smb_ctx_parseunc(struct smb_ctx *ctx, co smb_error("no user name required", 0); return EINVAL; } - if (*p1 == 0) { - smb_error("empty user name", 0); - return EINVAL; - } error = smb_ctx_setuser(ctx, tmp); if (error) return error; @@ -521,11 +517,6 @@ smb_ctx_resolve(struct smb_ctx *ctx) smb_error("no server name specified", 0); return EINVAL; } - if (ssn->ioc_user[0] == 0) { - smb_error("no user name specified for server %s", - 0, ssn->ioc_srvname); - return EINVAL; - } if (ctx->ct_minlevel >= SMBL_SHARE && sh->ioc_share[0] == 0) { smb_error("no share name specified for %s@%s", 0, ssn->ioc_user, ssn->ioc_srvname); From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 11:18:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4FC1848D; Mon, 8 Sep 2014 11:18:28 +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 2FAB41D13; Mon, 8 Sep 2014 11:18:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88BIS3P006513; Mon, 8 Sep 2014 11:18:28 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88BIRpu006510; Mon, 8 Sep 2014 11:18:27 GMT (envelope-from des@FreeBSD.org) Message-Id: <201409081118.s88BIRpu006510@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Mon, 8 Sep 2014 11:18:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271260 - in stable/10: etc etc/mtree share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 11:18:28 -0000 Author: des Date: Mon Sep 8 11:18:27 2014 New Revision: 271260 URL: http://svnweb.freebsd.org/changeset/base/271260 Log: MFH (r270392, r270676, r270679, r270698): add support for subdirectories in rc.conf.d Approved by: re (glebius) Modified: stable/10/etc/mtree/BSD.root.dist stable/10/etc/rc.subr stable/10/share/man/man5/rc.conf.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.root.dist ============================================================================== --- stable/10/etc/mtree/BSD.root.dist Mon Sep 8 11:01:57 2014 (r271259) +++ stable/10/etc/mtree/BSD.root.dist Mon Sep 8 11:18:27 2014 (r271260) @@ -58,6 +58,8 @@ .. ppp .. + rc.conf.d + .. rc.d .. security Modified: stable/10/etc/rc.subr ============================================================================== --- stable/10/etc/rc.subr Mon Sep 8 11:01:57 2014 (r271259) +++ stable/10/etc/rc.subr Mon Sep 8 11:18:27 2014 (r271260) @@ -1270,7 +1270,7 @@ run_rc_script() # load_rc_config() { - local _name _rcvar_val _var _defval _v _msg _new + local _name _rcvar_val _var _defval _v _msg _new _d _name=$1 if [ -z "$_name" ]; then err 3 'USAGE: load_rc_config name' @@ -1289,10 +1289,21 @@ load_rc_config() fi _rc_conf_loaded=true fi - if [ -f /etc/rc.conf.d/"$_name" ]; then - debug "Sourcing /etc/rc.conf.d/${_name}" - . /etc/rc.conf.d/"$_name" - fi + + for _d in /etc ${local_startup%*/rc.d}; do + if [ -f ${_d}/rc.conf.d/"$_name" ]; then + debug "Sourcing ${_d}/rc.conf.d/$_name" + . ${_d}/rc.conf.d/"$_name" + elif [ -d ${_d}/rc.conf.d/"$_name" ] ; then + local _rc + for _rc in ${_d}/rc.conf.d/"$_name"/* ; do + if [ -f "$_rc" ] ; then + debug "Sourcing $_rc" + . "$_rc" + fi + done + fi + done # Set defaults if defined. for _var in $rcvar; do Modified: stable/10/share/man/man5/rc.conf.5 ============================================================================== --- stable/10/share/man/man5/rc.conf.5 Mon Sep 8 11:01:57 2014 (r271259) +++ stable/10/share/man/man5/rc.conf.5 Mon Sep 8 11:18:27 2014 (r271260) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 15, 2014 +.Dd August 27, 2014 .Dt RC.CONF 5 .Os .Sh NAME @@ -63,18 +63,37 @@ The file is used to override settings in .Pa /etc/rc.conf for historical reasons. +.Pp In addition to .Pa /etc/rc.conf.local you can also place smaller configuration files for each .Xr rc 8 script in the .Pa /etc/rc.conf.d -directory, which will be included by the +directory or +.Ao Ar dir Ac Ns Pa /rc.conf.d +directories specified in +.Va local_startup , +which will be included by the .Va load_rc_config function. For jail configurations you could use the file .Pa /etc/rc.conf.d/jail to store jail specific configuration options. +If +.Va local_startup +contains +.Pa /usr/local/etc/rc.d +and +.Pa /opt/conf , +.Pa /usr/local/rc.conf.d/jail +and +.Pa /opt/conf/rc.conf.d/jail +will be loaded. +If +.Ao Ar dir Ac Ns Pa /rc.conf.d/ Ns Ao Ar name Ac +is a directory, +all of files in the directory will be loaded. Also see the .Va rc_conf_files variable below. From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 11:18:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C50C25C5; Mon, 8 Sep 2014 11:18:49 +0000 (UTC) Received: from mail-la0-x234.google.com (mail-la0-x234.google.com [IPv6:2a00:1450:4010:c03::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE07E1D19; Mon, 8 Sep 2014 11:18:48 +0000 (UTC) Received: by mail-la0-f52.google.com with SMTP id b8so5856323lan.11 for ; Mon, 08 Sep 2014 04:18:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=VKsSOWf+uTsX0DbCbV2fiCeRJRVmVomO30uZ4ihzjp4=; b=mY741eKc+6oxGvLxdaXsTh/jHq7CCOQVUqGr8iw2B8+B649uMNmQKr47aodlOAX92J VROqr0OtxtpT5fo4WUA972JUX/J1cRUkAzkM6yhvlKhE/7VYWm665aMHNtB9K6vfJgSN pzwCGYbUBUyXOD2izlFJf6B/chvy8A0ftG9d6HZn6j38m3U5QFKuLBPfNUj6b+kmZMlS v+X+4lK4cE1hn5CfeLaugTpWdTDtTIucTDh9BPgw7IZlr3gsUao13/ebkV5E/tydJtuG 2H6X9i4eAYMx6WwqzMBcu5ADCXHoFg3IxEd7cDhJoaxanh+kssjr7DsqjtTABkt8SXkt Fedg== MIME-Version: 1.0 X-Received: by 10.112.56.206 with SMTP id c14mr27255334lbq.27.1410175124493; Mon, 08 Sep 2014 04:18:44 -0700 (PDT) Sender: rizzo.unipi@gmail.com Received: by 10.114.26.37 with HTTP; Mon, 8 Sep 2014 04:18:44 -0700 (PDT) In-Reply-To: <201408311133.s7VBXJlv084881@svn.freebsd.org> References: <201408311133.s7VBXJlv084881@svn.freebsd.org> Date: Mon, 8 Sep 2014 13:18:44 +0200 X-Google-Sender-Auth: gWPGAGf-ht3F-mfXNuPO_70vdhI Message-ID: Subject: Re: svn commit: r270874 - in head/sys: dev/netmap net From: Luigi Rizzo To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 11:18:50 -0000 Just noticed this. I would appreciate if you and others could inform me _before_ touching netmap-related stuff, and also, if you make changes make sure they are visible to the preprocessor so i can use conditional compilations. This is because this code is supposed to be the same on various FreeBSD revisions and Linux, and if each platform randomly changes its structures maintainance becomes very hard cheers luigi On Sun, Aug 31, 2014 at 1:33 PM, Gleb Smirnoff wrote: > Author: glebius > Date: Sun Aug 31 11:33:19 2014 > New Revision: 270874 > URL: http://svnweb.freebsd.org/changeset/base/270874 > > Log: > Provide pointer from struct ifnet to struct netmap_adapter, > instead of abusing spare field. > > Modified: > head/sys/dev/netmap/netmap_kern.h > head/sys/net/if_var.h > > Modified: head/sys/dev/netmap/netmap_kern.h > > ============================================================================== > --- head/sys/dev/netmap/netmap_kern.h Sun Aug 31 10:42:52 2014 > (r270873) > +++ head/sys/dev/netmap/netmap_kern.h Sun Aug 31 11:33:19 2014 > (r270874) > @@ -1187,7 +1187,7 @@ extern int netmap_generic_rings; > * WNA is used to write it. > */ > #ifndef WNA > -#define WNA(_ifp) (_ifp)->if_pspare[0] > +#define WNA(_ifp) (_ifp)->if_netmap > #endif > #define NA(_ifp) ((struct netmap_adapter *)WNA(_ifp)) > > > Modified: head/sys/net/if_var.h > > ============================================================================== > --- head/sys/net/if_var.h Sun Aug 31 10:42:52 2014 (r270873) > +++ head/sys/net/if_var.h Sun Aug 31 11:33:19 2014 (r270874) > @@ -67,6 +67,7 @@ struct ifvlantrunk; > struct route; /* if_output */ > struct vnet; > struct ifmedia; > +struct netmap_adapter; > > #ifdef _KERNEL > #include /* ifqueue only? */ > @@ -202,6 +203,7 @@ struct ifnet { > void *if_pf_kif; /* pf glue */ > struct carp_if *if_carp; /* carp interface structure */ > struct label *if_label; /* interface MAC label */ > + struct netmap_adapter *if_netmap; /* netmap(4) softc */ > > /* Various procedures of the layer2 encapsulation and drivers. */ > int (*if_output) /* output routine (enqueue) */ > > -- -----------------------------------------+------------------------------- Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL +39-050-2211611 . via Diotisalvi 2 Mobile +39-338-6809875 . 56122 PISA (Italy) -----------------------------------------+------------------------------- From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 12:11:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 858A246C; Mon, 8 Sep 2014 12:11:50 +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 658D11377; Mon, 8 Sep 2014 12:11:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88CBoMK032356; Mon, 8 Sep 2014 12:11:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88CBnxm032353; Mon, 8 Sep 2014 12:11:49 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409081211.s88CBnxm032353@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 8 Sep 2014 12:11:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271261 - head/sys/dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 12:11:50 -0000 Author: mav Date: Mon Sep 8 12:11:49 2014 New Revision: 271261 URL: http://svnweb.freebsd.org/changeset/base/271261 Log: Bunch of microoptimizations to reduce dereferences and cache collisions. Modified: head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci.h head/sys/dev/ahci/ahciem.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Mon Sep 8 11:18:27 2014 (r271260) +++ head/sys/dev/ahci/ahci.c Mon Sep 8 12:11:49 2014 (r271261) @@ -61,31 +61,31 @@ static void ahci_ch_pm(void *arg); static void ahci_ch_intr(void *arg); static void ahci_ch_intr_direct(void *arg); static void ahci_ch_intr_main(struct ahci_channel *ch, uint32_t istatus); -static void ahci_begin_transaction(device_t dev, union ccb *ccb); +static void ahci_begin_transaction(struct ahci_channel *ch, union ccb *ccb); static void ahci_dmasetprd(void *arg, bus_dma_segment_t *segs, int nsegs, int error); static void ahci_execute_transaction(struct ahci_slot *slot); static void ahci_timeout(struct ahci_slot *slot); static void ahci_end_transaction(struct ahci_slot *slot, enum ahci_err_type et); -static int ahci_setup_fis(device_t dev, struct ahci_cmd_tab *ctp, union ccb *ccb, int tag); +static int ahci_setup_fis(struct ahci_channel *ch, struct ahci_cmd_tab *ctp, union ccb *ccb, int tag); static void ahci_dmainit(device_t dev); static void ahci_dmasetupc_cb(void *xsc, bus_dma_segment_t *segs, int nsegs, int error); static void ahci_dmafini(device_t dev); static void ahci_slotsalloc(device_t dev); static void ahci_slotsfree(device_t dev); -static void ahci_reset(device_t dev); -static void ahci_start(device_t dev, int fbs); -static void ahci_stop(device_t dev); -static void ahci_clo(device_t dev); -static void ahci_start_fr(device_t dev); -static void ahci_stop_fr(device_t dev); +static void ahci_reset(struct ahci_channel *ch); +static void ahci_start(struct ahci_channel *ch, int fbs); +static void ahci_stop(struct ahci_channel *ch); +static void ahci_clo(struct ahci_channel *ch); +static void ahci_start_fr(struct ahci_channel *ch); +static void ahci_stop_fr(struct ahci_channel *ch); static int ahci_sata_connect(struct ahci_channel *ch); -static int ahci_sata_phy_reset(device_t dev); -static int ahci_wait_ready(device_t dev, int t, int t0); +static int ahci_sata_phy_reset(struct ahci_channel *ch); +static int ahci_wait_ready(struct ahci_channel *ch, int t, int t0); -static void ahci_issue_recovery(device_t dev); -static void ahci_process_read_log(device_t dev, union ccb *ccb); -static void ahci_process_request_sense(device_t dev, union ccb *ccb); +static void ahci_issue_recovery(struct ahci_channel *ch); +static void ahci_process_read_log(struct ahci_channel *ch, union ccb *ccb); +static void ahci_process_request_sense(struct ahci_channel *ch, union ccb *ccb); static void ahciaction(struct cam_sim *sim, union ccb *ccb); static void ahcipoll(struct cam_sim *sim); @@ -669,7 +669,7 @@ ahci_ch_attach(device_t dev) } if ((bus_setup_intr(dev, ch->r_irq, ATA_INTR_FLAGS, NULL, ctlr->direct ? ahci_ch_intr_direct : ahci_ch_intr, - dev, &ch->ih))) { + ch, &ch->ih))) { device_printf(dev, "Unable to setup interrupt\n"); error = ENXIO; goto err1; @@ -698,7 +698,7 @@ ahci_ch_attach(device_t dev) } /* Construct SIM entry */ ch->sim = cam_sim_alloc(ahciaction, ahcipoll, "ahcich", ch, - device_get_unit(dev), &ch->mtx, + device_get_unit(dev), (struct mtx *)&ch->mtx, min(2, ch->numslots), (ch->caps & AHCI_CAP_SNCQ) ? ch->numslots : 0, devq); @@ -722,7 +722,7 @@ ahci_ch_attach(device_t dev) if (ch->pm_level > 3) { callout_reset(&ch->pm_timer, (ch->pm_level == 4) ? hz / 1000 : hz / 8, - ahci_ch_pm, dev); + ahci_ch_pm, ch); } mtx_unlock(&ch->mtx); return (0); @@ -792,8 +792,8 @@ ahci_ch_init(device_t dev) (AHCI_P_CMD_ACTIVE | AHCI_P_CMD_POD | AHCI_P_CMD_SUD | ((ch->pm_level == 2 || ch->pm_level == 3) ? AHCI_P_CMD_ALPE : 0) | ((ch->pm_level > 2) ? AHCI_P_CMD_ASP : 0 ))); - ahci_start_fr(dev); - ahci_start(dev, 1); + ahci_start_fr(ch); + ahci_start(ch, 1); return (0); } @@ -805,8 +805,8 @@ ahci_ch_deinit(device_t dev) /* Disable port interrupts. */ ATA_OUTL(ch->r_mem, AHCI_P_IE, 0); /* Reset command register. */ - ahci_stop(dev); - ahci_stop_fr(dev); + ahci_stop(ch); + ahci_stop_fr(ch); ATA_OUTL(ch->r_mem, AHCI_P_CMD, 0); /* Allow everything, including partial and slumber modes. */ ATA_OUTL(ch->r_mem, AHCI_P_SCTL, 0); @@ -845,7 +845,7 @@ ahci_ch_resume(device_t dev) mtx_lock(&ch->mtx); ahci_ch_init(dev); - ahci_reset(dev); + ahci_reset(ch); xpt_release_simq(ch->sim, TRUE); mtx_unlock(&ch->mtx); return (0); @@ -976,7 +976,7 @@ ahci_slotsalloc(device_t dev) for (i = 0; i < ch->numslots; i++) { struct ahci_slot *slot = &ch->slot[i]; - slot->dev = dev; + slot->ch = ch; slot->slot = i; slot->state = AHCI_SLOT_EMPTY; slot->ccb = NULL; @@ -1006,9 +1006,8 @@ ahci_slotsfree(device_t dev) } static int -ahci_phy_check_events(device_t dev, u_int32_t serr) +ahci_phy_check_events(struct ahci_channel *ch, u_int32_t serr) { - struct ahci_channel *ch = device_get_softc(dev); if (((ch->pm_level == 0) && (serr & ATA_SE_PHY_CHANGED)) || ((ch->pm_level != 0 || ch->listening) && (serr & ATA_SE_EXCHANGED))) { @@ -1017,11 +1016,11 @@ ahci_phy_check_events(device_t dev, u_in if (bootverbose) { if ((status & ATA_SS_DET_MASK) != ATA_SS_DET_NO_DEVICE) - device_printf(dev, "CONNECT requested\n"); + device_printf(ch->dev, "CONNECT requested\n"); else - device_printf(dev, "DISCONNECT requested\n"); + device_printf(ch->dev, "DISCONNECT requested\n"); } - ahci_reset(dev); + ahci_reset(ch); if ((ccb = xpt_alloc_ccb_nowait()) == NULL) return (0); if (xpt_create_path(&ccb->ccb_h.path, NULL, @@ -1037,11 +1036,11 @@ ahci_phy_check_events(device_t dev, u_in } static void -ahci_cpd_check_events(device_t dev) +ahci_cpd_check_events(struct ahci_channel *ch) { - struct ahci_channel *ch = device_get_softc(dev); u_int32_t status; union ccb *ccb; + device_t dev; if (ch->pm_level == 0) return; @@ -1051,12 +1050,13 @@ ahci_cpd_check_events(device_t dev) return; if (bootverbose) { + dev = ch->dev; if (status & AHCI_P_CMD_CPS) { device_printf(dev, "COLD CONNECT requested\n"); } else device_printf(dev, "COLD DISCONNECT requested\n"); } - ahci_reset(dev); + ahci_reset(ch); if ((ccb = xpt_alloc_ccb_nowait()) == NULL) return; if (xpt_create_path(&ccb->ccb_h.path, NULL, cam_sim_path(ch->sim), @@ -1068,16 +1068,15 @@ ahci_cpd_check_events(device_t dev) } static void -ahci_notify_events(device_t dev, u_int32_t status) +ahci_notify_events(struct ahci_channel *ch, u_int32_t status) { - struct ahci_channel *ch = device_get_softc(dev); struct cam_path *dpath; int i; if (ch->caps & AHCI_CAP_SSNTF) ATA_OUTL(ch->r_mem, AHCI_P_SNTF, status); if (bootverbose) - device_printf(dev, "SNTF 0x%04x\n", status); + device_printf(ch->dev, "SNTF 0x%04x\n", status); for (i = 0; i < 16; i++) { if ((status & (1 << i)) == 0) continue; @@ -1106,8 +1105,7 @@ ahci_done(struct ahci_channel *ch, union static void ahci_ch_intr(void *arg) { - device_t dev = (device_t)arg; - struct ahci_channel *ch = device_get_softc(dev); + struct ahci_channel *ch = (struct ahci_channel *)arg; uint32_t istatus; /* Read interrupt statuses. */ @@ -1123,8 +1121,7 @@ ahci_ch_intr(void *arg) static void ahci_ch_intr_direct(void *arg) { - device_t dev = (device_t)arg; - struct ahci_channel *ch = device_get_softc(dev); + struct ahci_channel *ch = (struct ahci_channel *)arg; struct ccb_hdr *ccb_h; uint32_t istatus; @@ -1147,8 +1144,7 @@ ahci_ch_intr_direct(void *arg) static void ahci_ch_pm(void *arg) { - device_t dev = (device_t)arg; - struct ahci_channel *ch = device_get_softc(dev); + struct ahci_channel *ch = (struct ahci_channel *)arg; uint32_t work; if (ch->numrslots != 0) @@ -1164,7 +1160,6 @@ ahci_ch_pm(void *arg) static void ahci_ch_intr_main(struct ahci_channel *ch, uint32_t istatus) { - device_t dev = ch->dev; uint32_t cstatus, serr = 0, sntf = 0, ok, err; enum ahci_err_type et; int i, ccs, port, reset = 0; @@ -1206,12 +1201,12 @@ ahci_ch_intr_main(struct ahci_channel *c serr = ATA_INL(ch->r_mem, AHCI_P_SERR); if (serr) { ATA_OUTL(ch->r_mem, AHCI_P_SERR, serr); - reset = ahci_phy_check_events(dev, serr); + reset = ahci_phy_check_events(ch, serr); } } /* Process cold presence detection events */ if ((istatus & AHCI_P_IX_CPD) && !reset) - ahci_cpd_check_events(dev); + ahci_cpd_check_events(ch); /* Process command errors */ if (istatus & (AHCI_P_IX_OF | AHCI_P_IX_IF | AHCI_P_IX_HBD | AHCI_P_IX_HBF | AHCI_P_IX_TFE)) { @@ -1306,14 +1301,13 @@ ahci_ch_intr_main(struct ahci_channel *c } /* Process NOTIFY events */ if (sntf) - ahci_notify_events(dev, sntf); + ahci_notify_events(ch, sntf); } /* Must be called with channel locked. */ static int -ahci_check_collision(device_t dev, union ccb *ccb) +ahci_check_collision(struct ahci_channel *ch, union ccb *ccb) { - struct ahci_channel *ch = device_get_softc(dev); int t = ccb->ccb_h.target_id; if ((ccb->ccb_h.func_code == XPT_ATA_IO) && @@ -1362,9 +1356,8 @@ ahci_check_collision(device_t dev, union /* Must be called with channel locked. */ static void -ahci_begin_transaction(device_t dev, union ccb *ccb) +ahci_begin_transaction(struct ahci_channel *ch, union ccb *ccb) { - struct ahci_channel *ch = device_get_softc(dev); struct ahci_slot *slot; int tag, tags; @@ -1373,14 +1366,14 @@ ahci_begin_transaction(device_t dev, uni if ((ccb->ccb_h.func_code == XPT_ATA_IO) && (ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA)) tags = ch->curr[ccb->ccb_h.target_id].tags; - tag = ch->lastslot; - while (1) { - if (tag >= tags) - tag = 0; - if (ch->slot[tag].state == AHCI_SLOT_EMPTY) - break; - tag++; - }; + if (ch->lastslot + 1 < tags) + tag = ffs(~(ch->oslots >> (ch->lastslot + 1))); + else + tag = 0; + if (tag == 0 || tag + ch->lastslot >= tags) + tag = ffs(~ch->oslots) - 1; + else + tag += ch->lastslot; ch->lastslot = tag; /* Occupy chosen slot. */ slot = &ch->slot[tag]; @@ -1389,7 +1382,7 @@ ahci_begin_transaction(device_t dev, uni if (ch->numrslots == 0 && ch->pm_level > 3) callout_stop(&ch->pm_timer); /* Update channel stats. */ - ch->oslots |= (1 << slot->slot); + ch->oslots |= (1 << tag); ch->numrslots++; ch->numrslotspd[ccb->ccb_h.target_id]++; if ((ccb->ccb_h.func_code == XPT_ATA_IO) && @@ -1400,14 +1393,15 @@ ahci_begin_transaction(device_t dev, uni } if ((ccb->ccb_h.func_code == XPT_ATA_IO) && (ccb->ataio.cmd.flags & (CAM_ATAIO_CONTROL | CAM_ATAIO_NEEDRESULT))) - ch->aslots |= (1 << slot->slot); - slot->dma.nsegs = 0; + ch->aslots |= (1 << tag); if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) { slot->state = AHCI_SLOT_LOADING; bus_dmamap_load_ccb(ch->dma.data_tag, slot->dma.data_map, ccb, ahci_dmasetprd, slot, 0); - } else + } else { + slot->dma.nsegs = 0; ahci_execute_transaction(slot); + } } /* Locked by busdma engine. */ @@ -1415,13 +1409,13 @@ static void ahci_dmasetprd(void *arg, bus_dma_segment_t *segs, int nsegs, int error) { struct ahci_slot *slot = arg; - struct ahci_channel *ch = device_get_softc(slot->dev); + struct ahci_channel *ch = slot->ch; struct ahci_cmd_tab *ctp; struct ahci_dma_prd *prd; int i; if (error) { - device_printf(slot->dev, "DMA load error\n"); + device_printf(ch->dev, "DMA load error\n"); ahci_end_transaction(slot, AHCI_ERR_INVALID); return; } @@ -1446,8 +1440,7 @@ ahci_dmasetprd(void *arg, bus_dma_segmen static void ahci_execute_transaction(struct ahci_slot *slot) { - device_t dev = slot->dev; - struct ahci_channel *ch = device_get_softc(dev); + struct ahci_channel *ch = slot->ch; struct ahci_cmd_tab *ctp; struct ahci_cmd_list *clp; union ccb *ccb = slot->ccb; @@ -1460,7 +1453,7 @@ ahci_execute_transaction(struct ahci_slo ctp = (struct ahci_cmd_tab *) (ch->dma.work + AHCI_CT_OFFSET + (AHCI_CT_SIZE * slot->slot)); /* Setup the FIS for this request */ - if (!(fis_size = ahci_setup_fis(dev, ctp, ccb, slot->slot))) { + if (!(fis_size = ahci_setup_fis(ch, ctp, ccb, slot->slot))) { device_printf(ch->dev, "Setting up SATA FIS failed\n"); ahci_end_transaction(slot, AHCI_ERR_INVALID); return; @@ -1481,9 +1474,9 @@ ahci_execute_transaction(struct ahci_slo if (ccb->ataio.cmd.control & ATA_A_RESET) { softreset = 1; /* Kick controller into sane state */ - ahci_stop(dev); - ahci_clo(dev); - ahci_start(dev, 0); + ahci_stop(ch); + ahci_clo(ch); + ahci_start(ch, 0); clp->cmd_flags |= AHCI_CMD_RESET | AHCI_CMD_CLR_BUSY; } else { softreset = 2; @@ -1561,9 +1554,9 @@ ahci_execute_transaction(struct ahci_slo } if (timeout && (count >= timeout)) { - device_printf(dev, "Poll timeout on slot %d port %d\n", + device_printf(ch->dev, "Poll timeout on slot %d port %d\n", slot->slot, port); - device_printf(dev, "is %08x cs %08x ss %08x " + device_printf(ch->dev, "is %08x cs %08x ss %08x " "rs %08x tfd %02x serr %08x cmd %08x\n", ATA_INL(ch->r_mem, AHCI_P_IS), ATA_INL(ch->r_mem, AHCI_P_CI), @@ -1588,9 +1581,8 @@ ahci_execute_transaction(struct ahci_slo /* Must be called with channel locked. */ static void -ahci_process_timeout(device_t dev) +ahci_process_timeout(struct ahci_channel *ch) { - struct ahci_channel *ch = device_get_softc(dev); int i; mtx_assert(&ch->mtx, MA_OWNED); @@ -1605,9 +1597,8 @@ ahci_process_timeout(device_t dev) /* Must be called with channel locked. */ static void -ahci_rearm_timeout(device_t dev) +ahci_rearm_timeout(struct ahci_channel *ch) { - struct ahci_channel *ch = device_get_softc(dev); int i; mtx_assert(&ch->mtx, MA_OWNED); @@ -1629,8 +1620,8 @@ ahci_rearm_timeout(device_t dev) static void ahci_timeout(struct ahci_slot *slot) { - device_t dev = slot->dev; - struct ahci_channel *ch = device_get_softc(dev); + struct ahci_channel *ch = slot->ch; + device_t dev = ch->dev; uint32_t sstatus; int ccs; int i; @@ -1697,7 +1688,7 @@ ahci_timeout(struct ahci_slot *slot) xpt_freeze_simq(ch->sim, 1); ch->toslots |= (1 << slot->slot); if ((ch->rslots & ~ch->toslots) == 0) - ahci_process_timeout(dev); + ahci_process_timeout(ch); else device_printf(dev, " ... waiting for slots %08x\n", ch->rslots & ~ch->toslots); @@ -1708,8 +1699,7 @@ ahci_timeout(struct ahci_slot *slot) static void ahci_end_transaction(struct ahci_slot *slot, enum ahci_err_type et) { - device_t dev = slot->dev; - struct ahci_channel *ch = device_get_softc(dev); + struct ahci_channel *ch = slot->ch; union ccb *ccb = slot->ccb; struct ahci_cmd_list *clp; int lastto; @@ -1867,15 +1857,15 @@ ahci_end_transaction(struct ahci_slot *s (ccb->ataio.cmd.control & ATA_A_RESET) && et == AHCI_ERR_NONE) { ccb->ataio.cmd.control &= ~ATA_A_RESET; - ahci_begin_transaction(dev, ccb); + ahci_begin_transaction(ch, ccb); return; } /* If it was our READ LOG command - process it. */ if (ccb->ccb_h.recovery_type == RECOVERY_READ_LOG) { - ahci_process_read_log(dev, ccb); + ahci_process_read_log(ch, ccb); /* If it was our REQUEST SENSE command - process it. */ } else if (ccb->ccb_h.recovery_type == RECOVERY_REQUEST_SENSE) { - ahci_process_request_sense(dev, ccb); + ahci_process_request_sense(ch, ccb); /* If it was NCQ or ATAPI command error, put result on hold. */ } else if (et == AHCI_ERR_NCQ || ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_SCSI_STATUS_ERROR && @@ -1888,27 +1878,27 @@ ahci_end_transaction(struct ahci_slot *s if (ch->rslots == 0) { /* if there was fatal error - reset port. */ if (ch->toslots != 0 || ch->fatalerr) { - ahci_reset(dev); + ahci_reset(ch); } else { /* if we have slots in error, we can reinit port. */ if (ch->eslots != 0) { - ahci_stop(dev); - ahci_clo(dev); - ahci_start(dev, 1); + ahci_stop(ch); + ahci_clo(ch); + ahci_start(ch, 1); } /* if there commands on hold, we can do READ LOG. */ if (!ch->recoverycmd && ch->numhslots) - ahci_issue_recovery(dev); + ahci_issue_recovery(ch); } /* If all the rest of commands are in timeout - give them chance. */ } else if ((ch->rslots & ~ch->toslots) == 0 && et != AHCI_ERR_TIMEOUT) - ahci_rearm_timeout(dev); + ahci_rearm_timeout(ch); /* Unfreeze frozen command. */ - if (ch->frozen && !ahci_check_collision(dev, ch->frozen)) { + if (ch->frozen && !ahci_check_collision(ch, ch->frozen)) { union ccb *fccb = ch->frozen; ch->frozen = NULL; - ahci_begin_transaction(dev, fccb); + ahci_begin_transaction(ch, fccb); xpt_release_simq(ch->sim, TRUE); } /* Start PM timer. */ @@ -1920,9 +1910,8 @@ ahci_end_transaction(struct ahci_slot *s } static void -ahci_issue_recovery(device_t dev) +ahci_issue_recovery(struct ahci_channel *ch) { - struct ahci_channel *ch = device_get_softc(dev); union ccb *ccb; struct ccb_ataio *ataio; struct ccb_scsiio *csio; @@ -1935,7 +1924,7 @@ ahci_issue_recovery(device_t dev) } ccb = xpt_alloc_ccb_nowait(); if (ccb == NULL) { - device_printf(dev, "Unable to allocate recovery command\n"); + device_printf(ch->dev, "Unable to allocate recovery command\n"); completeall: /* We can't do anything -- complete held commands. */ for (i = 0; i < ch->numslots; i++) { @@ -1947,7 +1936,7 @@ completeall: ch->hold[i] = NULL; ch->numhslots--; } - ahci_reset(dev); + ahci_reset(ch); return; } ccb->ccb_h = ch->hold[i]->ccb_h; /* Reuse old header. */ @@ -1961,7 +1950,7 @@ completeall: ataio->data_ptr = malloc(512, M_AHCI, M_NOWAIT); if (ataio->data_ptr == NULL) { xpt_free_ccb(ccb); - device_printf(dev, + device_printf(ch->dev, "Unable to allocate memory for READ LOG command\n"); goto completeall; } @@ -1993,13 +1982,12 @@ completeall: /* Freeze SIM while doing recovery. */ ch->recoverycmd = 1; xpt_freeze_simq(ch->sim, 1); - ahci_begin_transaction(dev, ccb); + ahci_begin_transaction(ch, ccb); } static void -ahci_process_read_log(device_t dev, union ccb *ccb) +ahci_process_read_log(struct ahci_channel *ch, union ccb *ccb) { - struct ahci_channel *ch = device_get_softc(dev); uint8_t *data; struct ata_res *res; int i; @@ -2037,9 +2025,9 @@ ahci_process_read_log(device_t dev, unio } } else { if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) - device_printf(dev, "Error while READ LOG EXT\n"); + device_printf(ch->dev, "Error while READ LOG EXT\n"); else if ((data[0] & 0x80) == 0) { - device_printf(dev, "Non-queued command error in READ LOG EXT\n"); + device_printf(ch->dev, "Non-queued command error in READ LOG EXT\n"); } for (i = 0; i < ch->numslots; i++) { if (!ch->hold[i]) @@ -2057,9 +2045,8 @@ ahci_process_read_log(device_t dev, unio } static void -ahci_process_request_sense(device_t dev, union ccb *ccb) +ahci_process_request_sense(struct ahci_channel *ch, union ccb *ccb) { - struct ahci_channel *ch = device_get_softc(dev); int i; ch->recoverycmd = 0; @@ -2079,9 +2066,8 @@ ahci_process_request_sense(device_t dev, } static void -ahci_start(device_t dev, int fbs) +ahci_start(struct ahci_channel *ch, int fbs) { - struct ahci_channel *ch = device_get_softc(dev); u_int32_t cmd; /* Clear SATA error register */ @@ -2102,9 +2088,8 @@ ahci_start(device_t dev, int fbs) } static void -ahci_stop(device_t dev) +ahci_stop(struct ahci_channel *ch) { - struct ahci_channel *ch = device_get_softc(dev); u_int32_t cmd; int timeout; @@ -2116,7 +2101,7 @@ ahci_stop(device_t dev) do { DELAY(10); if (timeout++ > 50000) { - device_printf(dev, "stopping AHCI engine failed\n"); + device_printf(ch->dev, "stopping AHCI engine failed\n"); break; } } while (ATA_INL(ch->r_mem, AHCI_P_CMD) & AHCI_P_CMD_CR); @@ -2124,9 +2109,8 @@ ahci_stop(device_t dev) } static void -ahci_clo(device_t dev) +ahci_clo(struct ahci_channel *ch) { - struct ahci_channel *ch = device_get_softc(dev); u_int32_t cmd; int timeout; @@ -2139,7 +2123,7 @@ ahci_clo(device_t dev) do { DELAY(10); if (timeout++ > 50000) { - device_printf(dev, "executing CLO failed\n"); + device_printf(ch->dev, "executing CLO failed\n"); break; } } while (ATA_INL(ch->r_mem, AHCI_P_CMD) & AHCI_P_CMD_CLO); @@ -2147,9 +2131,8 @@ ahci_clo(device_t dev) } static void -ahci_stop_fr(device_t dev) +ahci_stop_fr(struct ahci_channel *ch) { - struct ahci_channel *ch = device_get_softc(dev); u_int32_t cmd; int timeout; @@ -2161,16 +2144,15 @@ ahci_stop_fr(device_t dev) do { DELAY(10); if (timeout++ > 50000) { - device_printf(dev, "stopping AHCI FR engine failed\n"); + device_printf(ch->dev, "stopping AHCI FR engine failed\n"); break; } } while (ATA_INL(ch->r_mem, AHCI_P_CMD) & AHCI_P_CMD_FR); } static void -ahci_start_fr(device_t dev) +ahci_start_fr(struct ahci_channel *ch) { - struct ahci_channel *ch = device_get_softc(dev); u_int32_t cmd; /* Start FIS reception on this channel */ @@ -2179,9 +2161,8 @@ ahci_start_fr(device_t dev) } static int -ahci_wait_ready(device_t dev, int t, int t0) +ahci_wait_ready(struct ahci_channel *ch, int t, int t0) { - struct ahci_channel *ch = device_get_softc(dev); int timeout = 0; uint32_t val; @@ -2189,7 +2170,7 @@ ahci_wait_ready(device_t dev, int t, int (ATA_S_BUSY | ATA_S_DRQ)) { if (timeout > t) { if (t != 0) { - device_printf(dev, + device_printf(ch->dev, "AHCI reset: device not ready after %dms " "(tfd = %08x)\n", MAX(t, 0) + t0, val); @@ -2200,7 +2181,7 @@ ahci_wait_ready(device_t dev, int t, int timeout++; } if (bootverbose) - device_printf(dev, "AHCI reset: device ready after %dms\n", + device_printf(ch->dev, "AHCI reset: device ready after %dms\n", timeout + t0); return (0); } @@ -2208,22 +2189,21 @@ ahci_wait_ready(device_t dev, int t, int static void ahci_reset_to(void *arg) { - device_t dev = arg; - struct ahci_channel *ch = device_get_softc(dev); + struct ahci_channel *ch = arg; if (ch->resetting == 0) return; ch->resetting--; - if (ahci_wait_ready(dev, ch->resetting == 0 ? -1 : 0, + if (ahci_wait_ready(ch, ch->resetting == 0 ? -1 : 0, (310 - ch->resetting) * 100) == 0) { ch->resetting = 0; - ahci_start(dev, 1); + ahci_start(ch, 1); xpt_release_simq(ch->sim, TRUE); return; } if (ch->resetting == 0) { - ahci_clo(dev); - ahci_start(dev, 1); + ahci_clo(ch); + ahci_start(ch, 1); xpt_release_simq(ch->sim, TRUE); return; } @@ -2231,15 +2211,14 @@ ahci_reset_to(void *arg) } static void -ahci_reset(device_t dev) +ahci_reset(struct ahci_channel *ch) { - struct ahci_channel *ch = device_get_softc(dev); - struct ahci_controller *ctlr = device_get_softc(device_get_parent(dev)); + struct ahci_controller *ctlr = device_get_softc(device_get_parent(ch->dev)); int i; xpt_freeze_simq(ch->sim, 1); if (bootverbose) - device_printf(dev, "AHCI reset...\n"); + device_printf(ch->dev, "AHCI reset...\n"); /* Forget about previous reset. */ if (ch->resetting) { ch->resetting = 0; @@ -2258,7 +2237,7 @@ ahci_reset(device_t dev) ahci_done(ch, fccb); } /* Kill the engine and requeue all running commands. */ - ahci_stop(dev); + ahci_stop(ch); for (i = 0; i < ch->numslots; i++) { /* Do we have a running request on slot? */ if (ch->slot[i].state < AHCI_SLOT_RUNNING) @@ -2284,9 +2263,9 @@ ahci_reset(device_t dev) /* Disable port interrupts */ ATA_OUTL(ch->r_mem, AHCI_P_IE, 0); /* Reset and reconnect PHY, */ - if (!ahci_sata_phy_reset(dev)) { + if (!ahci_sata_phy_reset(ch)) { if (bootverbose) - device_printf(dev, + device_printf(ch->dev, "AHCI reset: device not found\n"); ch->devices = 0; /* Enable wanted port interrupts */ @@ -2297,11 +2276,11 @@ ahci_reset(device_t dev) return; } if (bootverbose) - device_printf(dev, "AHCI reset: device found\n"); + device_printf(ch->dev, "AHCI reset: device found\n"); /* Wait for clearing busy status. */ - if (ahci_wait_ready(dev, dumping ? 31000 : 0, 0)) { + if (ahci_wait_ready(ch, dumping ? 31000 : 0, 0)) { if (dumping) - ahci_clo(dev); + ahci_clo(ch); else ch->resetting = 310; } @@ -2315,17 +2294,16 @@ ahci_reset(device_t dev) AHCI_P_IX_DP | AHCI_P_IX_UF | (ctlr->ccc ? 0 : AHCI_P_IX_SDB) | AHCI_P_IX_DS | AHCI_P_IX_PS | (ctlr->ccc ? 0 : AHCI_P_IX_DHR))); if (ch->resetting) - callout_reset(&ch->reset_timer, hz / 10, ahci_reset_to, dev); + callout_reset(&ch->reset_timer, hz / 10, ahci_reset_to, ch); else { - ahci_start(dev, 1); + ahci_start(ch, 1); xpt_release_simq(ch->sim, TRUE); } } static int -ahci_setup_fis(device_t dev, struct ahci_cmd_tab *ctp, union ccb *ccb, int tag) +ahci_setup_fis(struct ahci_channel *ch, struct ahci_cmd_tab *ctp, union ccb *ccb, int tag) { - struct ahci_channel *ch = device_get_softc(dev); u_int8_t *fis = &ctp->cfis[0]; bzero(fis, 20); @@ -2417,9 +2395,8 @@ ahci_sata_connect(struct ahci_channel *c } static int -ahci_sata_phy_reset(device_t dev) +ahci_sata_phy_reset(struct ahci_channel *ch) { - struct ahci_channel *ch = device_get_softc(dev); int sata_rev; uint32_t val; @@ -2459,9 +2436,8 @@ ahci_sata_phy_reset(device_t dev) } static int -ahci_check_ids(device_t dev, union ccb *ccb) +ahci_check_ids(struct ahci_channel *ch, union ccb *ccb) { - struct ahci_channel *ch = device_get_softc(dev); if (ccb->ccb_h.target_id > ((ch->caps & AHCI_CAP_SPM) ? 15 : 0)) { ccb->ccb_h.status = CAM_TID_INVALID; @@ -2479,19 +2455,17 @@ ahci_check_ids(device_t dev, union ccb * static void ahciaction(struct cam_sim *sim, union ccb *ccb) { - device_t dev, parent; struct ahci_channel *ch; CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, ("ahciaction func_code=%x\n", ccb->ccb_h.func_code)); ch = (struct ahci_channel *)cam_sim_softc(sim); - dev = ch->dev; switch (ccb->ccb_h.func_code) { /* Common cases first */ case XPT_ATA_IO: /* Execute the requested I/O operation */ case XPT_SCSI_IO: - if (ahci_check_ids(dev, ccb)) + if (ahci_check_ids(ch, ccb)) return; if (ch->devices == 0 || (ch->pm_present == 0 && @@ -2501,14 +2475,14 @@ ahciaction(struct cam_sim *sim, union cc } ccb->ccb_h.recovery_type = RECOVERY_NONE; /* Check for command collision. */ - if (ahci_check_collision(dev, ccb)) { + if (ahci_check_collision(ch, ccb)) { /* Freeze command. */ ch->frozen = ccb; /* We have only one frozen slot, so freeze simq also. */ xpt_freeze_simq(ch->sim, 1); return; } - ahci_begin_transaction(dev, ccb); + ahci_begin_transaction(ch, ccb); return; case XPT_EN_LUN: /* Enable LUN as a target */ case XPT_TARGET_IO: /* Execute target I/O request */ @@ -2523,7 +2497,7 @@ ahciaction(struct cam_sim *sim, union cc struct ccb_trans_settings *cts = &ccb->cts; struct ahci_device *d; - if (ahci_check_ids(dev, ccb)) + if (ahci_check_ids(ch, ccb)) return; if (cts->type == CTS_TYPE_CURRENT_SETTINGS) d = &ch->curr[ccb->ccb_h.target_id]; @@ -2553,7 +2527,7 @@ ahciaction(struct cam_sim *sim, union cc struct ahci_device *d; uint32_t status; - if (ahci_check_ids(dev, ccb)) + if (ahci_check_ids(ch, ccb)) return; if (cts->type == CTS_TYPE_CURRENT_SETTINGS) d = &ch->curr[ccb->ccb_h.target_id]; @@ -2610,7 +2584,7 @@ ahciaction(struct cam_sim *sim, union cc } case XPT_RESET_BUS: /* Reset the specified SCSI bus */ case XPT_RESET_DEV: /* Bus Device Reset the specified SCSI device */ - ahci_reset(dev); + ahci_reset(ch); ccb->ccb_h.status = CAM_REQ_CMP; break; case XPT_TERM_IO: /* Terminate the I/O process */ @@ -2621,7 +2595,6 @@ ahciaction(struct cam_sim *sim, union cc { struct ccb_pathinq *cpi = &ccb->cpi; - parent = device_get_parent(dev); cpi->version_num = 1; /* XXX??? */ cpi->hba_inquiry = PI_SDTR_ABLE; if (ch->caps & AHCI_CAP_SNCQ) @@ -2678,7 +2651,7 @@ ahcipoll(struct cam_sim *sim) if (ch->resetting != 0 && (--ch->resetpolldiv <= 0 || !callout_pending(&ch->reset_timer))) { ch->resetpolldiv = 1000; - ahci_reset_to(ch->dev); + ahci_reset_to(ch); } } MODULE_VERSION(ahci, 1); Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Mon Sep 8 11:18:27 2014 (r271260) +++ head/sys/dev/ahci/ahci.h Mon Sep 8 12:11:49 2014 (r271261) @@ -375,7 +375,7 @@ enum ahci_slot_states { }; struct ahci_slot { - device_t dev; /* Device handle */ + struct ahci_channel *ch; /* Channel */ u_int8_t slot; /* Number of this slot */ enum ahci_slot_states state; /* Slot state */ union ccb *ccb; /* CCB occupying slot */ @@ -422,20 +422,19 @@ struct ahci_channel { int quirks; int numslots; /* Number of present slots */ int pm_level; /* power management level */ - - struct ahci_slot slot[AHCI_MAX_SLOTS]; - union ccb *hold[AHCI_MAX_SLOTS]; - struct mtx mtx; /* state lock */ - STAILQ_HEAD(, ccb_hdr) doneq; /* queue of completed CCBs */ - int batch; /* doneq is in use */ int devices; /* What is present */ int pm_present; /* PM presence reported */ int fbs_enabled; /* FIS-based switching enabled */ + + union ccb *hold[AHCI_MAX_SLOTS]; + struct ahci_slot slot[AHCI_MAX_SLOTS]; uint32_t oslots; /* Occupied slots */ uint32_t rslots; /* Running slots */ uint32_t aslots; /* Slots with atomic commands */ uint32_t eslots; /* Slots in error */ uint32_t toslots; /* Slots in timeout */ + int lastslot; /* Last used slot */ + int taggedtarget; /* Last tagged target */ int numrslots; /* Number of running slots */ int numrslotspd[16];/* Number of running slots per dev */ int numtslots; /* Number of tagged slots */ @@ -443,8 +442,6 @@ struct ahci_channel { int numhslots; /* Number of held slots */ int recoverycmd; /* Our READ LOG active */ int fatalerr; /* Fatal error happend */ - int lastslot; /* Last used slot */ - int taggedtarget; /* Last tagged target */ int resetting; /* Hard-reset in progress. */ int resetpolldiv; /* Hard-reset poll divider. */ int listening; /* SUD bit is cleared. */ @@ -455,6 +452,10 @@ struct ahci_channel { struct ahci_device user[16]; /* User-specified settings */ struct ahci_device curr[16]; /* Current settings */ + + struct mtx_padalign mtx; /* state lock */ + STAILQ_HEAD(, ccb_hdr) doneq; /* queue of completed CCBs */ + int batch; /* doneq is in use */ }; struct ahci_enclosure { Modified: head/sys/dev/ahci/ahciem.c ============================================================================== --- head/sys/dev/ahci/ahciem.c Mon Sep 8 11:18:27 2014 (r271260) +++ head/sys/dev/ahci/ahciem.c Mon Sep 8 12:11:49 2014 (r271261) @@ -344,7 +344,7 @@ ahci_em_led(void *priv, int onoff) } static int -ahci_check_ids(device_t dev, union ccb *ccb) +ahci_check_ids(union ccb *ccb) { if (ccb->ccb_h.target_id != 0) { @@ -554,7 +554,7 @@ ahciemaction(struct cam_sim *sim, union dev = enc->dev; switch (ccb->ccb_h.func_code) { case XPT_ATA_IO: /* Execute the requested I/O operation */ - if (ahci_check_ids(dev, ccb)) + if (ahci_check_ids(ccb)) return; ahci_em_begin_transaction(dev, ccb); return; From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 12:26:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD205A78; Mon, 8 Sep 2014 12:26:53 +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 8D995151D; Mon, 8 Sep 2014 12:26:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88CQrif039990; Mon, 8 Sep 2014 12:26:53 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88CQrUD039984; Mon, 8 Sep 2014 12:26:53 GMT (envelope-from des@FreeBSD.org) Message-Id: <201409081226.s88CQrUD039984@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Mon, 8 Sep 2014 12:26:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271262 - in head/etc: defaults rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 12:26:53 -0000 Author: des Date: Mon Sep 8 12:26:52 2014 New Revision: 271262 URL: http://svnweb.freebsd.org/changeset/base/271262 Log: Revert r271257 after several issues were pointed out. An updated patch will be committed at a later date. Modified: head/etc/defaults/rc.conf head/etc/rc.d/local_unbound Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Mon Sep 8 12:11:49 2014 (r271261) +++ head/etc/defaults/rc.conf Mon Sep 8 12:26:52 2014 (r271262) @@ -267,13 +267,6 @@ hastd_program="/sbin/hastd" # path to ha hastd_flags="" # Optional flags to hastd. ctld_enable="NO" # CAM Target Layer / iSCSI target daemon. local_unbound_enable="NO" # local caching resolver -local_unbound_program="/usr/sbin/unbound" -local_unbound_workdir=/var/unbound -local_unbound_config="${local_unbound_workdir}/unbound.conf" -local_unbound_flags="-c${local_unbound_config}" -local_unbound_forwardconf="${local_unbound_workdir}/forward.conf}" -local_unbound_anchor="${local_unbound_workdir}/root.key" -local_unbound_forwarders="" # # kerberos. Do not run the admin daemons on slave servers Modified: head/etc/rc.d/local_unbound ============================================================================== --- head/etc/rc.d/local_unbound Mon Sep 8 12:11:49 2014 (r271261) +++ head/etc/rc.d/local_unbound Mon Sep 8 12:26:52 2014 (r271262) @@ -13,6 +13,7 @@ name="local_unbound" desc="local caching forwarding resolver" rcvar="local_unbound_enable" +command="/usr/sbin/unbound" extra_commands="anchor configtest reload setup" start_precmd="local_unbound_prestart" reload_precmd="local_unbound_configtest" @@ -21,9 +22,18 @@ configtest_cmd="local_unbound_configtest setup_cmd="local_unbound_setup" pidfile="/var/run/${name}.pid" +: ${local_unbound_workdir:=/var/unbound} +: ${local_unbound_config:=${local_unbound_workdir}/unbound.conf} +: ${local_unbound_flags:=-c${local_unbound_config}} +: ${local_unbound_forwardconf:=${local_unbound_workdir}/forward.conf} +: ${local_unbound_anchor:=${local_unbound_workdir}/root.key} +: ${local_unbound_forwarders:=} + +load_rc_config $name + do_as_unbound() { - echo "$@" | /usr/bin/su -m unbound + echo "$@" | su -m unbound } # @@ -31,8 +41,7 @@ do_as_unbound() # local_unbound_anchor() { - do_as_unbound ${local_unbound_program%/*}/unbound-anchor \ - -a ${local_unbound_anchor} + do_as_unbound /usr/sbin/unbound-anchor -a ${local_unbound_anchor} # we can't trust the exit code - check if the file exists [ -f ${local_unbound_anchor} ] } @@ -42,8 +51,7 @@ local_unbound_anchor() # local_unbound_configtest() { - do_as_unbound ${local_unbound_program%/*}/unbound-checkconf \ - ${local_unbound_config} + do_as_unbound /usr/sbin/unbound-checkconf ${local_unbound_config} } # @@ -53,7 +61,7 @@ local_unbound_configtest() local_unbound_setup() { echo "Performing initial setup." - ${local_unbound_program%/*}/local-unbound-setup -n \ + /usr/sbin/local-unbound-setup -n \ -u unbound \ -w ${local_unbound_workdir} \ -c ${local_unbound_config} \ From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 14:19:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7C66951; Mon, 8 Sep 2014 14:19:09 +0000 (UTC) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9F75F12F9; Mon, 8 Sep 2014 14:19:09 +0000 (UTC) Received: from jre-mbp.elischer.org (ppp121-45-224-76.lns20.per1.internode.on.net [121.45.224.76]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id s88EIwLM043059 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 8 Sep 2014 07:19:00 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <540DBACC.1030002@freebsd.org> Date: Mon, 08 Sep 2014 22:18:52 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Benno Rice , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r271173 - in head/sys: conf gdb libkern sys References: <201409051640.s85Gemme006236@svn.freebsd.org> In-Reply-To: <201409051640.s85Gemme006236@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 14:19:10 -0000 On 9/6/14, 12:40 AM, Benno Rice wrote: > Author: benno > Date: Fri Sep 5 16:40:47 2014 > New Revision: 271173 > URL: http://svnweb.freebsd.org/changeset/base/271173 > > Log: > Add support for gdb's memory searching capabilities to our in-kernel gdb > server. > > Submitted by: Daniel O'Connor > Reviewed by: jhb > Sponsored by: EMC Isilon Storage Division MFC? From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 14:45:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D1B4847; Mon, 8 Sep 2014 14:45:59 +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 ECAF5180A; Mon, 8 Sep 2014 14:45:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88Ejws1006893; Mon, 8 Sep 2014 14:45:58 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88Ejwii006892; Mon, 8 Sep 2014 14:45:58 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409081445.s88Ejwii006892@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 8 Sep 2014 14:45: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: r271263 - stable/10/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 14:45:59 -0000 Author: jhb Date: Mon Sep 8 14:45:58 2014 New Revision: 271263 URL: http://svnweb.freebsd.org/changeset/base/271263 Log: MFC 271048: Always seek back to the beginning of a regular directory, even if the previous seek location was 0. Without this, readdir() would see dd_loc of zero and call getdirentries() which would start reading entries at the current seek location of the directory ignoring the first batch of entries. Also, rewinddir() should always seek so that it reads the directory from the beginning to get updated entries. PR: 192935 Approved by: re (gjb) Modified: stable/10/lib/libc/gen/rewinddir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/rewinddir.c ============================================================================== --- stable/10/lib/libc/gen/rewinddir.c Mon Sep 8 12:26:52 2014 (r271262) +++ stable/10/lib/libc/gen/rewinddir.c Mon Sep 8 14:45:58 2014 (r271263) @@ -53,7 +53,7 @@ rewinddir(dirp) _pthread_mutex_lock(&dirp->dd_lock); if (dirp->dd_flags & __DTF_READALL) _filldir(dirp, false); - else if (dirp->dd_seek != 0) { + else { (void) lseek(dirp->dd_fd, 0, SEEK_SET); dirp->dd_seek = 0; } From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 14:59:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8419CD12; Mon, 8 Sep 2014 14:59:44 +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 6F5661988; Mon, 8 Sep 2014 14:59:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88ExiKo012211; Mon, 8 Sep 2014 14:59:44 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88Exilp012210; Mon, 8 Sep 2014 14:59:44 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409081459.s88Exilp012210@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 8 Sep 2014 14:59:44 +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: r271264 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 14:59:44 -0000 Author: gjb Date: Mon Sep 8 14:59:43 2014 New Revision: 271264 URL: http://svnweb.freebsd.org/changeset/base/271264 Log: Document r271095, vt(4) keymap support added to the syscons rc(8) startup script. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 14:45:58 2014 (r271263) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 14:59:43 2014 (r271264) @@ -1224,6 +1224,10 @@ script now generates ED25519 &man.sshd.8; host keys if keys do not already exist when ssh_keygen_alg() is invoked. + + Support for &man.vt.4; keyboard maps + has been added to the syscons + &man.rc.d.8; startup script. From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 14:59:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65BFBED3; Mon, 8 Sep 2014 14:59:48 +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 518AF198E; Mon, 8 Sep 2014 14:59:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88ExmgK012303; Mon, 8 Sep 2014 14:59:48 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88ExmZ4012302; Mon, 8 Sep 2014 14:59:48 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409081459.s88ExmZ4012302@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 8 Sep 2014 14:59: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: r271266 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 14:59:48 -0000 Author: gjb Date: Mon Sep 8 14:59:47 2014 New Revision: 271266 URL: http://svnweb.freebsd.org/changeset/base/271266 Log: Document r271116, ofwfb updated to work with x11-servers/xorg-server. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 14:59:45 2014 (r271265) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 14:59:47 2014 (r271266) @@ -202,6 +202,20 @@ updated to enable the &man.vt.4; console driver for the Sony® Playstation 3™ platform. + The + &os;/&arch.powerpc; ofwfb driver, used to + provide a graphics console when the &man.vt.4; console driver + is used, has been modified to work with the x11-drivers/xf86-video-scfb + port. + + + If using an ATI graphics card with + the &man.vt.4; driver, the x11-servers/xorg-server package + must be updated to version 1.12.4_8 or newer. + + Virtualization Support From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 14:59:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4FCFAC1; Mon, 8 Sep 2014 14:59:50 +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 3B39E198F; Mon, 8 Sep 2014 14:59:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88ExoO5012345; Mon, 8 Sep 2014 14:59:50 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88ExoKv012344; Mon, 8 Sep 2014 14:59:50 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409081459.s88ExoKv012344@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 8 Sep 2014 14:59: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: r271267 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 14:59:50 -0000 Author: gjb Date: Mon Sep 8 14:59:49 2014 New Revision: 271267 URL: http://svnweb.freebsd.org/changeset/base/271267 Log: Document r271128, several performance enhancements to vt(4). Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 14:59:47 2014 (r271266) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 14:59:49 2014 (r271267) @@ -216,6 +216,10 @@ must be updated to version 1.12.4_8 or newer. + Several + performance enchancements to the &man.vt.4; driver have been + merged from &os;-CURRENT. + Virtualization Support From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 14:59:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7436ADEF; Mon, 8 Sep 2014 14:59: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 5FF2C198B; Mon, 8 Sep 2014 14:59: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 s88Exkvn012259; Mon, 8 Sep 2014 14:59:46 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88ExkRB012258; Mon, 8 Sep 2014 14:59:46 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409081459.s88ExkRB012258@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 8 Sep 2014 14:59: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: r271265 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 14:59:46 -0000 Author: gjb Date: Mon Sep 8 14:59:45 2014 New Revision: 271265 URL: http://svnweb.freebsd.org/changeset/base/271265 Log: Document r271111, vt(4) enabled for PS3. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 14:59:43 2014 (r271264) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 14:59:45 2014 (r271265) @@ -197,6 +197,11 @@ The &man.asmc.4; driver has been updated to support the &apple; Mac Mini 3,1. + The &os;/&arch.powerpc64; default kernel + configuration, GENERIC64, has been + updated to enable the &man.vt.4; console driver for the + Sony® Playstation 3™ platform. + Virtualization Support From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 14:59:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 421F71CB; Mon, 8 Sep 2014 14:59: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 2CFE91990; Mon, 8 Sep 2014 14:59: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 s88Exq35012393; Mon, 8 Sep 2014 14:59:52 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88ExqA5012392; Mon, 8 Sep 2014 14:59:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409081459.s88ExqA5012392@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 8 Sep 2014 14:59:52 +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: r271268 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 14:59:52 -0000 Author: gjb Date: Mon Sep 8 14:59:51 2014 New Revision: 271268 URL: http://svnweb.freebsd.org/changeset/base/271268 Log: Document r271130, sys/boot/libstand moved to 32-bit specific directory naming convention. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 14:59:49 2014 (r271267) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 14:59:51 2014 (r271268) @@ -400,6 +400,13 @@ &man.loader.conf.5; as a comma- or space-separated list. By default, kernel and kernel.old are listed. + + The + sys/boot/ sources + have been rearranged, moving &man.libstand.3; to a directory + indicating the library is built as 32-bit. A 64-bit version + of &man.libstand.3; will be added in a future &os; + release. From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 14:59:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDF324A3; Mon, 8 Sep 2014 14:59:59 +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 DA1251997; Mon, 8 Sep 2014 14:59:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88Exx9V012589; Mon, 8 Sep 2014 14:59:59 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88Exx8W012588; Mon, 8 Sep 2014 14:59:59 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409081459.s88Exx8W012588@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 8 Sep 2014 14:59: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: r271272 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 15:00:00 -0000 Author: gjb Date: Mon Sep 8 14:59:59 2014 New Revision: 271272 URL: http://svnweb.freebsd.org/changeset/base/271272 Log: Document r271234, mrsas(4) enabled in GENERIC for amd64 and i386. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 14:59:57 2014 (r271271) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 14:59:59 2014 (r271272) @@ -835,6 +835,11 @@ The &man.hptnr.4; driver has been updated to version 1.0.1. + + The &man.mrsas.4; driver has been + added to the GENERIC kernel + configuration on &arch.amd64; and &arch.i386; + architectures. From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 14:59:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F15B426; Mon, 8 Sep 2014 14:59:58 +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 EE9591994; Mon, 8 Sep 2014 14:59:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88ExvTW012529; Mon, 8 Sep 2014 14:59:57 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88Exvag012528; Mon, 8 Sep 2014 14:59:57 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409081459.s88Exvag012528@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 8 Sep 2014 14:59: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: r271271 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 14:59:58 -0000 Author: gjb Date: Mon Sep 8 14:59:57 2014 New Revision: 271271 URL: http://svnweb.freebsd.org/changeset/base/271271 Log: Document r271205, powerpc ATI Radeon 9700 backlight fix. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 14:59:55 2014 (r271270) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 14:59:57 2014 (r271271) @@ -225,6 +225,11 @@ 4 to 8 for the &arch.powerpc64; architecture. + The &os;/&arch.powerpc; ATI driver + has been updated to support enabling and disabling the + Radeon 9700 backlight, found in the + &apple; PowerBook™ G4. + Virtualization Support From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 14:59:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1BB6F3F7; Mon, 8 Sep 2014 14:59:56 +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 079551992; Mon, 8 Sep 2014 14:59:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88Extsc012477; Mon, 8 Sep 2014 14:59:55 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88ExtgI012476; Mon, 8 Sep 2014 14:59:55 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409081459.s88ExtgI012476@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 8 Sep 2014 14:59:55 +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: r271270 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 14:59:56 -0000 Author: gjb Date: Mon Sep 8 14:59:55 2014 New Revision: 271270 URL: http://svnweb.freebsd.org/changeset/base/271270 Log: Document r271153, KSTACK_PAGES increased 4 -> 8 on powerpc64. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 14:59:53 2014 (r271269) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 14:59:55 2014 (r271270) @@ -220,6 +220,11 @@ performance enchancements to the &man.vt.4; driver have been merged from &os;-CURRENT. + The default stack size + (KSTACK_PAGES) has been increased from + 4 to 8 for the + &arch.powerpc64; architecture. + Virtualization Support From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 14:59:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B0402CF; Mon, 8 Sep 2014 14:59:54 +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 1CD381991; Mon, 8 Sep 2014 14:59:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88ExrKj012435; Mon, 8 Sep 2014 14:59:53 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88ExrXm012434; Mon, 8 Sep 2014 14:59:53 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409081459.s88ExrXm012434@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 8 Sep 2014 14:59:53 +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: r271269 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 14:59:54 -0000 Author: gjb Date: Mon Sep 8 14:59:53 2014 New Revision: 271269 URL: http://svnweb.freebsd.org/changeset/base/271269 Log: - Refine entry for r271130 since a follow-up commit adds 64-bit libstand. - Document r271135, initial UEFI boot support. - Document r271136, boot1.efi, boot1.efifat, loader.efi installed to /boot. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 14:59:51 2014 (r271268) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 14:59:53 2014 (r271269) @@ -404,9 +404,40 @@ The sys/boot/ sources have been rearranged, moving &man.libstand.3; to a directory - indicating the library is built as 32-bit. A 64-bit version - of &man.libstand.3; will be added in a future &os; - release. + indicating the library is built as 32-bit. + + The + &man.libstand.3; library has been updated to produce + a 64-bit shared library for the &os;/&arch.amd64; and + &os;/&arch.powerpc64; architectures. + + Initial support for UEFI + boot has been added. + + Three + new files are installed to /boot, supporting + UEFI boot: + + + + boot1.efi: The + UEFI first stage bootstrap + file. + + + + boot1.efifat: + A FAT filesystem image containing + an EFI system partition. + + + + loader.efi: The third stage + bootstrap file. + + From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 15:00:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04A4D642; Mon, 8 Sep 2014 15:00:01 +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 D9678199D; Mon, 8 Sep 2014 15:00:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88F0112012766; Mon, 8 Sep 2014 15:00:01 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88F01cr012764; Mon, 8 Sep 2014 15:00:01 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409081500.s88F01cr012764@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 8 Sep 2014 15:00:01 +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: r271273 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 15:00:02 -0000 Author: gjb Date: Mon Sep 8 15:00:01 2014 New Revision: 271273 URL: http://svnweb.freebsd.org/changeset/base/271273 Log: Document r271260, support for /etc/rc.d// subdirectories. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 14:59:59 2014 (r271272) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 15:00:01 2014 (r271273) @@ -1304,6 +1304,14 @@ Support for &man.vt.4; keyboard maps has been added to the syscons &man.rc.d.8; startup script. + + Support for subdirectories within + /etc/rc.conf.d/service/ + has been added the &man.rc.d.8;. This allows creating + separate configuration files for services such as + netif, for example, where each network + interface can have a separate configuration file. From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 15:28:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD9C125E; Mon, 8 Sep 2014 15:28:17 +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 A90E71D1A; Mon, 8 Sep 2014 15:28:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88FSHGw026783; Mon, 8 Sep 2014 15:28:17 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88FSHTB026782; Mon, 8 Sep 2014 15:28:17 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409081528.s88FSHTB026782@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 8 Sep 2014 15:28: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: r271274 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 15:28:17 -0000 Author: emaste Date: Mon Sep 8 15:28:17 2014 New Revision: 271274 URL: http://svnweb.freebsd.org/changeset/base/271274 Log: MFC r270976: Allow standalone debug for non-default ${PROG} targets This allows WITH_DEBUG_FILES to produce standalone debug for the ELF runtime linker. We previously disabled standalone debug files for bsd.prog.mk consumers that included a non-default ${PROG} target, but this is not required. Consumers that do not support standalone debug are still handled by disabling it for statically linked binaries, and for those that specify a non-default binary format. Sponsored by: DARPA, AFRL Approved by: re Modified: stable/10/share/mk/bsd.prog.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.prog.mk ============================================================================== --- stable/10/share/mk/bsd.prog.mk Mon Sep 8 15:00:01 2014 (r271273) +++ stable/10/share/mk/bsd.prog.mk Mon Sep 8 15:28:17 2014 (r271274) @@ -28,9 +28,7 @@ CTFFLAGS+= -g PROG= ${PROG_CXX} .endif -.if defined(PROG) && target(${PROG}) -MK_DEBUG_FILES= no -.elif !empty(LDFLAGS:M-Wl,*--oformat,*) || !empty(LDFLAGS:M-static) +.if !empty(LDFLAGS:M-Wl,*--oformat,*) || !empty(LDFLAGS:M-static) MK_DEBUG_FILES= no .endif From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 15:40:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBF999CA; Mon, 8 Sep 2014 15:40:55 +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 B72F51E70; Mon, 8 Sep 2014 15:40:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88FetJ8035109; Mon, 8 Sep 2014 15:40:55 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88FetqZ035087; Mon, 8 Sep 2014 15:40:55 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409081540.s88FetqZ035087@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 8 Sep 2014 15:40:55 +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: r271275 - stable/10/share/zoneinfo X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 15:40:55 -0000 Author: emaste Date: Mon Sep 8 15:40:55 2014 New Revision: 271275 URL: http://svnweb.freebsd.org/changeset/base/271275 Log: MFC r271047: Avoid ./ in zoneinfo entries in METALOG Use of "find ." resulted in METALOG entries with an extra ./ -- e.g., ./usr/share/zoneinfo/./America/Toronto. Avoid this by using globbing via "find *" instead. Approved by: re Sponsored by: DARPA, AFRL Modified: stable/10/share/zoneinfo/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/zoneinfo/Makefile ============================================================================== --- stable/10/share/zoneinfo/Makefile Mon Sep 8 15:28:17 2014 (r271274) +++ stable/10/share/zoneinfo/Makefile Mon Sep 8 15:40:55 2014 (r271275) @@ -79,7 +79,7 @@ zoneinfo: yearistype ${TDATA} beforeinstall: cd ${TZBUILDDIR} && \ - find . -type f -print -exec ${INSTALL} \ + find * -type f -print -exec ${INSTALL} \ -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ \{} ${DESTDIR}/usr/share/zoneinfo/\{} \; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 15:42:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 780B6B33; Mon, 8 Sep 2014 15:42: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 6351E1F1E; Mon, 8 Sep 2014 15:42: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 s88FgkBk036090; Mon, 8 Sep 2014 15:42:46 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88Fgkin036089; Mon, 8 Sep 2014 15:42:46 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409081542.s88Fgkin036089@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 8 Sep 2014 15:42: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: r271276 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 15:42:46 -0000 Author: gjb Date: Mon Sep 8 15:42:45 2014 New Revision: 271276 URL: http://svnweb.freebsd.org/changeset/base/271276 Log: Document r263720, hostname- and IP-based restrictions added to ctld(8). Submitted by: trasz Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 15:40:55 2014 (r271275) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 15:42:45 2014 (r271276) @@ -654,6 +654,11 @@ deferring wakeup until enough data has been received to read or write a file, reducing CPU usage and throughput performance with large I/O workloads. + + Support for hostname- and IP-based access + restriction has been added to the iSCSI + &man.ctld.8; daemon. From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 15:42:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6879CB34; Mon, 8 Sep 2014 15:42:48 +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 537C11F1F; Mon, 8 Sep 2014 15:42:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88FgmEP036133; Mon, 8 Sep 2014 15:42:48 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88FgmUe036132; Mon, 8 Sep 2014 15:42:48 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409081542.s88FgmUe036132@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 8 Sep 2014 15:42: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: r271277 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 15:42:48 -0000 Author: gjb Date: Mon Sep 8 15:42:47 2014 New Revision: 271277 URL: http://svnweb.freebsd.org/changeset/base/271277 Log: - Document 263725, ctld(8) 'portal-group' is overrideable. - Document 263726, ctld(8) 'auth-group' default entry. Submitted by: trasz Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 15:42:45 2014 (r271276) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Sep 8 15:42:47 2014 (r271277) @@ -659,6 +659,17 @@ sponsor="&ff;">Support for hostname- and IP-based access restriction has been added to the iSCSI &man.ctld.8; daemon. + + The &man.ctld.8; daemon has been updated + to allow overriding the default + portal-group configuration. + + The &man.ctld.8; daemon now includes a new + auth-group, default, + defaulting to deny, which is possible + to override. From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 17:01:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76CA0921; Mon, 8 Sep 2014 17:01:31 +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 62C7A1B5E; Mon, 8 Sep 2014 17:01:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88H1Vs1073779; Mon, 8 Sep 2014 17:01:31 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88H1Vo0073778; Mon, 8 Sep 2014 17:01:31 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201409081701.s88H1Vo0073778@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 8 Sep 2014 17:01:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271278 - head/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 17:01:31 -0000 Author: bdrewery Date: Mon Sep 8 17:01:30 2014 New Revision: 271278 URL: http://svnweb.freebsd.org/changeset/base/271278 Log: Avoid rs(1) hitting LINE_MAX with custom trees that have large dependencies. Modified: head/tools/make_libdeps.sh Modified: head/tools/make_libdeps.sh ============================================================================== --- head/tools/make_libdeps.sh Mon Sep 8 15:42:47 2014 (r271277) +++ head/tools/make_libdeps.sh Mon Sep 8 17:01:30 2014 (r271278) @@ -89,12 +89,12 @@ main() fi prebuild_libs=$( - awk -F"${FS}" '{ print $2 }' ${LIBDEPENDS} |rs 0 1 |sort -u + awk -F"${FS}" '{ print $2 }' ${LIBDEPENDS} | tr ' ' '\n' | + sort -u ) echo "Libraries with dependents:" echo - echo ${prebuild_libs} | - rs 0 1 + echo ${prebuild_libs} | tr ' ' '\n' echo echo "List of interdependencies:" From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 18:09:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 672191D1; Mon, 8 Sep 2014 18:09: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 3852C132C; Mon, 8 Sep 2014 18:09:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88I9KNU005929; Mon, 8 Sep 2014 18:09:20 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88I9KMB005928; Mon, 8 Sep 2014 18:09:20 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201409081809.s88I9KMB005928@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 8 Sep 2014 18:09:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r271279 - vendor/NetBSD/libc-vis/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 18:09:20 -0000 Author: brooks Date: Mon Sep 8 18:09:19 2014 New Revision: 271279 URL: http://svnweb.freebsd.org/changeset/base/271279 Log: Vendor import of NetBSD's (un)vis(3) at 2014-09-08 Modified: vendor/NetBSD/libc-vis/dist/vis.c Modified: vendor/NetBSD/libc-vis/dist/vis.c ============================================================================== --- vendor/NetBSD/libc-vis/dist/vis.c Mon Sep 8 17:01:30 2014 (r271278) +++ vendor/NetBSD/libc-vis/dist/vis.c Mon Sep 8 18:09:19 2014 (r271279) @@ -1,4 +1,4 @@ -/* $NetBSD: vis.c,v 1.60 2013/02/21 16:21:20 joerg Exp $ */ +/* $NetBSD: vis.c,v 1.62 2014/09/08 17:35:01 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -57,7 +57,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: vis.c,v 1.60 2013/02/21 16:21:20 joerg Exp $"); +__RCSID("$NetBSD: vis.c,v 1.62 2014/09/08 17:35:01 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #ifdef __FBSDID __FBSDID("$FreeBSD$"); @@ -357,7 +357,7 @@ istrsenvisx(char *mbdst, size_t *dlen, c ssize_t mbslength, maxolen; _DIAGASSERT(mbdst != NULL); - _DIAGASSERT(mbsrc != NULL); + _DIAGASSERT(mbsrc != NULL || mblength == 0); _DIAGASSERT(mbextra != NULL); /* @@ -375,8 +375,6 @@ istrsenvisx(char *mbdst, size_t *dlen, c /* Allocate space for the wide char strings */ psrc = pdst = extra = NULL; - if (!mblength) - mblength = strlen(mbsrc); if ((psrc = calloc(mblength + 1, sizeof(*psrc))) == NULL) return -1; if ((pdst = calloc((4 * mblength) + 1, sizeof(*pdst))) == NULL) @@ -528,6 +526,15 @@ out: free(psrc); return error; } + +static int +istrsenvisxl(char *mbdst, size_t *dlen, const char *mbsrc, + int flags, const char *mbextra, int *cerr_ptr) +{ + return istrsenvisx(mbdst, dlen, mbsrc, + mbsrc != NULL ? strlen(mbsrc) : 0, flags, mbextra, cerr_ptr); +} + #endif #if !HAVE_SVIS @@ -571,13 +578,13 @@ snvis(char *mbdst, size_t dlen, int c, i int strsvis(char *mbdst, const char *mbsrc, int flags, const char *mbextra) { - return istrsenvisx(mbdst, NULL, mbsrc, 0, flags, mbextra, NULL); + return istrsenvisxl(mbdst, NULL, mbsrc, flags, mbextra, NULL); } int strsnvis(char *mbdst, size_t dlen, const char *mbsrc, int flags, const char *mbextra) { - return istrsenvisx(mbdst, &dlen, mbsrc, 0, flags, mbextra, NULL); + return istrsenvisxl(mbdst, &dlen, mbsrc, flags, mbextra, NULL); } int @@ -646,13 +653,13 @@ nvis(char *mbdst, size_t dlen, int c, in int strvis(char *mbdst, const char *mbsrc, int flags) { - return istrsenvisx(mbdst, NULL, mbsrc, 0, flags, "", NULL); + return istrsenvisxl(mbdst, NULL, mbsrc, flags, "", NULL); } int strnvis(char *mbdst, size_t dlen, const char *mbsrc, int flags) { - return istrsenvisx(mbdst, &dlen, mbsrc, 0, flags, "", NULL); + return istrsenvisxl(mbdst, &dlen, mbsrc, flags, "", NULL); } /* From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 18:10:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C34931B; Mon, 8 Sep 2014 18:10:11 +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 5DB28133A; Mon, 8 Sep 2014 18:10:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88IABjs006158; Mon, 8 Sep 2014 18:10:11 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88IABHF006157; Mon, 8 Sep 2014 18:10:11 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201409081810.s88IABHF006157@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 8 Sep 2014 18:10:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r271280 - vendor/NetBSD/libc-vis/20140908 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 18:10:11 -0000 Author: brooks Date: Mon Sep 8 18:10:10 2014 New Revision: 271280 URL: http://svnweb.freebsd.org/changeset/base/271280 Log: Tag 2014-09-08 import of NetBSD's (un)vis(3) Added: vendor/NetBSD/libc-vis/20140908/ - copied from r271279, vendor/NetBSD/libc-vis/dist/ From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 18:11:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32FC254D; Mon, 8 Sep 2014 18:11: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 1EFD813DF; Mon, 8 Sep 2014 18:11: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 s88IBK8d008030; Mon, 8 Sep 2014 18:11:20 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88IBKGr008029; Mon, 8 Sep 2014 18:11:20 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201409081811.s88IBKGr008029@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 8 Sep 2014 18:11:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r271281 - vendor/NetBSD/libc-vis X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 18:11:21 -0000 Author: brooks Date: Mon Sep 8 18:11:20 2014 New Revision: 271281 URL: http://svnweb.freebsd.org/changeset/base/271281 Log: Take advantage of the ^ feature in modern SVN versions. Modified: vendor/NetBSD/libc-vis/FreeBSD-Upgrade Modified: vendor/NetBSD/libc-vis/FreeBSD-Upgrade ============================================================================== --- vendor/NetBSD/libc-vis/FreeBSD-Upgrade Mon Sep 8 18:10:10 2014 (r271280) +++ vendor/NetBSD/libc-vis/FreeBSD-Upgrade Mon Sep 8 18:11:20 2014 (r271281) @@ -19,8 +19,8 @@ Instructions for updating unvis(3) and v svn commit -m "Vendor import of NetBSD's (un)vis(3) at `date +%F`" dist svn cp -m "Tag `date +%F` import of NetBSD's (un)vis(3)" \ - $REPO/base/vendor/NetBSD/libc-vis/dist \ - $REPO/base/vendor/NetBSD/libc-vis/`date +%Y%m%d` + ^/vendor/NetBSD/libc-vis/dist \ + ^/vendor/NetBSD/libc-vis/`date +%Y%m%d` 4) Update the files in src/contrib/libc-pwcache: From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 18:43:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B5A84C4; Mon, 8 Sep 2014 18:43:34 +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 EABD0191B; Mon, 8 Sep 2014 18:43:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88IhXWO024885; Mon, 8 Sep 2014 18:43:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88IhXTn024884; Mon, 8 Sep 2014 18:43:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409081843.s88IhXTn024884@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 8 Sep 2014 18:43:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271282 - head/contrib/llvm/tools/clang/lib/CodeGen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 18:43:34 -0000 Author: emaste Date: Mon Sep 8 18:43:33 2014 New Revision: 271282 URL: http://svnweb.freebsd.org/changeset/base/271282 Log: Merge Clang debug info crash fix rev 200797: Debug info: fix a crasher when when emitting debug info for not-yet-completed templated types. getTypeSize() needs a complete type. rdar://problem/15931354 PR: 193347 MFC after: 3 days Sponsored by: DARPA, AFRL Modified: head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Modified: head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Mon Sep 8 18:11:20 2014 (r271281) +++ head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Mon Sep 8 18:43:33 2014 (r271282) @@ -2235,9 +2235,10 @@ llvm::DICompositeType CGDebugInfo::Creat if (T && (!T.isForwardDecl() || !RD->getDefinition())) return T; - // If this is just a forward declaration, construct an appropriately - // marked node and just return it. - if (!RD->getDefinition()) + // If this is just a forward or incomplete declaration, construct an + // appropriately marked node and just return it. + const RecordDecl *D = RD->getDefinition(); + if (!D || !D->isCompleteDefinition()) return getOrCreateRecordFwdDecl(Ty, RDContext); uint64_t Size = CGM.getContext().getTypeSize(Ty); From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 18:48:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D98F8799; Mon, 8 Sep 2014 18:48:54 +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 C491A1961; Mon, 8 Sep 2014 18:48:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88ImsQE025836; Mon, 8 Sep 2014 18:48:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88ImsDW025835; Mon, 8 Sep 2014 18:48:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409081848.s88ImsDW025835@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 8 Sep 2014 18:48:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271283 - head/contrib/llvm/patches X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 18:48:55 -0000 Author: emaste Date: Mon Sep 8 18:48:54 2014 New Revision: 271283 URL: http://svnweb.freebsd.org/changeset/base/271283 Log: Add clang patch for r271282 Note that r271282 contains only the src change from Clang rev 200797. This patch file includes two follow-on changes to the test case, which do not apply to the copy in the FreeBSD tree. Upstream Clang revisions: 200797: Debug info: fix a crasher when when emitting debug info for not-yet-completed templated types. getTypeSize() needs a complete type. rdar://problem/15931354 200798: Simplify testcase from r200797 some more. 200805: Further simplify r200797 and add an explanatory comment. PR: 193347 MFC after: 3 days Sponsored by: DARPA, AFRL Added: head/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff Added: head/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff Mon Sep 8 18:48:54 2014 (r271283) @@ -0,0 +1,51 @@ +diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp +index 59ba47c..dddc7e7 100644 +--- a/lib/CodeGen/CGDebugInfo.cpp ++++ b/lib/CodeGen/CGDebugInfo.cpp +@@ -2251,9 +2251,10 @@ llvm::DICompositeType CGDebugInfo::CreateLimitedType(const RecordType *Ty) { + if (T && (!T.isForwardDecl() || !RD->getDefinition())) + return T; + +- // If this is just a forward declaration, construct an appropriately +- // marked node and just return it. +- if (!RD->getDefinition()) ++ // If this is just a forward or incomplete declaration, construct an ++ // appropriately marked node and just return it. ++ const RecordDecl *D = RD->getDefinition(); ++ if (!D || !D->isCompleteDefinition()) + return getOrCreateRecordFwdDecl(Ty, RDContext); + + uint64_t Size = CGM.getContext().getTypeSize(Ty); +diff --git a/test/CodeGenCXX/debug-info-template-fwd.cpp b/test/CodeGenCXX/debug-info-template-fwd.cpp +new file mode 100644 +index 0000000..b2b7073 +--- /dev/null ++++ b/test/CodeGenCXX/debug-info-template-fwd.cpp +@@ -0,0 +1,27 @@ ++// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -g -emit-llvm -o - | FileCheck %s ++// This test is for a crash when emitting debug info for not-yet-completed ++// types. ++// Test that we don't actually emit a forward decl for the offending class: ++// CHECK: [ DW_TAG_structure_type ] [Derived] {{.*}} [def] ++// rdar://problem/15931354 ++template class Derived; ++ ++template class Base { ++ static Derived *create(); ++}; ++ ++template struct Derived : Base { ++}; ++ ++Base *f; ++ ++// During the instantiation of Derived, Base becomes required to be ++// complete - since the declaration has already been emitted (due to 'f', ++// above), we immediately try to build debug info for Base which then ++// requires the (incomplete definition) of Derived which is problematic. ++// ++// (if 'f' is not present, the point at which Base becomes required to be ++// complete during the instantiation of Derived is a no-op because ++// Base was never emitted so we ignore it and carry on until we ++// wire up the base class of Derived in the debug info later on) ++Derived d; From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 19:00:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4962E112; Mon, 8 Sep 2014 19:00: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 34EEB1AB2; Mon, 8 Sep 2014 19:00: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 s88J0Edo031448; Mon, 8 Sep 2014 19:00:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88J0E4w031447; Mon, 8 Sep 2014 19:00:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409081900.s88J0E4w031447@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 8 Sep 2014 19:00:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271284 - head/crypto/heimdal/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 19:00:14 -0000 Author: gjb Date: Mon Sep 8 19:00:13 2014 New Revision: 271284 URL: http://svnweb.freebsd.org/changeset/base/271284 Log: Include the gssapi_krb5 library in KRB5_LDFLAGS. PR: 156245 MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/crypto/heimdal/tools/krb5-config.in Modified: head/crypto/heimdal/tools/krb5-config.in ============================================================================== --- head/crypto/heimdal/tools/krb5-config.in Mon Sep 8 18:48:54 2014 (r271283) +++ head/crypto/heimdal/tools/krb5-config.in Mon Sep 8 19:00:13 2014 (r271284) @@ -123,7 +123,7 @@ if test "$do_libs" = "yes"; then lib_flags="-L${libdir}" case $library in gssapi) - lib_flags="$lib_flags -lgssapi -lheimntlm" + lib_flags="$lib_flags -lgssapi -lgssapi_krb5 -lheimntlm" ;; kadm-client) lib_flags="$lib_flags -lkadm5clnt" From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 19:19:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D091B65; Mon, 8 Sep 2014 19:19:11 +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 37EBD1D22; Mon, 8 Sep 2014 19:19:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88JJBpf041415; Mon, 8 Sep 2014 19:19:11 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88JJAxl041413; Mon, 8 Sep 2014 19:19:10 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409081919.s88JJAxl041413@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 8 Sep 2014 19:19:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271285 - in head/sys/boot: arm/uboot uboot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 19:19:11 -0000 Author: ian Date: Mon Sep 8 19:19:10 2014 New Revision: 271285 URL: http://svnweb.freebsd.org/changeset/base/271285 Log: Add a 'ubenv import' command to import environment variables from the u-boot env into the loader(8) env (which also gets them into the kernel env). You can import selected variables or the whole environment. Each u-boot var=value becomes uboot.var=value in the loader env. You can also use 'ubenv show' to display uboot vars without importing them. Modified: head/sys/boot/arm/uboot/help.uboot head/sys/boot/uboot/common/main.c Modified: head/sys/boot/arm/uboot/help.uboot ============================================================================== --- head/sys/boot/arm/uboot/help.uboot Mon Sep 8 19:00:13 2014 (r271284) +++ head/sys/boot/arm/uboot/help.uboot Mon Sep 8 19:19:10 2014 (r271285) @@ -1 +1,27 @@ $FreeBSD$ + +############################################################################### +# Tubenv DShow or import U-Boot environment variables + + ubenv [varname ...] + + Display U-Boot environment variables, or import them into the + loader environment (which makes them available in the kernel). + +############################################################################### +# Tubenv Simport DImport U-Boot env vars + + ubenv import [varname ...] + + If no variable names are specified, all U-Boot environment + variables are imported. Each variable is prefixed with "uboot." + to avoid any possible conflicts with loader or kernel variables. + +############################################################################### +# Tubenv Sshow DShow U-Boot env vars + + ubenv show [varname ...] + + If no variable names are specified, all U-Boot environment + variables are shown. + Modified: head/sys/boot/uboot/common/main.c ============================================================================== --- head/sys/boot/uboot/common/main.c Mon Sep 8 19:00:13 2014 (r271284) +++ head/sys/boot/uboot/common/main.c Mon Sep 8 19:19:10 2014 (r271285) @@ -556,6 +556,75 @@ command_sysinfo(int argc, char *argv[]) return (CMD_OK); } +enum ubenv_action { + UBENV_UNKNOWN, + UBENV_SHOW, + UBENV_IMPORT +}; + +static void +handle_uboot_env_var(enum ubenv_action action, const char * var) +{ + const char * val; + char ubv[128]; + + /* + * If the user prepended "uboot." (which is how they usually see these + * names) strip it off as a convenience. + */ + if (strncmp(var, "uboot.", 6) == 0) { + snprintf(ubv, sizeof(ubv), "%s", &var[6]); + var = ubv; + } + val = ub_env_get(var); + if (action == UBENV_SHOW) { + if (val == NULL) + printf("uboot.%s is not set\n", var); + else + printf("uboot.%s=%s\n", var, val); + } else if (action == UBENV_IMPORT) { + if (val != NULL) { + snprintf(ubv, sizeof(ubv), "uboot.%s", var); + setenv(ubv, val, 1); + } + } +} + +static int +command_ubenv(int argc, char *argv[]) +{ + enum ubenv_action action; + const char *var; + int i; + + action = UBENV_UNKNOWN; + if (argc > 1) { + if (strcasecmp(argv[1], "import") == 0) + action = UBENV_IMPORT; + else if (strcasecmp(argv[1], "show") == 0) + action = UBENV_SHOW; + } + if (action == UBENV_UNKNOWN) { + command_errmsg = "usage: 'ubenv [var ...]"; + return (CMD_ERROR); + } + + if (argc > 2) { + for (i = 2; i < argc; i++) + handle_uboot_env_var(action, argv[i]); + } else { + var = NULL; + for (;;) { + if ((var = ub_env_enum(var)) == NULL) + break; + handle_uboot_env_var(action, var); + } + } + + return (CMD_OK); +} +COMMAND_SET(ubenv, "ubenv", "show or import U-Boot env vars", command_ubenv); + #ifdef LOADER_FDT_SUPPORT /* * Since proper fdt command handling function is defined in fdt_loader_cmd.c, From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 19:24:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4EB2FFA3; Mon, 8 Sep 2014 19:24:26 +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 39CA81DF2; Mon, 8 Sep 2014 19:24:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88JOQNR045676; Mon, 8 Sep 2014 19:24:26 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88JOPCZ045674; Mon, 8 Sep 2014 19:24:25 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201409081924.s88JOPCZ045674@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Mon, 8 Sep 2014 19:24:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271286 - head/sys/dev/ixgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 19:24:26 -0000 Author: brueffer Date: Mon Sep 8 19:24:25 2014 New Revision: 271286 URL: http://svnweb.freebsd.org/changeset/base/271286 Log: Use the right constants in comparisons. This is currently a nop, as MIN_RXD == MIN_TXD and MAX_RXD == MAX_TXD. Reviewed by: Eric Joyner @ Intel MFC after: 1 week Modified: head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixv.c Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Mon Sep 8 19:19:10 2014 (r271285) +++ head/sys/dev/ixgbe/ixgbe.c Mon Sep 8 19:24:25 2014 (r271286) @@ -514,7 +514,7 @@ ixgbe_attach(device_t dev) } if (((ixgbe_rxd * sizeof(union ixgbe_adv_rx_desc)) % DBA_ALIGN) != 0 || - ixgbe_rxd < MIN_TXD || ixgbe_rxd > MAX_TXD) { + ixgbe_rxd < MIN_RXD || ixgbe_rxd > MAX_RXD) { device_printf(dev, "RXD config issue, using default!\n"); adapter->num_rx_desc = DEFAULT_RXD; } else Modified: head/sys/dev/ixgbe/ixv.c ============================================================================== --- head/sys/dev/ixgbe/ixv.c Mon Sep 8 19:19:10 2014 (r271285) +++ head/sys/dev/ixgbe/ixv.c Mon Sep 8 19:24:25 2014 (r271286) @@ -347,7 +347,7 @@ ixv_attach(device_t dev) adapter->num_tx_desc = ixv_txd; if (((ixv_rxd * sizeof(union ixgbe_adv_rx_desc)) % DBA_ALIGN) != 0 || - ixv_rxd < MIN_TXD || ixv_rxd > MAX_TXD) { + ixv_rxd < MIN_RXD || ixv_rxd > MAX_RXD) { device_printf(dev, "RXD config issue, using default!\n"); adapter->num_rx_desc = DEFAULT_RXD; } else From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 19:26:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7533627C; Mon, 8 Sep 2014 19:26:22 +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 56B231E14; Mon, 8 Sep 2014 19:26:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88JQMMR046093; Mon, 8 Sep 2014 19:26:22 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88JQM90046092; Mon, 8 Sep 2014 19:26:22 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201409081926.s88JQM90046092@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 8 Sep 2014 19:26:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271287 - head/contrib/libc-vis X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 19:26:22 -0000 Author: brooks Date: Mon Sep 8 19:26:21 2014 New Revision: 271287 URL: http://svnweb.freebsd.org/changeset/base/271287 Log: Merge from NetBSD: PR/49185: Conrad Meyer: strvisx: Handle zero-length input strings gracefully. (don't abuse 0 to mean compute string length internally) PR: 193447 Submitted by: Conrad Meyer MFC after: 1 month Modified: head/contrib/libc-vis/vis.c Directory Properties: head/contrib/libc-vis/ (props changed) Modified: head/contrib/libc-vis/vis.c ============================================================================== --- head/contrib/libc-vis/vis.c Mon Sep 8 19:24:25 2014 (r271286) +++ head/contrib/libc-vis/vis.c Mon Sep 8 19:26:21 2014 (r271287) @@ -1,4 +1,4 @@ -/* $NetBSD: vis.c,v 1.60 2013/02/21 16:21:20 joerg Exp $ */ +/* $NetBSD: vis.c,v 1.62 2014/09/08 17:35:01 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -57,7 +57,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: vis.c,v 1.60 2013/02/21 16:21:20 joerg Exp $"); +__RCSID("$NetBSD: vis.c,v 1.62 2014/09/08 17:35:01 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #ifdef __FBSDID __FBSDID("$FreeBSD$"); @@ -357,7 +357,7 @@ istrsenvisx(char *mbdst, size_t *dlen, c ssize_t mbslength, maxolen; _DIAGASSERT(mbdst != NULL); - _DIAGASSERT(mbsrc != NULL); + _DIAGASSERT(mbsrc != NULL || mblength == 0); _DIAGASSERT(mbextra != NULL); /* @@ -375,8 +375,6 @@ istrsenvisx(char *mbdst, size_t *dlen, c /* Allocate space for the wide char strings */ psrc = pdst = extra = NULL; - if (!mblength) - mblength = strlen(mbsrc); if ((psrc = calloc(mblength + 1, sizeof(*psrc))) == NULL) return -1; if ((pdst = calloc((4 * mblength) + 1, sizeof(*pdst))) == NULL) @@ -528,6 +526,15 @@ out: free(psrc); return error; } + +static int +istrsenvisxl(char *mbdst, size_t *dlen, const char *mbsrc, + int flags, const char *mbextra, int *cerr_ptr) +{ + return istrsenvisx(mbdst, dlen, mbsrc, + mbsrc != NULL ? strlen(mbsrc) : 0, flags, mbextra, cerr_ptr); +} + #endif #if !HAVE_SVIS @@ -571,13 +578,13 @@ snvis(char *mbdst, size_t dlen, int c, i int strsvis(char *mbdst, const char *mbsrc, int flags, const char *mbextra) { - return istrsenvisx(mbdst, NULL, mbsrc, 0, flags, mbextra, NULL); + return istrsenvisxl(mbdst, NULL, mbsrc, flags, mbextra, NULL); } int strsnvis(char *mbdst, size_t dlen, const char *mbsrc, int flags, const char *mbextra) { - return istrsenvisx(mbdst, &dlen, mbsrc, 0, flags, mbextra, NULL); + return istrsenvisxl(mbdst, &dlen, mbsrc, flags, mbextra, NULL); } int @@ -646,13 +653,13 @@ nvis(char *mbdst, size_t dlen, int c, in int strvis(char *mbdst, const char *mbsrc, int flags) { - return istrsenvisx(mbdst, NULL, mbsrc, 0, flags, "", NULL); + return istrsenvisxl(mbdst, NULL, mbsrc, flags, "", NULL); } int strnvis(char *mbdst, size_t dlen, const char *mbsrc, int flags) { - return istrsenvisx(mbdst, &dlen, mbsrc, 0, flags, "", NULL); + return istrsenvisxl(mbdst, &dlen, mbsrc, flags, "", NULL); } /* From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 19:40:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E324CB17; Mon, 8 Sep 2014 19:40:59 +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 CDE761014; Mon, 8 Sep 2014 19:40:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88JexYU052489; Mon, 8 Sep 2014 19:40:59 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88JexqS052487; Mon, 8 Sep 2014 19:40:59 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409081940.s88JexqS052487@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 8 Sep 2014 19:40: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: r271288 - in stable/10: sys/netinet6 usr.bin/netstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 19:41:00 -0000 Author: ae Date: Mon Sep 8 19:40:59 2014 New Revision: 271288 URL: http://svnweb.freebsd.org/changeset/base/271288 Log: MFC r270927: Add the reverse part to rule #9. Also change its description in the netstat(8) output. Approved by: re (gjb) Modified: stable/10/sys/netinet6/in6_src.c stable/10/usr.bin/netstat/inet6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/in6_src.c ============================================================================== --- stable/10/sys/netinet6/in6_src.c Mon Sep 8 19:26:21 2014 (r271287) +++ stable/10/sys/netinet6/in6_src.c Mon Sep 8 19:40:59 2014 (r271288) @@ -447,6 +447,8 @@ in6_selectsrc(struct sockaddr_in6 *dstso */ if (ifa_preferred(&ia_best->ia_ifa, &ia->ia_ifa)) REPLACE(9); + if (ifa_preferred(&ia->ia_ifa, &ia_best->ia_ifa)) + NEXT(9); /* * Rule 14: Use longest matching prefix. Modified: stable/10/usr.bin/netstat/inet6.c ============================================================================== --- stable/10/usr.bin/netstat/inet6.c Mon Sep 8 19:26:21 2014 (r271287) +++ stable/10/usr.bin/netstat/inet6.c Mon Sep 8 19:40:59 2014 (r271288) @@ -345,7 +345,7 @@ static const char *srcrule_str[] = { "matching label", "public/temporary address", "alive interface", - "preferred interface", + "better virtual status", "rule #10", "rule #11", "rule #12", From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 12:57:01 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B82EAFFE; Sun, 7 Sep 2014 12:57:01 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A33B1CC0; Sun, 7 Sep 2014 12:57:01 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.82 (FreeBSD)) (envelope-from ) id 1XQc1R-000Ixf-GC; Sun, 07 Sep 2014 16:56:49 +0400 Date: Sun, 7 Sep 2014 16:56:49 +0400 From: Slawa Olhovchenkov To: Andriy Gapon Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm Message-ID: <20140907125649.GA72244@zxy.spb.ru> References: <201408281950.s7SJo90I047213@svn.freebsd.org> <169C94ED141B435BACEADB04A4824717@multiplay.co.uk> <54072E20.10802@mail.lifanov.com> <2230377.GgKARkJyaG@ralph.baldwin.cx> <540778A2.3080809@mail.lifanov.com> <5407816B.9000401@FreeBSD.org> <86292055B4114529874B693EEB441CB6@multiplay.co.uk> <5409810E.1080705@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5409810E.1080705@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Mailman-Approved-At: Mon, 08 Sep 2014 20:39:07 +0000 Cc: src-committers@FreeBSD.org, John Baldwin , Peter Wemm , Alan Cox , svn-src-all@FreeBSD.org, Dmitry Morozovsky , "Matthew D. Fuller" , Steven Hartland , svn-src-head@FreeBSD.org, Nikolai Lifanov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 12:57:01 -0000 On Fri, Sep 05, 2014 at 12:23:26PM +0300, Andriy Gapon wrote: > on 04/09/2014 04:18 Steven Hartland said the following: > > Indeed that would be interesting, but we might find that its quite memory size > > dependent given the scaling so confirming HW details would be nice too. > > > > I'd also be interested to know who wins the free race between the VM and ARC > > when using that value. > > BTW, I've written a small silly program that tests for a problem that affected > me in the distant past: http://people.freebsd.org/~avg/arc-vs-swap.c > > It gobbles almost all of the memory and then just sits on it never accessing it > again. At the same time it repeatedly reads blocks of data from a large file. > The idea is that eventually the unused memory should be pushed out to the swap > and the ARC is allowed to grow to accommodate for the data being read. > > I run this program on a freshly booted system without any other applications. > Prior to r270759 the system behaves as expected. Although the pace of shifting > balance between the ARC and the swap-backed pages is quite slow. > After r270759 and with the default tuning the ARC always sits at its minimum > size. To me this is a regression. > > To summarize: I really appreciate the improvements that you are making here > https://reviews.freebsd.org/D702 > Thanks! > > P.S. > I wish there was an easy way to make the page cache and the ARC aware of each other. I think no single way for any workload. For some workloads ARC is prefered. For some -- RSS is prefered. May be need some tunable for elastics factor ARC/RSS? PS: very bad that 'data limit' don't anymore reflect application memory consumer. and very small application can adapt to 'no memory' from system. From owner-svn-src-all@FreeBSD.ORG Sun Sep 7 21:59:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D12CFECE; Sun, 7 Sep 2014 21:59:15 +0000 (UTC) Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAD8E11F0; Sun, 7 Sep 2014 21:59:15 +0000 (UTC) Received: by mail.lifanov.com (Postfix, from userid 58) id F2A8D1B327A; Sun, 7 Sep 2014 17:59:08 -0400 (EDT) Received: from app.lifanov.com (chat.lifanov.com [206.125.175.13]) by mail.lifanov.com (Postfix) with ESMTPA id 03B801B1A4F; Sun, 7 Sep 2014 17:59:05 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 07 Sep 2014 17:59:05 -0400 From: Nikolai Lifanov To: Steven Hartland Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm In-Reply-To: <86292055B4114529874B693EEB441CB6@multiplay.co.uk> References: <201408281950.s7SJo90I047213@svn.freebsd.org> <169C94ED141B435BACEADB04A4824717@multiplay.co.uk> <54072E20.10802@mail.lifanov.com> <2230377.GgKARkJyaG@ralph.baldwin.cx> <540778A2.3080809@mail.lifanov.com> <5407816B.9000401@FreeBSD.org> <86292055B4114529874B693EEB441CB6@multiplay.co.uk> Message-ID: <68e46bf0acca7eb6417cb847267f7bff@mail.lifanov.com> X-Sender: lifanov@mail.lifanov.com User-Agent: Roundcube Webmail/1.0.2 X-Mailman-Approved-At: Mon, 08 Sep 2014 20:39:19 +0000 Cc: src-committers@freebsd.org, Peter Wemm , John Baldwin , Alan Cox , svn-src-all@freebsd.org, Dmitry Morozovsky , Andriy Gapon , "Matthew D. Fuller" , svn-src-head@freebsd.org, owner-svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 21:59:16 -0000 On 2014-09-03 21:18, Steven Hartland wrote: > ----- Original Message ----- From: "Andriy Gapon" > > >> on 03/09/2014 23:22 Nikolai Lifanov said the following: >>> On 09/03/14 15:22, John Baldwin wrote: >>>> On Wednesday, September 03, 2014 11:05:04 AM Nikolai Lifanov wrote: >>>>> On 09/03/14 04:09, Steven Hartland wrote: >>>>>> I'm looking to MFC this change so wanted to check if >>>>>> anyone had an final feedback / objections? >>>>>> >>>>>> I know we currently have Alan's feedback on changing >>>>>> the #ifdef __i386__ to #ifndef UMA_MD_SMALL_ALLOC >>>>>> which sounds sensible but waiting Peter to comment on. >>>>>> >>>>>> Regards >>>>>> Steve >>>>> >>>>> I have no technical input, but this change improves ARC usefulness >>>>> for >>>>> me quite a bit. I would like to see the improvement in 10-STABLE. >>>> >>>> Can you verify that the current 10-STABLE (as of today) with all the >>>> various pagedaemon fixes still has ARC issues for your workload? >>>> >>> >>> It doesn't have any issues, but I noticed the improvement on CURRENT. >>> I >>> observed that just after this change, my package builder is much more >>> likely to retain MFU and not evict useful things from there (the port >>> tree) after large builds. >>> However, I run a lot more 10.0-RELEASE than CURRENT and I would like >>> to >>> see this improvement release-bound. >>> >>> I would be happy to test this on 10-STABLE if you think that this is >>> relevant. >> >> >> As noted before, unfortunately, this commit (plus its fixups) contains >> at least >> two related but distinct changes. So, to separate the wheat from the >> chaff, >> could you please try to comment out the following block in >> sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c, function >> arc_reclaim_needed: >> >> if (kmem_free_count() < zfs_arc_free_target) { >> DTRACE_PROBE2(arc__reclaim_freetarget, uint64_t, >> kmem_free_count(), uint64_t, zfs_arc_free_target); >> return (1); >> } >> >> Alternatively, I think that the same effect can be achieved by setting >> sysctl >> vfs.zfs.arc_free_target to the same value as vm.stats.vm.v_free_min. > > Thats correct that would achieve the same thing. > >> It's interesting to me whether you would still see the better >> performance or if >> that improvement would be undone. > > Indeed that would be interesting, but we might find that its quite > memory size > dependent given the scaling so confirming HW details would be nice too. > > I'd also be interested to know who wins the free race between the VM > and ARC > when using that value. > > For those following this thread but not the review, I've added some > additional > information there which you might be interested in: > https://reviews.freebsd.org/D702 > > Regards > Steve I had time to re-test both the "stock" condition after the improvements and the condition in which vfs.zfs.arc_free_target=vm.stats.vm.v_free_min. It seems that MFU is more likely to be reduced in the second case. - Nikolai Lifanov From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 17:09:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC788DB6; Mon, 8 Sep 2014 17:09:10 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFC141BDA; Mon, 8 Sep 2014 17:09:10 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id BF61EB97D; Mon, 8 Sep 2014 13:09:09 -0400 (EDT) From: John Baldwin To: Slawa Olhovchenkov Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm Date: Mon, 08 Sep 2014 11:17:51 -0400 Message-ID: <16592453.QchvydMH6M@ralph.baldwin.cx> User-Agent: KMail/4.10.5 (FreeBSD/10.0-STABLE; KDE/4.10.5; amd64; ; ) In-Reply-To: <20140907125649.GA72244@zxy.spb.ru> References: <201408281950.s7SJo90I047213@svn.freebsd.org> <5409810E.1080705@FreeBSD.org> <20140907125649.GA72244@zxy.spb.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 08 Sep 2014 13:09:09 -0400 (EDT) X-Mailman-Approved-At: Mon, 08 Sep 2014 20:39:27 +0000 Cc: src-committers@freebsd.org, Peter Wemm , Alan Cox , svn-src-all@freebsd.org, Dmitry Morozovsky , Andriy Gapon , Steven Hartland , "Matthew D. Fuller" , svn-src-head@freebsd.org, Nikolai Lifanov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 17:09:11 -0000 On Sunday, September 07, 2014 04:56:49 PM Slawa Olhovchenkov wrote: > PS: very bad that 'data limit' don't anymore reflect application > memory consumer. and very small application can adapt to 'no memory' > from system. You can use RLIMIT_AS instead of RLIMIT_DATA. jemalloc can also be configured to use sbrk(), though I think there's no way to prevent it from falling back to mmap(MAP_ANON) if sbrk() fails. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 21:10:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ADFB96E7; Mon, 8 Sep 2014 21:10:51 +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 994701D38; Mon, 8 Sep 2014 21:10:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88LApeE096923; Mon, 8 Sep 2014 21:10:51 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88LAppo096922; Mon, 8 Sep 2014 21:10:51 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409082110.s88LAppo096922@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 8 Sep 2014 21:10:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271289 - stable/10/sys/amd64/amd64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 21:10:51 -0000 Author: emaste Date: Mon Sep 8 21:10:51 2014 New Revision: 271289 URL: http://svnweb.freebsd.org/changeset/base/271289 Log: MFC r265014: Report boot method (BIOS/UEFI) via sysctl machdep.bootmethod Approved by: re Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/amd64/amd64/machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/machdep.c Mon Sep 8 19:40:59 2014 (r271288) +++ stable/10/sys/amd64/amd64/machdep.c Mon Sep 8 21:10:51 2014 (r271289) @@ -1519,6 +1519,10 @@ add_efi_map_entries(struct efi_map_heade } } +static char bootmethod[16] = ""; +SYSCTL_STRING(_machdep, OID_AUTO, bootmethod, CTLFLAG_RD, bootmethod, 0, + "System firmware boot method"); + /* * Populate the (physmap) array with base/bound pairs describing the * available physical memory in the system, then test this memory and @@ -1549,12 +1553,15 @@ getmemsize(caddr_t kmdp, u_int64_t first smapbase = (struct bios_smap *)preload_search_info(kmdp, MODINFO_METADATA | MODINFOMD_SMAP); - if (efihdr != NULL) + if (efihdr != NULL) { add_efi_map_entries(efihdr, physmap, &physmap_idx); - else if (smapbase != NULL) + strlcpy(bootmethod, "UEFI", sizeof(bootmethod)); + } else if (smapbase != NULL) { add_smap_entries(smapbase, physmap, &physmap_idx); - else + strlcpy(bootmethod, "BIOS", sizeof(bootmethod)); + } else { panic("No BIOS smap or EFI map info from loader!"); + } /* * Find the 'base memory' segment for SMP From owner-svn-src-all@FreeBSD.ORG Mon Sep 8 21:46:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3D6C77F; Mon, 8 Sep 2014 21:46:15 +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 75438116B; Mon, 8 Sep 2014 21:46:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88LkFUu006524; Mon, 8 Sep 2014 21:46:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88LkFjF006523; Mon, 8 Sep 2014 21:46:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409082146.s88LkFjF006523@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 8 Sep 2014 21:46:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r271290 - in stable/8/sys: fs/devfs sys X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 21:46:15 -0000 Author: jhb Date: Mon Sep 8 21:46:14 2014 New Revision: 271290 URL: http://svnweb.freebsd.org/changeset/base/271290 Log: MFC 226041: Export devfs inode number allocator for the kernel consumers. Modified: stable/8/sys/fs/devfs/devfs_devs.c stable/8/sys/sys/conf.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/fs/ (props changed) stable/8/sys/sys/ (props changed) Modified: stable/8/sys/fs/devfs/devfs_devs.c ============================================================================== --- stable/8/sys/fs/devfs/devfs_devs.c Mon Sep 8 21:10:51 2014 (r271289) +++ stable/8/sys/fs/devfs/devfs_devs.c Mon Sep 8 21:46:14 2014 (r271290) @@ -147,8 +147,7 @@ devfs_free(struct cdev *cdev) cdp = cdev2priv(cdev); if (cdev->si_cred != NULL) crfree(cdev->si_cred); - if (cdp->cdp_inode > 0) - free_unr(devfs_inos, cdp->cdp_inode); + devfs_free_cdp_inode(cdp->cdp_inode); if (cdp->cdp_maxdirent > 0) free(cdp->cdp_dirents, M_DEVFS2); free(cdp, M_CDEVP); @@ -304,7 +303,7 @@ devfs_delete(struct devfs_mount *dm, str mac_devfs_destroy(de); #endif if (de->de_inode > DEVFS_ROOTINO) { - free_unr(devfs_inos, de->de_inode); + devfs_free_cdp_inode(de->de_inode); de->de_inode = 0; } if (DEVFS_DE_DROP(de)) @@ -560,6 +559,21 @@ devfs_destroy(struct cdev *dev) devfs_generation++; } +ino_t +devfs_alloc_cdp_inode(void) +{ + + return (alloc_unr(devfs_inos)); +} + +void +devfs_free_cdp_inode(ino_t ino) +{ + + if (ino > 0) + free_unr(devfs_inos, ino); +} + static void devfs_devs_init(void *junk __unused) { Modified: stable/8/sys/sys/conf.h ============================================================================== --- stable/8/sys/sys/conf.h Mon Sep 8 21:10:51 2014 (r271289) +++ stable/8/sys/sys/conf.h Mon Sep 8 21:46:14 2014 (r271290) @@ -304,6 +304,9 @@ int devfs_set_cdevpriv(void *priv, cdevp void devfs_clear_cdevpriv(void); void devfs_fpdrop(struct file *fp); /* XXX This is not public KPI */ +ino_t devfs_alloc_cdp_inode(void); +void devfs_free_cdp_inode(ino_t ino); + #define UID_ROOT 0 #define UID_BIN 3 #define UID_UUCP 66 From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 00:19:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39485997; Tue, 9 Sep 2014 00:19:03 +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 0BB21AC4; Tue, 9 Sep 2014 00:19:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s890J2Jb096445; Tue, 9 Sep 2014 00:19:02 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s890J2E3096441; Tue, 9 Sep 2014 00:19:02 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201409090019.s890J2E3096441@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 9 Sep 2014 00:19:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271291 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 00:19:03 -0000 Author: adrian Date: Tue Sep 9 00:19:02 2014 New Revision: 271291 URL: http://svnweb.freebsd.org/changeset/base/271291 Log: Add a flag to ip_output() - IP_NODEFAULTFLOWID - which prevents it from overriding an existing flowid/flowtype field in the outbound mbuf with the inp_flowid/inp_flowtype details. The upcoming RSS UDP support calculates a valid RSS value for outbound mbufs and since it may change per send, it doesn't cache it in the inpcb. So overriding it here would be wrong. Differential Revision: https://reviews.freebsd.org/D527 Reviewed by: grehan Modified: head/sys/netinet/ip_output.c head/sys/netinet/ip_var.h Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Mon Sep 8 21:46:14 2014 (r271290) +++ head/sys/netinet/ip_output.c Tue Sep 9 00:19:02 2014 (r271291) @@ -145,7 +145,8 @@ ip_output(struct mbuf *m, struct mbuf *o if (inp != NULL) { INP_LOCK_ASSERT(inp); M_SETFIB(m, inp->inp_inc.inc_fibnum); - if (inp->inp_flags & (INP_HW_FLOWID|INP_SW_FLOWID)) { + if (((flags & IP_NODEFAULTFLOWID) == 0) && + inp->inp_flags & (INP_HW_FLOWID|INP_SW_FLOWID)) { m->m_pkthdr.flowid = inp->inp_flowid; M_HASHTYPE_SET(m, inp->inp_flowtype); m->m_flags |= M_FLOWID; Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Mon Sep 8 21:46:14 2014 (r271290) +++ head/sys/netinet/ip_var.h Tue Sep 9 00:19:02 2014 (r271291) @@ -161,6 +161,7 @@ void kmod_ipstat_dec(int statnum); #define IP_SENDTOIF 0x8 /* send on specific ifnet */ #define IP_ROUTETOIF SO_DONTROUTE /* 0x10 bypass routing tables */ #define IP_ALLOWBROADCAST SO_BROADCAST /* 0x20 can send broadcast packets */ +#define IP_NODEFAULTFLOWID 0x40 /* Don't set the flowid from inp */ #ifdef __NO_STRICT_ALIGNMENT #define IP_HDR_ALIGNED_P(ip) 1 From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 00:21:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 932F6AF3; Tue, 9 Sep 2014 00:21: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 7E53AADD; Tue, 9 Sep 2014 00:21: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 s890LLdp099094; Tue, 9 Sep 2014 00:21:21 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s890LLit099068; Tue, 9 Sep 2014 00:21:21 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201409090021.s890LLit099068@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 9 Sep 2014 00:21:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271292 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 00:21:21 -0000 Author: adrian Date: Tue Sep 9 00:21:21 2014 New Revision: 271292 URL: http://svnweb.freebsd.org/changeset/base/271292 Log: Add IP_NODEFAULTFLOWID awareness to ip6_output(). Differential Revision: https://reviews.freebsd.org/D527 Modified: head/sys/netinet6/ip6_output.c Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Tue Sep 9 00:19:02 2014 (r271291) +++ head/sys/netinet6/ip6_output.c Tue Sep 9 00:21:21 2014 (r271292) @@ -227,6 +227,9 @@ in6_delayed_cksum(struct mbuf *m, uint32 * * ifpp - XXX: just for statistics */ +/* + * XXX TODO: no flowid is assigned for outbound flows? + */ int ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct route_in6 *ro, int flags, struct ip6_moptions *im6o, @@ -260,8 +263,14 @@ ip6_output(struct mbuf *m0, struct ip6_p goto bad; } - if (inp != NULL) + if (inp != NULL) { M_SETFIB(m, inp->inp_inc.inc_fibnum); + if (((flags & IP_NODEFAULTFLOWID) == 0) && + (inp->inp_flags & (INP_HW_FLOWID|INP_SW_FLOWID))) { + m->m_pkthdr.flowid = inp->inp_flowid; + m->m_flags |= M_FLOWID; + } + } finaldst = ip6->ip6_dst; bzero(&exthdrs, sizeof(exthdrs)); From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 01:45:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E96B44ED; Tue, 9 Sep 2014 01:45:40 +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 D3BD0165E; Tue, 9 Sep 2014 01:45:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s891jeEH037951; Tue, 9 Sep 2014 01:45:40 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s891jd1d037943; Tue, 9 Sep 2014 01:45:39 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201409090145.s891jd1d037943@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 9 Sep 2014 01:45:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271293 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 01:45:41 -0000 Author: adrian Date: Tue Sep 9 01:45:39 2014 New Revision: 271293 URL: http://svnweb.freebsd.org/changeset/base/271293 Log: Add support for receiving and setting flowtype, flowid and RSS bucket information as part of recvmsg(). This is primarily used for debugging/verification of the various processing paths in the IP, PCB and driver layers. Unfortunately the current implementation of the control message path results in a ~10% or so drop in UDP frame throughput when it's used. Differential Revision: https://reviews.freebsd.org/D527 Reviewed by: grehan Modified: head/sys/netinet/in.h head/sys/netinet/in_pcb.h head/sys/netinet/ip_input.c head/sys/netinet/ip_output.c head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/in.h ============================================================================== --- head/sys/netinet/in.h Tue Sep 9 00:21:21 2014 (r271292) +++ head/sys/netinet/in.h Tue Sep 9 01:45:39 2014 (r271293) @@ -492,6 +492,8 @@ __END_DECLS #define IP_FLOWID 90 /* get flow id for the given socket/inp */ #define IP_FLOWTYPE 91 /* get flow type (M_HASHTYPE) */ #define IP_RSSBUCKETID 92 /* get RSS flowid -> bucket mapping */ +#define IP_RECVFLOWID 93 /* bool; receive IP flowid/flowtype w/ datagram */ +#define IP_RECVRSSBUCKETID 94 /* bool; receive IP RSS bucket id w/ datagram */ /* * Defaults and limits for options Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Tue Sep 9 00:21:21 2014 (r271292) +++ head/sys/netinet/in_pcb.h Tue Sep 9 01:45:39 2014 (r271293) @@ -549,6 +549,8 @@ short inp_so_options(const struct inpcb #define INP_REUSEADDR 0x00000020 /* SO_REUSEADDR option is set */ #define INP_BINDMULTI 0x00000040 /* IP_BINDMULTI option is set */ #define INP_RSS_BUCKET_SET 0x00000080 /* IP_RSS_LISTEN_BUCKET is set */ +#define INP_RECVFLOWID 0x00000100 /* populate recv datagram with flow info */ +#define INP_RECVRSSBUCKETID 0x00000200 /* populate recv datagram with bucket id */ /* * Flags passed to in_pcblookup*() functions. Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Tue Sep 9 00:21:21 2014 (r271292) +++ head/sys/netinet/ip_input.c Tue Sep 9 01:45:39 2014 (r271293) @@ -1662,6 +1662,43 @@ makedummy: if (*mp) mp = &(*mp)->m_next; } + + if (inp->inp_flags2 & INP_RECVFLOWID) { + uint32_t flowid, flow_type; + + flowid = m->m_pkthdr.flowid; + flow_type = M_HASHTYPE_GET(m); + + /* + * XXX should handle the failure of one or the + * other - don't populate both? + */ + *mp = sbcreatecontrol((caddr_t) &flowid, + sizeof(uint32_t), IP_FLOWID, IPPROTO_IP); + if (*mp) + mp = &(*mp)->m_next; + *mp = sbcreatecontrol((caddr_t) &flow_type, + sizeof(uint32_t), IP_FLOWTYPE, IPPROTO_IP); + if (*mp) + mp = &(*mp)->m_next; + } + +#ifdef RSS + if (inp->inp_flags2 & INP_RECVRSSBUCKETID) { + uint32_t flowid, flow_type; + uint32_t rss_bucketid; + + flowid = m->m_pkthdr.flowid; + flow_type = M_HASHTYPE_GET(m); + + if (rss_hash2bucket(flowid, flow_type, &rss_bucketid) == 0) { + *mp = sbcreatecontrol((caddr_t) &rss_bucketid, + sizeof(uint32_t), IP_RSSBUCKETID, IPPROTO_IP); + if (*mp) + mp = &(*mp)->m_next; + } + } +#endif } /* Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Tue Sep 9 00:21:21 2014 (r271292) +++ head/sys/netinet/ip_output.c Tue Sep 9 01:45:39 2014 (r271293) @@ -1016,6 +1016,10 @@ ip_ctloutput(struct socket *so, struct s case IP_ONESBCAST: case IP_DONTFRAG: case IP_RECVTOS: + case IP_RECVFLOWID: +#ifdef RSS + case IP_RECVRSSBUCKETID: +#endif error = sooptcopyin(sopt, &optval, sizeof optval, sizeof optval); if (error) @@ -1094,6 +1098,9 @@ ip_ctloutput(struct socket *so, struct s case IP_BINDMULTI: OPTSET2(INP_BINDMULTI, optval); break; + case IP_RECVFLOWID: + OPTSET2(INP_RECVFLOWID, optval); + break; #ifdef RSS case IP_RSS_LISTEN_BUCKET: if ((optval >= 0) && @@ -1104,6 +1111,9 @@ ip_ctloutput(struct socket *so, struct s error = EINVAL; } break; + case IP_RECVRSSBUCKETID: + OPTSET2(INP_RECVRSSBUCKETID, optval); + break; #endif } break; @@ -1219,8 +1229,10 @@ ip_ctloutput(struct socket *so, struct s case IP_BINDMULTI: case IP_FLOWID: case IP_FLOWTYPE: + case IP_RECVFLOWID: #ifdef RSS case IP_RSSBUCKETID: + case IP_RECVRSSBUCKETID: #endif switch (sopt->sopt_name) { @@ -1290,6 +1302,9 @@ ip_ctloutput(struct socket *so, struct s case IP_FLOWTYPE: optval = inp->inp_flowtype; break; + case IP_RECVFLOWID: + optval = OPTBIT2(INP_RECVFLOWID); + break; #ifdef RSS case IP_RSSBUCKETID: retval = rss_hash2bucket(inp->inp_flowid, @@ -1300,6 +1315,9 @@ ip_ctloutput(struct socket *so, struct s else error = EINVAL; break; + case IP_RECVRSSBUCKETID: + optval = OPTBIT2(INP_RECVRSSBUCKETID); + break; #endif case IP_BINDMULTI: optval = OPTBIT2(INP_BINDMULTI); Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Tue Sep 9 00:21:21 2014 (r271292) +++ head/sys/netinet/udp_usrreq.c Tue Sep 9 01:45:39 2014 (r271293) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipsec.h" +#include "opt_rss.h" #include #include @@ -1084,6 +1085,9 @@ udp_output(struct inpcb *inp, struct mbu u_char tos; uint8_t pr; uint16_t cscov = 0; + uint32_t flowid = 0; + int flowid_type = 0; + int use_flowid = 0; /* * udp_output() may need to temporarily bind or connect the current @@ -1147,6 +1151,32 @@ udp_output(struct inpcb *inp, struct mbu tos = *(u_char *)CMSG_DATA(cm); break; + case IP_FLOWID: + if (cm->cmsg_len != CMSG_LEN(sizeof(uint32_t))) { + error = EINVAL; + break; + } + flowid = *(uint32_t *) CMSG_DATA(cm); + break; + + case IP_FLOWTYPE: + if (cm->cmsg_len != CMSG_LEN(sizeof(uint32_t))) { + error = EINVAL; + break; + } + flowid_type = *(uint32_t *) CMSG_DATA(cm); + use_flowid = 1; + break; + +#ifdef RSS + case IP_RSSBUCKETID: + if (cm->cmsg_len != CMSG_LEN(sizeof(uint32_t))) { + error = EINVAL; + break; + } + /* This is just a placeholder for now */ + break; +#endif /* RSS */ default: error = ENOPROTOOPT; break; @@ -1395,6 +1425,22 @@ udp_output(struct inpcb *inp, struct mbu ((struct ip *)ui)->ip_tos = tos; /* XXX */ UDPSTAT_INC(udps_opackets); + /* + * Setup flowid / RSS information for outbound socket. + * + * Once the UDP code decides to set a flowid some other way, + * this allows the flowid to be overridden by userland. + */ + if (use_flowid) { + m->m_flags |= M_FLOWID; + m->m_pkthdr.flowid = flowid; + M_HASHTYPE_SET(m, flowid_type); + } + +#ifdef RSS + ipflags |= IP_NODEFAULTFLOWID; +#endif /* RSS */ + if (unlock_udbinfo == UH_WLOCKED) INP_HASH_WUNLOCK(pcbinfo); else if (unlock_udbinfo == UH_RLOCKED) From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 02:50:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 18D891F3; Tue, 9 Sep 2014 02:50:11 +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 F407F1BC0; Tue, 9 Sep 2014 02:50:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s892oA8Y066896; Tue, 9 Sep 2014 02:50:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s892oAbA066101; Tue, 9 Sep 2014 02:50:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409090250.s892oAbA066101@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 9 Sep 2014 02:50:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r271294 - in vendor/pjdfstest: . dist dist/tests dist/tests/chflags dist/tests/chmod dist/tests/chown dist/tests/ftruncate dist/tests/granular dist/tests/link dist/tests/mkdir dist/test... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 02:50:11 -0000 Author: ngie Date: Tue Sep 9 02:50:09 2014 New Revision: 271294 URL: http://svnweb.freebsd.org/changeset/base/271294 Log: Add vendor import for pjdfstest This vendor import code was obtained from https://github.com/pjd/pjdfstest/commit/abf03c3a47745d4521b0e4aa141317553ca48f91 Approved by: rpaulo (mentor) Phabric: D743 Sponsored by: EMC / Isilon Storage Division Added: vendor/pjdfstest/ vendor/pjdfstest/dist/ vendor/pjdfstest/dist/LICENSE vendor/pjdfstest/dist/Makefile (contents, props changed) vendor/pjdfstest/dist/README vendor/pjdfstest/dist/pjdfstest.c (contents, props changed) vendor/pjdfstest/dist/tests/ vendor/pjdfstest/dist/tests/chflags/ vendor/pjdfstest/dist/tests/chflags/00.t vendor/pjdfstest/dist/tests/chflags/01.t vendor/pjdfstest/dist/tests/chflags/02.t vendor/pjdfstest/dist/tests/chflags/03.t vendor/pjdfstest/dist/tests/chflags/04.t vendor/pjdfstest/dist/tests/chflags/05.t vendor/pjdfstest/dist/tests/chflags/06.t vendor/pjdfstest/dist/tests/chflags/07.t vendor/pjdfstest/dist/tests/chflags/08.t vendor/pjdfstest/dist/tests/chflags/09.t vendor/pjdfstest/dist/tests/chflags/10.t vendor/pjdfstest/dist/tests/chflags/11.t vendor/pjdfstest/dist/tests/chflags/12.t vendor/pjdfstest/dist/tests/chflags/13.t vendor/pjdfstest/dist/tests/chmod/ vendor/pjdfstest/dist/tests/chmod/00.t vendor/pjdfstest/dist/tests/chmod/01.t vendor/pjdfstest/dist/tests/chmod/02.t vendor/pjdfstest/dist/tests/chmod/03.t vendor/pjdfstest/dist/tests/chmod/04.t vendor/pjdfstest/dist/tests/chmod/05.t vendor/pjdfstest/dist/tests/chmod/06.t vendor/pjdfstest/dist/tests/chmod/07.t vendor/pjdfstest/dist/tests/chmod/08.t vendor/pjdfstest/dist/tests/chmod/09.t vendor/pjdfstest/dist/tests/chmod/10.t vendor/pjdfstest/dist/tests/chmod/11.t vendor/pjdfstest/dist/tests/chmod/12.t vendor/pjdfstest/dist/tests/chmod/foo (contents, props changed) vendor/pjdfstest/dist/tests/chown/ vendor/pjdfstest/dist/tests/chown/00.t vendor/pjdfstest/dist/tests/chown/01.t vendor/pjdfstest/dist/tests/chown/02.t vendor/pjdfstest/dist/tests/chown/03.t vendor/pjdfstest/dist/tests/chown/04.t vendor/pjdfstest/dist/tests/chown/05.t vendor/pjdfstest/dist/tests/chown/06.t vendor/pjdfstest/dist/tests/chown/07.t vendor/pjdfstest/dist/tests/chown/08.t vendor/pjdfstest/dist/tests/chown/09.t vendor/pjdfstest/dist/tests/chown/10.t vendor/pjdfstest/dist/tests/conf vendor/pjdfstest/dist/tests/ftruncate/ vendor/pjdfstest/dist/tests/ftruncate/00.t vendor/pjdfstest/dist/tests/ftruncate/01.t vendor/pjdfstest/dist/tests/ftruncate/02.t vendor/pjdfstest/dist/tests/ftruncate/03.t vendor/pjdfstest/dist/tests/ftruncate/04.t vendor/pjdfstest/dist/tests/ftruncate/05.t vendor/pjdfstest/dist/tests/ftruncate/06.t vendor/pjdfstest/dist/tests/ftruncate/07.t vendor/pjdfstest/dist/tests/ftruncate/08.t vendor/pjdfstest/dist/tests/ftruncate/09.t vendor/pjdfstest/dist/tests/ftruncate/10.t vendor/pjdfstest/dist/tests/ftruncate/11.t vendor/pjdfstest/dist/tests/ftruncate/12.t vendor/pjdfstest/dist/tests/ftruncate/13.t vendor/pjdfstest/dist/tests/ftruncate/14.t vendor/pjdfstest/dist/tests/granular/ vendor/pjdfstest/dist/tests/granular/00.t vendor/pjdfstest/dist/tests/granular/01.t vendor/pjdfstest/dist/tests/granular/02.t vendor/pjdfstest/dist/tests/granular/03.t vendor/pjdfstest/dist/tests/granular/04.t vendor/pjdfstest/dist/tests/granular/05.t vendor/pjdfstest/dist/tests/link/ vendor/pjdfstest/dist/tests/link/00.t vendor/pjdfstest/dist/tests/link/01.t vendor/pjdfstest/dist/tests/link/02.t vendor/pjdfstest/dist/tests/link/03.t vendor/pjdfstest/dist/tests/link/04.t vendor/pjdfstest/dist/tests/link/05.t vendor/pjdfstest/dist/tests/link/06.t vendor/pjdfstest/dist/tests/link/07.t vendor/pjdfstest/dist/tests/link/08.t vendor/pjdfstest/dist/tests/link/09.t vendor/pjdfstest/dist/tests/link/10.t vendor/pjdfstest/dist/tests/link/11.t vendor/pjdfstest/dist/tests/link/12.t vendor/pjdfstest/dist/tests/link/13.t vendor/pjdfstest/dist/tests/link/14.t vendor/pjdfstest/dist/tests/link/15.t vendor/pjdfstest/dist/tests/link/16.t vendor/pjdfstest/dist/tests/link/17.t vendor/pjdfstest/dist/tests/misc.sh (contents, props changed) vendor/pjdfstest/dist/tests/mkdir/ vendor/pjdfstest/dist/tests/mkdir/00.t vendor/pjdfstest/dist/tests/mkdir/01.t vendor/pjdfstest/dist/tests/mkdir/02.t vendor/pjdfstest/dist/tests/mkdir/03.t vendor/pjdfstest/dist/tests/mkdir/04.t vendor/pjdfstest/dist/tests/mkdir/05.t vendor/pjdfstest/dist/tests/mkdir/06.t vendor/pjdfstest/dist/tests/mkdir/07.t vendor/pjdfstest/dist/tests/mkdir/08.t vendor/pjdfstest/dist/tests/mkdir/09.t vendor/pjdfstest/dist/tests/mkdir/10.t vendor/pjdfstest/dist/tests/mkdir/11.t vendor/pjdfstest/dist/tests/mkdir/12.t vendor/pjdfstest/dist/tests/mkfifo/ vendor/pjdfstest/dist/tests/mkfifo/00.t vendor/pjdfstest/dist/tests/mkfifo/01.t vendor/pjdfstest/dist/tests/mkfifo/02.t vendor/pjdfstest/dist/tests/mkfifo/03.t vendor/pjdfstest/dist/tests/mkfifo/04.t vendor/pjdfstest/dist/tests/mkfifo/05.t vendor/pjdfstest/dist/tests/mkfifo/06.t vendor/pjdfstest/dist/tests/mkfifo/07.t vendor/pjdfstest/dist/tests/mkfifo/08.t vendor/pjdfstest/dist/tests/mkfifo/09.t vendor/pjdfstest/dist/tests/mkfifo/10.t vendor/pjdfstest/dist/tests/mkfifo/11.t vendor/pjdfstest/dist/tests/mkfifo/12.t vendor/pjdfstest/dist/tests/mknod/ vendor/pjdfstest/dist/tests/mknod/00.t vendor/pjdfstest/dist/tests/mknod/01.t vendor/pjdfstest/dist/tests/mknod/02.t vendor/pjdfstest/dist/tests/mknod/03.t vendor/pjdfstest/dist/tests/mknod/04.t vendor/pjdfstest/dist/tests/mknod/05.t vendor/pjdfstest/dist/tests/mknod/06.t vendor/pjdfstest/dist/tests/mknod/07.t vendor/pjdfstest/dist/tests/mknod/08.t vendor/pjdfstest/dist/tests/mknod/09.t vendor/pjdfstest/dist/tests/mknod/10.t vendor/pjdfstest/dist/tests/mknod/11.t vendor/pjdfstest/dist/tests/open/ vendor/pjdfstest/dist/tests/open/00.t vendor/pjdfstest/dist/tests/open/01.t vendor/pjdfstest/dist/tests/open/02.t vendor/pjdfstest/dist/tests/open/03.t vendor/pjdfstest/dist/tests/open/04.t vendor/pjdfstest/dist/tests/open/05.t vendor/pjdfstest/dist/tests/open/06.t vendor/pjdfstest/dist/tests/open/07.t vendor/pjdfstest/dist/tests/open/08.t vendor/pjdfstest/dist/tests/open/09.t vendor/pjdfstest/dist/tests/open/10.t vendor/pjdfstest/dist/tests/open/11.t vendor/pjdfstest/dist/tests/open/12.t vendor/pjdfstest/dist/tests/open/13.t vendor/pjdfstest/dist/tests/open/14.t vendor/pjdfstest/dist/tests/open/15.t vendor/pjdfstest/dist/tests/open/16.t vendor/pjdfstest/dist/tests/open/17.t vendor/pjdfstest/dist/tests/open/18.t vendor/pjdfstest/dist/tests/open/19.t vendor/pjdfstest/dist/tests/open/20.t vendor/pjdfstest/dist/tests/open/21.t vendor/pjdfstest/dist/tests/open/22.t vendor/pjdfstest/dist/tests/open/23.t vendor/pjdfstest/dist/tests/open/24.t vendor/pjdfstest/dist/tests/rename/ vendor/pjdfstest/dist/tests/rename/00.t vendor/pjdfstest/dist/tests/rename/01.t vendor/pjdfstest/dist/tests/rename/02.t vendor/pjdfstest/dist/tests/rename/03.t vendor/pjdfstest/dist/tests/rename/04.t vendor/pjdfstest/dist/tests/rename/05.t vendor/pjdfstest/dist/tests/rename/06.t vendor/pjdfstest/dist/tests/rename/07.t vendor/pjdfstest/dist/tests/rename/08.t vendor/pjdfstest/dist/tests/rename/09.t vendor/pjdfstest/dist/tests/rename/10.t vendor/pjdfstest/dist/tests/rename/11.t vendor/pjdfstest/dist/tests/rename/12.t vendor/pjdfstest/dist/tests/rename/13.t vendor/pjdfstest/dist/tests/rename/14.t vendor/pjdfstest/dist/tests/rename/15.t vendor/pjdfstest/dist/tests/rename/16.t vendor/pjdfstest/dist/tests/rename/17.t vendor/pjdfstest/dist/tests/rename/18.t vendor/pjdfstest/dist/tests/rename/19.t vendor/pjdfstest/dist/tests/rename/20.t vendor/pjdfstest/dist/tests/rename/21.t vendor/pjdfstest/dist/tests/rmdir/ vendor/pjdfstest/dist/tests/rmdir/00.t vendor/pjdfstest/dist/tests/rmdir/01.t vendor/pjdfstest/dist/tests/rmdir/02.t vendor/pjdfstest/dist/tests/rmdir/03.t vendor/pjdfstest/dist/tests/rmdir/04.t vendor/pjdfstest/dist/tests/rmdir/05.t vendor/pjdfstest/dist/tests/rmdir/06.t vendor/pjdfstest/dist/tests/rmdir/07.t vendor/pjdfstest/dist/tests/rmdir/08.t vendor/pjdfstest/dist/tests/rmdir/09.t vendor/pjdfstest/dist/tests/rmdir/10.t vendor/pjdfstest/dist/tests/rmdir/11.t vendor/pjdfstest/dist/tests/rmdir/12.t vendor/pjdfstest/dist/tests/rmdir/13.t vendor/pjdfstest/dist/tests/rmdir/14.t vendor/pjdfstest/dist/tests/rmdir/15.t vendor/pjdfstest/dist/tests/symlink/ vendor/pjdfstest/dist/tests/symlink/00.t vendor/pjdfstest/dist/tests/symlink/01.t vendor/pjdfstest/dist/tests/symlink/02.t vendor/pjdfstest/dist/tests/symlink/03.t vendor/pjdfstest/dist/tests/symlink/04.t vendor/pjdfstest/dist/tests/symlink/05.t vendor/pjdfstest/dist/tests/symlink/06.t vendor/pjdfstest/dist/tests/symlink/07.t vendor/pjdfstest/dist/tests/symlink/08.t vendor/pjdfstest/dist/tests/symlink/09.t vendor/pjdfstest/dist/tests/symlink/10.t vendor/pjdfstest/dist/tests/symlink/11.t vendor/pjdfstest/dist/tests/symlink/12.t vendor/pjdfstest/dist/tests/truncate/ vendor/pjdfstest/dist/tests/truncate/00.t vendor/pjdfstest/dist/tests/truncate/01.t vendor/pjdfstest/dist/tests/truncate/02.t vendor/pjdfstest/dist/tests/truncate/03.t vendor/pjdfstest/dist/tests/truncate/04.t vendor/pjdfstest/dist/tests/truncate/05.t vendor/pjdfstest/dist/tests/truncate/06.t vendor/pjdfstest/dist/tests/truncate/07.t vendor/pjdfstest/dist/tests/truncate/08.t vendor/pjdfstest/dist/tests/truncate/09.t vendor/pjdfstest/dist/tests/truncate/10.t vendor/pjdfstest/dist/tests/truncate/11.t vendor/pjdfstest/dist/tests/truncate/12.t vendor/pjdfstest/dist/tests/truncate/13.t vendor/pjdfstest/dist/tests/truncate/14.t vendor/pjdfstest/dist/tests/unlink/ vendor/pjdfstest/dist/tests/unlink/00.t vendor/pjdfstest/dist/tests/unlink/01.t vendor/pjdfstest/dist/tests/unlink/02.t vendor/pjdfstest/dist/tests/unlink/03.t vendor/pjdfstest/dist/tests/unlink/04.t vendor/pjdfstest/dist/tests/unlink/05.t vendor/pjdfstest/dist/tests/unlink/06.t vendor/pjdfstest/dist/tests/unlink/07.t vendor/pjdfstest/dist/tests/unlink/08.t vendor/pjdfstest/dist/tests/unlink/09.t vendor/pjdfstest/dist/tests/unlink/10.t vendor/pjdfstest/dist/tests/unlink/11.t vendor/pjdfstest/dist/tests/unlink/12.t vendor/pjdfstest/dist/tests/unlink/13.t Added: vendor/pjdfstest/dist/LICENSE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/pjdfstest/dist/LICENSE Tue Sep 9 02:50:09 2014 (r271294) @@ -0,0 +1,27 @@ +$FreeBSD: head/tools/regression/pjdfstest/LICENSE 211354 2010-08-15 21:29:03Z pjd $ + +License for all regression tests available with pjdfstest: + +Copyright (c) 2006-2012 Pawel Jakub Dawidek +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. Added: vendor/pjdfstest/dist/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/pjdfstest/dist/Makefile Tue Sep 9 02:50:09 2014 (r271294) @@ -0,0 +1,26 @@ +# $FreeBSD$ + +PROG= pjdfstest + +${PROG}: ${PROG}.c + @OSTYPE=`uname`; \ + CFLAGS=-D__OS_$${OSTYPE}__; \ + if [ $$OSTYPE = "FreeBSD" ]; then \ + CFLAGS="$$CFLAGS -DHAS_LCHMOD -DHAS_CHFLAGS -DHAS_FCHFLAGS -DHAS_CHFLAGSAT -DHAS_LCHFLAGS -DHAS_FREEBSD_ACL -DHAS_BINDAT -DHAS_CONNECTAT -DHAS_LPATHCONF"; \ + elif [ $$OSTYPE = "SunOS" ]; then \ + CFLAGS="$$CFLAGS -DHAS_TRUNCATE64 -DHAS_STAT64"; \ + CFLAGS="$$CFLAGS -lsocket"; \ + elif [ $$OSTYPE = "Darwin" ]; then \ + CFLAGS="$$CFLAGS -DHAS_LCHMOD -DHAS_CHFLAGS -DHAS_LCHFLAGS"; \ + elif [ $$OSTYPE == "Linux" ]; then \ + CFLAGS="$$CFLAGS -D_GNU_SOURCE"; \ + else \ + echo "Unsupported operating system: ${OSTYPE}."; \ + exit 1; \ + fi; \ + cmd="gcc -Wall $$CFLAGS ${PROG}.c -o ${PROG}"; \ + echo $$cmd; \ + $$cmd + +clean: + rm -f ${PROG} Added: vendor/pjdfstest/dist/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/pjdfstest/dist/README Tue Sep 9 02:50:09 2014 (r271294) @@ -0,0 +1,22 @@ +$FreeBSD: head/tools/regression/pjdfstest/README 211354 2010-08-15 21:29:03Z pjd $ + +Few notes on how to use pjdfstest in short steps: + + # cd pjdfstest + # vi tests/conf + Change 'fs' to file system type you want to test (UFS or ZFS). + # vi Makefile + You need to manually tweak few things by editing CFLAGS lines + at the top of the file. + # make + It will compile pjdfstest utility which is used by regression tests. + # cd /path/to/file/system/you/want/to/test/ + # prove -r /path/to/pjdfstest/tests + +That's all. Enjoy. + +Currently supported operating systems: FreeBSD, Solaris. +Currently supported file system types: UFS, ZFS. + +-- +Pawel Jakub Dawidek Added: vendor/pjdfstest/dist/pjdfstest.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/pjdfstest/dist/pjdfstest.c Tue Sep 9 02:50:09 2014 (r271294) @@ -0,0 +1,1493 @@ +/*- + * Copyright (c) 2006-2010 Pawel Jakub Dawidek + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#ifndef makedev +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef HAS_TRUNCATE64 +#define truncate64 truncate +#define ftruncate64 ftruncate +#endif +#ifndef HAS_STAT64 +#define stat64 stat +#define fstat64 fstat +#define lstat64 lstat +#endif +#ifdef HAS_FREEBSD_ACL +#include +#endif + +#ifndef ALLPERMS +#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) +#endif + +enum action { + ACTION_OPEN, + ACTION_OPENAT, + ACTION_CREATE, + ACTION_UNLINK, + ACTION_UNLINKAT, + ACTION_MKDIR, + ACTION_MKDIRAT, + ACTION_RMDIR, + ACTION_LINK, + ACTION_LINKAT, + ACTION_SYMLINK, + ACTION_SYMLINKAT, + ACTION_RENAME, + ACTION_RENAMEAT, + ACTION_MKFIFO, + ACTION_MKFIFOAT, + ACTION_MKNOD, + ACTION_MKNODAT, + ACTION_BIND, +#ifdef HAS_BINDAT + ACTION_BINDAT, +#endif + ACTION_CONNECT, +#ifdef HAS_CONNECTAT + ACTION_CONNECTAT, +#endif + ACTION_CHMOD, + ACTION_FCHMOD, +#ifdef HAS_LCHMOD + ACTION_LCHMOD, +#endif + ACTION_FCHMODAT, + ACTION_CHOWN, + ACTION_FCHOWN, + ACTION_LCHOWN, + ACTION_FCHOWNAT, +#ifdef HAS_CHFLAGS + ACTION_CHFLAGS, +#endif +#ifdef HAS_FCHFLAGS + ACTION_FCHFLAGS, +#endif +#ifdef HAS_CHFLAGSAT + ACTION_CHFLAGSAT, +#endif +#ifdef HAS_LCHFLAGS + ACTION_LCHFLAGS, +#endif + ACTION_TRUNCATE, + ACTION_FTRUNCATE, + ACTION_STAT, + ACTION_FSTAT, + ACTION_LSTAT, + ACTION_FSTATAT, + ACTION_PATHCONF, + ACTION_FPATHCONF, +#ifdef HAS_LPATHCONF + ACTION_LPATHCONF, +#endif +#ifdef HAS_FREEBSD_ACL + ACTION_PREPENDACL, + ACTION_READACL, +#endif + ACTION_WRITE, +}; + +#define TYPE_NONE 0x0000 +#define TYPE_STRING 0x0001 +#define TYPE_NUMBER 0x0002 +#define TYPE_DESCRIPTOR 0x0003 +#define TYPE_MASK 0x000f + +#define TYPE_OPTIONAL 0x0100 + +#define MAX_ARGS 8 + +struct syscall_desc { + const char *sd_name; + enum action sd_action; + int sd_args[MAX_ARGS]; +}; + +static struct syscall_desc syscalls[] = { + { "open", ACTION_OPEN, { TYPE_STRING, TYPE_STRING, TYPE_NUMBER | TYPE_OPTIONAL, TYPE_NONE } }, + { "openat", ACTION_OPENAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_NUMBER | TYPE_OPTIONAL, TYPE_NONE } }, + { "create", ACTION_CREATE, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, + { "unlink", ACTION_UNLINK, { TYPE_STRING, TYPE_NONE } }, + { "unlinkat", ACTION_UNLINKAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_NONE } }, + { "mkdir", ACTION_MKDIR, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, + { "mkdirat", ACTION_MKDIRAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, + { "rmdir", ACTION_RMDIR, { TYPE_STRING, TYPE_NONE } }, + { "link", ACTION_LINK, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, + { "linkat", ACTION_LINKAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_NONE } }, + { "symlink", ACTION_SYMLINK, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, + { "symlinkat", ACTION_SYMLINKAT, { TYPE_STRING, TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, + { "rename", ACTION_RENAME, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, + { "renameat", ACTION_RENAMEAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, + { "mkfifo", ACTION_MKFIFO, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, + { "mkfifoat", ACTION_MKFIFOAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, + { "mknod", ACTION_MKNOD, { TYPE_STRING, TYPE_STRING, TYPE_NUMBER, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE} }, + { "mknodat", ACTION_MKNODAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_NUMBER, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE} }, + { "bind", ACTION_BIND, { TYPE_STRING, TYPE_NONE } }, +#ifdef HAS_BINDAT + { "bindat", ACTION_BINDAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, +#endif + { "connect", ACTION_CONNECT, { TYPE_STRING, TYPE_NONE } }, +#ifdef HAS_CONNECTAT + { "connectat", ACTION_CONNECTAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, +#endif + { "chmod", ACTION_CHMOD, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, + { "fchmod", ACTION_FCHMOD, { TYPE_DESCRIPTOR, TYPE_NUMBER, TYPE_NONE } }, +#ifdef HAS_LCHMOD + { "lchmod", ACTION_LCHMOD, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, +#endif + { "fchmodat", ACTION_FCHMODAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NUMBER, TYPE_STRING, TYPE_NONE } }, + { "chown", ACTION_CHOWN, { TYPE_STRING, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE } }, + { "fchown", ACTION_FCHOWN, { TYPE_DESCRIPTOR, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE } }, + { "lchown", ACTION_LCHOWN, { TYPE_STRING, TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE } }, + { "fchownat", ACTION_FCHOWNAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NUMBER, TYPE_NUMBER, TYPE_STRING, TYPE_NONE } }, +#ifdef HAS_CHFLAGS + { "chflags", ACTION_CHFLAGS, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#endif +#ifdef HAS_FCHFLAGS + { "fchflags", ACTION_FCHFLAGS, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, +#endif +#ifdef HAS_CHFLAGSAT + { "chflagsat", ACTION_CHFLAGSAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#endif +#ifdef HAS_LCHFLAGS + { "lchflags", ACTION_LCHFLAGS, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#endif + { "truncate", ACTION_TRUNCATE, { TYPE_STRING, TYPE_NUMBER, TYPE_NONE } }, + { "ftruncate", ACTION_FTRUNCATE, { TYPE_DESCRIPTOR, TYPE_NUMBER, TYPE_NONE } }, + { "stat", ACTION_STAT, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, + { "fstat", ACTION_FSTAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, + { "lstat", ACTION_LSTAT, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, + { "fstatat", ACTION_FSTATAT, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_STRING, TYPE_STRING, TYPE_NONE } }, + { "pathconf", ACTION_PATHCONF, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, + { "fpathconf", ACTION_FPATHCONF, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, +#ifdef HAS_LPATHCONF + { "lpathconf", ACTION_LPATHCONF, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, +#endif +#ifdef HAS_FREEBSD_ACL + { "prependacl", ACTION_PREPENDACL, { TYPE_STRING, TYPE_STRING, TYPE_NONE } }, + { "readacl", ACTION_READACL, { TYPE_STRING, TYPE_NONE } }, +#endif + { "write", ACTION_WRITE, { TYPE_DESCRIPTOR, TYPE_STRING, TYPE_NONE } }, + { NULL, -1, { TYPE_NONE } } +}; + +struct flag { + long long f_flag; + const char *f_str; +}; + +static struct flag open_flags[] = { +#ifdef O_RDONLY + { O_RDONLY, "O_RDONLY" }, +#endif +#ifdef O_WRONLY + { O_WRONLY, "O_WRONLY" }, +#endif +#ifdef O_RDWR + { O_RDWR, "O_RDWR" }, +#endif +#ifdef O_NONBLOCK + { O_NONBLOCK, "O_NONBLOCK" }, +#endif +#ifdef O_APPEND + { O_APPEND, "O_APPEND" }, +#endif +#ifdef O_CREAT + { O_CREAT, "O_CREAT" }, +#endif +#ifdef O_TRUNC + { O_TRUNC, "O_TRUNC" }, +#endif +#ifdef O_EXCL + { O_EXCL, "O_EXCL" }, +#endif +#ifdef O_SHLOCK + { O_SHLOCK, "O_SHLOCK" }, +#endif +#ifdef O_EXLOCK + { O_EXLOCK, "O_EXLOCK" }, +#endif +#ifdef O_DIRECT + { O_DIRECT, "O_DIRECT" }, +#endif +#ifdef O_FSYNC + { O_FSYNC, "O_FSYNC" }, +#endif +#ifdef O_SYNC + { O_SYNC, "O_SYNC" }, +#endif +#ifdef O_NOFOLLOW + { O_NOFOLLOW, "O_NOFOLLOW" }, +#endif +#ifdef O_NOCTTY + { O_NOCTTY, "O_NOCTTY" }, +#endif +#ifdef O_DIRECTORY + { O_DIRECTORY, "O_DIRECTORY" }, +#endif + { 0, NULL } +}; + +#ifdef HAS_CHFLAGS +static struct flag chflags_flags[] = { +#ifdef UF_NODUMP + { UF_NODUMP, "UF_NODUMP" }, +#endif +#ifdef UF_IMMUTABLE + { UF_IMMUTABLE, "UF_IMMUTABLE" }, +#endif +#ifdef UF_APPEND + { UF_APPEND, "UF_APPEND" }, +#endif +#ifdef UF_NOUNLINK + { UF_NOUNLINK, "UF_NOUNLINK" }, +#endif +#ifdef UF_OPAQUE + { UF_OPAQUE, "UF_OPAQUE" }, +#endif +#ifdef SF_ARCHIVED + { SF_ARCHIVED, "SF_ARCHIVED" }, +#endif +#ifdef SF_IMMUTABLE + { SF_IMMUTABLE, "SF_IMMUTABLE" }, +#endif +#ifdef SF_APPEND + { SF_APPEND, "SF_APPEND" }, +#endif +#ifdef SF_NOUNLINK + { SF_NOUNLINK, "SF_NOUNLINK" }, +#endif +#ifdef SF_SNAPSHOT + { SF_SNAPSHOT, "SF_SNAPSHOT" }, +#endif + { 0, NULL } +}; +#endif + +static struct flag unlinkat_flags[] = { + { AT_REMOVEDIR, "AT_REMOVEDIR" }, + { 0, NULL } +}; + +static struct flag linkat_flags[] = { + { AT_SYMLINK_FOLLOW, "AT_SYMLINK_FOLLOW" }, + { 0, NULL } +}; + +static struct flag chflagsat_flags[] = { + { AT_SYMLINK_NOFOLLOW, "AT_SYMLINK_NOFOLLOW" }, + { 0, NULL } +}; + +static struct flag fchmodat_flags[] = { + { AT_SYMLINK_NOFOLLOW, "AT_SYMLINK_NOFOLLOW" }, + { 0, NULL } +}; + +static struct flag fchownat_flags[] = { + { AT_SYMLINK_NOFOLLOW, "AT_SYMLINK_NOFOLLOW" }, + { 0, NULL } +}; + +static struct flag fstatat_flags[] = { + { AT_SYMLINK_NOFOLLOW, "AT_SYMLINK_NOFOLLOW" }, + { 0, NULL } +}; + +struct name { + int n_name; + const char *n_str; +}; + +static struct name pathconf_names[] = { +#ifdef _PC_LINK_MAX + { _PC_LINK_MAX, "_PC_LINK_MAX" }, +#endif +#ifdef _PC_NAME_MAX + { _PC_NAME_MAX, "_PC_NAME_MAX" }, +#endif +#ifdef _PC_PATH_MAX + { _PC_PATH_MAX, "_PC_PATH_MAX" }, +#endif +#ifdef _PC_SYMLINK_MAX + { _PC_SYMLINK_MAX, "_PC_SYMLINK_MAX" }, +#endif + { 0, NULL } +}; + +static const char *err2str(int error); + +static int *descriptors; +static int ndescriptors; + +static void +usage(void) +{ + + fprintf(stderr, "usage: pjdfstest [-U umask] [-u uid] [-g gid1[,gid2[...]]] syscall args ...\n"); + exit(1); +} + +static long long +str2flags(struct flag *tflags, char *sflags) +{ + long long flags = 0; + unsigned int i; + char *f; + + /* 'none' or '0' means no flags */ + if (strcmp(sflags, "none") == 0 || strcmp(sflags, "0") == 0) + return (0); + for (f = strtok(sflags, ",|"); f != NULL; f = strtok(NULL, ",|")) { + for (i = 0; tflags[i].f_str != NULL; i++) { + if (strcmp(tflags[i].f_str, f) == 0) + break; + } + if (tflags[i].f_str == NULL) { + fprintf(stderr, "unknown flag '%s'\n", f); + exit(1); + } + flags |= tflags[i].f_flag; + } + return (flags); +} + +#ifdef HAS_CHFLAGS +static char * +flags2str(struct flag *tflags, long long flags) +{ + static char sflags[1024]; + unsigned int i; + + sflags[0] = '\0'; + for (i = 0; tflags[i].f_str != NULL; i++) { + if (flags & tflags[i].f_flag) { + if (sflags[0] != '\0') + strlcat(sflags, ",", sizeof(sflags)); + strlcat(sflags, tflags[i].f_str, sizeof(sflags)); + } + } + if (sflags[0] == '\0') + strlcpy(sflags, "none", sizeof(sflags)); + return (sflags); +} +#endif + +static int +str2name(struct name *names, char *name) +{ + unsigned int i; + + for (i = 0; names[i].n_str != NULL; i++) { + if (strcmp(names[i].n_str, name) == 0) + return (names[i].n_name); + } + return (-1); +} + +static struct syscall_desc * +find_syscall(const char *name) +{ + int i; + + for (i = 0; syscalls[i].sd_name != NULL; i++) { + if (strcmp(syscalls[i].sd_name, name) == 0) + return (&syscalls[i]); + } + return (NULL); +} + +static void +show_stat(struct stat64 *sp, const char *what) +{ + + if (strcmp(what, "mode") == 0) + printf("0%o", (unsigned int)(sp->st_mode & ALLPERMS)); + else if (strcmp(what, "inode") == 0) + printf("%lld", (long long)sp->st_ino); + else if (strcmp(what, "nlink") == 0) + printf("%lld", (long long)sp->st_nlink); + else if (strcmp(what, "uid") == 0) + printf("%d", (int)sp->st_uid); + else if (strcmp(what, "gid") == 0) + printf("%d", (int)sp->st_gid); + else if (strcmp(what, "size") == 0) + printf("%lld", (long long)sp->st_size); + else if (strcmp(what, "blocks") == 0) + printf("%lld", (long long)sp->st_blocks); + else if (strcmp(what, "atime") == 0) + printf("%lld", (long long)sp->st_atime); + else if (strcmp(what, "mtime") == 0) + printf("%lld", (long long)sp->st_mtime); + else if (strcmp(what, "ctime") == 0) + printf("%lld", (long long)sp->st_ctime); +#ifdef HAS_CHFLAGS + else if (strcmp(what, "flags") == 0) + printf("%s", flags2str(chflags_flags, (long long)sp->st_flags)); +#endif + else if (strcmp(what, "major") == 0) + printf("%u", (unsigned int)major(sp->st_rdev)); + else if (strcmp(what, "minor") == 0) + printf("%u", (unsigned int)minor(sp->st_rdev)); + else if (strcmp(what, "type") == 0) { + switch (sp->st_mode & S_IFMT) { + case S_IFIFO: + printf("fifo"); + break; + case S_IFCHR: + printf("char"); + break; + case S_IFDIR: + printf("dir"); + break; + case S_IFBLK: + printf("block"); + break; + case S_IFREG: + printf("regular"); + break; + case S_IFLNK: + printf("symlink"); + break; + case S_IFSOCK: + printf("socket"); + break; + default: + printf("unknown"); + break; + } + } else { + printf("unknown"); + } +} + +static void +show_stats(struct stat64 *sp, char *what) +{ + const char *s = ""; + char *w; + + for (w = strtok(what, ","); w != NULL; w = strtok(NULL, ",")) { + printf("%s", s); + show_stat(sp, w); + s = ","; + } + printf("\n"); +} + +static void +descriptor_add(int fd) +{ + + ndescriptors++; + if (descriptors == NULL) { + descriptors = malloc(sizeof(descriptors[0]) * ndescriptors); + } else { + descriptors = realloc(descriptors, + sizeof(descriptors[0]) * ndescriptors); + } + assert(descriptors != NULL); + descriptors[ndescriptors - 1] = fd; +} + +static int +descriptor_get(int pos) +{ + + if (pos < 0 || pos >= ndescriptors) { + fprintf(stderr, "invalid descriptor %d\n", pos); + exit(1); + } + + return (descriptors[pos]); +} + +static unsigned int +call_syscall(struct syscall_desc *scall, char *argv[]) +{ + struct stat64 sb; + long long flags; + unsigned int i; + char *endp; + int name, rval; + union { + char *str; + long long num; + } args[MAX_ARGS]; +#ifdef HAS_FREEBSD_ACL + int entry_id = ACL_FIRST_ENTRY; + acl_t acl, newacl; + acl_entry_t entry, newentry; +#endif + + /* + * Verify correctness of the arguments. + */ + for (i = 0; i < sizeof(args)/sizeof(args[0]); i++) { + if (scall->sd_args[i] == TYPE_NONE) { + if (argv[i] == NULL || strcmp(argv[i], ":") == 0) + break; + fprintf(stderr, "too many arguments [%s]\n", argv[i]); + exit(1); + } else { + if (argv[i] == NULL || strcmp(argv[i], ":") == 0) { + if (scall->sd_args[i] & TYPE_OPTIONAL) + break; + fprintf(stderr, "too few arguments\n"); + exit(1); + } + if ((scall->sd_args[i] & TYPE_MASK) == TYPE_STRING) { + if (strcmp(argv[i], "NULL") == 0) + args[i].str = NULL; + else if (strcmp(argv[i], "DEADCODE") == 0) + args[i].str = (void *)0xdeadc0de; + else + args[i].str = argv[i]; + } else if ((scall->sd_args[i] & TYPE_MASK) == + TYPE_NUMBER) { + args[i].num = strtoll(argv[i], &endp, 0); + if (*endp != '\0' && + !isspace((unsigned char)*endp)) { + fprintf(stderr, + "invalid argument %u, number expected [%s]\n", + i, endp); + exit(1); + } + } else if ((scall->sd_args[i] & TYPE_MASK) == + TYPE_DESCRIPTOR) { + if (strcmp(argv[i], "AT_FDCWD") == 0) { + args[i].num = AT_FDCWD; + } else if (strcmp(argv[i], "BADFD") == 0) { + /* In case AT_FDCWD is -1 on some systems... */ + if (AT_FDCWD == -1) + args[i].num = -2; + else + args[i].num = -1; + } else { + int pos; + + pos = strtoll(argv[i], &endp, 0); + if (*endp != '\0' && + !isspace((unsigned char)*endp)) { + fprintf(stderr, + "invalid argument %u, number expected [%s]\n", + i, endp); + exit(1); + } + args[i].num = descriptor_get(pos); + } + } + } + } + /* + * Call the given syscall. + */ +#define NUM(n) (args[(n)].num) +#define STR(n) (args[(n)].str) + switch (scall->sd_action) { + case ACTION_OPEN: + flags = str2flags(open_flags, STR(1)); + if (flags & O_CREAT) { + if (i == 2) { + fprintf(stderr, "too few arguments\n"); + exit(1); + } + rval = open(STR(0), (int)flags, (mode_t)NUM(2)); + } else { + if (i == 3) { + fprintf(stderr, "too many arguments\n"); + exit(1); + } + rval = open(STR(0), (int)flags); + } + if (rval >= 0) + descriptor_add(rval); + break; + case ACTION_OPENAT: + flags = str2flags(open_flags, STR(2)); + if (flags & O_CREAT) { + if (i == 3) { + fprintf(stderr, "too few arguments\n"); + exit(1); + } + rval = openat(NUM(0), STR(1), (int)flags, + (mode_t)NUM(3)); + } else { + if (i == 4) { + fprintf(stderr, "too many arguments\n"); + exit(1); + } + rval = openat(NUM(0), STR(1), (int)flags); + } + if (rval >= 0) + descriptor_add(rval); + break; + case ACTION_CREATE: + rval = open(STR(0), O_CREAT | O_EXCL, (mode_t)NUM(1)); + if (rval >= 0) + close(rval); + break; + case ACTION_UNLINK: + rval = unlink(STR(0)); + break; + case ACTION_UNLINKAT: + rval = unlinkat(NUM(0), STR(1), + (int)str2flags(unlinkat_flags, STR(2))); + break; + case ACTION_MKDIR: + rval = mkdir(STR(0), (mode_t)NUM(1)); + break; + case ACTION_MKDIRAT: + rval = mkdirat(NUM(0), STR(1), (mode_t)NUM(2)); + break; + case ACTION_RMDIR: + rval = rmdir(STR(0)); + break; + case ACTION_LINK: + rval = link(STR(0), STR(1)); + break; + case ACTION_LINKAT: + rval = linkat(NUM(0), STR(1), NUM(2), STR(3), + (int)str2flags(linkat_flags, STR(4))); + break; + case ACTION_SYMLINK: + rval = symlink(STR(0), STR(1)); + break; + case ACTION_SYMLINKAT: + rval = symlinkat(STR(0), NUM(1), STR(2)); + break; + case ACTION_RENAME: + rval = rename(STR(0), STR(1)); + break; + case ACTION_RENAMEAT: + rval = renameat(NUM(0), STR(1), NUM(2), STR(3)); + break; + case ACTION_MKFIFO: + rval = mkfifo(STR(0), (mode_t)NUM(1)); + break; + case ACTION_MKFIFOAT: + rval = mkfifoat(NUM(0), STR(1), (mode_t)NUM(2)); + break; + case ACTION_MKNOD: + case ACTION_MKNODAT: + { + mode_t ntype; + dev_t dev; + int fa; + + switch (scall->sd_action) { + case ACTION_MKNOD: + fa = 0; + break; + case ACTION_MKNODAT: + fa = 1; + break; + default: + abort(); + } + + dev = makedev(NUM(fa + 3), NUM(fa + 4)); + if (strcmp(STR(fa + 1), "c") == 0) /* character device */ + ntype = S_IFCHR; + else if (strcmp(STR(fa + 1), "b") == 0) /* block device */ + ntype = S_IFBLK; + else if (strcmp(STR(fa + 1), "f") == 0) /* fifo special */ + ntype = S_IFIFO; + else if (strcmp(STR(fa + 1), "d") == 0) /* directory */ + ntype = S_IFDIR; + else if (strcmp(STR(fa + 1), "o") == 0) /* regular file */ + ntype = S_IFREG; + else { + fprintf(stderr, "wrong argument 1\n"); + exit(1); + } + switch (scall->sd_action) { + case ACTION_MKNOD: + rval = mknod(STR(0), ntype | NUM(2), dev); + break; + case ACTION_MKNODAT: + rval = mknodat(NUM(0), STR(1), ntype | NUM(3), dev); + break; + default: + abort(); + } + break; + } + case ACTION_BIND: + { + struct sockaddr_un sunx; + + sunx.sun_family = AF_UNIX; + strncpy(sunx.sun_path, STR(0), sizeof(sunx.sun_path) - 1); + sunx.sun_path[sizeof(sunx.sun_path) - 1] = '\0'; + rval = socket(AF_UNIX, SOCK_STREAM, 0); + if (rval < 0) + break; + rval = bind(rval, (struct sockaddr *)&sunx, sizeof(sunx)); + break; + } +#ifdef HAS_BINDAT + case ACTION_BINDAT: + { + struct sockaddr_un sunx; + + sunx.sun_family = AF_UNIX; + strncpy(sunx.sun_path, STR(1), sizeof(sunx.sun_path) - 1); + sunx.sun_path[sizeof(sunx.sun_path) - 1] = '\0'; + rval = socket(AF_UNIX, SOCK_STREAM, 0); + if (rval < 0) + break; + rval = bindat(NUM(0), rval, (struct sockaddr *)&sunx, + sizeof(sunx)); + break; + } +#endif + case ACTION_CONNECT: + { + struct sockaddr_un sunx; + + sunx.sun_family = AF_UNIX; + strncpy(sunx.sun_path, STR(0), sizeof(sunx.sun_path) - 1); + sunx.sun_path[sizeof(sunx.sun_path) - 1] = '\0'; + rval = socket(AF_UNIX, SOCK_STREAM, 0); + if (rval < 0) + break; + rval = connect(rval, (struct sockaddr *)&sunx, sizeof(sunx)); + break; + } +#ifdef HAS_CONNECTAT + case ACTION_CONNECTAT: + { + struct sockaddr_un sunx; + + sunx.sun_family = AF_UNIX; + strncpy(sunx.sun_path, STR(1), sizeof(sunx.sun_path) - 1); + sunx.sun_path[sizeof(sunx.sun_path) - 1] = '\0'; + rval = socket(AF_UNIX, SOCK_STREAM, 0); + if (rval < 0) + break; + rval = connectat(NUM(0), rval, (struct sockaddr *)&sunx, + sizeof(sunx)); + break; + } +#endif + case ACTION_CHMOD: + rval = chmod(STR(0), (mode_t)NUM(1)); + break; + case ACTION_FCHMOD: + rval = fchmod(NUM(0), (mode_t)NUM(1)); + break; +#ifdef HAS_LCHMOD + case ACTION_LCHMOD: + rval = lchmod(STR(0), (mode_t)NUM(1)); + break; +#endif + case ACTION_FCHMODAT: + rval = fchmodat(NUM(0), STR(1), (mode_t)NUM(2), + str2flags(fchmodat_flags, STR(3))); + break; + case ACTION_CHOWN: + rval = chown(STR(0), (uid_t)NUM(1), (gid_t)NUM(2)); + break; + case ACTION_FCHOWN: + rval = fchown(NUM(0), (uid_t)NUM(1), (gid_t)NUM(2)); + break; + case ACTION_LCHOWN: + rval = lchown(STR(0), (uid_t)NUM(1), (gid_t)NUM(2)); + break; + case ACTION_FCHOWNAT: + rval = fchownat(NUM(0), STR(1), (uid_t)NUM(2), (gid_t)NUM(3), + (int)str2flags(fchownat_flags, STR(4))); + break; +#ifdef HAS_CHFLAGS + case ACTION_CHFLAGS: + rval = chflags(STR(0), + (unsigned long)str2flags(chflags_flags, STR(1))); + break; +#endif +#ifdef HAS_FCHFLAGS + case ACTION_FCHFLAGS: + rval = fchflags(NUM(0), + (unsigned long)str2flags(chflags_flags, STR(1))); + break; +#endif +#ifdef HAS_CHFLAGSAT + case ACTION_CHFLAGSAT: + rval = chflagsat(NUM(0), STR(1), + (unsigned long)str2flags(chflags_flags, STR(2)), + (int)str2flags(chflagsat_flags, STR(3))); + break; +#endif +#ifdef HAS_LCHFLAGS + case ACTION_LCHFLAGS: + rval = lchflags(STR(0), + (unsigned long)str2flags(chflags_flags, STR(1))); + break; +#endif + case ACTION_TRUNCATE: + rval = truncate64(STR(0), NUM(1)); + break; + case ACTION_FTRUNCATE: + rval = ftruncate64(NUM(0), NUM(1)); + break; + case ACTION_STAT: + rval = stat64(STR(0), &sb); + if (rval == 0) { + show_stats(&sb, STR(1)); + return (i); + } + break; + case ACTION_FSTAT: + rval = fstat64(NUM(0), &sb); + if (rval == 0) { + show_stats(&sb, STR(1)); + return (i); + } + break; + case ACTION_LSTAT: + rval = lstat64(STR(0), &sb); + if (rval == 0) { + show_stats(&sb, STR(1)); + return (i); + } + break; + case ACTION_FSTATAT: + rval = fstatat(NUM(0), STR(1), &sb, + (int)str2flags(fstatat_flags, STR(2))); + if (rval == 0) { + show_stats(&sb, STR(3)); + return (i); + } + break; + case ACTION_PATHCONF: + case ACTION_FPATHCONF: +#ifdef HAS_LPATHCONF + case ACTION_LPATHCONF: +#endif + { + long lrval; + + name = str2name(pathconf_names, STR(1)); + if (name == -1) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 02:53:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60031459; Tue, 9 Sep 2014 02:53:56 +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 329411C8A; Tue, 9 Sep 2014 02:53:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s892rutn069697; Tue, 9 Sep 2014 02:53:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s892rucW069696; Tue, 9 Sep 2014 02:53:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409090253.s892rucW069696@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 9 Sep 2014 02:53:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r271295 - vendor/pjdfstest/abf03c3a47745d4521b0e4aa141317553ca48f91 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 02:53:56 -0000 Author: ngie Date: Tue Sep 9 02:53:55 2014 New Revision: 271295 URL: http://svnweb.freebsd.org/changeset/base/271295 Log: Add tag ^/vendor/pjdfstest/abf03c3a47745d4521b0e4aa141317553ca48f91 Approved by: rpaulo (mentor) Phabric: D743 Sponsored by: EMC / Isilon Storage Division Added: vendor/pjdfstest/abf03c3a47745d4521b0e4aa141317553ca48f91/ - copied from r271294, vendor/pjdfstest/dist/ From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 02:58:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78E8562A; Tue, 9 Sep 2014 02:58:59 +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 64CA51CE9; Tue, 9 Sep 2014 02:58:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s892wxdq070308; Tue, 9 Sep 2014 02:58:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s892wxoB070306; Tue, 9 Sep 2014 02:58:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409090258.s892wxoB070306@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 9 Sep 2014 02:58:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271296 - head/tools/regression/lib/msun X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 02:58:59 -0000 Author: ngie Date: Tue Sep 9 02:58:58 2014 New Revision: 271296 URL: http://svnweb.freebsd.org/changeset/base/271296 Log: Be ANSI-C compliant when defining CX_LIMITED_RANGE #pragma This mutes warnings with clang Approved by: rpaulo (mentor) Reviewed by: das, kargl (both as part of a larger patch) Phabric: D742 Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/lib/msun/test-conj.c head/tools/regression/lib/msun/test-csqrt.c Modified: head/tools/regression/lib/msun/test-conj.c ============================================================================== --- head/tools/regression/lib/msun/test-conj.c Tue Sep 9 02:53:55 2014 (r271295) +++ head/tools/regression/lib/msun/test-conj.c Tue Sep 9 02:58:58 2014 (r271296) @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #include "test-utils.h" -#pragma STDC CX_LIMITED_RANGE off +#pragma STDC CX_LIMITED_RANGE OFF /* Make sure gcc doesn't use builtin versions of these or honor __pure2. */ static float complex (*libconjf)(float complex) = conjf; Modified: head/tools/regression/lib/msun/test-csqrt.c ============================================================================== --- head/tools/regression/lib/msun/test-csqrt.c Tue Sep 9 02:53:55 2014 (r271295) +++ head/tools/regression/lib/msun/test-csqrt.c Tue Sep 9 02:58:58 2014 (r271296) @@ -62,7 +62,7 @@ _csqrt(long double complex d) return (csqrt((double complex)d)); } -#pragma STDC CX_LIMITED_RANGE off +#pragma STDC CX_LIMITED_RANGE OFF /* * Compare d1 and d2 using special rules: NaN == NaN and +0 != -0. From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 02:59:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D1A6788; Tue, 9 Sep 2014 02:59:48 +0000 (UTC) Received: from mail-pa0-x22d.google.com (mail-pa0-x22d.google.com [IPv6:2607:f8b0:400e:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E0131CF9; Tue, 9 Sep 2014 02:59:48 +0000 (UTC) Received: by mail-pa0-f45.google.com with SMTP id rd3so3736092pab.18 for ; Mon, 08 Sep 2014 19:59:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=/Bu9Ppa1uKfPb7bZKFCsjuKOpYSCxrAw8B9I7VkXmLU=; b=BNKUcUAosdykkSd2+ADwXZyhluO3AbXdbQJxMTdWBkVChSqvkRsXRvNdLeRWNNczAb c90hOdtddbdxNM2IUKevhEH3eWUXT7zt03/FY/HUwfRx2NQfS0zhkb7T9FoLQn7fbUec Og0hM+g2akxYtf9SqAfErjVIi6ZbXOvCtYsDVdXmNryOI2MuQbQIIaP+RDHvN+6uzu8R nrW4JeeeZRHjOomri9Pyo5wCZMeaayHAUi47//b/I/B4QnDsiWfnYPOvNKV5blTRE7KD fCEwbc5TKuaGZAo8+r2NrJKbWZM4iDobL5OfZRobek9HP02X4B/8xmd+mkf80YLYTmry hXOQ== X-Received: by 10.68.179.228 with SMTP id dj4mr25695996pbc.130.1410231587652; Mon, 08 Sep 2014 19:59:47 -0700 (PDT) Received: from [192.168.242.58] (c-67-182-131-225.hsd1.wa.comcast.net. [67.182.131.225]) by mx.google.com with ESMTPSA id ic5sm10078097pbb.3.2014.09.08.19.59.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 08 Sep 2014 19:59:47 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_E18BA968-EBCA-42F1-9494-5E7DD223635B"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r271296 - head/tools/regression/lib/msun From: yaneurabeya@gmail.com In-Reply-To: <201409090258.s892wxoB070306@svn.freebsd.org> Date: Mon, 8 Sep 2014 19:59:44 -0700 Message-Id: References: <201409090258.s892wxoB070306@svn.freebsd.org> To: Garrett Cooper X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 02:59:48 -0000 --Apple-Mail=_E18BA968-EBCA-42F1-9494-5E7DD223635B Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On Sep 8, 2014, at 19:58, Garrett Cooper wrote: > Author: ngie > Date: Tue Sep 9 02:58:58 2014 > New Revision: 271296 > URL: http://svnweb.freebsd.org/changeset/base/271296 > > Log: > Be ANSI-C compliant when defining CX_LIMITED_RANGE #pragma > > This mutes warnings with clang > > Approved by: rpaulo (mentor) > Reviewed by: das, kargl (both as part of a larger patch) > Phabric: D742 > Sponsored by: EMC / Isilon Storage Division Forgot to add: MFC after: 3 days --Apple-Mail=_E18BA968-EBCA-42F1-9494-5E7DD223635B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUDm0gAAoJEMZr5QU6S73esVUH+wTENDccnK+jqDX784BuJZIu iANXagoUYCxX/U7+elhdgjBq5ggFNMB/DcINx0AGiMfaEH1pYp056N87MQdWPlM8 tEy2Uv46Y1WpD+bTMlLe99NNV9yxqfvywYVAwwE8nurFDojnoQ5gJinbl+VW5j75 WK83ZYPLh+2B7IYUUNBmSBfnkkwCN27Mi6aZ26ePII2WWTiu0eVyY+vMzs/FmAXE M3I2nNi9JydknufU7j/9PRqX0+SQIn6TRULU+yvdu5cE3IGgyC4oTEQVxyOQQYwT QY9cLWgJvs0sSD5ZNSQRISvUGTo2m0QXvJGzZImaLcW0paqDdrylrM2XKIh6Y/o= =s0IA -----END PGP SIGNATURE----- --Apple-Mail=_E18BA968-EBCA-42F1-9494-5E7DD223635B-- From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 03:10:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D497E51; Tue, 9 Sep 2014 03:10:22 +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 2819A1F2C; Tue, 9 Sep 2014 03:10:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s893AMik076417; Tue, 9 Sep 2014 03:10:22 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s893ALba076415; Tue, 9 Sep 2014 03:10:21 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201409090310.s893ALba076415@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 9 Sep 2014 03:10:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271297 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 03:10:22 -0000 Author: adrian Date: Tue Sep 9 03:10:21 2014 New Revision: 271297 URL: http://svnweb.freebsd.org/changeset/base/271297 Log: Implement IPv4 RSS software hash functions to use during packet ingress and egress. * rss_mbuf_software_hash_v4 - look at the IPv4 mbuf to fetch the IPv4 details + direction to calculate a hash. * rss_proto_software_hash_v4 - hash the given source/destination IPv4 address, port and direction. * rss_soft_m2cpuid - map the given mbuf to an RSS CPU ("bucket" for now) These functions are intended to be used by the stack to support the following: * Not all NICs do RSS hashing, so we should support some way of doing a hash in software; * The NIC / driver may not hash frames the way we want (eg UDP 4-tuple hashing when the stack is only doing 2-tuple hashing for UDP); so we may need to re-hash frames; * .. same with IPv4 fragments - they will need to be re-hashed after reassembly; * .. and same with things like IP tunneling and such; * The transmit path for things like UDP, RAW and ICMP don't currently have any RSS information attached to them - so they'll need an RSS calculation performed before transmit. TODO: * Counters! Everywhere! * Add a debug mode that software hashes received frames and compares them to the hardware hash provided by the hardware to ensure they match. The IPv6 part of this is missing - I'm going to do some re-juggling of where various parts of the RSS framework live before I add the IPv6 code (read: the IPv6 code is going to go into netinet6/in6_rss.[ch], rather than living here.) Note: This API is still fluid. Please keep that in mind. Differential Revision: https://reviews.freebsd.org/D527 Reviewed by: grehan Modified: head/sys/netinet/in_rss.c head/sys/netinet/in_rss.h Modified: head/sys/netinet/in_rss.c ============================================================================== --- head/sys/netinet/in_rss.c Tue Sep 9 02:58:58 2014 (r271296) +++ head/sys/netinet/in_rss.c Tue Sep 9 03:10:21 2014 (r271297) @@ -57,6 +57,11 @@ __FBSDID("$FreeBSD$"); #include #include +/* for software rss hash support */ +#include +#include +#include + /*- * Operating system parts of receiver-side scaling (RSS), which allows * network cards to direct flows to particular receive queues based on hashes @@ -170,6 +175,8 @@ struct rss_table_entry { }; static struct rss_table_entry rss_table[RSS_TABLE_MAXLEN]; +static inline u_int rss_gethashconfig_local(void); + static void rss_init(__unused void *arg) { @@ -491,6 +498,254 @@ rss_m2bucket(struct mbuf *m, uint32_t *b } /* + * Calculate an appropriate ipv4 2-tuple or 4-tuple given the given + * IPv4 source/destination address, UDP or TCP source/destination ports + * and the protocol type. + * + * The protocol code may wish to do a software hash of the given + * tuple. This depends upon the currently configured RSS hash types. + * + * This assumes that the packet in question isn't a fragment. + * + * It also assumes the packet source/destination address + * are in "incoming" packet order (ie, source is "far" address.) + */ +int +rss_proto_software_hash_v4(struct in_addr s, struct in_addr d, + u_short sp, u_short dp, int proto, + uint32_t *hashval, uint32_t *hashtype) +{ + uint32_t hash; + + /* + * Next, choose the hash type depending upon the protocol + * identifier. + */ + if ((proto == IPPROTO_TCP) && + (rss_gethashconfig_local() & RSS_HASHTYPE_RSS_TCP_IPV4)) { + hash = rss_hash_ip4_4tuple(s, sp, d, dp); + *hashval = hash; + *hashtype = M_HASHTYPE_RSS_TCP_IPV4; + return (0); + } else if ((proto == IPPROTO_UDP) && + (rss_gethashconfig_local() & RSS_HASHTYPE_RSS_UDP_IPV4)) { + hash = rss_hash_ip4_4tuple(s, sp, d, dp); + *hashval = hash; + *hashtype = M_HASHTYPE_RSS_UDP_IPV4; + return (0); + } else if (rss_gethashconfig_local() & RSS_HASHTYPE_RSS_IPV4) { + /* RSS doesn't hash on other protocols like SCTP; so 2-tuple */ + hash = rss_hash_ip4_2tuple(s, d); + *hashval = hash; + *hashtype = M_HASHTYPE_RSS_IPV4; + return (0); + } + + /* No configured available hashtypes! */ + printf("%s: no available hashtypes!\n", __func__); + return (-1); +} + +/* + * Do a software calculation of the RSS for the given mbuf. + * + * This is typically used by the input path to recalculate the RSS after + * some form of packet processing (eg de-capsulation, IP fragment reassembly.) + * + * dir is the packet direction - RSS_HASH_PKT_INGRESS for incoming and + * RSS_HASH_PKT_EGRESS for outgoing. + * + * Returns 0 if a hash was done, -1 if no hash was done, +1 if + * the mbuf already had a valid RSS flowid. + * + * This function doesn't modify the mbuf. It's up to the caller to + * assign flowid/flowtype as appropriate. + */ +int +rss_mbuf_software_hash_v4(const struct mbuf *m, int dir, uint32_t *hashval, + uint32_t *hashtype) +{ + const struct ip *ip; + const struct tcphdr *th; + const struct udphdr *uh; + uint8_t proto; + int iphlen; + int is_frag = 0; + + /* + * XXX For now this only handles hashing on incoming mbufs. + */ + if (dir != RSS_HASH_PKT_INGRESS) { + printf("%s: called on EGRESS packet!\n", __func__); + return (-1); + } + + /* + * First, validate that the mbuf we have is long enough + * to have an IPv4 header in it. + */ + if (m->m_pkthdr.len < (sizeof(struct ip))) { + printf("%s: short mbuf pkthdr\n", __func__); + return (-1); + } + if (m->m_len < (sizeof(struct ip))) { + printf("%s: short mbuf len\n", __func__); + return (-1); + } + + /* Ok, let's dereference that */ + ip = mtod(m, struct ip *); + proto = ip->ip_p; + iphlen = ip->ip_hl << 2; + + /* + * If this is a fragment then it shouldn't be four-tuple + * hashed just yet. Once it's reassembled into a full + * frame it should be re-hashed. + */ + if (ip->ip_off & htons(IP_MF | IP_OFFMASK)) + is_frag = 1; + + /* + * If the mbuf flowid/flowtype matches the packet type, + * and we don't support the 4-tuple version of the given protocol, + * then signal to the owner that it can trust the flowid/flowtype + * details. + * + * This is a little picky - eg, if TCPv4 / UDPv4 hashing + * is supported but we got a TCP/UDP frame only 2-tuple hashed, + * then we shouldn't just "trust" the 2-tuple hash. We need + * a 4-tuple hash. + */ + if (m->m_flags & M_FLOWID) { + uint32_t flowid, flowtype; + + flowid = m->m_pkthdr.flowid; + flowtype = M_HASHTYPE_GET(m); + + switch (proto) { + case IPPROTO_UDP: + if ((rss_gethashconfig_local() & RSS_HASHTYPE_RSS_UDP_IPV4) && + (flowtype == M_HASHTYPE_RSS_UDP_IPV4) && + (is_frag == 0)) { + return (1); + } + /* + * Only allow 2-tuple for UDP frames if we don't also + * support 4-tuple for UDP. + */ + if ((rss_gethashconfig_local() & RSS_HASHTYPE_RSS_IPV4) && + ((rss_gethashconfig_local() & RSS_HASHTYPE_RSS_UDP_IPV4) == 0) && + flowtype == M_HASHTYPE_RSS_IPV4) { + return (1); + } + break; + case IPPROTO_TCP: + if ((rss_gethashconfig_local() & RSS_HASHTYPE_RSS_TCP_IPV4) && + (flowtype == M_HASHTYPE_RSS_TCP_IPV4) && + (is_frag == 0)) { + return (1); + } + /* + * Only allow 2-tuple for TCP frames if we don't also + * support 2-tuple for TCP. + */ + if ((rss_gethashconfig_local() & RSS_HASHTYPE_RSS_IPV4) && + ((rss_gethashconfig_local() & RSS_HASHTYPE_RSS_TCP_IPV4) == 0) && + flowtype == M_HASHTYPE_RSS_IPV4) { + return (1); + } + break; + default: + if ((rss_gethashconfig_local() & RSS_HASHTYPE_RSS_IPV4) && + flowtype == M_HASHTYPE_RSS_IPV4) { + return (1); + } + break; + } + } + + /* + * Decode enough information to make a hash decision. + * + * XXX TODO: does the hardware hash on 4-tuple if IP + * options are present? + */ + if (proto == IPPROTO_TCP && is_frag == 0) { + if (m->m_len < iphlen + sizeof(struct tcphdr)) { + printf("%s: short TCP frame?\n", __func__); + return (-1); + } + th = (struct tcphdr *)((caddr_t)ip + iphlen); + return rss_proto_software_hash_v4(ip->ip_src, ip->ip_dst, + th->th_sport, + th->th_dport, + proto, + hashval, + hashtype); + } else if (proto == IPPROTO_UDP && is_frag == 0) { + uh = (struct udphdr *)((caddr_t)ip + iphlen); + if (m->m_len < iphlen + sizeof(struct udphdr)) { + printf("%s: short UDP frame?\n", __func__); + return (-1); + } + return rss_proto_software_hash_v4(ip->ip_src, ip->ip_dst, + uh->uh_sport, + uh->uh_dport, + proto, + hashval, + hashtype); + } else { + /* Default to 2-tuple hash */ + return rss_proto_software_hash_v4(ip->ip_src, ip->ip_dst, + 0, /* source port */ + 0, /* destination port */ + 0, /* IPPROTO_IP */ + hashval, + hashtype); + } +} + +/* + * Similar to rss_m2cpuid, but designed to be used by the IP NETISR + * on incoming frames. + * + * If an existing RSS hash exists and it matches what the configured + * hashing is, then use it. + * + * If there's an existing RSS hash but the desired hash is different, + * or if there's no useful RSS hash, then calculate it via + * the software path. + * + * XXX TODO: definitely want statistics here! + */ +struct mbuf * +rss_soft_m2cpuid(struct mbuf *m, uintptr_t source, u_int *cpuid) +{ + uint32_t hash_val, hash_type; + int ret; + + M_ASSERTPKTHDR(m); + + ret = rss_mbuf_software_hash_v4(m, RSS_HASH_PKT_INGRESS, + &hash_val, &hash_type); + if (ret > 0) { + /* mbuf has a valid hash already; don't need to modify it */ + *cpuid = rss_hash2cpuid(m->m_pkthdr.flowid, M_HASHTYPE_GET(m)); + } else if (ret == 0) { + /* hash was done; update */ + m->m_pkthdr.flowid = hash_val; + M_HASHTYPE_SET(m, hash_type); + m->m_flags |= M_FLOWID; + *cpuid = rss_hash2cpuid(m->m_pkthdr.flowid, M_HASHTYPE_GET(m)); + } else { /* ret < 0 */ + /* no hash was done */ + *cpuid = NETISR_CPUID_NONE; + } + return (m); +} + +/* * Query the RSS hash algorithm. */ u_int @@ -538,15 +793,10 @@ rss_getnumcpus(void) return (rss_ncpus); } -/* - * Return the supported RSS hash configuration. - * - * NICs should query this to determine what to configure in their redirection - * matching table. - */ -u_int -rss_gethashconfig(void) +static inline u_int +rss_gethashconfig_local(void) { + /* Return 4-tuple for TCP; 2-tuple for others */ /* * UDP may fragment more often than TCP and thus we'll end up with @@ -573,6 +823,19 @@ rss_gethashconfig(void) } /* + * Return the supported RSS hash configuration. + * + * NICs should query this to determine what to configure in their redirection + * matching table. + */ +u_int +rss_gethashconfig(void) +{ + + return (rss_gethashconfig_local()); +} + +/* * XXXRW: Confirm that sysctl -a won't dump this keying material, don't want * it appearing in debugging output unnecessarily. */ Modified: head/sys/netinet/in_rss.h ============================================================================== --- head/sys/netinet/in_rss.h Tue Sep 9 02:58:58 2014 (r271296) +++ head/sys/netinet/in_rss.h Tue Sep 9 03:10:21 2014 (r271297) @@ -83,6 +83,16 @@ #define RSS_KEYSIZE 40 /* + * For RSS hash methods that do a software hash on an mbuf, the packet + * direction (ingress / egress) is required. + * + * The default direction (INGRESS) is the "receive into the NIC" - ie, + * what the hardware is hashing on. + */ +#define RSS_HASH_PKT_INGRESS 0 +#define RSS_HASH_PKT_EGRESS 1 + +/* * Device driver interfaces to query RSS properties that must be programmed * into hardware. */ @@ -116,4 +126,17 @@ int rss_hash2bucket(uint32_t hash_val, uint32_t *bucket_id); int rss_m2bucket(struct mbuf *m, uint32_t *bucket_id); +/* + * Functions to calculate a software RSS hash for a given mbuf or + * packet detail. + */ +int rss_mbuf_software_hash_v4(const struct mbuf *m, int dir, + uint32_t *hashval, uint32_t *hashtype); +int rss_proto_software_hash_v4(struct in_addr src, + struct in_addr dst, u_short src_port, u_short dst_port, + int proto, uint32_t *hashval, + uint32_t *hashtype); +struct mbuf * rss_soft_m2cpuid(struct mbuf *m, uintptr_t source, + u_int *cpuid); + #endif /* !_NETINET_IN_RSS_H_ */ From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 04:00:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7AAEF8C1; Tue, 9 Sep 2014 04:00:33 +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 5A3A889D; Tue, 9 Sep 2014 04:00:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8940XrC099658; Tue, 9 Sep 2014 04:00:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8940Vwv099647; Tue, 9 Sep 2014 04:00:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409090400.s8940Vwv099647@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 9 Sep 2014 04:00: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: r271298 - in stable/10: . etc/mtree libexec/atf libexec/atf/atf-check libexec/atf/atf-sh share/mk tools/build/mk usr.bin X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 04:00:33 -0000 Author: ngie Date: Tue Sep 9 04:00:30 2014 New Revision: 271298 URL: http://svnweb.freebsd.org/changeset/base/271298 Log: MFC r267176, r267181, r268445 (ATF-related commits): Phabric: https://reviews.freebsd.org/D706 Approved by: rpaulo (mentor) Approved by: re (gjb) Reviewed by: jmmv Sponsored by: EMC / Isilon Storage Division r267176: Add the *_TESTS_SH_SED_* functionality to atf.test.mk. This exists already in plain.test.mk and tap.test.mk and should have been added to atf.test.mk too when the feature was first introduced. (It is probably time to address the related TODOs but I will do that separately.) r267181: Move atf-sh from /usr/bin/ to /usr/libexec/ In r266650, we made libatf-c and libatf-c++ private libraries so that no components outside of the source tree could unintendedly depend on them. This change does the same for the "atf-sh library" by moving the atf-sh interpreter from its public location in /usr/bin/ to the private location in /usr/libexec/. Our build system will ensure that our own test programs use the right binary, but users won't be able to depend on atf-sh by "mistake". Committing this now to ride the UPDATING notice added with r267172 today. r268445: Fix atf-sh's integration_test With the move of atf-sh into /usr/libexec in r267181, some of the tests in the integration_test program broke because they could not execute atf-sh from the path any longer. This slipped through because I do have a local atf installation in my home directory that appears in my path, hence the tests could still execute my own version. Fix this by forcing /usr/libexec to appear at the beginning of the path when attempting to execute atf-sh. To make upgrading easy (and to avoid an unnecessary entry in UPDATING), make integration_test depend on the Makefile so that a rebuild of the shell script is triggered. This requires a hack in the *.test.mk files to ensure the Makefile is not treated as a source to the generated program. Ugly, I know, but I don't have a better way of doing this at the moment. Will think of one once I address the TODO in the *.test.mk files that suggests generalizing the file generation functionality. PR: 191052 Reviewed by: Garrett Cooper Added: stable/10/libexec/atf/atf-sh/ - copied from r267181, head/libexec/atf/atf-sh/ Modified: stable/10/UPDATING stable/10/etc/mtree/BSD.tests.dist stable/10/libexec/atf/Makefile stable/10/libexec/atf/Makefile.inc stable/10/libexec/atf/atf-check/Makefile stable/10/libexec/atf/atf-sh/Makefile stable/10/share/mk/atf.test.mk stable/10/share/mk/plain.test.mk stable/10/share/mk/tap.test.mk stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.bin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Tue Sep 9 03:10:21 2014 (r271297) +++ stable/10/UPDATING Tue Sep 9 04:00:30 2014 (r271298) @@ -33,11 +33,16 @@ older version of current is a bit fragil programs once the operator executes "make delete-old-libs" after a "make installworld". + Additionally, the atf-sh binary was made private by moving it into + /usr/libexec/. Already-built shell test programs will keep the + path to the old binary so they will break after "make delete-old" + is run. + If you are using WITH_TESTS=yes (not the default), wipe the object tree and rebuild from scratch to prevent spurious test failures. - This is only needed once: the old, misnumbered libraries have been - added to OptionalObsoleteFiles.inc so they will be removed during a - clean upgrade. + This is only needed once: the misnumbered libraries and misplaced + binaries have been added to OptionalObsoleteFiles.inc so they will + be removed during a clean upgrade. 20140814: The ixgbe tunables now match their sysctl counterparts, for example: Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Tue Sep 9 03:10:21 2014 (r271297) +++ stable/10/etc/mtree/BSD.tests.dist Tue Sep 9 04:00:30 2014 (r271298) @@ -92,6 +92,8 @@ atf atf-check .. + atf-sh + .. .. .. sbin @@ -133,10 +135,6 @@ usr.bin apply .. - atf - atf-sh - .. - .. calendar .. comm Modified: stable/10/libexec/atf/Makefile ============================================================================== --- stable/10/libexec/atf/Makefile Tue Sep 9 03:10:21 2014 (r271297) +++ stable/10/libexec/atf/Makefile Tue Sep 9 04:00:30 2014 (r271298) @@ -25,6 +25,6 @@ # # $FreeBSD$ -SUBDIR= atf-check tests +SUBDIR= atf-check atf-sh tests .include Modified: stable/10/libexec/atf/Makefile.inc ============================================================================== --- stable/10/libexec/atf/Makefile.inc Tue Sep 9 03:10:21 2014 (r271297) +++ stable/10/libexec/atf/Makefile.inc Tue Sep 9 04:00:30 2014 (r271298) @@ -28,3 +28,5 @@ CFLAGS+= -DHAVE_CONFIG_H WARNS?= 3 + +.include "../Makefile.inc" Modified: stable/10/libexec/atf/atf-check/Makefile ============================================================================== --- stable/10/libexec/atf/atf-check/Makefile Tue Sep 9 03:10:21 2014 (r271297) +++ stable/10/libexec/atf/atf-check/Makefile Tue Sep 9 04:00:30 2014 (r271298) @@ -30,7 +30,6 @@ ATF= ${.CURDIR:H:H:H}/contrib/atf .PATH: ${ATF}/atf-sh -BINDIR= /usr/libexec PROG_CXX= atf-check SRCS= atf-check.cpp MAN= atf-check.1 Modified: stable/10/libexec/atf/atf-sh/Makefile ============================================================================== --- head/libexec/atf/atf-sh/Makefile Fri Jun 6 18:58:06 2014 (r267181) +++ stable/10/libexec/atf/atf-sh/Makefile Tue Sep 9 04:00:30 2014 (r271298) @@ -25,7 +25,6 @@ # # $FreeBSD$ -.include .include ATF= ${.CURDIR:H:H:H}/contrib/atf Modified: stable/10/share/mk/atf.test.mk ============================================================================== --- stable/10/share/mk/atf.test.mk Tue Sep 9 03:10:21 2014 (r271297) +++ stable/10/share/mk/atf.test.mk Tue Sep 9 04:00:30 2014 (r271298) @@ -98,10 +98,15 @@ _TESTS+= ${ATF_TESTS_SH} SCRIPTSDIR_${_T}= ${TESTSDIR} TEST_INTERFACE.${_T}= atf CLEANFILES+= ${_T} ${_T}.tmp +# TODO(jmmv): It seems to me that this SED and SRC functionality should +# exist in bsd.prog.mk along the support for SCRIPTS. Move it there if +# this proves to be useful within the tests. +ATF_TESTS_SH_SED_${_T}?= # empty ATF_TESTS_SH_SRC_${_T}?= ${_T}.sh ${_T}: ${ATF_TESTS_SH_SRC_${_T}} - echo '#! /usr/bin/atf-sh' > ${.TARGET}.tmp - cat ${.ALLSRC} >> ${.TARGET}.tmp + echo '#! /usr/libexec/atf-sh' > ${.TARGET}.tmp + cat ${.ALLSRC:N*Makefile*} \ + | sed ${ATF_TESTS_SH_SED_${_T}} >>${.TARGET}.tmp chmod +x ${.TARGET}.tmp mv ${.TARGET}.tmp ${.TARGET} .endfor Modified: stable/10/share/mk/plain.test.mk ============================================================================== --- stable/10/share/mk/plain.test.mk Tue Sep 9 03:10:21 2014 (r271297) +++ stable/10/share/mk/plain.test.mk Tue Sep 9 04:00:30 2014 (r271298) @@ -57,7 +57,8 @@ CLEANFILES+= ${_T} ${_T}.tmp PLAIN_TESTS_SH_SED_${_T}?= # empty PLAIN_TESTS_SH_SRC_${_T}?= ${_T}.sh ${_T}: ${PLAIN_TESTS_SH_SRC_${_T}} - cat ${.ALLSRC} | sed ${PLAIN_TESTS_SH_SED_${_T}} >${.TARGET}.tmp + cat ${.ALLSRC:N*Makefile*} \ + | sed ${PLAIN_TESTS_SH_SED_${_T}} >${.TARGET}.tmp chmod +x ${.TARGET}.tmp mv ${.TARGET}.tmp ${.TARGET} .endfor Modified: stable/10/share/mk/tap.test.mk ============================================================================== --- stable/10/share/mk/tap.test.mk Tue Sep 9 03:10:21 2014 (r271297) +++ stable/10/share/mk/tap.test.mk Tue Sep 9 04:00:30 2014 (r271298) @@ -66,7 +66,7 @@ TAP_TESTS_PERL_SRC_${_T}?= ${_T}.pl ${_T}: ${TAP_TESTS_PERL_SRC_${_T}} { \ echo '#! ${TAP_PERL_INTERPRETER}'; \ - cat ${.ALLSRC} | sed ${TAP_TESTS_PERL_SED_${_T}}; \ + cat ${.ALLSRC:N*Makefile*} | sed ${TAP_TESTS_PERL_SED_${_T}}; \ } >${.TARGET}.tmp chmod +x ${.TARGET}.tmp mv ${.TARGET}.tmp ${.TARGET} Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Tue Sep 9 03:10:21 2014 (r271297) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Tue Sep 9 04:00:30 2014 (r271298) @@ -4070,6 +4070,7 @@ OLD_FILES+=usr/share/man/man8/telnetd.8. .endif .if ${MK_TESTS} == yes +OLD_FILES+=usr/bin/atf-sh OLD_LIBS+=usr/lib/libatf-c++.a OLD_LIBS+=usr/lib/libatf-c++.so OLD_LIBS+=usr/lib/libatf-c++.so.1 @@ -4130,6 +4131,17 @@ OLD_FILES+=usr/tests/lib/atf/libatf-c/pr OLD_FILES+=usr/tests/lib/atf/libatf-c/sanity_test OLD_FILES+=usr/tests/lib/atf/libatf-c/text_test OLD_FILES+=usr/tests/lib/atf/libatf-c/user_test +OLD_FILES+=usr/tests/usr.bin/atf/Kyuafile +OLD_FILES+=usr/tests/usr.bin/atf/atf-sh/Kyuafile +OLD_FILES+=usr/tests/usr.bin/atf/atf-sh/atf_check_test +OLD_FILES+=usr/tests/usr.bin/atf/atf-sh/config_test +OLD_FILES+=usr/tests/usr.bin/atf/atf-sh/integration_test +OLD_FILES+=usr/tests/usr.bin/atf/atf-sh/misc_helpers +OLD_FILES+=usr/tests/usr.bin/atf/atf-sh/normalize_test +OLD_FILES+=usr/tests/usr.bin/atf/atf-sh/tc_test +OLD_FILES+=usr/tests/usr.bin/atf/atf-sh/tp_test +OLD_DIRS+=usr/tests/usr.bin/atf/atf-sh +OLD_DIRS+=usr/tests/usr.bin/atf .if ${MK_MAKE} == yes && ${MK_BMAKE} == yes OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/legacy_test OLD_FILES+=usr/tests/usr.bin/make/archives/fmt_44bsd/Kyuafile Modified: stable/10/usr.bin/Makefile ============================================================================== --- stable/10/usr.bin/Makefile Tue Sep 9 03:10:21 2014 (r271297) +++ stable/10/usr.bin/Makefile Tue Sep 9 04:00:30 2014 (r271298) @@ -12,7 +12,6 @@ SUBDIR= alias \ apply \ asa \ - ${_atf} \ awk \ banner \ basename \ @@ -335,7 +334,6 @@ SUBDIR+= telnet .endif .if ${MK_TESTS} != "no" -_atf= atf _tests= tests .endif From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 04:11:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA1A8C51; Tue, 9 Sep 2014 04:11:55 +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 8A947988; Tue, 9 Sep 2014 04:11:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s894Btnn006409; Tue, 9 Sep 2014 04:11:55 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s894BsA8006402; Tue, 9 Sep 2014 04:11:54 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201409090411.s894BsA8006402@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Tue, 9 Sep 2014 04:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271299 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 04:11:55 -0000 Author: grehan Date: Tue Sep 9 04:11:54 2014 New Revision: 271299 URL: http://svnweb.freebsd.org/changeset/base/271299 Log: Add a callback to be notified about negotiated features. Submitted by: luigi Obtained from: Vincenzo Maffione, Universita` di Pisa MFC after: 3 days Modified: head/usr.sbin/bhyve/pci_virtio_block.c head/usr.sbin/bhyve/pci_virtio_net.c head/usr.sbin/bhyve/pci_virtio_rnd.c head/usr.sbin/bhyve/virtio.c head/usr.sbin/bhyve/virtio.h Modified: head/usr.sbin/bhyve/pci_virtio_block.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_block.c Tue Sep 9 04:00:30 2014 (r271298) +++ head/usr.sbin/bhyve/pci_virtio_block.c Tue Sep 9 04:11:54 2014 (r271299) @@ -133,6 +133,7 @@ static struct virtio_consts vtblk_vi_con pci_vtblk_notify, /* device-wide qnotify */ pci_vtblk_cfgread, /* read PCI config */ pci_vtblk_cfgwrite, /* write PCI config */ + NULL, /* apply negotiated features */ VTBLK_S_HOSTCAPS, /* our capabilities */ }; Modified: head/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_net.c Tue Sep 9 04:00:30 2014 (r271298) +++ head/usr.sbin/bhyve/pci_virtio_net.c Tue Sep 9 04:11:54 2014 (r271299) @@ -160,6 +160,7 @@ static struct virtio_consts vtnet_vi_con NULL, /* device-wide qnotify -- not used */ pci_vtnet_cfgread, /* read PCI config */ pci_vtnet_cfgwrite, /* write PCI config */ + NULL, /* apply negotiated features */ VTNET_S_HOSTCAPS, /* our capabilities */ }; Modified: head/usr.sbin/bhyve/pci_virtio_rnd.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_rnd.c Tue Sep 9 04:00:30 2014 (r271298) +++ head/usr.sbin/bhyve/pci_virtio_rnd.c Tue Sep 9 04:11:54 2014 (r271299) @@ -80,6 +80,7 @@ static struct virtio_consts vtrnd_vi_con pci_vtrnd_notify, /* device-wide qnotify */ NULL, /* read virtio config */ NULL, /* write virtio config */ + NULL, /* apply negotiated features */ 0, /* our capabilities */ }; Modified: head/usr.sbin/bhyve/virtio.c ============================================================================== --- head/usr.sbin/bhyve/virtio.c Tue Sep 9 04:00:30 2014 (r271298) +++ head/usr.sbin/bhyve/virtio.c Tue Sep 9 04:11:54 2014 (r271299) @@ -698,6 +698,9 @@ bad: switch (offset) { case VTCFG_R_GUESTCAP: vs->vs_negotiated_caps = value & vc->vc_hv_caps; + if (vc->vc_apply_features) + (*vc->vc_apply_features)(DEV_SOFTC(vs), + vs->vs_negotiated_caps); break; case VTCFG_R_PFN: if (vs->vs_curq >= vc->vc_nvq) Modified: head/usr.sbin/bhyve/virtio.h ============================================================================== --- head/usr.sbin/bhyve/virtio.h Tue Sep 9 04:00:30 2014 (r271298) +++ head/usr.sbin/bhyve/virtio.h Tue Sep 9 04:11:54 2014 (r271299) @@ -352,6 +352,8 @@ struct virtio_consts { /* called to read config regs */ int (*vc_cfgwrite)(void *, int, int, uint32_t); /* called to write config regs */ + void (*vc_apply_features)(void *, uint64_t); + /* called to apply negotiated features */ uint64_t vc_hv_caps; /* hypervisor-provided capabilities */ }; From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 04:18:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B644FA9; Tue, 9 Sep 2014 04:18: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 3B1579F8; Tue, 9 Sep 2014 04:18: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 s894ILeb007239; Tue, 9 Sep 2014 04:18:21 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s894IKMT007235; Tue, 9 Sep 2014 04:18:20 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201409090418.s894IKMT007235@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 9 Sep 2014 04:18:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271300 - in head/sys: net netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 04:18:21 -0000 Author: adrian Date: Tue Sep 9 04:18:20 2014 New Revision: 271300 URL: http://svnweb.freebsd.org/changeset/base/271300 Log: Update the IPv4 input path to handle reassembled frames and incoming frames with no RSS hash. When doing RSS: * Create a new IPv4 netisr which expects the frames to have been verified; it just directly dispatches to the IPv4 input path. * Once IPv4 reassembly is done, re-calculate the RSS hash with the new IP and L3 header; then reinject it as appropriate. * Update the IPv4 netisr to be a CPU affinity netisr with the RSS hash function (rss_soft_m2cpuid) - this will do a software hash if the hardware doesn't provide one. NICs that don't implement hardware RSS hashing will now benefit from RSS distribution - it'll inject into the correct destination netisr. Note: the netisr distribution doesn't work out of the box - netisr doesn't query RSS for how many CPUs and the affinity setup. Yes, netisr likely shouldn't really be doing CPU stuff anymore and should be "some kind of 'thing' that is a workqueue that may or may not have any CPU affinity"; that's for a later commit. Differential Revision: https://reviews.freebsd.org/D527 Reviewed by: grehan Modified: head/sys/net/netisr.h head/sys/netinet/in_var.h head/sys/netinet/ip_input.c Modified: head/sys/net/netisr.h ============================================================================== --- head/sys/net/netisr.h Tue Sep 9 04:11:54 2014 (r271299) +++ head/sys/net/netisr.h Tue Sep 9 04:18:20 2014 (r271300) @@ -57,6 +57,8 @@ #define NETISR_IPV6 6 #define NETISR_NATM 7 #define NETISR_EPAIR 8 /* if_epair(4) */ +#define NETISR_IP_DIRECT 9 /* direct-dispatch IPv4 */ +#define NETISR_IPV6_DIRECT 10 /* direct-dispatch IPv6 */ /* * Protocol ordering and affinity policy constants. See the detailed Modified: head/sys/netinet/in_var.h ============================================================================== --- head/sys/netinet/in_var.h Tue Sep 9 04:11:54 2014 (r271299) +++ head/sys/netinet/in_var.h Tue Sep 9 04:18:20 2014 (r271300) @@ -411,6 +411,7 @@ void in_rtqdrain(void); int in_addprefix(struct in_ifaddr *, int); int in_scrubprefix(struct in_ifaddr *, u_int); void ip_input(struct mbuf *); +void ip_direct_input(struct mbuf *); void in_ifadown(struct ifaddr *ifa, int); struct mbuf *ip_fastforward(struct mbuf *); void *in_domifattach(struct ifnet *); Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Tue Sep 9 04:11:54 2014 (r271299) +++ head/sys/netinet/ip_input.c Tue Sep 9 04:18:20 2014 (r271300) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ipstealth.h" #include "opt_ipsec.h" #include "opt_route.h" +#include "opt_rss.h" #include #include @@ -77,6 +78,7 @@ __FBSDID("$FreeBSD$"); #ifdef IPSEC #include #endif /* IPSEC */ +#include #include @@ -144,8 +146,32 @@ static struct netisr_handler ip_nh = { .nh_name = "ip", .nh_handler = ip_input, .nh_proto = NETISR_IP, +#ifdef RSS + .nh_m2cpuid = rss_soft_m2cpuid, + .nh_policy = NETISR_POLICY_CPU, + .nh_dispatch = NETISR_DISPATCH_HYBRID, +#else .nh_policy = NETISR_POLICY_FLOW, +#endif +}; + +#ifdef RSS +/* + * Directly dispatched frames are currently assumed + * to have a flowid already calculated. + * + * It should likely have something that assert it + * actually has valid flow details. + */ +static struct netisr_handler ip_direct_nh = { + .nh_name = "ip_direct", + .nh_handler = ip_direct_input, + .nh_proto = NETISR_IP_DIRECT, + .nh_m2cpuid = rss_m2cpuid, + .nh_policy = NETISR_POLICY_CPU, + .nh_dispatch = NETISR_DISPATCH_HYBRID, }; +#endif extern struct domain inetdomain; extern struct protosw inetsw[]; @@ -266,6 +292,46 @@ SYSCTL_PROC(_net_inet_ip, IPCTL_INTRQDRO CTLTYPE_INT|CTLFLAG_RD, 0, 0, sysctl_netinet_intr_queue_drops, "I", "Number of packets dropped from the IP input queue"); +#ifdef RSS +static int +sysctl_netinet_intr_direct_queue_maxlen(SYSCTL_HANDLER_ARGS) +{ + int error, qlimit; + + netisr_getqlimit(&ip_direct_nh, &qlimit); + error = sysctl_handle_int(oidp, &qlimit, 0, req); + if (error || !req->newptr) + return (error); + if (qlimit < 1) + return (EINVAL); + return (netisr_setqlimit(&ip_direct_nh, qlimit)); +} +SYSCTL_PROC(_net_inet_ip, IPCTL_INTRQMAXLEN, intr_direct_queue_maxlen, + CTLTYPE_INT|CTLFLAG_RW, 0, 0, sysctl_netinet_intr_direct_queue_maxlen, "I", + "Maximum size of the IP direct input queue"); + +static int +sysctl_netinet_intr_direct_queue_drops(SYSCTL_HANDLER_ARGS) +{ + u_int64_t qdrops_long; + int error, qdrops; + + netisr_getqdrops(&ip_direct_nh, &qdrops_long); + qdrops = qdrops_long; + error = sysctl_handle_int(oidp, &qdrops, 0, req); + if (error || !req->newptr) + return (error); + if (qdrops != 0) + return (EINVAL); + netisr_clearqdrops(&ip_direct_nh); + return (0); +} + +SYSCTL_PROC(_net_inet_ip, IPCTL_INTRQDROPS, intr_direct_queue_drops, + CTLTYPE_INT|CTLFLAG_RD, 0, 0, sysctl_netinet_intr_direct_queue_drops, "I", + "Number of packets dropped from the IP direct input queue"); +#endif /* RSS */ + /* * IP initialization: fill in IP protocol switch table. * All protocols not implemented in kernel go to raw IP protocol handler. @@ -327,6 +393,9 @@ ip_init(void) /* Initialize various other remaining things. */ IPQ_LOCK_INIT(); netisr_register(&ip_nh); +#ifdef RSS + netisr_register(&ip_direct_nh); +#endif } #ifdef VIMAGE @@ -350,6 +419,28 @@ ip_destroy(void) } #endif +#ifdef RSS +/* + * IP direct input routine. + * + * This is called when reinjecting completed fragments where + * all of the previous checking and book-keeping has been done. + */ +void +ip_direct_input(struct mbuf *m) +{ + struct ip *ip; + int hlen; + + ip = mtod(m, struct ip *); + hlen = ip->ip_hl << 2; + + IPSTAT_INC(ips_delivered); + (*inetsw[ip_protox[ip->ip_p]].pr_input)(&m, &hlen, ip->ip_p); + return; +} +#endif + /* * Ip input routine. Checksum and byte swap header. If fragmented * try to reassemble. Process options. Pass to next level. @@ -463,6 +554,7 @@ tooshort: } else m_adj(m, ip_len - m->m_pkthdr.len); } + #ifdef IPSEC /* * Bypass packet filtering for packets previously handled by IPsec. @@ -817,6 +909,9 @@ ip_reass(struct mbuf *m) int i, hlen, next; u_int8_t ecn, ecn0; u_short hash; +#ifdef RSS + uint32_t rss_hash, rss_type; +#endif /* If maxnipq or maxfragsperpacket are 0, never accept fragments. */ if (V_maxnipq == 0 || V_maxfragsperpacket == 0) { @@ -1106,6 +1201,42 @@ found: m_fixhdr(m); IPSTAT_INC(ips_reassembled); IPQ_UNLOCK(); + +#ifdef RSS + /* + * Query the RSS layer for the flowid / flowtype for the + * mbuf payload. + * + * For now, just assume we have to calculate a new one. + * Later on we should check to see if the assigned flowid matches + * what RSS wants for the given IP protocol and if so, just keep it. + * + * We then queue into the relevant netisr so it can be dispatched + * to the correct CPU. + * + * Note - this may return 1, which means the flowid in the mbuf + * is correct for the configured RSS hash types and can be used. + */ + if (rss_mbuf_software_hash_v4(m, 0, &rss_hash, &rss_type) == 0) { + m->m_pkthdr.flowid = rss_hash; + M_HASHTYPE_SET(m, rss_type); + m->m_flags |= M_FLOWID; + } +#endif + +#ifdef RSS + /* + * Queue/dispatch for reprocessing. + * + * Note: this is much slower than just handling the frame in the + * current receive context. It's likely worth investigating + * why this is. + */ + netisr_dispatch(NETISR_IP_DIRECT, m); + return (NULL); +#endif + + /* Handle in-line */ return (m); dropfrag: From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 04:19:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0AF261A7; Tue, 9 Sep 2014 04:19: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 D0613A08; Tue, 9 Sep 2014 04:19:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s894JaOO007434; Tue, 9 Sep 2014 04:19:36 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s894JalU007433; Tue, 9 Sep 2014 04:19:36 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201409090419.s894JalU007433@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 9 Sep 2014 04:19:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271301 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 04:19:37 -0000 Author: adrian Date: Tue Sep 9 04:19:36 2014 New Revision: 271301 URL: http://svnweb.freebsd.org/changeset/base/271301 Log: Calculate the RSS hash for outbound UDPv4 frames. Differential Revision: https://reviews.freebsd.org/D527 Reviewed by: grehan Modified: head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Tue Sep 9 04:18:20 2014 (r271300) +++ head/sys/netinet/udp_usrreq.c Tue Sep 9 04:19:36 2014 (r271301) @@ -90,6 +90,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef IPSEC #include @@ -207,6 +208,13 @@ void udp_init(void) { + /* + * For now default to 2-tuple UDP hashing - until the fragment + * reassembly code can also update the flowid. + * + * Once we can calculate the flowid that way and re-establish + * a 4-tuple, flip this to 4-tuple. + */ in_pcbinfo_init(&V_udbinfo, "udp", &V_udb, UDBHASHSIZE, UDBHASHSIZE, "udp_inpcb", udp_inpcb_init, NULL, UMA_ZONE_NOFREE, IPI_HASHFIELDS_2TUPLE); @@ -1435,9 +1443,46 @@ udp_output(struct inpcb *inp, struct mbu m->m_flags |= M_FLOWID; m->m_pkthdr.flowid = flowid; M_HASHTYPE_SET(m, flowid_type); +#ifdef RSS + } else { + uint32_t hash_val, hash_type; + /* + * Calculate an appropriate RSS hash for UDP and + * UDP Lite. + * + * The called function will take care of figuring out + * whether a 2-tuple or 4-tuple hash is required based + * on the currently configured scheme. + * + * Later later on connected socket values should be + * cached in the inpcb and reused, rather than constantly + * re-calculating it. + * + * UDP Lite is a different protocol number and will + * likely end up being hashed as a 2-tuple until + * RSS / NICs grow UDP Lite protocol awareness. + */ + if (rss_proto_software_hash_v4(faddr, laddr, fport, lport, + pr, &hash_val, &hash_type) == 0) { + m->m_pkthdr.flowid = hash_val; + m->m_flags |= M_FLOWID; + M_HASHTYPE_SET(m, hash_type); + } +#endif } #ifdef RSS + /* + * Don't override with the inp cached flowid value. + * + * Depending upon the kind of send being done, the inp + * flowid/flowtype values may actually not be appropriate + * for this particular socket send. + * + * We should either leave the flowid at zero (which is what is + * currently done) or set it to some software generated + * hash value based on the packet contents. + */ ipflags |= IP_NODEFAULTFLOWID; #endif /* RSS */ From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 04:20:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6437330; Tue, 9 Sep 2014 04:20:53 +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 87DE6A91; Tue, 9 Sep 2014 04:20:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s894KrKX010511; Tue, 9 Sep 2014 04:20:53 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s894KrIC010510; Tue, 9 Sep 2014 04:20:53 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201409090420.s894KrIC010510@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 9 Sep 2014 04:20:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271302 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 04:20:53 -0000 Author: adrian Date: Tue Sep 9 04:20:53 2014 New Revision: 271302 URL: http://svnweb.freebsd.org/changeset/base/271302 Log: Add basic RSS awareness for the UDPv6 send path. This doesn't include the same kind of userland overriding that the IPv4 path has; nor does it yet know about 2-tuple versus 4-tuple hashing. That'll come later. Differential Revision: https://reviews.freebsd.org/D527 Reviewed by: grehan Modified: head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Tue Sep 9 04:19:36 2014 (r271301) +++ head/sys/netinet6/udp6_usrreq.c Tue Sep 9 04:20:53 2014 (r271302) @@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet6.h" #include "opt_ipfw.h" #include "opt_ipsec.h" +#include "opt_rss.h" #include #include @@ -111,6 +112,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -850,8 +852,30 @@ udp6_output(struct inpcb *inp, struct mb m->m_pkthdr.csum_data = offsetof(struct udphdr, uh_sum); } + /* + * XXX for now assume UDP is 2-tuple. + * Later on this may become configurable as 4-tuple; + * we should support that. + * + * XXX .. and we should likely cache this in the inpcb. + */ +#ifdef RSS + m->m_pkthdr.flowid = rss_hash_ip6_2tuple(*faddr, *laddr); + m->m_flags |= M_FLOWID; + M_HASHTYPE_SET(m, M_HASHTYPE_RSS_IPV6); +#endif flags = 0; +#ifdef RSS + /* + * Don't override with the inp cached flowid. + * + * Until the whole UDP path is vetted, it may actually + * be incorrect. + */ + flags |= IP_NODEFAULTFLOWID; +#endif + UDP_PROBE(send, NULL, inp, ip6, inp, udp6); UDPSTAT_INC(udps_opackets); error = ip6_output(m, optp, NULL, flags, inp->in6p_moptions, From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 05:21:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A10FB33; Tue, 9 Sep 2014 05:21: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 354B0EE4; Tue, 9 Sep 2014 05:21: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 s895LWSR037336; Tue, 9 Sep 2014 05:21:32 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s895LWgQ037335; Tue, 9 Sep 2014 05:21:32 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201409090521.s895LWgQ037335@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Tue, 9 Sep 2014 05:21:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271303 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 05:21:32 -0000 Author: kevlo Date: Tue Sep 9 05:21:31 2014 New Revision: 271303 URL: http://svnweb.freebsd.org/changeset/base/271303 Log: Drop frames that have larger than MCLBYTES. Modified: head/sys/dev/usb/wlan/if_urtwn.c Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Tue Sep 9 04:20:53 2014 (r271302) +++ head/sys/dev/usb/wlan/if_urtwn.c Tue Sep 9 05:21:31 2014 (r271303) @@ -660,6 +660,10 @@ urtwn_rx_frame(struct urtwn_softc *sc, u ifp->if_ierrors++; return (NULL); } + if (pktlen < sizeof(*wh) || pktlen > MCLBYTES) { + ifp->if_ierrors++; + return (NULL); + } rate = MS(rxdw3, R92C_RXDW3_RATE); infosz = MS(rxdw0, R92C_RXDW0_INFOSZ) * 8; From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 08:58:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2185700; Tue, 9 Sep 2014 08:58:20 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D92D56EF; Tue, 9 Sep 2014 08:58:19 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s898wDTa079223 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Sep 2014 11:58:13 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s898wDTa079223 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s898wDVG079222; Tue, 9 Sep 2014 11:58:13 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 9 Sep 2014 11:58:13 +0300 From: Konstantin Belousov To: John Baldwin Subject: Re: svn commit: r270850 - in head/sys: i386/i386 i386/include i386/isa x86/acpica Message-ID: <20140909085813.GC2737@kib.kiev.ua> References: <201408301748.s7UHmc6H059701@svn.freebsd.org> <20140905084305.GN2737@kib.kiev.ua> <201409051044.05853.jhb@freebsd.org> <1432043.pIBGVXe1sj@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fsTlqAwC4TOVu2P/" Content-Disposition: inline In-Reply-To: <1432043.pIBGVXe1sj@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 08:58:20 -0000 --fsTlqAwC4TOVu2P/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 06, 2014 at 04:04:49PM -0400, John Baldwin wrote: > On Friday, September 05, 2014 10:44:05 AM John Baldwin wrote: > > On Friday, September 05, 2014 4:43:05 am Konstantin Belousov wrote: > > > There is one weird detail, not touched by your patch. Amd64 resume > > > path calls initializecpu(), while i386 does not. I do not see any > > > use for the call, the reload of CRX registers by trampoline/resumectx > > > should already set everything to working state. E.g., enabling XMM > > > in CR4 after fpu state is restored looks strange. > >=20 > > I can test that. >=20 > I looked at this, and I actually think calling initializecpu() is correct. > It is true that it will set bits in CR4 that are already set, but it also > does vendor-specific initialization (e.g. init_amd() and init_via() on am= d64 > set MSRs, and on i386 there is a lot more of those, though most of the > CPUs with extra settings probably do not support SMP or run in ACPI syste= ms). > We could either save and restore those various vendor-specific MSRs and= =20 > registers in suspend/resume, or just call initializecpu() to set their va= lues. =20 > The latter approach seems simpler, so I chose that route. In immediate t= erms,=20 > it should fix enabling PG_NX in MSR_EFER on i386 + PAE resume, but it als= o=20 > makes the AP startup case simpler and closer to the amd64 code. I also m= oved=20 > some code that set MSRs out of printcpuinfo() in identcpu.c and into=20 > initializecpu() instead. Finally, I split initializecpucache() out simil= ar to=20 > how it is split on amd64. Ok. Two very minor comments below. >=20 > Ah, I see one bug I will fix in my tree, pc98's machdep.c needs the chang= e to > call initializecpucache(). >=20 > --- //depot/vendor/freebsd/src/sys/i386/i386/initcpu.c > +++ //depot/user/jhb/acpipci/i386/i386/initcpu.c > @@ -59,6 +59,12 @@ > static void init_6x86(void); > #endif /* I486_CPU */ > =20 > +#if defined(I586_CPU) && defined(CPU_WT_ALLOC) > +static void enable_K5_wt_alloc(void); > +static void enable_K6_wt_alloc(void); > +static void enable_K6_2_wt_alloc(void); > +#endif > + > #ifdef I686_CPU > static void init_6x86MX(void); > static void init_ppro(void); > @@ -527,6 +533,8 @@ > intr_restore(saveintr); > } > =20 > +static int ppro_apic_used =3D -1; > + > static void > init_ppro(void) > { > @@ -535,9 +543,29 @@ > /* > * Local APIC should be disabled if it is not going to be used. > */ > - apicbase =3D rdmsr(MSR_APICBASE); > - apicbase &=3D ~APICBASE_ENABLED; > - wrmsr(MSR_APICBASE, apicbase); > + if (ppro_apic_used !=3D 1) { > + apicbase =3D rdmsr(MSR_APICBASE); > + apicbase &=3D ~APICBASE_ENABLED; > + wrmsr(MSR_APICBASE, apicbase); > + ppro_apic_used =3D 0; > + } > +} > + > +/* > + * If the local APIC is going to be used after being disabled above, > + * re-enable it and don't disable it in the future. > + */ > +void > +ppro_reenable_apic(void) > +{ > + u_int64_t apicbase; > + > + if (ppro_apic_used =3D=3D 0) { > + apicbase =3D rdmsr(MSR_APICBASE); > + apicbase |=3D APICBASE_ENABLED; > + wrmsr(MSR_APICBASE, apicbase); > + ppro_apic_used =3D 1; > + } > } > =20 > /* > @@ -646,20 +674,6 @@ > } > #endif > =20 > -/* > - * Initialize CR4 (Control register 4) to enable SSE instructions. > - */ > -void > -enable_sse(void) > -{ > -#if defined(CPU_ENABLE_SSE) > - if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) { > - load_cr4(rcr4() | CR4_FXSR | CR4_XMM); > - cpu_fxsr =3D hw_instruction_sse =3D 1; > - } > -#endif > -} > - > extern int elf32_nxstack; > =20 > void > @@ -692,6 +706,27 @@ > #ifdef I586_CPU > case CPU_586: > switch (cpu_vendor_id) { > + case CPU_VENDOR_AMD: > +#ifdef CPU_WT_ALLOC > + if (((cpu_id & 0x0f0) > 0) && > + ((cpu_id & 0x0f0) < 0x60) && > + ((cpu_id & 0x00f) > 3)) > + enable_K5_wt_alloc(); > + else if (((cpu_id & 0x0f0) > 0x80) || > + (((cpu_id & 0x0f0) =3D=3D 0x80) && > + (cpu_id & 0x00f) > 0x07)) > + enable_K6_2_wt_alloc(); > + else if ((cpu_id & 0x0f0) > 0x50) > + enable_K6_wt_alloc(); > +#endif > + if ((cpu_id & 0xf0) =3D=3D 0xa0) > + /* > + * Make sure the TSC runs through > + * suspension, otherwise we can't use > + * it as timecounter > + */ > + wrmsr(0x1900, rdmsr(0x1900) | 0x20ULL); > + break; Move of the code to initialize CPU from identcpu() to initializecpu() seems to be a fix on its own. Since you are moving the fragments around, would you mind start using CPUID_MODEL/STEPPING etc constants ? The code was ancient, probably predating the defines. > case CPU_VENDOR_CENTAUR: > init_winchip(); > break; > @@ -762,7 +797,17 @@ > default: > break; > } > - enable_sse(); > +#if defined(CPU_ENABLE_SSE) > + if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) { > + load_cr4(rcr4() | CR4_FXSR | CR4_XMM); > + cpu_fxsr =3D hw_instruction_sse =3D 1; > + } > +#endif > +} > + > +void > +initializecpucache(void) > +{ > =20 > /* > * CPUID with %eax =3D 1, %ebx returns > @@ -839,7 +884,7 @@ > * Enable write allocate feature of AMD processors. > * Following two functions require the Maxmem variable being set. > */ > -void > +static void > enable_K5_wt_alloc(void) > { > u_int64_t msr; > @@ -885,7 +930,7 @@ > } > } > =20 > -void > +static void > enable_K6_wt_alloc(void) > { > quad_t size; > @@ -945,7 +990,7 @@ > intr_restore(saveintr); > } > =20 > -void > +static void > enable_K6_2_wt_alloc(void) > { > quad_t size; > --- //depot/vendor/freebsd/src/sys/i386/i386/machdep.c > +++ //depot/user/jhb/acpipci/i386/i386/machdep.c > @@ -2753,6 +2753,7 @@ > setidt(IDT_GP, &IDTVEC(prot), SDT_SYS386TGT, SEL_KPL, > GSEL(GCODE_SEL, SEL_KPL)); > initializecpu(); /* Initialize CPU registers */ > + initializecpucache(); > =20 > /* make an initial tss so cpu can get interrupt stack on syscall! */ > /* Note: -16 is so we can grow the trapframe if we came from vm86 */ > --- //depot/vendor/freebsd/src/sys/i386/i386/mp_machdep.c > +++ //depot/user/jhb/acpipci/i386/i386/mp_machdep.c > @@ -745,25 +745,15 @@ > /* set up CPU registers and state */ > cpu_setregs(); > =20 > + /* set up SSE/NX registers */ > + initializecpu(); > + > /* set up FPU state on the AP */ > npxinit(); > =20 > - /* set up SSE registers */ > - enable_sse(); > - > if (cpu_ops.cpu_init) > cpu_ops.cpu_init(); > =20 > -#ifdef PAE > - /* Enable the PTE no-execute bit. */ > - if ((amd_feature & AMDID_NX) !=3D 0) { > - uint64_t msr; > - > - msr =3D rdmsr(MSR_EFER) | EFER_NXE; > - wrmsr(MSR_EFER, msr); > - } > -#endif > - > /* A quick check from sanity claus */ > cpuid =3D PCPU_GET(cpuid); > if (PCPU_GET(apic_id) !=3D lapic_id()) { > @@ -1528,6 +1518,7 @@ > } else { > npxresume(&susppcbs[cpu]->sp_fpususpend); > pmap_init_pat(); > + initializecpu(); > PCPU_SET(switchtime, 0); > PCPU_SET(switchticks, ticks); > =20 > --- //depot/vendor/freebsd/src/sys/i386/include/md_var.h > +++ //depot/user/jhb/acpipci/i386/include/md_var.h > @@ -99,14 +99,9 @@ > void dump_add_page(vm_paddr_t); > void dump_drop_page(vm_paddr_t); > void finishidentcpu(void); > -#if defined(I586_CPU) && defined(CPU_WT_ALLOC) > -void enable_K5_wt_alloc(void); > -void enable_K6_wt_alloc(void); > -void enable_K6_2_wt_alloc(void); > -#endif > -void enable_sse(void); > void fillw(int /*u_short*/ pat, void *base, size_t cnt); > void initializecpu(void); > +void initializecpucache(void); > void i686_pagezero(void *addr); > void sse2_pagezero(void *addr); > void init_AMD_Elan_sc520(void); > @@ -114,6 +109,7 @@ > int isa_nmi(int cd); > vm_paddr_t kvtop(void *addr); > void panicifcpuunsupported(void); > +void ppro_reenable_apic(void); > void printcpuinfo(void); > void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int=20 > selec); > int user_dbreg_trap(void); > --- //depot/vendor/freebsd/src/sys/i386/xen/mp_machdep.c > +++ //depot/user/jhb/acpipci/i386/xen/mp_machdep.c > @@ -602,17 +602,8 @@ > npxinit(); > #if 0 > =09 > - /* set up SSE registers */ > - enable_sse(); > -#endif > -#if 0 && defined(PAE) > - /* Enable the PTE no-execute bit. */ > - if ((amd_feature & AMDID_NX) !=3D 0) { > - uint64_t msr; > - > - msr =3D rdmsr(MSR_EFER) | EFER_NXE; > - wrmsr(MSR_EFER, msr); > - } > + /* set up SSE/NX registers */ I suggest removing 'registers' from the comment above. > + initializecpu(); > #endif > #if 0 > /* A quick check from sanity claus */ > --- //depot/vendor/freebsd/src/sys/x86/x86/identcpu.c > +++ //depot/user/jhb/acpipci/x86/x86/identcpu.c > @@ -405,30 +405,11 @@ > break; > case 0x5a0: > strcat(cpu_model, "Geode LX"); > - /* > - * Make sure the TSC runs through suspension, > - * otherwise we can't use it as timecounter > - */ > - wrmsr(0x1900, rdmsr(0x1900) | 0x20ULL); > break; > default: > strcat(cpu_model, "Unknown"); > break; > } > -#if defined(I586_CPU) && defined(CPU_WT_ALLOC) > - if ((cpu_id & 0xf00) =3D=3D 0x500) { > - if (((cpu_id & 0x0f0) > 0) > - && ((cpu_id & 0x0f0) < 0x60) > - && ((cpu_id & 0x00f) > 3)) > - enable_K5_wt_alloc(); > - else if (((cpu_id & 0x0f0) > 0x80) > - || (((cpu_id & 0x0f0) =3D=3D 0x80) > - && (cpu_id & 0x00f) > 0x07)) > - enable_K6_2_wt_alloc(); > - else if ((cpu_id & 0x0f0) > 0x50) > - enable_K6_wt_alloc(); > - } > -#endif > #else > if ((cpu_id & 0xf00) =3D=3D 0xf00) > strcat(cpu_model, "AMD64 Processor"); > --- //depot/vendor/freebsd/src/sys/x86/x86/local_apic.c > +++ //depot/user/jhb/acpipci/x86/x86/local_apic.c > @@ -55,7 +55,6 @@ > #include > =20 > #include > -#include > #include > #include > #include > @@ -1331,9 +1330,6 @@ > apic_init(void *dummy __unused) > { > struct apic_enumerator *enumerator; > -#ifndef __amd64__ > - uint64_t apic_base; > -#endif > int retval, best; > =20 > /* We only support built in local APICs. */ > @@ -1375,12 +1371,7 @@ > * CPUs during early startup. We need to turn the local APIC back > * on on such CPUs now. > */ > - if (cpu =3D=3D CPU_686 && cpu_vendor_id =3D=3D CPU_VENDOR_INTEL && > - (cpu_id & 0xff0) =3D=3D 0x610) { > - apic_base =3D rdmsr(MSR_APICBASE); > - apic_base |=3D APICBASE_ENABLED; > - wrmsr(MSR_APICBASE, apic_base); > - } > + ppro_reenable_apic(); > #endif > =20 > /* Probe the CPU's in the system. */ >=20 > --=20 > John Baldwin --fsTlqAwC4TOVu2P/ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUDsElAAoJEJDCuSvBvK1BLb0P/A+X06NBZdnL8a4uM+0JqPCf heLPh3ThbxEc/MFK+oi5i7weAcRZWIAUt5MfwTOJaQWsIgdpBxWMpds8YCXANsEu oZ4EspJ0d53UUWHTogy2sAXsOudm7OR4dA/nrxdKnLg2nGeeaPNWQNmA8IuaDw4B 5wEJvPhM/zO+DjXUXBbakxd8xXNXmuPaPHpel0+BinJuc8jc+nueyvwYjBgccPq/ 0hmEyKs5x0we+hj2ccNS1yMj5tQm70hRDCHryWejUErFMkNFXKAIXoOtpNaJH8SO nPTSDeYBSSe69fV0ZYX5b6eWgtSYZd9d8mF5vwwXh8b2xHk1XgCl0DQsFF/lzrDH xNyz5U7bNmYsxqKZM5rp2FFWnbiWEOWq0nZSuweIarWUJ8jc40D008gZyS5olQY9 njugD/qBKZqZAVHB31pEa2Olfq1Jj/WcKeh3A+gGjsazemBeq2q8NZaQYCY4qliT vOo6WDclrcQdII1AKwWbGPvZbiXtYQZ/f0OkSa6WedF8NiVJcSIcE/mcW75Sh0eD IU7mAevI+C0ksQvdWdmNS4jBocoXWGJ+vMPacaUcA60JGenADlulMwO6kWr4pbZ2 ULEVqMcdOZa5AuSQuoHXUd5E6CT67jep7wM628GLi7shOIuquVGhtaxtZppzReRG J50GwcBt+NZiwNLtdrle =U/AS -----END PGP SIGNATURE----- --fsTlqAwC4TOVu2P/-- From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 10:09:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4ED7B9CF; Tue, 9 Sep 2014 10:09:50 +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 384E5DF1; Tue, 9 Sep 2014 10:09:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89A9ok9066758; Tue, 9 Sep 2014 10:09:50 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89A9k8I066731; Tue, 9 Sep 2014 10:09:46 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409091009.s89A9k8I066731@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 9 Sep 2014 10:09:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r271304 - in releng/10.0: . crypto/openssl/crypto/asn1 crypto/openssl/crypto/objects crypto/openssl/crypto/srp crypto/openssl/ssl sys/conf X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 10:09:50 -0000 Author: delphij Date: Tue Sep 9 10:09:46 2014 New Revision: 271304 URL: http://svnweb.freebsd.org/changeset/base/271304 Log: Fix multiple OpenSSL vulnerabilities: The receipt of a specifically crafted DTLS handshake message may cause OpenSSL to consume large amounts of memory. [CVE-2014-3506] The receipt of a specifically crafted DTLS packet could cause OpenSSL to leak memory. [CVE-2014-3507] A flaw in OBJ_obj2txt may cause pretty printing functions such as X509_name_oneline, X509_name_print_ex et al. to leak some information from the stack. [CVE-2014-3508] OpenSSL DTLS clients enabling anonymous (EC)DH ciphersuites are subject to a denial of service attack. [CVE-2014-3510] If a multithreaded client connects to a malicious server using a resumed session and the server sends an ec point format extension it could write up to 255 bytes to freed memory. [CVE-2014-3509] A flaw in the OpenSSL SSL/TLS server code causes the server to negotiate TLS 1.0 instead of higher protocol versions when the ClientHello message is badly fragmented. [CVE-2014-3511] A malicious client or server can send invalid SRP parameters and overrun an internal buffer. [CVE-2014-3512] A malicious server can crash the client with a NULL pointer dereference by specifying a SRP ciphersuite even though it was not properly negotiated with the client. [CVE-2014-5139] Security: CVE-2014-3506, CVE-2014-3507, CVE-2014-3508, CVE-2014-3510, CVE-2014-3509, CVE-2014-3511, CVE-2014-3512, CVE-2014-5139 Security: FreeBSD-SA-14:18.openssl Approved by: so Modified: releng/10.0/UPDATING releng/10.0/crypto/openssl/crypto/asn1/a_object.c releng/10.0/crypto/openssl/crypto/objects/obj_dat.c releng/10.0/crypto/openssl/crypto/srp/srp_lib.c releng/10.0/crypto/openssl/ssl/d1_both.c releng/10.0/crypto/openssl/ssl/d1_clnt.c releng/10.0/crypto/openssl/ssl/s23_srvr.c releng/10.0/crypto/openssl/ssl/s3_clnt.c releng/10.0/crypto/openssl/ssl/s3_lib.c releng/10.0/crypto/openssl/ssl/s3_srvr.c releng/10.0/crypto/openssl/ssl/ssl.h releng/10.0/crypto/openssl/ssl/ssl_ciph.c releng/10.0/crypto/openssl/ssl/ssl_err.c releng/10.0/crypto/openssl/ssl/ssl_lib.c releng/10.0/crypto/openssl/ssl/ssl_locl.h releng/10.0/crypto/openssl/ssl/t1_lib.c releng/10.0/crypto/openssl/ssl/tls_srp.c releng/10.0/sys/conf/newvers.sh Modified: releng/10.0/UPDATING ============================================================================== --- releng/10.0/UPDATING Tue Sep 9 05:21:31 2014 (r271303) +++ releng/10.0/UPDATING Tue Sep 9 10:09:46 2014 (r271304) @@ -16,6 +16,9 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20140909: p8 FreeBSD-SA-14:18.openssl + Fix OpenSSL multiple vulnerabilities. [SA-14:18] + 20140708: p7 FreeBSD-SA-14:17.kmem Fix kernel memory disclosure in control messages and SCTP notifications. [SA-14:17] Modified: releng/10.0/crypto/openssl/crypto/asn1/a_object.c ============================================================================== --- releng/10.0/crypto/openssl/crypto/asn1/a_object.c Tue Sep 9 05:21:31 2014 (r271303) +++ releng/10.0/crypto/openssl/crypto/asn1/a_object.c Tue Sep 9 10:09:46 2014 (r271304) @@ -283,17 +283,29 @@ err: ASN1err(ASN1_F_D2I_ASN1_OBJECT,i); return(NULL); } + ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, long len) { ASN1_OBJECT *ret=NULL; const unsigned char *p; unsigned char *data; - int i; - /* Sanity check OID encoding: can't have leading 0x80 in - * subidentifiers, see: X.690 8.19.2 + int i, length; + + /* Sanity check OID encoding. + * Need at least one content octet. + * MSB must be clear in the last octet. + * can't have leading 0x80 in subidentifiers, see: X.690 8.19.2 */ - for (i = 0, p = *pp; i < len; i++, p++) + if (len <= 0 || len > INT_MAX || pp == NULL || (p = *pp) == NULL || + p[len - 1] & 0x80) + { + ASN1err(ASN1_F_C2I_ASN1_OBJECT,ASN1_R_INVALID_OBJECT_ENCODING); + return NULL; + } + /* Now 0 < len <= INT_MAX, so the cast is safe. */ + length = (int)len; + for (i = 0; i < length; i++, p++) { if (*p == 0x80 && (!i || !(p[-1] & 0x80))) { @@ -316,23 +328,23 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT data = (unsigned char *)ret->data; ret->data = NULL; /* once detached we can change it */ - if ((data == NULL) || (ret->length < len)) + if ((data == NULL) || (ret->length < length)) { ret->length=0; if (data != NULL) OPENSSL_free(data); - data=(unsigned char *)OPENSSL_malloc(len ? (int)len : 1); + data=(unsigned char *)OPENSSL_malloc(length); if (data == NULL) { i=ERR_R_MALLOC_FAILURE; goto err; } ret->flags|=ASN1_OBJECT_FLAG_DYNAMIC_DATA; } - memcpy(data,p,(int)len); + memcpy(data,p,length); /* reattach data to object, after which it remains const */ ret->data =data; - ret->length=(int)len; + ret->length=length; ret->sn=NULL; ret->ln=NULL; /* ret->flags=ASN1_OBJECT_FLAG_DYNAMIC; we know it is dynamic */ - p+=len; + p+=length; if (a != NULL) (*a)=ret; *pp=p; Modified: releng/10.0/crypto/openssl/crypto/objects/obj_dat.c ============================================================================== --- releng/10.0/crypto/openssl/crypto/objects/obj_dat.c Tue Sep 9 05:21:31 2014 (r271303) +++ releng/10.0/crypto/openssl/crypto/objects/obj_dat.c Tue Sep 9 10:09:46 2014 (r271304) @@ -471,11 +471,12 @@ int OBJ_obj2txt(char *buf, int buf_len, const unsigned char *p; char tbuf[DECIMAL_SIZE(i)+DECIMAL_SIZE(l)+2]; - if ((a == NULL) || (a->data == NULL)) { - buf[0]='\0'; - return(0); - } + /* Ensure that, at every state, |buf| is NUL-terminated. */ + if (buf && buf_len > 0) + buf[0] = '\0'; + if ((a == NULL) || (a->data == NULL)) + return(0); if (!no_name && (nid=OBJ_obj2nid(a)) != NID_undef) { @@ -554,9 +555,10 @@ int OBJ_obj2txt(char *buf, int buf_len, i=(int)(l/40); l-=(long)(i*40); } - if (buf && (buf_len > 0)) + if (buf && (buf_len > 1)) { *buf++ = i + '0'; + *buf = '\0'; buf_len--; } n++; @@ -571,9 +573,10 @@ int OBJ_obj2txt(char *buf, int buf_len, i = strlen(bndec); if (buf) { - if (buf_len > 0) + if (buf_len > 1) { *buf++ = '.'; + *buf = '\0'; buf_len--; } BUF_strlcpy(buf,bndec,buf_len); @@ -807,4 +810,3 @@ err: OPENSSL_free(buf); return(ok); } - Modified: releng/10.0/crypto/openssl/crypto/srp/srp_lib.c ============================================================================== --- releng/10.0/crypto/openssl/crypto/srp/srp_lib.c Tue Sep 9 05:21:31 2014 (r271303) +++ releng/10.0/crypto/openssl/crypto/srp/srp_lib.c Tue Sep 9 10:09:46 2014 (r271304) @@ -85,6 +85,9 @@ static BIGNUM *srp_Calc_k(BIGNUM *N, BIG int longg ; int longN = BN_num_bytes(N); + if (BN_ucmp(g, N) >= 0) + return NULL; + if ((tmp = OPENSSL_malloc(longN)) == NULL) return NULL; BN_bn2bin(N,tmp) ; @@ -117,6 +120,9 @@ BIGNUM *SRP_Calc_u(BIGNUM *A, BIGNUM *B, if ((A == NULL) ||(B == NULL) || (N == NULL)) return NULL; + if (BN_ucmp(A, N) >= 0 || BN_ucmp(B, N) >= 0) + return NULL; + longN= BN_num_bytes(N); if ((cAB = OPENSSL_malloc(2*longN)) == NULL) Modified: releng/10.0/crypto/openssl/ssl/d1_both.c ============================================================================== --- releng/10.0/crypto/openssl/ssl/d1_both.c Tue Sep 9 05:21:31 2014 (r271303) +++ releng/10.0/crypto/openssl/ssl/d1_both.c Tue Sep 9 10:09:46 2014 (r271304) @@ -586,29 +586,32 @@ dtls1_retrieve_buffered_fragment(SSL *s, return 0; } +/* dtls1_max_handshake_message_len returns the maximum number of bytes + * permitted in a DTLS handshake message for |s|. The minimum is 16KB, but may + * be greater if the maximum certificate list size requires it. */ +static unsigned long dtls1_max_handshake_message_len(const SSL *s) + { + unsigned long max_len = DTLS1_HM_HEADER_LENGTH + SSL3_RT_MAX_ENCRYPTED_LENGTH; + if (max_len < (unsigned long)s->max_cert_list) + return s->max_cert_list; + return max_len; + } static int -dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok) +dtls1_reassemble_fragment(SSL *s, const struct hm_header_st* msg_hdr, int *ok) { hm_fragment *frag = NULL; pitem *item = NULL; int i = -1, is_complete; unsigned char seq64be[8]; - unsigned long frag_len = msg_hdr->frag_len, max_len; + unsigned long frag_len = msg_hdr->frag_len; - if ((msg_hdr->frag_off+frag_len) > msg_hdr->msg_len) + if ((msg_hdr->frag_off+frag_len) > msg_hdr->msg_len || + msg_hdr->msg_len > dtls1_max_handshake_message_len(s)) goto err; - /* Determine maximum allowed message size. Depends on (user set) - * maximum certificate length, but 16k is minimum. - */ - if (DTLS1_HM_HEADER_LENGTH + SSL3_RT_MAX_ENCRYPTED_LENGTH < s->max_cert_list) - max_len = s->max_cert_list; - else - max_len = DTLS1_HM_HEADER_LENGTH + SSL3_RT_MAX_ENCRYPTED_LENGTH; - - if ((msg_hdr->frag_off+frag_len) > max_len) - goto err; + if (frag_len == 0) + return DTLS1_HM_FRAGMENT_RETRY; /* Try to find item in queue */ memset(seq64be,0,sizeof(seq64be)); @@ -638,7 +641,8 @@ dtls1_reassemble_fragment(SSL *s, struct /* If message is already reassembled, this must be a - * retransmit and can be dropped. + * retransmit and can be dropped. In this case item != NULL and so frag + * does not need to be freed. */ if (frag->reassembly == NULL) { @@ -658,7 +662,9 @@ dtls1_reassemble_fragment(SSL *s, struct /* read the body of the fragment (header has already been read */ i = s->method->ssl_read_bytes(s,SSL3_RT_HANDSHAKE, frag->fragment + msg_hdr->frag_off,frag_len,0); - if (i<=0 || (unsigned long)i!=frag_len) + if ((unsigned long)i!=frag_len) + i=-1; + if (i<=0) goto err; RSMBLY_BITMASK_MARK(frag->reassembly, (long)msg_hdr->frag_off, @@ -675,10 +681,6 @@ dtls1_reassemble_fragment(SSL *s, struct if (item == NULL) { - memset(seq64be,0,sizeof(seq64be)); - seq64be[6] = (unsigned char)(msg_hdr->seq>>8); - seq64be[7] = (unsigned char)(msg_hdr->seq); - item = pitem_new(seq64be, frag); if (item == NULL) { @@ -686,21 +688,25 @@ dtls1_reassemble_fragment(SSL *s, struct i = -1; } - pqueue_insert(s->d1->buffered_messages, item); + item = pqueue_insert(s->d1->buffered_messages, item); + /* pqueue_insert fails iff a duplicate item is inserted. + * However, |item| cannot be a duplicate. If it were, + * |pqueue_find|, above, would have returned it and control + * would never have reached this branch. */ + OPENSSL_assert(item != NULL); } return DTLS1_HM_FRAGMENT_RETRY; err: - if (frag != NULL) dtls1_hm_fragment_free(frag); - if (item != NULL) OPENSSL_free(item); + if (frag != NULL && item == NULL) dtls1_hm_fragment_free(frag); *ok = 0; return i; } static int -dtls1_process_out_of_seq_message(SSL *s, struct hm_header_st* msg_hdr, int *ok) +dtls1_process_out_of_seq_message(SSL *s, const struct hm_header_st* msg_hdr, int *ok) { int i=-1; hm_fragment *frag = NULL; @@ -720,7 +726,7 @@ dtls1_process_out_of_seq_message(SSL *s, /* If we already have an entry and this one is a fragment, * don't discard it and rather try to reassemble it. */ - if (item != NULL && frag_len < msg_hdr->msg_len) + if (item != NULL && frag_len != msg_hdr->msg_len) item = NULL; /* Discard the message if sequence number was already there, is @@ -745,9 +751,12 @@ dtls1_process_out_of_seq_message(SSL *s, } else { - if (frag_len && frag_len < msg_hdr->msg_len) + if (frag_len != msg_hdr->msg_len) return dtls1_reassemble_fragment(s, msg_hdr, ok); + if (frag_len > dtls1_max_handshake_message_len(s)) + goto err; + frag = dtls1_hm_fragment_new(frag_len, 0); if ( frag == NULL) goto err; @@ -759,26 +768,31 @@ dtls1_process_out_of_seq_message(SSL *s, /* read the body of the fragment (header has already been read */ i = s->method->ssl_read_bytes(s,SSL3_RT_HANDSHAKE, frag->fragment,frag_len,0); - if (i<=0 || (unsigned long)i!=frag_len) + if ((unsigned long)i!=frag_len) + i = -1; + if (i<=0) goto err; } - memset(seq64be,0,sizeof(seq64be)); - seq64be[6] = (unsigned char)(msg_hdr->seq>>8); - seq64be[7] = (unsigned char)(msg_hdr->seq); - item = pitem_new(seq64be, frag); if ( item == NULL) goto err; - pqueue_insert(s->d1->buffered_messages, item); + item = pqueue_insert(s->d1->buffered_messages, item); + /* pqueue_insert fails iff a duplicate item is inserted. + * However, |item| cannot be a duplicate. If it were, + * |pqueue_find|, above, would have returned it. Then, either + * |frag_len| != |msg_hdr->msg_len| in which case |item| is set + * to NULL and it will have been processed with + * |dtls1_reassemble_fragment|, above, or the record will have + * been discarded. */ + OPENSSL_assert(item != NULL); } return DTLS1_HM_FRAGMENT_RETRY; err: - if ( frag != NULL) dtls1_hm_fragment_free(frag); - if ( item != NULL) OPENSSL_free(item); + if (frag != NULL && item == NULL) dtls1_hm_fragment_free(frag); *ok = 0; return i; } Modified: releng/10.0/crypto/openssl/ssl/d1_clnt.c ============================================================================== --- releng/10.0/crypto/openssl/ssl/d1_clnt.c Tue Sep 9 05:21:31 2014 (r271303) +++ releng/10.0/crypto/openssl/ssl/d1_clnt.c Tue Sep 9 10:09:46 2014 (r271304) @@ -982,6 +982,13 @@ int dtls1_send_client_key_exchange(SSL * RSA *rsa; unsigned char tmp_buf[SSL_MAX_MASTER_KEY_LENGTH]; + if (s->session->sess_cert == NULL) + { + /* We should always have a server certificate with SSL_kRSA. */ + SSLerr(SSL_F_DTLS1_SEND_CLIENT_KEY_EXCHANGE,ERR_R_INTERNAL_ERROR); + goto err; + } + if (s->session->sess_cert->peer_rsa_tmp != NULL) rsa=s->session->sess_cert->peer_rsa_tmp; else @@ -1172,6 +1179,13 @@ int dtls1_send_client_key_exchange(SSL * { DH *dh_srvr,*dh_clnt; + if (s->session->sess_cert == NULL) + { + ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_UNEXPECTED_MESSAGE); + SSLerr(SSL_F_DTLS1_SEND_CLIENT_KEY_EXCHANGE,SSL_R_UNEXPECTED_MESSAGE); + goto err; + } + if (s->session->sess_cert->peer_dh_tmp != NULL) dh_srvr=s->session->sess_cert->peer_dh_tmp; else @@ -1231,6 +1245,13 @@ int dtls1_send_client_key_exchange(SSL * int ecdh_clnt_cert = 0; int field_size = 0; + if (s->session->sess_cert == NULL) + { + ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_UNEXPECTED_MESSAGE); + SSLerr(SSL_F_DTLS1_SEND_CLIENT_KEY_EXCHANGE,SSL_R_UNEXPECTED_MESSAGE); + goto err; + } + /* Did we send out the client's * ECDH share for use in premaster * computation as part of client certificate? @@ -1706,5 +1727,3 @@ int dtls1_send_client_certificate(SSL *s /* SSL3_ST_CW_CERT_D */ return(dtls1_do_write(s,SSL3_RT_HANDSHAKE)); } - - Modified: releng/10.0/crypto/openssl/ssl/s23_srvr.c ============================================================================== --- releng/10.0/crypto/openssl/ssl/s23_srvr.c Tue Sep 9 05:21:31 2014 (r271303) +++ releng/10.0/crypto/openssl/ssl/s23_srvr.c Tue Sep 9 10:09:46 2014 (r271304) @@ -348,23 +348,19 @@ int ssl23_get_client_hello(SSL *s) * Client Hello message, this would be difficult, and we'd have * to read more records to find out. * No known SSL 3.0 client fragments ClientHello like this, - * so we simply assume TLS 1.0 to avoid protocol version downgrade - * attacks. */ + * so we simply reject such connections to avoid + * protocol version downgrade attacks. */ if (p[3] == 0 && p[4] < 6) { -#if 0 SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_RECORD_TOO_SMALL); goto err; -#else - v[1] = TLS1_VERSION_MINOR; -#endif } /* if major version number > 3 set minor to a value * which will use the highest version 3 we support. * If TLS 2.0 ever appears we will need to revise * this.... */ - else if (p[9] > SSL3_VERSION_MAJOR) + if (p[9] > SSL3_VERSION_MAJOR) v[1]=0xff; else v[1]=p[10]; /* minor version according to client_version */ @@ -444,14 +440,34 @@ int ssl23_get_client_hello(SSL *s) v[0] = p[3]; /* == SSL3_VERSION_MAJOR */ v[1] = p[4]; + /* An SSLv3/TLSv1 backwards-compatible CLIENT-HELLO in an SSLv2 + * header is sent directly on the wire, not wrapped as a TLS + * record. It's format is: + * Byte Content + * 0-1 msg_length + * 2 msg_type + * 3-4 version + * 5-6 cipher_spec_length + * 7-8 session_id_length + * 9-10 challenge_length + * ... ... + */ n=((p[0]&0x7f)<<8)|p[1]; if (n > (1024*4)) { SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_RECORD_TOO_LARGE); goto err; } + if (n < 9) + { + SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_RECORD_LENGTH_MISMATCH); + goto err; + } j=ssl23_read_bytes(s,n+2); + /* We previously read 11 bytes, so if j > 0, we must have + * j == n+2 == s->packet_length. We have at least 11 valid + * packet bytes. */ if (j <= 0) return(j); ssl3_finish_mac(s, s->packet+2, s->packet_length-2); Modified: releng/10.0/crypto/openssl/ssl/s3_clnt.c ============================================================================== --- releng/10.0/crypto/openssl/ssl/s3_clnt.c Tue Sep 9 05:21:31 2014 (r271303) +++ releng/10.0/crypto/openssl/ssl/s3_clnt.c Tue Sep 9 10:09:46 2014 (r271304) @@ -953,6 +953,15 @@ int ssl3_get_server_hello(SSL *s) SSLerr(SSL_F_SSL3_GET_SERVER_HELLO,SSL_R_WRONG_CIPHER_RETURNED); goto f_err; } +#ifndef OPENSSL_NO_SRP + if (((c->algorithm_mkey & SSL_kSRP) || (c->algorithm_auth & SSL_aSRP)) && + !(s->srp_ctx.srp_Mask & SSL_kSRP)) + { + al=SSL_AD_ILLEGAL_PARAMETER; + SSLerr(SSL_F_SSL3_GET_SERVER_HELLO,SSL_R_WRONG_CIPHER_RETURNED); + goto f_err; + } +#endif /* OPENSSL_NO_SRP */ p+=ssl_put_cipher_by_char(s,NULL,NULL); sk=ssl_get_ciphers_by_id(s); @@ -1459,6 +1468,12 @@ int ssl3_get_key_exchange(SSL *s) p+=i; n-=param_len; + if (!srp_verify_server_param(s, &al)) + { + SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_BAD_SRP_PARAMETERS); + goto f_err; + } + /* We must check if there is a certificate */ #ifndef OPENSSL_NO_RSA if (alg_a & SSL_aRSA) @@ -2252,6 +2267,13 @@ int ssl3_send_client_key_exchange(SSL *s RSA *rsa; unsigned char tmp_buf[SSL_MAX_MASTER_KEY_LENGTH]; + if (s->session->sess_cert == NULL) + { + /* We should always have a server certificate with SSL_kRSA. */ + SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_INTERNAL_ERROR); + goto err; + } + if (s->session->sess_cert->peer_rsa_tmp != NULL) rsa=s->session->sess_cert->peer_rsa_tmp; else Modified: releng/10.0/crypto/openssl/ssl/s3_lib.c ============================================================================== --- releng/10.0/crypto/openssl/ssl/s3_lib.c Tue Sep 9 05:21:31 2014 (r271303) +++ releng/10.0/crypto/openssl/ssl/s3_lib.c Tue Sep 9 10:09:46 2014 (r271304) @@ -2426,7 +2426,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] TLS1_TXT_SRP_SHA_WITH_3DES_EDE_CBC_SHA, TLS1_CK_SRP_SHA_WITH_3DES_EDE_CBC_SHA, SSL_kSRP, - SSL_aNULL, + SSL_aSRP, SSL_3DES, SSL_SHA1, SSL_TLSV1, @@ -2474,7 +2474,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] TLS1_TXT_SRP_SHA_WITH_AES_128_CBC_SHA, TLS1_CK_SRP_SHA_WITH_AES_128_CBC_SHA, SSL_kSRP, - SSL_aNULL, + SSL_aSRP, SSL_AES128, SSL_SHA1, SSL_TLSV1, @@ -2522,7 +2522,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] TLS1_TXT_SRP_SHA_WITH_AES_256_CBC_SHA, TLS1_CK_SRP_SHA_WITH_AES_256_CBC_SHA, SSL_kSRP, - SSL_aNULL, + SSL_aSRP, SSL_AES256, SSL_SHA1, SSL_TLSV1, Modified: releng/10.0/crypto/openssl/ssl/s3_srvr.c ============================================================================== --- releng/10.0/crypto/openssl/ssl/s3_srvr.c Tue Sep 9 05:21:31 2014 (r271303) +++ releng/10.0/crypto/openssl/ssl/s3_srvr.c Tue Sep 9 10:09:46 2014 (r271304) @@ -2798,6 +2798,13 @@ int ssl3_get_client_key_exchange(SSL *s) SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,ERR_R_BN_LIB); goto err; } + if (BN_ucmp(s->srp_ctx.A, s->srp_ctx.N) >= 0 + || BN_is_zero(s->srp_ctx.A)) + { + al=SSL_AD_ILLEGAL_PARAMETER; + SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_SRP_PARAMETERS); + goto f_err; + } if (s->session->srp_username != NULL) OPENSSL_free(s->session->srp_username); s->session->srp_username = BUF_strdup(s->srp_ctx.login); Modified: releng/10.0/crypto/openssl/ssl/ssl.h ============================================================================== --- releng/10.0/crypto/openssl/ssl/ssl.h Tue Sep 9 05:21:31 2014 (r271303) +++ releng/10.0/crypto/openssl/ssl/ssl.h Tue Sep 9 10:09:46 2014 (r271304) @@ -264,6 +264,7 @@ extern "C" { #define SSL_TXT_aGOST94 "aGOST94" #define SSL_TXT_aGOST01 "aGOST01" #define SSL_TXT_aGOST "aGOST" +#define SSL_TXT_aSRP "aSRP" #define SSL_TXT_DSS "DSS" #define SSL_TXT_DH "DH" @@ -2309,6 +2310,7 @@ void ERR_load_SSL_strings(void); #define SSL_R_BAD_SRP_B_LENGTH 348 #define SSL_R_BAD_SRP_G_LENGTH 349 #define SSL_R_BAD_SRP_N_LENGTH 350 +#define SSL_R_BAD_SRP_PARAMETERS 371 #define SSL_R_BAD_SRP_S_LENGTH 351 #define SSL_R_BAD_SRTP_MKI_VALUE 352 #define SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST 353 Modified: releng/10.0/crypto/openssl/ssl/ssl_ciph.c ============================================================================== --- releng/10.0/crypto/openssl/ssl/ssl_ciph.c Tue Sep 9 05:21:31 2014 (r271303) +++ releng/10.0/crypto/openssl/ssl/ssl_ciph.c Tue Sep 9 10:09:46 2014 (r271304) @@ -270,6 +270,7 @@ static const SSL_CIPHER cipher_aliases[] {0,SSL_TXT_aGOST94,0,0,SSL_aGOST94,0,0,0,0,0,0,0}, {0,SSL_TXT_aGOST01,0,0,SSL_aGOST01,0,0,0,0,0,0,0}, {0,SSL_TXT_aGOST,0,0,SSL_aGOST94|SSL_aGOST01,0,0,0,0,0,0,0}, + {0,SSL_TXT_aSRP,0, 0,SSL_aSRP, 0,0,0,0,0,0,0}, /* aliases combining key exchange and server authentication */ {0,SSL_TXT_EDH,0, SSL_kEDH,~SSL_aNULL,0,0,0,0,0,0,0}, @@ -1628,6 +1629,9 @@ char *SSL_CIPHER_description(const SSL_C case SSL_aPSK: au="PSK"; break; + case SSL_aSRP: + au="SRP"; + break; default: au="unknown"; break; Modified: releng/10.0/crypto/openssl/ssl/ssl_err.c ============================================================================== --- releng/10.0/crypto/openssl/ssl/ssl_err.c Tue Sep 9 05:21:31 2014 (r271303) +++ releng/10.0/crypto/openssl/ssl/ssl_err.c Tue Sep 9 10:09:46 2014 (r271304) @@ -329,6 +329,7 @@ static ERR_STRING_DATA SSL_str_reasons[] {ERR_REASON(SSL_R_BAD_SRP_B_LENGTH) ,"bad srp b length"}, {ERR_REASON(SSL_R_BAD_SRP_G_LENGTH) ,"bad srp g length"}, {ERR_REASON(SSL_R_BAD_SRP_N_LENGTH) ,"bad srp n length"}, +{ERR_REASON(SSL_R_BAD_SRP_PARAMETERS) ,"bad srp parameters"}, {ERR_REASON(SSL_R_BAD_SRP_S_LENGTH) ,"bad srp s length"}, {ERR_REASON(SSL_R_BAD_SRTP_MKI_VALUE) ,"bad srtp mki value"}, {ERR_REASON(SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST),"bad srtp protection profile list"}, Modified: releng/10.0/crypto/openssl/ssl/ssl_lib.c ============================================================================== --- releng/10.0/crypto/openssl/ssl/ssl_lib.c Tue Sep 9 05:21:31 2014 (r271303) +++ releng/10.0/crypto/openssl/ssl/ssl_lib.c Tue Sep 9 10:09:46 2014 (r271304) @@ -1402,6 +1402,11 @@ int ssl_cipher_list_to_bytes(SSL *s,STAC s->psk_client_callback == NULL) continue; #endif /* OPENSSL_NO_PSK */ +#ifndef OPENSSL_NO_SRP + if (((c->algorithm_mkey & SSL_kSRP) || (c->algorithm_auth & SSL_aSRP)) && + !(s->srp_ctx.srp_Mask & SSL_kSRP)) + continue; +#endif /* OPENSSL_NO_SRP */ j = put_cb ? put_cb(c,p) : ssl_put_cipher_by_char(s,c,p); p+=j; } Modified: releng/10.0/crypto/openssl/ssl/ssl_locl.h ============================================================================== --- releng/10.0/crypto/openssl/ssl/ssl_locl.h Tue Sep 9 05:21:31 2014 (r271303) +++ releng/10.0/crypto/openssl/ssl/ssl_locl.h Tue Sep 9 10:09:46 2014 (r271304) @@ -311,6 +311,7 @@ #define SSL_aPSK 0x00000080L /* PSK auth */ #define SSL_aGOST94 0x00000100L /* GOST R 34.10-94 signature auth */ #define SSL_aGOST01 0x00000200L /* GOST R 34.10-2001 signature auth */ +#define SSL_aSRP 0x00000400L /* SRP auth */ /* Bits for algorithm_enc (symmetric encryption) */ @@ -1173,4 +1174,6 @@ void tls_fips_digest_extra( const EVP_CIPHER_CTX *cipher_ctx, EVP_MD_CTX *mac_ctx, const unsigned char *data, size_t data_len, size_t orig_len); +int srp_verify_server_param(SSL *s, int *al); + #endif Modified: releng/10.0/crypto/openssl/ssl/t1_lib.c ============================================================================== --- releng/10.0/crypto/openssl/ssl/t1_lib.c Tue Sep 9 05:21:31 2014 (r271303) +++ releng/10.0/crypto/openssl/ssl/t1_lib.c Tue Sep 9 10:09:46 2014 (r271304) @@ -1446,15 +1446,18 @@ int ssl_parse_serverhello_tlsext(SSL *s, *al = TLS1_AD_DECODE_ERROR; return 0; } - s->session->tlsext_ecpointformatlist_length = 0; - if (s->session->tlsext_ecpointformatlist != NULL) OPENSSL_free(s->session->tlsext_ecpointformatlist); - if ((s->session->tlsext_ecpointformatlist = OPENSSL_malloc(ecpointformatlist_length)) == NULL) + if (!s->hit) { - *al = TLS1_AD_INTERNAL_ERROR; - return 0; + s->session->tlsext_ecpointformatlist_length = 0; + if (s->session->tlsext_ecpointformatlist != NULL) OPENSSL_free(s->session->tlsext_ecpointformatlist); + if ((s->session->tlsext_ecpointformatlist = OPENSSL_malloc(ecpointformatlist_length)) == NULL) + { + *al = TLS1_AD_INTERNAL_ERROR; + return 0; + } + s->session->tlsext_ecpointformatlist_length = ecpointformatlist_length; + memcpy(s->session->tlsext_ecpointformatlist, sdata, ecpointformatlist_length); } - s->session->tlsext_ecpointformatlist_length = ecpointformatlist_length; - memcpy(s->session->tlsext_ecpointformatlist, sdata, ecpointformatlist_length); #if 0 fprintf(stderr,"ssl_parse_serverhello_tlsext s->session->tlsext_ecpointformatlist "); sdata = s->session->tlsext_ecpointformatlist; Modified: releng/10.0/crypto/openssl/ssl/tls_srp.c ============================================================================== --- releng/10.0/crypto/openssl/ssl/tls_srp.c Tue Sep 9 05:21:31 2014 (r271303) +++ releng/10.0/crypto/openssl/ssl/tls_srp.c Tue Sep 9 10:09:46 2014 (r271304) @@ -408,16 +408,46 @@ err: return ret; } -int SRP_Calc_A_param(SSL *s) +int srp_verify_server_param(SSL *s, int *al) { - unsigned char rnd[SSL_MAX_MASTER_KEY_LENGTH]; + SRP_CTX *srp = &s->srp_ctx; + /* Sanity check parameters: we can quickly check B % N == 0 + * by checking B != 0 since B < N + */ + if (BN_ucmp(srp->g, srp->N) >=0 || BN_ucmp(srp->B, srp->N) >= 0 + || BN_is_zero(srp->B)) + { + *al = SSL3_AD_ILLEGAL_PARAMETER; + return 0; + } + + if (BN_num_bits(srp->N) < srp->strength) + { + *al = TLS1_AD_INSUFFICIENT_SECURITY; + return 0; + } + + if (srp->SRP_verify_param_callback) + { + if (srp->SRP_verify_param_callback(s, srp->SRP_cb_arg) <= 0) + { + *al = TLS1_AD_INSUFFICIENT_SECURITY; + return 0; + } + } + else if(!SRP_check_known_gN_param(srp->g, srp->N)) + { + *al = TLS1_AD_INSUFFICIENT_SECURITY; + return 0; + } - if (BN_num_bits(s->srp_ctx.N) < s->srp_ctx.strength) - return -1; + return 1; + } + - if (s->srp_ctx.SRP_verify_param_callback ==NULL && - !SRP_check_known_gN_param(s->srp_ctx.g,s->srp_ctx.N)) - return -1 ; +int SRP_Calc_A_param(SSL *s) + { + unsigned char rnd[SSL_MAX_MASTER_KEY_LENGTH]; RAND_bytes(rnd, sizeof(rnd)); s->srp_ctx.a = BN_bin2bn(rnd, sizeof(rnd), s->srp_ctx.a); @@ -426,10 +456,6 @@ int SRP_Calc_A_param(SSL *s) if (!(s->srp_ctx.A = SRP_Calc_A(s->srp_ctx.a,s->srp_ctx.N,s->srp_ctx.g))) return -1; - /* We can have a callback to verify SRP param!! */ - if (s->srp_ctx.SRP_verify_param_callback !=NULL) - return s->srp_ctx.SRP_verify_param_callback(s,s->srp_ctx.SRP_cb_arg); - return 1; } Modified: releng/10.0/sys/conf/newvers.sh ============================================================================== --- releng/10.0/sys/conf/newvers.sh Tue Sep 9 05:21:31 2014 (r271303) +++ releng/10.0/sys/conf/newvers.sh Tue Sep 9 10:09:46 2014 (r271304) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.0" -BRANCH="RELEASE-p7" +BRANCH="RELEASE-p8" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 10:13:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2620D87; Tue, 9 Sep 2014 10:13:50 +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 BB0A7EBA; Tue, 9 Sep 2014 10:13:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89ADoJF070697; Tue, 9 Sep 2014 10:13:50 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89ADkj6070671; Tue, 9 Sep 2014 10:13:46 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409091013.s89ADkj6070671@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 9 Sep 2014 10:13:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r271305 - in releng: 8.4 8.4/crypto/openssl/crypto/asn1 8.4/crypto/openssl/crypto/objects 8.4/crypto/openssl/ssl 8.4/sys/conf 9.1 9.1/crypto/openssl/crypto/asn1 9.1/crypto/openssl/crypt... X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 10:13:50 -0000 Author: delphij Date: Tue Sep 9 10:13:46 2014 New Revision: 271305 URL: http://svnweb.freebsd.org/changeset/base/271305 Log: Fix multiple OpenSSL vulnerabilities: The receipt of a specifically crafted DTLS handshake message may cause OpenSSL to consume large amounts of memory. [CVE-2014-3506] The receipt of a specifically crafted DTLS packet could cause OpenSSL to leak memory. [CVE-2014-3507] A flaw in OBJ_obj2txt may cause pretty printing functions such as X509_name_oneline, X509_name_print_ex et al. to leak some information from the stack. [CVE-2014-3508] OpenSSL DTLS clients enabling anonymous (EC)DH ciphersuites are subject to a denial of service attack. [CVE-2014-3510] Security: CVE-2014-3506, CVE-2014-3507, CVE-2014-3508, CVE-2014-3510 Security: FreeBSD-SA-14:18.openssl Approved by: so Modified: releng/8.4/UPDATING releng/8.4/crypto/openssl/crypto/asn1/a_object.c releng/8.4/crypto/openssl/crypto/objects/obj_dat.c releng/8.4/crypto/openssl/ssl/d1_both.c releng/8.4/crypto/openssl/ssl/d1_clnt.c releng/8.4/crypto/openssl/ssl/s23_srvr.c releng/8.4/crypto/openssl/ssl/s3_clnt.c releng/8.4/sys/conf/newvers.sh releng/9.1/UPDATING releng/9.1/crypto/openssl/crypto/asn1/a_object.c releng/9.1/crypto/openssl/crypto/objects/obj_dat.c releng/9.1/crypto/openssl/ssl/d1_both.c releng/9.1/crypto/openssl/ssl/d1_clnt.c releng/9.1/crypto/openssl/ssl/s23_srvr.c releng/9.1/crypto/openssl/ssl/s3_clnt.c releng/9.1/sys/conf/newvers.sh releng/9.2/UPDATING releng/9.2/crypto/openssl/crypto/asn1/a_object.c releng/9.2/crypto/openssl/crypto/objects/obj_dat.c releng/9.2/crypto/openssl/ssl/d1_both.c releng/9.2/crypto/openssl/ssl/d1_clnt.c releng/9.2/crypto/openssl/ssl/s23_srvr.c releng/9.2/crypto/openssl/ssl/s3_clnt.c releng/9.2/sys/conf/newvers.sh releng/9.3/UPDATING releng/9.3/crypto/openssl/crypto/asn1/a_object.c releng/9.3/crypto/openssl/crypto/objects/obj_dat.c releng/9.3/crypto/openssl/ssl/d1_both.c releng/9.3/crypto/openssl/ssl/d1_clnt.c releng/9.3/crypto/openssl/ssl/s23_srvr.c releng/9.3/crypto/openssl/ssl/s3_clnt.c releng/9.3/sys/conf/newvers.sh Modified: releng/8.4/UPDATING ============================================================================== --- releng/8.4/UPDATING Tue Sep 9 10:09:46 2014 (r271304) +++ releng/8.4/UPDATING Tue Sep 9 10:13:46 2014 (r271305) @@ -15,6 +15,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20140909: p15 FreeBSD-SA-14:18.openssl + Fix OpenSSL multiple vulnerabilities. [SA-14:18] + 20140708: p14 FreeBSD-SA-14:17.kmem FreeBSD-EN-14:09.jail Fix kernel memory disclosure in control messages and SCTP Modified: releng/8.4/crypto/openssl/crypto/asn1/a_object.c ============================================================================== --- releng/8.4/crypto/openssl/crypto/asn1/a_object.c Tue Sep 9 10:09:46 2014 (r271304) +++ releng/8.4/crypto/openssl/crypto/asn1/a_object.c Tue Sep 9 10:13:46 2014 (r271305) @@ -285,16 +285,28 @@ err: ASN1_OBJECT_free(ret); return(NULL); } + ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, long len) { ASN1_OBJECT *ret=NULL; const unsigned char *p; - int i; - /* Sanity check OID encoding: can't have leading 0x80 in - * subidentifiers, see: X.690 8.19.2 + int i, length; + + /* Sanity check OID encoding. + * Need at least one content octet. + * MSB must be clear in the last octet. + * can't have leading 0x80 in subidentifiers, see: X.690 8.19.2 */ - for (i = 0, p = *pp; i < len; i++, p++) + if (len <= 0 || len > INT_MAX || pp == NULL || (p = *pp) == NULL || + p[len - 1] & 0x80) + { + ASN1err(ASN1_F_C2I_ASN1_OBJECT,ASN1_R_INVALID_OBJECT_ENCODING); + return NULL; + } + /* Now 0 < len <= INT_MAX, so the cast is safe. */ + length = (int)len; + for (i = 0; i < length; i++, p++) { if (*p == 0x80 && (!i || !(p[-1] & 0x80))) { @@ -313,20 +325,20 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT else ret=(*a); p= *pp; - if ((ret->data == NULL) || (ret->length < len)) + if ((ret->data == NULL) || (ret->length < length)) { if (ret->data != NULL) OPENSSL_free(ret->data); - ret->data=(unsigned char *)OPENSSL_malloc(len ? (int)len : 1); + ret->data=(unsigned char *)OPENSSL_malloc(length); ret->flags|=ASN1_OBJECT_FLAG_DYNAMIC_DATA; if (ret->data == NULL) { i=ERR_R_MALLOC_FAILURE; goto err; } } - memcpy(ret->data,p,(int)len); - ret->length=(int)len; + memcpy(ret->data,p,length); + ret->length=length; ret->sn=NULL; ret->ln=NULL; /* ret->flags=ASN1_OBJECT_FLAG_DYNAMIC; we know it is dynamic */ - p+=len; + p+=length; if (a != NULL) (*a)=ret; *pp=p; Modified: releng/8.4/crypto/openssl/crypto/objects/obj_dat.c ============================================================================== --- releng/8.4/crypto/openssl/crypto/objects/obj_dat.c Tue Sep 9 10:09:46 2014 (r271304) +++ releng/8.4/crypto/openssl/crypto/objects/obj_dat.c Tue Sep 9 10:13:46 2014 (r271305) @@ -444,11 +444,12 @@ int OBJ_obj2txt(char *buf, int buf_len, unsigned char *p; char tbuf[DECIMAL_SIZE(i)+DECIMAL_SIZE(l)+2]; - if ((a == NULL) || (a->data == NULL)) { - buf[0]='\0'; - return(0); - } + /* Ensure that, at every state, |buf| is NUL-terminated. */ + if (buf && buf_len > 0) + buf[0] = '\0'; + if ((a == NULL) || (a->data == NULL)) + return(0); if (!no_name && (nid=OBJ_obj2nid(a)) != NID_undef) { @@ -527,9 +528,10 @@ int OBJ_obj2txt(char *buf, int buf_len, i=(int)(l/40); l-=(long)(i*40); } - if (buf && (buf_len > 0)) + if (buf && (buf_len > 1)) { *buf++ = i + '0'; + *buf = '\0'; buf_len--; } n++; @@ -544,9 +546,10 @@ int OBJ_obj2txt(char *buf, int buf_len, i = strlen(bndec); if (buf) { - if (buf_len > 0) + if (buf_len > 1) { *buf++ = '.'; + *buf = '\0'; buf_len--; } BUF_strlcpy(buf,bndec,buf_len); @@ -786,4 +789,3 @@ err: OPENSSL_free(buf); return(ok); } - Modified: releng/8.4/crypto/openssl/ssl/d1_both.c ============================================================================== --- releng/8.4/crypto/openssl/ssl/d1_both.c Tue Sep 9 10:09:46 2014 (r271304) +++ releng/8.4/crypto/openssl/ssl/d1_both.c Tue Sep 9 10:13:46 2014 (r271305) @@ -580,29 +580,32 @@ dtls1_retrieve_buffered_fragment(SSL *s, return 0; } +/* dtls1_max_handshake_message_len returns the maximum number of bytes + * permitted in a DTLS handshake message for |s|. The minimum is 16KB, but may + * be greater if the maximum certificate list size requires it. */ +static unsigned long dtls1_max_handshake_message_len(const SSL *s) + { + unsigned long max_len = DTLS1_HM_HEADER_LENGTH + SSL3_RT_MAX_ENCRYPTED_LENGTH; + if (max_len < (unsigned long)s->max_cert_list) + return s->max_cert_list; + return max_len; + } static int -dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok) +dtls1_reassemble_fragment(SSL *s, const struct hm_header_st* msg_hdr, int *ok) { hm_fragment *frag = NULL; pitem *item = NULL; int i = -1, is_complete; PQ_64BIT seq64; - unsigned long frag_len = msg_hdr->frag_len, max_len; + unsigned long frag_len = msg_hdr->frag_len; - if ((msg_hdr->frag_off+frag_len) > msg_hdr->msg_len) + if ((msg_hdr->frag_off+frag_len) > msg_hdr->msg_len || + msg_hdr->msg_len > dtls1_max_handshake_message_len(s)) goto err; - /* Determine maximum allowed message size. Depends on (user set) - * maximum certificate length, but 16k is minimum. - */ - if (DTLS1_HM_HEADER_LENGTH + SSL3_RT_MAX_ENCRYPTED_LENGTH < s->max_cert_list) - max_len = s->max_cert_list; - else - max_len = DTLS1_HM_HEADER_LENGTH + SSL3_RT_MAX_ENCRYPTED_LENGTH; - - if ((msg_hdr->frag_off+frag_len) > max_len) - goto err; + if (frag_len == 0) + return DTLS1_HM_FRAGMENT_RETRY; /* Try to find item in queue */ pq_64bit_init(&seq64); @@ -632,7 +635,8 @@ dtls1_reassemble_fragment(SSL *s, struct /* If message is already reassembled, this must be a - * retransmit and can be dropped. + * retransmit and can be dropped. In this case item != NULL and so frag + * does not need to be freed. */ if (frag->reassembly == NULL) { @@ -652,7 +656,9 @@ dtls1_reassemble_fragment(SSL *s, struct /* read the body of the fragment (header has already been read */ i = s->method->ssl_read_bytes(s,SSL3_RT_HANDSHAKE, frag->fragment + msg_hdr->frag_off,frag_len,0); - if (i<=0 || (unsigned long)i!=frag_len) + if ((unsigned long)i!=frag_len) + i=-1; + if (i<=0) goto err; RSMBLY_BITMASK_MARK(frag->reassembly, (long)msg_hdr->frag_off, @@ -680,21 +686,25 @@ dtls1_reassemble_fragment(SSL *s, struct i = -1; } - pqueue_insert(s->d1->buffered_messages, item); + item = pqueue_insert(s->d1->buffered_messages, item); + /* pqueue_insert fails iff a duplicate item is inserted. + * However, |item| cannot be a duplicate. If it were, + * |pqueue_find|, above, would have returned it and control + * would never have reached this branch. */ + OPENSSL_assert(item != NULL); } return DTLS1_HM_FRAGMENT_RETRY; err: - if (frag != NULL) dtls1_hm_fragment_free(frag); - if (item != NULL) OPENSSL_free(item); + if (frag != NULL && item == NULL) dtls1_hm_fragment_free(frag); *ok = 0; return i; } static int -dtls1_process_out_of_seq_message(SSL *s, struct hm_header_st* msg_hdr, int *ok) +dtls1_process_out_of_seq_message(SSL *s, const struct hm_header_st* msg_hdr, int *ok) { int i=-1; hm_fragment *frag = NULL; @@ -714,7 +724,7 @@ dtls1_process_out_of_seq_message(SSL *s, /* If we already have an entry and this one is a fragment, * don't discard it and rather try to reassemble it. */ - if (item != NULL && frag_len < msg_hdr->msg_len) + if (item != NULL && frag_len != msg_hdr->msg_len) item = NULL; /* Discard the message if sequence number was already there, is @@ -739,9 +749,12 @@ dtls1_process_out_of_seq_message(SSL *s, } else { - if (frag_len && frag_len < msg_hdr->msg_len) + if (frag_len != msg_hdr->msg_len) return dtls1_reassemble_fragment(s, msg_hdr, ok); + if (frag_len > dtls1_max_handshake_message_len(s)) + goto err; + frag = dtls1_hm_fragment_new(frag_len, 0); if ( frag == NULL) goto err; @@ -753,7 +766,9 @@ dtls1_process_out_of_seq_message(SSL *s, /* read the body of the fragment (header has already been read) */ i = s->method->ssl_read_bytes(s,SSL3_RT_HANDSHAKE, frag->fragment,frag_len,0); - if (i<=0 || (unsigned long)i!=frag_len) + if ((unsigned long)i!=frag_len) + i = -1; + if (i<=0) goto err; } @@ -765,14 +780,21 @@ dtls1_process_out_of_seq_message(SSL *s, if ( item == NULL) goto err; - pqueue_insert(s->d1->buffered_messages, item); + item = pqueue_insert(s->d1->buffered_messages, item); + /* pqueue_insert fails iff a duplicate item is inserted. + * However, |item| cannot be a duplicate. If it were, + * |pqueue_find|, above, would have returned it. Then, either + * |frag_len| != |msg_hdr->msg_len| in which case |item| is set + * to NULL and it will have been processed with + * |dtls1_reassemble_fragment|, above, or the record will have + * been discarded. */ + OPENSSL_assert(item != NULL); } return DTLS1_HM_FRAGMENT_RETRY; err: - if ( frag != NULL) dtls1_hm_fragment_free(frag); - if ( item != NULL) OPENSSL_free(item); + if (frag != NULL && item == NULL) dtls1_hm_fragment_free(frag); *ok = 0; return i; } Modified: releng/8.4/crypto/openssl/ssl/d1_clnt.c ============================================================================== --- releng/8.4/crypto/openssl/ssl/d1_clnt.c Tue Sep 9 10:09:46 2014 (r271304) +++ releng/8.4/crypto/openssl/ssl/d1_clnt.c Tue Sep 9 10:13:46 2014 (r271305) @@ -796,6 +796,13 @@ int dtls1_send_client_key_exchange(SSL * RSA *rsa; unsigned char tmp_buf[SSL_MAX_MASTER_KEY_LENGTH]; + if (s->session->sess_cert == NULL) + { + /* We should always have a server certificate with SSL_kRSA. */ + SSLerr(SSL_F_DTLS1_SEND_CLIENT_KEY_EXCHANGE,ERR_R_INTERNAL_ERROR); + goto err; + } + if (s->session->sess_cert->peer_rsa_tmp != NULL) rsa=s->session->sess_cert->peer_rsa_tmp; else @@ -986,6 +993,13 @@ int dtls1_send_client_key_exchange(SSL * { DH *dh_srvr,*dh_clnt; + if (s->session->sess_cert == NULL) + { + ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_UNEXPECTED_MESSAGE); + SSLerr(SSL_F_DTLS1_SEND_CLIENT_KEY_EXCHANGE,SSL_R_UNEXPECTED_MESSAGE); + goto err; + } + if (s->session->sess_cert->peer_dh_tmp != NULL) dh_srvr=s->session->sess_cert->peer_dh_tmp; else @@ -1226,5 +1240,3 @@ int dtls1_send_client_certificate(SSL *s /* SSL3_ST_CW_CERT_D */ return(dtls1_do_write(s,SSL3_RT_HANDSHAKE)); } - - Modified: releng/8.4/crypto/openssl/ssl/s23_srvr.c ============================================================================== --- releng/8.4/crypto/openssl/ssl/s23_srvr.c Tue Sep 9 10:09:46 2014 (r271304) +++ releng/8.4/crypto/openssl/ssl/s23_srvr.c Tue Sep 9 10:13:46 2014 (r271305) @@ -328,23 +328,19 @@ int ssl23_get_client_hello(SSL *s) * Client Hello message, this would be difficult, and we'd have * to read more records to find out. * No known SSL 3.0 client fragments ClientHello like this, - * so we simply assume TLS 1.0 to avoid protocol version downgrade - * attacks. */ + * so we simply reject such connections to avoid + * protocol version downgrade attacks. */ if (p[3] == 0 && p[4] < 6) { -#if 0 SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_RECORD_TOO_SMALL); goto err; -#else - v[1] = TLS1_VERSION_MINOR; -#endif } /* if major version number > 3 set minor to a value * which will use the highest version 3 we support. * If TLS 2.0 ever appears we will need to revise * this.... */ - else if (p[9] > SSL3_VERSION_MAJOR) + if (p[9] > SSL3_VERSION_MAJOR) v[1]=0xff; else v[1]=p[10]; /* minor version according to client_version */ @@ -412,14 +408,34 @@ int ssl23_get_client_hello(SSL *s) v[0] = p[3]; /* == SSL3_VERSION_MAJOR */ v[1] = p[4]; + /* An SSLv3/TLSv1 backwards-compatible CLIENT-HELLO in an SSLv2 + * header is sent directly on the wire, not wrapped as a TLS + * record. It's format is: + * Byte Content + * 0-1 msg_length + * 2 msg_type + * 3-4 version + * 5-6 cipher_spec_length + * 7-8 session_id_length + * 9-10 challenge_length + * ... ... + */ n=((p[0]&0x7f)<<8)|p[1]; if (n > (1024*4)) { SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_RECORD_TOO_LARGE); goto err; } + if (n < 9) + { + SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_RECORD_LENGTH_MISMATCH); + goto err; + } j=ssl23_read_bytes(s,n+2); + /* We previously read 11 bytes, so if j > 0, we must have + * j == n+2 == s->packet_length. We have at least 11 valid + * packet bytes. */ if (j <= 0) return(j); ssl3_finish_mac(s, s->packet+2, s->packet_length-2); Modified: releng/8.4/crypto/openssl/ssl/s3_clnt.c ============================================================================== --- releng/8.4/crypto/openssl/ssl/s3_clnt.c Tue Sep 9 10:09:46 2014 (r271304) +++ releng/8.4/crypto/openssl/ssl/s3_clnt.c Tue Sep 9 10:13:46 2014 (r271305) @@ -1913,6 +1913,13 @@ int ssl3_send_client_key_exchange(SSL *s RSA *rsa; unsigned char tmp_buf[SSL_MAX_MASTER_KEY_LENGTH]; + if (s->session->sess_cert == NULL) + { + /* We should always have a server certificate with SSL_kRSA. */ + SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_INTERNAL_ERROR); + goto err; + } + if (s->session->sess_cert->peer_rsa_tmp != NULL) rsa=s->session->sess_cert->peer_rsa_tmp; else Modified: releng/8.4/sys/conf/newvers.sh ============================================================================== --- releng/8.4/sys/conf/newvers.sh Tue Sep 9 10:09:46 2014 (r271304) +++ releng/8.4/sys/conf/newvers.sh Tue Sep 9 10:13:46 2014 (r271305) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="8.4" -BRANCH="RELEASE-p14" +BRANCH="RELEASE-p15" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/9.1/UPDATING ============================================================================== --- releng/9.1/UPDATING Tue Sep 9 10:09:46 2014 (r271304) +++ releng/9.1/UPDATING Tue Sep 9 10:13:46 2014 (r271305) @@ -9,6 +9,9 @@ handbook. Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20140909: p18 FreeBSD-SA-14:18.openssl + Fix OpenSSL multiple vulnerabilities. [SA-14:18] + 20140708: p17 FreeBSD-SA-14:17.kmem Fix kernel memory disclosure in control messages and SCTP notifications. [SA-14:17] Modified: releng/9.1/crypto/openssl/crypto/asn1/a_object.c ============================================================================== --- releng/9.1/crypto/openssl/crypto/asn1/a_object.c Tue Sep 9 10:09:46 2014 (r271304) +++ releng/9.1/crypto/openssl/crypto/asn1/a_object.c Tue Sep 9 10:13:46 2014 (r271305) @@ -285,16 +285,28 @@ err: ASN1_OBJECT_free(ret); return(NULL); } + ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, long len) { ASN1_OBJECT *ret=NULL; const unsigned char *p; - int i; - /* Sanity check OID encoding: can't have leading 0x80 in - * subidentifiers, see: X.690 8.19.2 + int i, length; + + /* Sanity check OID encoding. + * Need at least one content octet. + * MSB must be clear in the last octet. + * can't have leading 0x80 in subidentifiers, see: X.690 8.19.2 */ - for (i = 0, p = *pp; i < len; i++, p++) + if (len <= 0 || len > INT_MAX || pp == NULL || (p = *pp) == NULL || + p[len - 1] & 0x80) + { + ASN1err(ASN1_F_C2I_ASN1_OBJECT,ASN1_R_INVALID_OBJECT_ENCODING); + return NULL; + } + /* Now 0 < len <= INT_MAX, so the cast is safe. */ + length = (int)len; + for (i = 0; i < length; i++, p++) { if (*p == 0x80 && (!i || !(p[-1] & 0x80))) { @@ -313,20 +325,20 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT else ret=(*a); p= *pp; - if ((ret->data == NULL) || (ret->length < len)) + if ((ret->data == NULL) || (ret->length < length)) { if (ret->data != NULL) OPENSSL_free(ret->data); - ret->data=(unsigned char *)OPENSSL_malloc(len ? (int)len : 1); + ret->data=(unsigned char *)OPENSSL_malloc(length); ret->flags|=ASN1_OBJECT_FLAG_DYNAMIC_DATA; if (ret->data == NULL) { i=ERR_R_MALLOC_FAILURE; goto err; } } - memcpy(ret->data,p,(int)len); - ret->length=(int)len; + memcpy(ret->data,p,length); + ret->length=length; ret->sn=NULL; ret->ln=NULL; /* ret->flags=ASN1_OBJECT_FLAG_DYNAMIC; we know it is dynamic */ - p+=len; + p+=length; if (a != NULL) (*a)=ret; *pp=p; Modified: releng/9.1/crypto/openssl/crypto/objects/obj_dat.c ============================================================================== --- releng/9.1/crypto/openssl/crypto/objects/obj_dat.c Tue Sep 9 10:09:46 2014 (r271304) +++ releng/9.1/crypto/openssl/crypto/objects/obj_dat.c Tue Sep 9 10:13:46 2014 (r271305) @@ -444,11 +444,12 @@ int OBJ_obj2txt(char *buf, int buf_len, unsigned char *p; char tbuf[DECIMAL_SIZE(i)+DECIMAL_SIZE(l)+2]; - if ((a == NULL) || (a->data == NULL)) { - buf[0]='\0'; - return(0); - } + /* Ensure that, at every state, |buf| is NUL-terminated. */ + if (buf && buf_len > 0) + buf[0] = '\0'; + if ((a == NULL) || (a->data == NULL)) + return(0); if (!no_name && (nid=OBJ_obj2nid(a)) != NID_undef) { @@ -527,9 +528,10 @@ int OBJ_obj2txt(char *buf, int buf_len, i=(int)(l/40); l-=(long)(i*40); } - if (buf && (buf_len > 0)) + if (buf && (buf_len > 1)) { *buf++ = i + '0'; + *buf = '\0'; buf_len--; } n++; @@ -544,9 +546,10 @@ int OBJ_obj2txt(char *buf, int buf_len, i = strlen(bndec); if (buf) { - if (buf_len > 0) + if (buf_len > 1) { *buf++ = '.'; + *buf = '\0'; buf_len--; } BUF_strlcpy(buf,bndec,buf_len); @@ -786,4 +789,3 @@ err: OPENSSL_free(buf); return(ok); } - Modified: releng/9.1/crypto/openssl/ssl/d1_both.c ============================================================================== --- releng/9.1/crypto/openssl/ssl/d1_both.c Tue Sep 9 10:09:46 2014 (r271304) +++ releng/9.1/crypto/openssl/ssl/d1_both.c Tue Sep 9 10:13:46 2014 (r271305) @@ -580,29 +580,32 @@ dtls1_retrieve_buffered_fragment(SSL *s, return 0; } +/* dtls1_max_handshake_message_len returns the maximum number of bytes + * permitted in a DTLS handshake message for |s|. The minimum is 16KB, but may + * be greater if the maximum certificate list size requires it. */ +static unsigned long dtls1_max_handshake_message_len(const SSL *s) + { + unsigned long max_len = DTLS1_HM_HEADER_LENGTH + SSL3_RT_MAX_ENCRYPTED_LENGTH; + if (max_len < (unsigned long)s->max_cert_list) + return s->max_cert_list; + return max_len; + } static int -dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok) +dtls1_reassemble_fragment(SSL *s, const struct hm_header_st* msg_hdr, int *ok) { hm_fragment *frag = NULL; pitem *item = NULL; int i = -1, is_complete; PQ_64BIT seq64; - unsigned long frag_len = msg_hdr->frag_len, max_len; + unsigned long frag_len = msg_hdr->frag_len; - if ((msg_hdr->frag_off+frag_len) > msg_hdr->msg_len) + if ((msg_hdr->frag_off+frag_len) > msg_hdr->msg_len || + msg_hdr->msg_len > dtls1_max_handshake_message_len(s)) goto err; - /* Determine maximum allowed message size. Depends on (user set) - * maximum certificate length, but 16k is minimum. - */ - if (DTLS1_HM_HEADER_LENGTH + SSL3_RT_MAX_ENCRYPTED_LENGTH < s->max_cert_list) - max_len = s->max_cert_list; - else - max_len = DTLS1_HM_HEADER_LENGTH + SSL3_RT_MAX_ENCRYPTED_LENGTH; - - if ((msg_hdr->frag_off+frag_len) > max_len) - goto err; + if (frag_len == 0) + return DTLS1_HM_FRAGMENT_RETRY; /* Try to find item in queue */ pq_64bit_init(&seq64); @@ -632,7 +635,8 @@ dtls1_reassemble_fragment(SSL *s, struct /* If message is already reassembled, this must be a - * retransmit and can be dropped. + * retransmit and can be dropped. In this case item != NULL and so frag + * does not need to be freed. */ if (frag->reassembly == NULL) { @@ -652,7 +656,9 @@ dtls1_reassemble_fragment(SSL *s, struct /* read the body of the fragment (header has already been read */ i = s->method->ssl_read_bytes(s,SSL3_RT_HANDSHAKE, frag->fragment + msg_hdr->frag_off,frag_len,0); - if (i<=0 || (unsigned long)i!=frag_len) + if ((unsigned long)i!=frag_len) + i=-1; + if (i<=0) goto err; RSMBLY_BITMASK_MARK(frag->reassembly, (long)msg_hdr->frag_off, @@ -680,21 +686,25 @@ dtls1_reassemble_fragment(SSL *s, struct i = -1; } - pqueue_insert(s->d1->buffered_messages, item); + item = pqueue_insert(s->d1->buffered_messages, item); + /* pqueue_insert fails iff a duplicate item is inserted. + * However, |item| cannot be a duplicate. If it were, + * |pqueue_find|, above, would have returned it and control + * would never have reached this branch. */ + OPENSSL_assert(item != NULL); } return DTLS1_HM_FRAGMENT_RETRY; err: - if (frag != NULL) dtls1_hm_fragment_free(frag); - if (item != NULL) OPENSSL_free(item); + if (frag != NULL && item == NULL) dtls1_hm_fragment_free(frag); *ok = 0; return i; } static int -dtls1_process_out_of_seq_message(SSL *s, struct hm_header_st* msg_hdr, int *ok) +dtls1_process_out_of_seq_message(SSL *s, const struct hm_header_st* msg_hdr, int *ok) { int i=-1; hm_fragment *frag = NULL; @@ -714,7 +724,7 @@ dtls1_process_out_of_seq_message(SSL *s, /* If we already have an entry and this one is a fragment, * don't discard it and rather try to reassemble it. */ - if (item != NULL && frag_len < msg_hdr->msg_len) + if (item != NULL && frag_len != msg_hdr->msg_len) item = NULL; /* Discard the message if sequence number was already there, is @@ -739,9 +749,12 @@ dtls1_process_out_of_seq_message(SSL *s, } else { - if (frag_len && frag_len < msg_hdr->msg_len) + if (frag_len != msg_hdr->msg_len) return dtls1_reassemble_fragment(s, msg_hdr, ok); + if (frag_len > dtls1_max_handshake_message_len(s)) + goto err; + frag = dtls1_hm_fragment_new(frag_len, 0); if ( frag == NULL) goto err; @@ -753,7 +766,9 @@ dtls1_process_out_of_seq_message(SSL *s, /* read the body of the fragment (header has already been read) */ i = s->method->ssl_read_bytes(s,SSL3_RT_HANDSHAKE, frag->fragment,frag_len,0); - if (i<=0 || (unsigned long)i!=frag_len) + if ((unsigned long)i!=frag_len) + i = -1; + if (i<=0) goto err; } @@ -765,14 +780,21 @@ dtls1_process_out_of_seq_message(SSL *s, if ( item == NULL) goto err; - pqueue_insert(s->d1->buffered_messages, item); + item = pqueue_insert(s->d1->buffered_messages, item); + /* pqueue_insert fails iff a duplicate item is inserted. + * However, |item| cannot be a duplicate. If it were, + * |pqueue_find|, above, would have returned it. Then, either + * |frag_len| != |msg_hdr->msg_len| in which case |item| is set + * to NULL and it will have been processed with + * |dtls1_reassemble_fragment|, above, or the record will have + * been discarded. */ + OPENSSL_assert(item != NULL); } return DTLS1_HM_FRAGMENT_RETRY; err: - if ( frag != NULL) dtls1_hm_fragment_free(frag); - if ( item != NULL) OPENSSL_free(item); + if (frag != NULL && item == NULL) dtls1_hm_fragment_free(frag); *ok = 0; return i; } Modified: releng/9.1/crypto/openssl/ssl/d1_clnt.c ============================================================================== --- releng/9.1/crypto/openssl/ssl/d1_clnt.c Tue Sep 9 10:09:46 2014 (r271304) +++ releng/9.1/crypto/openssl/ssl/d1_clnt.c Tue Sep 9 10:13:46 2014 (r271305) @@ -796,6 +796,13 @@ int dtls1_send_client_key_exchange(SSL * RSA *rsa; unsigned char tmp_buf[SSL_MAX_MASTER_KEY_LENGTH]; + if (s->session->sess_cert == NULL) + { + /* We should always have a server certificate with SSL_kRSA. */ + SSLerr(SSL_F_DTLS1_SEND_CLIENT_KEY_EXCHANGE,ERR_R_INTERNAL_ERROR); + goto err; + } + if (s->session->sess_cert->peer_rsa_tmp != NULL) rsa=s->session->sess_cert->peer_rsa_tmp; else @@ -986,6 +993,13 @@ int dtls1_send_client_key_exchange(SSL * { DH *dh_srvr,*dh_clnt; + if (s->session->sess_cert == NULL) + { + ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_UNEXPECTED_MESSAGE); + SSLerr(SSL_F_DTLS1_SEND_CLIENT_KEY_EXCHANGE,SSL_R_UNEXPECTED_MESSAGE); + goto err; + } + if (s->session->sess_cert->peer_dh_tmp != NULL) dh_srvr=s->session->sess_cert->peer_dh_tmp; else @@ -1226,5 +1240,3 @@ int dtls1_send_client_certificate(SSL *s /* SSL3_ST_CW_CERT_D */ return(dtls1_do_write(s,SSL3_RT_HANDSHAKE)); } - - Modified: releng/9.1/crypto/openssl/ssl/s23_srvr.c ============================================================================== --- releng/9.1/crypto/openssl/ssl/s23_srvr.c Tue Sep 9 10:09:46 2014 (r271304) +++ releng/9.1/crypto/openssl/ssl/s23_srvr.c Tue Sep 9 10:13:46 2014 (r271305) @@ -328,23 +328,19 @@ int ssl23_get_client_hello(SSL *s) * Client Hello message, this would be difficult, and we'd have * to read more records to find out. * No known SSL 3.0 client fragments ClientHello like this, - * so we simply assume TLS 1.0 to avoid protocol version downgrade - * attacks. */ + * so we simply reject such connections to avoid + * protocol version downgrade attacks. */ if (p[3] == 0 && p[4] < 6) { -#if 0 SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_RECORD_TOO_SMALL); goto err; -#else - v[1] = TLS1_VERSION_MINOR; -#endif } /* if major version number > 3 set minor to a value * which will use the highest version 3 we support. * If TLS 2.0 ever appears we will need to revise * this.... */ - else if (p[9] > SSL3_VERSION_MAJOR) + if (p[9] > SSL3_VERSION_MAJOR) v[1]=0xff; else v[1]=p[10]; /* minor version according to client_version */ @@ -412,14 +408,34 @@ int ssl23_get_client_hello(SSL *s) v[0] = p[3]; /* == SSL3_VERSION_MAJOR */ v[1] = p[4]; + /* An SSLv3/TLSv1 backwards-compatible CLIENT-HELLO in an SSLv2 + * header is sent directly on the wire, not wrapped as a TLS + * record. It's format is: + * Byte Content + * 0-1 msg_length + * 2 msg_type + * 3-4 version + * 5-6 cipher_spec_length + * 7-8 session_id_length + * 9-10 challenge_length + * ... ... + */ n=((p[0]&0x7f)<<8)|p[1]; if (n > (1024*4)) { SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_RECORD_TOO_LARGE); goto err; } + if (n < 9) + { + SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_RECORD_LENGTH_MISMATCH); + goto err; + } j=ssl23_read_bytes(s,n+2); + /* We previously read 11 bytes, so if j > 0, we must have + * j == n+2 == s->packet_length. We have at least 11 valid + * packet bytes. */ if (j <= 0) return(j); ssl3_finish_mac(s, s->packet+2, s->packet_length-2); Modified: releng/9.1/crypto/openssl/ssl/s3_clnt.c ============================================================================== --- releng/9.1/crypto/openssl/ssl/s3_clnt.c Tue Sep 9 10:09:46 2014 (r271304) +++ releng/9.1/crypto/openssl/ssl/s3_clnt.c Tue Sep 9 10:13:46 2014 (r271305) @@ -1913,6 +1913,13 @@ int ssl3_send_client_key_exchange(SSL *s RSA *rsa; unsigned char tmp_buf[SSL_MAX_MASTER_KEY_LENGTH]; + if (s->session->sess_cert == NULL) + { + /* We should always have a server certificate with SSL_kRSA. */ + SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_INTERNAL_ERROR); + goto err; + } + if (s->session->sess_cert->peer_rsa_tmp != NULL) rsa=s->session->sess_cert->peer_rsa_tmp; else Modified: releng/9.1/sys/conf/newvers.sh ============================================================================== --- releng/9.1/sys/conf/newvers.sh Tue Sep 9 10:09:46 2014 (r271304) +++ releng/9.1/sys/conf/newvers.sh Tue Sep 9 10:13:46 2014 (r271305) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.1" -BRANCH="RELEASE-p17" +BRANCH="RELEASE-p18" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/9.2/UPDATING ============================================================================== --- releng/9.2/UPDATING Tue Sep 9 10:09:46 2014 (r271304) +++ releng/9.2/UPDATING Tue Sep 9 10:13:46 2014 (r271305) @@ -11,6 +11,9 @@ handbook: Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20140909: p11 FreeBSD-SA-14:18.openssl + Fix OpenSSL multiple vulnerabilities. [SA-14:18] + 20140708: p10 FreeBSD-SA-14:17.kmem Fix kernel memory disclosure in control messages and SCTP notifications. [SA-14:17] Modified: releng/9.2/crypto/openssl/crypto/asn1/a_object.c ============================================================================== --- releng/9.2/crypto/openssl/crypto/asn1/a_object.c Tue Sep 9 10:09:46 2014 (r271304) +++ releng/9.2/crypto/openssl/crypto/asn1/a_object.c Tue Sep 9 10:13:46 2014 (r271305) @@ -285,16 +285,28 @@ err: ASN1_OBJECT_free(ret); return(NULL); } + ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, long len) { ASN1_OBJECT *ret=NULL; const unsigned char *p; - int i; - /* Sanity check OID encoding: can't have leading 0x80 in - * subidentifiers, see: X.690 8.19.2 + int i, length; + + /* Sanity check OID encoding. + * Need at least one content octet. + * MSB must be clear in the last octet. + * can't have leading 0x80 in subidentifiers, see: X.690 8.19.2 */ - for (i = 0, p = *pp; i < len; i++, p++) + if (len <= 0 || len > INT_MAX || pp == NULL || (p = *pp) == NULL || + p[len - 1] & 0x80) + { + ASN1err(ASN1_F_C2I_ASN1_OBJECT,ASN1_R_INVALID_OBJECT_ENCODING); + return NULL; + } + /* Now 0 < len <= INT_MAX, so the cast is safe. */ + length = (int)len; + for (i = 0; i < length; i++, p++) { if (*p == 0x80 && (!i || !(p[-1] & 0x80))) { @@ -313,20 +325,20 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT else ret=(*a); p= *pp; - if ((ret->data == NULL) || (ret->length < len)) + if ((ret->data == NULL) || (ret->length < length)) { if (ret->data != NULL) OPENSSL_free(ret->data); - ret->data=(unsigned char *)OPENSSL_malloc(len ? (int)len : 1); + ret->data=(unsigned char *)OPENSSL_malloc(length); ret->flags|=ASN1_OBJECT_FLAG_DYNAMIC_DATA; if (ret->data == NULL) { i=ERR_R_MALLOC_FAILURE; goto err; } } - memcpy(ret->data,p,(int)len); - ret->length=(int)len; + memcpy(ret->data,p,length); + ret->length=length; ret->sn=NULL; ret->ln=NULL; /* ret->flags=ASN1_OBJECT_FLAG_DYNAMIC; we know it is dynamic */ - p+=len; + p+=length; if (a != NULL) (*a)=ret; *pp=p; Modified: releng/9.2/crypto/openssl/crypto/objects/obj_dat.c ============================================================================== --- releng/9.2/crypto/openssl/crypto/objects/obj_dat.c Tue Sep 9 10:09:46 2014 (r271304) +++ releng/9.2/crypto/openssl/crypto/objects/obj_dat.c Tue Sep 9 10:13:46 2014 (r271305) @@ -444,11 +444,12 @@ int OBJ_obj2txt(char *buf, int buf_len, unsigned char *p; char tbuf[DECIMAL_SIZE(i)+DECIMAL_SIZE(l)+2]; - if ((a == NULL) || (a->data == NULL)) { - buf[0]='\0'; - return(0); - } + /* Ensure that, at every state, |buf| is NUL-terminated. */ + if (buf && buf_len > 0) + buf[0] = '\0'; + if ((a == NULL) || (a->data == NULL)) + return(0); if (!no_name && (nid=OBJ_obj2nid(a)) != NID_undef) { @@ -527,9 +528,10 @@ int OBJ_obj2txt(char *buf, int buf_len, i=(int)(l/40); l-=(long)(i*40); } - if (buf && (buf_len > 0)) + if (buf && (buf_len > 1)) { *buf++ = i + '0'; + *buf = '\0'; buf_len--; } n++; @@ -544,9 +546,10 @@ int OBJ_obj2txt(char *buf, int buf_len, i = strlen(bndec); if (buf) { - if (buf_len > 0) + if (buf_len > 1) { *buf++ = '.'; + *buf = '\0'; buf_len--; } BUF_strlcpy(buf,bndec,buf_len); @@ -786,4 +789,3 @@ err: OPENSSL_free(buf); return(ok); } - Modified: releng/9.2/crypto/openssl/ssl/d1_both.c ============================================================================== --- releng/9.2/crypto/openssl/ssl/d1_both.c Tue Sep 9 10:09:46 2014 (r271304) +++ releng/9.2/crypto/openssl/ssl/d1_both.c Tue Sep 9 10:13:46 2014 (r271305) @@ -580,29 +580,32 @@ dtls1_retrieve_buffered_fragment(SSL *s, return 0; } +/* dtls1_max_handshake_message_len returns the maximum number of bytes + * permitted in a DTLS handshake message for |s|. The minimum is 16KB, but may + * be greater if the maximum certificate list size requires it. */ +static unsigned long dtls1_max_handshake_message_len(const SSL *s) + { + unsigned long max_len = DTLS1_HM_HEADER_LENGTH + SSL3_RT_MAX_ENCRYPTED_LENGTH; + if (max_len < (unsigned long)s->max_cert_list) + return s->max_cert_list; + return max_len; + } static int -dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok) +dtls1_reassemble_fragment(SSL *s, const struct hm_header_st* msg_hdr, int *ok) { hm_fragment *frag = NULL; pitem *item = NULL; int i = -1, is_complete; PQ_64BIT seq64; - unsigned long frag_len = msg_hdr->frag_len, max_len; + unsigned long frag_len = msg_hdr->frag_len; - if ((msg_hdr->frag_off+frag_len) > msg_hdr->msg_len) + if ((msg_hdr->frag_off+frag_len) > msg_hdr->msg_len || + msg_hdr->msg_len > dtls1_max_handshake_message_len(s)) goto err; - /* Determine maximum allowed message size. Depends on (user set) - * maximum certificate length, but 16k is minimum. - */ - if (DTLS1_HM_HEADER_LENGTH + SSL3_RT_MAX_ENCRYPTED_LENGTH < s->max_cert_list) - max_len = s->max_cert_list; - else - max_len = DTLS1_HM_HEADER_LENGTH + SSL3_RT_MAX_ENCRYPTED_LENGTH; - - if ((msg_hdr->frag_off+frag_len) > max_len) - goto err; + if (frag_len == 0) + return DTLS1_HM_FRAGMENT_RETRY; /* Try to find item in queue */ pq_64bit_init(&seq64); @@ -632,7 +635,8 @@ dtls1_reassemble_fragment(SSL *s, struct /* If message is already reassembled, this must be a - * retransmit and can be dropped. + * retransmit and can be dropped. In this case item != NULL and so frag + * does not need to be freed. */ if (frag->reassembly == NULL) { @@ -652,7 +656,9 @@ dtls1_reassemble_fragment(SSL *s, struct /* read the body of the fragment (header has already been read */ i = s->method->ssl_read_bytes(s,SSL3_RT_HANDSHAKE, frag->fragment + msg_hdr->frag_off,frag_len,0); - if (i<=0 || (unsigned long)i!=frag_len) + if ((unsigned long)i!=frag_len) + i=-1; + if (i<=0) goto err; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 10:29:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96EC425B; Tue, 9 Sep 2014 10:29:27 +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 829FEFEA; Tue, 9 Sep 2014 10:29:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89ATRfw076288; Tue, 9 Sep 2014 10:29:27 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89ATR2p076287; Tue, 9 Sep 2014 10:29:27 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409091029.s89ATR2p076287@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 9 Sep 2014 10:29:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271306 - stable/10/sys/netpfil/pf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 10:29:27 -0000 Author: glebius Date: Tue Sep 9 10:29:27 2014 New Revision: 271306 URL: http://svnweb.freebsd.org/changeset/base/271306 Log: Merge r270928: explicitly free packet on PF_DROP, otherwise a "quick" rule with "route-to" may still forward it. PR: 177808 Approved by: re (gjb) Modified: stable/10/sys/netpfil/pf/pf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/pf/pf.c ============================================================================== --- stable/10/sys/netpfil/pf/pf.c Tue Sep 9 10:13:46 2014 (r271305) +++ stable/10/sys/netpfil/pf/pf.c Tue Sep 9 10:29:27 2014 (r271306) @@ -6003,6 +6003,10 @@ done: *m0 = NULL; action = PF_PASS; break; + case PF_DROP: + m_freem(*m0); + *m0 = NULL; + break; default: /* pf_route() returns unlocked. */ if (r->rt) { @@ -6379,6 +6383,10 @@ done: *m0 = NULL; action = PF_PASS; break; + case PF_DROP: + m_freem(*m0); + *m0 = NULL; + break; default: /* pf_route6() returns unlocked. */ if (r->rt) { From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 10:47:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3ABEA4D; Tue, 9 Sep 2014 10:47:37 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 40E28304; Tue, 9 Sep 2014 10:47:36 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s89AlYlf044606 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 9 Sep 2014 14:47:34 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s89AlYK6044605; Tue, 9 Sep 2014 14:47:34 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 9 Sep 2014 14:47:34 +0400 From: Gleb Smirnoff To: Luigi Rizzo Subject: Re: svn commit: r270874 - in head/sys: dev/netmap net Message-ID: <20140909104734.GD17059@FreeBSD.org> References: <201408311133.s7VBXJlv084881@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 10:47:37 -0000 Luigi, On Mon, Sep 08, 2014 at 01:18:44PM +0200, Luigi Rizzo wrote: L> I would appreciate if you and others could inform me _before_ touching L> netmap-related stuff, and also, if you make changes make sure they are L> visible to the preprocessor so i can use conditional compilations. L> L> This is because this code is supposed to be the same on various FreeBSD L> revisions L> and Linux, and if each platform randomly changes its structures maintainance L> becomes very hard The patch was checked in to fix compilation failure, thus review was skipped. Does the patch itself have any problems with visibility to preprocessor? -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 10:52:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56A4ABCA; Tue, 9 Sep 2014 10:52: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 424863BA; Tue, 9 Sep 2014 10:52: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 s89Aqq8w090140; Tue, 9 Sep 2014 10:52:52 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89AqppN090135; Tue, 9 Sep 2014 10:52:51 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409091052.s89AqppN090135@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 9 Sep 2014 10:52:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271307 - in head: sbin/ifconfig sys/netinet6 usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 10:52:52 -0000 Author: ae Date: Tue Sep 9 10:52:50 2014 New Revision: 271307 URL: http://svnweb.freebsd.org/changeset/base/271307 Log: Add the ability to set `prefer_source' flag to an IPv6 address. It affects the IPv6 source address selection algorithm (RFC 6724) and allows override the last rule ("longest matching prefix") for choosing among equivalent addresses. The address with `prefer_source' will be preferred source address. Obtained from: Yandex LLC MFC after: 1 month Sponsored by: Yandex LLC Modified: head/sbin/ifconfig/af_inet6.c head/sbin/ifconfig/ifconfig.8 head/sys/netinet6/in6_src.c head/sys/netinet6/in6_var.h head/usr.bin/netstat/inet6.c Modified: head/sbin/ifconfig/af_inet6.c ============================================================================== --- head/sbin/ifconfig/af_inet6.c Tue Sep 9 10:29:27 2014 (r271306) +++ head/sbin/ifconfig/af_inet6.c Tue Sep 9 10:52:50 2014 (r271307) @@ -254,6 +254,8 @@ in6_status(int s __unused, const struct printf("autoconf "); if ((flags6 & IN6_IFF_TEMPORARY) != 0) printf("temporary "); + if ((flags6 & IN6_IFF_PREFER_SOURCE) != 0) + printf("prefer_source "); if (((struct sockaddr_in6 *)(ifa->ifa_addr))->sin6_scope_id) printf("scopeid 0x%x ", @@ -465,6 +467,8 @@ static struct cmd inet6_cmds[] = { DEF_CMD("-deprecated", -IN6_IFF_DEPRECATED, setip6flags), DEF_CMD("autoconf", IN6_IFF_AUTOCONF, setip6flags), DEF_CMD("-autoconf", -IN6_IFF_AUTOCONF, setip6flags), + DEF_CMD("prefer_source",IN6_IFF_PREFER_SOURCE, setip6flags), + DEF_CMD("-prefer_source",-IN6_IFF_PREFER_SOURCE,setip6flags), DEF_CMD("accept_rtadv", ND6_IFF_ACCEPT_RTADV, setnd6flags), DEF_CMD("-accept_rtadv",-ND6_IFF_ACCEPT_RTADV, setnd6flags), DEF_CMD("no_radr", ND6_IFF_NO_RADR, setnd6flags), Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Tue Sep 9 10:29:27 2014 (r271306) +++ head/sbin/ifconfig/ifconfig.8 Tue Sep 9 10:52:50 2014 (r271307) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd June 5, 2014 +.Dd September 9, 2014 .Dt IFCONFIG 8 .Os .Sh NAME @@ -689,6 +689,19 @@ Clear a flag .Cm no_prefer_iface . .El .Pp +The following parameters are specific for IPv6 addresses. +Note that the address family keyword +.Dq Li inet6 +is needed for them: +.Bl -tag -width indent +.It Cm prefer_source +Set a flag to prefer address as a candidate of the source address for +outgoing packets. +.It Cm -prefer_source +Clear a flag +.Cm prefer_source . +.El +.Pp The following parameters are specific to cloning IEEE 802.11 wireless interfaces with the .Cm create Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Tue Sep 9 10:29:27 2014 (r271306) +++ head/sys/netinet6/in6_src.c Tue Sep 9 10:52:50 2014 (r271307) @@ -452,6 +452,16 @@ in6_selectsrc(struct sockaddr_in6 *dstso NEXT(9); /* + * Rule 10: prefer address with `prefer_source' flag. + */ + if ((ia_best->ia6_flags & IN6_IFF_PREFER_SOURCE) == 0 && + (ia->ia6_flags & IN6_IFF_PREFER_SOURCE) != 0) + REPLACE(10); + if ((ia_best->ia6_flags & IN6_IFF_PREFER_SOURCE) != 0 && + (ia->ia6_flags & IN6_IFF_PREFER_SOURCE) == 0) + NEXT(10); + + /* * Rule 14: Use longest matching prefix. * Note: in the address selection draft, this rule is * documented as "Rule 8". However, since it is also Modified: head/sys/netinet6/in6_var.h ============================================================================== --- head/sys/netinet6/in6_var.h Tue Sep 9 10:29:27 2014 (r271306) +++ head/sys/netinet6/in6_var.h Tue Sep 9 10:52:50 2014 (r271307) @@ -498,6 +498,7 @@ struct in6_rrenumreq { */ #define IN6_IFF_AUTOCONF 0x40 /* autoconfigurable address. */ #define IN6_IFF_TEMPORARY 0x80 /* temporary (anonymous) address. */ +#define IN6_IFF_PREFER_SOURCE 0x0100 /* preferred address for SAS */ #define IN6_IFF_NOPFX 0x8000 /* skip kernel prefix management. * XXX: this should be temporary. */ Modified: head/usr.bin/netstat/inet6.c ============================================================================== --- head/usr.bin/netstat/inet6.c Tue Sep 9 10:29:27 2014 (r271306) +++ head/usr.bin/netstat/inet6.c Tue Sep 9 10:52:50 2014 (r271307) @@ -346,7 +346,7 @@ static const char *srcrule_str[] = { "public/temporary address", "alive interface", "better virtual status", - "rule #10", + "preferred source", "rule #11", "rule #12", "rule #13", From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 11:29:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7B9FD1; Tue, 9 Sep 2014 11:29:55 +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 B3AB9B61; Tue, 9 Sep 2014 11:29:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89BTt4e005817; Tue, 9 Sep 2014 11:29:55 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89BTtZJ005816; Tue, 9 Sep 2014 11:29:55 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409091129.s89BTtZJ005816@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 9 Sep 2014 11:29:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271308 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 11:29:55 -0000 Author: mav Date: Tue Sep 9 11:29:55 2014 New Revision: 271308 URL: http://svnweb.freebsd.org/changeset/base/271308 Log: Make ZVOL writes in device mode support IO_SYNC flag. MFC after: 1 month Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Tue Sep 9 10:52:50 2014 (r271307) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Tue Sep 9 11:29:55 2014 (r271308) @@ -1633,7 +1633,7 @@ zvol_write(struct cdev *dev, struct uio #ifdef sun sync = !(zv->zv_flags & ZVOL_WCE) || #else - sync = + sync = (ioflag & IO_SYNC) || #endif (zv->zv_objset->os_sync == ZFS_SYNC_ALWAYS); From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 11:38:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1316944D; Tue, 9 Sep 2014 11:38:31 +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 F2ADAC61; Tue, 9 Sep 2014 11:38: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 s89BcUMx010703; Tue, 9 Sep 2014 11:38:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89BcUgY010693; Tue, 9 Sep 2014 11:38:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409091138.s89BcUgY010693@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 9 Sep 2014 11:38:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271309 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 11:38:31 -0000 Author: mav Date: Tue Sep 9 11:38:29 2014 New Revision: 271309 URL: http://svnweb.freebsd.org/changeset/base/271309 Log: Improve cache control support, including DPO/FUA flags and the mode page. At this moment it works only for files and ZVOLs in device mode since BIOs have no respective respective cache control flags (DPO/FUA). MFC after: 1 month Sponsored by: iXsystems, Inc. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl.h head/sys/cam/ctl/ctl_backend_block.c head/sys/cam/ctl/ctl_io.h head/sys/cam/ctl/ctl_private.h Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Tue Sep 9 11:29:55 2014 (r271308) +++ head/sys/cam/ctl/ctl.c Tue Sep 9 11:38:29 2014 (r271309) @@ -263,7 +263,7 @@ static struct scsi_caching_page caching_ static struct scsi_caching_page caching_page_changeable = { /*page_code*/SMS_CACHING_PAGE, /*page_length*/sizeof(struct scsi_caching_page) - 2, - /*flags1*/ 0, + /*flags1*/ SCP_WCE | SCP_RCD, /*ret_priority*/ 0, /*disable_pf_transfer_len*/ {0, 0}, /*min_prefetch*/ {0, 0}, @@ -6249,6 +6249,53 @@ ctl_control_page_handler(struct ctl_scsi } int +ctl_caching_sp_handler(struct ctl_scsiio *ctsio, + struct ctl_page_index *page_index, uint8_t *page_ptr) +{ + struct scsi_caching_page *current_cp, *saved_cp, *user_cp; + struct ctl_lun *lun; + int set_ua; + uint32_t initidx; + + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + initidx = ctl_get_initindex(&ctsio->io_hdr.nexus); + set_ua = 0; + + user_cp = (struct scsi_caching_page *)page_ptr; + current_cp = (struct scsi_caching_page *) + (page_index->page_data + (page_index->page_len * + CTL_PAGE_CURRENT)); + saved_cp = (struct scsi_caching_page *) + (page_index->page_data + (page_index->page_len * + CTL_PAGE_SAVED)); + + mtx_lock(&lun->lun_lock); + if ((current_cp->flags1 & (SCP_WCE | SCP_RCD)) != + (user_cp->flags1 & (SCP_WCE | SCP_RCD))) + set_ua = 1; + current_cp->flags1 &= ~(SCP_WCE | SCP_RCD); + current_cp->flags1 |= user_cp->flags1 & (SCP_WCE | SCP_RCD); + saved_cp->flags1 &= ~(SCP_WCE | SCP_RCD); + saved_cp->flags1 |= user_cp->flags1 & (SCP_WCE | SCP_RCD); + if (set_ua != 0) { + int i; + /* + * Let other initiators know that the mode + * parameters for this LUN have changed. + */ + for (i = 0; i < CTL_MAX_INITIATORS; i++) { + if (i == initidx) + continue; + + lun->pending_ua[i] |= CTL_UA_MODE_CHANGE; + } + } + mtx_unlock(&lun->lun_lock); + + return (0); +} + +int ctl_power_sp_handler(struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, uint8_t *page_ptr) { @@ -8976,17 +9023,14 @@ ctl_read_write(struct ctl_scsiio *ctsio) struct ctl_lba_len_flags *lbalen; uint64_t lba; uint32_t num_blocks; - int fua, dpo; - int retval; + int flags, retval; int isread; lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; CTL_DEBUG_PRINT(("ctl_read_write: command: %#x\n", ctsio->cdb[0])); - fua = 0; - dpo = 0; - + flags = 0; retval = CTL_RETVAL_COMPLETE; isread = ctsio->cdb[0] == READ_6 || ctsio->cdb[0] == READ_10 @@ -9032,12 +9076,10 @@ ctl_read_write(struct ctl_scsiio *ctsio) struct scsi_rw_10 *cdb; cdb = (struct scsi_rw_10 *)ctsio->cdb; - if (cdb->byte2 & SRW10_FUA) - fua = 1; + flags |= CTL_LLF_FUA; if (cdb->byte2 & SRW10_DPO) - dpo = 1; - + flags |= CTL_LLF_DPO; lba = scsi_4btoul(cdb->addr); num_blocks = scsi_2btoul(cdb->length); break; @@ -9046,17 +9088,9 @@ ctl_read_write(struct ctl_scsiio *ctsio) struct scsi_write_verify_10 *cdb; cdb = (struct scsi_write_verify_10 *)ctsio->cdb; - - /* - * XXX KDM we should do actual write verify support at some - * point. This is obviously fake, we're just translating - * things to a write. So we don't even bother checking the - * BYTCHK field, since we don't do any verification. If - * the user asks for it, we'll just pretend we did it. - */ + flags |= CTL_LLF_FUA; if (cdb->byte2 & SWV_DPO) - dpo = 1; - + flags |= CTL_LLF_DPO; lba = scsi_4btoul(cdb->addr); num_blocks = scsi_2btoul(cdb->length); break; @@ -9066,11 +9100,10 @@ ctl_read_write(struct ctl_scsiio *ctsio) struct scsi_rw_12 *cdb; cdb = (struct scsi_rw_12 *)ctsio->cdb; - if (cdb->byte2 & SRW12_FUA) - fua = 1; + flags |= CTL_LLF_FUA; if (cdb->byte2 & SRW12_DPO) - dpo = 1; + flags |= CTL_LLF_DPO; lba = scsi_4btoul(cdb->addr); num_blocks = scsi_4btoul(cdb->length); break; @@ -9079,13 +9112,11 @@ ctl_read_write(struct ctl_scsiio *ctsio) struct scsi_write_verify_12 *cdb; cdb = (struct scsi_write_verify_12 *)ctsio->cdb; - + flags |= CTL_LLF_FUA; if (cdb->byte2 & SWV_DPO) - dpo = 1; - + flags |= CTL_LLF_DPO; lba = scsi_4btoul(cdb->addr); num_blocks = scsi_4btoul(cdb->length); - break; } case READ_16: @@ -9093,12 +9124,10 @@ ctl_read_write(struct ctl_scsiio *ctsio) struct scsi_rw_16 *cdb; cdb = (struct scsi_rw_16 *)ctsio->cdb; - if (cdb->byte2 & SRW12_FUA) - fua = 1; + flags |= CTL_LLF_FUA; if (cdb->byte2 & SRW12_DPO) - dpo = 1; - + flags |= CTL_LLF_DPO; lba = scsi_8btou64(cdb->addr); num_blocks = scsi_4btoul(cdb->length); break; @@ -9107,10 +9136,9 @@ ctl_read_write(struct ctl_scsiio *ctsio) struct scsi_write_verify_16 *cdb; cdb = (struct scsi_write_verify_16 *)ctsio->cdb; - + flags |= CTL_LLF_FUA; if (cdb->byte2 & SWV_DPO) - dpo = 1; - + flags |= CTL_LLF_DPO; lba = scsi_8btou64(cdb->addr); num_blocks = scsi_4btoul(cdb->length); break; @@ -9128,13 +9156,6 @@ ctl_read_write(struct ctl_scsiio *ctsio) } /* - * XXX KDM what do we do with the DPO and FUA bits? FUA might be - * interesting for us, but if RAIDCore is in write-back mode, - * getting it to do write-through for a particular transaction may - * not be possible. - */ - - /* * The first check is to make sure we're in bounds, the second * check is to catch wrap-around problems. If the lba + num blocks * is less than the lba, then we've wrapped around and the block @@ -9158,11 +9179,22 @@ ctl_read_write(struct ctl_scsiio *ctsio) return (CTL_RETVAL_COMPLETE); } + /* Set FUA and/or DPO if caches are disabled. */ + if (isread) { + if ((lun->mode_pages.caching_page[CTL_PAGE_CURRENT].flags1 & + SCP_RCD) != 0) + flags |= CTL_LLF_FUA | CTL_LLF_DPO; + } else { + if ((lun->mode_pages.caching_page[CTL_PAGE_CURRENT].flags1 & + SCP_WCE) == 0) + flags |= CTL_LLF_FUA; + } + lbalen = (struct ctl_lba_len_flags *) &ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; lbalen->lba = lba; lbalen->len = num_blocks; - lbalen->flags = isread ? CTL_LLF_READ : CTL_LLF_WRITE; + lbalen->flags = (isread ? CTL_LLF_READ : CTL_LLF_WRITE) | flags; ctsio->kern_total_len = num_blocks * lun->be_lun->blocksize; ctsio->kern_rel_offset = 0; @@ -9188,7 +9220,8 @@ ctl_cnw_cont(union ctl_io *io) lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; lbalen = (struct ctl_lba_len_flags *) &ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; - lbalen->flags = CTL_LLF_WRITE; + lbalen->flags &= ~CTL_LLF_COMPARE; + lbalen->flags |= CTL_LLF_WRITE; CTL_DEBUG_PRINT(("ctl_cnw_cont: calling data_submit()\n")); retval = lun->backend->data_submit((union ctl_io *)ctsio); @@ -9202,16 +9235,13 @@ ctl_cnw(struct ctl_scsiio *ctsio) struct ctl_lba_len_flags *lbalen; uint64_t lba; uint32_t num_blocks; - int fua, dpo; - int retval; + int flags, retval; lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; CTL_DEBUG_PRINT(("ctl_cnw: command: %#x\n", ctsio->cdb[0])); - fua = 0; - dpo = 0; - + flags = 0; retval = CTL_RETVAL_COMPLETE; switch (ctsio->cdb[0]) { @@ -9219,11 +9249,10 @@ ctl_cnw(struct ctl_scsiio *ctsio) struct scsi_compare_and_write *cdb; cdb = (struct scsi_compare_and_write *)ctsio->cdb; - if (cdb->byte2 & SRW10_FUA) - fua = 1; + flags |= CTL_LLF_FUA; if (cdb->byte2 & SRW10_DPO) - dpo = 1; + flags |= CTL_LLF_DPO; lba = scsi_8btou64(cdb->addr); num_blocks = cdb->length; break; @@ -9241,13 +9270,6 @@ ctl_cnw(struct ctl_scsiio *ctsio) } /* - * XXX KDM what do we do with the DPO and FUA bits? FUA might be - * interesting for us, but if RAIDCore is in write-back mode, - * getting it to do write-through for a particular transaction may - * not be possible. - */ - - /* * The first check is to make sure we're in bounds, the second * check is to catch wrap-around problems. If the lba + num blocks * is less than the lba, then we've wrapped around and the block @@ -9269,6 +9291,11 @@ ctl_cnw(struct ctl_scsiio *ctsio) return (CTL_RETVAL_COMPLETE); } + /* Set FUA if write cache is disabled. */ + if ((lun->mode_pages.caching_page[CTL_PAGE_CURRENT].flags1 & + SCP_WCE) == 0) + flags |= CTL_LLF_FUA; + ctsio->kern_total_len = 2 * num_blocks * lun->be_lun->blocksize; ctsio->kern_rel_offset = 0; @@ -9284,7 +9311,7 @@ ctl_cnw(struct ctl_scsiio *ctsio) &ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; lbalen->lba = lba; lbalen->len = num_blocks; - lbalen->flags = CTL_LLF_COMPARE; + lbalen->flags = CTL_LLF_COMPARE | flags; CTL_DEBUG_PRINT(("ctl_cnw: calling data_submit()\n")); retval = lun->backend->data_submit((union ctl_io *)ctsio); @@ -9298,7 +9325,7 @@ ctl_verify(struct ctl_scsiio *ctsio) struct ctl_lba_len_flags *lbalen; uint64_t lba; uint32_t num_blocks; - int bytchk, dpo; + int bytchk, flags; int retval; lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; @@ -9306,7 +9333,7 @@ ctl_verify(struct ctl_scsiio *ctsio) CTL_DEBUG_PRINT(("ctl_verify: command: %#x\n", ctsio->cdb[0])); bytchk = 0; - dpo = 0; + flags = CTL_LLF_FUA; retval = CTL_RETVAL_COMPLETE; switch (ctsio->cdb[0]) { @@ -9317,7 +9344,7 @@ ctl_verify(struct ctl_scsiio *ctsio) if (cdb->byte2 & SVFY_BYTCHK) bytchk = 1; if (cdb->byte2 & SVFY_DPO) - dpo = 1; + flags |= CTL_LLF_DPO; lba = scsi_4btoul(cdb->addr); num_blocks = scsi_2btoul(cdb->length); break; @@ -9329,7 +9356,7 @@ ctl_verify(struct ctl_scsiio *ctsio) if (cdb->byte2 & SVFY_BYTCHK) bytchk = 1; if (cdb->byte2 & SVFY_DPO) - dpo = 1; + flags |= CTL_LLF_DPO; lba = scsi_4btoul(cdb->addr); num_blocks = scsi_4btoul(cdb->length); break; @@ -9341,7 +9368,7 @@ ctl_verify(struct ctl_scsiio *ctsio) if (cdb->byte2 & SVFY_BYTCHK) bytchk = 1; if (cdb->byte2 & SVFY_DPO) - dpo = 1; + flags |= CTL_LLF_DPO; lba = scsi_8btou64(cdb->addr); num_blocks = scsi_4btoul(cdb->length); break; @@ -9383,10 +9410,10 @@ ctl_verify(struct ctl_scsiio *ctsio) lbalen->lba = lba; lbalen->len = num_blocks; if (bytchk) { - lbalen->flags = CTL_LLF_COMPARE; + lbalen->flags = CTL_LLF_COMPARE | flags; ctsio->kern_total_len = num_blocks * lun->be_lun->blocksize; } else { - lbalen->flags = CTL_LLF_VERIFY; + lbalen->flags = CTL_LLF_VERIFY | flags; ctsio->kern_total_len = 0; } ctsio->kern_rel_offset = 0; Modified: head/sys/cam/ctl/ctl.h ============================================================================== --- head/sys/cam/ctl/ctl.h Tue Sep 9 11:29:55 2014 (r271308) +++ head/sys/cam/ctl/ctl.h Tue Sep 9 11:38:29 2014 (r271309) @@ -162,6 +162,8 @@ int ctl_ffz(uint32_t *mask, uint32_t siz int ctl_set_mask(uint32_t *mask, uint32_t bit); int ctl_clear_mask(uint32_t *mask, uint32_t bit); int ctl_is_set(uint32_t *mask, uint32_t bit); +int ctl_caching_sp_handler(struct ctl_scsiio *ctsio, + struct ctl_page_index *page_index, uint8_t *page_ptr); int ctl_control_page_handler(struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, uint8_t *page_ptr); Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Tue Sep 9 11:29:55 2014 (r271308) +++ head/sys/cam/ctl/ctl_backend_block.c Tue Sep 9 11:38:29 2014 (r271309) @@ -203,7 +203,6 @@ struct ctl_be_block_io { struct ctl_sg_entry sg_segs[CTLBLK_MAX_SEGS]; struct iovec xiovecs[CTLBLK_MAX_SEGS]; int bio_cmd; - int bio_flags; int num_segs; int num_bios_sent; int num_bios_done; @@ -599,7 +598,11 @@ ctl_be_block_dispatch_file(struct ctl_be file_data = &be_lun->backend.file; io = beio->io; - flags = beio->bio_flags; + flags = 0; + if (ARGS(io)->flags & CTL_LLF_DPO) + flags |= IO_DIRECT; + if (beio->bio_cmd == BIO_WRITE && ARGS(io)->flags & CTL_LLF_FUA) + flags |= IO_SYNC; bzero(&xuio, sizeof(xuio)); if (beio->bio_cmd == BIO_READ) { @@ -649,8 +652,7 @@ ctl_be_block_dispatch_file(struct ctl_be * So, to attempt to provide some barrier semantics in the * BIO_ORDERED case, set both IO_DIRECT and IO_SYNC. */ - error = VOP_READ(be_lun->vn, &xuio, (flags & BIO_ORDERED) ? - (IO_DIRECT|IO_SYNC) : 0, file_data->cred); + error = VOP_READ(be_lun->vn, &xuio, flags, file_data->cred); VOP_UNLOCK(be_lun->vn, 0); SDT_PROBE(cbb, kernel, read, file_done, 0, 0, 0, 0, 0); @@ -687,8 +689,7 @@ ctl_be_block_dispatch_file(struct ctl_be * So if we've got the BIO_ORDERED flag set, we want * IO_SYNC in either the UFS or ZFS case. */ - error = VOP_WRITE(be_lun->vn, &xuio, (flags & BIO_ORDERED) ? - IO_SYNC : 0, file_data->cred); + error = VOP_WRITE(be_lun->vn, &xuio, flags, file_data->cred); VOP_UNLOCK(be_lun->vn, 0); vn_finished_write(mountpoint); @@ -752,7 +753,11 @@ ctl_be_block_dispatch_zvol(struct ctl_be dev_data = &be_lun->backend.dev; io = beio->io; - flags = beio->bio_flags; + flags = 0; + if (ARGS(io)->flags & CTL_LLF_DPO) + flags |= IO_DIRECT; + if (beio->bio_cmd == BIO_WRITE && ARGS(io)->flags & CTL_LLF_FUA) + flags |= IO_SYNC; bzero(&xuio, sizeof(xuio)); if (beio->bio_cmd == BIO_READ) { @@ -780,10 +785,10 @@ ctl_be_block_dispatch_zvol(struct ctl_be mtx_unlock(&be_lun->io_lock); if (beio->bio_cmd == BIO_READ) { - error = (*dev_data->csw->d_read)(dev_data->cdev, &xuio, 0); + error = (*dev_data->csw->d_read)(dev_data->cdev, &xuio, flags); SDT_PROBE(cbb, kernel, read, file_done, 0, 0, 0, 0, 0); } else { - error = (*dev_data->csw->d_write)(dev_data->cdev, &xuio, 0); + error = (*dev_data->csw->d_write)(dev_data->cdev, &xuio, flags); SDT_PROBE(cbb, kernel, write, file_done, 0, 0, 0, 0, 0); } @@ -874,7 +879,6 @@ ctl_be_block_unmap_dev_range(struct ctl_ while (len > 0) { bio = g_alloc_bio(); bio->bio_cmd = BIO_DELETE; - bio->bio_flags |= beio->bio_flags; bio->bio_dev = dev_data->cdev; bio->bio_offset = off; bio->bio_length = MIN(len, maxlen); @@ -973,7 +977,6 @@ ctl_be_block_dispatch_dev(struct ctl_be_ KASSERT(bio != NULL, ("g_alloc_bio() failed!\n")); bio->bio_cmd = beio->bio_cmd; - bio->bio_flags |= beio->bio_flags; bio->bio_dev = dev_data->cdev; bio->bio_caller1 = beio; bio->bio_length = min(cur_size, max_iosize); @@ -1052,15 +1055,6 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b return; } - /* - * If the I/O came down with an ordered or head of queue tag, set - * the BIO_ORDERED attribute. For head of queue tags, that's - * pretty much the best we can do. - */ - if ((io->scsiio.tag_type == CTL_TAG_ORDERED) - || (io->scsiio.tag_type == CTL_TAG_HEAD_OF_QUEUE)) - beio->bio_flags = BIO_ORDERED; - switch (io->scsiio.tag_type) { case CTL_TAG_ORDERED: beio->ds_tag_type = DEVSTAT_TAG_ORDERED; @@ -1158,15 +1152,6 @@ ctl_be_block_cw_dispatch_unmap(struct ct return; } - /* - * If the I/O came down with an ordered or head of queue tag, set - * the BIO_ORDERED attribute. For head of queue tags, that's - * pretty much the best we can do. - */ - if ((io->scsiio.tag_type == CTL_TAG_ORDERED) - || (io->scsiio.tag_type == CTL_TAG_HEAD_OF_QUEUE)) - beio->bio_flags = BIO_ORDERED; - switch (io->scsiio.tag_type) { case CTL_TAG_ORDERED: beio->ds_tag_type = DEVSTAT_TAG_ORDERED; @@ -1305,20 +1290,6 @@ ctl_be_block_dispatch(struct ctl_be_bloc bptrlen = PRIV(io); bptrlen->ptr = (void *)beio; - /* - * If the I/O came down with an ordered or head of queue tag, set - * the BIO_ORDERED attribute. For head of queue tags, that's - * pretty much the best we can do. - * - * XXX KDM we don't have a great way to easily know about the FUA - * bit right now (it is decoded in ctl_read_write(), but we don't - * pass that knowledge to the backend), and in any case we would - * need to determine how to handle it. - */ - if ((io->scsiio.tag_type == CTL_TAG_ORDERED) - || (io->scsiio.tag_type == CTL_TAG_HEAD_OF_QUEUE)) - beio->bio_flags = BIO_ORDERED; - switch (io->scsiio.tag_type) { case CTL_TAG_ORDERED: beio->ds_tag_type = DEVSTAT_TAG_ORDERED; Modified: head/sys/cam/ctl/ctl_io.h ============================================================================== --- head/sys/cam/ctl/ctl_io.h Tue Sep 9 11:29:55 2014 (r271308) +++ head/sys/cam/ctl/ctl_io.h Tue Sep 9 11:38:29 2014 (r271309) @@ -139,6 +139,8 @@ struct ctl_lba_len_flags { uint64_t lba; uint32_t len; uint32_t flags; +#define CTL_LLF_FUA 0x04000000 +#define CTL_LLF_DPO 0x08000000 #define CTL_LLF_READ 0x10000000 #define CTL_LLF_WRITE 0x20000000 #define CTL_LLF_VERIFY 0x40000000 Modified: head/sys/cam/ctl/ctl_private.h ============================================================================== --- head/sys/cam/ctl/ctl_private.h Tue Sep 9 11:29:55 2014 (r271308) +++ head/sys/cam/ctl/ctl_private.h Tue Sep 9 11:38:29 2014 (r271309) @@ -304,7 +304,7 @@ static const struct ctl_page_index page_ {SMS_RIGID_DISK_PAGE, 0, sizeof(struct scsi_rigid_disk_page), NULL, CTL_PAGE_FLAG_DISK_ONLY, NULL, NULL}, {SMS_CACHING_PAGE, 0, sizeof(struct scsi_caching_page), NULL, - CTL_PAGE_FLAG_DISK_ONLY, NULL, NULL}, + CTL_PAGE_FLAG_DISK_ONLY, NULL, ctl_caching_sp_handler}, {SMS_CONTROL_MODE_PAGE, 0, sizeof(struct scsi_control_page), NULL, CTL_PAGE_FLAG_NONE, NULL, ctl_control_page_handler}, {SMS_VENDOR_SPECIFIC_PAGE | SMPH_SPF, PWR_SUBPAGE_CODE, From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 10:25:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0774A9D; Tue, 9 Sep 2014 10:25:25 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFFE2FB3; Tue, 9 Sep 2014 10:25:24 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.82 (FreeBSD)) (envelope-from ) id 1XRIbu-0006OI-1Z; Tue, 09 Sep 2014 14:25:18 +0400 Date: Tue, 9 Sep 2014 14:25:18 +0400 From: Slawa Olhovchenkov To: John Baldwin Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm Message-ID: <20140909102517.GA22834@zxy.spb.ru> References: <201408281950.s7SJo90I047213@svn.freebsd.org> <5409810E.1080705@FreeBSD.org> <20140907125649.GA72244@zxy.spb.ru> <16592453.QchvydMH6M@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16592453.QchvydMH6M@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Mailman-Approved-At: Tue, 09 Sep 2014 12:08:56 +0000 Cc: src-committers@freebsd.org, Peter Wemm , Alan Cox , svn-src-all@freebsd.org, Dmitry Morozovsky , Andriy Gapon , Steven Hartland , "Matthew D. Fuller" , svn-src-head@freebsd.org, Nikolai Lifanov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 10:25:25 -0000 On Mon, Sep 08, 2014 at 11:17:51AM -0400, John Baldwin wrote: > On Sunday, September 07, 2014 04:56:49 PM Slawa Olhovchenkov wrote: > > PS: very bad that 'data limit' don't anymore reflect application > > memory consumer. and very small application can adapt to 'no memory' > > from system. > > You can use RLIMIT_AS instead of RLIMIT_DATA. jemalloc can also be configured > to use sbrk(), though I think there's no way to prevent it from falling back > to mmap(MAP_ANON) if sbrk() fails. Formally you are right. Realy this is scorn. And I don't know how rightly. May be account in RLIMIT_DATA MAP_ANON? Anyway firefox don't run GC if malloc fail and this is bad. From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 13:50:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 201B1B81; Tue, 9 Sep 2014 13:50:22 +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 0B4C0D97; Tue, 9 Sep 2014 13:50:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89DoLBb074215; Tue, 9 Sep 2014 13:50:21 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89DoL7v074214; Tue, 9 Sep 2014 13:50:21 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409091350.s89DoL7v074214@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 9 Sep 2014 13:50:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271310 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 13:50:22 -0000 Author: ian Date: Tue Sep 9 13:50:21 2014 New Revision: 271310 URL: http://svnweb.freebsd.org/changeset/base/271310 Log: Rename new to newval in inline asm code, to avoid clashes with C++ new. Also rename cmp to cmpval just to keep the asm variable names similar to the C variable names. Modified: head/sys/arm/include/atomic.h Modified: head/sys/arm/include/atomic.h ============================================================================== --- head/sys/arm/include/atomic.h Tue Sep 9 11:38:29 2014 (r271309) +++ head/sys/arm/include/atomic.h Tue Sep 9 13:50:21 2014 (r271310) @@ -268,12 +268,12 @@ atomic_cmpset_64(volatile uint64_t *p, u __asm __volatile( "1: \n" " ldrexd %[tmp], [%[ptr]]\n" - " teq %Q[tmp], %Q[cmp]\n" + " teq %Q[tmp], %Q[cmpval]\n" " itee eq \n" - " teqeq %R[tmp], %R[cmp]\n" + " teqeq %R[tmp], %R[cmpval]\n" " movne %[ret], #0\n" " bne 2f\n" - " strexd %[ret], %[new], [%[ptr]]\n" + " strexd %[ret], %[newval], [%[ptr]]\n" " teq %[ret], #0\n" " it ne \n" " bne 1b\n" @@ -282,8 +282,8 @@ atomic_cmpset_64(volatile uint64_t *p, u : [ret] "=&r" (ret), [tmp] "=&r" (tmp) : [ptr] "r" (p), - [cmp] "r" (cmpval), - [new] "r" (newval) + [cmpval] "r" (cmpval), + [newval] "r" (newval) : "cc", "memory"); return (ret); } From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 14:09:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3D8B30E; Tue, 9 Sep 2014 14:09:51 +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 9EDB0F21; Tue, 9 Sep 2014 14:09:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89E9pbv083089; Tue, 9 Sep 2014 14:09:51 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89E9pvU083088; Tue, 9 Sep 2014 14:09:51 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409091409.s89E9pvU083088@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 9 Sep 2014 14:09:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271311 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 14:09:51 -0000 Author: mav Date: Tue Sep 9 14:09:51 2014 New Revision: 271311 URL: http://svnweb.freebsd.org/changeset/base/271311 Log: Add support for Mode Page Policy (0x87) VPD page. Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Tue Sep 9 13:50:21 2014 (r271310) +++ head/sys/cam/ctl/ctl.c Tue Sep 9 14:09:51 2014 (r271311) @@ -320,10 +320,11 @@ SYSCTL_INT(_kern_cam_ctl, OID_AUTO, verb /* * Supported pages (0x00), Serial number (0x80), Device ID (0x83), + * Mode Page Policy (0x87), * SCSI Ports (0x88), Third-party Copy (0x8F), Block limits (0xB0), * Block Device Characteristics (0xB1) and Logical Block Provisioning (0xB2) */ -#define SCSI_EVPD_NUM_SUPPORTED_PAGES 8 +#define SCSI_EVPD_NUM_SUPPORTED_PAGES 9 static void ctl_isc_event_handler(ctl_ha_channel chanel, ctl_ha_event event, int param); @@ -379,6 +380,7 @@ static void ctl_hndl_per_res_out_on_othe static int ctl_inquiry_evpd_supported(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_serial(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_devid(struct ctl_scsiio *ctsio, int alloc_len); +static int ctl_inquiry_evpd_mpp(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_scsi_ports(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_block_limits(struct ctl_scsiio *ctsio, @@ -9831,16 +9833,18 @@ ctl_inquiry_evpd_supported(struct ctl_sc pages->page_list[1] = SVPD_UNIT_SERIAL_NUMBER; /* Device Identification */ pages->page_list[2] = SVPD_DEVICE_ID; + /* Mode Page Policy */ + pages->page_list[3] = SVPD_MODE_PAGE_POLICY; /* SCSI Ports */ - pages->page_list[3] = SVPD_SCSI_PORTS; + pages->page_list[4] = SVPD_SCSI_PORTS; /* Third-party Copy */ - pages->page_list[4] = SVPD_SCSI_TPC; + pages->page_list[5] = SVPD_SCSI_TPC; /* Block limits */ - pages->page_list[5] = SVPD_BLOCK_LIMITS; + pages->page_list[6] = SVPD_BLOCK_LIMITS; /* Block Device Characteristics */ - pages->page_list[6] = SVPD_BDC; + pages->page_list[7] = SVPD_BDC; /* Logical Block Provisioning */ - pages->page_list[7] = SVPD_LBP; + pages->page_list[8] = SVPD_LBP; ctsio->scsi_status = SCSI_STATUS_OK; @@ -9909,6 +9913,58 @@ ctl_inquiry_evpd_serial(struct ctl_scsii static int +ctl_inquiry_evpd_mpp(struct ctl_scsiio *ctsio, int alloc_len) +{ + struct scsi_vpd_mode_page_policy *mpp_ptr; + struct ctl_lun *lun; + int data_len; + + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + + data_len = sizeof(struct scsi_vpd_mode_page_policy) + + sizeof(struct scsi_vpd_mode_page_policy_descr); + + ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); + mpp_ptr = (struct scsi_vpd_mode_page_policy *)ctsio->kern_data_ptr; + ctsio->kern_sg_entries = 0; + + if (data_len < alloc_len) { + ctsio->residual = alloc_len - data_len; + ctsio->kern_data_len = data_len; + ctsio->kern_total_len = data_len; + } else { + ctsio->residual = 0; + ctsio->kern_data_len = alloc_len; + ctsio->kern_total_len = alloc_len; + } + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + ctsio->kern_sg_entries = 0; + + /* + * The control device is always connected. The disk device, on the + * other hand, may not be online all the time. + */ + if (lun != NULL) + mpp_ptr->device = (SID_QUAL_LU_CONNECTED << 5) | + lun->be_lun->lun_type; + else + mpp_ptr->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT; + mpp_ptr->page_code = SVPD_MODE_PAGE_POLICY; + scsi_ulto2b(data_len - 4, mpp_ptr->page_length); + mpp_ptr->descr[0].page_code = 0x3f; + mpp_ptr->descr[0].subpage_code = 0xff; + mpp_ptr->descr[0].policy = SVPD_MPP_SHARED; + + ctsio->scsi_status = SCSI_STATUS_OK; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); + + return (CTL_RETVAL_COMPLETE); +} + +static int ctl_inquiry_evpd_devid(struct ctl_scsiio *ctsio, int alloc_len) { struct scsi_vpd_device_id *devid_ptr; @@ -10338,6 +10394,9 @@ ctl_inquiry_evpd(struct ctl_scsiio *ctsi case SVPD_DEVICE_ID: retval = ctl_inquiry_evpd_devid(ctsio, alloc_len); break; + case SVPD_MODE_PAGE_POLICY: + retval = ctl_inquiry_evpd_mpp(ctsio, alloc_len); + break; case SVPD_SCSI_PORTS: retval = ctl_inquiry_evpd_scsi_ports(ctsio, alloc_len); break; From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 14:18:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58B995A3; Tue, 9 Sep 2014 14:18:57 +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 2B203A6; Tue, 9 Sep 2014 14:18:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89EIvt3087740; Tue, 9 Sep 2014 14:18:57 GMT (envelope-from ray@FreeBSD.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89EIujo087738; Tue, 9 Sep 2014 14:18:56 GMT (envelope-from ray@FreeBSD.org) Message-Id: <201409091418.s89EIujo087738@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ray set sender to ray@FreeBSD.org using -f From: Aleksandr Rybalko Date: Tue, 9 Sep 2014 14:18:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271312 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 14:18:57 -0000 Author: ray Date: Tue Sep 9 14:18:56 2014 New Revision: 271312 URL: http://svnweb.freebsd.org/changeset/base/271312 Log: Revert r269474. Special keyboard combinations should be handled by separate sysctls. Modified: head/sys/dev/vt/vt.h head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Tue Sep 9 14:09:51 2014 (r271311) +++ head/sys/dev/vt/vt.h Tue Sep 9 14:18:56 2014 (r271312) @@ -87,12 +87,6 @@ static int vt_##_name = _default; \ SYSCTL_INT(_kern_vt, OID_AUTO, _name, CTLFLAG_RWTUN, &vt_##_name, _default,\ _descr); -/* Allow to disable some special keys by users. */ -#define VT_DEBUG_KEY_ENABLED (1 << 0) -#define VT_REBOOT_KEY_ENABLED (1 << 1) -#define VT_HALT_KEY_ENABLED (1 << 2) -#define VT_POWEROFF_KEY_ENABLED (1 << 3) - struct vt_driver; void vt_allocate(struct vt_driver *, void *); Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Tue Sep 9 14:09:51 2014 (r271311) +++ head/sys/dev/vt/vt_core.c Tue Sep 9 14:18:56 2014 (r271312) @@ -122,9 +122,6 @@ VT_SYSCTL_INT(enable_altgr, 1, "Enable A VT_SYSCTL_INT(debug, 0, "vt(9) debug level"); VT_SYSCTL_INT(deadtimer, 15, "Time to wait busy process in VT_PROCESS mode"); VT_SYSCTL_INT(suspendswitch, 1, "Switch to VT0 before suspend"); -VT_SYSCTL_INT(spclkeys, (VT_DEBUG_KEY_ENABLED|VT_REBOOT_KEY_ENABLED| - VT_HALT_KEY_ENABLED|VT_POWEROFF_KEY_ENABLED), "Enabled special keys " - "handled by vt(4)"); static struct vt_device vt_consdev; static unsigned int vt_unit = 0; @@ -488,21 +485,17 @@ vt_machine_kbdevent(int c) switch (c) { case SPCLKEY | DBG: - if (vt_spclkeys & VT_DEBUG_KEY_ENABLED) - kdb_enter(KDB_WHY_BREAK, "manual escape to debugger"); + kdb_enter(KDB_WHY_BREAK, "manual escape to debugger"); return (1); case SPCLKEY | RBT: - if (vt_spclkeys & VT_REBOOT_KEY_ENABLED) - /* XXX: Make this configurable! */ - shutdown_nice(0); + /* XXX: Make this configurable! */ + shutdown_nice(0); return (1); case SPCLKEY | HALT: - if (vt_spclkeys & VT_HALT_KEY_ENABLED) - shutdown_nice(RB_HALT); + shutdown_nice(RB_HALT); return (1); case SPCLKEY | PDWN: - if (vt_spclkeys & VT_POWEROFF_KEY_ENABLED) - shutdown_nice(RB_HALT|RB_POWEROFF); + shutdown_nice(RB_HALT|RB_POWEROFF); return (1); }; From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 14:20:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66A2970F; Tue, 9 Sep 2014 14:20:56 +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 519FF144; Tue, 9 Sep 2014 14:20:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89EKu4S090796; Tue, 9 Sep 2014 14:20:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89EKuqM090795; Tue, 9 Sep 2014 14:20:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409091420.s89EKuqM090795@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 9 Sep 2014 14:20:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271313 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 14:20:56 -0000 Author: mav Date: Tue Sep 9 14:20:55 2014 New Revision: 271313 URL: http://svnweb.freebsd.org/changeset/base/271313 Log: Oops, missed piece of r271311. Modified: head/sys/cam/scsi/scsi_all.h Modified: head/sys/cam/scsi/scsi_all.h ============================================================================== --- head/sys/cam/scsi/scsi_all.h Tue Sep 9 14:18:56 2014 (r271312) +++ head/sys/cam/scsi/scsi_all.h Tue Sep 9 14:20:55 2014 (r271313) @@ -2110,6 +2110,27 @@ struct scsi_service_action_in uint8_t control; }; +struct scsi_vpd_mode_page_policy_descr +{ + uint8_t page_code; + uint8_t subpage_code; + uint8_t policy; +#define SVPD_MPP_SHARED 0x00 +#define SVPD_MPP_PORT 0x01 +#define SVPD_MPP_I_T 0x03 +#define SVPD_MPP_MLUS 0x80 + uint8_t reserved; +}; + +struct scsi_vpd_mode_page_policy +{ + uint8_t device; + uint8_t page_code; +#define SVPD_MODE_PAGE_POLICY 0x87 + uint8_t page_length[2]; + struct scsi_vpd_mode_page_policy_descr descr[0]; +}; + struct scsi_diag_page { uint8_t page_code; uint8_t page_specific_flags; From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 14:26:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6F498E1; Tue, 9 Sep 2014 14:26:12 +0000 (UTC) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 5FD9E191; Tue, 9 Sep 2014 14:26:12 +0000 (UTC) Received: from terran (unknown [192.168.99.1]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id B1443C4934; Tue, 9 Sep 2014 17:26:04 +0300 (EEST) Date: Tue, 9 Sep 2014 17:27:28 +0300 From: Aleksandr Rybalko To: Bruce Evans Subject: Re: svn commit: r269474 - in head: share/man/man4 sys/dev/vt Message-Id: <20140909172728.2eb5cfc5d7159f60896e1a0a@ddteam.net> In-Reply-To: <20140812121718.U1185@besplex.bde.org> References: <53de340e.52ce.7073778e@svn.freebsd.org> <20140805091730.N2827@besplex.bde.org> <201408111315.16939.jhb@freebsd.org> <20140812121718.U1185@besplex.bde.org> X-Mailer: Sylpheed 3.4.2 (GTK+ 2.24.22; amd64-portbld-freebsd9.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Aleksandr Rybalko , src-committers@freebsd.org, svn-src-all@freebsd.org, John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 14:26:12 -0000 On Tue, 12 Aug 2014 13:17:55 +1000 (EST) Bruce Evans wrote: > On Mon, 11 Aug 2014, John Baldwin wrote: > > > On Monday, August 04, 2014 8:03:58 pm Bruce Evans wrote: > >> On Mon, 4 Aug 2014, John Baldwin wrote: > >>> I realize the API uses 'SPCL' as an abbreviation, but for user-facing things like a sysctl and tunable, I think it might be better to spell it out as > > "specialkeys" instead? > >> > >> It is a bad name, and also gratuitously different from syscons where the > >> names are: > >> > >> hw.syscons.kbd_reboot > >> hw.syscons.kbd_debug > >> hw.syscons.sc_no_suspend_vtswitch > > > > I would prefer individual nodes for vt along these lines as I think it is > > clearer to the user ("what exactly constitutes a special key?") > > But rename them a bit so it is clearer that they give limited access > control. The sysctl -d descriptions are no better about this: > > % hw.syscons.kbd_reboot: enable keyboard reboot > % hw.syscons.kbd_debug: enable keyboard debug > % hw.syscons.sc_no_suspend_vtswitch: Disable VT switch before suspend. > > These also have some style bugs ("enable" is not capitalized; the last > description is terminated). > > The option name SC_DISABLE_KDBKEY is better. It more clearly controls > a key, not debugging. The option name SC_DISABLE_REBOOT is no better. > > Bruce Hello John, Bruce and other hackers! I did revert r269474, but not commit yet new version. Instead, I've put new version into phabricator. Please look it here https://reviews.freebsd.org/D747. Thanks a lot for your hints/comments. And sorry for long delay. WBW -- Aleksandr Rybalko From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 14:31:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8F7DAF8; Tue, 9 Sep 2014 14:31:56 +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 C344A262; Tue, 9 Sep 2014 14:31:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89EVuh4096213; Tue, 9 Sep 2014 14:31:56 GMT (envelope-from joel@FreeBSD.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89EVu8h096212; Tue, 9 Sep 2014 14:31:56 GMT (envelope-from joel@FreeBSD.org) Message-Id: <201409091431.s89EVu8h096212@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: joel set sender to joel@FreeBSD.org using -f From: Joel Dahl Date: Tue, 9 Sep 2014 14:31:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271314 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 14:31:57 -0000 Author: joel (doc committer) Date: Tue Sep 9 14:31:56 2014 New Revision: 271314 URL: http://svnweb.freebsd.org/changeset/base/271314 Log: - Add missing " - Sort sections Modified: head/share/man/man9/sysctl.9 Modified: head/share/man/man9/sysctl.9 ============================================================================== --- head/share/man/man9/sysctl.9 Tue Sep 9 14:20:55 2014 (r271313) +++ head/share/man/man9/sysctl.9 Tue Sep 9 14:31:56 2014 (r271314) @@ -105,7 +105,7 @@ .Fa "void *ptr" .Fa "intptr_t len" .Fa "const char *format" -.Fa "const char *descr +.Fa "const char *descr" .Fc .Ft struct sysctl_oid * .Fo SYSCTL_ADD_PROC @@ -505,49 +505,6 @@ enviroment early during module load or s .It Dv CTLFLAG_DYN Dynamically created OIDs automatically get this flag set. .El -.Sh SECURITY CONSIDERATIONS -When creating new sysctls, careful attention should be paid to the security -implications of the monitoring or management interface being created. -Most sysctls present in the kernel are read-only or writable only by the -superuser. -Sysctls exporting extensive information on system data structures and -operation, especially those implemented using procedures, will wish to -implement access control to limit the undesired exposure of information about -other processes, network connections, etc. -.Pp -The following top level sysctl name spaces are commonly used: -.Bl -tag -width ".Va regression" -.It Va compat -Compatibility layer information. -.It Va debug -Debugging information. -Various name spaces exist under -.Va debug . -.It Va hw -Hardware and device driver information. -.It Va kern -Kernel behavior tuning; generally deprecated in favor of more specific -name spaces. -.It Va machdep -Machine-dependent configuration parameters. -.It Va net -Network subsystem. -Various protocols have name spaces under -.Va net . -.It Va regression -Regression test configuration and information. -.It Va security -Security and security-policy configuration and information. -.It Va sysctl -Reserved name space for the implementation of sysctl. -.It Va user -Configuration settings relating to user application behavior. -Generally, configuring applications using kernel sysctls is discouraged. -.It Va vfs -Virtual file system configuration and information. -.It Va vm -Virtual memory subsystem configuration and information. -.El .Sh EXAMPLES Sample use of .Fn SYSCTL_DECL @@ -702,3 +659,46 @@ addition of MIB nodes. .Pp This man page was written by .An Robert N. M. Watson . +.Sh SECURITY CONSIDERATIONS +When creating new sysctls, careful attention should be paid to the security +implications of the monitoring or management interface being created. +Most sysctls present in the kernel are read-only or writable only by the +superuser. +Sysctls exporting extensive information on system data structures and +operation, especially those implemented using procedures, will wish to +implement access control to limit the undesired exposure of information about +other processes, network connections, etc. +.Pp +The following top level sysctl name spaces are commonly used: +.Bl -tag -width ".Va regression" +.It Va compat +Compatibility layer information. +.It Va debug +Debugging information. +Various name spaces exist under +.Va debug . +.It Va hw +Hardware and device driver information. +.It Va kern +Kernel behavior tuning; generally deprecated in favor of more specific +name spaces. +.It Va machdep +Machine-dependent configuration parameters. +.It Va net +Network subsystem. +Various protocols have name spaces under +.Va net . +.It Va regression +Regression test configuration and information. +.It Va security +Security and security-policy configuration and information. +.It Va sysctl +Reserved name space for the implementation of sysctl. +.It Va user +Configuration settings relating to user application behavior. +Generally, configuring applications using kernel sysctls is discouraged. +.It Va vfs +Virtual file system configuration and information. +.It Va vm +Virtual memory subsystem configuration and information. +.El From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 14:34:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F730C6F; Tue, 9 Sep 2014 14:34:55 +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 3A7BF281; Tue, 9 Sep 2014 14:34:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89EYtqe096673; Tue, 9 Sep 2014 14:34:55 GMT (envelope-from joel@FreeBSD.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89EYtR5096672; Tue, 9 Sep 2014 14:34:55 GMT (envelope-from joel@FreeBSD.org) Message-Id: <201409091434.s89EYtR5096672@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: joel set sender to joel@FreeBSD.org using -f From: Joel Dahl Date: Tue, 9 Sep 2014 14:34:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271315 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 14:34:55 -0000 Author: joel (doc committer) Date: Tue Sep 9 14:34:54 2014 New Revision: 271315 URL: http://svnweb.freebsd.org/changeset/base/271315 Log: Minor mdoc nit. Modified: head/lib/libc/sys/kqueue.2 Modified: head/lib/libc/sys/kqueue.2 ============================================================================== --- head/lib/libc/sys/kqueue.2 Tue Sep 9 14:31:56 2014 (r271314) +++ head/lib/libc/sys/kqueue.2 Tue Sep 9 14:34:54 2014 (r271315) @@ -478,7 +478,6 @@ is in microseconds. .It Dv NOTE_NSECONDS .Va data is in nanoseconds. -.It .El .Pp If From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 15:19:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FC972ED; Tue, 9 Sep 2014 15:19:39 +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 0A6E7A04; Tue, 9 Sep 2014 15:19:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89FJc1T020962; Tue, 9 Sep 2014 15:19:38 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89FJcGV020961; Tue, 9 Sep 2014 15:19:38 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409091519.s89FJcGV020961@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 9 Sep 2014 15:19:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271316 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 15:19:39 -0000 Author: mav Date: Tue Sep 9 15:19:38 2014 New Revision: 271316 URL: http://svnweb.freebsd.org/changeset/base/271316 Log: Report that DPO and FUA bits are supported after r271311. Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Tue Sep 9 14:34:54 2014 (r271315) +++ head/sys/cam/ctl/ctl.c Tue Sep 9 15:19:38 2014 (r271316) @@ -7057,7 +7057,8 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) header = (struct scsi_mode_hdr_6 *)ctsio->kern_data_ptr; header->datalen = ctl_min(total_len - 1, 254); - + if (control_dev == 0) + header->dev_specific = 0x10; /* DPOFUA */ if (dbd) header->block_descr_len = 0; else @@ -7074,6 +7075,8 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) datalen = ctl_min(total_len - 2, 65533); scsi_ulto2b(datalen, header->datalen); + if (control_dev == 0) + header->dev_specific = 0x10; /* DPOFUA */ if (dbd) scsi_ulto2b(0, header->block_descr_len); else From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 16:03:45 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70941908; Tue, 9 Sep 2014 16:03:45 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 1070DFC6; Tue, 9 Sep 2014 16:03:43 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA29457; Tue, 09 Sep 2014 19:03:42 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1XRNtN-000IQo-ON; Tue, 09 Sep 2014 19:03:41 +0300 Message-ID: <540F24A6.6060606@FreeBSD.org> Date: Tue, 09 Sep 2014 19:02:46 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Hiroki Sato , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r270698 - in head: etc share/man/man5 References: <201408270919.s7R9JNeF054138@svn.freebsd.org> In-Reply-To: <201408270919.s7R9JNeF054138@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 16:03:45 -0000 on 27/08/2014 12:19 Hiroki Sato said the following: > For jail configurations you could use the file > .Pa /etc/rc.conf.d/jail > to store jail specific configuration options. > +If > +.Va local_startup > +contains > +.Pa /usr/local/etc/rc.d > +and > +.Pa /opt/conf , > +.Pa /usr/local/rc.conf.d/jail It seems that the above should be /usr/local/etc/rc.conf.d/jail (note "etc"). > +and > +.Pa /opt/conf/rc.conf.d/jail > +will be loaded. > +If > +.Ao Ar dir Ac Ns Pa /rc.conf.d/ Ns Ao Ar name Ac > +is a directory, > +all of files in the directory will be loaded. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 16:05:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5DB1CBE; Tue, 9 Sep 2014 16:05:33 +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 A0A3AFFC; Tue, 9 Sep 2014 16:05:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89G5Xi1044517; Tue, 9 Sep 2014 16:05:33 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89G5XWf044516; Tue, 9 Sep 2014 16:05:33 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201409091605.s89G5XWf044516@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 9 Sep 2014 16:05:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271317 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 16:05:33 -0000 Author: trasz Date: Tue Sep 9 16:05:33 2014 New Revision: 271317 URL: http://svnweb.freebsd.org/changeset/base/271317 Log: Avoid unlocking unlocked mutex in RCTL jail code. Specific test case is attached to PR. PR: 193457 MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_jail.c Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Tue Sep 9 15:19:38 2014 (r271316) +++ head/sys/kern/kern_jail.c Tue Sep 9 16:05:33 2014 (r271317) @@ -1812,9 +1812,11 @@ kern_jail_set(struct thread *td, struct #ifdef RACCT if (!created) { - sx_sunlock(&allprison_lock); + if (!(flags & JAIL_ATTACH)) + sx_sunlock(&allprison_lock); prison_racct_modify(pr); - sx_slock(&allprison_lock); + if (!(flags & JAIL_ATTACH)) + sx_slock(&allprison_lock); } #endif From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 16:11:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAD55F16; Tue, 9 Sep 2014 16:11:04 +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 D4606167; Tue, 9 Sep 2014 16:11:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89GB4Oi045628; Tue, 9 Sep 2014 16:11:04 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89GB44g045627; Tue, 9 Sep 2014 16:11:04 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409091611.s89GB44g045627@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 9 Sep 2014 16:11: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: r271318 - stable/10/release/amd64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 16:11:05 -0000 Author: emaste Date: Tue Sep 9 16:11:04 2014 New Revision: 271318 URL: http://svnweb.freebsd.org/changeset/base/271318 Log: MFC UEFI memstick build script r264935 (gjb): Add a separate script to build the memstick.img and the mini-memstick.img with UEFI support. As the comments in the file suggest, 1) there must be existing ${.OBJDIR}/usr/src/release/{release,bootonly}; 2) TARGET/TARGET_ARCH must be amd64; and 3) it must be a vt(4)-enabled kernel with vt_efifb (*not* vt_vga). This script is not hooked into release/Makefile in any way until further testing is complete. r264992 (nwhitehorn): Make a dual-boot BIOS/UEFI memstick image. Testing required before this gets renamed make-memstick.sh. r265017 (nwhitehorn): loader's GPT support on BIOS does not seem to like the root filesystem being the last filesystem on the disk for some reason when made by this script. Add a vestigial swap partition to allow this to boot with QEMU BIOS. Approved by: re Sponsored by: The FreeBSD Foundation Added: stable/10/release/amd64/make-uefi-memstick.sh - copied, changed from r264935, head/release/amd64/make-uefi-memstick.sh Modified: Directory Properties: stable/10/ (props changed) Copied and modified: stable/10/release/amd64/make-uefi-memstick.sh (from r264935, head/release/amd64/make-uefi-memstick.sh) ============================================================================== --- head/release/amd64/make-uefi-memstick.sh Fri Apr 25 21:11:00 2014 (r264935, copy source) +++ stable/10/release/amd64/make-uefi-memstick.sh Tue Sep 9 16:11:04 2014 (r271318) @@ -1,12 +1,9 @@ #!/bin/sh # -# This script generates a "memstick image" for UEFI-capable systems. -# -# Prerequisites: -# - 'make release' -# - KERNCONF *must* be VT (or vt_efifb(4) compiled into the kernel) -# -# Note: This only works for amd64, because i386 lacks the EFI boot bits. +# This script generates a "memstick image" (image that can be copied to a +# USB memory stick) from a directory tree. Note that the script does not +# clean up after itself very well for error conditions on purpose so the +# problem can be diagnosed (full filesystem most likely but ...). # # Usage: make-memstick.sh # @@ -31,43 +28,14 @@ if [ -e ${2} ]; then exit 1 fi -dirsize=$(du -shLm ${1} | awk '{print $1}') -dirsize=$(( $(( $(( ${dirsize} + 256 )) * 1024 * 1024 )) )) -truncate -s ${dirsize} ${2} - -unit=$(mdconfig -a -t vnode -f ${2}) -gpart create -s mbr /dev/${unit} -gpart add -t '!0xEF' -s 32M /dev/${unit} -gpart add -t freebsd /dev/${unit} -gpart set -a active -i 2 /dev/${unit} -gpart bootcode -b ${1}/boot/boot0 /dev/${unit} -gpart create -s bsd -n 20 /dev/${unit}s2 -gpart add -t freebsd-ufs /dev/${unit}s2 -gpart bootcode -b ${1}/boot/boot /dev/${unit}s2 -newfs_msdos /dev/${unit}s1 -newfs -L rootfs /dev/${unit}s2a -mkdir -p ${1}/mnt -mount -t msdosfs /dev/${unit}s1 ${1}/mnt -mkdir -p ${1}/mnt/efi/boot -cp -p ${1}/boot/boot1.efi ${1}/mnt/efi/boot/BOOTx64.efi - -while ! umount ${1}/mnt; do - sleep 1 -done - -mkdir -p mnt -mount /dev/${unit}s2a mnt -tar -cf - -C ${1} . | tar -xf - -C mnt -echo "/dev/ufs/rootfs / ufs ro,noatime 1 1" > mnt/etc/fstab - -while ! umount mnt; do - sleep 1 -done - -# Default boot selection to MBR so systems that do not support UEFI -# do not fail to boot without human interaction. -boot0cfg -s 2 /dev/${unit} +echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab +makefs -B little -o label=FreeBSD_Install ${2}.part ${1} +if [ $? -ne 0 ]; then + echo "makefs failed" + exit 1 +fi +rm ${1}/etc/fstab -mdconfig -d -u ${unit} -rmdir mnt +mkimg -s gpt -b ${1}/boot/pmbr -p efi:=${1}/boot/boot1.efifat -p freebsd-boot:=${1}/boot/gptboot -p freebsd-ufs:=${2}.part -p freebsd-swap::1M -o ${2} +rm ${2}.part From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 16:45:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5AEF1C8D; Tue, 9 Sep 2014 16:45: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 2B9EB6D2; Tue, 9 Sep 2014 16:45: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 s89GjbQW063849; Tue, 9 Sep 2014 16:45:37 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89GjbnV063848; Tue, 9 Sep 2014 16:45:37 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201409091645.s89GjbnV063848@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 9 Sep 2014 16:45:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271319 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 16:45:37 -0000 Author: trasz Date: Tue Sep 9 16:45:36 2014 New Revision: 271319 URL: http://svnweb.freebsd.org/changeset/base/271319 Log: Fix ctld(8) to not forget to send TargetPortalGroupTag and TargetAlias when the initiator skips security negotiation. This fixes interoperability with Xtend SAN initiator. PR: 193021 MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/login.c Modified: head/usr.sbin/ctld/login.c ============================================================================== --- head/usr.sbin/ctld/login.c Tue Sep 9 16:11:04 2014 (r271318) +++ head/usr.sbin/ctld/login.c Tue Sep 9 16:45:36 2014 (r271319) @@ -785,7 +785,8 @@ login_negotiate(struct connection *conn, struct pdu *response; struct iscsi_bhs_login_response *bhslr2; struct keys *request_keys, *response_keys; - int i; + char *portal_group_tag; + int i, rv; bool skipped_security; if (request == NULL) { @@ -806,6 +807,21 @@ login_negotiate(struct connection *conn, login_set_csg(response, BHSLR_STAGE_OPERATIONAL_NEGOTIATION); login_set_nsg(response, BHSLR_STAGE_FULL_FEATURE_PHASE); response_keys = keys_new(); + + if (skipped_security && + conn->conn_session_type == CONN_SESSION_TYPE_NORMAL) { + if (conn->conn_target->t_alias != NULL) + keys_add(response_keys, + "TargetAlias", conn->conn_target->t_alias); + rv = asprintf(&portal_group_tag, "%d", + conn->conn_portal->p_portal_group->pg_tag); + if (rv <= 0) + log_err(1, "asprintf"); + keys_add(response_keys, + "TargetPortalGroupTag", portal_group_tag); + free(portal_group_tag); + } + for (i = 0; i < KEYS_MAX; i++) { if (request_keys->keys_names[i] == NULL) break; @@ -1069,6 +1085,9 @@ login(struct connection *conn) response_keys = keys_new(); keys_add(response_keys, "AuthMethod", "CHAP"); if (conn->conn_session_type == CONN_SESSION_TYPE_NORMAL) { + if (conn->conn_target->t_alias != NULL) + keys_add(response_keys, + "TargetAlias", conn->conn_target->t_alias); rv = asprintf(&portal_group_tag, "%d", conn->conn_portal->p_portal_group->pg_tag); if (rv <= 0) @@ -1076,9 +1095,6 @@ login(struct connection *conn) keys_add(response_keys, "TargetPortalGroupTag", portal_group_tag); free(portal_group_tag); - if (conn->conn_target->t_alias != NULL) - keys_add(response_keys, - "TargetAlias", conn->conn_target->t_alias); } keys_save(response_keys, response); From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 16:57:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A853F3E8; Tue, 9 Sep 2014 16:57:03 +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 799C8847; Tue, 9 Sep 2014 16:57:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89Gv3Rq069077; Tue, 9 Sep 2014 16:57:03 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89Gv3X9069076; Tue, 9 Sep 2014 16:57:03 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201409091657.s89Gv3X9069076@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 9 Sep 2014 16:57:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271320 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 16:57:03 -0000 Author: trasz Date: Tue Sep 9 16:57:02 2014 New Revision: 271320 URL: http://svnweb.freebsd.org/changeset/base/271320 Log: Use keys_add_int() where appropriate. No functional changes. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/login.c Modified: head/usr.sbin/ctld/login.c ============================================================================== --- head/usr.sbin/ctld/login.c Tue Sep 9 16:45:36 2014 (r271319) +++ head/usr.sbin/ctld/login.c Tue Sep 9 16:57:02 2014 (r271320) @@ -785,8 +785,7 @@ login_negotiate(struct connection *conn, struct pdu *response; struct iscsi_bhs_login_response *bhslr2; struct keys *request_keys, *response_keys; - char *portal_group_tag; - int i, rv; + int i; bool skipped_security; if (request == NULL) { @@ -813,13 +812,8 @@ login_negotiate(struct connection *conn, if (conn->conn_target->t_alias != NULL) keys_add(response_keys, "TargetAlias", conn->conn_target->t_alias); - rv = asprintf(&portal_group_tag, "%d", + keys_add_int(response_keys, "TargetPortalGroupTag", conn->conn_portal->p_portal_group->pg_tag); - if (rv <= 0) - log_err(1, "asprintf"); - keys_add(response_keys, - "TargetPortalGroupTag", portal_group_tag); - free(portal_group_tag); } for (i = 0; i < KEYS_MAX; i++) { @@ -852,8 +846,6 @@ login(struct connection *conn) struct auth_group *ag; const char *initiator_name, *initiator_alias, *session_type, *target_name, *auth_method; - char *portal_group_tag; - int rv; /* * Handle the initial Login Request - figure out required authentication @@ -1032,13 +1024,8 @@ login(struct connection *conn) if (conn->conn_target->t_alias != NULL) keys_add(response_keys, "TargetAlias", conn->conn_target->t_alias); - rv = asprintf(&portal_group_tag, "%d", + keys_add_int(response_keys, "TargetPortalGroupTag", conn->conn_portal->p_portal_group->pg_tag); - if (rv <= 0) - log_err(1, "asprintf"); - keys_add(response_keys, - "TargetPortalGroupTag", portal_group_tag); - free(portal_group_tag); } keys_save(response_keys, response); pdu_send(response); @@ -1088,13 +1075,8 @@ login(struct connection *conn) if (conn->conn_target->t_alias != NULL) keys_add(response_keys, "TargetAlias", conn->conn_target->t_alias); - rv = asprintf(&portal_group_tag, "%d", + keys_add_int(response_keys, "TargetPortalGroupTag", conn->conn_portal->p_portal_group->pg_tag); - if (rv <= 0) - log_err(1, "asprintf"); - keys_add(response_keys, - "TargetPortalGroupTag", portal_group_tag); - free(portal_group_tag); } keys_save(response_keys, response); From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 17:03:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09AE46CA; Tue, 9 Sep 2014 17:03:59 +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 E84B0925; Tue, 9 Sep 2014 17:03:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89H3wUL073567; Tue, 9 Sep 2014 17:03:58 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89H3wOv073566; Tue, 9 Sep 2014 17:03:58 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201409091703.s89H3wOv073566@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 9 Sep 2014 17:03:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271321 - head/etc/periodic/daily X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 17:03:59 -0000 Author: bdrewery Date: Tue Sep 9 17:03:58 2014 New Revision: 271321 URL: http://svnweb.freebsd.org/changeset/base/271321 Log: Don't cross mount boundaries when cleaning tmp files. Mounting something in /tmp such as a build jail with nullfs mounts for some directories can result in very surprising results the next day. MFC after: 2 weeks Relnotes: yes Modified: head/etc/periodic/daily/110.clean-tmps Modified: head/etc/periodic/daily/110.clean-tmps ============================================================================== --- head/etc/periodic/daily/110.clean-tmps Tue Sep 9 16:57:02 2014 (r271320) +++ head/etc/periodic/daily/110.clean-tmps Tue Sep 9 17:03:58 2014 (r271321) @@ -45,8 +45,8 @@ case "$daily_clean_tmps_enable" in rc=$(for dir in $daily_clean_tmps_dirs do [ ."${dir#/}" != ."$dir" -a -d $dir ] && cd $dir && { - find -d . -type f $args -delete $print - find -d . ! -name . -type d $dargs -delete $print + find -x -d . -type f $args -delete $print + find -x -d . ! -name . -type d $dargs -delete $print } | sed "s,^\\., $dir," done | tee /dev/stderr | wc -l) [ -z "$print" ] && rc=0 From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 17:38:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E941F9E9; Tue, 9 Sep 2014 17:38:55 +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 D3258CA8; Tue, 9 Sep 2014 17:38:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89Hctsq088831; Tue, 9 Sep 2014 17:38:55 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89HctlO088830; Tue, 9 Sep 2014 17:38:55 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409091738.s89HctlO088830@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 Sep 2014 17:38:55 +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: r271324 - in stable: 10/release/doc/en_US.ISO8859-1/errata 9/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 17:38:56 -0000 Author: gjb Date: Tue Sep 9 17:38:55 2014 New Revision: 271324 URL: http://svnweb.freebsd.org/changeset/base/271324 Log: Document SA-14:18. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Changes in other areas also in this revision: Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Tue Sep 9 17:22:39 2014 (r271323) +++ stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Tue Sep 9 17:38:55 2014 (r271324) @@ -221,6 +221,12 @@ Kernel memory disclosure in control messages and SCTP notifications + + + SA-14:18.openssl + 9 September 2014 + Multiple vulnerabilities + From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 17:38:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 463FC9EA; Tue, 9 Sep 2014 17:38:56 +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 3038ACA9; Tue, 9 Sep 2014 17:38:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89Hcu1c088837; Tue, 9 Sep 2014 17:38:56 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89HcuaU088836; Tue, 9 Sep 2014 17:38:56 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409091738.s89HcuaU088836@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 Sep 2014 17:38:56 +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: r271324 - in stable: 10/release/doc/en_US.ISO8859-1/errata 9/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 17:38:56 -0000 Author: gjb Date: Tue Sep 9 17:38:55 2014 New Revision: 271324 URL: http://svnweb.freebsd.org/changeset/base/271324 Log: Document SA-14:18. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Tue Sep 9 17:22:39 2014 (r271323) +++ stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Tue Sep 9 17:38:55 2014 (r271324) @@ -179,6 +179,12 @@ Kernel memory disclosure in control messages and SCTP notifications + + + SA-14:18.openssl + 9 September 2014 + Multiple vulnerabilities + From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 17:48:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36EDA183; Tue, 9 Sep 2014 17:48: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 205A4D81; Tue, 9 Sep 2014 17:48: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 s89Hm8p5093592; Tue, 9 Sep 2014 17:48:08 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89Hm81G093591; Tue, 9 Sep 2014 17:48:08 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409091748.s89Hm81G093591@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 Sep 2014 17:48:08 +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: r271325 - stable/9/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 17:48:09 -0000 Author: gjb Date: Tue Sep 9 17:48:08 2014 New Revision: 271325 URL: http://svnweb.freebsd.org/changeset/base/271325 Log: Trim advisories that do not affect stable/9 since the 9.3-RELEASE. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Tue Sep 9 17:38:55 2014 (r271324) +++ stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Tue Sep 9 17:48:08 2014 (r271325) @@ -49,7 +49,7 @@ &os;. This errata document for &os; &release.current; - will be maintained until the release of &os; &release.next;. + will be maintained until the EoL of &os; &release.branch;. @@ -101,86 +101,6 @@ - SA-14:01.bsnmpd - 1 January 2014 - Fix bsnmpd remote denial of service - vulnerability - - - - SA-14:02.ntpd - 1 January 2014 - Fix ntpd distributed reflection Denial of - Service vulnerability - - - - SA-14:03.ntpd - 1 January 2014 - Fix BIND remote denial of service - vulnerability - - - - SA-14:05.nfsserver - 8 April 2014 - Fix NFS deadlock vulnerability - - - - SA-14:06.openssl - 8 April 2014 - Fix ECDSA Cache Side-channel - Attack - - - - SA-14:08.tcp - 30 April 2014 - Fix TCP reassembly - vulnerability - - - - SA-14:11.sendmail - 3 June 2014 - Fix sendmail improper close-on-exec flag - handling - - - - SA-14:12.ktrace - 3 June 2014 - Fix ktrace memory disclosure - - - - SA-14:13.pam - 3 June 2014 - Fix incorrect error handling in PAM policy - parser - - - - SA-14:14.openssl - 5 June 2014 - Multiple vulnerabilities - - - - SA-14:16.file - 24 June 2014 - Multiple vulnerabilities - - - - SA-14:17.kmem - 8 July 2014 - Kernel memory disclosure in control messages - and SCTP notifications - - - SA-14:18.openssl 9 September 2014 Multiple vulnerabilities From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 17:52:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78E7A4F3; Tue, 9 Sep 2014 17:52:28 +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 634B8E42; Tue, 9 Sep 2014 17:52:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89HqSSl097685; Tue, 9 Sep 2014 17:52:28 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89HqSbk097684; Tue, 9 Sep 2014 17:52:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409091752.s89HqSbk097684@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 Sep 2014 17:52:28 +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: r271326 - stable/9/release/doc/en_US.ISO8859-1/share/xml X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 17:52:28 -0000 Author: gjb Date: Tue Sep 9 17:52:27 2014 New Revision: 271326 URL: http://svnweb.freebsd.org/changeset/base/271326 Log: Fix mailing list in footer. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/en_US.ISO8859-1/share/xml/release.xsl Modified: stable/9/release/doc/en_US.ISO8859-1/share/xml/release.xsl ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/share/xml/release.xsl Tue Sep 9 17:48:08 2014 (r271325) +++ stable/9/release/doc/en_US.ISO8859-1/share/xml/release.xsl Tue Sep 9 17:52:27 2014 (r271326) @@ -18,7 +18,7 @@ contacting <questions@FreeBSD.org>.

All users of FreeBSD should - subscribe to the <current@FreeBSD.org> + subscribe to the <stable@FreeBSD.org> mailing list.

For questions about this documentation, From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 18:17:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4C02DCD; Tue, 9 Sep 2014 18:17:44 +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 95867128; Tue, 9 Sep 2014 18:17:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89IHinC007878; Tue, 9 Sep 2014 18:17:44 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89IHiBd007876; Tue, 9 Sep 2014 18:17:44 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409091817.s89IHiBd007876@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 9 Sep 2014 18:17:44 +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: r271327 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 18:17:44 -0000 Author: ian Date: Tue Sep 9 18:17:43 2014 New Revision: 271327 URL: http://svnweb.freebsd.org/changeset/base/271327 Log: MFC r270862, r270878: MMU fixes for kernel startup. Fix the handling of MMU type in the AP entry code. The ARM_MMU_V6/V7 symbols are always #defined to 0 or 1, so use #if SYM not #if defined(SYM). Also, it helps if you include the header file that defines the symbols. The Marvell PJ4B cpu family is armv7, not armv6. Approved by: re(gjb) Modified: stable/10/sys/arm/arm/locore.S stable/10/sys/arm/include/cpuconf.h Modified: stable/10/sys/arm/arm/locore.S ============================================================================== --- stable/10/sys/arm/arm/locore.S Tue Sep 9 17:52:27 2014 (r271326) +++ stable/10/sys/arm/arm/locore.S Tue Sep 9 18:17:43 2014 (r271327) @@ -37,6 +37,7 @@ #include #include #include +#include #include __FBSDID("$FreeBSD$"); @@ -365,9 +366,9 @@ ASENTRY_NP(mpentry) nop CPWAIT(r0) -#if defined(ARM_MMU_V6) +#if ARM_MMU_V6 bl armv6_idcache_inv_all /* Modifies r0 only */ -#elif defined(ARM_MMU_V7) +#elif ARM_MMU_V7 bl armv7_idcache_inv_all /* Modifies r0-r3, ip */ #endif Modified: stable/10/sys/arm/include/cpuconf.h ============================================================================== --- stable/10/sys/arm/include/cpuconf.h Tue Sep 9 17:52:27 2014 (r271326) +++ stable/10/sys/arm/include/cpuconf.h Tue Sep 9 18:17:43 2014 (r271327) @@ -135,13 +135,13 @@ #define ARM_MMU_GENERIC 0 #endif -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_MV_PJ4B) +#if defined(CPU_ARM1136) || defined(CPU_ARM1176) #define ARM_MMU_V6 1 #else #define ARM_MMU_V6 0 #endif -#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) +#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) || defined(CPU_MV_PJ4B) #define ARM_MMU_V7 1 #else #define ARM_MMU_V7 0 From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 18:36:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FA3C269; Tue, 9 Sep 2014 18:36:01 +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 EF4A532B; Tue, 9 Sep 2014 18:36:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89Ia00W017021; Tue, 9 Sep 2014 18:36:00 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89Ia0qC017018; Tue, 9 Sep 2014 18:36:00 GMT (envelope-from np@FreeBSD.org) Message-Id: <201409091836.s89Ia0qC017018@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 9 Sep 2014 18:36:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271328 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 18:36:01 -0000 Author: np Date: Tue Sep 9 18:36:00 2014 New Revision: 271328 URL: http://svnweb.freebsd.org/changeset/base/271328 Log: Whitespace nit. MFC after: 1 week Modified: head/sys/dev/cxgbe/t4_netmap.c Modified: head/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- head/sys/dev/cxgbe/t4_netmap.c Tue Sep 9 18:17:43 2014 (r271327) +++ head/sys/dev/cxgbe/t4_netmap.c Tue Sep 9 18:36:00 2014 (r271328) @@ -377,7 +377,7 @@ alloc_nm_txq_hwq(struct port_info *pi, s nm_txq->pidx = nm_txq->cidx = 0; MPASS(nm_txq->sidx == na->num_tx_desc); - nm_txq->equiqidx = nm_txq-> equeqidx = nm_txq->dbidx = 0; + nm_txq->equiqidx = nm_txq->equeqidx = nm_txq->dbidx = 0; nm_txq->doorbells = sc->doorbells; if (isset(&nm_txq->doorbells, DOORBELL_UDB) || From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 19:26:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DB08B0A; Tue, 9 Sep 2014 19:26:56 +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 ED239B0C; Tue, 9 Sep 2014 19:26:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89JQtls041937; Tue, 9 Sep 2014 19:26:55 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89JQt0n041930; Tue, 9 Sep 2014 19:26:55 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409091926.s89JQt0n041930@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 9 Sep 2014 19:26:55 +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: r271329 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 19:26:56 -0000 Author: ian Date: Tue Sep 9 19:26:55 2014 New Revision: 271329 URL: http://svnweb.freebsd.org/changeset/base/271329 Log: MFC r270858, 270879: Remove duplicated option FDT from individual Wandboard configs, leave the one in the common IMX6 file that they all include. Approved by: re(gjb) Modified: stable/10/sys/arm/conf/WANDBOARD-DUAL stable/10/sys/arm/conf/WANDBOARD-QUAD stable/10/sys/arm/conf/WANDBOARD-SOLO Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/WANDBOARD-DUAL ============================================================================== --- stable/10/sys/arm/conf/WANDBOARD-DUAL Tue Sep 9 18:36:00 2014 (r271328) +++ stable/10/sys/arm/conf/WANDBOARD-DUAL Tue Sep 9 19:26:55 2014 (r271329) @@ -23,7 +23,6 @@ include "IMX6" ident WANDBOARD-DUAL # Flattened Device Tree -options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=wandboard-dual.dts Modified: stable/10/sys/arm/conf/WANDBOARD-QUAD ============================================================================== --- stable/10/sys/arm/conf/WANDBOARD-QUAD Tue Sep 9 18:36:00 2014 (r271328) +++ stable/10/sys/arm/conf/WANDBOARD-QUAD Tue Sep 9 19:26:55 2014 (r271329) @@ -23,7 +23,6 @@ include "IMX6" ident WANDBOARD-QUAD # Flattened Device Tree -options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=wandboard-quad.dts Modified: stable/10/sys/arm/conf/WANDBOARD-SOLO ============================================================================== --- stable/10/sys/arm/conf/WANDBOARD-SOLO Tue Sep 9 18:36:00 2014 (r271328) +++ stable/10/sys/arm/conf/WANDBOARD-SOLO Tue Sep 9 19:26:55 2014 (r271329) @@ -23,7 +23,6 @@ include "IMX6" ident WANDBOARD-SOLO # Flattened Device Tree -options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=wandboard-solo.dts From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 19:47:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 025C034E; Tue, 9 Sep 2014 19:47:36 +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 E1B42D50; Tue, 9 Sep 2014 19:47:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89JlZ5o051668; Tue, 9 Sep 2014 19:47:35 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89JlZ6o051667; Tue, 9 Sep 2014 19:47:35 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409091947.s89JlZ6o051667@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 9 Sep 2014 19:47: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: r271330 - stable/10/sys/arm/freescale/imx X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 19:47:36 -0000 Author: ian Date: Tue Sep 9 19:47:35 2014 New Revision: 271330 URL: http://svnweb.freebsd.org/changeset/base/271330 Log: MFC r270065: Move the imx6 sysctl temperature info to hw.imx6 where all the other soc-wide info lives. It was under dev.imx6_anatop.0. Approved by: re(gjb) Modified: stable/10/sys/arm/freescale/imx/imx6_anatop.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/freescale/imx/imx6_anatop.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_anatop.c Tue Sep 9 19:26:55 2014 (r271329) +++ stable/10/sys/arm/freescale/imx/imx6_anatop.c Tue Sep 9 19:47:35 2014 (r271330) @@ -561,7 +561,6 @@ static void initialize_tempmon(struct imx6_anatop_softc *sc) { uint32_t cal; - struct sysctl_ctx_list *ctx; /* * Fetch calibration data: a sensor count at room temperature (25C), @@ -605,11 +604,10 @@ initialize_tempmon(struct imx6_anatop_so callout_reset_sbt(&sc->temp_throttle_callout, sc->temp_throttle_delay, 0, tempmon_throttle_check, sc, 0); - ctx = device_get_sysctl_ctx(sc->dev); - SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)), + SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx6), OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, sc, 0, temp_sysctl_handler, "IK", "Current die temperature"); - SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)), + SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx6), OID_AUTO, "throttle_temperature", CTLTYPE_INT | CTLFLAG_RW, sc, 0, temp_throttle_sysctl_handler, "IK", "Throttle CPU when exceeding this temperature"); From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 19:51:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 485655F1; Tue, 9 Sep 2014 19:51:58 +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 33157E25; Tue, 9 Sep 2014 19:51:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89JpwgW055565; Tue, 9 Sep 2014 19:51:58 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89JpvF7055561; Tue, 9 Sep 2014 19:51:57 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409091951.s89JpvF7055561@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 Sep 2014 19:51:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271331 - in head/release/doc: en_US.ISO8859-1/share/xml share/mk share/xml X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 19:51:58 -0000 Author: gjb Date: Tue Sep 9 19:51:57 2014 New Revision: 271331 URL: http://svnweb.freebsd.org/changeset/base/271331 Log: Change how the recommended mailing list to track is added to the footer of the release/doc/ pages by moving a hard-coded value (that is subject to human error to change) to release.ent where other values are regularly changed, and adding parsing logic to release.xsl. Approved by: re (implicit) MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/share/xml/release.xsl head/release/doc/share/mk/doc.relnotes.mk head/release/doc/share/xml/release.ent head/release/doc/share/xml/release.xsl Modified: head/release/doc/en_US.ISO8859-1/share/xml/release.xsl ============================================================================== --- head/release/doc/en_US.ISO8859-1/share/xml/release.xsl Tue Sep 9 19:47:35 2014 (r271330) +++ head/release/doc/en_US.ISO8859-1/share/xml/release.xsl Tue Sep 9 19:51:57 2014 (r271331) @@ -8,6 +8,7 @@ +

This file, and other release-related documents, @@ -18,7 +19,7 @@ contacting <questions@FreeBSD.org>.

All users of FreeBSD should - subscribe to the <current@FreeBSD.org> + subscribe to the <@FreeBSD.org> mailing list.

For questions about this documentation, Modified: head/release/doc/share/mk/doc.relnotes.mk ============================================================================== --- head/release/doc/share/mk/doc.relnotes.mk Tue Sep 9 19:47:35 2014 (r271330) +++ head/release/doc/share/mk/doc.relnotes.mk Tue Sep 9 19:51:57 2014 (r271331) @@ -6,6 +6,7 @@ DOC_PREFIX?= ${RELN_ROOT}/../../../doc RELEASETYPE!= grep -o 'release.type "[a-z]*"' ${RELN_ROOT}/share/xml/release.ent | sed 's|[a-z.]* "\([a-z]*\)"|\1|' RELEASEURL!= grep -o 'release.url \"[^\"]*\"' ${RELN_ROOT}/share/xml/release.ent | sed 's|[^ ]* "\([^"]*\)"|\1|' RELEASEBRANCH!= grep -o 'release.branch "\([^"]*\)"' ${RELN_ROOT}/share/xml/release.ent | sed 's|[^ ]* "\([^"]*\)"|\1|' +RELEASEMAILLIST!= grep -o 'release.maillist "\([^"]*\)"' ${RELN_ROOT}/share/xml/release.ent | sed 's|[^ ]* "\([^"]*\)"|\1|' .if ${RELEASETYPE} == "current" PROFILING+= --param profile.attribute "'releasetype'" --param profile.value "'current'" .elif ${RELEASETYPE} == "snapshot" @@ -15,6 +16,7 @@ PROFILING+= --param profile.attribute "' .endif XSLTPROCFLAGS+= --param release.url "'${RELEASEURL}'" XSLTPROCFLAGS+= --param release.branch "'${RELEASEBRANCH}'" +XSLTPROCFLAGS+= --param release.maillist "'${RELEASEMAILLIST}'" # Find the RELNOTESng document catalogs EXTRA_CATALOGS+= file://${RELN_ROOT}/${LANGCODE}/share/xml/catalog.xml \ Modified: head/release/doc/share/xml/release.ent ============================================================================== --- head/release/doc/share/xml/release.ent Tue Sep 9 19:47:35 2014 (r271330) +++ head/release/doc/share/xml/release.ent Tue Sep 9 19:51:57 2014 (r271331) @@ -27,6 +27,9 @@ + + + From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 20:36:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 560CD798; Tue, 9 Sep 2014 20:36:57 +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 402AD332; Tue, 9 Sep 2014 20:36:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89Kavll076235; Tue, 9 Sep 2014 20:36:57 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89KauJ7076229; Tue, 9 Sep 2014 20:36:56 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409092036.s89KauJ7076229@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 9 Sep 2014 20:36: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: r271333 - in stable/10: . share/vt/fonts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 20:36:57 -0000 Author: emaste Date: Tue Sep 9 20:36:56 2014 New Revision: 271333 URL: http://svnweb.freebsd.org/changeset/base/271333 Log: MFC improved vt(4) font generation r266851: Add VGAROM 8x8, 8x14 and 8x16 fonts for vt(4) These are converted from syscons(4) cp437 fonts. r267306: Add vgarom font source These are in 'GNU Unifont' format, and are converted from syscons(4) cp437 fonts. r267400: Add thin versions of VGAROM 8x8 and 8x16 fonts for vt(4) These are converted from syscons(4) cp437-thin-8x* fonts. r267423: Build vt(4) fonts during buildworld vtfontcvt(8) is now built during buildworld, so can be used as a bootstrap tool to create vt(4) fonts from source .hex or .bdf font files, rather than having uuencoded binary fonts in the tree. r267578: Add glyphs from converted syscons iso* fonts This consists of the unique glyphs from the following font files in /usr/share/syscons/fonts: iso*.fnt ISO-8859-1 West European iso02*.fnt ISO-8859-2 Central European iso04*.fnt ISO-8859-4 Baltic iso05*.fnt ISO-8859-5 Cyrillic iso07*.fnt ISO-8859-7 Greek iso08*.fnt ISO-8859-8 Hebrew iso09*.fnt ISO-8859-9 Turkish iso15*.fnt ISO-8859-15 West European r268022: Rename the WITHOUT_VT_SUPPORT knob to WITHOUT_VT The _SUPPORT knobs have a consistent meaning which differs from the behaviour controlled by this knob. As the knob is opt-out and has not appeared in a release the impact should be low. Approved by: re Sponsored by: The FreeBSD Foundation Added: stable/10/share/vt/fonts/vgarom-8x14.hex - copied, changed from r267306, head/share/vt/fonts/vgarom-8x14.hex stable/10/share/vt/fonts/vgarom-8x16.hex - copied, changed from r267306, head/share/vt/fonts/vgarom-8x16.hex stable/10/share/vt/fonts/vgarom-8x8.hex - copied, changed from r267306, head/share/vt/fonts/vgarom-8x8.hex stable/10/share/vt/fonts/vgarom-thin-8x16.hex - copied, changed from r267400, head/share/vt/fonts/vgarom-thin-8x16.hex stable/10/share/vt/fonts/vgarom-thin-8x8.hex - copied unchanged from r267400, head/share/vt/fonts/vgarom-thin-8x8.hex Modified: stable/10/Makefile.inc1 stable/10/share/vt/fonts/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Tue Sep 9 19:58:55 2014 (r271332) +++ stable/10/Makefile.inc1 Tue Sep 9 20:36:56 2014 (r271333) @@ -1215,6 +1215,10 @@ _gperf= gnu/usr.bin/gperf _groff= gnu/usr.bin/groff .endif +.if ${MK_VT} != "no" +_vtfontcvt= usr.bin/vtfontcvt +.endif + .if ${BOOTSTRAPPING} < 800022 _ar= usr.bin/ar .endif @@ -1323,7 +1327,8 @@ bootstrap-tools: .MAKE ${_gensnmptree} \ usr.sbin/config \ ${_crunch} \ - ${_nmtree} + ${_nmtree} \ + ${_vtfontcvt} ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool} && \ ${MAKE} DIRPRFX=${_tool}/ obj && \ Modified: stable/10/share/vt/fonts/Makefile ============================================================================== --- stable/10/share/vt/fonts/Makefile Tue Sep 9 19:58:55 2014 (r271332) +++ stable/10/share/vt/fonts/Makefile Tue Sep 9 20:36:56 2014 (r271333) @@ -1,12 +1,20 @@ # $FreeBSD$ -FILES= gallant.fnt +FILES= gallant.fnt \ + vgarom-8x8.fnt \ + vgarom-8x14.fnt \ + vgarom-8x16.fnt \ + vgarom-thin-8x8.fnt \ + vgarom-thin-8x16.fnt CLEANFILES+= ${FILES} -.SUFFIXES: .uu -.uu: - uudecode < ${.IMPSRC} +.SUFFIXES: .fnt .fnt.uu .hex +.hex.fnt: + vtfontcvt ${.IMPSRC} ${.TARGET} + +.fnt.uu.fnt: + uudecode -p < ${.IMPSRC} > ${.TARGET} FILESDIR= ${SHAREDIR}/vt/fonts Copied and modified: stable/10/share/vt/fonts/vgarom-8x14.hex (from r267306, head/share/vt/fonts/vgarom-8x14.hex) ============================================================================== --- head/share/vt/fonts/vgarom-8x14.hex Mon Jun 9 21:06:46 2014 (r267306, copy source) +++ stable/10/share/vt/fonts/vgarom-8x14.hex Tue Sep 9 20:36:56 2014 (r271333) @@ -101,34 +101,70 @@ 00A1:000018180018183C3C3C18000000 00A2:0018183C666060663C1818000000 00A3:00386C6460F0606060E6FC000000 +00A4:000000423C6666663C4200000000 00A5:000066663C187E187E1818000000 +00A6:0000181818180018181818000000 00A7:007CC660386CC6C66C380CC67C00 +00A8:0063630000000000000000000000 +00A9:0000003E415D51515D413E000000 00AA:003C6C6C3E007E00000000000000 00AB:00000000366CD86C360000000000 00AC:000000000000FE06060600000000 +00AD:0000000000007F00000000000000 +00AE:0000003E415D555955413E000000 +00AF:007E000000000000000000000000 00B0:00386C6C38000000000000000000 00B1:00000018187E18180000FF000000 00B2:0070D83060C8F800000000000000 +00B3:007C0C380C6C3800000000000000 +00B4:00060C1800000000000000000000 00B5:00000000666666667C6060C00000 00B6:00007FDBDBDB7B1B1B1B1B000000 00B7:0000000000000018000000000000 +00B8:000000000000000000000C0C061C +00B9:0030703030307800000000000000 00BA:00386C6C38007C00000000000000 00BB:00000000D86C366CD80000000000 00BC:00C0C0C6CCD83066CE9E3E060600 00BD:00C0C0C6CCD83060DC860C183E00 +00BE:00F03063F66C183367CF1F030300 00BF:0000303000303060C6C67C000000 +00C0:603018001C3663637F6363000000 +00C1:03060C001C3663637F6363000000 +00C2:081C36001C3663637F6363000000 +00C3:3B6E00081C3663637F6363000000 00C4:00C6C610386CC6C6FEC6C6000000 00C5:386C3800386CC6C6FEC6C6000000 00C6:00003E6CCCCCFECCCCCCCE000000 00C7:00003C66C2C0C0C2663C0C067C00 +00C8:603018007F33303E30337F000000 00C9:18306000FE66607C6066FE000000 +00CA:081C36007F33303E30337F000000 +00CB:006363007F33303E30337F000000 +00CC:603018003C18181818183C000000 +00CD:060C18003C18181818183C000000 +00CE:183C66003C18181818183C000000 +00CF:006666003C18181818183C000000 +00D0:00003C3633337B3333363C000000 00D1:76DC00C6E6F6FEDECEC6C6000000 +00D2:603018001C36636363361C000000 +00D3:03060C001C36636363361C000000 +00D4:081C36001C36636363361C000000 +00D5:003B6E001C36636363361C000000 00D6:00C6C6386CC6C6C6C66C38000000 +00D7:00000063361C081C366300000000 +00D8:00031E36676F6B7B73363C600000 +00D9:603018006363636363633E000000 +00DA:03060C006363636363633E000000 +00DB:081C36006363636363633E000000 00DC:00C6C600C6C6C6C6C6C67C000000 +00DD:060C18006666663C18183C000000 +00DE:0078303E33333E30303078000000 00DF:000000007CC6FCC6C6FCC0C04000 00E0:0060301800780C7CCCCC76000000 00E1:0018306000780C7CCCCC76000000 00E2:0010386C00780C7CCCCC76000000 +00E3:00003B6E003C063E66663B000000 00E4:0000CCCC00780C7CCCCC76000000 00E5:00386C3800780C7CCCCC76000000 00E6:00000000CC76367ED8D86E000000 @@ -141,34 +177,322 @@ 00ED:000C18300038181818183C000000 00EE:00183C660038181818183C000000 00EF:000066660038181818183C000000 +00F0:0000361C36063E6666663C000000 00F1:000076DC00DC6666666666000000 00F2:00603018007CC6C6C6C67C000000 00F3:00183060007CC6C6C6C67C000000 00F4:0010386C007CC6C6C6C67C000000 +00F5:00003B6E003E636363633E000000 00F6:0000C6C6007CC6C6C6C67C000000 00F7:0000001818007E00181800000000 +00F8:00000000033E676F7B733E600000 00F9:0060301800CCCCCCCCCC76000000 00FA:0018306000CCCCCCCCCC76000000 00FB:003078CC00CCCCCCCCCC76000000 00FC:0000CCCC00CCCCCCCCCC76000000 +00FD:00060C1800636666663E06663C00 +00FE:00000078303E333333333E307800 00FF:0000C6C600C6C6C6C67E060C7800 +0100:7C00387CC6C6C6FEC6C6C6C60000 +0101:0000007C00780C7CCCCCCC760000 +0102:C67C0010386CC6FEC6C6C6000000 +0103:0000C67C00780C7CCCCC76000000 +0104:000010386CC6C6FEC6C6CE180E00 +0105:0000000000780C7CCCCC76301C00 +0106:0C18003C66C2C0C0C2663C000000 +0107:000C1830007CC6C0C0C67C000000 +010C:6C38003C66C2C0C0C2663C000000 +010D:00006C38007CC6C0C0C67C000000 +010E:6C3800F86C666666666CF8000000 +010F:6C38001C0C0C3C6CCCCC76000000 +0110:0000F86C6666F666666CF8000000 +0111:00000C0C7E0C3C6CCCCC76000000 +0112:7C00FE6660607C60606066FE0000 +0113:0000007C007CC6C6FEC0C67C0000 +0116:1818FE6660607C60606066FE0000 +0117:00001818007CC6C6FEC0C67C0000 +0118:0000FE66626878686266FE301C00 +0119:00000000007CC6FEC0C67C301C00 +011A:6C3800FE666278686266FE000000 +011B:00006C38007CC6FEC0C67C000000 +0122:00007CC6C6C0C0CEC6C6C67C0C78 +0123:3C60380076CEC6C6C6CE7606FC00 +0128:76DC003C181818181818183C0000 +0129:000076DC003818181818183C0000 +012A:7E003C18181818181818183C0000 +012B:0000007C003818181818183C0000 +012E:00003C18181818181818183C301E +012F:00001818003818181818183C301E +0136:0000C6C6CCD8F0F0D8CCC6C60C78 +0137:0000E0606066666C786C66E60C78 +0138:0000000000E66C78786C66E60000 +0139:0000F66C606060606266FE000000 +013A:0000E66C606060606060F0000000 +013B:0000F06060606060606266FE0C78 +013C:00003818181818181818183C18F0 +013D:001BEE60606060606266FE000000 +013E:001BEE60606060606060F0000000 +0141:0000F0646C7870E0E266FE000000 +0142:0000381A1E1C183878583C000000 +0143:0C1800C6E6F6FEDECEC6C6000000 +0144:000C183000DC6666666666000000 +0145:0000C6C6E6E6F6DECECEC6C60C78 +0146:0000000000DC6666666666660C78 +0147:6C3800C6E6F6FEDECEC6C6000000 +0148:00006C3800DC6666666666000000 +014A:0000DCFEF6E6C6C6C6C6C6DC0000 +014B:00000000DCFEF6E6C6C6061C0000 +014C:7C007CC6C6C6C6C6C6C6C67C0000 +014D:0000007C007CC6C6C6C6C67C0000 +0150:366C007CC6C6C6C6C6C67C000000 +0151:0000366C007CC6C6C6C67C000000 +0152:001F366666676666361F00000000 +0153:00000000366B6B6E683700000000 +0154:0C1800FC66667C6C6666E6000000 +0155:000C183000DC76666060F0000000 +0156:0000FC6666667C786C6666E60C78 +0157:0000000000DC7666606060F030E0 +0158:6C3800FC66667C6C6666E6000000 +0159:00006C3800DC76666060F0000000 +015A:0C18007CC6C6701CC6C67C000000 +015B:000C1830007CC6701CC67C000000 +015E:00007CC6C660380CC6C67C187000 +015F:00000000007CC6701CC67C187000 +0160:6C38007CC6C6701CC6C67C000000 +0161:00006C38007CC6701CC67C000000 +0162:00007E7E5A18181818183C0C3800 +0163:0000103030FC303030361C0C3800 +0164:361C007E7E5A181818183C000000 +0165:6C3800103030FC3030361C000000 +0166:0000FFDB99181E3C7818183C0000 +0167:0000303030FC303C78F0361C0000 +0168:76DC00C6C6C6C6C6C6C6C67C0000 +0169:000076DC00CCCCCCCCCCCC760000 +016A:7C00C6C6C6C6C6C6C6C6C67C0000 +016B:000000FC00CCCCCCCCCCCC760000 +016E:386C38C6C6C6C6C6C6C67C000000 +016F:00386C3800CCCCCCCCCC76000000 +0170:366C00C6C6C6C6C6C6C67C000000 +0171:00006CD800CCCCCCCCCC76000000 +0172:0000C6C6C6C6C6C6C6C6C67C301C +0173:0000000000CCCCCCCCCCCC76301E +0178:6600666666663C18183C00000000 +0179:0C1800FEC68C183062C6FE000000 +017A:000C183000FECC183066FE000000 +017B:181800FEC68C183062C6FE000000 +017C:0000181800FECC183066FE000000 +017D:6C3800FEC68C183062C6FE000000 +017E:00006C3800FECC183066FE000000 0192:000E1B1818187E18181818D87000 +02C7:006C380000000000000000000000 +02D8:00C67C0000000000000000000000 +02D9:0018180000000000000000000000 +02DB:0000000000000000000030301C00 +02DD:00366CD800000000000000000000 +037A:0000000000000000000000000000 +0384:060C180000000000000000000000 +0385:060C18C300000000000000000000 +0386:0000C090B86CC6C6FEC6C6C60000 +0388:000000BFB130303E3031313F0000 +0389:000000B3B333333F333333330000 +038A:000000BC981818181818183C0000 +038C:0000009EB33333333333331E0000 +038E:000000B3B333331E0C0C0C1E0000 +038F:0000009EB3212121213312330000 +0390:000C0800660018181818180E0000 +0391:00000010386CC6C6FEC6C6C60000 +0392:000000FC6666667C666666FC0000 0393:0000FEC6C6C0C0C0C0C0C0000000 +0394:00000010386CC6C6C6C6C6FE0000 +0395:000000FE66626878686266FE0000 +0396:000000FEC6860C183062C6FE0000 +0397:000000C6C6C6C6FEC6C6C6C60000 0398:0000386CC6C6FEC6C66C38000000 +0399:0000003C181818181818183C0000 +039A:000000E666666C786C6666E60000 +039B:00000010386CC6C6C6C6C6C60000 +039C:000000C6EEFEFED6C6C6C6C60000 +039D:000000C6E6F6FEDECEC6C6C60000 +039E:000000FE8200007C000082FE0000 +039F:0000007CC6C6C6C6C6C6C67C0000 +03A0:000000FEC6C6C6C6C6C6C6C60000 +03A1:000000FC6666667C606060F00000 03A3:0000FEC66030183060C6FE000000 +03A4:0000007E7E5A18181818183C0000 +03A5:000000666666663C1818183C0000 03A6:00007E183C6666663C187E000000 +03A7:000000C6C66C7C387C6CC6C60000 +03A8:00000018DBDBDBDB7E18183C0000 03A9:0000386CC6C6C66C6C6CEE000000 +03AA:0000C31818181818181818180000 +03AB:00C300666666663C1818183C0000 +03AC:0000003810007BCECCCCCC7B0000 +03AD:00003810007CC6C078C0C67C0000 +03AE:000000381000DC66666666660606 +03AF:00000038100018181818180E0000 +03B0:000018C30000E7666666663C0000 03B1:000000000076DCD8D8DC76000000 +03B2:0000007CC6C6C6FCC6C6C6FCC0C0 +03B3:0000000000C3663C183C6642663C 03B4:00001E30180C3E6666663C000000 03B5:00001C3060607C6060301C000000 +03B6:00FC0C183060C0C0C0C0780C0C78 +03B7:000000000000DC66666666660606 +03B8:0000003E6363637F6363633E0000 +03B9:00000000000018181818180E0000 +03BA:000000000000E66C786C66E60000 +03BB:000000386C0C0C0C366666660000 +03BC:00000000000066666666667F6060 +03BD:00000000000082C6C66C6C380000 +03BE:00FC60C0783060C0C0C07C06067C +03BF:0000000000007CC6C6C6C67C0000 03C0:00000000FE6C6C6C6C6C6C000000 +03C1:0000000000003C666666667C6060 +03C2:0000000000003E63C060380CC67C 03C3:00000000007ED8D8D8D870000000 03C4:0000000076DC1818181818000000 +03C5:000000000000E7666666663C0000 03C6:000003067EDBDBF37E60C0000000 +03C7:000000000000C66C38386CC60000 +03C8:000000000000D6D6D6D6D67C1010 +03C9:00000000000066C3C3DBFF660000 +03CA:000000C3000018181818180E0000 +03CB:000000C30000E7666666663C0000 +03CC:0000003810007CC6C6C6C67C0000 +03CD:000000381000E7666666663C0000 +03CE:00000038100066C3C3DBFF660000 +0401:6C6C00FEC6C0F0C0C0C6FE000000 +0402:0000F86060607C6666666C000000 +0403:1830007E60606060606060000000 +0404:00007CC6C0C0F8C0C0C67C000000 +0405:00007CC6C660380CC6C67C000000 +0406:0018003C1818181818183C000000 +0407:0066003C1818181818183C000000 +0408:00001E0C0C0C0C0CCCCC78000000 +0409:0000183878D8DEDBDBDBDE000000 +040A:0000D8D8D8D8FEDBDBDBDE000000 +040B:0000FC3030303C36363636000000 +040C:183000CCD8F0F0D8CCCCCC000000 +040E:281000C6C6C6C67E06C67C000000 +040F:0000C6C6C6C6C6C6FE3838000000 +0410:00003E66C6C6C6FEC6C6C6000000 +0411:0000FEC0C0FCC6C6C6C6FC000000 +0412:0000FCC6C6C6FCC6C6C6FC000000 +0413:0000FEC6C0C0C0C0C0C0C0000000 +0414:00003C6C6C6C6C6C6C6CFEC68200 +0415:0000FEC6C0C0F0C0C0C6FE000000 +0416:0000D6D6D6547CD6D6D6D6000000 +0417:00007CC6061C0606C6C67C000000 +0418:0000C6C6C6CEDEF6E6C6C6000000 +0419:000CDAC6C6CEDEF6E6C6C6000000 +041A:0000C6CCD8F0F0D8CCC6C6000000 +041B:00001E3666C6C6C6C6C6C6000000 +041C:000082C6C6EEEEFED6C6C6000000 +041D:0000C6C6C6C6FEC6C6C6C6000000 +041E:00007EC6C6C6C6C6C6C6FC000000 +041F:0000FEC6C6C6C6C6C6C6C6000000 +0420:0000FCC6C6C6C6FCC0C0C0000000 +0421:00007CC6C6C0C0C0C6C67C000000 +0422:00007E7E5A181818181818000000 +0423:0000C6C6C6C6C67E06C67C000000 +0424:00007CD6D6D6D6D67C1038000000 +0425:0000C6C66C38386CC6C6C6000000 +0426:0000CCCCCCCCCCCCCCCCFE020600 +0427:0000C6C6C6C6C67E060606000000 +0428:00D6D6D6D6D6D6D6D6D6FE000000 +0429:00D6D6D6D6D6D6D6D6D6FE020600 +042A:0000E0E0607C666666667C000000 +042B:0000C6C6C6E6B6B6B6B6E6000000 +042C:0000C0C0C0FCC6C6C6C6FC000000 +042D:00007CC6061E0606C6C67C000000 +042E:00009CB6B6B6F6B6B6B69C000000 +042F:00007EC6C6C6C67E3666C6000000 +0430:00000000007CC6C6FEC6C6000000 +0431:0000000000FEC0FCC6C6FC000000 +0432:0000000000FCC6FCC6C6FC000000 +0433:0000000000FEC2C0C0C0C0000000 +0434:00000000003C6C6C6C6CFEC68200 +0435:00000000007CC6FCC0C67C000000 +0436:0000000000D6D67CD6D6D6000000 +0437:00000000007CC61C06C67C000000 +0438:0000000000C6CEDEF6E6C6000000 +0439:0000000C18C6CEDEF6E6C6000000 +043A:0000000000C6CCF8D8CCC6000000 +043B:00000000003E66666666C6000000 +043C:0000000000C6EEFED6C6C6000000 +043D:0000000000C6C6C6FEC6C6000000 +043E:00000000007EC6C6C6C6FC000000 +043F:0000000000FEC6C6C6C6C6000000 +0440:0000000000FCC6C6C6C6FCC0C000 +0441:00000000007CC6C0C0C67C000000 +0442:00000000007E5A18181818000000 +0443:0000000000C6C6C6C6C67E067C00 +0444:00000000107CD6D6D6D67C103800 +0445:0000000000C66C38386CC6000000 +0446:0000000000CCCCCCCCCCFE060C00 +0447:0000000000C6C6C67E0606000000 +0448:0000000000D6D6D6D6D6FE000000 +0449:0000000000D6D6D6D6D6FE020600 +044A:0000000000E0607C66667C000000 +044B:0000000000C6C6E6B6B6E6000000 +044C:0000000000C0C0FCC6C6FC000000 +044D:00000000007CC61E06C67C000000 +044E:00000000009CB6B6F6B69C000000 +044F:00000000007EC67E3666C6000000 +0451:00006C6C007CC6FCC0C67C000000 +0452:00006060F8607C666666660C0000 +0453:00001830007C6060606060000000 +0454:00000000007CC6F0C0C67C000000 +0455:00000000007CC6701CC67C000000 +0456:000010100038181818183C000000 +0457:000028280038181818183C000000 +0458:00000404000E0606060666663C00 +0459:00000000003878DEDBDBDE000000 +045A:0000000000D8D8FEDBDBDE000000 +045B:00003030FC303C36363636000000 +045C:0000183000CCD8F0D8CCCC000000 +045E:0000281000C6C6C6C6C67E067C00 +045F:0000000000C6C6C6FE3838000000 +05D0:0000006363333B6E666363000000 +05D1:0000007C0606060606067F000000 +05D2:0000001C060606061E3663000000 +05D3:0000007F06060606060606000000 +05D4:0000007E03030363636363000000 +05D5:000000380C0C0C0C0C0C0C000000 +05D6:0000007E1818180C0C1830000000 +05D7:0000007E33636363636363000000 +05D8:000000666B6B636363663C000000 +05D9:0000003C0606060C000000000000 +05DA:0000007E03030606060606060700 +05DB:0000007E0303030303067C000000 +05DC:0060607E030303060C1818000000 +05DD:0000007E6363636363637F000000 +05DE:0000006E7B33636363636F000000 +05DF:0000001C06060C0C0C0C0C0C0E00 +05E0:0000001C0606060606063E000000 +05E1:0000007E3363636363663C000000 +05E2:00000033333333331B0E7C000000 +05E3:0000007C26667606060606060700 +05E4:0000007E2363730303037F000000 +05E5:000000666666666C786060607000 +05E6:0000006363331E0C06037F000000 +05E7:0000007E03033336363730303000 +05E8:0000007E03030303030303000000 +05E9:0000006B6B6B6B6B7B633E000000 +05EA:0000007E33333333333373000000 +200E:0000000000000000000000000000 +200F:0000000000000000000000000000 +2015:00000000000000FF000000000000 +2017:00000000000000000000FF00FF00 +2018:0030606030000000000000000000 +2019:000C06060C000000000000000000 2022:0000000000183C3C180000000000 203C:0000666666666666006666000000 207F:00D86C6C6C6C6C00000000000000 20A7:00F8CCCCF8C4CCDECCCCC6000000 +20AC:0000000000000000000000000000 +20AF:0000000000000000000000000000 +2116:0000888ACDEAB8988B888B000000 2190:000000003060FE60300000000000 2191:0000183C7E181818181818000000 2192:00000000180CFE0C180000000000 Copied and modified: stable/10/share/vt/fonts/vgarom-8x16.hex (from r267306, head/share/vt/fonts/vgarom-8x16.hex) ============================================================================== --- head/share/vt/fonts/vgarom-8x16.hex Mon Jun 9 21:06:46 2014 (r267306, copy source) +++ stable/10/share/vt/fonts/vgarom-8x16.hex Tue Sep 9 20:36:56 2014 (r271333) @@ -101,34 +101,70 @@ 00A1:00001818001818183C3C3C1800000000 00A2:0018183C66606060663C181800000000 00A3:00386C6460F060606060E6FC00000000 +00A4:00000082C67CC6C6C6C67CC682000000 00A5:000066663C187E187E18181800000000 +00A6:00001818181800181818181800000000 00A7:007CC660386CC6C66C380CC67C000000 +00A8:00C60000000000000000000000000000 +00A9:00007CC682BAA2A2BA82C67C00000000 00AA:003C6C6C3E007E000000000000000000 00AB:0000000000366CD86C36000000000000 00AC:000000000000FE060606060000000000 +00AD:000000000000007C0000000000000000 +00AE:00007CC682BAAAB2AA82C67C00000000 +00AF:00FE0000000000000000000000000000 00B0:00386C6C380000000000000000000000 00B1:0000000018187E18180000FF00000000 00B2:0070D83060C8F8000000000000000000 +00B3:00F8183018D870000000000000000000 +00B4:18306000000000000000000000000000 00B5:0000000066666666667C6060C0000000 00B6:00007FDBDBDB7B1B1B1B1B1B00000000 00B7:00000000000000001800000000000000 +00B8:00000000000000000000180C063C0000 +00B9:0060E0606060F0000000000000000000 00BA:00386C6C38007C000000000000000000 00BB:0000000000D86C366CD8000000000000 00BC:00C0C0C2C6CC183066CE9E3E06060000 00BD:00C0C0C2C6CC183060DC860C183E0000 +00BE:00F0307236EC183066CE963E06060000 00BF:0000303000303060C0C6C67C00000000 +00C0:60301800386CC6C6FEC6C6C600000000 +00C1:0C183000386CC6C6FEC6C6C600000000 +00C2:10386C00386CC6C6FEC6C6C600000000 +00C3:0076DC00386CC6C6FEC6C6C600000000 00C4:00C60010386CC6C6FEC6C6C600000000 00C5:386C3800386CC6C6FEC6C6C600000000 00C6:00003E6CCCCCFECCCCCCCCCE00000000 00C7:00003C66C2C0C0C0C2663C0C067C0000 +00C8:30180C00FE66607C606066FE00000000 00C9:18306000FE66607C606066FE00000000 +00CA:10386C00FE66607C606066FE00000000 +00CB:00C600FE6660607C606066FE00000000 +00CC:30180C003C1818181818183C00000000 +00CD:0C1830003C1818181818183C00000000 +00CE:183C66003C1818181818183C00000000 +00CF:0066003C181818181818183C00000000 +00D0:0000786C666666F666666C7800000000 00D1:76DC00C6E6F6FEDECEC6C6C600000000 +00D2:603018007CC6C6C6C6C6C67C00000000 +00D3:0C1830007CC6C6C6C6C6C67C00000000 +00D4:10386C007CC6C6C6C6C6C67C00000000 +00D5:76DC007CC6C6C6C6C6C6C67C00000000 00D6:00C6007CC6C6C6C6C6C6C67C00000000 +00D7:00000000C66C3810386CC60000000000 +00D8:02067CCECEDED6D6F6E6E67CC0800000 +00D9:60301800C6C6C6C6C6C6C67C00000000 +00DA:0C183000C6C6C6C6C6C6C67C00000000 +00DB:10386C00C6C6C6C6C6C6C67C00000000 00DC:00C600C6C6C6C6C6C6C6C67C00000000 +00DD:0C183000C3C3663C1818183C00000000 +00DE:F0607C6666667C60606060F000000000 00DF:000078CCCCCCD8CCC6C6C6CC00000000 00E0:0060301800780C7CCCCCCC7600000000 00E1:0018306000780C7CCCCCCC7600000000 00E2:0010386C00780C7CCCCCCC7600000000 +00E3:000076DC00780C7CCCCCCC7600000000 00E4:0000CC0000780C7CCCCCCC7600000000 00E5:00386C3800780C7CCCCCCC7600000000 00E6:0000000000CC76367ED8D86E00000000 @@ -141,34 +177,326 @@ 00ED:000C1830003818181818183C00000000 00EE:00183C66003818181818183C00000000 00EF:00006600003818181818183C00000000 +00F0:006C38386C0C3C6CCCCCCC7800000000 00F1:000076DC00DC66666666666600000000 00F2:00603018007CC6C6C6C6C67C00000000 00F3:00183060007CC6C6C6C6C67C00000000 00F4:0010386C007CC6C6C6C6C67C00000000 +00F5:000076DC007CC6C6C6C6C67C00000000 00F6:0000C600007CC6C6C6C6C67C00000000 00F7:000000001818007E0018180000000000 +00F8:00000002067CCEDED6F6E67CC0800000 00F9:0060301800CCCCCCCCCCCC7600000000 00FA:0018306000CCCCCCCCCCCC7600000000 00FB:003078CC00CCCCCCCCCCCC7600000000 00FC:0000CC0000CCCCCCCCCCCC7600000000 +00FD:0018306000C6C6C6C6C6C67E060CF800 +00FE:000000F0607C66666666667C6060F000 00FF:0000C60000C6C6C6C6C6C67E060C7800 +0100:007C00386CC6C6C6FEC6C6C6C6000000 +0101:000000007C00780C7CCCCCCC76000000 +0102:C67C0010386CC6C6FEC6C6C600000000 +0103:0000C67C00780C7CCCCCCC7600000000 +0104:000010386CC6C6FEC6C6C6C618301E00 +0105:0000000000780C7CCCCCCC7618301E00 +0106:0C18003C66C2C0C0C0C2663C00000000 +0107:000C1830007CC6C0C0C0C67C00000000 +010C:6C38003C66C2C0C0C0C2663C00000000 +010D:00006C38007CC6C0C0C0C67C00000000 +010E:6C3800F86C66666666666CF800000000 +010F:6C38001C0C0C3C6CCCCCCC7600000000 +0110:0000F86C6666F66666666CF800000000 +0111:00000C0C7E0C3C6CCCCCCC7600000000 +0112:7C0000FE6660607C60606066FE000000 +0113:000000007C007CC6C6FEC0C67C000000 +0116:181800FE6660607860606066FE000000 +0117:0000103810007CC6C6FEC0C67C000000 +0118:0000FE6662687868606266FE18301E00 +0119:00000000007CC6FEC0C0C67C30603C00 +011A:6C3800FE66626878686266FE00000000 +011B:00006C38007CC6FEC0C0C67C00000000 +011E:423C003C66C2C0DEC6C6663A00000000 +011F:000044380076CCCCCCCCCC7C0CCC7800 +0122:0000007CC6C6C0C0CECEC6C67C0C7800 +0123:00003C60300076CEC6C6C6CE7606FC00 +0128:76DC003C18181818181818183C000000 +0129:00000076DC003818181818183C000000 +012A:003C003C18181818181818183C000000 +012B:000000007C003818181818183C000000 +012E:0000003C18181818181818183C301E00 +012F:0000001818003818181818183C301C00 +0130:000018003C1818181818183C00000000 +0131:00000000003818181818183C00000000 +0136:000000C6C6CCD8F0F0D8CCC6C60C7800 +0137:000000E0606066666C786C66E618F000 +0138:000000000000E66C78786C66E6000000 +0139:0000F66C60606060606266FE00000000 +013A:0000E66C60606060606060F000000000 +013B:000000F06060606060606266FE0C7800 +013C:0000003818181818181818183C0C7800 +013D:001BEE6060606060606266FE00000000 +013E:001BEE6060606060606060F000000000 +0141:0000F0646C7870E0E06266FE00000000 +0142:0000381A1E1C18387858183C00000000 +0143:0C1800C6E6F6FEDECEC6C6C600000000 +0144:000C183000DC66666666666600000000 +0145:000000C6C6E6F6FEDECEC6C6C60C7800 +0146:000000000000DC6666666666660C7800 +0147:6C3800C6E6F6FEDECEC6C6C600000000 +0148:00006C3800DC66666666666600000000 +014A:000000DCFEE6C6C6C6C6C6C6DC000000 +014B:0000000000DCFEE6C6C6C6061C000000 +014C:007C007CC6C6C6C6C6C6C6C67C000000 +014D:000000007C007CC6C6C6C6C67C000000 +0150:366C007CC6C6C6C6C6C6C67C00000000 +0151:0000366C007CC6C6C6C6C67C00000000 +0152:00007ECCCCCCCECCCCCCCC7E00000000 +0153:00000000006EDBDBDED8DC6700000000 +0154:0C1800FC6666667C6C6666E600000000 +0155:000C183000DC7666606060F000000000 +0156:000000FC6666667C786C6666F618F000 +0157:000000000000DC6660606060F018F000 +0158:6C3800FC6666667C6C6666E600000000 +0159:00006C3800DC7666606060F000000000 +015A:0C18007CC6C660380CC6C67C00000000 +015B:000C1830007CC660380CC67C00000000 +015E:00007CC6C660380C06C6C67C180C7800 +015F:00000000007CC660380CC67C180C7800 +0160:6C38007CC6C660380CC6C67C00000000 +0161:00006C38007CC660380CC67C00000000 +0162:00007E7E5A1818181818183C180C7800 +0163:0000103030FC30303030361C180C7800 +0164:361C007E7E5A18181818183C00000000 +0165:6C3800103030FC303030361C00000000 +0166:000000FFDB99181E3C7818183C000000 +0167:000000303030FC303C78F0361C000000 +0168:76DC00C6C6C6C6C6C6C6C6C67C000000 +0169:00000076DC00CCCCCCCCCCCC76000000 +016A:007C00C6C6C6C6C6C6C6C6C67C000000 +016B:00000000FC00CCCCCCCCCCCC76000000 +016E:386C38C6C6C6C6C6C6C6C67C00000000 +016F:00386C3800CCCCCCCCCCCC7600000000 +0170:366C00C6C6C6C6C6C6C6C67C00000000 +0171:0000366C00CCCCCCCCCCCC7600000000 +0172:000000C6C6C6C6C6C6C6C6C67C603C00 +0173:000000000000CCCCCCCCCCCC76603C00 +0178:00C300C3C3663C181818183C00000000 +0179:0C1800FEC68C183060C2C6FE00000000 +017A:000C183000FECC183060C6FE00000000 +017B:181800FEC68C183060C2C6FE00000000 +017C:0000181800FECC183060C6FE00000000 +017D:6C3800FEC68C183060C2C6FE00000000 +017E:00006C3800FECC183060C6FE00000000 0192:000E1B1818187E1818181818D8700000 +02C7:006C3800000000000000000000000000 +02D8:00C67C00000000000000000000000000 +02D9:00181800000000000000000000000000 +02DB:00000000000000000000000030603C00 +02DD:00366CD8000000000000000000000000 +037A:00000000000000000000000000000000 +0384:060C1800000000000000000000000000 +0385:060C18C3000000000000000000000000 +0386:00C090B86CC6C6FEC6C6C6C600000000 +0388:0000BFB130303E303031313F00000000 +0389:0000B3B333333F333333330000000000 +038A:0000BC98181818181818183C00000000 +038C:00009EB33333333333331E0000000000 +038E:0000B3B333331E0C0C0C0C1E00000000 +038F:00009EB3212121212133123300000000 +0390:0C080066001818181818180E00000000 +0391:000010386CC6C6FEC6C6C6C600000000 +0392:0000FC6666667C66666666FC00000000 0393:0000FEC6C6C0C0C0C0C0C0C000000000 +0394:000010386CC6C6C6C6C6C6FE00000000 +0395:0000FE6662687868606266FE00000000 +0396:0000FEC6860C183060C2C6FE00000000 +0397:0000C6C6C6C6FEC6C6C6C6C600000000 0398:000000386CC6C6FEC6C66C3800000000 +0399:00003C18181818181818183C00000000 +039A:0000E666666C78786C6666E600000000 +039B:000010386CC6C6C6C6C6C6C600000000 +039C:0000C6EEFEFED6C6C6C6C6C600000000 +039D:0000C6E6F6FEDECEC6C6C6C600000000 +039E:0000FE8200007C00000082FE00000000 +039F:00007CC6C6C6C6C6C6C6C67C00000000 +03A0:0000FEC6C6C6C6C6C6C6C6C600000000 +03A1:0000FC6666667C60606060F000000000 03A3:000000FEC66030183060C6FE00000000 +03A4:00007E7E5A1818181818183C00000000 +03A5:0000666666663C181818183C00000000 03A6:0000007E183C6666663C187E00000000 +03A7:0000C6C66C7C38387C6CC6C600000000 +03A8:000018DBDBDBDBDB7E18183C00000000 03A9:0000386CC6C6C66C6C6C6CEE00000000 +03AA:00C31818181818181818181800000000 +03AB:C300666666663C181818183C00000000 +03AC:00003810007BCECCCCCCCC7B00000000 +03AD:00003810007CC6C078C0C67C00000000 +03AE:0000381000DC66666666666606060600 +03AF:00003810001818181818180E00000000 +03B0:0018C30000E766666666663C00000000 03B1:000000000076DCD8D8D8DC7600000000 +03B2:00007CC6C6C6C6FCC6C6C6FCC0C0C000 +03B3:0000000000C3663C183C6642663C0000 03B4:00001E30180C3E666666663C00000000 03B5:00001C3060607C606060301C00000000 +03B6:0000FC0C183060C0C0C0C0780C0C7800 +03B7:0000000000DC66666666666606060600 +03B8:00003E6363637F636363633E00000000 +03B9:00000000001818181818180E00000000 +03BA:0000000000E66C78786C66E600000000 +03BB:0000386C0C0C0C366666666600000000 +03BC:00000000006666666666667F60606000 +03BD:000000000082C6C66C6C383800000000 +03BE:0000FC60C0783060C0C0C07C06063C00 +03BF:00000000007CC6C6C6C6C67C00000000 03C0:00000000FE6C6C6C6C6C6C6C00000000 +03C1:00000000003C66666666667C60606000 +03C2:00000000003E63C0C060380CC67C0000 03C3:00000000007ED8D8D8D8D87000000000 03C4:0000000076DC18181818181800000000 +03C5:0000000000E766666666663C00000000 03C6:00000003067EDBDBF37E60C000000000 +03C7:0000000000C66C3838386CC600000000 +03C8:0000000000D6D6D6D6D6D67C10101000 +03C9:000000000066C3C3C3DBFF6600000000 +03CA:0000C300001818181818180E00000000 +03CB:0000C30000E766666666663C00000000 +03CC:00003810007CC6C6C6C6C67C00000000 +03CD:0000381000E766666666663C00000000 +03CE:000038100066C3C3C3DBFF6600000000 +0401:666600FEC6C0C0F0C0C0C6FE00000000 +0402:0000F86060607C666666666C00000000 +0403:1830007E606060606060606000000000 +0404:00003C66C0C0F8C0C0C0663C00000000 +0405:00007CC6C660380C06C6C67C00000000 +0406:0018003C181818181818183C00000000 +0407:0066003C181818181818183C00000000 +0408:00001E0C0C0C0C0CCCCCCC7800000000 +0409:0000183878D8D8DEDBDBDBDE00000000 +040A:0000D8D8D8D8D8FEDBDBDBDE00000000 +040B:0000FC3030303C363636363600000000 +040C:183000C6CCD8F0F8CCC6C6C600000000 +040E:281000C6C6C6C67E0606C67C00000000 +040F:0000C6C6C6C6C6C6C6FE383800000000 +0410:00003E66C6C6C6FEC6C6C6C600000000 +0411:0000FEC0C0C0FCC6C6C6C6FC00000000 +0412:0000FCC6C6C6FCC6C6C6C6FC00000000 +0413:0000FEC6C0C0C0C0C0C0C0C000000000 +0414:00003C6C6C6C6C6C6C6C6CFEC6820000 +0415:0000FEC6C0C0F0C0C0C0C6FE00000000 +0416:0000D6D6D6547CD6D6D6D6D600000000 +0417:00007CC606061C0606C6C67C00000000 +0418:0000C6C6C6C6CEDEF6E6C6C600000000 +0419:000CDAC6C6C6CEDEF6E6C6C600000000 +041A:0000C6CCD8F0F0D8CCC6C6C600000000 +041B:00001E3666C6C6C6C6C6C6C600000000 +041C:0000C6C6EEEEFEFED6D6C6C600000000 +041D:0000C6C6C6C6FEC6C6C6C6C600000000 +041E:00007EC6C6C6C6C6C6C6C6FC00000000 +041F:0000FEC6C6C6C6C6C6C6C6C600000000 +0420:0000FCC6C6C6C6C6FCC0C0C000000000 +0421:00007CC6C6C0C0C0C0C6C67C00000000 +0422:00007E7E5A1818181818181800000000 +0423:0000C6C6C6C6C6C67E06C67C00000000 +0424:00007CD6D6D6D6D6D67C103800000000 +0425:0000C6C66C38386CC6C6C6C600000000 +0426:0000CCCCCCCCCCCCCCCCCCFE02060400 +0427:0000C6C6C6C6C67E0606060600000000 +0428:0000D6D6D6D6D6D6D6D6D6FE00000000 +0429:0000D6D6D6D6D6D6D6D6D6FE02060400 +042A:0000E0E060607C666666667C00000000 +042B:0000C6C6C6C6E6B6B6B6B6E600000000 +042C:0000C0C0C0C0FCC6C6C6C6FC00000000 +042D:000078CC06061E1E0606CC7800000000 +042E:00009CB6B6B6F6B6B6B6B69C00000000 +042F:00007EC6C6C6C67E3666C6C600000000 +0430:00000000007CC6C6C6FEC6C600000000 +0431:0000000000FEC0FCC6C6C6FC00000000 +0432:0000000000FCC6C6FCC6C6FC00000000 +0433:0000000000FEC6C2C0C0C0C000000000 +0434:00000000003C6C6C6C6C6CFEC6820000 +0435:00000000007CC6C6FCC0C67C00000000 +0436:0000000000D6D6D67CD6D6D600000000 +0437:00000000007CC6061C06C67C00000000 +0438:0000000000C6C6CEDEF6E6C600000000 +0439:0000000C18C6C6CEDEF6E6C600000000 +043A:0000000000C6CCD8F8D8CCC600000000 +043B:00000000003E6666666666C600000000 +043C:0000000000C6EEFED6C6C6C600000000 +043D:0000000000C6C6C6FEC6C6C600000000 +043E:00000000007EC6C6C6C6C6FC00000000 +043F:0000000000FEC6C6C6C6C6C600000000 +0440:0000000000FCC6C6C6C6C6FCC0C0C000 +0441:00000000007CC6C0C0C2C67C00000000 +0442:00000000007E5A181818181800000000 +0443:0000000000C6C6C6C6C6C67E06C67C00 +0444:00000000107CD6D6D6D6D67C10380000 +0445:0000000000C66C38386CC6C600000000 +0446:0000000000CCCCCCCCCCCCFE060C0000 +0447:0000000000C6C6C6C67E060600000000 +0448:0000000000D6D6D6D6D6D6FE00000000 +0449:0000000000D6D6D6D6D6D6FE02060400 +044A:0000000000E0607C6666667C00000000 +044B:0000000000C6C6E6B6B6B6E600000000 +044C:0000000000C0C0FCC6C6C6FC00000000 +044D:00000000007CC6061E06C67C00000000 +044E:00000000009CB6B6F6B6B69C00000000 +044F:00000000007EC6C67E3666C600000000 +0451:00006C6C007CC6C6FCC0C67C00000000 +0452:0000606060F8607C666666660C000000 +0453:00001830007C60606060606000000000 +0454:00000000007CC6C0F0C0C67C00000000 +0455:00000000007CC660380CC67C00000000 +0456:00001010003818181818183C00000000 +0457:00002828003818181818183C00000000 +0458:00000404000E06060606060666663C00 +0459:0000000000183878DEDBDBDE00000000 +045A:0000000000D8D8D8FEDBDBDE00000000 +045B:0000303030FC303C3636363600000000 +045C:0000183000C4CCD8F0D8CCCC00000000 +045E:0000281000C6C6C6C6C6C67E06C67C00 +045F:0000000000C6C6C6C6FE383800000000 +05D0:00000000C6C66676DCCCC6C600000000 +05D1:00000000F80C0C0C0C0C0CFE00000000 +05D2:00000000380C0C0C0C1C36E600000000 +05D3:00000000FE0C0C0C0C0C0C0C00000000 +05D4:00000000FC060606C6C6C6C600000000 +05D5:00000000701818181818181800000000 +05D6:00000000FC3030301818306000000000 +05D7:00000000FC66C6C6C6C6C6C600000000 +05D8:00000000CCD6D6C6C6C6C67C00000000 +05D9:00000000701818183000000000000000 +05DA:00000000FC0606060C0C0C0C0C0C0E00 +05DB:00000000FC060606060606FC00000000 +05DC:0000C0C0FC060606060C181800000000 +05DD:00000000FC66C6C6C6C6C6FE00000000 +05DE:00000000DC7666C6C6C6C6DE00000000 +05DF:00000000380C0C181818181818181C00 +05E0:00000000380C0C0C0C0C0C7C00000000 +05E1:00000000FC66C6C6C6C6CC7800000000 +05E2:00000000EE66666666662CF800000000 +05E3:00000000F84CCCCCEC0C0C0C0C0C0E00 +05E4:00000000FC46C6C6E60606FE00000000 +05E5:00000000EE66666C7860606060607000 +05E6:00000000EE666634180C06FE00000000 +05E7:00000000FC060666646C6E6060606000 +05E8:00000000FC0606060606060600000000 +05E9:00000000D6D6D6D6D6F6C67C00000000 +05EA:00000000FC6666666666E6E600000000 +200E:00000000000000000000000000000000 +200F:00000000000000000000000000000000 +2015:00000000000000FF0000000000000000 +2017:000000000000000000000000FF00FF00 +2018:00306060300000000000000000000000 +2019:000C06060C0000000000000000000000 2022:000000000000183C3C18000000000000 203C:00006666666666666600666600000000 207F:00D86C6C6C6C6C000000000000000000 20A7:00F8CCCCF8C4CCDECCCCCCC600000000 +20AC:00000000000000000000000000000000 +20AF:00000000000000000000000000000000 +2116:0000888ACDEAB8988B888B8800000000 2190:00000000003060FE6030000000000000 2191:0000183C7E1818181818181800000000 2192:0000000000180CFE0C18000000000000 Copied and modified: stable/10/share/vt/fonts/vgarom-8x8.hex (from r267306, head/share/vt/fonts/vgarom-8x8.hex) ============================================================================== --- head/share/vt/fonts/vgarom-8x8.hex Mon Jun 9 21:06:46 2014 (r267306, copy source) +++ stable/10/share/vt/fonts/vgarom-8x8.hex Tue Sep 9 20:36:56 2014 (r271333) @@ -100,34 +100,70 @@ 00A1:1818001818181800 00A2:18187EC0C07E1818 00A3:386C64F060E6FC00 +00A4:00C33C66663CC300 00A5:CCCC78FC30FC3030 +00A6:1818180018181800 00A7:3E63386C6C38CC78 +00A8:C600000000000000 +00A9:7C82BAA2BA827C00 00AA:3C6C6C3E007E0000 00AB:003366CC66330000 00AC:000000FC0C0C0000 +00AD:0000000000000000 +00AE:7C82BAB2AA827C00 +00AF:FE00000000000000 00B0:386C6C3800000000 00B1:3030FC303000FC00 00B2:7018306078000000 +00B3:1E020E021E000000 +00B4:1830000000000000 00B5:00666666667C60C0 00B6:7FDBDB7B1B1B1B00 00B7:0000000018000000 +00B8:0000000000001830 +00B9:060E060606000000 00BA:386C6C38007C0000 00BB:00CC663366CC0000 00BC:C3C6CCDB376FCF03 00BD:C3C6CCDE3366CC0F +00BE:F020966C33670F03 00BF:30003060C0CC7800 +00C0:180C3078CCFCCC00 +00C1:60C03078CCFCCC00 +00C2:78843078CCFCCC00 +00C3:66983078CCFCCC00 00C4:C6386CC6FEC6C600 00C5:30300078CCFCCC00 00C6:3E6CCCFECCCCCE00 00C7:78CCC0CC78180C78 +00C8:3018FE627862FE00 00C9:1C00FC607860FC00 +00CA:3844FE627862FE00 +00CB:6600FE627862FE00 +00CC:6030783030307800 +00CD:1830783030307800 +00CE:7884783030307800 +00CF:CC00783030307800 +00D0:786C66F6666C7800 00D1:FC00CCECFCDCCC00 +00D2:30187CC6C6C67C00 +00D3:18307CC6C6C67C00 +00D4:38447CC6C6C67C00 +00D5:66987CC6C6C67C00 00D6:C3183C66663C1800 +00D7:00C66C38386CC600 +00D8:067CCE9AB2E678C0 +00D9:6030CCCCCCCCFC00 +00DA:1830CCCCCCCCFC00 +00DB:7884CCCCCCCCFC00 00DC:CC00CCCCCCCC7800 +00DD:1830CCCC78307800 +00DE:60786C7860606000 00DF:0078CCF8CCF8C0C0 00E0:E000780C7CCC7E00 00E1:1C00780C7CCC7E00 00E2:7EC33C063E663F00 +00E3:6698780C7CCC7600 00E4:CC00780C7CCC7E00 00E5:3030780C7CCC7E00 00E6:00007F0C7FCC7F00 @@ -140,34 +176,322 @@ 00ED:3800703030307800 00EE:7CC6381818183C00 00EF:CC00703030307800 +00F0:6C386C0C6CCC7800 00F1:00F800F8CCCCCC00 00F2:00E00078CCCC7800 00F3:001C0078CCCC7800 00F4:78CC0078CCCC7800 +00F5:6698007CC6C67C00 00F6:00CC0078CCCC7800 00F7:303000FC00303000 +00F8:0000067CDEF67CC0 00F9:00E000CCCCCC7E00 00FA:001C00CCCCCC7E00 00FB:78CC00CCCCCC7E00 00FC:00CC00CCCCCC7E00 +00FD:1830CCCCCC7C0CF8 +00FE:E0786C666C78E000 00FF:00CC00CCCC7C0CF8 +0100:7C007CC6C6FEC6C6 +0101:007C00780C7CCC76 +0102:663C3C667E666600 +0103:C67C780C7CCC7600 +0104:183C667E666E180E +0105:0000780C7CCC761C +0106:0C187CC6C0C67C00 +0107:0C18003C60603C00 +010C:6C387CC6C0C67C00 +010D:361C003C60603C00 +010E:6C38FC666666FC00 +010F:6C380C0C7CCC7600 +0110:F86C66F6666CF800 +0111:0C3E0C7CCCCC7600 +0112:7C00FE607C6066FE +0113:007C007CC6FEC07C +0116:18FE66607C6066FE +0117:0038007CC6FEC07C +0118:FE6268786862FE1C +0119:00003C667E603C1C +011A:6C38FE607860FE00 +011B:361C3C667E603C00 +0122:3C66C0CE663E1870 +0123:3860307ECC7C0CF8 +0128:76DC38181818183C +0129:0076DC003818183C +012A:3C003C181818183C +012B:003C00381818183C +012E:783030303078301C +012F:18003818183C180E +0136:C6CCF8D8CCC60C38 +0137:00E0666C786CE61C +0138:000000E66C786CE6 +0139:E66C60606266FE00 +013A:7336303030307800 +013B:F060606266FE1870 +013C:38181818183C1870 +013D:FB6E60606266FE00 +013E:FB6E60606060F000 +0141:F06878F0E266FE00 +0142:381A1E3C78183C00 +0143:0C18E6F6DECEC600 +0144:0C187C6666666600 +0145:C6E6F6DECEC60C38 +0146:0000DCE6C6C61870 +0147:6C38E6F6DECEC600 +0148:6C387C6666666600 +014A:00DCFEF6C6C6C6DC +014B:0000DCFEF6C6061C +014C:7C007CC6C6C6C67C +014D:007C007CC6C6C67C +0150:366C7CC6C6C67C00 +0151:366C003C66663C00 +0152:58D8DCD8583E0000 +0153:006CD2DED06E0000 +0154:0C18FCC6FCCCC600 +0155:0C18DC766660F000 +0156:FC667E6C66E61870 +0157:0000DC7666F030E0 +0158:6C38FCC6FCCCC600 +0159:6C38DC766660F000 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 21:07:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF16B74F; Tue, 9 Sep 2014 21:07: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 BA3AD90B; Tue, 9 Sep 2014 21:07: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 s89L7Ljk090450; Tue, 9 Sep 2014 21:07:21 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89L7L49090449; Tue, 9 Sep 2014 21:07:21 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409092107.s89L7L49090449@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 Sep 2014 21:07:21 +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: r271334 - stable/10/release X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 21:07:21 -0000 Author: gjb Date: Tue Sep 9 21:07:21 2014 New Revision: 271334 URL: http://svnweb.freebsd.org/changeset/base/271334 Log: Connect the UEFI-capable memstick.img to the build. This is a direct commit to stable/10, as the script in head/ does UEFI by default. Approved by: re (rodrigc) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Tue Sep 9 20:36:56 2014 (r271333) +++ stable/10/release/Makefile Tue Sep 9 21:07:21 2014 (r271334) @@ -93,6 +93,10 @@ RELEASE_TARGETS+= mini-memstick.img IMAGES+= memstick.img IMAGES+= mini-memstick.img .endif +.if exists(${.CURDIR}/${TARGET}/make-uefi-memstick.sh) +RELEASE_TARGETS+=uefi-memstick.img +IMAGES+= uefi-memstick.img +.endif CLEANFILES= packagesystem *.txz MANIFEST system ${IMAGES} .if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) @@ -230,6 +234,12 @@ mini-memstick: mini-memstick.img mini-memstick.img: system sh ${.CURDIR}/${TARGET}/make-memstick.sh bootonly ${.TARGET} +uefi-memstick: uefi-memstick.img +uefi-memstick.img: system +.if exists(${.CURDIR}/${TARGET}/make-uefi-memstick.sh) + sh ${.CURDIR}/${TARGET}/make-uefi-memstick.sh release ${.TARGET} +.endif + packagesystem: base.txz kernel.txz ${EXTRA_PACKAGES} sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST touch ${.TARGET} From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 22:14:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21C26F06; Tue, 9 Sep 2014 22:14: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 E81D4FA9; Tue, 9 Sep 2014 22:14:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89MEFQF024140; Tue, 9 Sep 2014 22:14:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89MEF0Q024139; Tue, 9 Sep 2014 22:14:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409092214.s89MEF0Q024139@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 9 Sep 2014 22:14:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271336 - head/tools/regression/lib/msun X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 22:14:16 -0000 Author: ngie Date: Tue Sep 9 22:14:15 2014 New Revision: 271336 URL: http://svnweb.freebsd.org/changeset/base/271336 Log: Expand the tests structure in test_small(..) to workaround the "initializer not constant" warning with gcc Approved by: jmmv (mentor) MFC after: 3 days Phabric: D744 Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/lib/msun/test-invctrig.c Modified: head/tools/regression/lib/msun/test-invctrig.c ============================================================================== --- head/tools/regression/lib/msun/test-invctrig.c Tue Sep 9 21:13:47 2014 (r271335) +++ head/tools/regression/lib/msun/test-invctrig.c Tue Sep 9 22:14:15 2014 (r271336) @@ -315,25 +315,20 @@ test_small(void) * asin(z) = Pi/4 + i ln(2)/2 * atan(z) = atan(4)/2 + i ln(17/9)/4 */ - static const struct { - complex long double z; - complex long double acos_z; - complex long double asin_z; - complex long double atan_z; - } tests[] = { - { CMPLXL(0.75L, 0.25L), - CMPLXL(pi / 4, -0.34657359027997265470861606072908828L), - CMPLXL(pi / 4, 0.34657359027997265470861606072908828L), - CMPLXL(0.66290883183401623252961960521423782L, - 0.15899719167999917436476103600701878L) }, - }; - int i; - - for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) { - testall_tol(cacos, tests[i].z, tests[i].acos_z, 2); - testall_odd_tol(casin, tests[i].z, tests[i].asin_z, 2); - testall_odd_tol(catan, tests[i].z, tests[i].atan_z, 2); - } + complex long double z; + complex long double acos_z; + complex long double asin_z; + complex long double atan_z; + + z = CMPLXL(0.75L, 0.25L); + acos_z = CMPLXL(pi / 4, -0.34657359027997265470861606072908828L); + asin_z = CMPLXL(pi / 4, 0.34657359027997265470861606072908828L); + atan_z = CMPLXL(0.66290883183401623252961960521423782L, + 0.15899719167999917436476103600701878L); + + testall_tol(cacos, z, acos_z, 2); + testall_odd_tol(casin, z, asin_z, 2); + testall_odd_tol(catan, z, atan_z, 2); } /* Test inputs that might cause overflow in a sloppy implementation. */ From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 22:24:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C60750B; Tue, 9 Sep 2014 22:24: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 84CB6139; Tue, 9 Sep 2014 22:24: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 s89MO6t4029207; Tue, 9 Sep 2014 22:24:06 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89MO1me029173; Tue, 9 Sep 2014 22:24:01 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409092224.s89MO1me029173@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 9 Sep 2014 22:24:01 +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: r271337 - in stable/10: lib/libc/arm/gen lib/libc/arm/string lib/libc/arm/sys sys/arm/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 22:24:06 -0000 Author: ian Date: Tue Sep 9 22:24:01 2014 New Revision: 271337 URL: http://svnweb.freebsd.org/changeset/base/271337 Log: MFC r270882, r270930: In ARM asm code, ensure that every ENTRY(foo) has a matching END(foo). The EABI unwind info requires a .fnend for every .fnstart, and newer binutils will complain about seeing two .fnstart in a row. This change allows newer tools to compile our code. Do not generate unwind info in asm functions if _STANDALONE is defined. The .fnend op causes the assembler to emit RELOC references to unwind support functions that don't exist in libstand. Approved by: re(gjb) Modified: stable/10/lib/libc/arm/gen/__aeabi_read_tp.S stable/10/lib/libc/arm/gen/_ctx_start.S stable/10/lib/libc/arm/gen/_setjmp.S stable/10/lib/libc/arm/gen/alloca.S stable/10/lib/libc/arm/gen/divsi3.S stable/10/lib/libc/arm/gen/setjmp.S stable/10/lib/libc/arm/gen/sigsetjmp.S stable/10/lib/libc/arm/string/ffs.S stable/10/lib/libc/arm/string/memcmp.S stable/10/lib/libc/arm/string/memcpy_arm.S stable/10/lib/libc/arm/string/memcpy_xscale.S stable/10/lib/libc/arm/string/memmove.S stable/10/lib/libc/arm/string/memset.S stable/10/lib/libc/arm/string/strcmp.S stable/10/lib/libc/arm/string/strlen.S stable/10/lib/libc/arm/string/strncmp.S stable/10/lib/libc/arm/sys/Ovfork.S stable/10/lib/libc/arm/sys/brk.S stable/10/lib/libc/arm/sys/cerror.S stable/10/lib/libc/arm/sys/pipe.S stable/10/lib/libc/arm/sys/ptrace.S stable/10/lib/libc/arm/sys/sbrk.S stable/10/sys/arm/include/asm.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/arm/gen/__aeabi_read_tp.S ============================================================================== --- stable/10/lib/libc/arm/gen/__aeabi_read_tp.S Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/lib/libc/arm/gen/__aeabi_read_tp.S Tue Sep 9 22:24:01 2014 (r271337) @@ -38,6 +38,7 @@ ENTRY(__aeabi_read_tp) mrc p15, 0, r0, c13, c0, 3 #endif RET +END(__aeabi_read_tp) #ifdef ARM_TP_ADDRESS .Larm_tp_address: Modified: stable/10/lib/libc/arm/gen/_ctx_start.S ============================================================================== --- stable/10/lib/libc/arm/gen/_ctx_start.S Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/lib/libc/arm/gen/_ctx_start.S Tue Sep 9 22:24:01 2014 (r271337) @@ -7,3 +7,4 @@ ENTRY(_ctx_start) mov r0, r5 bl _C_LABEL(ctx_done) bl _C_LABEL(abort) +END(_ctx_start) Modified: stable/10/lib/libc/arm/gen/_setjmp.S ============================================================================== --- stable/10/lib/libc/arm/gen/_setjmp.S Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/lib/libc/arm/gen/_setjmp.S Tue Sep 9 22:24:01 2014 (r271337) @@ -89,6 +89,7 @@ ENTRY(_setjmp) mov r0, #0x00000000 RET +END(_setjmp) .L_setjmp_magic: .word _JB_MAGIC__SETJMP @@ -140,3 +141,4 @@ botch: #else b . #endif +END(_longjmp) Modified: stable/10/lib/libc/arm/gen/alloca.S ============================================================================== --- stable/10/lib/libc/arm/gen/alloca.S Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/lib/libc/arm/gen/alloca.S Tue Sep 9 22:24:01 2014 (r271337) @@ -43,3 +43,4 @@ ENTRY(alloca) sub sp, sp, r0 /* Adjust the stack pointer */ mov r0, sp /* r0 = base of new space */ RET +END(alloca) Modified: stable/10/lib/libc/arm/gen/divsi3.S ============================================================================== --- stable/10/lib/libc/arm/gen/divsi3.S Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/lib/libc/arm/gen/divsi3.S Tue Sep 9 22:24:01 2014 (r271337) @@ -29,6 +29,7 @@ ENTRY(__umodsi3) add sp, sp, #4 /* unalign stack */ mov r0, r1 ldmfd sp!, {pc} +END(__umodsi3) ENTRY(__modsi3) stmfd sp!, {lr} @@ -48,6 +49,7 @@ ENTRY(__modsi3) mvn r0, #0 #endif RET +END(__modsi3) ENTRY(__udivsi3) .L_udivide: /* r0 = r0 / r1; r1 = r0 % r1 */ @@ -70,6 +72,7 @@ ENTRY(__udivsi3) mov r0, r1 mov r1, #0 RET +END(__udivsi3) ENTRY(__divsi3) .L_divide: /* r0 = r0 / r1; r1 = r0 % r1 */ @@ -385,3 +388,4 @@ ENTRY(__divsi3) addhs r3, r3, r2 mov r0, r3 RET +END(__divsi3) Modified: stable/10/lib/libc/arm/gen/setjmp.S ============================================================================== --- stable/10/lib/libc/arm/gen/setjmp.S Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/lib/libc/arm/gen/setjmp.S Tue Sep 9 22:24:01 2014 (r271337) @@ -101,7 +101,7 @@ ENTRY(setjmp) .Lfpu_present: .word PIC_SYM(_libc_arm_fpu_present, GOTOFF) #endif /* __ARM_EABI__ */ - +END(setjmp) .weak _C_LABEL(longjmp) .set _C_LABEL(longjmp), _C_LABEL(__longjmp) @@ -150,3 +150,4 @@ ENTRY(__longjmp) bl PIC_SYM(_C_LABEL(longjmperror), PLT) bl PIC_SYM(_C_LABEL(abort), PLT) b . - 8 /* Cannot get here */ +END(__longjmp) Modified: stable/10/lib/libc/arm/gen/sigsetjmp.S ============================================================================== --- stable/10/lib/libc/arm/gen/sigsetjmp.S Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/lib/libc/arm/gen/sigsetjmp.S Tue Sep 9 22:24:01 2014 (r271337) @@ -51,6 +51,7 @@ ENTRY(sigsetjmp) teq r1, #0 beq PIC_SYM(_C_LABEL(_setjmp), PLT) b PIC_SYM(_C_LABEL(setjmp), PLT) +END(sigsetjmp) .L_setjmp_magic: .word _JB_MAGIC__SETJMP @@ -64,3 +65,4 @@ ENTRY(siglongjmp) teq r2, r3 /* magic correct? */ beq PIC_SYM(_C_LABEL(_longjmp), PLT) b PIC_SYM(_C_LABEL(longjmp), PLT) +END(siglongjmp) Modified: stable/10/lib/libc/arm/string/ffs.S ============================================================================== --- stable/10/lib/libc/arm/string/ffs.S Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/lib/libc/arm/string/ffs.S Tue Sep 9 22:24:01 2014 (r271337) @@ -80,3 +80,4 @@ ENTRY(ffs) rsbne r0, r0, #32 RET #endif +END(ffs) Modified: stable/10/lib/libc/arm/string/memcmp.S ============================================================================== --- stable/10/lib/libc/arm/string/memcmp.S Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/lib/libc/arm/string/memcmp.S Tue Sep 9 22:24:01 2014 (r271337) @@ -178,3 +178,4 @@ ENTRY(memcmp) sub r0, r3, r2 /* r0 = b1#5 - b2#5 */ RET #endif +END(memcmp) Modified: stable/10/lib/libc/arm/string/memcpy_arm.S ============================================================================== --- stable/10/lib/libc/arm/string/memcpy_arm.S Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/lib/libc/arm/string/memcpy_arm.S Tue Sep 9 22:24:01 2014 (r271337) @@ -330,3 +330,4 @@ ENTRY(memcpy) .Lmemcpy_srcul3l4: sub r1, r1, #1 b .Lmemcpy_l4 +END(memcpy) Modified: stable/10/lib/libc/arm/string/memcpy_xscale.S ============================================================================== --- stable/10/lib/libc/arm/string/memcpy_xscale.S Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/lib/libc/arm/string/memcpy_xscale.S Tue Sep 9 22:24:01 2014 (r271337) @@ -1781,3 +1781,4 @@ ENTRY(memcpy) strb r1, [r0, #0x0b] bx lr #endif /* !_STANDALONE */ +END(memcpy) Modified: stable/10/lib/libc/arm/string/memmove.S ============================================================================== --- stable/10/lib/libc/arm/string/memmove.S Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/lib/libc/arm/string/memmove.S Tue Sep 9 22:24:01 2014 (r271337) @@ -580,3 +580,8 @@ ENTRY(bcopy) .Lmemmove_bsrcul1l4: add r1, r1, #1 b .Lmemmove_bl4 +#ifndef _BCOPY +END(memmove) +#else +END(bcopy) +#endif Modified: stable/10/lib/libc/arm/string/memset.S ============================================================================== --- stable/10/lib/libc/arm/string/memset.S Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/lib/libc/arm/string/memset.S Tue Sep 9 22:24:01 2014 (r271337) @@ -234,3 +234,8 @@ ENTRY(memset) strgeb r3, [ip], #0x01 /* Set another byte */ strgtb r3, [ip] /* and a third */ RET /* Exit */ +#ifdef _BZERO +END(bzero) +#else +END(memset) +#endif Modified: stable/10/lib/libc/arm/string/strcmp.S ============================================================================== --- stable/10/lib/libc/arm/string/strcmp.S Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/lib/libc/arm/string/strcmp.S Tue Sep 9 22:24:01 2014 (r271337) @@ -41,3 +41,4 @@ ENTRY(strcmp) beq 1b sub r0, r2, r3 RET +END(strcmp) Modified: stable/10/lib/libc/arm/string/strlen.S ============================================================================== --- stable/10/lib/libc/arm/string/strlen.S Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/lib/libc/arm/string/strlen.S Tue Sep 9 22:24:01 2014 (r271337) @@ -76,3 +76,4 @@ ENTRY(strlen) .Lexit: mov r0, r1 RET +END(strlen) Modified: stable/10/lib/libc/arm/string/strncmp.S ============================================================================== --- stable/10/lib/libc/arm/string/strncmp.S Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/lib/libc/arm/string/strncmp.S Tue Sep 9 22:24:01 2014 (r271337) @@ -52,3 +52,4 @@ ENTRY(strncmp) beq 1b sub r0, r2, r3 RET +END(strncmp) Modified: stable/10/lib/libc/arm/sys/Ovfork.S ============================================================================== --- stable/10/lib/libc/arm/sys/Ovfork.S Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/lib/libc/arm/sys/Ovfork.S Tue Sep 9 22:24:01 2014 (r271337) @@ -52,3 +52,4 @@ ENTRY(vfork) sub r1, r1, #1 /* r1 == 0xffffffff if parent, 0 if child */ and r0, r0, r1 /* r0 == 0 if child, else unchanged */ mov r15, r2 +END(vfork) Modified: stable/10/lib/libc/arm/sys/brk.S ============================================================================== --- stable/10/lib/libc/arm/sys/brk.S Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/lib/libc/arm/sys/brk.S Tue Sep 9 22:24:01 2014 (r271337) @@ -98,3 +98,4 @@ ENTRY(_brk) .word PIC_SYM(_C_LABEL(minbrk), GOT) .Lcurbrk: .word PIC_SYM(CURBRK, GOT) +END(_brk) Modified: stable/10/lib/libc/arm/sys/cerror.S ============================================================================== --- stable/10/lib/libc/arm/sys/cerror.S Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/lib/libc/arm/sys/cerror.S Tue Sep 9 22:24:01 2014 (r271337) @@ -46,3 +46,4 @@ ASENTRY(CERROR) mvn r0, #0x00000000 mvn r1, #0x00000000 ldmfd sp!, {r4, pc} +END(CERROR) Modified: stable/10/lib/libc/arm/sys/pipe.S ============================================================================== --- stable/10/lib/libc/arm/sys/pipe.S Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/lib/libc/arm/sys/pipe.S Tue Sep 9 22:24:01 2014 (r271337) @@ -48,3 +48,4 @@ ENTRY(_pipe) str r1, [r2, #0x0004] mov r0, #0x00000000 RET +END(_pipe) Modified: stable/10/lib/libc/arm/sys/ptrace.S ============================================================================== --- stable/10/lib/libc/arm/sys/ptrace.S Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/lib/libc/arm/sys/ptrace.S Tue Sep 9 22:24:01 2014 (r271337) @@ -46,3 +46,4 @@ ENTRY(ptrace) SYSTRAP(ptrace) bcs PIC_SYM(CERROR, PLT) RET +END(ptrace) Modified: stable/10/lib/libc/arm/sys/sbrk.S ============================================================================== --- stable/10/lib/libc/arm/sys/sbrk.S Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/lib/libc/arm/sys/sbrk.S Tue Sep 9 22:24:01 2014 (r271337) @@ -86,3 +86,4 @@ ENTRY(_sbrk) #endif .Lcurbrk: .word PIC_SYM(CURBRK, GOT) +END(_sbrk) Modified: stable/10/sys/arm/include/asm.h ============================================================================== --- stable/10/sys/arm/include/asm.h Tue Sep 9 22:14:15 2014 (r271336) +++ stable/10/sys/arm/include/asm.h Tue Sep 9 22:24:01 2014 (r271337) @@ -53,7 +53,7 @@ # define _ALIGN_TEXT .align 0 #endif -#ifdef __ARM_EABI__ +#if defined(__ARM_EABI__) && !defined(_STANDALONE) #define STOP_UNWINDING .cantunwind #define _FNSTART .fnstart #define _FNEND .fnend From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 22:35:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BAE86887; Tue, 9 Sep 2014 22:35:02 +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 9AD9D226; Tue, 9 Sep 2014 22:35:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89MZ2nB033994; Tue, 9 Sep 2014 22:35:02 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89MZ2Cc033993; Tue, 9 Sep 2014 22:35:02 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201409092235.s89MZ2Cc033993@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Tue, 9 Sep 2014 22:35:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271338 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 22:35:02 -0000 Author: grehan Date: Tue Sep 9 22:35:02 2014 New Revision: 271338 URL: http://svnweb.freebsd.org/changeset/base/271338 Log: Allow vtnet operation without merged rx buffers. NetBSD's virtio-net implementation doesn't negotiate the merged rx-buffers feature. To support this, check to see if the feature was negotiated, and then adjust the operation of the receive path accordingly by using a larger iovec, and a smaller rx header. In addition, ignore writes to the (read-only) status byte. Tested with NetBSD/amd64 5.2.2, 6.1.4 and 7-beta. Reviewed by: neel, tychon Phabric: D745 MFC after: 3 days Modified: head/usr.sbin/bhyve/pci_virtio_net.c Modified: head/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_net.c Tue Sep 9 22:24:01 2014 (r271337) +++ head/usr.sbin/bhyve/pci_virtio_net.c Tue Sep 9 22:35:02 2014 (r271338) @@ -135,11 +135,14 @@ struct pci_vtnet_softc { int vsc_rx_ready; volatile int resetting; /* set and checked outside lock */ - uint32_t vsc_features; + uint64_t vsc_features; /* negotiated features */ + struct virtio_net_config vsc_config; pthread_mutex_t rx_mtx; int rx_in_progress; + int rx_vhdrlen; + int rx_merge; /* merged rx bufs in use */ pthread_t tx_tid; pthread_mutex_t tx_mtx; @@ -151,6 +154,7 @@ static void pci_vtnet_reset(void *); /* static void pci_vtnet_notify(void *, struct vqueue_info *); */ static int pci_vtnet_cfgread(void *, int, int, uint32_t *); static int pci_vtnet_cfgwrite(void *, int, int, uint32_t); +static void pci_vtnet_neg_features(void *, uint64_t); static struct virtio_consts vtnet_vi_consts = { "vtnet", /* our name */ @@ -160,7 +164,7 @@ static struct virtio_consts vtnet_vi_con NULL, /* device-wide qnotify -- not used */ pci_vtnet_cfgread, /* read PCI config */ pci_vtnet_cfgwrite, /* write PCI config */ - NULL, /* apply negotiated features */ + pci_vtnet_neg_features, /* apply negotiated features */ VTNET_S_HOSTCAPS, /* our capabilities */ }; @@ -213,6 +217,8 @@ pci_vtnet_reset(void *vsc) pci_vtnet_rxwait(sc); sc->vsc_rx_ready = 0; + sc->rx_merge = 1; + sc->rx_vhdrlen = sizeof(struct virtio_net_rxhdr); /* now reset rings, MSI-X vectors, and negotiated capabilities */ vi_reset_dev(&sc->vsc_vs); @@ -254,14 +260,34 @@ pci_vtnet_tap_tx(struct pci_vtnet_softc */ static uint8_t dummybuf[2048]; +static __inline struct iovec * +rx_iov_trim(struct iovec *iov, int *niov, int tlen) +{ + struct iovec *riov; + + /* XXX short-cut: assume first segment is >= tlen */ + assert(iov[0].iov_len >= tlen); + + iov[0].iov_len -= tlen; + if (iov[0].iov_len == 0) { + assert(*niov > 1); + *niov -= 1; + riov = &iov[1]; + } else { + iov[0].iov_base = (void *)((uintptr_t)iov[0].iov_base + tlen); + riov = &iov[0]; + } + + return (riov); +} + static void pci_vtnet_tap_rx(struct pci_vtnet_softc *sc) { + struct iovec iov[VTNET_MAXSEGS], *riov; struct vqueue_info *vq; - struct virtio_net_rxhdr *vrx; - uint8_t *buf; - int len; - struct iovec iov; + void *vrx; + int len, n; /* * Should never be called without a valid tap fd @@ -297,21 +323,19 @@ pci_vtnet_tap_rx(struct pci_vtnet_softc do { /* - * Get descriptor chain, which should have just - * one descriptor in it. - * ??? allow guests to use multiple descs? + * Get descriptor chain. */ - assert(vq_getchain(vq, &iov, 1, NULL) == 1); + n = vq_getchain(vq, iov, VTNET_MAXSEGS, NULL); + assert(n >= 1 && n <= VTNET_MAXSEGS); /* * Get a pointer to the rx header, and use the * data immediately following it for the packet buffer. */ - vrx = iov.iov_base; - buf = (uint8_t *)(vrx + 1); + vrx = iov[0].iov_base; + riov = rx_iov_trim(iov, &n, sc->rx_vhdrlen); - len = read(sc->vsc_tapfd, buf, - iov.iov_len - sizeof(struct virtio_net_rxhdr)); + len = readv(sc->vsc_tapfd, riov, n); if (len < 0 && errno == EWOULDBLOCK) { /* @@ -324,16 +348,21 @@ pci_vtnet_tap_rx(struct pci_vtnet_softc /* * The only valid field in the rx packet header is the - * number of buffers, which is always 1 without TSO - * support. + * number of buffers if merged rx bufs were negotiated. */ - memset(vrx, 0, sizeof(struct virtio_net_rxhdr)); - vrx->vrh_bufs = 1; + memset(vrx, 0, sc->rx_vhdrlen); + + if (sc->rx_merge) { + struct virtio_net_rxhdr *vrxh; + + vrxh = vrx; + vrxh->vrh_bufs = 1; + } /* * Release this chain and handle more chains. */ - vq_relchain(vq, len + sizeof(struct virtio_net_rxhdr)); + vq_relchain(vq, len + sc->rx_vhdrlen); } while (vq_has_descs(vq)); /* Interrupt if needed, including for NOTIFY_ON_EMPTY. */ @@ -624,6 +653,8 @@ pci_vtnet_init(struct vmctx *ctx, struct sc->resetting = 0; + sc->rx_merge = 1; + sc->rx_vhdrlen = sizeof(struct virtio_net_rxhdr); sc->rx_in_progress = 0; pthread_mutex_init(&sc->rx_mtx, NULL); @@ -657,9 +688,10 @@ pci_vtnet_cfgwrite(void *vsc, int offset ptr = &sc->vsc_config.mac[offset]; memcpy(ptr, &value, size); } else { + /* silently ignore other writes */ DPRINTF(("vtnet: write to readonly reg %d\n\r", offset)); - return (1); } + return (0); } @@ -674,6 +706,20 @@ pci_vtnet_cfgread(void *vsc, int offset, return (0); } +static void +pci_vtnet_neg_features(void *vsc, uint64_t negotiated_features) +{ + struct pci_vtnet_softc *sc = vsc; + + sc->vsc_features = negotiated_features; + + if (!(sc->vsc_features & VIRTIO_NET_F_MRG_RXBUF)) { + sc->rx_merge = 0; + /* non-merge rx header is 2 bytes shorter */ + sc->rx_vhdrlen -= 2; + } +} + struct pci_devemu pci_de_vnet = { .pe_emu = "virtio-net", .pe_init = pci_vtnet_init, From owner-svn-src-all@FreeBSD.ORG Tue Sep 9 23:31:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9EA55593; Tue, 9 Sep 2014 23:31: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 888ED9CE; Tue, 9 Sep 2014 23:31: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 s89NVWBV061681; Tue, 9 Sep 2014 23:31:32 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89NVVW0061673; Tue, 9 Sep 2014 23:31:31 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409092331.s89NVVW0061673@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 9 Sep 2014 23:31: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: r271339 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 23:31:32 -0000 Author: ian Date: Tue Sep 9 23:31:30 2014 New Revision: 271339 URL: http://svnweb.freebsd.org/changeset/base/271339 Log: MFC r271050: Disable DIAGNOSTIC on low-end ARM platforms. Approved by: re(gjb) Modified: stable/10/sys/arm/conf/DB-78XXX stable/10/sys/arm/conf/DB-88F5XXX stable/10/sys/arm/conf/DB-88F6XXX stable/10/sys/arm/conf/DOCKSTAR stable/10/sys/arm/conf/DREAMPLUG-1001 stable/10/sys/arm/conf/EA3250 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/DB-78XXX ============================================================================== --- stable/10/sys/arm/conf/DB-78XXX Tue Sep 9 22:35:02 2014 (r271338) +++ stable/10/sys/arm/conf/DB-78XXX Tue Sep 9 23:31:30 2014 (r271339) @@ -44,7 +44,7 @@ options NO_SWAPPING options ALT_BREAK_TO_DEBUGGER options DDB #options DEADLKRES # Enable the deadlock resolver -options DIAGNOSTIC +#options DIAGNOSTIC #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options KDB Modified: stable/10/sys/arm/conf/DB-88F5XXX ============================================================================== --- stable/10/sys/arm/conf/DB-88F5XXX Tue Sep 9 22:35:02 2014 (r271338) +++ stable/10/sys/arm/conf/DB-88F5XXX Tue Sep 9 23:31:30 2014 (r271339) @@ -43,7 +43,7 @@ options NO_SWAPPING options ALT_BREAK_TO_DEBUGGER options DDB #options DEADLKRES # Enable the deadlock resolver -options DIAGNOSTIC +#options DIAGNOSTIC #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options KDB Modified: stable/10/sys/arm/conf/DB-88F6XXX ============================================================================== --- stable/10/sys/arm/conf/DB-88F6XXX Tue Sep 9 22:35:02 2014 (r271338) +++ stable/10/sys/arm/conf/DB-88F6XXX Tue Sep 9 23:31:30 2014 (r271339) @@ -44,7 +44,7 @@ options NO_SWAPPING options ALT_BREAK_TO_DEBUGGER options DDB #options DEADLKRES # Enable the deadlock resolver -options DIAGNOSTIC +#options DIAGNOSTIC #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options KDB Modified: stable/10/sys/arm/conf/DOCKSTAR ============================================================================== --- stable/10/sys/arm/conf/DOCKSTAR Tue Sep 9 22:35:02 2014 (r271338) +++ stable/10/sys/arm/conf/DOCKSTAR Tue Sep 9 23:31:30 2014 (r271339) @@ -145,7 +145,7 @@ options BREAK_TO_DEBUGGER options ALT_BREAK_TO_DEBUGGER options DDB options KDB -options DIAGNOSTIC +#options DIAGNOSTIC options INVARIANTS # Enable calls of extra sanity checking options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS # Enable checks to detect deadlocks and cycles Modified: stable/10/sys/arm/conf/DREAMPLUG-1001 ============================================================================== --- stable/10/sys/arm/conf/DREAMPLUG-1001 Tue Sep 9 22:35:02 2014 (r271338) +++ stable/10/sys/arm/conf/DREAMPLUG-1001 Tue Sep 9 23:31:30 2014 (r271339) @@ -153,7 +153,7 @@ options BREAK_TO_DEBUGGER options ALT_BREAK_TO_DEBUGGER options DDB options KDB -options DIAGNOSTIC +#options DIAGNOSTIC options INVARIANTS # Enable calls of extra sanity checking options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS # Enable checks to detect deadlocks and cycles Modified: stable/10/sys/arm/conf/EA3250 ============================================================================== --- stable/10/sys/arm/conf/EA3250 Tue Sep 9 22:35:02 2014 (r271338) +++ stable/10/sys/arm/conf/EA3250 Tue Sep 9 23:31:30 2014 (r271339) @@ -44,7 +44,7 @@ options NO_SWAPPING options ALT_BREAK_TO_DEBUGGER options DDB #options DEADLKRES # Enable the deadlock resolver -options DIAGNOSTIC +#options DIAGNOSTIC #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options KDB From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 00:19:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63A67FA2; Wed, 10 Sep 2014 00:19:34 +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 4DF7CDDF; Wed, 10 Sep 2014 00:19:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8A0JYvb082295; Wed, 10 Sep 2014 00:19:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A0JYBs082294; Wed, 10 Sep 2014 00:19:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409100019.s8A0JYBs082294@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 10 Sep 2014 00:19:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r271341 - head/sys/sys stable/10/sys/sys stable/8/sys/sys stable/9/sys/sys X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 00:19:34 -0000 Author: gjb Date: Wed Sep 10 00:19:33 2014 New Revision: 271341 URL: http://svnweb.freebsd.org/changeset/base/271341 Log: Bump __FreeBSD_version after SA-14:18 Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/8/sys/sys/param.h Changes in other areas also in this revision: Modified: head/sys/sys/param.h stable/10/sys/sys/param.h stable/9/sys/sys/param.h Modified: stable/8/sys/sys/param.h ============================================================================== --- stable/8/sys/sys/param.h Tue Sep 9 23:39:43 2014 (r271340) +++ stable/8/sys/sys/param.h Wed Sep 10 00:19:33 2014 (r271341) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 804503 /* Master, propagated to newvers */ +#define __FreeBSD_version 804504 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 00:19:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64841FA5; Wed, 10 Sep 2014 00:19:35 +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 4F0D8DE2; Wed, 10 Sep 2014 00:19:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8A0JZ4Q082313; Wed, 10 Sep 2014 00:19:35 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A0JZp3082312; Wed, 10 Sep 2014 00:19:35 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409100019.s8A0JZp3082312@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 10 Sep 2014 00:19:35 +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: r271341 - head/sys/sys stable/10/sys/sys stable/8/sys/sys stable/9/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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 00:19:35 -0000 Author: gjb Date: Wed Sep 10 00:19:33 2014 New Revision: 271341 URL: http://svnweb.freebsd.org/changeset/base/271341 Log: Bump __FreeBSD_version after SA-14:18 Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/sys/param.h Changes in other areas also in this revision: Modified: head/sys/sys/param.h stable/10/sys/sys/param.h stable/8/sys/sys/param.h Modified: stable/9/sys/sys/param.h ============================================================================== --- stable/9/sys/sys/param.h Tue Sep 9 23:39:43 2014 (r271340) +++ stable/9/sys/sys/param.h Wed Sep 10 00:19:33 2014 (r271341) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 903502 /* Master, propagated to newvers */ +#define __FreeBSD_version 903503 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 00:19:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1266AFA4; Wed, 10 Sep 2014 00:19:35 +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 F17E5DE1; Wed, 10 Sep 2014 00:19:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8A0JYZY082307; Wed, 10 Sep 2014 00:19:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A0JYKc082306; Wed, 10 Sep 2014 00:19:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409100019.s8A0JYKc082306@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 10 Sep 2014 00:19:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271341 - head/sys/sys stable/10/sys/sys stable/8/sys/sys stable/9/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 00:19:35 -0000 Author: gjb Date: Wed Sep 10 00:19:33 2014 New Revision: 271341 URL: http://svnweb.freebsd.org/changeset/base/271341 Log: Bump __FreeBSD_version after SA-14:18 Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: head/sys/sys/param.h Changes in other areas also in this revision: Modified: stable/10/sys/sys/param.h stable/8/sys/sys/param.h stable/9/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Tue Sep 9 23:39:43 2014 (r271340) +++ head/sys/sys/param.h Wed Sep 10 00:19:33 2014 (r271341) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100030 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100031 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 00:19:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEE85FA3; Wed, 10 Sep 2014 00:19:34 +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 B9184DE0; Wed, 10 Sep 2014 00:19:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8A0JYFk082301; Wed, 10 Sep 2014 00:19:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A0JYhs082300; Wed, 10 Sep 2014 00:19:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409100019.s8A0JYhs082300@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 10 Sep 2014 00:19:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271341 - head/sys/sys stable/10/sys/sys stable/8/sys/sys stable/9/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 00:19:34 -0000 Author: gjb Date: Wed Sep 10 00:19:33 2014 New Revision: 271341 URL: http://svnweb.freebsd.org/changeset/base/271341 Log: Bump __FreeBSD_version after SA-14:18 Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/sys/param.h Changes in other areas also in this revision: Modified: head/sys/sys/param.h stable/8/sys/sys/param.h stable/9/sys/sys/param.h Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Tue Sep 9 23:39:43 2014 (r271340) +++ stable/10/sys/sys/param.h Wed Sep 10 00:19:33 2014 (r271341) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000714 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000715 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 02:44:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 731C3615; Wed, 10 Sep 2014 02:44:03 +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 5E1F3C0; Wed, 10 Sep 2014 02:44:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8A2i3rQ052044; Wed, 10 Sep 2014 02:44:03 GMT (envelope-from jmmv@FreeBSD.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A2i3al052043; Wed, 10 Sep 2014 02:44:03 GMT (envelope-from jmmv@FreeBSD.org) Message-Id: <201409100244.s8A2i3al052043@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jmmv set sender to jmmv@FreeBSD.org using -f From: Julio Merino Date: Wed, 10 Sep 2014 02:44:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r271347 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 02:44:03 -0000 Author: jmmv Date: Wed Sep 10 02:44:02 2014 New Revision: 271347 URL: http://svnweb.freebsd.org/changeset/base/271347 Log: Release ngie from mentorship. Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Wed Sep 10 02:35:19 2014 (r271346) +++ svnadmin/conf/mentors Wed Sep 10 02:44:02 2014 (r271347) @@ -27,7 +27,6 @@ kadesai ken Co-mentor: scottl, ambrisk mahrens mckusick miwi rwatson monthadar adrian -ngie jmmv Co-mentor: rpaulo odeds jhb Co-mentor: alfred peterj jhb Co-mentor: grog pkelsey jmallett From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 03:54:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 320365A9; Wed, 10 Sep 2014 03:54:58 +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 03D1BDC7; Wed, 10 Sep 2014 03:54:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8A3svmd085174; Wed, 10 Sep 2014 03:54:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A3svO1085173; Wed, 10 Sep 2014 03:54:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409100354.s8A3svO1085173@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 10 Sep 2014 03:54:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271349 - head/tools/regression/lib/msun X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 03:54:58 -0000 Author: ngie Date: Wed Sep 10 03:54:57 2014 New Revision: 271349 URL: http://svnweb.freebsd.org/changeset/base/271349 Log: Add diagnostic printfs and disable test # 4 on i386 Reviewed by: jmmv, rpaulo MFC after: 3 days Phabric: D749 PR: 191676 Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/lib/msun/test-cexp.c Modified: head/tools/regression/lib/msun/test-cexp.c ============================================================================== --- head/tools/regression/lib/msun/test-cexp.c Wed Sep 10 03:13:40 2014 (r271348) +++ head/tools/regression/lib/msun/test-cexp.c Wed Sep 10 03:54:57 2014 (r271349) @@ -117,6 +117,7 @@ test_nan() /* cexp(x + NaNi) = NaN + NaNi and optionally raises invalid */ /* cexp(NaN + yi) = NaN + NaNi and optionally raises invalid (|y|>0) */ for (i = 0; i < N(finites); i++) { + printf("# Run %d..\n", i); testall(CMPLXL(finites[i], NAN), CMPLXL(NAN, NAN), ALL_STD_EXCEPT & ~FE_INVALID, 0, 0); if (finites[i] == 0.0) @@ -148,6 +149,7 @@ test_inf(void) /* cexp(x + inf i) = NaN + NaNi and raises invalid */ for (i = 0; i < N(finites); i++) { + printf("# Run %d..\n", i); testall(CMPLXL(finites[i], INFINITY), CMPLXL(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 1); } @@ -189,6 +191,7 @@ test_reals(void) for (i = 0; i < N(finites); i++) { /* XXX could check exceptions more meticulously */ + printf("# Run %d..\n", i); test(cexp, CMPLXL(finites[i], 0.0), CMPLXL(exp(finites[i]), 0.0), FE_INVALID | FE_DIVBYZERO, 0, 1); @@ -210,6 +213,7 @@ test_imaginaries(void) int i; for (i = 0; i < N(finites); i++) { + printf("# Run %d..\n", i); test(cexp, CMPLXL(0.0, finites[i]), CMPLXL(cos(finites[i]), sin(finites[i])), ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); @@ -241,6 +245,7 @@ test_small(void) int i; for (i = 0; i < N(tests); i += 4) { + printf("# Run %d..\n", i); a = tests[i]; b = tests[i + 1]; x = tests[i + 2]; @@ -297,8 +302,12 @@ main(int argc, char *argv[]) test_inf(); printf("ok 3 - cexp inf\n"); +#if defined(__i386__) + printf("not ok 4 - cexp reals # TODO: PR # 191676 fails assertion on i386\n"); +#else test_reals(); printf("ok 4 - cexp reals\n"); +#endif test_imaginaries(); printf("ok 5 - cexp imaginaries\n"); From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 05:44:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65EE9649; Wed, 10 Sep 2014 05:44: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 465529C9; Wed, 10 Sep 2014 05:44: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 s8A5iGPm035136; Wed, 10 Sep 2014 05:44:16 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A5iGQD035135; Wed, 10 Sep 2014 05:44:16 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201409100544.s8A5iGQD035135@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Wed, 10 Sep 2014 05:44:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271350 - head/sys/dev/nmdm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 05:44:16 -0000 Author: grehan Date: Wed Sep 10 05:44:15 2014 New Revision: 271350 URL: http://svnweb.freebsd.org/changeset/base/271350 Log: Fix issue with nmdm and leading zeros in device name. The nmdm code enforces a number between the 'nmdm' and 'A|B' portions of the device name. This is then used as a unit number, and sprintf'd back into the tty name. If leading zeros were used in the name, the created device name is different than the string used for the clone-open (e.g. /dev/nmdm0001A will result in /dev/nmdm1A). Since unit numbers are no longer required with the updated tty code, there seems to be no reason to force the string to be a number. The fix is to allow an arbitrary string between 'nmdm' and 'A|B', within the constraints of devfs names. This allows all existing user of numeric strings to continue to work, and also allows more meaningful names to be used, such as bhyve VM names. Tested on amd64, i386 and ppc64. Reported by: Dave Smith PR: 192281 Reviewed by: neel, glebius Phabric: D729 MFC after: 3 days Modified: head/sys/dev/nmdm/nmdm.c Modified: head/sys/dev/nmdm/nmdm.c ============================================================================== --- head/sys/dev/nmdm/nmdm.c Wed Sep 10 03:54:57 2014 (r271349) +++ head/sys/dev/nmdm/nmdm.c Wed Sep 10 05:44:15 2014 (r271350) @@ -157,21 +157,21 @@ nmdm_clone(void *arg, struct ucred *cred { struct nmdmsoftc *ns; struct tty *tp; - unsigned long unit; char *end; int error; + char endc; if (*dev != NULL) return; if (strncmp(name, "nmdm", 4) != 0) return; - - /* Device name must be "nmdm%lu%c", where %c is 'A' or 'B'. */ - name += 4; - unit = strtoul(name, &end, 10); - if (unit == ULONG_MAX || name == end) + if (strlen(name) <= strlen("nmdmX")) return; - if ((end[0] != 'A' && end[0] != 'B') || end[1] != '\0') + + /* Device name must be "nmdm%s%c", where %c is 'A' or 'B'. */ + end = name + strlen(name) - 1; + endc = *end; + if (endc != 'A' && endc != 'B') return; ns = malloc(sizeof(*ns), M_NMDM, M_WAITOK | M_ZERO); @@ -191,9 +191,11 @@ nmdm_clone(void *arg, struct ucred *cred /* Create device nodes. */ tp = ns->ns_part1.np_tty = tty_alloc_mutex(&nmdm_class, &ns->ns_part1, &ns->ns_mtx); - error = tty_makedevf(tp, NULL, end[0] == 'A' ? TTYMK_CLONING : 0, - "nmdm%luA", unit); + *end = 'A'; + error = tty_makedevf(tp, NULL, endc == 'A' ? TTYMK_CLONING : 0, + "%s", name); if (error) { + *end = endc; mtx_destroy(&ns->ns_mtx); free(ns, M_NMDM); return; @@ -201,9 +203,11 @@ nmdm_clone(void *arg, struct ucred *cred tp = ns->ns_part2.np_tty = tty_alloc_mutex(&nmdm_class, &ns->ns_part2, &ns->ns_mtx); - error = tty_makedevf(tp, NULL, end[0] == 'B' ? TTYMK_CLONING : 0, - "nmdm%luB", unit); + *end = 'B'; + error = tty_makedevf(tp, NULL, endc == 'B' ? TTYMK_CLONING : 0, + "%s", name); if (error) { + *end = endc; mtx_lock(&ns->ns_mtx); /* see nmdm_free() */ ns->ns_part1.np_other = NULL; @@ -212,11 +216,12 @@ nmdm_clone(void *arg, struct ucred *cred return; } - if (end[0] == 'A') + if (endc == 'A') *dev = ns->ns_part1.np_tty->t_dev; else *dev = ns->ns_part2.np_tty->t_dev; + *end = endc; atomic_add_int(&nmdm_count, 1); } From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 05:52:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBBE988A; Wed, 10 Sep 2014 05:52: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 B7B37AA3; Wed, 10 Sep 2014 05:52: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 s8A5qUJv039449; Wed, 10 Sep 2014 05:52:30 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A5qUjC039448; Wed, 10 Sep 2014 05:52:30 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201409100552.s8A5qUjC039448@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 10 Sep 2014 05:52:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271351 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 05:52:31 -0000 Author: alc Date: Wed Sep 10 05:52:30 2014 New Revision: 271351 URL: http://svnweb.freebsd.org/changeset/base/271351 Log: Fix a boundary case error in vm_reserv_alloc_contig(): If a reservation isn't being allocated for the last of the requested pages, because a reservation won't fit in the gap between allocated pages, then the reservation structure shouldn't be initialized. While I'm here, improve the nearby comments. Reported by: jeff, pho MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/sys/vm/vm_reserv.c Modified: head/sys/vm/vm_reserv.c ============================================================================== --- head/sys/vm/vm_reserv.c Wed Sep 10 05:44:15 2014 (r271350) +++ head/sys/vm/vm_reserv.c Wed Sep 10 05:52:30 2014 (r271351) @@ -364,7 +364,7 @@ vm_reserv_populate(vm_reserv_t rv, int i /* * Allocates a contiguous set of physical pages of the given size "npages" - * from an existing or newly-created reservation. All of the physical pages + * from existing or newly created reservations. All of the physical pages * must be at or above the given physical address "low" and below the given * physical address "high". The given value "alignment" determines the * alignment of the first physical page in the set. If the given value @@ -436,8 +436,8 @@ vm_reserv_alloc_contig(vm_object_t objec /* * Could at least one reservation fit between the first index to the - * left that can be used and the first index to the right that cannot - * be used? + * left that can be used ("leftcap") and the first index to the right + * that cannot be used ("rightcap")? */ first = pindex - VM_RESERV_INDEX(object, pindex); if (mpred != NULL) { @@ -459,6 +459,13 @@ vm_reserv_alloc_contig(vm_object_t objec if (first + maxpages > rightcap) { if (maxpages == VM_LEVEL_0_NPAGES) return (NULL); + + /* + * At least one reservation will fit between "leftcap" + * and "rightcap". However, a reservation for the + * last of the requested pages will not fit. Reduce + * the size of the upcoming allocation accordingly. + */ allocpages = minpages; } } @@ -482,16 +489,23 @@ vm_reserv_alloc_contig(vm_object_t objec } /* - * Allocate and populate the new reservations. The alignment and - * boundary specified for this allocation may be different from the - * alignment and boundary specified for the requested pages. For - * instance, the specified index may not be the first page within the - * first new reservation. + * Allocate the physical pages. The alignment and boundary specified + * for this allocation may be different from the alignment and + * boundary specified for the requested pages. For instance, the + * specified index may not be the first page within the first new + * reservation. */ m = vm_phys_alloc_contig(allocpages, low, high, ulmax(alignment, VM_LEVEL_0_SIZE), boundary > VM_LEVEL_0_SIZE ? boundary : 0); if (m == NULL) return (NULL); + + /* + * The allocated physical pages always begin at a reservation + * boundary, but they do not always end at a reservation boundary. + * Initialize every reservation that is completely covered by the + * allocated physical pages. + */ m_ret = NULL; index = VM_RESERV_INDEX(object, pindex); do { @@ -525,7 +539,7 @@ vm_reserv_alloc_contig(vm_object_t objec m += VM_LEVEL_0_NPAGES; first += VM_LEVEL_0_NPAGES; allocpages -= VM_LEVEL_0_NPAGES; - } while (allocpages > 0); + } while (allocpages >= VM_LEVEL_0_NPAGES); return (m_ret); /* From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 06:25:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6665163; Wed, 10 Sep 2014 06:25:18 +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 D20C4DDE; Wed, 10 Sep 2014 06:25:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8A6PIJP053694; Wed, 10 Sep 2014 06:25:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A6PIhQ053693; Wed, 10 Sep 2014 06:25:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409100625.s8A6PIhQ053693@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 10 Sep 2014 06:25:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271352 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 06:25:19 -0000 Author: mav Date: Wed Sep 10 06:25:18 2014 New Revision: 271352 URL: http://svnweb.freebsd.org/changeset/base/271352 Log: Fix minor buffer overflow reported by Coverity. CID: 1006781 Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Wed Sep 10 05:52:30 2014 (r271351) +++ head/sys/cam/ctl/ctl.c Wed Sep 10 06:25:18 2014 (r271352) @@ -10584,24 +10584,28 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio */ if (lun == NULL || (val = ctl_get_opt(&lun->be_lun->options, "vendor")) == NULL) { - strcpy(inq_ptr->vendor, CTL_VENDOR); + strncpy(inq_ptr->vendor, CTL_VENDOR, sizeof(inq_ptr->vendor)); } else { memset(inq_ptr->vendor, ' ', sizeof(inq_ptr->vendor)); strncpy(inq_ptr->vendor, val, min(sizeof(inq_ptr->vendor), strlen(val))); } if (lun == NULL) { - strcpy(inq_ptr->product, CTL_DIRECT_PRODUCT); + strncpy(inq_ptr->product, CTL_DIRECT_PRODUCT, + sizeof(inq_ptr->product)); } else if ((val = ctl_get_opt(&lun->be_lun->options, "product")) == NULL) { switch (lun->be_lun->lun_type) { case T_DIRECT: - strcpy(inq_ptr->product, CTL_DIRECT_PRODUCT); + strncpy(inq_ptr->product, CTL_DIRECT_PRODUCT, + sizeof(inq_ptr->product)); break; case T_PROCESSOR: - strcpy(inq_ptr->product, CTL_PROCESSOR_PRODUCT); + strncpy(inq_ptr->product, CTL_PROCESSOR_PRODUCT, + sizeof(inq_ptr->product)); break; default: - strcpy(inq_ptr->product, CTL_UNKNOWN_PRODUCT); + strncpy(inq_ptr->product, CTL_UNKNOWN_PRODUCT, + sizeof(inq_ptr->product)); break; } } else { From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 06:29:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E72A30D; Wed, 10 Sep 2014 06:29: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 2ACEDE05; Wed, 10 Sep 2014 06:29: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 s8A6TW24054218; Wed, 10 Sep 2014 06:29:32 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A6TWlf054217; Wed, 10 Sep 2014 06:29:32 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409100629.s8A6TWlf054217@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 10 Sep 2014 06:29:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271353 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 06:29:32 -0000 Author: mav Date: Wed Sep 10 06:29:31 2014 New Revision: 271353 URL: http://svnweb.freebsd.org/changeset/base/271353 Log: Fix memory leak on error, reported by Coverity. CID: 1007773 Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Wed Sep 10 06:25:18 2014 (r271352) +++ head/sys/cam/ctl/ctl.c Wed Sep 10 06:29:31 2014 (r271353) @@ -2899,6 +2899,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, lun = softc->ctl_luns[err_desc->lun_id]; if (lun == NULL) { mtx_unlock(&softc->ctl_lock); + free(new_err_desc, M_CTL); printf("%s: CTL_ERROR_INJECT: invalid LUN %ju\n", __func__, (uintmax_t)err_desc->lun_id); retval = EINVAL; From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 06:35:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 102B7551; Wed, 10 Sep 2014 06:35:01 +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 F0217ED1; Wed, 10 Sep 2014 06:35:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8A6Z0hw058327; Wed, 10 Sep 2014 06:35:00 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A6Z07g058326; Wed, 10 Sep 2014 06:35:00 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409100635.s8A6Z07g058326@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 10 Sep 2014 06:35:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271354 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 06:35:01 -0000 Author: mav Date: Wed Sep 10 06:35:00 2014 New Revision: 271354 URL: http://svnweb.freebsd.org/changeset/base/271354 Log: Fix couple off-by-one range check errors, reported by Coverity. CID: 1007837 Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Wed Sep 10 06:29:31 2014 (r271353) +++ head/sys/cam/ctl/ctl.c Wed Sep 10 06:35:00 2014 (r271354) @@ -2543,7 +2543,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, mtx_lock(&softc->ctl_lock); if (((ooa_hdr->flags & CTL_OOA_FLAG_ALL_LUNS) == 0) - && ((ooa_hdr->lun_num > CTL_MAX_LUNS) + && ((ooa_hdr->lun_num >= CTL_MAX_LUNS) || (softc->ctl_luns[ooa_hdr->lun_num] == NULL))) { mtx_unlock(&softc->ctl_lock); free(entries, M_CTL); @@ -2738,7 +2738,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, #ifdef CTL_IO_DELAY mtx_lock(&softc->ctl_lock); - if ((delay_info->lun_id > CTL_MAX_LUNS) + if ((delay_info->lun_id >= CTL_MAX_LUNS) || (softc->ctl_luns[delay_info->lun_id] == NULL)) { delay_info->status = CTL_DELAY_STATUS_INVALID_LUN; } else { From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 06:48:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31A4BB63; Wed, 10 Sep 2014 06:48:24 +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 1C945FE5; Wed, 10 Sep 2014 06:48:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8A6mNtT063514; Wed, 10 Sep 2014 06:48:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A6mNcL063513; Wed, 10 Sep 2014 06:48:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201409100648.s8A6mNcL063513@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 10 Sep 2014 06:48:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271355 - stable/10/sys/dev/usb/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 06:48:24 -0000 Author: hselasky Date: Wed Sep 10 06:48:23 2014 New Revision: 271355 URL: http://svnweb.freebsd.org/changeset/base/271355 Log: MFC r270992: Fix logical error. Approved by: re, glebius Modified: stable/10/sys/dev/usb/net/if_aue.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/net/if_aue.c ============================================================================== --- stable/10/sys/dev/usb/net/if_aue.c Wed Sep 10 06:35:00 2014 (r271354) +++ stable/10/sys/dev/usb/net/if_aue.c Wed Sep 10 06:48:23 2014 (r271355) @@ -745,7 +745,7 @@ aue_intr_callback(struct usb_xfer *xfer, if (pkt.aue_txstat0) ifp->if_oerrors++; - if (pkt.aue_txstat0 & (AUE_TXSTAT0_LATECOLL & + if (pkt.aue_txstat0 & (AUE_TXSTAT0_LATECOLL | AUE_TXSTAT0_EXCESSCOLL)) ifp->if_collisions++; } From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 06:54:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D753E51; Wed, 10 Sep 2014 06:54: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 0854F143; Wed, 10 Sep 2014 06:54: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 s8A6s5dn067537; Wed, 10 Sep 2014 06:54:05 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A6s5CF067536; Wed, 10 Sep 2014 06:54:05 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201409100654.s8A6s5CF067536@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 10 Sep 2014 06:54: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: r271356 - stable/9/sys/dev/usb/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 06:54:06 -0000 Author: hselasky Date: Wed Sep 10 06:54:05 2014 New Revision: 271356 URL: http://svnweb.freebsd.org/changeset/base/271356 Log: MFC r270992: Fix logical error. Modified: stable/9/sys/dev/usb/net/if_aue.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/net/if_aue.c ============================================================================== --- stable/9/sys/dev/usb/net/if_aue.c Wed Sep 10 06:48:23 2014 (r271355) +++ stable/9/sys/dev/usb/net/if_aue.c Wed Sep 10 06:54:05 2014 (r271356) @@ -745,7 +745,7 @@ aue_intr_callback(struct usb_xfer *xfer, if (pkt.aue_txstat0) ifp->if_oerrors++; - if (pkt.aue_txstat0 & (AUE_TXSTAT0_LATECOLL & + if (pkt.aue_txstat0 & (AUE_TXSTAT0_LATECOLL | AUE_TXSTAT0_EXCESSCOLL)) ifp->if_collisions++; } From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 06:56:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6017DFAF; Wed, 10 Sep 2014 06:56:10 +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 4B3CB156; Wed, 10 Sep 2014 06:56:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8A6uAJH067921; Wed, 10 Sep 2014 06:56:10 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A6uAtn067920; Wed, 10 Sep 2014 06:56:10 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201409100656.s8A6uAtn067920@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 10 Sep 2014 06:56:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r271357 - stable/8/sys/dev/usb/net X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 06:56:10 -0000 Author: hselasky Date: Wed Sep 10 06:56:09 2014 New Revision: 271357 URL: http://svnweb.freebsd.org/changeset/base/271357 Log: MFC r270992: Fix logical error. Modified: stable/8/sys/dev/usb/net/if_aue.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/net/if_aue.c ============================================================================== --- stable/8/sys/dev/usb/net/if_aue.c Wed Sep 10 06:54:05 2014 (r271356) +++ stable/8/sys/dev/usb/net/if_aue.c Wed Sep 10 06:56:09 2014 (r271357) @@ -747,7 +747,7 @@ aue_intr_callback(struct usb_xfer *xfer, if (pkt.aue_txstat0) ifp->if_oerrors++; - if (pkt.aue_txstat0 & (AUE_TXSTAT0_LATECOLL & + if (pkt.aue_txstat0 & (AUE_TXSTAT0_LATECOLL | AUE_TXSTAT0_EXCESSCOLL)) ifp->if_collisions++; } From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 06:56:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55D33166; Wed, 10 Sep 2014 06:56: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 41EE8162; Wed, 10 Sep 2014 06:56: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 s8A6ukUG068039; Wed, 10 Sep 2014 06:56:46 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A6uk4k068038; Wed, 10 Sep 2014 06:56:46 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409100656.s8A6uk4k068038@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 10 Sep 2014 06:56:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271358 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 06:56:46 -0000 Author: mav Date: Wed Sep 10 06:56:45 2014 New Revision: 271358 URL: http://svnweb.freebsd.org/changeset/base/271358 Log: Fix array overrun, reported by Coverity. CID: 1229970 Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Wed Sep 10 06:56:09 2014 (r271357) +++ head/sys/cam/ctl/ctl.c Wed Sep 10 06:56:45 2014 (r271358) @@ -7963,7 +7963,8 @@ retry: scsi_ulto2b(i / CTL_MAX_INIT_PER_PORT, res_desc->rel_trgt_port_id); len = 0; - port = softc->ctl_ports[i / CTL_MAX_INIT_PER_PORT]; + port = softc->ctl_ports[ + ctl_port_idx(i / CTL_MAX_INIT_PER_PORT)]; if (port != NULL) len = ctl_create_iid(port, i % CTL_MAX_INIT_PER_PORT, From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 06:57:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42BB42A7; Wed, 10 Sep 2014 06:57:25 +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 2DCCE16B; Wed, 10 Sep 2014 06:57:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8A6vPbR068181; Wed, 10 Sep 2014 06:57:25 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A6vORY068177; Wed, 10 Sep 2014 06:57:24 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201409100657.s8A6vORY068177@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 10 Sep 2014 06:57:24 +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: r271359 - in stable/9/sys/dev/usb: . quirk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 06:57:25 -0000 Author: hselasky Date: Wed Sep 10 06:57:24 2014 New Revision: 271359 URL: http://svnweb.freebsd.org/changeset/base/271359 Log: MFC r271017 and r271018: Add new quirk. PR: 193279 Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/9/sys/dev/usb/quirk/usb_quirk.c Wed Sep 10 06:56:45 2014 (r271358) +++ stable/9/sys/dev/usb/quirk/usb_quirk.c Wed Sep 10 06:57:24 2014 (r271359) @@ -130,6 +130,8 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(MICROSOFT, WLINTELLIMOUSE, 0x0000, 0xffff, UQ_MS_LEADING_BYTE), /* Quirk for Corsair Vengeance K60 keyboard */ USB_QUIRK(CORSAIR, K60, 0x0000, 0xffff, UQ_KBD_BOOTPROTO), + /* Quirk for Corsair Vengeance K70 keyboard */ + USB_QUIRK(CORSAIR, K70, 0x0000, 0xffff, UQ_KBD_BOOTPROTO), /* umodem(4) device quirks */ USB_QUIRK(METRICOM, RICOCHET_GS, 0x100, 0x100, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(SANYO, SCP4900, 0x000, 0x000, UQ_ASSUME_CM_OVER_DATA), Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Wed Sep 10 06:56:45 2014 (r271358) +++ stable/9/sys/dev/usb/usbdevs Wed Sep 10 06:57:24 2014 (r271359) @@ -1483,6 +1483,7 @@ product COREGA FETHER_USB_TXC 0x9601 FEt /* Corsair products */ product CORSAIR K60 0x0a60 Corsair Vengeance K60 keyboard +product CORSAIR K70 0x1b09 Corsair Vengeance K70 keyboard /* Creative products */ product CREATIVE NOMAD_II 0x1002 Nomad II MP3 player From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 07:00:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78EAB693; Wed, 10 Sep 2014 07:00: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 653421A9; Wed, 10 Sep 2014 07:00: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 s8A70bfr069922; Wed, 10 Sep 2014 07:00:37 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A70b3Y069921; Wed, 10 Sep 2014 07:00:37 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409100700.s8A70b3Y069921@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 10 Sep 2014 07:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271360 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 07:00:37 -0000 Author: mav Date: Wed Sep 10 07:00:36 2014 New Revision: 271360 URL: http://svnweb.freebsd.org/changeset/base/271360 Log: Remove uninitialized and unused variable, reported by Coverity. CID: 1230015 Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Wed Sep 10 06:57:24 2014 (r271359) +++ head/sys/cam/ctl/ctl.c Wed Sep 10 07:00:36 2014 (r271360) @@ -12021,12 +12021,11 @@ ctl_lun_reset(struct ctl_lun *lun, union return (0); } -static int +static void ctl_abort_tasks_lun(struct ctl_lun *lun, uint32_t targ_port, uint32_t init_id, int other_sc) { union ctl_io *xio; - int found; mtx_assert(&lun->lun_lock, MA_OWNED); @@ -12048,7 +12047,6 @@ ctl_abort_tasks_lun(struct ctl_lun *lun, init_id != xio->io_hdr.nexus.initid.id) xio->io_hdr.flags |= CTL_FLAG_ABORT_STATUS; xio->io_hdr.flags |= CTL_FLAG_ABORT; - found = 1; if (!other_sc && !(lun->flags & CTL_LUN_PRIMARY_SC)) { union ctl_ha_msg msg_info; @@ -12064,7 +12062,6 @@ ctl_abort_tasks_lun(struct ctl_lun *lun, } } } - return (found); } static int From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 07:15:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD8CC9BF; Wed, 10 Sep 2014 07:15:24 +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 AF26F378; Wed, 10 Sep 2014 07:15:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8A7FOOd077563; Wed, 10 Sep 2014 07:15:24 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A7FO39077561; Wed, 10 Sep 2014 07:15:24 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201409100715.s8A7FO39077561@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 10 Sep 2014 07:15:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r271361 - in stable/8/sys/dev/usb: . quirk X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 07:15:25 -0000 Author: hselasky Date: Wed Sep 10 07:15:23 2014 New Revision: 271361 URL: http://svnweb.freebsd.org/changeset/base/271361 Log: MFC r239298, r271017 and r271018: Add new quirk. PR: 193279 Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/8/sys/dev/usb/quirk/usb_quirk.c Wed Sep 10 07:00:36 2014 (r271360) +++ stable/8/sys/dev/usb/quirk/usb_quirk.c Wed Sep 10 07:15:23 2014 (r271361) @@ -126,6 +126,10 @@ static struct usb_quirk_entry usb_quirks /* MS keyboards do weird things */ USB_QUIRK(MICROSOFT, NATURAL4000, 0x0000, 0xFFFF, UQ_KBD_BOOTPROTO), USB_QUIRK(MICROSOFT, WLINTELLIMOUSE, 0x0000, 0xffff, UQ_MS_LEADING_BYTE), + /* Quirk for Corsair Vengeance K60 keyboard */ + USB_QUIRK(CORSAIR, K60, 0x0000, 0xffff, UQ_KBD_BOOTPROTO), + /* Quirk for Corsair Vengeance K70 keyboard */ + USB_QUIRK(CORSAIR, K70, 0x0000, 0xffff, UQ_KBD_BOOTPROTO), /* umodem(4) device quirks */ USB_QUIRK(METRICOM, RICOCHET_GS, 0x100, 0x100, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(SANYO, SCP4900, 0x000, 0x000, UQ_ASSUME_CM_OVER_DATA), Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Wed Sep 10 07:00:36 2014 (r271360) +++ stable/8/sys/dev/usb/usbdevs Wed Sep 10 07:15:23 2014 (r271361) @@ -1483,6 +1483,7 @@ product COREGA FETHER_USB_TXC 0x9601 FEt /* Corsair products */ product CORSAIR K60 0x0a60 Corsair Vengeance K60 keyboard +product CORSAIR K70 0x1b09 Corsair Vengeance K70 keyboard /* Creative products */ product CREATIVE NOMAD_II 0x1002 Nomad II MP3 player From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 07:16:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C30DB37; Wed, 10 Sep 2014 07:16:18 +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 F28FA38D; Wed, 10 Sep 2014 07:16:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8A7GHSC077739; Wed, 10 Sep 2014 07:16:17 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A7GHI9077737; Wed, 10 Sep 2014 07:16:17 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409100716.s8A7GHI9077737@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 10 Sep 2014 07:16:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271362 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 07:16:18 -0000 Author: mav Date: Wed Sep 10 07:16:17 2014 New Revision: 271362 URL: http://svnweb.freebsd.org/changeset/base/271362 Log: Make ctl_port_mask an array to support more then 32 ports. Overflow reported by Coverity. CID: 1229894 MFC after: 3 days Modified: head/sys/cam/ctl/ctl_frontend.c head/sys/cam/ctl/ctl_private.h Modified: head/sys/cam/ctl/ctl_frontend.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend.c Wed Sep 10 07:15:23 2014 (r271361) +++ head/sys/cam/ctl/ctl_frontend.c Wed Sep 10 07:16:17 2014 (r271362) @@ -147,9 +147,9 @@ ctl_port_register(struct ctl_port *port, KASSERT(control_softc != NULL, ("CTL is not initialized")); mtx_lock(&control_softc->ctl_lock); - port_num = ctl_ffz(&control_softc->ctl_port_mask, CTL_MAX_PORTS); + port_num = ctl_ffz(control_softc->ctl_port_mask, CTL_MAX_PORTS); if ((port_num == -1) - || (ctl_set_mask(&control_softc->ctl_port_mask, port_num) == -1)) { + || (ctl_set_mask(control_softc->ctl_port_mask, port_num) == -1)) { port->targ_port = -1; mtx_unlock(&control_softc->ctl_lock); return (1); @@ -183,7 +183,7 @@ ctl_port_register(struct ctl_port *port, error: port->targ_port = -1; mtx_lock(&control_softc->ctl_lock); - ctl_clear_mask(&control_softc->ctl_port_mask, port_num); + ctl_clear_mask(control_softc->ctl_port_mask, port_num); mtx_unlock(&control_softc->ctl_lock); return (retval); } @@ -223,7 +223,7 @@ ctl_port_deregister(struct ctl_port *por control_softc->num_ports--; port_num = (port->targ_port < CTL_MAX_PORTS) ? port->targ_port : port->targ_port - CTL_MAX_PORTS; - ctl_clear_mask(&control_softc->ctl_port_mask, port_num); + ctl_clear_mask(control_softc->ctl_port_mask, port_num); control_softc->ctl_ports[port_num] = NULL; mtx_unlock(&control_softc->ctl_lock); Modified: head/sys/cam/ctl/ctl_private.h ============================================================================== --- head/sys/cam/ctl/ctl_private.h Wed Sep 10 07:15:23 2014 (r271361) +++ head/sys/cam/ctl/ctl_private.h Wed Sep 10 07:16:17 2014 (r271362) @@ -441,9 +441,9 @@ struct ctl_softc { struct ctl_io_pool *othersc_pool; struct proc *ctl_proc; int targ_online; - uint32_t ctl_lun_mask[CTL_MAX_LUNS >> 5]; + uint32_t ctl_lun_mask[(CTL_MAX_LUNS + 31) / 32]; struct ctl_lun *ctl_luns[CTL_MAX_LUNS]; - uint32_t ctl_port_mask; + uint32_t ctl_port_mask[(CTL_MAX_PORTS + 31) / 32]; uint64_t aps_locked_lun; STAILQ_HEAD(, ctl_lun) lun_list; STAILQ_HEAD(, ctl_be_lun) pending_lun_queue; From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 07:19:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4FDA0CE3; Wed, 10 Sep 2014 07:19: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 3AF563DA; Wed, 10 Sep 2014 07:19: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 s8A7J921078129; Wed, 10 Sep 2014 07:19:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A7J9v8078128; Wed, 10 Sep 2014 07:19:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201409100719.s8A7J9v8078128@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 10 Sep 2014 07:19: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: r271363 - stable/9/sys/dev/sound/usb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 07:19:09 -0000 Author: hselasky Date: Wed Sep 10 07:19:08 2014 New Revision: 271363 URL: http://svnweb.freebsd.org/changeset/base/271363 Log: MFC r271218: Update mixer description for FastTrackPro. Modified: stable/9/sys/dev/sound/usb/uaudio.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/9/sys/dev/sound/usb/uaudio.c Wed Sep 10 07:16:17 2014 (r271362) +++ stable/9/sys/dev/sound/usb/uaudio.c Wed Sep 10 07:19:08 2014 (r271363) @@ -2730,14 +2730,14 @@ uaudio_mixer_controls_create_ftu(struct uaudio_mixer_add_ctl(sc, &MIX(sc)); - MIX(sc).wValue[0] = MAKE_WORD(9, chy + 1); + MIX(sc).wValue[0] = MAKE_WORD(9, chy + 1 + 8); MIX(sc).type = MIX_SIGNED_16; MIX(sc).ctl = SOUND_MIXER_NRDEVICES; MIX(sc).name = "effect_send"; MIX(sc).nchan = 1; MIX(sc).update[0] = 1; snprintf(MIX(sc).desc, sizeof(MIX(sc).desc), - "Effect Send DIn%d Volume", chy + 1 + 8); + "Effect Send DIn%d Volume", chy + 1); uaudio_mixer_add_ctl(sc, &MIX(sc)); } From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 07:20:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 92147E2A; Wed, 10 Sep 2014 07:20: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 7CEFE3EB; Wed, 10 Sep 2014 07:20: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 s8A7KUn1078988; Wed, 10 Sep 2014 07:20:30 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A7KUEl078987; Wed, 10 Sep 2014 07:20:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201409100720.s8A7KUEl078987@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 10 Sep 2014 07:20:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r271364 - stable/8/sys/dev/sound/usb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 07:20:30 -0000 Author: hselasky Date: Wed Sep 10 07:20:29 2014 New Revision: 271364 URL: http://svnweb.freebsd.org/changeset/base/271364 Log: MFC r271218: Update mixer description for FastTrackPro. Modified: stable/8/sys/dev/sound/usb/uaudio.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/usb/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio.c Wed Sep 10 07:19:08 2014 (r271363) +++ stable/8/sys/dev/sound/usb/uaudio.c Wed Sep 10 07:20:29 2014 (r271364) @@ -2730,14 +2730,14 @@ uaudio_mixer_controls_create_ftu(struct uaudio_mixer_add_ctl(sc, &MIX(sc)); - MIX(sc).wValue[0] = MAKE_WORD(9, chy + 1); + MIX(sc).wValue[0] = MAKE_WORD(9, chy + 1 + 8); MIX(sc).type = MIX_SIGNED_16; MIX(sc).ctl = SOUND_MIXER_NRDEVICES; MIX(sc).name = "effect_send"; MIX(sc).nchan = 1; MIX(sc).update[0] = 1; snprintf(MIX(sc).desc, sizeof(MIX(sc).desc), - "Effect Send DIn%d Volume", chy + 1 + 8); + "Effect Send DIn%d Volume", chy + 1); uaudio_mixer_add_ctl(sc, &MIX(sc)); } From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 07:33:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D92F42A3; Wed, 10 Sep 2014 07:33:50 +0000 (UTC) Received: from mail-lb0-x235.google.com (mail-lb0-x235.google.com [IPv6:2a00:1450:4010:c04::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D4508806; Wed, 10 Sep 2014 07:33:49 +0000 (UTC) Received: by mail-lb0-f181.google.com with SMTP id z11so6665055lbi.26 for ; Wed, 10 Sep 2014 00:33:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=f1F6o0qzgYlKxUKSk2MKnps76sgHKcH7reFNYBuaVRU=; b=iqAdHvv6ng/SC7ldwySZ4Dz4cfDqpMy5keD0BLhpjl+AW/E6cPbVUCQjjUph6qzQtT uI/VetYha/AB2Ub6q1Ay5SV4IsT3ByTxSq3DOUIqLFjdlInPaSFZdaXpWtYoJgx5vWCj VtADNtKV869IVPGhB5oTSPkg2KpAFjOjwXfqABoHLSbEzE2c4b8CBiNXilW2K1LHcFv7 bNzq2Jn3NvolbigYRSQpw5tk8y2DlVMkLwYPnDIoQpBFEqdNAUHgOrVluufEUzGnjUS/ qMvD0cwOomLWNUoXpOp2SfIU7I2dUEC1eBXEU6o69raIl84giKCrrjKX7tVTfQ6BSXSh 2aEA== MIME-Version: 1.0 X-Received: by 10.112.114.202 with SMTP id ji10mr1019684lbb.92.1410334427212; Wed, 10 Sep 2014 00:33:47 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.22.72 with HTTP; Wed, 10 Sep 2014 00:33:47 -0700 (PDT) In-Reply-To: <201409100544.s8A5iGQD035135@svn.freebsd.org> References: <201409100544.s8A5iGQD035135@svn.freebsd.org> Date: Wed, 10 Sep 2014 00:33:47 -0700 X-Google-Sender-Auth: Gn1qc672T05q139Jzd0WRwCu5hA Message-ID: Subject: Re: svn commit: r271350 - head/sys/dev/nmdm From: Craig Rodrigues To: Peter Grehan Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 07:33:51 -0000 On Tue, Sep 9, 2014 at 10:44 PM, Peter Grehan wrote: > Author: grehan > Date: Wed Sep 10 05:44:15 2014 > New Revision: 271350 > URL: http://svnweb.freebsd.org/changeset/base/271350 > > Log: > Fix issue with nmdm and leading zeros in device name. > > The nmdm code enforces a number between the 'nmdm' and 'A|B' portions > of the device name. This is then used as a unit number, and sprintf'd > back into the tty name. If leading zeros were used in the name, > the created device name is different than the string used for the > clone-open (e.g. /dev/nmdm0001A will result in /dev/nmdm1A). > > Since unit numbers are no longer required with the updated tty > code, there seems to be no reason to force the string to be a > number. The fix is to allow an arbitrary string between > 'nmdm' and 'A|B', within the constraints of devfs names. This allows > all existing user of numeric strings to continue to work, and also > allows more meaningful names to be used, such as bhyve VM names. > > Tested on amd64, i386 and ppc64. > > Reported by: Dave Smith > PR: 192281 > Reviewed by: neel, glebius > Phabric: D729 > MFC after: 3 days > > This works quite well. I've created this nmdm device: crw------- 1 root wheel 0x87 Sep 10 07:30 /dev/nmdmscan-ci.FreeBSD.orgB and it works. This is very handy for encoding the name of the bhyve VM in the nmdm device entry. Thanks! -- Craig From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 07:55:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D84E967; Wed, 10 Sep 2014 07:55: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 69470A09; Wed, 10 Sep 2014 07:55: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 s8A7tqej096416; Wed, 10 Sep 2014 07:55:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A7tqh0096415; Wed, 10 Sep 2014 07:55:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409100755.s8A7tqh0096415@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 10 Sep 2014 07:55:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271365 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 07:55:52 -0000 Author: ngie Date: Wed Sep 10 07:55:51 2014 New Revision: 271365 URL: http://svnweb.freebsd.org/changeset/base/271365 Log: Remove many false positives with make checkdpadd - Reduce DPADD and LDADD in checkdpadd to -l - Skip over -Wl,[es]*-group because -Wl,--end-group and -Wl,--start-group might be required to properly link objects (see usr.bin/clang/lldb as an example) This caveat has been present for a while with some components of the build. However, these false positives were made more more apparent after r269648. Phabric: D635 Reviewed by: jmmv (an earlier version) PR: 192730 MFC after: 2 weeks Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Wed Sep 10 07:20:29 2014 (r271364) +++ head/share/mk/bsd.dep.mk Wed Sep 10 07:55:51 2014 (r271365) @@ -215,8 +215,10 @@ cleandepend: .endif .if !target(checkdpadd) && (defined(DPADD) || defined(LDADD)) -_LDADD_FROM_DPADD= ${DPADD:C;^/usr/lib/lib(.*)\.a$;-l\1;} -_LDADD_CANONICALIZED= ${LDADD:S/$//} +_LDADD_FROM_DPADD= ${DPADD:R:T:C;^lib(.*)$;-l\1;g} +# Ignore -Wl,--start-group/-Wl,--end-group as it might be required in the +# LDADD list due to unresolved symbols +_LDADD_CANONICALIZED= ${LDADD:N:R:T:C;^lib(.*)$;-l\1;g:N-Wl,--[es]*-group} checkdpadd: .if ${_LDADD_FROM_DPADD} != ${_LDADD_CANONICALIZED} @echo ${.CURDIR} From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 08:06:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C1AD7E; Wed, 10 Sep 2014 08:06: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 27F39B36; Wed, 10 Sep 2014 08:06: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 s8A86WSF001715; Wed, 10 Sep 2014 08:06:32 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A86WeS001714; Wed, 10 Sep 2014 08:06:32 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409100806.s8A86WeS001714@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 10 Sep 2014 08:06:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271366 - head/usr.sbin/iscsid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 08:06:32 -0000 Author: mav Date: Wed Sep 10 08:06:31 2014 New Revision: 271366 URL: http://svnweb.freebsd.org/changeset/base/271366 Log: Fix memory leak, reported by Coverity. CID: 1229996 Modified: head/usr.sbin/iscsid/login.c Modified: head/usr.sbin/iscsid/login.c ============================================================================== --- head/usr.sbin/iscsid/login.c Wed Sep 10 07:55:51 2014 (r271365) +++ head/usr.sbin/iscsid/login.c Wed Sep 10 08:06:31 2014 (r271366) @@ -213,6 +213,7 @@ login_handle_redirection(struct connecti log_debugx("received redirection to \"%s\"", target_address); kernel_modify(conn, target_address); + keys_delete(response_keys); } static struct pdu * From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 09:40:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F134171B; Wed, 10 Sep 2014 09:40:51 +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 DC082153F; Wed, 10 Sep 2014 09:40:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8A9epgf046924; Wed, 10 Sep 2014 09:40:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A9ep63046922; Wed, 10 Sep 2014 09:40:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201409100940.s8A9ep63046922@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 10 Sep 2014 09:40:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271370 - in stable/10/sys/dev/usb: . quirk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 09:40:52 -0000 Author: hselasky Date: Wed Sep 10 09:40:51 2014 New Revision: 271370 URL: http://svnweb.freebsd.org/changeset/base/271370 Log: MFC r271017 and r271018: Add new quirk. PR: 193279 Approved by: re, marius Modified: stable/10/sys/dev/usb/quirk/usb_quirk.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/10/sys/dev/usb/quirk/usb_quirk.c Wed Sep 10 09:37:55 2014 (r271369) +++ stable/10/sys/dev/usb/quirk/usb_quirk.c Wed Sep 10 09:40:51 2014 (r271370) @@ -130,6 +130,8 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(MICROSOFT, WLINTELLIMOUSE, 0x0000, 0xffff, UQ_MS_LEADING_BYTE), /* Quirk for Corsair Vengeance K60 keyboard */ USB_QUIRK(CORSAIR, K60, 0x0000, 0xffff, UQ_KBD_BOOTPROTO), + /* Quirk for Corsair Vengeance K70 keyboard */ + USB_QUIRK(CORSAIR, K70, 0x0000, 0xffff, UQ_KBD_BOOTPROTO), /* umodem(4) device quirks */ USB_QUIRK(METRICOM, RICOCHET_GS, 0x100, 0x100, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(SANYO, SCP4900, 0x000, 0x000, UQ_ASSUME_CM_OVER_DATA), Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Wed Sep 10 09:37:55 2014 (r271369) +++ stable/10/sys/dev/usb/usbdevs Wed Sep 10 09:40:51 2014 (r271370) @@ -1486,6 +1486,7 @@ product COREGA FETHER_USB_TXC 0x9601 FEt /* Corsair products */ product CORSAIR K60 0x0a60 Corsair Vengeance K60 keyboard +product CORSAIR K70 0x1b09 Corsair Vengeance K70 keyboard /* Creative products */ product CREATIVE NOMAD_II 0x1002 Nomad II MP3 player From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 09:47:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BCDBFAC4; Wed, 10 Sep 2014 09:47:17 +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 A7E2B1636; Wed, 10 Sep 2014 09:47:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8A9lHwo048975; Wed, 10 Sep 2014 09:47:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A9lHWH048973; Wed, 10 Sep 2014 09:47:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409100947.s8A9lHWH048973@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 10 Sep 2014 09:47: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: r271372 - in stable/10/sys: kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 09:47:18 -0000 Author: kib Date: Wed Sep 10 09:47:16 2014 New Revision: 271372 URL: http://svnweb.freebsd.org/changeset/base/271372 Log: MFC r271000: Delay the return from thread_single(SINGLE_EXIT) until all threads are really destroyed by thread_stash() after the last switch out. MFC r271007: Retire thread_unthread(). MFC r271008: Style. Approved by: re (marius) Modified: stable/10/sys/kern/kern_thread.c stable/10/sys/sys/proc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_thread.c ============================================================================== --- stable/10/sys/kern/kern_thread.c Wed Sep 10 09:42:10 2014 (r271371) +++ stable/10/sys/kern/kern_thread.c Wed Sep 10 09:47:16 2014 (r271372) @@ -433,6 +433,7 @@ thread_exit(void) */ if (p->p_flag & P_HADTHREADS) { if (p->p_numthreads > 1) { + atomic_add_int(&td->td_proc->p_exitthreads, 1); thread_unlink(td); td2 = FIRST_THREAD_IN_PROC(p); sched_exit_thread(td2, td); @@ -453,7 +454,6 @@ thread_exit(void) } } - atomic_add_int(&td->td_proc->p_exitthreads, 1); PCPU_SET(deadthread, td); } else { /* @@ -508,14 +508,12 @@ thread_wait(struct proc *p) struct thread *td; mtx_assert(&Giant, MA_NOTOWNED); - KASSERT((p->p_numthreads == 1), ("Multiple threads in wait1()")); + KASSERT(p->p_numthreads == 1, ("multiple threads in thread_wait()")); + KASSERT(p->p_exitthreads == 0, ("p_exitthreads leaking")); td = FIRST_THREAD_IN_PROC(p); /* Lock the last thread so we spin until it exits cpu_throw(). */ thread_lock(td); thread_unlock(td); - /* Wait for any remaining threads to exit cpu_throw(). */ - while (p->p_exitthreads) - sched_relinquish(curthread); lock_profile_thread_exit(td); cpuset_rel(td->td_cpuset); td->td_cpuset = NULL; @@ -552,18 +550,6 @@ thread_link(struct thread *td, struct pr } /* - * Convert a process with one thread to an unthreaded process. - */ -void -thread_unthread(struct thread *td) -{ - struct proc *p = td->td_proc; - - KASSERT((p->p_numthreads == 1), ("Unthreading with >1 threads")); - p->p_flag &= ~P_HADTHREADS; -} - -/* * Called from: * thread_exit() */ @@ -715,14 +701,24 @@ stopme: } if (mode == SINGLE_EXIT) { /* - * We have gotten rid of all the other threads and we - * are about to either exit or exec. In either case, - * we try our utmost to revert to being a non-threaded - * process. + * Convert the process to an unthreaded process. The + * SINGLE_EXIT is called by exit1() or execve(), in + * both cases other threads must be retired. */ + KASSERT(p->p_numthreads == 1, ("Unthreading with >1 threads")); p->p_singlethread = NULL; - p->p_flag &= ~(P_STOPPED_SINGLE | P_SINGLE_EXIT); - thread_unthread(td); + p->p_flag &= ~(P_STOPPED_SINGLE | P_SINGLE_EXIT | P_HADTHREADS); + + /* + * Wait for any remaining threads to exit cpu_throw(). + */ + while (p->p_exitthreads != 0) { + PROC_SUNLOCK(p); + PROC_UNLOCK(p); + sched_relinquish(td); + PROC_LOCK(p); + PROC_SLOCK(p); + } } PROC_SUNLOCK(p); return (0); Modified: stable/10/sys/sys/proc.h ============================================================================== --- stable/10/sys/sys/proc.h Wed Sep 10 09:42:10 2014 (r271371) +++ stable/10/sys/sys/proc.h Wed Sep 10 09:47:16 2014 (r271372) @@ -952,7 +952,6 @@ void thread_suspend_one(struct thread *t void thread_unlink(struct thread *td); void thread_unsuspend(struct proc *p); int thread_unsuspend_one(struct thread *td); -void thread_unthread(struct thread *td); void thread_wait(struct proc *p); struct thread *thread_find(struct proc *p, lwpid_t tid); From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 09:57:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF933E74; Wed, 10 Sep 2014 09:57:33 +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 CF949172C; Wed, 10 Sep 2014 09:57:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8A9vX95053632; Wed, 10 Sep 2014 09:57:33 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8A9vX2x053622; Wed, 10 Sep 2014 09:57:33 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201409100957.s8A9vX2x053622@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Wed, 10 Sep 2014 09:57:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271373 - in head/sys/dev: ce cp ctau cx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 09:57:34 -0000 Author: rwatson Date: Wed Sep 10 09:57:32 2014 New Revision: 271373 URL: http://svnweb.freebsd.org/changeset/base/271373 Log: Replace local copy-and-paste implementations of printmbuf() in several device drivers with calls to the centralised m_print() implementation. While the formatting and output details differ a little, the content is essentially the same, and it is unlikely anyone has used this debugging output in some time. This change reduces awareness of mbuf cluster allocation (and, especially, the M_EXT flag) outside of the mbuf allocator, which will make it easier to refine the external storage mechanism without disrupting drivers in the future. Style bugs are preserved. Reviewed by: bz, glebius MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ce/if_ce.c head/sys/dev/cp/if_cp.c head/sys/dev/ctau/if_ct.c head/sys/dev/cx/if_cx.c Modified: head/sys/dev/ce/if_ce.c ============================================================================== --- head/sys/dev/ce/if_ce.c Wed Sep 10 09:47:16 2014 (r271372) +++ head/sys/dev/ce/if_ce.c Wed Sep 10 09:57:32 2014 (r271373) @@ -298,22 +298,6 @@ static struct cdevsw ce_cdevsw = { #endif /* - * Print the mbuf chain, for debug purposes only. - */ -static void printmbuf (struct mbuf *m) -{ - printf ("mbuf:"); - for (; m; m=m->m_next) { - if (m->m_flags & M_PKTHDR) - printf (" HDR %d:", m->m_pkthdr.len); - if (m->m_flags & M_EXT) - printf (" EXT:"); - printf (" %d", m->m_len); - } - printf ("\n"); -} - -/* * Make an mbuf from data. */ static struct mbuf *makembuf (void *buf, unsigned len) @@ -1140,7 +1124,7 @@ static void ce_receive (ce_chan_t *c, un return; } if (c->debug > 1) - printmbuf (m); + m_print (m, 0); #ifdef NETGRAPH m->m_pkthdr.rcvif = 0; IF_ENQUEUE(&d->rqueue, m); Modified: head/sys/dev/cp/if_cp.c ============================================================================== --- head/sys/dev/cp/if_cp.c Wed Sep 10 09:47:16 2014 (r271372) +++ head/sys/dev/cp/if_cp.c Wed Sep 10 09:57:32 2014 (r271373) @@ -182,22 +182,6 @@ static struct cdevsw cp_cdevsw = { }; /* - * Print the mbuf chain, for debug purposes only. - */ -static void printmbuf (struct mbuf *m) -{ - printf ("mbuf:"); - for (; m; m=m->m_next) { - if (m->m_flags & M_PKTHDR) - printf (" HDR %d:", m->m_pkthdr.len); - if (m->m_flags & M_EXT) - printf (" EXT:"); - printf (" %d", m->m_len); - } - printf ("\n"); -} - -/* * Make an mbuf from data. */ static struct mbuf *makembuf (void *buf, unsigned len) @@ -909,7 +893,7 @@ static void cp_receive (cp_chan_t *c, un return; } if (c->debug > 1) - printmbuf (m); + m_print (m, 0); #ifdef NETGRAPH m->m_pkthdr.rcvif = 0; NG_SEND_DATA_ONLY (error, d->hook, m); Modified: head/sys/dev/ctau/if_ct.c ============================================================================== --- head/sys/dev/ctau/if_ct.c Wed Sep 10 09:47:16 2014 (r271372) +++ head/sys/dev/ctau/if_ct.c Wed Sep 10 09:57:32 2014 (r271373) @@ -185,22 +185,6 @@ static struct cdevsw ct_cdevsw = { }; /* - * Print the mbuf chain, for debug purposes only. - */ -static void printmbuf (struct mbuf *m) -{ - printf ("mbuf:"); - for (; m; m=m->m_next) { - if (m->m_flags & M_PKTHDR) - printf (" HDR %d:", m->m_pkthdr.len); - if (m->m_flags & M_EXT) - printf (" EXT:"); - printf (" %d", m->m_len); - } - printf ("\n"); -} - -/* * Make an mbuf from data. */ static struct mbuf *makembuf (void *buf, u_int len) @@ -1127,7 +1111,7 @@ static void ct_receive (ct_chan_t *c, ch return; } if (c->debug > 1) - printmbuf (m); + m_print (m, 0); #ifdef NETGRAPH m->m_pkthdr.rcvif = 0; NG_SEND_DATA_ONLY (error, d->hook, m); Modified: head/sys/dev/cx/if_cx.c ============================================================================== --- head/sys/dev/cx/if_cx.c Wed Sep 10 09:47:16 2014 (r271372) +++ head/sys/dev/cx/if_cx.c Wed Sep 10 09:57:32 2014 (r271373) @@ -232,22 +232,6 @@ static struct cdevsw cx_cdevsw = { static int MY_SOFT_INTR; /* - * Print the mbuf chain, for debug purposes only. - */ -static void printmbuf (struct mbuf *m) -{ - printf ("mbuf:"); - for (; m; m=m->m_next) { - if (m->m_flags & M_PKTHDR) - printf (" HDR %d:", m->m_pkthdr.len); - if (m->m_flags & M_EXT) - printf (" EXT:"); - printf (" %d", m->m_len); - } - printf ("\n"); -} - -/* * Make an mbuf from data. */ static struct mbuf *makembuf (void *buf, u_int len) @@ -1325,7 +1309,7 @@ static void cx_receive (cx_chan_t *c, ch return; } if (c->debug > 1) - printmbuf (m); + m_print (m, 0); #ifdef NETGRAPH m->m_pkthdr.rcvif = 0; NG_SEND_DATA_ONLY (error, d->hook, m); From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 10:09:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E4212A2; Wed, 10 Sep 2014 10:09:35 +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 18B54185F; Wed, 10 Sep 2014 10:09:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8AA9YoX058948; Wed, 10 Sep 2014 10:09:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8AA9YVI058947; Wed, 10 Sep 2014 10:09:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201409101009.s8AA9YVI058947@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 10 Sep 2014 10:09:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271375 - stable/10/sys/dev/sound/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 10:09:35 -0000 Author: hselasky Date: Wed Sep 10 10:09:34 2014 New Revision: 271375 URL: http://svnweb.freebsd.org/changeset/base/271375 Log: MFC r271218: Update mixer description for FastTrackPro. Approved by: re, marius Modified: stable/10/sys/dev/sound/usb/uaudio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/10/sys/dev/sound/usb/uaudio.c Wed Sep 10 10:04:25 2014 (r271374) +++ stable/10/sys/dev/sound/usb/uaudio.c Wed Sep 10 10:09:34 2014 (r271375) @@ -2730,14 +2730,14 @@ uaudio_mixer_controls_create_ftu(struct uaudio_mixer_add_ctl(sc, &MIX(sc)); - MIX(sc).wValue[0] = MAKE_WORD(9, chy + 1); + MIX(sc).wValue[0] = MAKE_WORD(9, chy + 1 + 8); MIX(sc).type = MIX_SIGNED_16; MIX(sc).ctl = SOUND_MIXER_NRDEVICES; MIX(sc).name = "effect_send"; MIX(sc).nchan = 1; MIX(sc).update[0] = 1; snprintf(MIX(sc).desc, sizeof(MIX(sc).desc), - "Effect Send DIn%d Volume", chy + 1 + 8); + "Effect Send DIn%d Volume", chy + 1); uaudio_mixer_add_ctl(sc, &MIX(sc)); } From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 10:59:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC5A61A6; Wed, 10 Sep 2014 10:59:18 +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 CBF591E1B; Wed, 10 Sep 2014 10:59:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8AAxIvj082126; Wed, 10 Sep 2014 10:59:18 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8AAxIZL082120; Wed, 10 Sep 2014 10:59:18 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201409101059.s8AAxIZL082120@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 10 Sep 2014 10:59:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271377 - in head/sys: arm/versatile conf dev/smc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 10:59:19 -0000 Author: andrew Date: Wed Sep 10 10:59:17 2014 New Revision: 271377 URL: http://svnweb.freebsd.org/changeset/base/271377 Log: Move if_smc_fdt.c to live in sys/dev/smc. It's not specific to the ARM Versatile hardware. Added: head/sys/dev/smc/if_smc_fdt.c - copied unchanged from r271375, head/sys/arm/versatile/if_smc_fdt.c Deleted: head/sys/arm/versatile/if_smc_fdt.c Modified: head/sys/arm/versatile/files.versatile head/sys/conf/files Modified: head/sys/arm/versatile/files.versatile ============================================================================== --- head/sys/arm/versatile/files.versatile Wed Sep 10 10:40:16 2014 (r271376) +++ head/sys/arm/versatile/files.versatile Wed Sep 10 10:59:17 2014 (r271377) @@ -17,6 +17,5 @@ arm/versatile/versatile_pci.c optional arm/versatile/versatile_pci_bus_space.c optional pci arm/versatile/versatile_sic.c standard arm/versatile/versatile_timer.c standard -arm/versatile/if_smc_fdt.c optional smc kern/kern_clocksource.c standard Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Sep 10 10:40:16 2014 (r271376) +++ head/sys/conf/files Wed Sep 10 10:59:17 2014 (r271377) @@ -2188,6 +2188,7 @@ dev/smbus/smbconf.c optional smbus dev/smbus/smbus.c optional smbus dev/smbus/smbus_if.m optional smbus dev/smc/if_smc.c optional smc +dev/smc/if_smc_fdt.c optional smc fdt dev/sn/if_sn.c optional sn dev/sn/if_sn_isa.c optional sn isa dev/sn/if_sn_pccard.c optional sn pccard Copied: head/sys/dev/smc/if_smc_fdt.c (from r271375, head/sys/arm/versatile/if_smc_fdt.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/smc/if_smc_fdt.c Wed Sep 10 10:59:17 2014 (r271377, copy of r271375, head/sys/arm/versatile/if_smc_fdt.c) @@ -0,0 +1,135 @@ +/*- + * Copyright (c) 2008 Benno Rice + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include + +#include "miibus_if.h" + +static int smc_fdt_probe(device_t); +static int smc_fdt_attach(device_t); +static int smc_fdt_detach(device_t); + +static int +smc_fdt_probe(device_t dev) +{ + struct smc_softc *sc; + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_is_compatible(dev, "smsc,lan91c111")) { + sc = device_get_softc(dev); + sc->smc_usemem = 1; + + if (smc_probe(dev) != 0) { + return (ENXIO); + } + + return (0); + } + + return (ENXIO); +} + +static int +smc_fdt_attach(device_t dev) +{ + int err; + struct smc_softc *sc; + + sc = device_get_softc(dev); + + err = smc_attach(dev); + if (err) { + return (err); + } + + return (0); +} + +static int +smc_fdt_detach(device_t dev) +{ + + smc_detach(dev); + + return (0); +} + +static device_method_t smc_fdt_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, smc_fdt_probe), + DEVMETHOD(device_attach, smc_fdt_attach), + DEVMETHOD(device_detach, smc_fdt_detach), + + /* MII interface */ + DEVMETHOD(miibus_readreg, smc_miibus_readreg), + DEVMETHOD(miibus_writereg, smc_miibus_writereg), + DEVMETHOD(miibus_statchg, smc_miibus_statchg), + + { 0, 0 } +}; + +static driver_t smc_fdt_driver = { + "smc", + smc_fdt_methods, + sizeof(struct smc_softc), +}; + +extern devclass_t smc_devclass; + +DRIVER_MODULE(smc, simplebus, smc_fdt_driver, smc_devclass, 0, 0); +DRIVER_MODULE(miibus, smc, miibus_driver, miibus_devclass, 0, 0); +MODULE_DEPEND(smc, fdt, 1, 1, 1); +MODULE_DEPEND(smc, ether, 1, 1, 1); +MODULE_DEPEND(smc, miibus, 1, 1, 1); From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 11:13:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7399387A; Wed, 10 Sep 2014 11:13: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 5EDBB95; Wed, 10 Sep 2014 11:13: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 s8ABDEqL090972; Wed, 10 Sep 2014 11:13:14 GMT (envelope-from ray@FreeBSD.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8ABDEKi090971; Wed, 10 Sep 2014 11:13:14 GMT (envelope-from ray@FreeBSD.org) Message-Id: <201409101113.s8ABDEKi090971@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ray set sender to ray@FreeBSD.org using -f From: Aleksandr Rybalko Date: Wed, 10 Sep 2014 11:13:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271381 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 11:13:14 -0000 Author: ray Date: Wed Sep 10 11:13:13 2014 New Revision: 271381 URL: http://svnweb.freebsd.org/changeset/base/271381 Log: o Add sysctls to enable/disable potentially dengerous key combinations, like reboot/halt/debug. o Add support for most key combinations supported by syscons(4). Reviewed by: dumbbell, emaste (prev revision of D747) MFC after: 5 days Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Wed Sep 10 11:06:02 2014 (r271380) +++ head/sys/dev/vt/vt_core.c Wed Sep 10 11:13:13 2014 (r271381) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -123,6 +124,18 @@ VT_SYSCTL_INT(debug, 0, "vt(9) debug lev VT_SYSCTL_INT(deadtimer, 15, "Time to wait busy process in VT_PROCESS mode"); VT_SYSCTL_INT(suspendswitch, 1, "Switch to VT0 before suspend"); +/* Allow to disable some keyboard combinations. */ +VT_SYSCTL_INT(kbd_halt, 1, "Enable halt keyboard combination. " + "See kbdmap(5) to configure."); +VT_SYSCTL_INT(kbd_poweroff, 1, "Enable Power Off keyboard combination. " + "See kbdmap(5) to configure."); +VT_SYSCTL_INT(kbd_reboot, 1, "Enable reboot keyboard combination. " + "See kbdmap(5) to configure (typically Ctrl-Alt-Delete)."); +VT_SYSCTL_INT(kbd_debug, 1, "Enable key combination to enter debugger. " + "See kbdmap(5) to configure (typically Ctrl-Alt-Esc)."); +VT_SYSCTL_INT(kbd_panic, 0, "Enable request to panic. " + "See kbdmap(5) to configure."); + static struct vt_device vt_consdev; static unsigned int vt_unit = 0; static MALLOC_DEFINE(M_VT, "vt", "vt device"); @@ -484,18 +497,47 @@ vt_machine_kbdevent(int c) { switch (c) { - case SPCLKEY | DBG: - kdb_enter(KDB_WHY_BREAK, "manual escape to debugger"); + case SPCLKEY | DBG: /* kbdmap(5) keyword `debug`. */ + if (vt_kbd_debug) + kdb_enter(KDB_WHY_BREAK, "manual escape to debugger"); + return (1); + case SPCLKEY | HALT: /* kbdmap(5) keyword `halt`. */ + if (vt_kbd_halt) + shutdown_nice(RB_HALT); + return (1); + case SPCLKEY | PASTE: /* kbdmap(5) keyword `paste`. */ +#ifndef SC_NO_CUTPASTE + /* Insert text from cut-paste buffer. */ + /* TODO */ +#endif + break; + case SPCLKEY | PDWN: /* kbdmap(5) keyword `pdwn`. */ + if (vt_kbd_poweroff) + shutdown_nice(RB_HALT|RB_POWEROFF); + return (1); + case SPCLKEY | PNC: /* kbdmap(5) keyword `panic`. */ + /* + * Request to immediate panic if sysctl + * kern.vt.enable_panic_key allow it. + */ + if (vt_kbd_panic) + panic("Forced by the panic key"); + return (1); + case SPCLKEY | RBT: /* kbdmap(5) keyword `boot`. */ + if (vt_kbd_reboot) + shutdown_nice(RB_AUTOBOOT); return (1); - case SPCLKEY | RBT: - /* XXX: Make this configurable! */ - shutdown_nice(0); + case SPCLKEY | SPSC: /* kbdmap(5) keyword `spsc`. */ + /* Force activatation/deactivation of the screen saver. */ + /* TODO */ return (1); - case SPCLKEY | HALT: - shutdown_nice(RB_HALT); + case SPCLKEY | STBY: /* XXX Not present in kbdcontrol parser. */ + /* Put machine into Stend-By mode. */ + power_pm_suspend(POWER_SLEEP_STATE_STANDBY); return (1); - case SPCLKEY | PDWN: - shutdown_nice(RB_HALT|RB_POWEROFF); + case SPCLKEY | SUSP: /* kbdmap(5) keyword `susp`. */ + /* Suspend machine. */ + power_pm_suspend(POWER_SLEEP_STATE_SUSPEND); return (1); }; @@ -611,6 +653,20 @@ vt_processkey(keyboard_t *kbd, struct vt } switch (c) { + case NEXT: + /* Switch to next VT. */ + c = (vw->vw_number + 1) % VT_MAXWINDOWS; + vw = vd->vd_windows[c]; + if (vw != NULL) + vt_proc_window_switch(vw); + return (0); + case PREV: + /* Switch to previous VT. */ + c = (vw->vw_number - 1) % VT_MAXWINDOWS; + vw = vd->vd_windows[c]; + if (vw != NULL) + vt_proc_window_switch(vw); + return (0); case SLK: { kbdd_ioctl(kbd, KDGKBSTATE, (caddr_t)&state); From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 11:27:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D672DC7B; Wed, 10 Sep 2014 11:27:34 +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 A7B961D2; Wed, 10 Sep 2014 11:27:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8ABRYX6096329; Wed, 10 Sep 2014 11:27:34 GMT (envelope-from ray@FreeBSD.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8ABRYER096327; Wed, 10 Sep 2014 11:27:34 GMT (envelope-from ray@FreeBSD.org) Message-Id: <201409101127.s8ABRYER096327@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ray set sender to ray@FreeBSD.org using -f From: Aleksandr Rybalko Date: Wed, 10 Sep 2014 11:27:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271382 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 11:27:35 -0000 Author: ray Date: Wed Sep 10 11:27:33 2014 New Revision: 271382 URL: http://svnweb.freebsd.org/changeset/base/271382 Log: spelling fixes Submitted by: "Sam Fourman Jr." MFC after: 1 week Modified: head/sys/dev/vt/vt_buf.c head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_buf.c ============================================================================== --- head/sys/dev/vt/vt_buf.c Wed Sep 10 11:13:13 2014 (r271381) +++ head/sys/dev/vt/vt_buf.c Wed Sep 10 11:27:33 2014 (r271382) @@ -321,7 +321,7 @@ vtbuf_copy(struct vt_buf *vb, const term if (r->tr_begin.tp_row > p2->tp_row && r->tr_begin.tp_col == 0 && r->tr_end.tp_col == vb->vb_scr_size.tp_col && /* Full row. */ (rows + rdiff) == vb->vb_scr_size.tp_row && /* Whole screen. */ - rdiff > 0) { /* Only forward dirrection. Do not eat history. */ + rdiff > 0) { /* Only forward direction. Do not eat history. */ vthistory_addlines(vb, rdiff); } else if (p2->tp_row < p1->tp_row) { /* Handle overlapping copies of line segments. */ Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Wed Sep 10 11:13:13 2014 (r271381) +++ head/sys/dev/vt/vt_core.c Wed Sep 10 11:27:33 2014 (r271382) @@ -347,7 +347,7 @@ vt_proc_window_switch(struct vt_window * if (curvw->vw_flags & VWF_VTYLOCK) return (EBUSY); - /* Ask current process permitions to switch away. */ + /* Ask current process permission to switch away. */ if (curvw->vw_smode.mode == VT_PROCESS) { DPRINTF(30, "%s: VT_PROCESS ", __func__); if (vt_proc_alive(curvw) == FALSE) { @@ -1716,7 +1716,7 @@ vt_mouse_event(int type, int x, int y, i return; buf = malloc(len, M_VT, M_WAITOK | M_ZERO); - /* Request cupy/paste buffer data, no more than `len' */ + /* Request copy/paste buffer data, no more than `len' */ vtbuf_extract_marked(&vd->vd_markedwin->vw_buf, buf, len); From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 11:48:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00D9261F; Wed, 10 Sep 2014 11:48: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 E06123FA; Wed, 10 Sep 2014 11:48: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 s8ABmERp006375; Wed, 10 Sep 2014 11:48:14 GMT (envelope-from ray@FreeBSD.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8ABmDNR006373; Wed, 10 Sep 2014 11:48:13 GMT (envelope-from ray@FreeBSD.org) Message-Id: <201409101148.s8ABmDNR006373@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ray set sender to ray@FreeBSD.org using -f From: Aleksandr Rybalko Date: Wed, 10 Sep 2014 11:48:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271385 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 11:48:15 -0000 Author: ray Date: Wed Sep 10 11:48:13 2014 New Revision: 271385 URL: http://svnweb.freebsd.org/changeset/base/271385 Log: Fix one more spelling mistake. Pointed by: danfe Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Wed Sep 10 11:33:42 2014 (r271384) +++ head/sys/dev/vt/vt_core.c Wed Sep 10 11:48:13 2014 (r271385) @@ -532,7 +532,7 @@ vt_machine_kbdevent(int c) /* TODO */ return (1); case SPCLKEY | STBY: /* XXX Not present in kbdcontrol parser. */ - /* Put machine into Stend-By mode. */ + /* Put machine into Stand-By mode. */ power_pm_suspend(POWER_SLEEP_STATE_STANDBY); return (1); case SPCLKEY | SUSP: /* kbdmap(5) keyword `susp`. */ From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 12:35:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55E6FF3A; Wed, 10 Sep 2014 12:35: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 353ACBE9; Wed, 10 Sep 2014 12:35: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 s8ACZhVc031310; Wed, 10 Sep 2014 12:35:43 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8ACZgMl031306; Wed, 10 Sep 2014 12:35:42 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409101235.s8ACZgMl031306@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 10 Sep 2014 12:35:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271386 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 12:35:43 -0000 Author: ae Date: Wed Sep 10 12:35:42 2014 New Revision: 271386 URL: http://svnweb.freebsd.org/changeset/base/271386 Log: Introduce INP6_PCBHASHKEY macro. Replace usage of hardcoded part of IPv6 address as hash key in all places. Obtained from: Yandex LLC Modified: head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h head/sys/netinet/in_pcbgroup.c head/sys/netinet6/in6_pcb.c Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Wed Sep 10 11:48:13 2014 (r271385) +++ head/sys/netinet/in_pcb.c Wed Sep 10 12:35:42 2014 (r271386) @@ -2046,7 +2046,7 @@ in_pcbinshash_internal(struct inpcb *inp #ifdef INET6 if (inp->inp_vflag & INP_IPV6) - hashkey_faddr = inp->in6p_faddr.s6_addr32[3] /* XXX */; + hashkey_faddr = INP6_PCBHASHKEY(&inp->in6p_faddr); else #endif hashkey_faddr = inp->inp_faddr.s_addr; @@ -2133,7 +2133,7 @@ in_pcbrehash_mbuf(struct inpcb *inp, str #ifdef INET6 if (inp->inp_vflag & INP_IPV6) - hashkey_faddr = inp->in6p_faddr.s6_addr32[3] /* XXX */; + hashkey_faddr = INP6_PCBHASHKEY(&inp->in6p_faddr); else #endif hashkey_faddr = inp->inp_faddr.s_addr; Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Wed Sep 10 11:48:13 2014 (r271385) +++ head/sys/netinet/in_pcb.h Wed Sep 10 12:35:42 2014 (r271386) @@ -487,6 +487,7 @@ short inp_so_options(const struct inpcb (((faddr) ^ ((faddr) >> 16) ^ ntohs((lport) ^ (fport))) & (mask)) #define INP_PCBPORTHASH(lport, mask) \ (ntohs((lport)) & (mask)) +#define INP6_PCBHASHKEY(faddr) ((faddr)->s6_addr32[3]) /* * Flags for inp_vflags -- historically version flags only Modified: head/sys/netinet/in_pcbgroup.c ============================================================================== --- head/sys/netinet/in_pcbgroup.c Wed Sep 10 11:48:13 2014 (r271385) +++ head/sys/netinet/in_pcbgroup.c Wed Sep 10 12:35:42 2014 (r271386) @@ -416,7 +416,7 @@ in_pcbgroup_update_internal(struct inpcb if (newpcbgroup != NULL && oldpcbgroup != newpcbgroup) { #ifdef INET6 if (inp->inp_vflag & INP_IPV6) - hashkey_faddr = inp->in6p_faddr.s6_addr32[3]; /* XXX */ + hashkey_faddr = INP6_PCBHASHKEY(&inp->in6p_faddr); else #endif hashkey_faddr = inp->inp_faddr.s_addr; Modified: head/sys/netinet6/in6_pcb.c ============================================================================== --- head/sys/netinet6/in6_pcb.c Wed Sep 10 11:48:13 2014 (r271385) +++ head/sys/netinet6/in6_pcb.c Wed Sep 10 12:35:42 2014 (r271386) @@ -709,8 +709,9 @@ in6_pcblookup_local(struct inpcbinfo *pc * Look for an unconnected (wildcard foreign addr) PCB that * matches the local address and port we're looking for. */ - head = &pcbinfo->ipi_hashbase[INP_PCBHASH(INADDR_ANY, lport, - 0, pcbinfo->ipi_hashmask)]; + head = &pcbinfo->ipi_hashbase[INP_PCBHASH( + INP6_PCBHASHKEY(&in6addr_any), lport, 0, + pcbinfo->ipi_hashmask)]; LIST_FOREACH(inp, head, inp_hash) { /* XXX inp locking */ if ((inp->inp_vflag & INP_IPV6) == 0) @@ -878,9 +879,8 @@ in6_pcblookup_group(struct inpcbinfo *pc */ tmpinp = NULL; INP_GROUP_LOCK(pcbgroup); - head = &pcbgroup->ipg_hashbase[ - INP_PCBHASH(faddr->s6_addr32[3] /* XXX */, lport, fport, - pcbgroup->ipg_hashmask)]; + head = &pcbgroup->ipg_hashbase[INP_PCBHASH( + INP6_PCBHASHKEY(faddr), lport, fport, pcbgroup->ipg_hashmask)]; LIST_FOREACH(inp, head, inp_pcbgrouphash) { /* XXX inp locking */ if ((inp->inp_vflag & INP_IPV6) == 0) @@ -985,8 +985,9 @@ in6_pcblookup_group(struct inpcbinfo *pc * 3. non-jailed, non-wild. * 4. non-jailed, wild. */ - head = &pcbinfo->ipi_wildbase[INP_PCBHASH(INADDR_ANY, lport, - 0, pcbinfo->ipi_wildmask)]; + head = &pcbinfo->ipi_wildbase[INP_PCBHASH( + INP6_PCBHASHKEY(&in6addr_any), lport, 0, + pcbinfo->ipi_wildmask)]; LIST_FOREACH(inp, head, inp_pcbgroup_wild) { /* XXX inp locking */ if ((inp->inp_vflag & INP_IPV6) == 0) @@ -1081,9 +1082,8 @@ in6_pcblookup_hash_locked(struct inpcbin * First look for an exact match. */ tmpinp = NULL; - head = &pcbinfo->ipi_hashbase[ - INP_PCBHASH(faddr->s6_addr32[3] /* XXX */, lport, fport, - pcbinfo->ipi_hashmask)]; + head = &pcbinfo->ipi_hashbase[INP_PCBHASH( + INP6_PCBHASHKEY(faddr), lport, fport, pcbinfo->ipi_hashmask)]; LIST_FOREACH(inp, head, inp_hash) { /* XXX inp locking */ if ((inp->inp_vflag & INP_IPV6) == 0) @@ -1121,8 +1121,9 @@ in6_pcblookup_hash_locked(struct inpcbin * 3. non-jailed, non-wild. * 4. non-jailed, wild. */ - head = &pcbinfo->ipi_hashbase[INP_PCBHASH(INADDR_ANY, lport, - 0, pcbinfo->ipi_hashmask)]; + head = &pcbinfo->ipi_hashbase[INP_PCBHASH( + INP6_PCBHASHKEY(&in6addr_any), lport, 0, + pcbinfo->ipi_hashmask)]; LIST_FOREACH(inp, head, inp_hash) { /* XXX inp locking */ if ((inp->inp_vflag & INP_IPV6) == 0) From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 12:36:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4B54114; Wed, 10 Sep 2014 12:36: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 8E5F3BFE; Wed, 10 Sep 2014 12:36: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 s8ACahkq031507; Wed, 10 Sep 2014 12:36:43 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8ACagfG031501; Wed, 10 Sep 2014 12:36:42 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409101236.s8ACagfG031501@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 10 Sep 2014 12:36:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271387 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/fuse fs/smbfs kern vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 12:36:43 -0000 Author: glebius Date: Wed Sep 10 12:36:41 2014 New Revision: 271387 URL: http://svnweb.freebsd.org/changeset/base/271387 Log: Remove unused arguments for VOP_GETPAGES(), VOP_PUTPAGES(). Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/fs/fuse/fuse_vnops.c head/sys/fs/smbfs/smbfs_io.c head/sys/kern/vfs_default.c head/sys/kern/vnode_if.src head/sys/vm/vnode_pager.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Sep 10 12:35:42 2014 (r271386) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Sep 10 12:36:41 2014 (r271387) @@ -5829,7 +5829,6 @@ zfs_freebsd_getpages(ap) vm_page_t *a_m; int a_count; int a_reqpage; - vm_ooffset_t a_offset; } */ *ap; { @@ -5990,7 +5989,6 @@ zfs_freebsd_putpages(ap) int a_count; int a_sync; int *a_rtvals; - vm_ooffset_t a_offset; } */ *ap; { Modified: head/sys/fs/fuse/fuse_vnops.c ============================================================================== --- head/sys/fs/fuse/fuse_vnops.c Wed Sep 10 12:35:42 2014 (r271386) +++ head/sys/fs/fuse/fuse_vnops.c Wed Sep 10 12:36:41 2014 (r271387) @@ -1721,7 +1721,6 @@ fuse_vnop_write(struct vop_write_args *a vm_page_t *a_m; int a_count; int a_reqpage; - vm_ooffset_t a_offset; }; */ static int Modified: head/sys/fs/smbfs/smbfs_io.c ============================================================================== --- head/sys/fs/smbfs/smbfs_io.c Wed Sep 10 12:35:42 2014 (r271386) +++ head/sys/fs/smbfs/smbfs_io.c Wed Sep 10 12:36:41 2014 (r271387) @@ -419,7 +419,6 @@ smbfs_getpages(ap) vm_page_t *a_m; int a_count; int a_reqpage; - vm_ooffset_t a_offset; } */ *ap; { #ifdef SMBFS_RWGENERIC @@ -568,7 +567,6 @@ smbfs_putpages(ap) int a_count; int a_sync; int *a_rtvals; - vm_ooffset_t a_offset; } */ *ap; { int error; Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Wed Sep 10 12:35:42 2014 (r271386) +++ head/sys/kern/vfs_default.c Wed Sep 10 12:36:41 2014 (r271387) @@ -721,7 +721,6 @@ vop_stdgetpages(ap) vm_page_t *a_m; int a_count; int a_reqpage; - vm_ooffset_t a_offset; } */ *ap; { @@ -744,7 +743,6 @@ vop_stdputpages(ap) int a_count; int a_sync; int *a_rtvals; - vm_ooffset_t a_offset; } */ *ap; { Modified: head/sys/kern/vnode_if.src ============================================================================== --- head/sys/kern/vnode_if.src Wed Sep 10 12:35:42 2014 (r271386) +++ head/sys/kern/vnode_if.src Wed Sep 10 12:36:41 2014 (r271387) @@ -473,7 +473,6 @@ vop_getpages { IN vm_page_t *m; IN int count; IN int reqpage; - IN vm_ooffset_t offset; }; @@ -485,7 +484,6 @@ vop_putpages { IN int count; IN int sync; IN int *rtvals; - IN vm_ooffset_t offset; }; Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Wed Sep 10 12:35:42 2014 (r271386) +++ head/sys/vm/vnode_pager.c Wed Sep 10 12:36:41 2014 (r271387) @@ -657,7 +657,7 @@ vnode_pager_getpages(vm_object_t object, vp = object->handle; VM_OBJECT_WUNLOCK(object); - rtval = VOP_GETPAGES(vp, m, bytes, reqpage, 0); + rtval = VOP_GETPAGES(vp, m, bytes, reqpage); KASSERT(rtval != EOPNOTSUPP, ("vnode_pager: FS getpages not implemented\n")); VM_OBJECT_WLOCK(object); @@ -1035,7 +1035,7 @@ vnode_pager_putpages(vm_object_t object, */ vp = object->handle; VM_OBJECT_WUNLOCK(object); - rtval = VOP_PUTPAGES(vp, m, bytes, sync, rtvals, 0); + rtval = VOP_PUTPAGES(vp, m, bytes, sync, rtvals); KASSERT(rtval != EOPNOTSUPP, ("vnode_pager: stale FS putpages\n")); VM_OBJECT_WLOCK(object); From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 13:07:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7CE7FDC8; Wed, 10 Sep 2014 13:07:02 +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 6872BFA5; Wed, 10 Sep 2014 13:07:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8AD72Ha046521; Wed, 10 Sep 2014 13:07:02 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8AD720s046520; Wed, 10 Sep 2014 13:07:02 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201409101307.s8AD720s046520@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 10 Sep 2014 13:07:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271389 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 13:07:02 -0000 Author: andrew Date: Wed Sep 10 13:07:01 2014 New Revision: 271389 URL: http://svnweb.freebsd.org/changeset/base/271389 Log: Stop accessing the saved stack pointer by looking past the end of the array of registers. Submitted by: Michal Meloun Modified: head/usr.bin/truss/arm-fbsd.c Modified: head/usr.bin/truss/arm-fbsd.c ============================================================================== --- head/usr.bin/truss/arm-fbsd.c Wed Sep 10 12:55:34 2014 (r271388) +++ head/usr.bin/truss/arm-fbsd.c Wed Sep 10 13:07:01 2014 (r271389) @@ -201,7 +201,7 @@ arm_syscall_entry(struct trussinfo *trus */ // XXX BAD constant used here iorequest.piod_op = PIOD_READ_D; - iorequest.piod_offs = (void *)(regs.r[_REG_SP] + + iorequest.piod_offs = (void *)(regs.r_sp + 4 * sizeof(uint32_t)); iorequest.piod_addr = &fsc->args[4]; iorequest.piod_len = (nargs - 4) * sizeof(fsc->args[0]); From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 13:13:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CDEE226E; Wed, 10 Sep 2014 13:13: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 B811810AF; Wed, 10 Sep 2014 13:13: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 s8ADDU1p053947; Wed, 10 Sep 2014 13:13:30 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8ADDUiv053946; Wed, 10 Sep 2014 13:13:30 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409101313.s8ADDUiv053946@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 10 Sep 2014 13:13:30 +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: r271390 - stable/10/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 13:13:30 -0000 Author: delphij Date: Wed Sep 10 13:13:30 2014 New Revision: 271390 URL: http://svnweb.freebsd.org/changeset/base/271390 Log: MFC r271222: Fix typo. Submitted by: Dmitry Morozovsky Approved by: re (gjb) Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Wed Sep 10 13:07:01 2014 (r271389) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Wed Sep 10 13:13:30 2014 (r271390) @@ -414,7 +414,7 @@ or smaller can take advantage of this fe When this feature is enabled, the contents of highly-compressible blocks are stored in the block "pointer" itself .Po a misnomer in this case, as it contains -the compresseed data, rather than a pointer to its location on disk +the compressed data, rather than a pointer to its location on disk .Pc . Thus the space of the block From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 13:17:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0072B5C8; Wed, 10 Sep 2014 13:17:36 +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 D3E591108; Wed, 10 Sep 2014 13:17:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8ADHaSS054807; Wed, 10 Sep 2014 13:17:36 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8ADHaLO054802; Wed, 10 Sep 2014 13:17:36 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409101317.s8ADHaLO054802@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 10 Sep 2014 13:17:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271391 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 13:17:37 -0000 Author: ae Date: Wed Sep 10 13:17:35 2014 New Revision: 271391 URL: http://svnweb.freebsd.org/changeset/base/271391 Log: Make in6_pcblookup_hash_locked and in6_pcbladdr static. Obtained from: Yandex LLC Sponsored by: Yandex LLC Modified: head/sys/netinet/tcp_usrreq.c head/sys/netinet6/in6_pcb.c head/sys/netinet6/in6_pcb.h Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Wed Sep 10 13:13:30 2014 (r271390) +++ head/sys/netinet/tcp_usrreq.c Wed Sep 10 13:17:35 2014 (r271391) @@ -1160,10 +1160,7 @@ out: static int tcp6_connect(struct tcpcb *tp, struct sockaddr *nam, struct thread *td) { - struct inpcb *inp = tp->t_inpcb, *oinp; - struct socket *so = inp->inp_socket; - struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)nam; - struct in6_addr addr6; + struct inpcb *inp = tp->t_inpcb; int error; INP_WLOCK_ASSERT(inp); @@ -1174,39 +1171,9 @@ tcp6_connect(struct tcpcb *tp, struct so if (error) goto out; } - - /* - * Cannot simply call in_pcbconnect, because there might be an - * earlier incarnation of this same connection still in - * TIME_WAIT state, creating an ADDRINUSE error. - * in6_pcbladdr() also handles scope zone IDs. - * - * XXXRW: We wouldn't need to expose in6_pcblookup_hash_locked() - * outside of in6_pcb.c if there were an in6_pcbconnect_setup(). - */ - error = in6_pcbladdr(inp, nam, &addr6); - if (error) - goto out; - oinp = in6_pcblookup_hash_locked(inp->inp_pcbinfo, - &sin6->sin6_addr, sin6->sin6_port, - IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr) - ? &addr6 - : &inp->in6p_laddr, - inp->inp_lport, 0, NULL); - if (oinp) { - error = EADDRINUSE; + error = in6_pcbconnect(inp, nam, td->td_ucred); + if (error != 0) goto out; - } - if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) - inp->in6p_laddr = addr6; - inp->in6p_faddr = sin6->sin6_addr; - inp->inp_fport = sin6->sin6_port; - /* update flowinfo - draft-itojun-ipv6-flowlabel-api-00 */ - inp->inp_flow &= ~IPV6_FLOWLABEL_MASK; - if (inp->inp_flags & IN6P_AUTOFLOWLABEL) - inp->inp_flow |= - (htonl(ip6_randomflowlabel()) & IPV6_FLOWLABEL_MASK); - in_pcbrehash(inp); INP_HASH_WUNLOCK(&V_tcbinfo); /* Compute window scaling to request. */ @@ -1214,7 +1181,7 @@ tcp6_connect(struct tcpcb *tp, struct so (TCP_MAXWIN << tp->request_r_scale) < sb_max) tp->request_r_scale++; - soisconnecting(so); + soisconnecting(inp->inp_socket); TCPSTAT_INC(tcps_connattempt); tcp_state_change(tp, TCPS_SYN_SENT); tp->iss = tcp_new_isn(tp); Modified: head/sys/netinet6/in6_pcb.c ============================================================================== --- head/sys/netinet6/in6_pcb.c Wed Sep 10 13:13:30 2014 (r271390) +++ head/sys/netinet6/in6_pcb.c Wed Sep 10 13:17:35 2014 (r271391) @@ -108,6 +108,9 @@ __FBSDID("$FreeBSD$"); #include #include +static struct inpcb *in6_pcblookup_hash_locked(struct inpcbinfo *, + struct in6_addr *, u_int, struct in6_addr *, u_int, int, struct ifnet *); + int in6_pcbbind(register struct inpcb *inp, struct sockaddr *nam, struct ucred *cred) @@ -319,7 +322,7 @@ in6_pcbbind(register struct inpcb *inp, * a bit of a kludge, but cleaning up the internal interfaces would * have forced minor changes in every protocol). */ -int +static int in6_pcbladdr(register struct inpcb *inp, struct sockaddr *nam, struct in6_addr *plocal_addr6) { @@ -1058,7 +1061,7 @@ found: /* * Lookup PCB in hash list. */ -struct inpcb * +static struct inpcb * in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, u_int fport_arg, struct in6_addr *laddr, u_int lport_arg, int lookupflags, struct ifnet *ifp) Modified: head/sys/netinet6/in6_pcb.h ============================================================================== --- head/sys/netinet6/in6_pcb.h Wed Sep 10 13:13:30 2014 (r271390) +++ head/sys/netinet6/in6_pcb.h Wed Sep 10 13:17:35 2014 (r271391) @@ -86,7 +86,6 @@ int in6_pcbconnect(struct inpcb *, struc int in6_pcbconnect_mbuf(struct inpcb *, struct sockaddr *, struct ucred *, struct mbuf *); void in6_pcbdisconnect(struct inpcb *); -int in6_pcbladdr(struct inpcb *, struct sockaddr *, struct in6_addr *); struct inpcb * in6_pcblookup_local(struct inpcbinfo *, struct in6_addr *, u_short, int, @@ -96,10 +95,6 @@ struct inpcb * u_int, struct in6_addr *, u_int, int, struct ifnet *); struct inpcb * - in6_pcblookup_hash_locked(struct inpcbinfo *, struct in6_addr *, - u_int, struct in6_addr *, u_int, int, - struct ifnet *); -struct inpcb * in6_pcblookup_mbuf(struct inpcbinfo *, struct in6_addr *, u_int, struct in6_addr *, u_int, int, struct ifnet *ifp, struct mbuf *); From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 13:21:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F3348EA; Wed, 10 Sep 2014 13:21: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 29040115B; Wed, 10 Sep 2014 13:21: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 s8ADLj43058381; Wed, 10 Sep 2014 13:21:45 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8ADLjhU058380; Wed, 10 Sep 2014 13:21:45 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409101321.s8ADLjhU058380@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 10 Sep 2014 13:21:45 +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: r271392 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 13:21:45 -0000 Author: delphij Date: Wed Sep 10 13:21:44 2014 New Revision: 271392 URL: http://svnweb.freebsd.org/changeset/base/271392 Log: MFC r271226: MFV r271223: In dnode_sync(), do dnode_increase_indirection() before processing the dn_next_nblkptr. Illumos issue: 5117 space map reallocation can cause corruption Approved by: re (gjb) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Wed Sep 10 13:17:35 2014 (r271391) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Wed Sep 10 13:21:44 2014 (r271392) @@ -684,6 +684,11 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) return; } + if (dn->dn_next_nlevels[txgoff]) { + dnode_increase_indirection(dn, tx); + dn->dn_next_nlevels[txgoff] = 0; + } + if (dn->dn_next_nblkptr[txgoff]) { /* this should only happen on a realloc */ ASSERT(dn->dn_allocated_txg == tx->tx_txg); @@ -708,11 +713,6 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) mutex_exit(&dn->dn_mtx); } - if (dn->dn_next_nlevels[txgoff]) { - dnode_increase_indirection(dn, tx); - dn->dn_next_nlevels[txgoff] = 0; - } - dbuf_sync_list(list, tx); if (!DMU_OBJECT_IS_SPECIAL(dn->dn_object)) { From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 13:34:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9484EF; Wed, 10 Sep 2014 13:34:27 +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 7EECC1349; Wed, 10 Sep 2014 13:34:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8ADYRhr064424; Wed, 10 Sep 2014 13:34:27 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8ADYRHn064423; Wed, 10 Sep 2014 13:34:27 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201409101334.s8ADYRHn064423@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 10 Sep 2014 13:34:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271393 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 13:34:27 -0000 Author: trasz Date: Wed Sep 10 13:34:27 2014 New Revision: 271393 URL: http://svnweb.freebsd.org/changeset/base/271393 Log: Make it possible to disable NOP-In PDUs by the iSCSI initiator by setting kern.cam.ctl.iscsi.ping_timeout to 0. This fixes interoperability with some initiators that don't properly support NOP-Ins, namely iPXE/gPXE. Submitted by: Chen Wen MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Wed Sep 10 13:21:44 2014 (r271392) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Wed Sep 10 13:34:27 2014 (r271393) @@ -1002,6 +1002,19 @@ cfiscsi_callout(void *context) } #endif + if (ping_timeout <= 0) { + /* + * Pings are disabled. Don't send NOP-In in this case; + * user might have disabled pings to work around problems + * with certain initiators that can't properly handle + * NOP-In, such as iPXE. Reset the timeout, to avoid + * triggering reconnection, should the user decide to + * reenable them. + */ + cs->cs_timeout = 0; + return; + } + if (cs->cs_timeout >= ping_timeout) { CFISCSI_SESSION_WARN(cs, "no ping reply (NOP-Out) after %d seconds; " "dropping connection", ping_timeout); From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 13:38:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7DEC4A0; Wed, 10 Sep 2014 13:38: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 C819D13B2; Wed, 10 Sep 2014 13:38: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 s8ADcqFS065212; Wed, 10 Sep 2014 13:38:52 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8ADcqRv065210; Wed, 10 Sep 2014 13:38:52 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201409101338.s8ADcqRv065210@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 10 Sep 2014 13:38:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271394 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 13:38:53 -0000 Author: andrew Date: Wed Sep 10 13:38:52 2014 New Revision: 271394 URL: http://svnweb.freebsd.org/changeset/base/271394 Log: Add more register values to armreg.h and remove CPU_CONTROL_32BP_ENABLE from asm.h as they were already defined in armreg.h. Submitted by: Michal Meloun Modified: head/sys/arm/include/armreg.h head/sys/arm/include/asm.h Modified: head/sys/arm/include/armreg.h ============================================================================== --- head/sys/arm/include/armreg.h Wed Sep 10 13:34:27 2014 (r271393) +++ head/sys/arm/include/armreg.h Wed Sep 10 13:38:52 2014 (r271394) @@ -44,21 +44,31 @@ #define INSN_SIZE 4 #define INSN_COND_MASK 0xf0000000 /* Condition mask */ #define PSR_MODE 0x0000001f /* mode mask */ -#define PSR_USR26_MODE 0x00000000 -#define PSR_FIQ26_MODE 0x00000001 -#define PSR_IRQ26_MODE 0x00000002 -#define PSR_SVC26_MODE 0x00000003 #define PSR_USR32_MODE 0x00000010 #define PSR_FIQ32_MODE 0x00000011 #define PSR_IRQ32_MODE 0x00000012 #define PSR_SVC32_MODE 0x00000013 +#define PSR_MON32_MODE 0x00000016 #define PSR_ABT32_MODE 0x00000017 +#define PSR_HYP32_MODE 0x0000001a #define PSR_UND32_MODE 0x0000001b #define PSR_SYS32_MODE 0x0000001f #define PSR_32_MODE 0x00000010 -#define PSR_FLAGS 0xf0000000 /* flags */ +#define PSR_T 0x00000020 /* Instruction set bit */ +#define PSR_F 0x00000040 /* FIQ disable bit */ +#define PSR_I 0x00000080 /* IRQ disable bit */ +#define PSR_A 0x00000100 /* Imprecise abort bit */ +#define PSR_E 0x00000200 /* Data endianess bit */ +#define PSR_GE 0x000f0000 /* Greater than or equal to bits */ +#define PSR_J 0x01000000 /* Java bit */ +#define PSR_Q 0x08000000 /* Sticky overflow bit */ +#define PSR_V 0x10000000 /* Overflow bit */ +#define PSR_C 0x20000000 /* Carry bit */ +#define PSR_Z 0x40000000 /* Zero bit */ +#define PSR_N 0x80000000 /* Negative bit */ +#define PSR_FLAGS 0xf0000000 /* Flags mask. */ -#define PSR_C_bit (1 << 29) /* carry */ +#define PSR_C_bit PSR_C /* The high-order byte is always the implementor */ #define CPU_ID_IMPLEMENTOR_MASK 0xff000000 @@ -236,16 +246,23 @@ #define CPU_CONTROL_SYST_ENABLE 0x00000100 /* S: System protection bit */ #define CPU_CONTROL_ROM_ENABLE 0x00000200 /* R: ROM protection bit */ #define CPU_CONTROL_CPCLK 0x00000400 /* F: Implementation defined */ +#define CPU_CONTROL_SW_ENABLE 0x00000400 /* SW: SWP instruction enable */ #define CPU_CONTROL_BPRD_ENABLE 0x00000800 /* Z: Branch prediction enable */ #define CPU_CONTROL_IC_ENABLE 0x00001000 /* I: IC enable */ #define CPU_CONTROL_VECRELOC 0x00002000 /* V: Vector relocation */ #define CPU_CONTROL_ROUNDROBIN 0x00004000 /* RR: Predictable replacement */ #define CPU_CONTROL_V4COMPAT 0x00008000 /* L4: ARMv4 compat LDR R15 etc */ +#define CPU_CONTROL_HAF_ENABLE 0x00020000 /* HA: Hardware Access Flag Enable */ #define CPU_CONTROL_FI_ENABLE 0x00200000 /* FI: Low interrupt latency */ #define CPU_CONTROL_UNAL_ENABLE 0x00400000 /* U: unaligned data access */ #define CPU_CONTROL_V6_EXTPAGE 0x00800000 /* XP: ARMv6 extended page tables */ +#define CPU_CONTROL_V_ENABLE 0x01000000 /* VE: Interrupt vectors enable */ +#define CPU_CONTROL_EX_BEND 0x02000000 /* EE: exception endianness */ #define CPU_CONTROL_L2_ENABLE 0x04000000 /* L2 Cache enabled */ -#define CPU_CONTROL_AF_ENABLE 0x20000000 /* Access Flag enable */ +#define CPU_CONTROL_NMFI 0x08000000 /* NMFI: Non maskable FIQ */ +#define CPU_CONTROL_TR_ENABLE 0x10000000 /* TRE: TEX Remap*/ +#define CPU_CONTROL_AF_ENABLE 0x20000000 /* AFE: Access Flag enable */ +#define CPU_CONTROL_TE_ENABLE 0x40000000 /* TE: Thumb Exception enable */ #define CPU_CONTROL_IDC_ENABLE CPU_CONTROL_DC_ENABLE @@ -362,6 +379,15 @@ #define FAULT_EXTERNAL 0x400 /* External abort (armv6+) */ #define FAULT_WNR 0x800 /* Write-not-Read access (armv6+) */ +/* Fault status register definitions - v6+ */ +#define FSR_STATUS_TO_IDX(fsr) (((fsr) & 0xF) | \ + (((fsr) & (1 << 10)>> (10 - 4)))) +#define FSR_LPAE (1 << 9) /* LPAE indicator */ +#define FSR_WNR (1 << 11) /* Write-not-Read access */ +#define FSR_EXT (1 << 12) /* DECERR/SLVERR for external*/ +#define FSR_CM (1 << 13) /* Cache maintenance fault */ + + /* * Address of the vector page, low and high versions. */ Modified: head/sys/arm/include/asm.h ============================================================================== --- head/sys/arm/include/asm.h Wed Sep 10 13:34:27 2014 (r271393) +++ head/sys/arm/include/asm.h Wed Sep 10 13:38:52 2014 (r271394) @@ -46,9 +46,6 @@ #define I32_bit (1 << 7) /* IRQ disable */ #define F32_bit (1 << 6) /* FIQ disable */ -#define CPU_CONTROL_32BP_ENABLE 0x00000010 /* P: 32-bit exception handlers */ -#define CPU_CONTROL_32BD_ENABLE 0x00000020 /* D: 32-bit addressing */ - #ifndef _ALIGN_TEXT # define _ALIGN_TEXT .align 0 #endif From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 14:04:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F26BF25C; Wed, 10 Sep 2014 14:04:10 +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 C3774175F; Wed, 10 Sep 2014 14:04:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8AE4Ap3079762; Wed, 10 Sep 2014 14:04:10 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8AE4A9S079760; Wed, 10 Sep 2014 14:04:10 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201409101404.s8AE4A9S079760@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 10 Sep 2014 14:04:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271395 - in head/sys: cam/ctl dev/iscsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 14:04:11 -0000 Author: trasz Date: Wed Sep 10 14:04:10 2014 New Revision: 271395 URL: http://svnweb.freebsd.org/changeset/base/271395 Log: Make sure we handle less than zero timeouts in iSCSI initiator and target in a reasonable way. Sponsored by: The FreeBSD Foundation Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/dev/iscsi/iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Wed Sep 10 13:38:52 2014 (r271394) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Wed Sep 10 14:04:10 2014 (r271395) @@ -993,7 +993,7 @@ cfiscsi_callout(void *context) #ifdef ICL_KERNEL_PROXY if (cs->cs_waiting_for_ctld || cs->cs_login_phase) { - if (cs->cs_timeout > login_timeout) { + if (login_timeout > 0 && cs->cs_timeout > login_timeout) { CFISCSI_SESSION_WARN(cs, "login timed out after " "%d seconds; dropping connection", cs->cs_timeout); cfiscsi_session_terminate(cs); Modified: head/sys/dev/iscsi/iscsi.c ============================================================================== --- head/sys/dev/iscsi/iscsi.c Wed Sep 10 13:38:52 2014 (r271394) +++ head/sys/dev/iscsi/iscsi.c Wed Sep 10 14:04:10 2014 (r271395) @@ -538,7 +538,7 @@ iscsi_callout(void *context) is->is_timeout++; if (is->is_waiting_for_iscsid) { - if (is->is_timeout > iscsid_timeout) { + if (iscsid_timeout > 0 && is->is_timeout > iscsid_timeout) { ISCSI_SESSION_WARN(is, "timed out waiting for iscsid(8) " "for %d seconds; reconnecting", is->is_timeout); @@ -548,7 +548,7 @@ iscsi_callout(void *context) } if (is->is_login_phase) { - if (is->is_timeout > login_timeout) { + if (login_timeout > 0 && is->is_timeout > login_timeout) { ISCSI_SESSION_WARN(is, "login timed out after %d seconds; " "reconnecting", is->is_timeout); reconnect_needed = true; @@ -556,6 +556,16 @@ iscsi_callout(void *context) goto out; } + if (ping_timeout <= 0) { + /* + * Pings are disabled. Don't send NOP-Out in this case. + * Reset the timeout, to avoid triggering reconnection, + * should the user decide to reenable them. + */ + is->is_timeout = 0; + goto out; + } + if (is->is_timeout >= ping_timeout) { ISCSI_SESSION_WARN(is, "no ping reply (NOP-In) after %d seconds; " "reconnecting", ping_timeout); From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 14:16:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48120891; Wed, 10 Sep 2014 14:16:01 +0000 (UTC) Received: from mail-lb0-x232.google.com (mail-lb0-x232.google.com [IPv6:2a00:1450:4010:c04::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A4011905; Wed, 10 Sep 2014 14:16:00 +0000 (UTC) Received: by mail-lb0-f178.google.com with SMTP id c11so5281052lbj.9 for ; Wed, 10 Sep 2014 07:15:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=yCObLW8roLZi6Eja+Uc5vi9Vt+lU3Ug0r3ioaIA13/M=; b=SurZdUg/qTLBg5nF+2FUHN+rqz9ntRIEwiAuL4Ww3w7GS2WqdqwAM5/xmU+yLzIZi6 WyZmkAI7jz9jFELoUwxvW/Oh3Ui6Mlxpr/Vb3cbuH36HwyFS3U9CY94lalWOCxUK1tWH SMxxcfhPS5FixHxUE84WrEDQfwr2b6O7eoWdEo4XlChctLEwstfofLzBpid/JWOAYuPO ctYsUEF2TsfzeOB5tBQV1iYtSLgCbcs5I2H2BdGEXUZlySZj+kVUEX+I7XWvX6sAguGI c9Hn6tk06U8Cp/OQuM/H13YYXyGDQlF3jdYD8SAPIShyYbE9DTxvARcHDrvn5hI5M2c3 E8Bw== X-Received: by 10.152.6.40 with SMTP id x8mr41899255lax.18.1410358558458; Wed, 10 Sep 2014 07:15:58 -0700 (PDT) Received: from pc5.home (aebe219.neoplus.adsl.tpnet.pl. [79.186.30.219]) by mx.google.com with ESMTPSA id w11sm5683338lbm.30.2014.09.10.07.15.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Sep 2014 07:15:57 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Wed, 10 Sep 2014 16:15:54 +0200 From: Edward Tomasz Napierala To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r271393 - head/sys/cam/ctl Message-ID: <20140910141554.GA936@pc5.home> Mail-Followup-To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201409101334.s8ADYRHn064423@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201409101334.s8ADYRHn064423@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 14:16:01 -0000 On 0910T1334, Edward Tomasz Napierala wrote: > Author: trasz > Date: Wed Sep 10 13:34:27 2014 > New Revision: 271393 > URL: http://svnweb.freebsd.org/changeset/base/271393 > > Log: > Make it possible to disable NOP-In PDUs by the iSCSI initiator by setting Erm, this should read: Make it possible to disable sending NOP-In PDUs by the iSCSI target. From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 14:32:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DF863C3; Wed, 10 Sep 2014 14:32:08 +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 793BA1B89; Wed, 10 Sep 2014 14:32:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8AEW8Lf097181; Wed, 10 Sep 2014 14:32:08 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8AEW8Am097180; Wed, 10 Sep 2014 14:32:08 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409101432.s8AEW8Am097180@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 10 Sep 2014 14:32:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271396 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 14:32:08 -0000 Author: ae Date: Wed Sep 10 14:32:07 2014 New Revision: 271396 URL: http://svnweb.freebsd.org/changeset/base/271396 Log: Add additional checks for IPV6_PKTINFO handling (RFC 3542): * Return ENETDOWN when interface specified by ipi6_ifindex is not enabled for IPv6 use. * Return EADDRNOTAVAIL when ipi6_ifindex specifies an interface, but the address ipi6_addr is not available for use on that interface. * Return EINVAL when ipi6_addr is multicast address. Obtained from: Yandex LLC Sponsored by: Yandex LLC Modified: head/sys/netinet6/ip6_output.c Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Wed Sep 10 14:04:10 2014 (r271395) +++ head/sys/netinet6/ip6_output.c Wed Sep 10 14:32:07 2014 (r271396) @@ -2559,7 +2559,8 @@ ip6_setpktopt(int optname, u_char *buf, sticky && !IN6_IS_ADDR_UNSPECIFIED(&pktinfo->ipi6_addr)) { return (EINVAL); } - + if (IN6_IS_ADDR_MULTICAST(&pktinfo->ipi6_addr)) + return (EINVAL); /* validate the interface index if specified. */ if (pktinfo->ipi6_ifindex > V_if_index) return (ENXIO); @@ -2568,7 +2569,19 @@ ip6_setpktopt(int optname, u_char *buf, if (ifp == NULL) return (ENXIO); } - + if (ifp != NULL && ( + ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)) + return (ENETDOWN); + + if (ifp != NULL && + !IN6_IS_ADDR_UNSPECIFIED(&pktinfo->ipi6_addr)) { + struct in6_ifaddr *ia; + + ia = in6ifa_ifpwithaddr(ifp, &pktinfo->ipi6_addr); + if (ia == NULL) + return (EADDRNOTAVAIL); + ifa_free(&ia->ia_ifa); + } /* * We store the address anyway, and let in6_selectsrc() * validate the specified address. This is because ipi6_addr From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 14:57:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42274DE6; Wed, 10 Sep 2014 14:57:27 +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 2D7611E6F; Wed, 10 Sep 2014 14:57:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8AEvRa5007531; Wed, 10 Sep 2014 14:57:27 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8AEvRfk007530; Wed, 10 Sep 2014 14:57:27 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201409101457.s8AEvRfk007530@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 10 Sep 2014 14:57:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271397 - head/tests/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 14:57:27 -0000 Author: asomers Date: Wed Sep 10 14:57:26 2014 New Revision: 271397 URL: http://svnweb.freebsd.org/changeset/base/271397 Log: Abort the create_socket test if socket creation fails. MFC after: 1 week Reported by: Coverity CID: 1232756 Modified: head/tests/sys/kern/unix_seqpacket_test.c Modified: head/tests/sys/kern/unix_seqpacket_test.c ============================================================================== --- head/tests/sys/kern/unix_seqpacket_test.c Wed Sep 10 14:32:07 2014 (r271396) +++ head/tests/sys/kern/unix_seqpacket_test.c Wed Sep 10 14:57:26 2014 (r271397) @@ -397,7 +397,7 @@ ATF_TC_BODY(create_socket, tc) int s; s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); - ATF_CHECK(s >= 0); + ATF_REQUIRE(s >= 0); close(s); } From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 15:25:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F1FFADD; Wed, 10 Sep 2014 15:25:22 +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 17188121A; Wed, 10 Sep 2014 15:25:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8AFPMeM021891; Wed, 10 Sep 2014 15:25:22 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8AFPGN7021853; Wed, 10 Sep 2014 15:25:16 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201409101525.s8AFPGN7021853@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 10 Sep 2014 15:25:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271398 - in head: sys/arm/arm sys/arm/at91 sys/arm/cavium/cns11xx sys/arm/include sys/arm/s3c2xx0 sys/arm/xscale/i80321 sys/arm/xscale/i8134x sys/arm/xscale/ixp425 sys/arm/xscale/pxa u... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 15:25:22 -0000 Author: andrew Date: Wed Sep 10 15:25:15 2014 New Revision: 271398 URL: http://svnweb.freebsd.org/changeset/base/271398 Log: Unify interrupts bit definition and usage. While here remove PSR_C_bit. Submitted by: Svatopluk Kraus , Michal Meloun Differential Revision: https://reviews.freebsd.org/D754 Modified: head/sys/arm/arm/cpufunc_asm_sheeva.S head/sys/arm/arm/cpufunc_asm_xscale.S head/sys/arm/arm/cpufunc_asm_xscale_c3.S head/sys/arm/arm/exception.S head/sys/arm/arm/fiq.c head/sys/arm/arm/locore.S head/sys/arm/arm/machdep.c head/sys/arm/arm/mp_machdep.c head/sys/arm/arm/trap.c head/sys/arm/arm/undefined.c head/sys/arm/arm/vm_machdep.c head/sys/arm/at91/at91.c head/sys/arm/at91/at91_aic.c head/sys/arm/cavium/cns11xx/econa.c head/sys/arm/include/armreg.h head/sys/arm/include/asm.h head/sys/arm/include/atomic.h head/sys/arm/s3c2xx0/s3c24x0.c head/sys/arm/xscale/i80321/i80321_intr.h head/sys/arm/xscale/i80321/i80321_timer.c head/sys/arm/xscale/i80321/iq80321.c head/sys/arm/xscale/i8134x/i81342.c head/sys/arm/xscale/ixp425/ixp425.c head/sys/arm/xscale/ixp425/ixp425_pci.c head/sys/arm/xscale/ixp425/ixp425_timer.c head/sys/arm/xscale/pxa/pxa_icu.c head/sys/arm/xscale/pxa/pxa_timer.c head/usr.bin/truss/arm-fbsd.c Modified: head/sys/arm/arm/cpufunc_asm_sheeva.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_sheeva.S Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/arm/cpufunc_asm_sheeva.S Wed Sep 10 15:25:15 2014 (r271398) @@ -29,6 +29,7 @@ * SUCH DAMAGE. */ +#include #include __FBSDID("$FreeBSD$"); @@ -42,7 +43,7 @@ __FBSDID("$FreeBSD$"); ENTRY(sheeva_setttb) /* Disable irqs */ mrs r2, cpsr - orr r3, r2, #I32_bit | F32_bit + orr r3, r2, #PSR_I | PSR_F msr cpsr_c, r3 mov r1, #0 @@ -87,7 +88,7 @@ ENTRY(sheeva_dcache_wbinv_range) add r3, r0, ip sub r2, r3, #1 /* Disable irqs */ - orr r3, lr, #I32_bit | F32_bit + orr r3, lr, #PSR_I | PSR_F msr cpsr_c, r3 mcr p15, 5, r0, c15, c15, 0 /* Clean and inv zone start address */ mcr p15, 5, r2, c15, c15, 1 /* Clean and inv zone end address */ @@ -130,7 +131,7 @@ ENTRY(sheeva_idcache_wbinv_range) add r3, r0, ip sub r2, r3, #1 /* Disable irqs */ - orr r3, lr, #I32_bit | F32_bit + orr r3, lr, #PSR_I | PSR_F msr cpsr_c, r3 mcr p15, 5, r0, c15, c15, 0 /* Clean and inv zone start address */ mcr p15, 5, r2, c15, c15, 1 /* Clean and inv zone end address */ @@ -182,7 +183,7 @@ ENTRY(sheeva_dcache_inv_range) add r3, r0, ip sub r2, r3, #1 /* Disable irqs */ - orr r3, lr, #I32_bit | F32_bit + orr r3, lr, #PSR_I | PSR_F msr cpsr_c, r3 mcr p15, 5, r0, c15, c14, 0 /* Inv zone start address */ mcr p15, 5, r2, c15, c14, 1 /* Inv zone end address */ @@ -225,7 +226,7 @@ ENTRY(sheeva_dcache_wb_range) add r3, r0, ip sub r2, r3, #1 /* Disable irqs */ - orr r3, lr, #I32_bit | F32_bit + orr r3, lr, #PSR_I | PSR_F msr cpsr_c, r3 mcr p15, 5, r0, c15, c13, 0 /* Clean zone start address */ mcr p15, 5, r2, c15, c13, 1 /* Clean zone end address */ @@ -268,7 +269,7 @@ ENTRY(sheeva_l2cache_wbinv_range) add r3, r0, ip sub r2, r3, #1 /* Disable irqs */ - orr r3, lr, #I32_bit | F32_bit + orr r3, lr, #PSR_I | PSR_F msr cpsr_c, r3 mcr p15, 1, r0, c15, c9, 4 /* Clean L2 zone start address */ mcr p15, 1, r2, c15, c9, 5 /* Clean L2 zone end address */ @@ -313,7 +314,7 @@ ENTRY(sheeva_l2cache_inv_range) add r3, r0, ip sub r2, r3, #1 /* Disable irqs */ - orr r3, lr, #I32_bit | F32_bit + orr r3, lr, #PSR_I | PSR_F msr cpsr_c, r3 mcr p15, 1, r0, c15, c11, 4 /* Inv L2 zone start address */ mcr p15, 1, r2, c15, c11, 5 /* Inv L2 zone end address */ @@ -356,7 +357,7 @@ ENTRY(sheeva_l2cache_wb_range) add r3, r0, ip sub r2, r3, #1 /* Disable irqs */ - orr r3, lr, #I32_bit | F32_bit + orr r3, lr, #PSR_I | PSR_F msr cpsr_c, r3 mcr p15, 1, r0, c15, c9, 4 /* Clean L2 zone start address */ mcr p15, 1, r2, c15, c9, 5 /* Clean L2 zone end address */ @@ -379,7 +380,7 @@ END(sheeva_l2cache_wb_range) ENTRY(sheeva_l2cache_wbinv_all) /* Disable irqs */ mrs r1, cpsr - orr r2, r1, #I32_bit | F32_bit + orr r2, r1, #PSR_I | PSR_F msr cpsr_c, r2 mov r0, #0 Modified: head/sys/arm/arm/cpufunc_asm_xscale.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_xscale.S Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/arm/cpufunc_asm_xscale.S Wed Sep 10 15:25:15 2014 (r271398) @@ -71,7 +71,7 @@ * * XScale assembly functions for CPU / MMU / TLB specific operations */ - +#include #include __FBSDID("$FreeBSD$"); @@ -135,7 +135,7 @@ END(xscale_control) ENTRY(xscale_setttb) #ifdef CACHE_CLEAN_BLOCK_INTR mrs r3, cpsr - orr r1, r3, #(I32_bit | F32_bit) + orr r1, r3, #(PSR_I | PSR_F) msr cpsr_fsxc, r1 #else ldr r3, .Lblock_userspace_access @@ -267,7 +267,7 @@ _C_LABEL(xscale_minidata_clean_size): #ifdef CACHE_CLEAN_BLOCK_INTR #define XSCALE_CACHE_CLEAN_BLOCK \ mrs r3, cpsr ; \ - orr r0, r3, #(I32_bit | F32_bit) ; \ + orr r0, r3, #(PSR_I | PSR_F) ; \ msr cpsr_fsxc, r0 #define XSCALE_CACHE_CLEAN_UNBLOCK \ Modified: head/sys/arm/arm/cpufunc_asm_xscale_c3.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_xscale_c3.S Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/arm/cpufunc_asm_xscale_c3.S Wed Sep 10 15:25:15 2014 (r271398) @@ -73,6 +73,7 @@ * XScale core 3 assembly functions for CPU / MMU / TLB specific operations */ +#include #include __FBSDID("$FreeBSD$"); @@ -122,7 +123,7 @@ __FBSDID("$FreeBSD$"); #define XSCALE_CACHE_CLEAN_BLOCK \ stmfd sp!, {r4} ; \ mrs r4, cpsr ; \ - orr r0, r4, #(I32_bit | F32_bit) ; \ + orr r0, r4, #(PSR_I | PSR_F) ; \ msr cpsr_fsxc, r0 #define XSCALE_CACHE_CLEAN_UNBLOCK \ @@ -350,7 +351,7 @@ END(xscalec3_l2cache_flush_rng) ENTRY(xscalec3_setttb) #ifdef CACHE_CLEAN_BLOCK_INTR mrs r3, cpsr - orr r1, r3, #(I32_bit | F32_bit) + orr r1, r3, #(PSR_I | PSR_F) msr cpsr_fsxc, r1 #else ldr r3, .Lblock_userspace_access Modified: head/sys/arm/arm/exception.S ============================================================================== --- head/sys/arm/arm/exception.S Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/arm/exception.S Wed Sep 10 15:25:15 2014 (r271398) @@ -244,12 +244,12 @@ __FBSDID("$FreeBSD$"); #define DO_AST \ ldr r0, [sp] /* Get the SPSR from stack */ ;\ mrs r4, cpsr /* save CPSR */ ;\ - orr r1, r4, #(I32_bit|F32_bit) ;\ + orr r1, r4, #(PSR_I|PSR_F) ;\ msr cpsr_c, r1 /* Disable interrupts */ ;\ and r0, r0, #(PSR_MODE) /* Returning to USR mode? */ ;\ teq r0, #(PSR_USR32_MODE) ;\ bne 2f /* Nope, get out now */ ;\ - bic r4, r4, #(I32_bit|F32_bit) ;\ + bic r4, r4, #(PSR_I|PSR_F) ;\ 1: GET_CURTHREAD_PTR(r5) ;\ ldr r1, [r5, #(TD_FLAGS)] ;\ and r1, r1, #(TDF_ASTPENDING|TDF_NEEDRESCHED) ;\ @@ -258,7 +258,7 @@ __FBSDID("$FreeBSD$"); msr cpsr_c, r4 /* Restore interrupts */ ;\ mov r0, sp ;\ bl _C_LABEL(ast) /* ast(frame) */ ;\ - orr r0, r4, #(I32_bit|F32_bit) ;\ + orr r0, r4, #(PSR_I|PSR_F) ;\ msr cpsr_c, r0 ;\ b 1b ;\ 2: @@ -382,7 +382,7 @@ END(irq_entry) */ ASENTRY_NP(fiq_entry) mrs r8, cpsr /* FIQ handling isn't supported, */ - bic r8, #(F32_bit) /* just disable FIQ and return. */ + bic r8, #(PSR_F) /* just disable FIQ and return. */ msr cpsr_c, r8 /* The r8 we trash here is the */ subs pc, lr, #4 /* banked FIQ-mode r8. */ END(fiq_entry) Modified: head/sys/arm/arm/fiq.c ============================================================================== --- head/sys/arm/arm/fiq.c Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/arm/fiq.c Wed Sep 10 15:25:15 2014 (r271398) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -54,9 +55,6 @@ TAILQ_HEAD(, fiqhandler) fiqhandler_stac extern char *fiq_nullhandler_code; extern uint32_t fiq_nullhandler_size; -#define IRQ_BIT I32_bit -#define FIQ_BIT F32_bit - /* * fiq_installhandler: * @@ -102,7 +100,7 @@ fiq_claim(struct fiqhandler *fh) if (fh->fh_size > 0x100) return (EFBIG); - oldirqstate = disable_interrupts(FIQ_BIT); + oldirqstate = disable_interrupts(PSR_F); if ((ofh = TAILQ_FIRST(&fiqhandler_stack)) != NULL) { if ((ofh->fh_flags & FH_CANPUSH) == 0) { @@ -125,7 +123,7 @@ fiq_claim(struct fiqhandler *fh) fiq_installhandler(fh->fh_func, fh->fh_size); /* Make sure FIQs are enabled when we return. */ - oldirqstate &= ~FIQ_BIT; + oldirqstate &= ~PSR_F; out: restore_interrupts(oldirqstate); @@ -143,7 +141,7 @@ fiq_release(struct fiqhandler *fh) u_int oldirqstate; struct fiqhandler *ofh; - oldirqstate = disable_interrupts(FIQ_BIT); + oldirqstate = disable_interrupts(PSR_F); /* * If we are the currently active FIQ handler, then we @@ -167,7 +165,7 @@ fiq_release(struct fiqhandler *fh) fiq_installhandler(fiq_nullhandler_code, fiq_nullhandler_size); /* Make sure FIQs are disabled when we return. */ - oldirqstate |= FIQ_BIT; + oldirqstate |= PSR_F; } restore_interrupts(oldirqstate); Modified: head/sys/arm/arm/locore.S ============================================================================== --- head/sys/arm/arm/locore.S Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/arm/locore.S Wed Sep 10 15:25:15 2014 (r271398) @@ -88,7 +88,7 @@ ASENTRY_NP(_start) /* Make sure interrupts are disabled. */ mrs r7, cpsr - orr r7, r7, #(I32_bit|F32_bit) + orr r7, r7, #(PSR_I | PSR_F) msr cpsr_c, r7 #if defined (FLASHADDR) && defined(LOADERRAMADDR) @@ -386,7 +386,7 @@ ASENTRY_NP(mpentry) /* Make sure interrupts are disabled. */ mrs r7, cpsr - orr r7, r7, #(I32_bit|F32_bit) + orr r7, r7, #(PSR_I | PSR_F) msr cpsr_c, r7 /* Disable MMU. It should be disabled already, but make sure. */ @@ -466,7 +466,7 @@ ENTRY_NP(cpu_halt) mrs r2, cpsr bic r2, r2, #(PSR_MODE) orr r2, r2, #(PSR_SVC32_MODE) - orr r2, r2, #(I32_bit | F32_bit) + orr r2, r2, #(PSR_I | PSR_F) msr cpsr_fsxc, r2 ldr r4, .Lcpu_reset_address Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/arm/machdep.c Wed Sep 10 15:25:15 2014 (r271398) @@ -620,7 +620,7 @@ spinlock_enter(void) td = curthread; if (td->td_md.md_spinlock_count == 0) { - cspr = disable_interrupts(I32_bit | F32_bit); + cspr = disable_interrupts(PSR_I | PSR_F); td->td_md.md_spinlock_count = 1; td->td_md.md_saved_cspr = cspr; } else @@ -747,7 +747,7 @@ sys_sigreturn(td, uap) */ spsr = uc.uc_mcontext.__gregs[_REG_CPSR]; if ((spsr & PSR_MODE) != PSR_USR32_MODE || - (spsr & (I32_bit | F32_bit)) != 0) + (spsr & (PSR_I | PSR_F)) != 0) return (EINVAL); /* Restore register context. */ set_mcontext(td, &uc.uc_mcontext); Modified: head/sys/arm/arm/mp_machdep.c ============================================================================== --- head/sys/arm/arm/mp_machdep.c Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/arm/mp_machdep.c Wed Sep 10 15:25:15 2014 (r271398) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -236,7 +237,7 @@ init_secondary(int cpu) for (int i = start; i <= end; i++) arm_unmask_irq(i); - enable_interrupts(I32_bit); + enable_interrupts(PSR_I); loop_counter = 0; while (smp_started == 0) { Modified: head/sys/arm/arm/trap.c ============================================================================== --- head/sys/arm/arm/trap.c Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/arm/trap.c Wed Sep 10 15:25:15 2014 (r271398) @@ -241,10 +241,10 @@ data_abort_handler(struct trapframe *tf) pcb = td->td_pcb; /* Re-enable interrupts if they were enabled previously */ if (td->td_md.md_spinlock_count == 0) { - if (__predict_true(tf->tf_spsr & I32_bit) == 0) - enable_interrupts(I32_bit); - if (__predict_true(tf->tf_spsr & F32_bit) == 0) - enable_interrupts(F32_bit); + if (__predict_true(tf->tf_spsr & PSR_I) == 0) + enable_interrupts(PSR_I); + if (__predict_true(tf->tf_spsr & PSR_F) == 0) + enable_interrupts(PSR_F); } @@ -451,7 +451,7 @@ dab_fatal(struct trapframe *tf, u_int fs mode = TRAP_USERMODE(tf) ? "user" : "kernel"; - disable_interrupts(I32_bit|F32_bit); + disable_interrupts(PSR_I|PSR_F); if (td != NULL) { printf("Fatal %s mode data abort: '%s'\n", mode, data_aborts[fsr & FAULT_TYPE_MASK].desc); @@ -661,10 +661,10 @@ prefetch_abort_handler(struct trapframe } fault_pc = tf->tf_pc; if (td->td_md.md_spinlock_count == 0) { - if (__predict_true(tf->tf_spsr & I32_bit) == 0) - enable_interrupts(I32_bit); - if (__predict_true(tf->tf_spsr & F32_bit) == 0) - enable_interrupts(F32_bit); + if (__predict_true(tf->tf_spsr & PSR_I) == 0) + enable_interrupts(PSR_I); + if (__predict_true(tf->tf_spsr & PSR_F) == 0) + enable_interrupts(PSR_F); } /* Prefetch aborts cannot happen in kernel mode */ @@ -869,10 +869,10 @@ swi_handler(struct trapframe *frame) * be safe to enable them, but check anyway. */ if (td->td_md.md_spinlock_count == 0) { - if (__predict_true(frame->tf_spsr & I32_bit) == 0) - enable_interrupts(I32_bit); - if (__predict_true(frame->tf_spsr & F32_bit) == 0) - enable_interrupts(F32_bit); + if (__predict_true(frame->tf_spsr & PSR_I) == 0) + enable_interrupts(PSR_I); + if (__predict_true(frame->tf_spsr & PSR_F) == 0) + enable_interrupts(PSR_F); } syscall(td, frame); Modified: head/sys/arm/arm/undefined.c ============================================================================== --- head/sys/arm/arm/undefined.c Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/arm/undefined.c Wed Sep 10 15:25:15 2014 (r271398) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -180,8 +181,10 @@ undefinedinstruction(struct trapframe *f ksiginfo_t ksi; /* Enable interrupts if they were enabled before the exception. */ - if (!(frame->tf_spsr & I32_bit)) - enable_interrupts(I32_bit|F32_bit); + if (__predict_true(frame->tf_spsr & PSR_I) == 0) + enable_interrupts(PSR_I); + if (__predict_true(frame->tf_spsr & PSR_F) == 0) + enable_interrupts(PSR_F); PCPU_INC(cnt.v_trap); Modified: head/sys/arm/arm/vm_machdep.c ============================================================================== --- head/sys/arm/arm/vm_machdep.c Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/arm/vm_machdep.c Wed Sep 10 15:25:15 2014 (r271398) @@ -120,7 +120,7 @@ cpu_fork(register struct thread *td1, re sf->sf_r4 = (u_int)fork_return; sf->sf_r5 = (u_int)td2; sf->sf_pc = (u_int)fork_trampoline; - tf->tf_spsr &= ~PSR_C_bit; + tf->tf_spsr &= ~PSR_C; tf->tf_r0 = 0; tf->tf_r1 = 0; pcb2->un_32.pcb32_sp = (u_int)sf; @@ -190,7 +190,7 @@ cpu_set_syscall_retval(struct thread *td frame->tf_r0 = td->td_retval[0]; frame->tf_r1 = td->td_retval[1]; } - frame->tf_spsr &= ~PSR_C_bit; /* carry bit */ + frame->tf_spsr &= ~PSR_C; /* carry bit */ break; case ERESTART: /* @@ -203,7 +203,7 @@ cpu_set_syscall_retval(struct thread *td break; default: frame->tf_r0 = error; - frame->tf_spsr |= PSR_C_bit; /* carry bit */ + frame->tf_spsr |= PSR_C; /* carry bit */ break; } } @@ -228,7 +228,7 @@ cpu_set_upcall(struct thread *td, struct sf->sf_r4 = (u_int)fork_return; sf->sf_r5 = (u_int)td; sf->sf_pc = (u_int)fork_trampoline; - tf->tf_spsr &= ~PSR_C_bit; + tf->tf_spsr &= ~PSR_C; tf->tf_r0 = 0; td->td_pcb->un_32.pcb32_sp = (u_int)sf; KASSERT((td->td_pcb->un_32.pcb32_sp & 7) == 0, Modified: head/sys/arm/at91/at91.c ============================================================================== --- head/sys/arm/at91/at91.c Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/at91/at91.c Wed Sep 10 15:25:15 2014 (r271398) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #define _ARM32_BUS_DMA_PRIVATE #include #include @@ -303,7 +304,7 @@ at91_attach(device_t dev) bus_generic_probe(dev); bus_generic_attach(dev); - enable_interrupts(I32_bit | F32_bit); + enable_interrupts(PSR_I | PSR_F); return (0); } Modified: head/sys/arm/at91/at91_aic.c ============================================================================== --- head/sys/arm/at91/at91_aic.c Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/at91/at91_aic.c Wed Sep 10 15:25:15 2014 (r271398) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -149,7 +150,7 @@ at91_aic_attach(device_t dev) /* Disable and clear all interrupts. */ WR4(sc, IC_IDCR, 0xffffffff); WR4(sc, IC_ICCR, 0xffffffff); - enable_interrupts(I32_bit | F32_bit); + enable_interrupts(PSR_I | PSR_F); return (err); } Modified: head/sys/arm/cavium/cns11xx/econa.c ============================================================================== --- head/sys/arm/cavium/cns11xx/econa.c Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/cavium/cns11xx/econa.c Wed Sep 10 15:25:15 2014 (r271398) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #define _ARM32_BUS_DMA_PRIVATE +#include #include #include #include @@ -508,7 +509,7 @@ econa_attach(device_t dev) bus_generic_probe(dev); bus_generic_attach(dev); - enable_interrupts(I32_bit | F32_bit); + enable_interrupts(PSR_I | PSR_F); return (0); } Modified: head/sys/arm/include/armreg.h ============================================================================== --- head/sys/arm/include/armreg.h Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/include/armreg.h Wed Sep 10 15:25:15 2014 (r271398) @@ -68,8 +68,6 @@ #define PSR_N 0x80000000 /* Negative bit */ #define PSR_FLAGS 0xf0000000 /* Flags mask. */ -#define PSR_C_bit PSR_C - /* The high-order byte is always the implementor */ #define CPU_ID_IMPLEMENTOR_MASK 0xff000000 #define CPU_ID_ARM_LTD 0x41000000 /* 'A' */ Modified: head/sys/arm/include/asm.h ============================================================================== --- head/sys/arm/include/asm.h Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/include/asm.h Wed Sep 10 15:25:15 2014 (r271398) @@ -43,9 +43,6 @@ #define _C_LABEL(x) x #define _ASM_LABEL(x) x -#define I32_bit (1 << 7) /* IRQ disable */ -#define F32_bit (1 << 6) /* FIQ disable */ - #ifndef _ALIGN_TEXT # define _ALIGN_TEXT .align 0 #endif Modified: head/sys/arm/include/atomic.h ============================================================================== --- head/sys/arm/include/atomic.h Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/include/atomic.h Wed Sep 10 15:25:15 2014 (r271398) @@ -40,6 +40,7 @@ #define _MACHINE_ATOMIC_H_ #include +#include #ifndef _KERNEL #include @@ -67,12 +68,7 @@ #define wmb() dmb() #define rmb() dmb() -#ifndef I32_bit -#define I32_bit (1 << 7) /* IRQ disable */ -#endif -#ifndef F32_bit -#define F32_bit (1 << 6) /* FIQ disable */ -#endif + /* * It would be nice to use _HAVE_ARMv6_INSTRUCTIONS from machine/asm.h @@ -702,7 +698,7 @@ atomic_store_rel_long(volatile u_long *p "orr %1, %0, %2;" \ "msr cpsr_fsxc, %1;" \ : "=r" (cpsr_save), "=r" (tmp) \ - : "I" (I32_bit | F32_bit) \ + : "I" (PSR_I | PSR_F) \ : "cc" ); \ (expr); \ __asm __volatile( \ Modified: head/sys/arm/s3c2xx0/s3c24x0.c ============================================================================== --- head/sys/arm/s3c2xx0/s3c24x0.c Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/s3c2xx0/s3c24x0.c Wed Sep 10 15:25:15 2014 (r271398) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -638,7 +639,7 @@ s3c24x0_clock_freq(struct s3c2xx0_softc void cpu_reset(void) { - (void) disable_interrupts(I32_bit|F32_bit); + (void) disable_interrupts(PSR_I|PSR_F); bus_space_write_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_wdt_ioh, WDT_WTCON, WTCON_ENABLE | WTCON_CLKSEL_16 | WTCON_ENRST); Modified: head/sys/arm/xscale/i80321/i80321_intr.h ============================================================================== --- head/sys/arm/xscale/i80321/i80321_intr.h Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/xscale/i80321/i80321_intr.h Wed Sep 10 15:25:15 2014 (r271398) @@ -106,7 +106,7 @@ i80321_splx(int new) hwpend = (i80321_ipending & ICU_INT_HWMASK) & ~new; if (hwpend != 0) { - oldirqstate = disable_interrupts(I32_bit); + oldirqstate = disable_interrupts(PSR_I); intr_enabled |= hwpend; i80321_set_intrmask(); restore_interrupts(oldirqstate); Modified: head/sys/arm/xscale/i80321/i80321_timer.c ============================================================================== --- head/sys/arm/xscale/i80321/i80321_timer.c Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/xscale/i80321/i80321_timer.c Wed Sep 10 15:25:15 2014 (r271398) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -381,7 +382,7 @@ cpu_initclocks(void) /* Report the clock frequency. */ - oldirqstate = disable_interrupts(I32_bit); + oldirqstate = disable_interrupts(PSR_I); irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, #ifdef CPU_XSCALE_81342 Modified: head/sys/arm/xscale/i80321/iq80321.c ============================================================================== --- head/sys/arm/xscale/i80321/iq80321.c Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/xscale/i80321/iq80321.c Wed Sep 10 15:25:15 2014 (r271398) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -325,7 +326,7 @@ arm_unmask_irq(uintptr_t nb) void cpu_reset() { - (void) disable_interrupts(I32_bit|F32_bit); + (void) disable_interrupts(PSR_I|PSR_F); *(__volatile uint32_t *)(IQ80321_80321_VBASE + VERDE_ATU_BASE + ATU_PCSR) = PCSR_RIB | PCSR_RPB; printf("Reset failed!\n"); Modified: head/sys/arm/xscale/i8134x/i81342.c ============================================================================== --- head/sys/arm/xscale/i8134x/i81342.c Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/xscale/i8134x/i81342.c Wed Sep 10 15:25:15 2014 (r271398) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #define _ARM32_BUS_DMA_PRIVATE +#include #include #include @@ -248,7 +249,7 @@ void cpu_reset(void) { - disable_interrupts(I32_bit); + disable_interrupts(PSR_I); /* XXX: Use the watchdog to reset for now */ __asm __volatile("mcr p6, 0, %0, c8, c9, 0\n" "mcr p6, 0, %1, c7, c9, 0\n" Modified: head/sys/arm/xscale/ixp425/ixp425.c ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425.c Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/xscale/ixp425/ixp425.c Wed Sep 10 15:25:15 2014 (r271398) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -202,7 +203,7 @@ arm_mask_irq(uintptr_t nb) { int i; - i = disable_interrupts(I32_bit); + i = disable_interrupts(PSR_I); if (nb < 32) { intr_enabled &= ~(1 << nb); ixp425_set_intrmask(); @@ -220,7 +221,7 @@ arm_unmask_irq(uintptr_t nb) { int i; - i = disable_interrupts(I32_bit); + i = disable_interrupts(PSR_I); if (nb < 32) { intr_enabled |= (1 << nb); ixp425_set_intrmask(); Modified: head/sys/arm/xscale/ixp425/ixp425_pci.c ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425_pci.c Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/xscale/ixp425/ixp425_pci.c Wed Sep 10 15:25:15 2014 (r271398) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -70,7 +71,7 @@ extern struct ixp425_softc *ixp425_softc #define PCI_CSR_READ_4(sc, reg) \ bus_read_4(sc->sc_csr, reg) -#define PCI_CONF_LOCK(s) (s) = disable_interrupts(I32_bit) +#define PCI_CONF_LOCK(s) (s) = disable_interrupts(PSR_I) #define PCI_CONF_UNLOCK(s) restore_interrupts((s)) static device_probe_t ixppcib_probe; Modified: head/sys/arm/xscale/ixp425/ixp425_timer.c ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425_timer.c Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/xscale/ixp425/ixp425_timer.c Wed Sep 10 15:25:15 2014 (r271398) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -175,7 +176,7 @@ cpu_initclocks(void) /* Report the clock frequency. */ - oldirqstate = disable_interrupts(I32_bit); + oldirqstate = disable_interrupts(PSR_I); irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, IXP425_INT_TMR0, IXP425_INT_TMR0, 1, RF_ACTIVE); Modified: head/sys/arm/xscale/pxa/pxa_icu.c ============================================================================== --- head/sys/arm/xscale/pxa/pxa_icu.c Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/xscale/pxa/pxa_icu.c Wed Sep 10 15:25:15 2014 (r271398) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -105,7 +106,7 @@ pxa_icu_attach(device_t dev) pxa_icu_set_iclr(0); /* XXX: This should move to configure_final or something. */ - enable_interrupts(I32_bit|F32_bit); + enable_interrupts(PSR_I|PSR_F); return (0); } Modified: head/sys/arm/xscale/pxa/pxa_timer.c ============================================================================== --- head/sys/arm/xscale/pxa/pxa_timer.c Wed Sep 10 14:57:26 2014 (r271397) +++ head/sys/arm/xscale/pxa/pxa_timer.c Wed Sep 10 15:25:15 2014 (r271398) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -190,7 +191,7 @@ cpu_reset(void) { uint32_t val; - (void)disable_interrupts(I32_bit|F32_bit); + (void)disable_interrupts(PSR_I|PSR_F); val = pxa_timer_get_oscr(); val += PXA_TIMER_FREQUENCY; Modified: head/usr.bin/truss/arm-fbsd.c ============================================================================== --- head/usr.bin/truss/arm-fbsd.c Wed Sep 10 14:57:26 2014 (r271397) +++ head/usr.bin/truss/arm-fbsd.c Wed Sep 10 15:25:15 2014 (r271398) @@ -316,7 +316,7 @@ arm_syscall_exit(struct trussinfo *truss } retval = regs.r[0]; - errorp = !!(regs.r_cpsr & PSR_C_bit); + errorp = !!(regs.r_cpsr & PSR_C); /* * This code, while simpler than the initial versions I used, could From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 15:45:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3501680; Wed, 10 Sep 2014 15:45:19 +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 8C3A21520; Wed, 10 Sep 2014 15:45: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 s8AFjJwg032170; Wed, 10 Sep 2014 15:45:19 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8AFjI3t032168; Wed, 10 Sep 2014 15:45:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409101545.s8AFjI3t032168@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 10 Sep 2014 15:45:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r271399 - in stable: 10/sys/kern 10/sys/sys 8/sys/kern 8/sys/sys 9/sys/kern 9/sys/sys X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 15:45:19 -0000 Author: jhb Date: Wed Sep 10 15:45:18 2014 New Revision: 271399 URL: http://svnweb.freebsd.org/changeset/base/271399 Log: MFC 270823,270825,270829: Use a unit number allocator to provide suitable st_dev and st_ino values for POSIX shared memory descriptors. The implementation is similar to that used for pipes. Approved by: re (gjb for 10) Modified: stable/8/sys/kern/uipc_shm.c stable/8/sys/sys/mman.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) stable/8/sys/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/kern/uipc_shm.c stable/10/sys/sys/mman.h stable/9/sys/kern/uipc_shm.c stable/9/sys/sys/mman.h Directory Properties: stable/10/ (props changed) stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/8/sys/kern/uipc_shm.c ============================================================================== --- stable/8/sys/kern/uipc_shm.c Wed Sep 10 15:25:15 2014 (r271398) +++ stable/8/sys/kern/uipc_shm.c Wed Sep 10 15:45:18 2014 (r271399) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -101,12 +102,14 @@ static LIST_HEAD(, shm_mapping) *shm_dic static struct sx shm_dict_lock; static struct mtx shm_timestamp_lock; static u_long shm_hash; +static struct unrhdr *shm_ino_unr; +static dev_t shm_dev_ino; #define SHM_HASH(fnv) (&shm_dictionary[(fnv) & shm_hash]) static int shm_access(struct shmfd *shmfd, struct ucred *ucred, int flags); static struct shmfd *shm_alloc(struct ucred *ucred, mode_t mode); -static void shm_dict_init(void *arg); +static void shm_init(void *arg); static void shm_drop(struct shmfd *shmfd); static struct shmfd *shm_hold(struct shmfd *shmfd); static void shm_insert(char *path, Fnv32_t fnv, struct shmfd *shmfd); @@ -227,6 +230,8 @@ shm_stat(struct file *fp, struct stat *s sb->st_birthtimespec = shmfd->shm_birthtime; sb->st_uid = shmfd->shm_uid; sb->st_gid = shmfd->shm_gid; + sb->st_dev = shm_dev_ino; + sb->st_ino = shmfd->shm_ino; return (0); } @@ -350,6 +355,7 @@ static struct shmfd * shm_alloc(struct ucred *ucred, mode_t mode) { struct shmfd *shmfd; + int ino; shmfd = malloc(sizeof(*shmfd), M_SHMFD, M_WAITOK | M_ZERO); shmfd->shm_size = 0; @@ -366,6 +372,11 @@ shm_alloc(struct ucred *ucred, mode_t mo vfs_timestamp(&shmfd->shm_birthtime); shmfd->shm_atime = shmfd->shm_mtime = shmfd->shm_ctime = shmfd->shm_birthtime; + ino = alloc_unr(shm_ino_unr); + if (ino == -1) + shmfd->shm_ino = 0; + else + shmfd->shm_ino = ino; refcount_init(&shmfd->shm_refs, 1); #ifdef MAC mac_posixshm_init(shmfd); @@ -392,6 +403,8 @@ shm_drop(struct shmfd *shmfd) mac_posixshm_destroy(shmfd); #endif vm_object_deallocate(shmfd->shm_object); + if (shmfd->shm_ino != 0) + free_unr(shm_ino_unr, shmfd->shm_ino); free(shmfd, M_SHMFD); } } @@ -420,14 +433,18 @@ shm_access(struct shmfd *shmfd, struct u * the mappings in a hash table. */ static void -shm_dict_init(void *arg) +shm_init(void *arg) { mtx_init(&shm_timestamp_lock, "shm timestamps", NULL, MTX_DEF); sx_init(&shm_dict_lock, "shm dictionary"); shm_dictionary = hashinit(1024, M_SHMFD, &shm_hash); + shm_ino_unr = new_unrhdr(1, INT32_MAX, NULL); + KASSERT(shm_ino_unr != NULL, ("shm fake inodes not initialized")); + shm_dev_ino = devfs_alloc_cdp_inode(); + KASSERT(shm_dev_ino > 0, ("shm dev inode not initialized")); } -SYSINIT(shm_dict_init, SI_SUB_SYSV_SHM, SI_ORDER_ANY, shm_dict_init, NULL); +SYSINIT(shm_init, SI_SUB_SYSV_SHM, SI_ORDER_ANY, shm_init, NULL); static struct shmfd * shm_lookup(char *path, Fnv32_t fnv) Modified: stable/8/sys/sys/mman.h ============================================================================== --- stable/8/sys/sys/mman.h Wed Sep 10 15:25:15 2014 (r271398) +++ stable/8/sys/sys/mman.h Wed Sep 10 15:45:18 2014 (r271399) @@ -200,6 +200,7 @@ struct shmfd { struct timespec shm_mtime; struct timespec shm_ctime; struct timespec shm_birthtime; + ino_t shm_ino; struct label *shm_label; /* MAC label */ const char *shm_path; From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 15:45:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A27DC67F; Wed, 10 Sep 2014 15:45:19 +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 8C0F8151F; Wed, 10 Sep 2014 15:45: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 s8AFjIlk032161; Wed, 10 Sep 2014 15:45:18 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8AFjIbV032159; Wed, 10 Sep 2014 15:45:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409101545.s8AFjIbV032159@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 10 Sep 2014 15:45:18 +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: r271399 - in stable: 10/sys/kern 10/sys/sys 8/sys/kern 8/sys/sys 9/sys/kern 9/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 15:45:19 -0000 Author: jhb Date: Wed Sep 10 15:45:18 2014 New Revision: 271399 URL: http://svnweb.freebsd.org/changeset/base/271399 Log: MFC 270823,270825,270829: Use a unit number allocator to provide suitable st_dev and st_ino values for POSIX shared memory descriptors. The implementation is similar to that used for pipes. Approved by: re (gjb for 10) Modified: stable/10/sys/kern/uipc_shm.c stable/10/sys/sys/mman.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/8/sys/kern/uipc_shm.c stable/8/sys/sys/mman.h stable/9/sys/kern/uipc_shm.c stable/9/sys/sys/mman.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) stable/8/sys/sys/ (props changed) stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/10/sys/kern/uipc_shm.c ============================================================================== --- stable/10/sys/kern/uipc_shm.c Wed Sep 10 15:25:15 2014 (r271398) +++ stable/10/sys/kern/uipc_shm.c Wed Sep 10 15:45:18 2014 (r271399) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -101,12 +102,14 @@ static LIST_HEAD(, shm_mapping) *shm_dic static struct sx shm_dict_lock; static struct mtx shm_timestamp_lock; static u_long shm_hash; +static struct unrhdr *shm_ino_unr; +static dev_t shm_dev_ino; #define SHM_HASH(fnv) (&shm_dictionary[(fnv) & shm_hash]) static int shm_access(struct shmfd *shmfd, struct ucred *ucred, int flags); static struct shmfd *shm_alloc(struct ucred *ucred, mode_t mode); -static void shm_dict_init(void *arg); +static void shm_init(void *arg); static void shm_drop(struct shmfd *shmfd); static struct shmfd *shm_hold(struct shmfd *shmfd); static void shm_insert(char *path, Fnv32_t fnv, struct shmfd *shmfd); @@ -408,6 +411,8 @@ shm_stat(struct file *fp, struct stat *s sb->st_uid = shmfd->shm_uid; sb->st_gid = shmfd->shm_gid; mtx_unlock(&shm_timestamp_lock); + sb->st_dev = shm_dev_ino; + sb->st_ino = shmfd->shm_ino; return (0); } @@ -539,6 +544,7 @@ static struct shmfd * shm_alloc(struct ucred *ucred, mode_t mode) { struct shmfd *shmfd; + int ino; shmfd = malloc(sizeof(*shmfd), M_SHMFD, M_WAITOK | M_ZERO); shmfd->shm_size = 0; @@ -555,6 +561,11 @@ shm_alloc(struct ucred *ucred, mode_t mo vfs_timestamp(&shmfd->shm_birthtime); shmfd->shm_atime = shmfd->shm_mtime = shmfd->shm_ctime = shmfd->shm_birthtime; + ino = alloc_unr(shm_ino_unr); + if (ino == -1) + shmfd->shm_ino = 0; + else + shmfd->shm_ino = ino; refcount_init(&shmfd->shm_refs, 1); mtx_init(&shmfd->shm_mtx, "shmrl", NULL, MTX_DEF); rangelock_init(&shmfd->shm_rl); @@ -585,6 +596,8 @@ shm_drop(struct shmfd *shmfd) rangelock_destroy(&shmfd->shm_rl); mtx_destroy(&shmfd->shm_mtx); vm_object_deallocate(shmfd->shm_object); + if (shmfd->shm_ino != 0) + free_unr(shm_ino_unr, shmfd->shm_ino); free(shmfd, M_SHMFD); } } @@ -617,14 +630,18 @@ shm_access(struct shmfd *shmfd, struct u * the mappings in a hash table. */ static void -shm_dict_init(void *arg) +shm_init(void *arg) { mtx_init(&shm_timestamp_lock, "shm timestamps", NULL, MTX_DEF); sx_init(&shm_dict_lock, "shm dictionary"); shm_dictionary = hashinit(1024, M_SHMFD, &shm_hash); + shm_ino_unr = new_unrhdr(1, INT32_MAX, NULL); + KASSERT(shm_ino_unr != NULL, ("shm fake inodes not initialized")); + shm_dev_ino = devfs_alloc_cdp_inode(); + KASSERT(shm_dev_ino > 0, ("shm dev inode not initialized")); } -SYSINIT(shm_dict_init, SI_SUB_SYSV_SHM, SI_ORDER_ANY, shm_dict_init, NULL); +SYSINIT(shm_init, SI_SUB_SYSV_SHM, SI_ORDER_ANY, shm_init, NULL); static struct shmfd * shm_lookup(char *path, Fnv32_t fnv) Modified: stable/10/sys/sys/mman.h ============================================================================== --- stable/10/sys/sys/mman.h Wed Sep 10 15:25:15 2014 (r271398) +++ stable/10/sys/sys/mman.h Wed Sep 10 15:45:18 2014 (r271399) @@ -219,6 +219,7 @@ struct shmfd { struct timespec shm_mtime; struct timespec shm_ctime; struct timespec shm_birthtime; + ino_t shm_ino; struct label *shm_label; /* MAC label */ const char *shm_path; From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 15:45:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F054A681; Wed, 10 Sep 2014 15:45:19 +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 DAE5F1528; Wed, 10 Sep 2014 15:45: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 s8AFjJ1H032178; Wed, 10 Sep 2014 15:45:19 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8AFjJmj032176; Wed, 10 Sep 2014 15:45:19 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409101545.s8AFjJmj032176@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 10 Sep 2014 15:45: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: r271399 - in stable: 10/sys/kern 10/sys/sys 8/sys/kern 8/sys/sys 9/sys/kern 9/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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 15:45:20 -0000 Author: jhb Date: Wed Sep 10 15:45:18 2014 New Revision: 271399 URL: http://svnweb.freebsd.org/changeset/base/271399 Log: MFC 270823,270825,270829: Use a unit number allocator to provide suitable st_dev and st_ino values for POSIX shared memory descriptors. The implementation is similar to that used for pipes. Approved by: re (gjb for 10) Modified: stable/9/sys/kern/uipc_shm.c stable/9/sys/sys/mman.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/kern/uipc_shm.c stable/10/sys/sys/mman.h stable/8/sys/kern/uipc_shm.c stable/8/sys/sys/mman.h Directory Properties: stable/10/ (props changed) stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) stable/8/sys/sys/ (props changed) Modified: stable/9/sys/kern/uipc_shm.c ============================================================================== --- stable/9/sys/kern/uipc_shm.c Wed Sep 10 15:25:15 2014 (r271398) +++ stable/9/sys/kern/uipc_shm.c Wed Sep 10 15:45:18 2014 (r271399) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -95,12 +96,14 @@ static LIST_HEAD(, shm_mapping) *shm_dic static struct sx shm_dict_lock; static struct mtx shm_timestamp_lock; static u_long shm_hash; +static struct unrhdr *shm_ino_unr; +static dev_t shm_dev_ino; #define SHM_HASH(fnv) (&shm_dictionary[(fnv) & shm_hash]) static int shm_access(struct shmfd *shmfd, struct ucred *ucred, int flags); static struct shmfd *shm_alloc(struct ucred *ucred, mode_t mode); -static void shm_dict_init(void *arg); +static void shm_init(void *arg); static void shm_drop(struct shmfd *shmfd); static struct shmfd *shm_hold(struct shmfd *shmfd); static void shm_insert(char *path, Fnv32_t fnv, struct shmfd *shmfd); @@ -227,6 +230,8 @@ shm_stat(struct file *fp, struct stat *s sb->st_uid = shmfd->shm_uid; sb->st_gid = shmfd->shm_gid; mtx_unlock(&shm_timestamp_lock); + sb->st_dev = shm_dev_ino; + sb->st_ino = shmfd->shm_ino; return (0); } @@ -361,6 +366,7 @@ static struct shmfd * shm_alloc(struct ucred *ucred, mode_t mode) { struct shmfd *shmfd; + int ino; shmfd = malloc(sizeof(*shmfd), M_SHMFD, M_WAITOK | M_ZERO); shmfd->shm_size = 0; @@ -377,6 +383,11 @@ shm_alloc(struct ucred *ucred, mode_t mo vfs_timestamp(&shmfd->shm_birthtime); shmfd->shm_atime = shmfd->shm_mtime = shmfd->shm_ctime = shmfd->shm_birthtime; + ino = alloc_unr(shm_ino_unr); + if (ino == -1) + shmfd->shm_ino = 0; + else + shmfd->shm_ino = ino; refcount_init(&shmfd->shm_refs, 1); #ifdef MAC mac_posixshm_init(shmfd); @@ -403,6 +414,8 @@ shm_drop(struct shmfd *shmfd) mac_posixshm_destroy(shmfd); #endif vm_object_deallocate(shmfd->shm_object); + if (shmfd->shm_ino != 0) + free_unr(shm_ino_unr, shmfd->shm_ino); free(shmfd, M_SHMFD); } } @@ -435,14 +448,18 @@ shm_access(struct shmfd *shmfd, struct u * the mappings in a hash table. */ static void -shm_dict_init(void *arg) +shm_init(void *arg) { mtx_init(&shm_timestamp_lock, "shm timestamps", NULL, MTX_DEF); sx_init(&shm_dict_lock, "shm dictionary"); shm_dictionary = hashinit(1024, M_SHMFD, &shm_hash); + shm_ino_unr = new_unrhdr(1, INT32_MAX, NULL); + KASSERT(shm_ino_unr != NULL, ("shm fake inodes not initialized")); + shm_dev_ino = devfs_alloc_cdp_inode(); + KASSERT(shm_dev_ino > 0, ("shm dev inode not initialized")); } -SYSINIT(shm_dict_init, SI_SUB_SYSV_SHM, SI_ORDER_ANY, shm_dict_init, NULL); +SYSINIT(shm_init, SI_SUB_SYSV_SHM, SI_ORDER_ANY, shm_init, NULL); static struct shmfd * shm_lookup(char *path, Fnv32_t fnv) Modified: stable/9/sys/sys/mman.h ============================================================================== --- stable/9/sys/sys/mman.h Wed Sep 10 15:25:15 2014 (r271398) +++ stable/9/sys/sys/mman.h Wed Sep 10 15:45:18 2014 (r271399) @@ -211,6 +211,7 @@ struct shmfd { struct timespec shm_mtime; struct timespec shm_ctime; struct timespec shm_birthtime; + ino_t shm_ino; struct label *shm_label; /* MAC label */ const char *shm_path; From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 15:59:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0136486; Wed, 10 Sep 2014 15:59:07 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 832D61713; Wed, 10 Sep 2014 15:59:07 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 694ECB9B9; Wed, 10 Sep 2014 11:59:06 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Subject: Re: svn commit: r270850 - in head/sys: i386/i386 i386/include i386/isa x86/acpica Date: Wed, 10 Sep 2014 10:41 -0400 Message-ID: <21371080.holR7l8cnU@ralph.baldwin.cx> User-Agent: KMail/4.10.5 (FreeBSD/10.0-STABLE; KDE/4.10.5; amd64; ; ) In-Reply-To: <20140909085813.GC2737@kib.kiev.ua> References: <201408301748.s7UHmc6H059701@svn.freebsd.org> <1432043.pIBGVXe1sj@ralph.baldwin.cx> <20140909085813.GC2737@kib.kiev.ua> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 10 Sep 2014 11:59:06 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 15:59:07 -0000 On Tuesday, September 09, 2014 11:58:13 AM Konstantin Belousov wrote: > On Sat, Sep 06, 2014 at 04:04:49PM -0400, John Baldwin wrote: > > @@ -692,6 +706,27 @@ > > > > #ifdef I586_CPU > > > > case CPU_586: > > switch (cpu_vendor_id) { > > > > + case CPU_VENDOR_AMD: > > +#ifdef CPU_WT_ALLOC > > + if (((cpu_id & 0x0f0) > 0) && > > + ((cpu_id & 0x0f0) < 0x60) && > > + ((cpu_id & 0x00f) > 3)) > > + enable_K5_wt_alloc(); > > + else if (((cpu_id & 0x0f0) > 0x80) || > > + (((cpu_id & 0x0f0) == 0x80) && > > + (cpu_id & 0x00f) > 0x07)) > > + enable_K6_2_wt_alloc(); > > + else if ((cpu_id & 0x0f0) > 0x50) > > + enable_K6_wt_alloc(); > > +#endif > > + if ((cpu_id & 0xf0) == 0xa0) > > + /* > > + * Make sure the TSC runs through > > + * suspension, otherwise we can't use > > + * it as timecounter > > + */ > > + wrmsr(0x1900, rdmsr(0x1900) | 0x20ULL); > > + break; > > Move of the code to initialize CPU from identcpu() to initializecpu() > seems to be a fix on its own. Since you are moving the fragments > around, would you mind start using CPUID_MODEL/STEPPING etc constants ? > The code was ancient, probably predating the defines. I will probably split this up into a couple of commits one of which will be to move register setting from identcpu.c to initcpu.c. I can look at using the constants, but in particular when using CPUID_TO_*() the logic is slightly different (e.g. you have to check for model and family values for '6' instead of '60' or '600'), so I would prefer to do those changes as a separate commit to help with debugging in the future if I get one wrong. > > --- //depot/vendor/freebsd/src/sys/i386/xen/mp_machdep.c > > +++ //depot/user/jhb/acpipci/i386/xen/mp_machdep.c > > @@ -602,17 +602,8 @@ > > > > npxinit(); > > > > #if 0 > > > > - /* set up SSE registers */ > > - enable_sse(); > > -#endif > > -#if 0 && defined(PAE) > > - /* Enable the PTE no-execute bit. */ > > - if ((amd_feature & AMDID_NX) != 0) { > > - uint64_t msr; > > - > > - msr = rdmsr(MSR_EFER) | EFER_NXE; > > - wrmsr(MSR_EFER, msr); > > - } > > + /* set up SSE/NX registers */ > > I suggest removing 'registers' from the comment above. Ok. Note that this is just a copy of the code in amd64/i386, but I will fix all three. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 15:59:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64D7152B; Wed, 10 Sep 2014 15:59:08 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C77C1716; Wed, 10 Sep 2014 15:59:08 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3CC7AB9C9; Wed, 10 Sep 2014 11:59:07 -0400 (EDT) From: John Baldwin To: Aleksandr Rybalko Subject: Re: svn commit: r271381 - head/sys/dev/vt Date: Wed, 10 Sep 2014 10:30:17 -0400 Message-ID: <4782868.n8ASJ9z6dM@ralph.baldwin.cx> User-Agent: KMail/4.10.5 (FreeBSD/10.0-STABLE; KDE/4.10.5; amd64; ; ) In-Reply-To: <201409101113.s8ABDEKi090971@svn.freebsd.org> References: <201409101113.s8ABDEKi090971@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 10 Sep 2014 11:59:07 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 15:59:08 -0000 On Wednesday, September 10, 2014 11:13:14 AM Aleksandr Rybalko wrote: > Author: ray > Date: Wed Sep 10 11:13:13 2014 > New Revision: 271381 > URL: http://svnweb.freebsd.org/changeset/base/271381 > > Log: > o Add sysctls to enable/disable potentially dengerous key combinations, > like reboot/halt/debug. > o Add support for most key combinations supported by syscons(4). > > Reviewed by: dumbbell, emaste (prev revision of D747) > MFC after: 5 days > Sponsored by: The FreeBSD Foundation Thanks! -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 16:26:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9596C7FA; Wed, 10 Sep 2014 16:26:19 +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 81C091B02; Wed, 10 Sep 2014 16:26: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 s8AGQJNl051818; Wed, 10 Sep 2014 16:26:19 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8AGQIdk051812; Wed, 10 Sep 2014 16:26:18 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409101626.s8AGQIdk051812@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 10 Sep 2014 16:26:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271400 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 16:26:19 -0000 Author: ae Date: Wed Sep 10 16:26:18 2014 New Revision: 271400 URL: http://svnweb.freebsd.org/changeset/base/271400 Log: Add scope zone id to the in_endpoints and hc_metrics structures. A non-global IPv6 address can be used in more than one zone of the same scope. This zone index is used to identify to which zone a non-global address belongs. Also we can have many foreign hosts with equal non-global addresses, but from different zones. So, they can have different metrics in the host cache. Obtained from: Yandex LLC Sponsored by: Yandex LLC Modified: head/sys/netinet/in_pcb.h head/sys/netinet/tcp_hostcache.c head/sys/netinet/tcp_hostcache.h Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Wed Sep 10 15:45:18 2014 (r271399) +++ head/sys/netinet/in_pcb.h Wed Sep 10 16:26:18 2014 (r271400) @@ -94,6 +94,7 @@ struct in_endpoints { struct in_addr_4in6 ie46_local; struct in6_addr ie6_local; } ie_dependladdr; + u_int32_t ie6_zoneid; /* scope zone id */ }; #define ie_faddr ie_dependfaddr.ie46_foreign.ia46_addr4 #define ie_laddr ie_dependladdr.ie46_local.ia46_addr4 @@ -124,6 +125,7 @@ struct in_conninfo { #define inc_laddr inc_ie.ie_laddr #define inc6_faddr inc_ie.ie6_faddr #define inc6_laddr inc_ie.ie6_laddr +#define inc6_zoneid inc_ie.ie6_zoneid struct icmp6_filter; @@ -229,6 +231,7 @@ struct inpcb { #define in6p_faddr inp_inc.inc6_faddr #define in6p_laddr inp_inc.inc6_laddr +#define in6p_zoneid inp_inc.inc6_zoneid #define in6p_hops inp_depend6.inp6_hops /* default hop limit */ #define in6p_flowinfo inp_flow #define in6p_options inp_depend6.inp6_options Modified: head/sys/netinet/tcp_hostcache.c ============================================================================== --- head/sys/netinet/tcp_hostcache.c Wed Sep 10 15:45:18 2014 (r271399) +++ head/sys/netinet/tcp_hostcache.c Wed Sep 10 16:26:18 2014 (r271400) @@ -295,6 +295,7 @@ tcp_hc_lookup(struct in_conninfo *inc) */ TAILQ_FOREACH(hc_entry, &hc_head->hch_bucket, rmx_q) { if (inc->inc_flags & INC_ISIPV6) { + /* XXX: check ip6_zoneid */ if (memcmp(&inc->inc6_faddr, &hc_entry->ip6, sizeof(inc->inc6_faddr)) == 0) return hc_entry; @@ -386,9 +387,10 @@ tcp_hc_insert(struct in_conninfo *inc) * Initialize basic information of hostcache entry. */ bzero(hc_entry, sizeof(*hc_entry)); - if (inc->inc_flags & INC_ISIPV6) - bcopy(&inc->inc6_faddr, &hc_entry->ip6, sizeof(hc_entry->ip6)); - else + if (inc->inc_flags & INC_ISIPV6) { + hc_entry->ip6 = inc->inc6_faddr; + hc_entry->ip6_zoneid = inc->inc6_zoneid; + } else hc_entry->ip4 = inc->inc_faddr; hc_entry->rmx_head = hc_head; hc_entry->rmx_expire = V_tcp_hostcache.expire; Modified: head/sys/netinet/tcp_hostcache.h ============================================================================== --- head/sys/netinet/tcp_hostcache.h Wed Sep 10 15:45:18 2014 (r271399) +++ head/sys/netinet/tcp_hostcache.h Wed Sep 10 16:26:18 2014 (r271400) @@ -51,6 +51,7 @@ struct hc_metrics { struct hc_head *rmx_head; /* head of bucket tail queue */ struct in_addr ip4; /* IP address */ struct in6_addr ip6; /* IP6 address */ + uint32_t ip6_zoneid; /* IPv6 scope zone id */ /* endpoint specific values for tcp */ u_long rmx_mtu; /* MTU for this path */ u_long rmx_ssthresh; /* outbound gateway buffer limit */ From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 16:50:15 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94DFE4F3; Wed, 10 Sep 2014 16:50:15 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 1E3F11D90; Wed, 10 Sep 2014 16:50:13 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA21947; Wed, 10 Sep 2014 19:40:30 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1XRkwX-000N0j-UU; Wed, 10 Sep 2014 19:40:29 +0300 Message-ID: <54107EC5.10806@FreeBSD.org> Date: Wed, 10 Sep 2014 19:39:33 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: John Baldwin , Aleksandr Rybalko Subject: Re: svn commit: r271381 - head/sys/dev/vt References: <201409101113.s8ABDEKi090971@svn.freebsd.org> <4782868.n8ASJ9z6dM@ralph.baldwin.cx> In-Reply-To: <4782868.n8ASJ9z6dM@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 16:50:15 -0000 On 10/09/2014 17:30, John Baldwin wrote: > On Wednesday, September 10, 2014 11:13:14 AM Aleksandr Rybalko wrote: >> Author: ray >> Date: Wed Sep 10 11:13:13 2014 >> New Revision: 271381 >> URL: http://svnweb.freebsd.org/changeset/base/271381 >> >> Log: >> o Add sysctls to enable/disable potentially dengerous key combinations, >> like reboot/halt/debug. >> o Add support for most key combinations supported by syscons(4). >> >> Reviewed by: dumbbell, emaste (prev revision of D747) >> MFC after: 5 days >> Sponsored by: The FreeBSD Foundation > > Thanks! It probably would have made sense to have kernel options that would control default values of these knobs. E.g. for syscons we have SC_DISABLE_REBOOT, etc. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 15:59:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F40D22DC; Wed, 10 Sep 2014 15:59:06 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCCB91712; Wed, 10 Sep 2014 15:59:06 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 9E76FB987; Wed, 10 Sep 2014 11:59:05 -0400 (EDT) From: John Baldwin To: Slawa Olhovchenkov Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm Date: Wed, 10 Sep 2014 10:44:46 -0400 Message-ID: <1540004.aItdQtGhVh@ralph.baldwin.cx> User-Agent: KMail/4.10.5 (FreeBSD/10.0-STABLE; KDE/4.10.5; amd64; ; ) In-Reply-To: <20140909102517.GA22834@zxy.spb.ru> References: <201408281950.s7SJo90I047213@svn.freebsd.org> <16592453.QchvydMH6M@ralph.baldwin.cx> <20140909102517.GA22834@zxy.spb.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 10 Sep 2014 11:59:05 -0400 (EDT) X-Mailman-Approved-At: Wed, 10 Sep 2014 17:26:50 +0000 Cc: src-committers@freebsd.org, Peter Wemm , Alan Cox , alc@freebsd.org, svn-src-all@freebsd.org, Dmitry Morozovsky , Andriy Gapon , Steven Hartland , "Matthew D. Fuller" , svn-src-head@freebsd.org, Nikolai Lifanov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 15:59:07 -0000 On Tuesday, September 09, 2014 02:25:18 PM Slawa Olhovchenkov wrote: > On Mon, Sep 08, 2014 at 11:17:51AM -0400, John Baldwin wrote: > > On Sunday, September 07, 2014 04:56:49 PM Slawa Olhovchenkov wrote: > > > PS: very bad that 'data limit' don't anymore reflect application > > > memory consumer. and very small application can adapt to 'no memory' > > > from system. > > > > You can use RLIMIT_AS instead of RLIMIT_DATA. jemalloc can also be > > configured to use sbrk(), though I think there's no way to prevent it > > from falling back to mmap(MAP_ANON) if sbrk() fails. > > Formally you are right. Realy this is scorn. And I don't know how > rightly. May be account in RLIMIT_DATA MAP_ANON? Anyway firefox don't > run GC if malloc fail and this is bad. It was not intended as scorn, simply stating what options you have available as alternatives to what you are asking for. The Firefox behavior certainly seems unfortunate. :( However, using RLIMIT_AS for that should work as the mmap() call malloc() makes will fail causing malloc() to fail. However, you need RLIMIT_AS to be a bit larger than what you would set RLIMIT_DATA to. As to having MAP_ANON honor RLIMIT_DATA, I'm not sure how well that would work. I assume that was discussed as an option in the previous threads on the topic of RLIMIT_DATA being useless with jemalloc. I don't recall it though. Perhaps Alan can speak to whether or not that is a good idea? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 19:00:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5801EAAC; Wed, 10 Sep 2014 19:00:18 +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 294DADB2; Wed, 10 Sep 2014 19:00:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8AJ0Iop025532; Wed, 10 Sep 2014 19:00:18 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8AJ0Huo025529; Wed, 10 Sep 2014 19:00:17 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201409101900.s8AJ0Huo025529@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 10 Sep 2014 19:00:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271401 - in head: tools/build/mk tools/build/options usr.sbin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 19:00:18 -0000 Author: asomers Date: Wed Sep 10 19:00:17 2014 New Revision: 271401 URL: http://svnweb.freebsd.org/changeset/base/271401 Log: Conditionalize build of etcupdate(8) on MK_RCS. Since etcupdate calls merge(1), which is part of the RCS package, it must not be installed if WITHOUT_RCS update is set. Otherwise, it will produce confusing errors. CR: https://reviews.freebsd.org/D691 MFC after: 1 week Sponsored by: Spectra Logic Modified: head/tools/build/mk/OptionalObsoleteFiles.inc head/tools/build/options/WITHOUT_RCS head/usr.sbin/Makefile Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Wed Sep 10 16:26:18 2014 (r271400) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Wed Sep 10 19:00:17 2014 (r271401) @@ -3797,6 +3797,7 @@ OLD_FILES+=usr/bin/rcsdiff OLD_FILES+=usr/bin/rcsfreeze OLD_FILES+=usr/bin/rcsmerge OLD_FILES+=usr/bin/rlog +OLD_FILES+=usr/sbin/etcupdate OLD_FILES+=usr/share/man/man1/ci.1.gz OLD_FILES+=usr/share/man/man1/co.1.gz OLD_FILES+=usr/share/man/man1/ident.1.gz @@ -3809,6 +3810,7 @@ OLD_FILES+=usr/share/man/man1/rcsintro.1 OLD_FILES+=usr/share/man/man1/rcsmerge.1.gz OLD_FILES+=usr/share/man/man1/rlog.1.gz OLD_FILES+=usr/share/man/man5/rcsfile.5.gz +OLD_FILES+=usr/share/man/man8/etcupdate.8.gz .endif #.if ${MK_RESCUE} == no Modified: head/tools/build/options/WITHOUT_RCS ============================================================================== --- head/tools/build/options/WITHOUT_RCS Wed Sep 10 16:26:18 2014 (r271400) +++ head/tools/build/options/WITHOUT_RCS Wed Sep 10 19:00:17 2014 (r271401) @@ -1,4 +1,6 @@ .\" $FreeBSD$ Set to not build .Xr rcs 1 -and related utilities. +, +.Xr etcupdate 8 +, and related utilities. Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Wed Sep 10 16:26:18 2014 (r271400) +++ head/usr.sbin/Makefile Wed Sep 10 19:00:17 2014 (r271401) @@ -26,7 +26,6 @@ SUBDIR= adduser \ digictl \ diskinfo \ dumpcis \ - etcupdate \ extattr \ extattrctl \ fifolog \ @@ -278,6 +277,10 @@ SUBDIR+= repquota SUBDIR+= rwhod .endif +.if ${MK_RCS} != "no" +SUBDIR+= etcupdate +.endif + .if ${MK_SENDMAIL} != "no" SUBDIR+= editmap SUBDIR+= mailstats From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 16:31:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4896A9C; Wed, 10 Sep 2014 16:31:04 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56B501B63; Wed, 10 Sep 2014 16:31:04 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.82 (FreeBSD)) (envelope-from ) id 1XRknK-0009XD-QC; Wed, 10 Sep 2014 20:30:58 +0400 Date: Wed, 10 Sep 2014 20:30:58 +0400 From: Slawa Olhovchenkov To: John Baldwin Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm Message-ID: <20140910163058.GA7129@zxy.spb.ru> References: <201408281950.s7SJo90I047213@svn.freebsd.org> <16592453.QchvydMH6M@ralph.baldwin.cx> <20140909102517.GA22834@zxy.spb.ru> <1540004.aItdQtGhVh@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1540004.aItdQtGhVh@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Mailman-Approved-At: Wed, 10 Sep 2014 19:08:09 +0000 Cc: src-committers@freebsd.org, Peter Wemm , Alan Cox , alc@freebsd.org, svn-src-all@freebsd.org, Dmitry Morozovsky , Andriy Gapon , Steven Hartland , "Matthew D. Fuller" , svn-src-head@freebsd.org, Nikolai Lifanov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 16:31:04 -0000 On Wed, Sep 10, 2014 at 10:44:46AM -0400, John Baldwin wrote: > On Tuesday, September 09, 2014 02:25:18 PM Slawa Olhovchenkov wrote: > > On Mon, Sep 08, 2014 at 11:17:51AM -0400, John Baldwin wrote: > > > On Sunday, September 07, 2014 04:56:49 PM Slawa Olhovchenkov wrote: > > > > PS: very bad that 'data limit' don't anymore reflect application > > > > memory consumer. and very small application can adapt to 'no memory' > > > > from system. > > > > > > You can use RLIMIT_AS instead of RLIMIT_DATA. jemalloc can also be > > > configured to use sbrk(), though I think there's no way to prevent it > > > from falling back to mmap(MAP_ANON) if sbrk() fails. > > > > Formally you are right. Realy this is scorn. And I don't know how > > rightly. May be account in RLIMIT_DATA MAP_ANON? Anyway firefox don't > > run GC if malloc fail and this is bad. > > It was not intended as scorn, simply stating what options you have Hmm, this is may bad english and try to translate some russian sentence. I am try to do some tuning for satisfaction me. You proposal do some limiting, but don't delight. > available as alternatives to what you are asking for. The Firefox > behavior certainly seems unfortunate. :( However, using RLIMIT_AS > for that should work as the mmap() call malloc() makes will fail > causing malloc() to fail. However, you need RLIMIT_AS to be a bit > larger than what you would set RLIMIT_DATA to. > > As to having MAP_ANON honor RLIMIT_DATA, I'm not sure how well that > would work. I assume that was discussed as an option in the previous > threads on the topic of RLIMIT_DATA being useless with jemalloc. > I don't recall it though. Perhaps Alan can speak to whether or not > that is a good idea? What is sense of RLIMIT_DATA (as I understand)? This is signaling to application of memory consumption. Limiting RSS don't visible to application. Application must change behaviour when reach limit (run GC, switch algorithm and etc.). But mmap of big data file for scaning and processing don't touch this limit. Must be mmap of some temoprary file touch this limit? I don't know. Must be MAP_ANON touch this limit? I think yes. How to make distinction of mmap data file for processing and mmap temporary file for bypass this limit? I don't know. And again, most application don't handle correctly NULL of malloc(). I think this is depreciate of all. PS: question about jemalloc. How I can stop jemalloc to give back memory to OS for some application? From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 19:22:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E514A33D; Wed, 10 Sep 2014 19:22: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 D0C409C; Wed, 10 Sep 2014 19:22: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 s8AJMEfs037068; Wed, 10 Sep 2014 19:22:14 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8AJMELx037067; Wed, 10 Sep 2014 19:22:14 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201409101922.s8AJMELx037067@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 10 Sep 2014 19:22:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271402 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 19:22:15 -0000 Author: asomers Date: Wed Sep 10 19:22:14 2014 New Revision: 271402 URL: http://svnweb.freebsd.org/changeset/base/271402 Log: Regen after 271401. Sponsored by: Spectra Logic Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Wed Sep 10 19:00:17 2014 (r271401) +++ head/share/man/man5/src.conf.5 Wed Sep 10 19:22:14 2014 (r271402) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd August 19, 2014 +.Dd September 10, 2014 .Dt SRC.CONF 5 .Os .Sh NAME @@ -926,10 +926,12 @@ This includes .Xr rsh 1 , etc. .It Va WITHOUT_RCS -.\" from FreeBSD: head/tools/build/options/WITHOUT_RCS 256198 2013-10-09 17:07:20Z gjb +.\" from FreeBSD: head/tools/build/options/WITHOUT_RCS 271401 2014-09-10 19:00:17Z asomers Set to not build .Xr rcs 1 -and related utilities. +, +.Xr etcupdate 8 +, and related utilities. .It Va WITHOUT_RESCUE .\" from FreeBSD: head/tools/build/options/WITHOUT_RESCUE 156932 2006-03-21 07:50:50Z ru Set to not build From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 18:34:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C677BE09; Wed, 10 Sep 2014 18:34:20 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 978DEB14; Wed, 10 Sep 2014 18:34:20 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 8067BB94F; Wed, 10 Sep 2014 14:34:19 -0400 (EDT) From: John Baldwin To: Slawa Olhovchenkov Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm Date: Wed, 10 Sep 2014 14:29:30 -0400 Message-ID: <1758851.BtHUmxkW3Q@ralph.baldwin.cx> User-Agent: KMail/4.10.5 (FreeBSD/10.0-STABLE; KDE/4.10.5; amd64; ; ) In-Reply-To: <20140910163058.GA7129@zxy.spb.ru> References: <201408281950.s7SJo90I047213@svn.freebsd.org> <1540004.aItdQtGhVh@ralph.baldwin.cx> <20140910163058.GA7129@zxy.spb.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 10 Sep 2014 14:34:19 -0400 (EDT) X-Mailman-Approved-At: Wed, 10 Sep 2014 19:28:24 +0000 Cc: src-committers@freebsd.org, Peter Wemm , Alan Cox , alc@freebsd.org, svn-src-all@freebsd.org, Dmitry Morozovsky , Andriy Gapon , Steven Hartland , "Matthew D. Fuller" , svn-src-head@freebsd.org, Nikolai Lifanov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 18:34:21 -0000 On Wednesday, September 10, 2014 08:30:58 PM Slawa Olhovchenkov wrote: > On Wed, Sep 10, 2014 at 10:44:46AM -0400, John Baldwin wrote: > > On Tuesday, September 09, 2014 02:25:18 PM Slawa Olhovchenkov wrote: > > > On Mon, Sep 08, 2014 at 11:17:51AM -0400, John Baldwin wrote: > > > > On Sunday, September 07, 2014 04:56:49 PM Slawa Olhovchenkov wrote: > > > > > PS: very bad that 'data limit' don't anymore reflect application > > > > > memory consumer. and very small application can adapt to 'no memory' > > > > > from system. > > > > > > > > You can use RLIMIT_AS instead of RLIMIT_DATA. jemalloc can also be > > > > configured to use sbrk(), though I think there's no way to prevent it > > > > from falling back to mmap(MAP_ANON) if sbrk() fails. > > > > > > Formally you are right. Realy this is scorn. And I don't know how > > > rightly. May be account in RLIMIT_DATA MAP_ANON? Anyway firefox don't > > > run GC if malloc fail and this is bad. > > > > It was not intended as scorn, simply stating what options you have > > Hmm, this is may bad english and try to translate some russian sentence. > I am try to do some tuning for satisfaction me. > You proposal do some limiting, but don't delight. Ok. > > available as alternatives to what you are asking for. The Firefox > > behavior certainly seems unfortunate. :( However, using RLIMIT_AS > > for that should work as the mmap() call malloc() makes will fail > > causing malloc() to fail. However, you need RLIMIT_AS to be a bit > > larger than what you would set RLIMIT_DATA to. > > > > As to having MAP_ANON honor RLIMIT_DATA, I'm not sure how well that > > would work. I assume that was discussed as an option in the previous > > threads on the topic of RLIMIT_DATA being useless with jemalloc. > > I don't recall it though. Perhaps Alan can speak to whether or not > > that is a good idea? > > What is sense of RLIMIT_DATA (as I understand)? > This is signaling to application of memory consumption. Yes, traditionally it only affected malloc() and not other portions of the address space like the stack (RLIMIT_STACK) or anything in shared libraries (including text/data/bss). > Limiting RSS don't visible to application. Yes, RLIMIT_RSS is not often useful because it is not synchronous with the RSS changing. > Application must change behaviour when reach limit (run GC, switch > algorithm and etc.). > But mmap of big data file for scaning and processing don't touch this > limit. > Must be mmap of some temoprary file touch this limit? I don't know. > Must be MAP_ANON touch this limit? I think yes. > How to make distinction of mmap data file for processing and mmap > temporary file for bypass this limit? I don't know. Consider also mmap() of shm_open(SHM_ANON). > And again, most application don't handle correctly NULL of malloc(). > I think this is depreciate of all. This is true, but it seems Firefox might, and you could set RLIMIT_AS for Firefox in particular so it gets adequate feedback. I do think if you can determine the "correct" value for RLIMIT_AS for Firefox that mmap(MAP_ANON) would fail and result in NULL from malloc(). > PS: question about jemalloc. How I can stop jemalloc to give back > memory to OS for some application? You would have to hack pages_purge() in chunk_mmap.c to always return true and not call madvise(). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 19:29:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37E487B5; Wed, 10 Sep 2014 19:29:29 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D95C9121; Wed, 10 Sep 2014 19:29:28 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.82 (FreeBSD)) (envelope-from ) id 1XRnZx-000CHD-Fa; Wed, 10 Sep 2014 23:29:21 +0400 Date: Wed, 10 Sep 2014 23:29:21 +0400 From: Slawa Olhovchenkov To: John Baldwin Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm Message-ID: <20140910192921.GB7129@zxy.spb.ru> References: <201408281950.s7SJo90I047213@svn.freebsd.org> <1540004.aItdQtGhVh@ralph.baldwin.cx> <20140910163058.GA7129@zxy.spb.ru> <1758851.BtHUmxkW3Q@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1758851.BtHUmxkW3Q@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Mailman-Approved-At: Wed, 10 Sep 2014 19:35:20 +0000 Cc: src-committers@freebsd.org, Peter Wemm , Alan Cox , alc@freebsd.org, svn-src-all@freebsd.org, Dmitry Morozovsky , Andriy Gapon , Steven Hartland , "Matthew D. Fuller" , svn-src-head@freebsd.org, Nikolai Lifanov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 19:29:29 -0000 On Wed, Sep 10, 2014 at 02:29:30PM -0400, John Baldwin wrote: > > Application must change behaviour when reach limit (run GC, switch > > algorithm and etc.). > > But mmap of big data file for scaning and processing don't touch this > > limit. > > Must be mmap of some temoprary file touch this limit? I don't know. > > Must be MAP_ANON touch this limit? I think yes. > > How to make distinction of mmap data file for processing and mmap > > temporary file for bypass this limit? I don't know. > > Consider also mmap() of shm_open(SHM_ANON). No, shm limited separatly. mmap of shm_open(SHM_ANON) don't need to adjust this limit. > > And again, most application don't handle correctly NULL of malloc(). > > I think this is depreciate of all. > > This is true, but it seems Firefox might, and you could set RLIMIT_AS > for Firefox in particular so it gets adequate feedback. I do think if > you can determine the "correct" value for RLIMIT_AS for Firefox that > mmap(MAP_ANON) would fail and result in NULL from malloc(). I am do some time ago firefox limiting by ulimit -v, firefox just crashing. Don't run GC or something else. > > PS: question about jemalloc. How I can stop jemalloc to give back > > memory to OS for some application? > > You would have to hack pages_purge() in chunk_mmap.c to always return true and > not call madvise(). And got memory leak? I am talk about change behaviour from periodic mmap and madvise memory to only mmap when need and leave for future use when freed by aplication. I think (may be wrong -- please correct) in some cases mmap/madvise will be too often. From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 19:53:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 026E3EDE; Wed, 10 Sep 2014 19:53: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 E22233DB; Wed, 10 Sep 2014 19:53:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8AJrVTo051245; Wed, 10 Sep 2014 19:53:31 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8AJrVYv051244; Wed, 10 Sep 2014 19:53:31 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409101953.s8AJrVYv051244@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 10 Sep 2014 19:53:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271403 - head/sys/dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 19:53:32 -0000 Author: mav Date: Wed Sep 10 19:53:31 2014 New Revision: 271403 URL: http://svnweb.freebsd.org/changeset/base/271403 Log: Add PCI ID for Promise TX8660 8-port 3Gbps HBA. This device reports RAID subclass, but appears to be AHCI compatible. Submitted by: Yuri Perejilin MFC after: 1 week Modified: head/sys/dev/ahci/ahci_pci.c Modified: head/sys/dev/ahci/ahci_pci.c ============================================================================== --- head/sys/dev/ahci/ahci_pci.c Wed Sep 10 19:22:14 2014 (r271402) +++ head/sys/dev/ahci/ahci_pci.c Wed Sep 10 19:53:31 2014 (r271403) @@ -273,6 +273,7 @@ static struct { {0x0d8d10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, {0x0d8e10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, {0x0d8f10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x3781105a, 0x00, "Promise TX8660", 0}, {0x33491106, 0x00, "VIA VT8251", AHCI_Q_NOPMP|AHCI_Q_NONCQ}, {0x62871106, 0x00, "VIA VT8251", AHCI_Q_NOPMP|AHCI_Q_NONCQ}, {0x11841039, 0x00, "SiS 966", 0}, From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 21:04:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 059DA31F; Wed, 10 Sep 2014 21:04: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 E52AEC8B; Wed, 10 Sep 2014 21:04:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8AL4iFl068736; Wed, 10 Sep 2014 21:04:44 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8AL4iK1068732; Wed, 10 Sep 2014 21:04:44 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409102104.s8AL4iK1068732@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 10 Sep 2014 21:04:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271405 - in head/sys: i386/i386 i386/include x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 21:04:45 -0000 Author: jhb Date: Wed Sep 10 21:04:44 2014 New Revision: 271405 URL: http://svnweb.freebsd.org/changeset/base/271405 Log: Move code to set various MSRs on AMD cpus out of printcpuinfo() and into initalizecpu() instead. Modified: head/sys/i386/i386/initcpu.c head/sys/i386/include/md_var.h head/sys/x86/x86/identcpu.c Modified: head/sys/i386/i386/initcpu.c ============================================================================== --- head/sys/i386/i386/initcpu.c Wed Sep 10 20:23:10 2014 (r271404) +++ head/sys/i386/i386/initcpu.c Wed Sep 10 21:04:44 2014 (r271405) @@ -59,6 +59,12 @@ static void init_i486_on_386(void); static void init_6x86(void); #endif /* I486_CPU */ +#if defined(I586_CPU) && defined(CPU_WT_ALLOC) +static void enable_K5_wt_alloc(void); +static void enable_K6_wt_alloc(void); +static void enable_K6_2_wt_alloc(void); +#endif + #ifdef I686_CPU static void init_6x86MX(void); static void init_ppro(void); @@ -692,6 +698,27 @@ initializecpu(void) #ifdef I586_CPU case CPU_586: switch (cpu_vendor_id) { + case CPU_VENDOR_AMD: +#ifdef CPU_WT_ALLOC + if (((cpu_id & 0x0f0) > 0) && + ((cpu_id & 0x0f0) < 0x60) && + ((cpu_id & 0x00f) > 3)) + enable_K5_wt_alloc(); + else if (((cpu_id & 0x0f0) > 0x80) || + (((cpu_id & 0x0f0) == 0x80) && + (cpu_id & 0x00f) > 0x07)) + enable_K6_2_wt_alloc(); + else if ((cpu_id & 0x0f0) > 0x50) + enable_K6_wt_alloc(); +#endif + if ((cpu_id & 0xf0) == 0xa0) + /* + * Make sure the TSC runs through + * suspension, otherwise we can't use + * it as timecounter + */ + wrmsr(0x1900, rdmsr(0x1900) | 0x20ULL); + break; case CPU_VENDOR_CENTAUR: init_winchip(); break; @@ -839,7 +866,7 @@ initializecpu(void) * Enable write allocate feature of AMD processors. * Following two functions require the Maxmem variable being set. */ -void +static void enable_K5_wt_alloc(void) { u_int64_t msr; @@ -885,7 +912,7 @@ enable_K5_wt_alloc(void) } } -void +static void enable_K6_wt_alloc(void) { quad_t size; @@ -945,7 +972,7 @@ enable_K6_wt_alloc(void) intr_restore(saveintr); } -void +static void enable_K6_2_wt_alloc(void) { quad_t size; Modified: head/sys/i386/include/md_var.h ============================================================================== --- head/sys/i386/include/md_var.h Wed Sep 10 20:23:10 2014 (r271404) +++ head/sys/i386/include/md_var.h Wed Sep 10 21:04:44 2014 (r271405) @@ -99,11 +99,6 @@ void doreti_popl_fs_fault(void) __asm(__ void dump_add_page(vm_paddr_t); void dump_drop_page(vm_paddr_t); void finishidentcpu(void); -#if defined(I586_CPU) && defined(CPU_WT_ALLOC) -void enable_K5_wt_alloc(void); -void enable_K6_wt_alloc(void); -void enable_K6_2_wt_alloc(void); -#endif void enable_sse(void); void fillw(int /*u_short*/ pat, void *base, size_t cnt); void initializecpu(void); Modified: head/sys/x86/x86/identcpu.c ============================================================================== --- head/sys/x86/x86/identcpu.c Wed Sep 10 20:23:10 2014 (r271404) +++ head/sys/x86/x86/identcpu.c Wed Sep 10 21:04:44 2014 (r271405) @@ -405,30 +405,11 @@ printcpuinfo(void) break; case 0x5a0: strcat(cpu_model, "Geode LX"); - /* - * Make sure the TSC runs through suspension, - * otherwise we can't use it as timecounter - */ - wrmsr(0x1900, rdmsr(0x1900) | 0x20ULL); break; default: strcat(cpu_model, "Unknown"); break; } -#if defined(I586_CPU) && defined(CPU_WT_ALLOC) - if ((cpu_id & 0xf00) == 0x500) { - if (((cpu_id & 0x0f0) > 0) - && ((cpu_id & 0x0f0) < 0x60) - && ((cpu_id & 0x00f) > 3)) - enable_K5_wt_alloc(); - else if (((cpu_id & 0x0f0) > 0x80) - || (((cpu_id & 0x0f0) == 0x80) - && (cpu_id & 0x00f) > 0x07)) - enable_K6_2_wt_alloc(); - else if ((cpu_id & 0x0f0) > 0x50) - enable_K6_wt_alloc(); - } -#endif #else if ((cpu_id & 0xf00) == 0xf00) strcat(cpu_model, "AMD64 Processor"); From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 21:07:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BEA42602; Wed, 10 Sep 2014 21:07:01 +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 A8906CB8; Wed, 10 Sep 2014 21:07:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8AL71VB069273; Wed, 10 Sep 2014 21:07:01 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8AL701H069256; Wed, 10 Sep 2014 21:07:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201409102107.s8AL701H069256@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 10 Sep 2014 21:07:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271406 - in head/sys/boot: ficl forth i386/libi386 i386/loader X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 21:07:01 -0000 Author: imp Date: Wed Sep 10 21:07:00 2014 New Revision: 271406 URL: http://svnweb.freebsd.org/changeset/base/271406 Log: Add support for calling pcibios routines from the bootloader. Implement the following routines: pcibios-device-count count the number of instances of a devid pcibios-read-config read pci config space pcibios-write-config write pci config space pcibios-find-devclass find the nth device with a given devclass pcibios-find-device find the nth device with a given devid pcibios-locator convert bus device function ti pcibios locator These commands are thin wrappers over their PCI BIOS 2.1 counterparts. More informaiton, such as it is, can be found in the standard. Export a nunmber of pcibios.X variables into the environment to report what the PCI IDENTIFY command returned. Also implmenet a new command line primitive (pci-device-count), but don't include it by default just yet, since it depends on the recently added words and any errors here can render a system unbootable. This is intended to allow the boot loader to do special things based on the hardware it finds. This could be have special settings that are optimized for the specific cards, or even loading special drivers. It goes without saying that writing to pci config space should not be done without a just cause and a sound mind. Sponsored by: Netflix Added: head/sys/boot/forth/pcibios.4th (contents, props changed) Modified: head/sys/boot/ficl/loader.c head/sys/boot/i386/libi386/biospci.c head/sys/boot/i386/libi386/libi386.h head/sys/boot/i386/loader/Makefile head/sys/boot/i386/loader/main.c Modified: head/sys/boot/ficl/loader.c ============================================================================== --- head/sys/boot/ficl/loader.c Wed Sep 10 21:04:44 2014 (r271405) +++ head/sys/boot/ficl/loader.c Wed Sep 10 21:07:00 2014 (r271406) @@ -727,6 +727,142 @@ static void fkey(FICL_VM *pVM) return; } + +#ifdef __i386__ +/* + * pcibios-device-count (devid -- count) + * + * Returns the PCI BIOS' count of how many devices matching devid are in the system. + * devid is the 32-bit vendor + device. + */ +static void +ficlPciBiosCountDevices(FICL_VM *pVM) +{ + uint32_t devid; + int i; + + devid = stackPopINT(pVM->pStack); + + i = biospci_count_device_type(devid); + + stackPushINT(pVM->pStack, i); +} + +/* + * pcibios-write-config (locator offset width value -- ) + * + * Writes the specified config register. + * Locator is bus << 8 | device << 3 | fuction + * offset is the pci config register + * width is 0 for byte, 1 for word, 2 for dword + * value is the value to write + */ +static void +ficlPciBiosWriteConfig(FICL_VM *pVM) +{ + uint32_t value, width, offset, locator; + + value = stackPopINT(pVM->pStack); + width = stackPopINT(pVM->pStack); + offset = stackPopINT(pVM->pStack); + locator = stackPopINT(pVM->pStack); + + biospci_write_config(locator, offset, width, value); +} + +/* + * pcibios-read-config (locator offset width -- value) + * + * Reads the specified config register. + * Locator is bus << 8 | device << 3 | fuction + * offset is the pci config register + * width is 0 for byte, 1 for word, 2 for dword + * value is the value to read from the register + */ +static void +ficlPciBiosReadConfig(FICL_VM *pVM) +{ + uint32_t value, width, offset, locator; + + width = stackPopINT(pVM->pStack); + offset = stackPopINT(pVM->pStack); + locator = stackPopINT(pVM->pStack); + + biospci_read_config(locator, offset, width, &value); + + stackPushINT(pVM->pStack, value); +} + +/* + * pcibios-find-devclass (class index -- locator) + * + * Finds the index'th instance of class in the pci tree. + * must be an exact match. + * class is the class to search for. + * index 0..N (set to 0, increment until error) + * + * Locator is bus << 8 | device << 3 | fuction (or -1 on error) + */ +static void +ficlPciBiosFindDevclass(FICL_VM *pVM) +{ + uint32_t index, class, locator; + + index = stackPopINT(pVM->pStack); + class = stackPopINT(pVM->pStack); + + if (biospci_find_devclass(class, index, &locator)) + locator = 0xffffffff; + + stackPushINT(pVM->pStack, locator); +} + +/* + * pcibios-find-device(devid index -- locator) + * + * Finds the index'th instance of devid in the pci tree. + * must be an exact match. + * class is the class to search for. + * index 0..N (set to 0, increment until error) + * + * Locator is bus << 8 | device << 3 | fuction (or -1 on error) + */ +static void +ficlPciBiosFindDevice(FICL_VM *pVM) +{ + uint32_t index, devid, locator; + + index = stackPopINT(pVM->pStack); + devid = stackPopINT(pVM->pStack); + + if (biospci_find_device(devid, index, &locator)) + locator = 0xffffffff; + + stackPushINT(pVM->pStack, locator); +} + +/* + * pcibios-find-device(bus device function -- locator) + * + * converts bus, device, function to locator. + * + * Locator is bus << 8 | device << 3 | fuction + */ +static void +ficlPciBiosLocator(FICL_VM *pVM) +{ + uint32_t bus, device, function, locator; + + function = stackPopINT(pVM->pStack); + device = stackPopINT(pVM->pStack); + bus = stackPopINT(pVM->pStack); + + locator = biospci_locator(bus, device, function); + + stackPushINT(pVM->pStack, locator); +} +#endif + /* ** Retrieves free space remaining on the dictionary */ @@ -749,7 +885,6 @@ static void ficlDictIncrease(FICL_VM *pV stackPushPtr(pVM->pStack, &dictIncrease); } - /************************************************************************** f i c l C o m p i l e P l a t f o r m ** Build FreeBSD platform extensions into the system dictionary @@ -795,6 +930,14 @@ void ficlCompilePlatform(FICL_SYSTEM *pS dictAppendWord(dp, "pnphandlers",ficlPnphandlers, FW_DEFAULT); #endif #endif +#ifdef __i386__ + dictAppendWord(dp, "pcibios-device-count", ficlPciBiosCountDevices, FW_DEFAULT); + dictAppendWord(dp, "pcibios-read-config", ficlPciBiosReadConfig, FW_DEFAULT); + dictAppendWord(dp, "pcibios-write-config", ficlPciBiosWriteConfig, FW_DEFAULT); + dictAppendWord(dp, "pcibios-find-devclass", ficlPciBiosFindDevclass, FW_DEFAULT); + dictAppendWord(dp, "pcibios-find-device", ficlPciBiosFindDevice, FW_DEFAULT); + dictAppendWord(dp, "pcibios-locator", ficlPciBiosLocator, FW_DEFAULT); +#endif #if defined(PC98) ficlSetEnv(pSys, "arch-pc98", FICL_TRUE); @@ -808,4 +951,3 @@ void ficlCompilePlatform(FICL_SYSTEM *pS return; } - Added: head/sys/boot/forth/pcibios.4th ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/forth/pcibios.4th Wed Sep 10 21:07:00 2014 (r271406) @@ -0,0 +1,47 @@ +\ Copyright (c) 2014 M. Warner Losh +\ All rights reserved. +\ +\ Redistribution and use in source and binary forms, with or without +\ modification, are permitted provided that the following conditions +\ are met: +\ 1. Redistributions of source code must retain the above copyright +\ notice, this list of conditions and the following disclaimer. +\ 2. Redistributions in binary form must reproduce the above copyright +\ notice, this list of conditions and the following disclaimer in the +\ documentation and/or other materials provided with the distribution. +\ +\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +\ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +\ SUCH DAMAGE. +\ +\ $FreeBSD$ + +only forth also support-functions also builtins definitions + +\ pci-device-count pci-id +\ +\ Counts the number of instances of pci-id in the system and reports +\ it to the user. +: pci-device-count + 0= if ( interpreted ) get_arguments then + + 0= if ." Need an argument" cr abort then + \ First argument is 0 when we're interprated. See support.4th + \ for get_arguments reading the rest of the line and parsing it + \ stack: argN lenN ... arg1 len1 N + hex ?number decimal + 0= if ." Bad pci-id given (must be legal hex value)" cr abort then + dup pcibios-device-count ." Found " . ." instances of " hex . decimal cr +; + +also forth definitions also builtins + +builtin: pci-device-count Modified: head/sys/boot/i386/libi386/biospci.c ============================================================================== --- head/sys/boot/i386/libi386/biospci.c Wed Sep 10 21:04:44 2014 (r271405) +++ head/sys/boot/i386/libi386/biospci.c Wed Sep 10 21:07:00 2014 (r271406) @@ -192,43 +192,78 @@ static struct pci_class static void biospci_enumerate(void); static void biospci_addinfo(int devid, struct pci_class *pc, struct pci_subclass *psc, struct pci_progif *ppi); -static int biospci_version; -static int biospci_hwcap; - struct pnphandler biospcihandler = { "PCI BIOS", biospci_enumerate }; -static void -biospci_enumerate(void) +#define PCI_BIOS_PRESENT 0xb101 +#define FIND_PCI_DEVICE 0xb102 +#define FIND_PCI_CLASS_CODE 0xb103 +#define GENERATE_SPECIAL_CYCLE 0xb106 +#define READ_CONFIG_BYTE 0xb108 +#define READ_CONFIG_WORD 0xb109 +#define READ_CONFIG_DWORD 0xb10a +#define WRITE_CONFIG_BYTE 0xb10b +#define WRITE_CONFIG_WORD 0xb10c +#define WRITE_CONFIG_DWORD 0xb10d +#define GET_IRQ_ROUTING_OPTIONS 0xb10e +#define SET_PCI_IRQ 0xb10f + +#define PCI_INT 0x1a + +#define PCI_SIGNATURE 0x20494350 /* AKA "PCI " */ + +void +biospci_detect(void) { - int device_index, err; - uint32_t locator, devid; - struct pci_class *pc; - struct pci_subclass *psc; - struct pci_progif *ppi; + uint16_t version, hwcap, maxbus; + char buf[24]; /* Find the PCI BIOS */ v86.ctl = V86_FLAGS; - v86.addr = 0x1a; - v86.eax = 0xb101; + v86.addr = PCI_INT; + v86.eax = PCI_BIOS_PRESENT; v86.edi = 0x0; v86int(); /* Check for OK response */ if (V86_CY(v86.efl) || ((v86.eax & 0xff00) != 0) || - (v86.edx != 0x20494350)) + (v86.edx != PCI_SIGNATURE)) return; - biospci_version = v86.ebx & 0xffff; - biospci_hwcap = v86.eax & 0xff; + version = v86.ebx & 0xffff; + hwcap = v86.eax & 0xff; + maxbus = v86.ecx & 0xff; #if 0 - printf("PCI BIOS %d.%d%s%s\n", - bcd2bin((biospci_version >> 8) & 0xf), bcd2bin(biospci_version & 0xf), - (biospci_hwcap & 1) ? " config1" : "", (biospci_hwcap & 2) ? " config2" : ""); + printf("PCI BIOS %d.%d%s%s maxbus %d\n", + bcd2bin((version >> 8) & 0xf), bcd2bin(version & 0xf), + (hwcap & 1) ? " config1" : "", (hwcap & 2) ? " config2" : "", + maxbus); #endif + sprintf(buf, "%d", bcd2bin((version >> 8) & 0xf)); + setenv("pcibios.major", buf, 1); + sprintf(buf, "%d", bcd2bin(version & 0xf)); + setenv("pcibios.minor", buf, 1); + sprintf(buf, "%d", !!(hwcap & 1)); + setenv("pcibios.config1", buf, 1); + sprintf(buf, "%d", !!(hwcap & 2)); + setenv("pcibios.config2", buf, 1); + sprintf(buf, "%d", maxbus); + setenv("pcibios.maxbus", buf, 1); + +} + +static void +biospci_enumerate(void) +{ + int device_index, err; + uint32_t locator, devid; + struct pci_class *pc; + struct pci_subclass *psc; + struct pci_progif *ppi; + /* Iterate over known classes */ for (pc = pci_classes; pc->pc_class >= 0; pc++) { /* Iterate over subclasses */ @@ -289,8 +324,8 @@ int biospci_find_devclass(uint32_t class, int index, uint32_t *locator) { v86.ctl = V86_FLAGS; - v86.addr = 0x1a; - v86.eax = 0xb103; + v86.addr = PCI_INT; + v86.eax = FIND_PCI_CLASS_CODE; v86.ecx = class; v86.esi = index; v86int(); @@ -302,6 +337,25 @@ biospci_find_devclass(uint32_t class, in *locator = v86.ebx; return (0); } + +int +biospci_find_device(uint32_t devid, int index, uint32_t *locator) +{ + v86.ctl = V86_FLAGS; + v86.addr = PCI_INT; + v86.eax = FIND_PCI_DEVICE; + v86.edx = devid & 0xffff; /* EDX - Vendor ID */ + v86.ecx = (devid >> 16) & 0xffff; /* ECX - Device ID */ + v86.esi = index; + v86int(); + + /* error */ + if (V86_CY(v86.efl) || (v86.eax & 0xff00)) + return (-1); + + *locator = v86.ebx; + return (0); +} /* * Configuration space access methods. * width = 0(byte), 1(word) or 2(dword). @@ -310,8 +364,8 @@ int biospci_write_config(uint32_t locator, int offset, int width, uint32_t val) { v86.ctl = V86_FLAGS; - v86.addr = 0x1a; - v86.eax = 0xb10b + width; + v86.addr = PCI_INT; + v86.eax = WRITE_CONFIG_BYTE + width; v86.ebx = locator; v86.edi = offset; v86.ecx = val; @@ -328,8 +382,8 @@ int biospci_read_config(uint32_t locator, int offset, int width, uint32_t *val) { v86.ctl = V86_FLAGS; - v86.addr = 0x1a; - v86.eax = 0xb108 + width; + v86.addr = PCI_INT; + v86.eax = READ_CONFIG_BYTE + width; v86.ebx = locator; v86.edi = offset; v86int(); @@ -348,3 +402,27 @@ biospci_locator(int8_t bus, uint8_t devi return ((bus << 8) | ((device & 0x1f) << 3) | (function & 0x7)); } + +/* + * Counts the number of instances of devid we have in the system, as least as + * far as the PCI BIOS is able to tell. + */ +int +biospci_count_device_type(uint32_t devid) +{ + int i; + + for (i = 0; 1; i++) { + v86.ctl = V86_FLAGS; + v86.addr = PCI_INT; + v86.eax = FIND_PCI_DEVICE; + v86.edx = devid & 0xffff; /* EDX - Vendor ID */ + v86.ecx = (devid >> 16) & 0xffff; /* ECX - Device ID */ + v86.esi = i; + v86int(); + if (V86_CY(v86.efl) || (v86.eax & 0xff00)) + break; + + } + return i; +} Modified: head/sys/boot/i386/libi386/libi386.h ============================================================================== --- head/sys/boot/i386/libi386/libi386.h Wed Sep 10 21:04:44 2014 (r271405) +++ head/sys/boot/i386/libi386/libi386.h Wed Sep 10 21:07:00 2014 (r271406) @@ -103,7 +103,10 @@ extern vm_offset_t memtop_copyin; /* mem extern uint32_t high_heap_size; /* extended memory region available */ extern vm_offset_t high_heap_base; /* for use as the heap */ +void biospci_detect(void); +int biospci_count_device_type(uint32_t devid); int biospci_find_devclass(uint32_t class, int index, uint32_t *locator); +int biospci_find_device(uint32_t devid, int index, uint32_t *locator); int biospci_write_config(uint32_t locator, int offset, int width, uint32_t val); int biospci_read_config(uint32_t locator, int offset, int width, uint32_t *val); uint32_t biospci_locator(int8_t bus, uint8_t device, uint8_t function); Modified: head/sys/boot/i386/loader/Makefile ============================================================================== --- head/sys/boot/i386/loader/Makefile Wed Sep 10 21:04:44 2014 (r271405) +++ head/sys/boot/i386/loader/Makefile Wed Sep 10 21:07:00 2014 (r271406) @@ -110,6 +110,7 @@ FILES+= loader.help loader.4th support.4 FILES+= screen.4th frames.4th beastie.4th FILES+= brand.4th check-password.4th color.4th delay.4th FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th +FILES+= pcibios.4th FILESDIR_loader.conf= /boot/defaults .if !exists(${DESTDIR}/boot/loader.rc) Modified: head/sys/boot/i386/loader/main.c ============================================================================== --- head/sys/boot/i386/loader/main.c Wed Sep 10 21:04:44 2014 (r271405) +++ head/sys/boot/i386/loader/main.c Wed Sep 10 21:07:00 2014 (r271406) @@ -183,6 +183,9 @@ main(void) /* detect SMBIOS for future reference */ smbios_detect(); + /* detect PCI BIOS for future reference */ + biospci_detect(); + printf("\n"); printf("%s, Revision %s\n", bootprog_name, bootprog_rev); printf("(%s, %s)\n", bootprog_maker, bootprog_date); From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 21:24:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23CF9D5D; Wed, 10 Sep 2014 21:24: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 0FB10E75; Wed, 10 Sep 2014 21:24: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 s8ALOFa4078707; Wed, 10 Sep 2014 21:24:15 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8ALOFLd078706; Wed, 10 Sep 2014 21:24:15 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409102124.s8ALOFLd078706@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 10 Sep 2014 21:24:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271407 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 21:24:16 -0000 Author: mav Date: Wed Sep 10 21:24:15 2014 New Revision: 271407 URL: http://svnweb.freebsd.org/changeset/base/271407 Log: Extend UNMAP blacklist on all STEC SSD models. None of existing STEC devices need UNMAP or even support it well, having many limitations and even hanging sometimes executing those commands. New devices that may use UNMAP going to be released under HGST name. MFC after: 3 days Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Wed Sep 10 21:07:00 2014 (r271406) +++ head/sys/cam/scsi/scsi_da.c Wed Sep 10 21:24:15 2014 (r271407) @@ -354,9 +354,9 @@ static struct da_quirk_entry da_quirk_ta }, { /* - * The STEC 842 sometimes hang on UNMAP. + * The STEC SSDs sometimes hang on UNMAP. */ - {T_DIRECT, SIP_MEDIA_FIXED, "STEC", "S842E800M2", "*"}, + {T_DIRECT, SIP_MEDIA_FIXED, "STEC", "*", "*"}, /*quirks*/ DA_Q_NO_UNMAP }, /* USB mass storage devices supported by umass(4) */ From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 21:25:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC571EB1; Wed, 10 Sep 2014 21:25:55 +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 C7B71E82; Wed, 10 Sep 2014 21:25:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8ALPtTT078980; Wed, 10 Sep 2014 21:25:55 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8ALPtJv078977; Wed, 10 Sep 2014 21:25:55 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409102125.s8ALPtJv078977@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 10 Sep 2014 21:25:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271408 - in head/sys: i386/i386 i386/include x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 21:25:56 -0000 Author: jhb Date: Wed Sep 10 21:25:54 2014 New Revision: 271408 URL: http://svnweb.freebsd.org/changeset/base/271408 Log: To workaround an errata on certain Pentium Pro CPUs, i386 disables the local APIC in initializecpu() and re-enables it if the APIC code decides to use the local APIC after all. Rework this workaround slightly so that initializecpu() won't re-disable the local APIC if it is called after the APIC code re-enables the local APIC. Modified: head/sys/i386/i386/initcpu.c head/sys/i386/include/md_var.h head/sys/x86/x86/local_apic.c Modified: head/sys/i386/i386/initcpu.c ============================================================================== --- head/sys/i386/i386/initcpu.c Wed Sep 10 21:24:15 2014 (r271407) +++ head/sys/i386/i386/initcpu.c Wed Sep 10 21:25:54 2014 (r271408) @@ -533,6 +533,8 @@ init_6x86MX(void) intr_restore(saveintr); } +static int ppro_apic_used = -1; + static void init_ppro(void) { @@ -541,9 +543,29 @@ init_ppro(void) /* * Local APIC should be disabled if it is not going to be used. */ - apicbase = rdmsr(MSR_APICBASE); - apicbase &= ~APICBASE_ENABLED; - wrmsr(MSR_APICBASE, apicbase); + if (ppro_apic_used != 1) { + apicbase = rdmsr(MSR_APICBASE); + apicbase &= ~APICBASE_ENABLED; + wrmsr(MSR_APICBASE, apicbase); + ppro_apic_used = 0; + } +} + +/* + * If the local APIC is going to be used after being disabled above, + * re-enable it and don't disable it in the future. + */ +void +ppro_reenable_apic(void) +{ + u_int64_t apicbase; + + if (ppro_apic_used == 0) { + apicbase = rdmsr(MSR_APICBASE); + apicbase |= APICBASE_ENABLED; + wrmsr(MSR_APICBASE, apicbase); + ppro_apic_used = 1; + } } /* Modified: head/sys/i386/include/md_var.h ============================================================================== --- head/sys/i386/include/md_var.h Wed Sep 10 21:24:15 2014 (r271407) +++ head/sys/i386/include/md_var.h Wed Sep 10 21:25:54 2014 (r271408) @@ -109,6 +109,7 @@ int is_physical_memory(vm_paddr_t addr); int isa_nmi(int cd); vm_paddr_t kvtop(void *addr); void panicifcpuunsupported(void); +void ppro_reenable_apic(void); void printcpuinfo(void); void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int selec); int user_dbreg_trap(void); Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Wed Sep 10 21:24:15 2014 (r271407) +++ head/sys/x86/x86/local_apic.c Wed Sep 10 21:25:54 2014 (r271408) @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -1331,9 +1330,6 @@ static void apic_init(void *dummy __unused) { struct apic_enumerator *enumerator; -#ifndef __amd64__ - uint64_t apic_base; -#endif int retval, best; /* We only support built in local APICs. */ @@ -1375,12 +1371,7 @@ apic_init(void *dummy __unused) * CPUs during early startup. We need to turn the local APIC back * on on such CPUs now. */ - if (cpu == CPU_686 && cpu_vendor_id == CPU_VENDOR_INTEL && - (cpu_id & 0xff0) == 0x610) { - apic_base = rdmsr(MSR_APICBASE); - apic_base |= APICBASE_ENABLED; - wrmsr(MSR_APICBASE, apic_base); - } + ppro_reenable_apic(); #endif /* Probe the CPU's in the system. */ From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 21:37:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A8EE593; Wed, 10 Sep 2014 21:37:49 +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 8610DF8D; Wed, 10 Sep 2014 21:37:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8ALbnNZ084043; Wed, 10 Sep 2014 21:37:49 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8ALbmDK084034; Wed, 10 Sep 2014 21:37:48 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409102137.s8ALbmDK084034@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 10 Sep 2014 21:37:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271409 - in head/sys: amd64/amd64 i386/i386 i386/include i386/xen pc98/pc98 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 21:37:49 -0000 Author: jhb Date: Wed Sep 10 21:37:47 2014 New Revision: 271409 URL: http://svnweb.freebsd.org/changeset/base/271409 Log: MFamd64: Use initializecpu() to set various model-specific registers on AP startup and AP resume (it was already used for BSP startup and BSP resume). - Split code to do one-time probing of cache properties out of initializecpu() and into initializecpucache(). This is called once on the BSP during boot. - Move enable_sse() into initializecpu(). - Call initializecpu() for AP startup instead of enable_sse() and manually frobbing MSR_EFER to enable PG_NX. - Call initializecpu() when an AP resumes. In theory this will now properly re-enable PG_NX in MSR_EFER when resuming a PAE kernel on APs. Modified: head/sys/amd64/amd64/mp_machdep.c head/sys/i386/i386/initcpu.c head/sys/i386/i386/machdep.c head/sys/i386/i386/mp_machdep.c head/sys/i386/include/md_var.h head/sys/i386/xen/mp_machdep.c head/sys/pc98/pc98/machdep.c Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Wed Sep 10 21:25:54 2014 (r271408) +++ head/sys/amd64/amd64/mp_machdep.c Wed Sep 10 21:37:47 2014 (r271409) @@ -721,7 +721,7 @@ init_secondary(void) /* set up CPU registers and state */ cpu_setregs(); - /* set up SSE/NX registers */ + /* set up SSE/NX */ initializecpu(); /* set up FPU state on the AP */ Modified: head/sys/i386/i386/initcpu.c ============================================================================== --- head/sys/i386/i386/initcpu.c Wed Sep 10 21:25:54 2014 (r271408) +++ head/sys/i386/i386/initcpu.c Wed Sep 10 21:37:47 2014 (r271409) @@ -457,7 +457,7 @@ init_winchip(void) fcr &= ~(1ULL << 11); /* - * Additioanlly, set EBRPRED, E2MMX and EAMD3D for WinChip 2 and 3. + * Additionally, set EBRPRED, E2MMX and EAMD3D for WinChip 2 and 3. */ if (CPUID_TO_MODEL(cpu_id) >= 8) fcr |= (1 << 12) | (1 << 19) | (1 << 20); @@ -674,20 +674,6 @@ init_transmeta(void) } #endif -/* - * Initialize CR4 (Control register 4) to enable SSE instructions. - */ -void -enable_sse(void) -{ -#if defined(CPU_ENABLE_SSE) - if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) { - load_cr4(rcr4() | CR4_FXSR | CR4_XMM); - cpu_fxsr = hw_instruction_sse = 1; - } -#endif -} - extern int elf32_nxstack; void @@ -811,7 +797,17 @@ initializecpu(void) default: break; } - enable_sse(); +#if defined(CPU_ENABLE_SSE) + if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) { + load_cr4(rcr4() | CR4_FXSR | CR4_XMM); + cpu_fxsr = hw_instruction_sse = 1; + } +#endif +} + +void +initializecpucache(void) +{ /* * CPUID with %eax = 1, %ebx returns Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Wed Sep 10 21:25:54 2014 (r271408) +++ head/sys/i386/i386/machdep.c Wed Sep 10 21:37:47 2014 (r271409) @@ -2753,6 +2753,7 @@ init386(first) setidt(IDT_GP, &IDTVEC(prot), SDT_SYS386TGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); initializecpu(); /* Initialize CPU registers */ + initializecpucache(); /* make an initial tss so cpu can get interrupt stack on syscall! */ /* Note: -16 is so we can grow the trapframe if we came from vm86 */ Modified: head/sys/i386/i386/mp_machdep.c ============================================================================== --- head/sys/i386/i386/mp_machdep.c Wed Sep 10 21:25:54 2014 (r271408) +++ head/sys/i386/i386/mp_machdep.c Wed Sep 10 21:37:47 2014 (r271409) @@ -745,25 +745,15 @@ init_secondary(void) /* set up CPU registers and state */ cpu_setregs(); + /* set up SSE/NX */ + initializecpu(); + /* set up FPU state on the AP */ npxinit(); - /* set up SSE registers */ - enable_sse(); - if (cpu_ops.cpu_init) cpu_ops.cpu_init(); -#ifdef PAE - /* Enable the PTE no-execute bit. */ - if ((amd_feature & AMDID_NX) != 0) { - uint64_t msr; - - msr = rdmsr(MSR_EFER) | EFER_NXE; - wrmsr(MSR_EFER, msr); - } -#endif - /* A quick check from sanity claus */ cpuid = PCPU_GET(cpuid); if (PCPU_GET(apic_id) != lapic_id()) { @@ -1528,6 +1518,7 @@ cpususpend_handler(void) } else { npxresume(&susppcbs[cpu]->sp_fpususpend); pmap_init_pat(); + initializecpu(); PCPU_SET(switchtime, 0); PCPU_SET(switchticks, ticks); Modified: head/sys/i386/include/md_var.h ============================================================================== --- head/sys/i386/include/md_var.h Wed Sep 10 21:25:54 2014 (r271408) +++ head/sys/i386/include/md_var.h Wed Sep 10 21:37:47 2014 (r271409) @@ -99,9 +99,9 @@ void doreti_popl_fs_fault(void) __asm(__ void dump_add_page(vm_paddr_t); void dump_drop_page(vm_paddr_t); void finishidentcpu(void); -void enable_sse(void); void fillw(int /*u_short*/ pat, void *base, size_t cnt); void initializecpu(void); +void initializecpucache(void); void i686_pagezero(void *addr); void sse2_pagezero(void *addr); void init_AMD_Elan_sc520(void); Modified: head/sys/i386/xen/mp_machdep.c ============================================================================== --- head/sys/i386/xen/mp_machdep.c Wed Sep 10 21:25:54 2014 (r271408) +++ head/sys/i386/xen/mp_machdep.c Wed Sep 10 21:37:47 2014 (r271409) @@ -598,22 +598,13 @@ init_secondary(void) for (addr = 0; addr < NKPT * NBPDR - 1; addr += PAGE_SIZE) invlpg(addr); - /* set up FPU state on the AP */ - npxinit(); #if 0 - - /* set up SSE registers */ - enable_sse(); + /* set up SSE/NX */ + initializecpu(); #endif -#if 0 && defined(PAE) - /* Enable the PTE no-execute bit. */ - if ((amd_feature & AMDID_NX) != 0) { - uint64_t msr; - msr = rdmsr(MSR_EFER) | EFER_NXE; - wrmsr(MSR_EFER, msr); - } -#endif + /* set up FPU state on the AP */ + npxinit(); #if 0 /* A quick check from sanity claus */ if (PCPU_GET(apic_id) != lapic_id()) { Modified: head/sys/pc98/pc98/machdep.c ============================================================================== --- head/sys/pc98/pc98/machdep.c Wed Sep 10 21:25:54 2014 (r271408) +++ head/sys/pc98/pc98/machdep.c Wed Sep 10 21:37:47 2014 (r271409) @@ -2315,6 +2315,7 @@ init386(first) setidt(IDT_GP, &IDTVEC(prot), SDT_SYS386TGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); initializecpu(); /* Initialize CPU registers */ + initializecpucache(); /* make an initial tss so cpu can get interrupt stack on syscall! */ /* Note: -16 is so we can grow the trapframe if we came from vm86 */ From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 22:34:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 034F5356; Wed, 10 Sep 2014 22:34: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 C9C53783; Wed, 10 Sep 2014 22:34:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8AMY8W6012341; Wed, 10 Sep 2014 22:34:08 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8AMY82b012340; Wed, 10 Sep 2014 22:34:08 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201409102234.s8AMY82b012340@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Wed, 10 Sep 2014 22:34:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271410 - head/usr.bin/vmstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 22:34:09 -0000 Author: hrs Date: Wed Sep 10 22:34:08 2014 New Revision: 271410 URL: http://svnweb.freebsd.org/changeset/base/271410 Log: Fix header output when -P is specified and (ncpus - 1) != maxid. Reported by: Hiroaki Shimizu PR: 152738 Modified: head/usr.bin/vmstat/vmstat.c Modified: head/usr.bin/vmstat/vmstat.c ============================================================================== --- head/usr.bin/vmstat/vmstat.c Wed Sep 10 21:37:47 2014 (r271409) +++ head/usr.bin/vmstat/vmstat.c Wed Sep 10 22:34:08 2014 (r271410) @@ -657,6 +657,8 @@ dovmstat(unsigned int interval, int reps uptime = getuptime(); halfuptime = uptime / 2; rate_adj = 1; + ncpus = 1; + maxid = 0; /* * If the user stops the program (control-Z) and then resumes it, @@ -702,7 +704,7 @@ dovmstat(unsigned int interval, int reps } for (hdrcnt = 1;;) { if (!--hdrcnt) - printhdr(ncpus, cpumask); + printhdr(maxid, cpumask); if (kd != NULL) { if (kvm_getcptime(kd, cur.cp_time) < 0) errx(1, "kvm_getcptime: %s", kvm_geterr(kd)); @@ -753,7 +755,7 @@ dovmstat(unsigned int interval, int reps errx(1, "%s", devstat_errbuf); break; case 1: - printhdr(ncpus, cpumask); + printhdr(maxid, cpumask); break; default: break; @@ -822,7 +824,7 @@ dovmstat(unsigned int interval, int reps } static void -printhdr(int ncpus, u_long cpumask) +printhdr(int maxid, u_long cpumask) { int i, num_shown; @@ -834,7 +836,7 @@ printhdr(int ncpus, u_long cpumask) (void)printf("disk"); (void)printf(" faults "); if (Pflag) { - for (i = 0; i < ncpus; i++) { + for (i = 0; i <= maxid; i++) { if (cpumask & (1ul << i)) printf("cpu%-2d ", i); } @@ -850,8 +852,10 @@ printhdr(int ncpus, u_long cpumask) dev_select[i].unit_number); (void)printf(" in sy cs"); if (Pflag) { - for (i = 0; i < ncpus; i++) - printf(" us sy id"); + for (i = 0; i <= maxid; i++) { + if (cpumask & (1ul << i)) + printf(" us sy id"); + } printf("\n"); } else printf(" us sy id\n"); From owner-svn-src-all@FreeBSD.ORG Wed Sep 10 22:37:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BF73654; Wed, 10 Sep 2014 22:37: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 88B0F7B3; Wed, 10 Sep 2014 22:37:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8AMbKpT012879; Wed, 10 Sep 2014 22:37:20 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8AMbKde012878; Wed, 10 Sep 2014 22:37:20 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201409102237.s8AMbKde012878@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Wed, 10 Sep 2014 22:37:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271411 - head/sbin/dump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 22:37:20 -0000 Author: hrs Date: Wed Sep 10 22:37:20 2014 New Revision: 271411 URL: http://svnweb.freebsd.org/changeset/base/271411 Log: Fix a bug which could break extended attributes in a dump output. This occurred when a file was >892kB long and had a large data (>1kB) in the extended attributes. Reported by: Masashi Toriumi Reviewed by: mckusick Modified: head/sbin/dump/traverse.c Modified: head/sbin/dump/traverse.c ============================================================================== --- head/sbin/dump/traverse.c Wed Sep 10 22:34:08 2014 (r271410) +++ head/sbin/dump/traverse.c Wed Sep 10 22:37:20 2014 (r271411) @@ -673,7 +673,12 @@ ufs2_blksout(union dinode *dp, ufs2_dadd */ blks = howmany(frags * sblock->fs_fsize, TP_BSIZE); if (last) { - resid = howmany(fragoff(sblock, dp->dp2.di_size), TP_BSIZE); + if (writingextdata) + resid = howmany(fragoff(sblock, spcl.c_extsize), + TP_BSIZE); + else + resid = howmany(fragoff(sblock, dp->dp2.di_size), + TP_BSIZE); if (resid > 0) blks -= howmany(sblock->fs_fsize, TP_BSIZE) - resid; } From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 00:10:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2673B5C6; Thu, 11 Sep 2014 00:10:55 +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 EC447EED; Thu, 11 Sep 2014 00:10:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8B0AsEQ059260; Thu, 11 Sep 2014 00:10:54 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8B0AsVK059259; Thu, 11 Sep 2014 00:10:54 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201409110010.s8B0AsVK059259@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 11 Sep 2014 00:10:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r271412 - svnadmin/hooks/scripts X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 00:10:55 -0000 Author: bdrewery Date: Thu Sep 11 00:10:54 2014 New Revision: 271412 URL: http://svnweb.freebsd.org/changeset/base/271412 Log: Fix bugzilla dfilter script to handle: 1. Multiple PR per line 2. Multiple PR 3. PR lines with extra stuff after them such as references and (notes) PR: ports/190866 [1] PR: ports/191064 [2] Reported by: many Submitted by: ak, bdrewery Acked by: peter Modified: svnadmin/hooks/scripts/notify_bz.sh Modified: svnadmin/hooks/scripts/notify_bz.sh ============================================================================== --- svnadmin/hooks/scripts/notify_bz.sh Wed Sep 10 22:37:20 2014 (r271411) +++ svnadmin/hooks/scripts/notify_bz.sh Thu Sep 11 00:10:54 2014 (r271412) @@ -14,28 +14,30 @@ if [ -z "$REV" -o -z "$REPO" -o ! -d "$R exit 1 fi -PR="$(svnlook info "$REPO" -r "$REV" | sed -nE -e 's/^[ ]*[pP][rR]:[ ]*[a-zA-Z]+\/([0-9]+)/\1/p' -e 's/^[ ]*[pP][rR]:[ ]*([0-9]+)/\1/p')" +PRS="$(svnlook info "$REPO" -r "$REV" | grep -e '^[[:space:]]*[pP][rR]:[[:space:]]*'|grep -Eo '([a-zA-Z]+\/)*[^[]([0-9]+)[^]]'|sed -Ee 's,[[:space:]],,g' -e 's,[a-zA-Z]+\/,,g')" -if [ -z "$PR" ]; then +if [ -z "$PRS" ]; then exit 0 fi WHO="$(svnlook author "$REPO" -r "$REV")" -( -echo "From: commit-hook@freebsd.org" -echo "To: notify-bz@freebsd.org" -echo "Subject: [Bug $PR]" -echo "" -echo "A commit references this bug:" -echo "" -echo "Author: $WHO" -echo "Date: $(date)" -echo "New revision: $REV" -echo "URL: http://svnweb.freebsd.org/changeset/base/$REV" -echo "" -echo "Log:" -svnlook log "$REPO" -r "$REV" | sed -e 's/^/ /' -echo "" -echo "Changes:" -svnlook changed "$REPO" -r "$REV" | sed -E -e 's/^[A-Z]*[ ]+/ /' -) | sed -e 's/^[ ]*$//' | cat -s | /usr/sbin/sendmail -oi -f commit-hook@freebsd.org notify-bz@freebsd.org +for pr in $PRS; do + ( + echo "From: commit-hook@freebsd.org" + echo "To: notify-bz@freebsd.org" + echo "Subject: [Bug $pr]" + echo "" + echo "A commit references this bug:" + echo "" + echo "Author: $WHO" + echo "Date: $(date)" + echo "New revision: $REV" + echo "URL: http://svnweb.freebsd.org/changeset/ports/$REV" + echo "" + echo "Log:" + svnlook log "$REPO" -r "$REV" | sed -e 's/^/ /' + echo "" + echo "Changes:" + svnlook changed "$REPO" -r "$REV" | sed -E -e 's/^[A-Z]*[ ]+/ /' + ) | sed -e 's/^[ ]*$//' | cat -s | /usr/sbin/sendmail -oi -f commit-hook@freebsd.org notify-bz@freebsd.org +done From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 01:04:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46F16DC7; Thu, 11 Sep 2014 01:04:57 +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 309BC5FD; Thu, 11 Sep 2014 01:04:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8B14vLX084232; Thu, 11 Sep 2014 01:04:57 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8B14uFq084230; Thu, 11 Sep 2014 01:04:56 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201409110104.s8B14uFq084230@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 11 Sep 2014 01:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271413 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 01:04:57 -0000 Author: markj Date: Thu Sep 11 01:04:56 2014 New Revision: 271413 URL: http://svnweb.freebsd.org/changeset/base/271413 Log: Use the linker to perform relocations in the SUNW_dof section rather than doing them in drti during startup. This fixes a number of problems with using USDT probes in stripped executables and shared libraries, and with USDT probes in static functions. Reviewed by: rpaulo MFC after: 1 month Sponsored by: EMC / Isilon Storage Division Phabric: D751 Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Thu Sep 11 00:10:54 2014 (r271412) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Thu Sep 11 01:04:56 2014 (r271413) @@ -90,36 +90,6 @@ dprintf(int debug, const char *fmt, ...) va_end(ap); } -#if !defined(sun) -static void -fixsymbol(Elf *e, Elf_Data *data, size_t idx, int nprobes, char *buf, - dof_sec_t *sec, int *fixedprobes, char *dofstrtab) -{ - GElf_Sym sym; - char *s; - unsigned char *funcname; - dof_probe_t *prb; - int j = 0; - int ndx; - - while (gelf_getsym(data, j++, &sym) != NULL) { - prb = (dof_probe_t *)(void *)(buf + sec->dofs_offset); - - for (ndx = nprobes; ndx; ndx--, prb += 1) { - funcname = dofstrtab + prb->dofpr_func; - s = elf_strptr(e, idx, sym.st_name); - if (strcmp(s, funcname) == 0) { - dprintf(1, "fixing %s() symbol\n", s); - prb->dofpr_addr = sym.st_value; - (*fixedprobes)++; - } - } - if (*fixedprobes == nprobes) - break; - } -} -#endif - #if defined(sun) #pragma init(dtrace_dof_init) #else @@ -145,9 +115,6 @@ dtrace_dof_init(void) Lmid_t lmid; #else u_long lmid = 0; - dof_sec_t *sec, *secstart, *dofstrtab, *dofprobes; - dof_provider_t *dofprovider; - size_t i; #endif int fd; const char *p; @@ -157,12 +124,9 @@ dtrace_dof_init(void) Elf_Data *symtabdata = NULL, *dynsymdata = NULL, *dofdata = NULL; dof_hdr_t *dof_next = NULL; GElf_Shdr shdr; - int efd, nprobes; + int efd; char *s; - char *dofstrtabraw; size_t shstridx, symtabidx = 0, dynsymidx = 0; - unsigned char *buf; - int fixedprobes; #endif if (getenv("DTRACE_DOF_INIT_DISABLE") != NULL) @@ -183,7 +147,6 @@ dtrace_dof_init(void) } #endif - if ((modname = strrchr(lmp->l_name, '/')) == NULL) modname = lmp->l_name; else @@ -209,9 +172,9 @@ dtrace_dof_init(void) } else if (shdr.sh_type == SHT_DYNSYM) { dynsymidx = shdr.sh_link; dynsymdata = elf_getdata(scn, NULL); - } else if (shdr.sh_type == SHT_PROGBITS) { + } else if (shdr.sh_type == SHT_SUNW_dof) { s = elf_strptr(e, shstridx, shdr.sh_name); - if (s && strcmp(s, ".SUNW_dof") == 0) { + if (s != NULL && strcmp(s, ".SUNW_dof") == 0) { dofdata = elf_getdata(scn, NULL); dof = dofdata->d_buf; } @@ -225,7 +188,6 @@ dtrace_dof_init(void) } while ((char *) dof < (char *) dofdata->d_buf + dofdata->d_size) { - fixedprobes = 0; dof_next = (void *) ((char *) dof + dof->dofh_filesz); #endif @@ -273,76 +235,6 @@ dtrace_dof_init(void) return; #endif } -#if !defined(sun) - /* - * We need to fix the base address of each probe since this wasn't - * done by ld(1). (ld(1) needs to grow support for parsing the - * SUNW_dof section). - * - * The complexity of this is not that great. The first for loop - * iterates over the sections inside the DOF file. There are usually - * 10 sections here. We asume the STRTAB section comes first and the - * PROBES section comes after. Since we are only interested in fixing - * data inside the PROBES section we quit the for loop after processing - * the PROBES section. It's usually the case that the first section - * is the STRTAB section and the second section is the PROBES section, - * so this for loop is not meaningful when doing complexity analysis. - * - * After finding the probes section, we iterate over the symbols - * in the symtab section. When we find a symbol name that matches - * the probe function name, we fix it. If we have fixed all the - * probes, we exit all the loops and we are done. - * The number of probes is given by the variable 'nprobes' and this - * depends entirely on the user, but some optimizations were done. - * - * We are assuming the number of probes is less than the number of - * symbols (libc can have 4k symbols, for example). - */ - secstart = sec = (dof_sec_t *)(dof + 1); - buf = (char *)dof; - for (i = 0; i < dof->dofh_secnum; i++, sec++) { - if (sec->dofs_type != DOF_SECT_PROVIDER) - continue; - - dofprovider = (void *) (buf + sec->dofs_offset); - dofstrtab = secstart + dofprovider->dofpv_strtab; - dofprobes = secstart + dofprovider->dofpv_probes; - - if (dofstrtab->dofs_type != DOF_SECT_STRTAB) { - fprintf(stderr, "WARNING: expected STRTAB section, but got %d\n", - dofstrtab->dofs_type); - break; - } - if (dofprobes->dofs_type != DOF_SECT_PROBES) { - fprintf(stderr, "WARNING: expected PROBES section, but got %d\n", - dofprobes->dofs_type); - break; - } - - dprintf(1, "found provider %p\n", dofprovider); - dofstrtabraw = (char *)(buf + dofstrtab->dofs_offset); - nprobes = dofprobes->dofs_size / dofprobes->dofs_entsize; - fixsymbol(e, symtabdata, symtabidx, nprobes, buf, dofprobes, &fixedprobes, - dofstrtabraw); - if (fixedprobes != nprobes) { - /* - * If we haven't fixed all the probes using the - * symtab section, look inside the dynsym - * section. - */ - fixsymbol(e, dynsymdata, dynsymidx, nprobes, buf, dofprobes, - &fixedprobes, dofstrtabraw); - } - if (fixedprobes != nprobes) { - fprintf(stderr, "WARNING: number of probes " - "fixed does not match the number of " - "defined probes (%d != %d, " - "respectively)\n", fixedprobes, nprobes); - fprintf(stderr, "WARNING: some probes might " - "not fire or your program might crash\n"); - } - } -#endif if ((gen = ioctl(fd, DTRACEHIOC_ADDDOF, &dh)) == -1) dprintf(1, "DTrace ioctl failed for DOF at %p", dof); else { Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Thu Sep 11 00:10:54 2014 (r271412) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Thu Sep 11 01:04:56 2014 (r271413) @@ -322,7 +322,11 @@ prepare_elf64(dtrace_hdl_t *dtp, const d char *strtab; int i, j, nrel; size_t strtabsz = 1; +#if defined(sun) uint32_t count = 0; +#else + uint64_t count = 0; +#endif size_t base; Elf64_Sym *sym; Elf64_Rela *rel; @@ -418,7 +422,6 @@ prepare_elf64(dtrace_hdl_t *dtp, const d s = &dofs[dofrh->dofr_tgtsec]; for (j = 0; j < nrel; j++) { -#ifdef DOODAD #if defined(__arm__) /* XXX */ #elif defined(__mips__) @@ -431,8 +434,13 @@ prepare_elf64(dtrace_hdl_t *dtp, const d #elif defined(__i386) || defined(__amd64) rel->r_offset = s->dofs_offset + dofr[j].dofr_offset; +#if defined(sun) rel->r_info = ELF64_R_INFO(count + dep->de_global, R_AMD64_64); +#else + rel->r_info = ELF64_R_INFO(count + dep->de_global, + R_X86_64_RELATIVE); +#endif #elif defined(__sparc) rel->r_offset = s->dofs_offset + dofr[j].dofr_offset; @@ -441,7 +449,6 @@ prepare_elf64(dtrace_hdl_t *dtp, const d #else #error unknown ISA #endif -#endif sym->st_name = base + dofr[j].dofr_name - 1; sym->st_value = 0; @@ -704,7 +711,11 @@ dump_elf64(dtrace_hdl_t *dtp, const dof_ shp = &elf_file.shdr[ESHDR_DOF]; shp->sh_name = 11; /* DTRACE_SHSTRTAB64[11] = ".SUNW_dof" */ +#if defined(sun) shp->sh_flags = SHF_ALLOC; +#else + shp->sh_flags = SHF_WRITE | SHF_ALLOC; +#endif shp->sh_type = SHT_SUNW_dof; shp->sh_offset = off; shp->sh_size = dof->dofh_filesz; @@ -1662,19 +1673,6 @@ dtrace_program_link(dtrace_hdl_t *dtp, d { #if !defined(sun) char tfile[PATH_MAX]; - Elf *e; - Elf_Scn *scn; - Elf_Data *data; - GElf_Shdr shdr; - int efd; - size_t stridx; - unsigned char *buf; - char *s; - int loc; - GElf_Ehdr ehdr; - Elf_Scn *scn0; - GElf_Shdr shdr0; - uint64_t off, rc; #endif char drti[PATH_MAX]; dof_hdr_t *dof; @@ -1810,21 +1808,22 @@ dtrace_program_link(dtrace_hdl_t *dtp, d (void) unlink(file); #endif -#if defined(sun) if (dtp->dt_oflags & DTRACE_O_LP64) status = dump_elf64(dtp, dof, fd); else status = dump_elf32(dtp, dof, fd); +#if defined(sun) if (status != 0 || lseek(fd, 0, SEEK_SET) != 0) { return (dt_link_error(dtp, NULL, -1, NULL, "failed to write %s: %s", file, strerror(errno))); } #else - /* We don't write the ELF header, just the DOF section */ - if (dt_write(dtp, fd, dof, dof->dofh_filesz) < dof->dofh_filesz) + (void)close(fd); + if (status != 0) return (dt_link_error(dtp, NULL, -1, NULL, - "failed to write %s: %s", tfile, strerror(errno))); + "failed to write %s: %s", tfile, + strerror(dtrace_errno(dtp)))); #endif if (!dtp->dt_lazyload) { @@ -1846,7 +1845,7 @@ dtrace_program_link(dtrace_hdl_t *dtp, d (void) snprintf(cmd, len, fmt, dtp->dt_ld_path, file, fd, drti); #else - const char *fmt = "%s -o %s -r %s"; + const char *fmt = "%s -o %s -r %s %s"; #if defined(__amd64__) /* @@ -1868,10 +1867,9 @@ dtrace_program_link(dtrace_hdl_t *dtp, d len = snprintf(&tmp, 1, fmt, dtp->dt_ld_path, file, tfile, drti) + 1; - len *= 2; cmd = alloca(len); - (void) snprintf(cmd, len, fmt, dtp->dt_ld_path, file, + (void) snprintf(cmd, len, fmt, dtp->dt_ld_path, file, tfile, drti); #endif if ((status = system(cmd)) == -1) { @@ -1894,85 +1892,6 @@ dtrace_program_link(dtrace_hdl_t *dtp, d file, dtp->dt_ld_path, WEXITSTATUS(status)); goto done; } -#if !defined(sun) - /* - * FreeBSD's ld(1) is not instructed to interpret and add - * correctly the SUNW_dof section present in tfile. - * We use libelf to add this section manually and hope the next - * ld invocation won't remove it. - */ - elf_version(EV_CURRENT); - if ((efd = open(file, O_RDWR, 0)) < 0) { - ret = dt_link_error(dtp, NULL, -1, NULL, - "failed to open file %s: %s", - file, strerror(errno)); - goto done; - } - if ((e = elf_begin(efd, ELF_C_RDWR, NULL)) == NULL) { - close(efd); - ret = dt_link_error(dtp, NULL, -1, NULL, - "failed to open elf file: %s", - elf_errmsg(elf_errno())); - goto done; - } - /* - * Add the string '.SUWN_dof' to the shstrtab section. - */ - elf_getshdrstrndx(e, &stridx); - scn = elf_getscn(e, stridx); - gelf_getshdr(scn, &shdr); - data = elf_newdata(scn); - data->d_off = shdr.sh_size; - data->d_buf = ".SUNW_dof"; - data->d_size = 10; - data->d_type = ELF_T_BYTE; - loc = shdr.sh_size; - shdr.sh_size += data->d_size; - gelf_update_shdr(scn, &shdr); - /* - * Construct the .SUNW_dof section. - */ - scn = elf_newscn(e); - data = elf_newdata(scn); - buf = mmap(NULL, dof->dofh_filesz, PROT_READ, MAP_SHARED, - fd, 0); - if (buf == MAP_FAILED) { - ret = dt_link_error(dtp, NULL, -1, NULL, - "failed to mmap buffer %s", strerror(errno)); - elf_end(e); - close(efd); - goto done; - } - data->d_buf = buf; - data->d_align = 4; - data->d_size = dof->dofh_filesz; - data->d_version = EV_CURRENT; - gelf_getshdr(scn, &shdr); - shdr.sh_name = loc; - shdr.sh_flags = SHF_ALLOC; - /* - * Actually this should be SHT_SUNW_dof, but FreeBSD's ld(1) - * will remove this 'unknown' section when we try to create an - * executable using the object we are modifying, so we stop - * playing by the rules and use SHT_PROGBITS. - * Also, note that our drti has modifications to handle this. - */ - shdr.sh_type = SHT_PROGBITS; - shdr.sh_addralign = 4; - gelf_update_shdr(scn, &shdr); - if (elf_update(e, ELF_C_WRITE) < 0) { - ret = dt_link_error(dtp, NULL, -1, NULL, - "failed to add the SUNW_dof section: %s", - elf_errmsg(elf_errno())); - munmap(buf, dof->dofh_filesz); - elf_end(e); - close(efd); - goto done; - } - munmap(buf, dof->dofh_filesz); - elf_end(e); - close(efd); -#endif (void) close(fd); /* release temporary file */ } else { (void) close(fd); From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 01:53:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EBCC626; Thu, 11 Sep 2014 01:53:56 +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 6FB21A4F; Thu, 11 Sep 2014 01:53:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8B1ruJk007322; Thu, 11 Sep 2014 01:53:56 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8B1rutC007318; Thu, 11 Sep 2014 01:53:56 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409110153.s8B1rutC007318@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 11 Sep 2014 01:53: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: r271414 - in stable/10/contrib/llvm: patches tools/clang/lib/CodeGen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 01:53:56 -0000 Author: emaste Date: Thu Sep 11 01:53:55 2014 New Revision: 271414 URL: http://svnweb.freebsd.org/changeset/base/271414 Log: MFC Clang debug info crash fix r271282: Merge Clang debug info crash fix rev 200797: Debug info: fix a crasher when when emitting debug info for not-yet-completed templated types. getTypeSize() needs a complete type. rdar://problem/15931354 r271283: Add clang patch for r271282 Note that r271282 contains only the src change from Clang rev 200797. This patch file includes two follow-on changes to the test case, which do not apply to the copy in the FreeBSD tree. Upstream Clang revisions: 200797: Debug info: fix a crasher when when emitting debug info for not-yet-completed templated types. getTypeSize() needs a complete type. rdar://problem/15931354 200798: Simplify testcase from r200797 some more. 200805: Further simplify r200797 and add an explanatory comment. PR: 193347 Approved by: re Sponsored by: DARPA, AFRL Added: stable/10/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff - copied unchanged from r271283, head/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff Modified: stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Directory Properties: stable/10/ (props changed) Copied: stable/10/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff (from r271283, head/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff Thu Sep 11 01:53:55 2014 (r271414, copy of r271283, head/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff) @@ -0,0 +1,51 @@ +diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp +index 59ba47c..dddc7e7 100644 +--- a/lib/CodeGen/CGDebugInfo.cpp ++++ b/lib/CodeGen/CGDebugInfo.cpp +@@ -2251,9 +2251,10 @@ llvm::DICompositeType CGDebugInfo::CreateLimitedType(const RecordType *Ty) { + if (T && (!T.isForwardDecl() || !RD->getDefinition())) + return T; + +- // If this is just a forward declaration, construct an appropriately +- // marked node and just return it. +- if (!RD->getDefinition()) ++ // If this is just a forward or incomplete declaration, construct an ++ // appropriately marked node and just return it. ++ const RecordDecl *D = RD->getDefinition(); ++ if (!D || !D->isCompleteDefinition()) + return getOrCreateRecordFwdDecl(Ty, RDContext); + + uint64_t Size = CGM.getContext().getTypeSize(Ty); +diff --git a/test/CodeGenCXX/debug-info-template-fwd.cpp b/test/CodeGenCXX/debug-info-template-fwd.cpp +new file mode 100644 +index 0000000..b2b7073 +--- /dev/null ++++ b/test/CodeGenCXX/debug-info-template-fwd.cpp +@@ -0,0 +1,27 @@ ++// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -g -emit-llvm -o - | FileCheck %s ++// This test is for a crash when emitting debug info for not-yet-completed ++// types. ++// Test that we don't actually emit a forward decl for the offending class: ++// CHECK: [ DW_TAG_structure_type ] [Derived] {{.*}} [def] ++// rdar://problem/15931354 ++template class Derived; ++ ++template class Base { ++ static Derived *create(); ++}; ++ ++template struct Derived : Base { ++}; ++ ++Base *f; ++ ++// During the instantiation of Derived, Base becomes required to be ++// complete - since the declaration has already been emitted (due to 'f', ++// above), we immediately try to build debug info for Base which then ++// requires the (incomplete definition) of Derived which is problematic. ++// ++// (if 'f' is not present, the point at which Base becomes required to be ++// complete during the instantiation of Derived is a no-op because ++// Base was never emitted so we ignore it and carry on until we ++// wire up the base class of Derived in the debug info later on) ++Derived d; Modified: stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp ============================================================================== --- stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Thu Sep 11 01:04:56 2014 (r271413) +++ stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Thu Sep 11 01:53:55 2014 (r271414) @@ -2235,9 +2235,10 @@ llvm::DICompositeType CGDebugInfo::Creat if (T && (!T.isForwardDecl() || !RD->getDefinition())) return T; - // If this is just a forward declaration, construct an appropriately - // marked node and just return it. - if (!RD->getDefinition()) + // If this is just a forward or incomplete declaration, construct an + // appropriately marked node and just return it. + const RecordDecl *D = RD->getDefinition(); + if (!D || !D->isCompleteDefinition()) return getOrCreateRecordFwdDecl(Ty, RDContext); uint64_t Size = CGM.getContext().getTypeSize(Ty); From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 03:16:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1D4F317; Thu, 11 Sep 2014 03:16:57 +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 CD6711D0; Thu, 11 Sep 2014 03:16:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8B3Gv09046059; Thu, 11 Sep 2014 03:16:57 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8B3Gv1h046058; Thu, 11 Sep 2014 03:16:57 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201409110316.s8B3Gv1h046058@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Thu, 11 Sep 2014 03:16:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271417 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 03:16:58 -0000 Author: alc Date: Thu Sep 11 03:16:57 2014 New Revision: 271417 URL: http://svnweb.freebsd.org/changeset/base/271417 Log: Update a stale comment. Modified: head/sys/vm/vm_object.h Modified: head/sys/vm/vm_object.h ============================================================================== --- head/sys/vm/vm_object.h Thu Sep 11 02:42:20 2014 (r271416) +++ head/sys/vm/vm_object.h Thu Sep 11 03:16:57 2014 (r271417) @@ -199,7 +199,7 @@ struct vm_object { #define OBJPC_SYNC 0x1 /* sync I/O */ #define OBJPC_INVAL 0x2 /* invalidate */ -#define OBJPC_NOSYNC 0x4 /* skip if PG_NOSYNC */ +#define OBJPC_NOSYNC 0x4 /* skip if VPO_NOSYNC */ /* * The following options are supported by vm_object_page_remove(). From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 05:48:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E650775B; Thu, 11 Sep 2014 05:48:39 +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 D197DFC1; Thu, 11 Sep 2014 05:48:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8B5mdP5014323; Thu, 11 Sep 2014 05:48:39 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8B5md65014322; Thu, 11 Sep 2014 05:48:39 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409110548.s8B5md65014322@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 11 Sep 2014 05:48:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271418 - head/sbin/dhclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 05:48:40 -0000 Author: glebius Date: Thu Sep 11 05:48:39 2014 New Revision: 271418 URL: http://svnweb.freebsd.org/changeset/base/271418 Log: Since r270929 raw sockets expect network byte order. Submitted by: avg Modified: head/sbin/dhclient/packet.c Modified: head/sbin/dhclient/packet.c ============================================================================== --- head/sbin/dhclient/packet.c Thu Sep 11 03:16:57 2014 (r271417) +++ head/sbin/dhclient/packet.c Thu Sep 11 05:48:39 2014 (r271418) @@ -127,17 +127,6 @@ assemble_udp_ip_header(unsigned char *bu ip.ip_dst.s_addr = to; ip.ip_sum = wrapsum(checksum((unsigned char *)&ip, sizeof(ip), 0)); - - /* - * While the BPF -- used for broadcasts -- expects a "true" IP header - * with all the bytes in network byte order, the raw socket interface - * which is used for unicasts expects the ip_len field to be in host - * byte order. In both cases, the checksum has to be correct, so this - * is as good a place as any to turn the bytes around again. - */ - if (to != INADDR_BROADCAST) - ip.ip_len = ntohs(ip.ip_len); - memcpy(&buf[*bufix], &ip, sizeof(ip)); *bufix += sizeof(ip); From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 07:16:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73CFAABC; Thu, 11 Sep 2014 07:16: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 5E4F49FF; Thu, 11 Sep 2014 07:16: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 s8B7GGP5056973; Thu, 11 Sep 2014 07:16:16 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8B7GF7C056969; Thu, 11 Sep 2014 07:16:15 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201409110716.s8B7GF7C056969@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Thu, 11 Sep 2014 07:16:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271420 - in head/sys: dev/cxgbe/common sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 07:16:16 -0000 Author: rwatson Date: Thu Sep 11 07:16:15 2014 New Revision: 271420 URL: http://svnweb.freebsd.org/changeset/base/271420 Log: Add new a M_START() mbuf macro that returns a pointer to the start of an mbuf's storage (internal or external). Add a new M_SIZE() mbuf macro that returns the size of an mbuf's storage (internal or external). These contrast with m_data and m_len, which are with respect to data in the buffer, rather than the buffer itself. Rewrite M_LEADINGSPACE() and M_TRAILINGSPACE() in terms of M_START() and M_SIZE(). This is done as we currently have many instances of using mbuf flags to generate pointers or lengths for internal storage in header and regular mbufs, as well as to external storage. Rather than replicate this logic throughout the network stack, centralising the implementation will make it easier for us to refine mbuf storage. This should also help reduce bugs by limiting the amount of mbuf-type-specific pointer arithmetic. Followup changes will propagate use of the macros throughout the stack. M_SIZE() conflicts with one macro in the Chelsio driver; rename that macro in a slightly unsatisfying way to eliminate the collision. MFC after: 3 days Obtained from: jeff (with enhancements) Sponsored by: EMC / Isilon Storage Division Reviewed by: bz, glebius, np Differential Revision: https://reviews.freebsd.org/D753 Modified: head/sys/dev/cxgbe/common/t4_regs.h head/sys/sys/mbuf.h Modified: head/sys/dev/cxgbe/common/t4_regs.h ============================================================================== --- head/sys/dev/cxgbe/common/t4_regs.h Thu Sep 11 06:17:56 2014 (r271419) +++ head/sys/dev/cxgbe/common/t4_regs.h Thu Sep 11 07:16:15 2014 (r271420) @@ -1073,9 +1073,9 @@ #define A_SGE_FL_BUFFER_SIZE0 0x1044 #define S_SIZE 4 -#define M_SIZE 0xfffffffU +#define CXGBE_M_SIZE 0xfffffffU #define V_SIZE(x) ((x) << S_SIZE) -#define G_SIZE(x) (((x) >> S_SIZE) & M_SIZE) +#define G_SIZE(x) (((x) >> S_SIZE) & CXGBE_M_SIZE) #define A_SGE_FL_BUFFER_SIZE1 0x1048 #define A_SGE_FL_BUFFER_SIZE2 0x104c Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Thu Sep 11 06:17:56 2014 (r271419) +++ head/sys/sys/mbuf.h Thu Sep 11 07:16:15 2014 (r271420) @@ -843,29 +843,50 @@ m_last(struct mbuf *m) } while (0) /* + * Return the address of the start of the buffer associated with an mbuf, + * handling external storage, packet-header mbufs, and regular data mbufs. + */ +#define M_START(m) \ + (((m)->m_flags & M_EXT) ? (m)->m_ext.ext_buf : \ + ((m)->m_flags & M_PKTHDR) ? &(m)->m_pktdat[0] : \ + &(m)->m_dat[0]) + +/* + * Return the size of the buffer associated with an mbuf, handling external + * storage, packet-header mbufs, and regular data mbufs. + */ +#define M_SIZE(m) \ + (((m)->m_flags & M_EXT) ? (m)->m_ext.ext_size : \ + ((m)->m_flags & M_PKTHDR) ? MHLEN : \ + MLEN) + +/* * Compute the amount of space available before the current start of data in * an mbuf. * * The M_WRITABLE() is a temporary, conservative safety measure: the burden * of checking writability of the mbuf data area rests solely with the caller. + * + * NB: In previous versions, M_LEADINGSPACE() would only check M_WRITABLE() + * for mbufs with external storage. We now allow mbuf-embedded data to be + * read-only as well. */ #define M_LEADINGSPACE(m) \ - ((m)->m_flags & M_EXT ? \ - (M_WRITABLE(m) ? (m)->m_data - (m)->m_ext.ext_buf : 0): \ - (m)->m_flags & M_PKTHDR ? (m)->m_data - (m)->m_pktdat : \ - (m)->m_data - (m)->m_dat) + (M_WRITABLE(m) ? ((m)->m_data - M_START(m)) : 0) /* * Compute the amount of space available after the end of data in an mbuf. * * The M_WRITABLE() is a temporary, conservative safety measure: the burden * of checking writability of the mbuf data area rests solely with the caller. + * + * NB: In previous versions, M_TRAILINGSPACE() would only check M_WRITABLE() + * for mbufs with external storage. We now allow mbuf-embedded data to be + * read-only as well. */ #define M_TRAILINGSPACE(m) \ - ((m)->m_flags & M_EXT ? \ - (M_WRITABLE(m) ? (m)->m_ext.ext_buf + (m)->m_ext.ext_size \ - - ((m)->m_data + (m)->m_len) : 0) : \ - &(m)->m_dat[MLEN] - ((m)->m_data + (m)->m_len)) + (M_WRITABLE(m) ? \ + ((M_START(m) + M_SIZE(m)) - ((m)->m_data + (m)->m_len)) : 0) /* * Arrange to prepend space of size plen to mbuf m. If a new mbuf must be From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 08:11:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 523D5852; Thu, 11 Sep 2014 08:11:53 +0000 (UTC) Received: from cyrus.watson.org (cyrus.watson.org [198.74.231.69]) by mx1.freebsd.org (Postfix) with ESMTP id 2AE9DEEA; Thu, 11 Sep 2014 08:11:53 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [198.74.231.63]) by cyrus.watson.org (Postfix) with ESMTPS id 40FD746B2A; Thu, 11 Sep 2014 04:11:52 -0400 (EDT) Date: Thu, 11 Sep 2014 09:11:51 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Gleb Smirnoff Subject: Re: svn commit: r271418 - head/sbin/dhclient In-Reply-To: <201409110548.s8B5md65014322@svn.freebsd.org> Message-ID: References: <201409110548.s8B5md65014322@svn.freebsd.org> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 08:11:53 -0000 A bit behind on commits, but: does this mean that an older userspace dhclient will no longer work with a newer kernel? Robert On Thu, 11 Sep 2014, Gleb Smirnoff wrote: > Author: glebius > Date: Thu Sep 11 05:48:39 2014 > New Revision: 271418 > URL: http://svnweb.freebsd.org/changeset/base/271418 > > Log: > Since r270929 raw sockets expect network byte order. > > Submitted by: avg > > Modified: > head/sbin/dhclient/packet.c > > Modified: head/sbin/dhclient/packet.c > ============================================================================== > --- head/sbin/dhclient/packet.c Thu Sep 11 03:16:57 2014 (r271417) > +++ head/sbin/dhclient/packet.c Thu Sep 11 05:48:39 2014 (r271418) > @@ -127,17 +127,6 @@ assemble_udp_ip_header(unsigned char *bu > ip.ip_dst.s_addr = to; > > ip.ip_sum = wrapsum(checksum((unsigned char *)&ip, sizeof(ip), 0)); > - > - /* > - * While the BPF -- used for broadcasts -- expects a "true" IP header > - * with all the bytes in network byte order, the raw socket interface > - * which is used for unicasts expects the ip_len field to be in host > - * byte order. In both cases, the checksum has to be correct, so this > - * is as good a place as any to turn the bytes around again. > - */ > - if (to != INADDR_BROADCAST) > - ip.ip_len = ntohs(ip.ip_len); > - > memcpy(&buf[*bufix], &ip, sizeof(ip)); > *bufix += sizeof(ip); > > > From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 08:51:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABE0917F; Thu, 11 Sep 2014 08:51:40 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 334C5358; Thu, 11 Sep 2014 08:51:40 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s8B8pZpr080117 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 11 Sep 2014 11:51:35 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s8B8pZpr080117 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s8B8pZB6080116; Thu, 11 Sep 2014 11:51:35 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 11 Sep 2014 11:51:35 +0300 From: Konstantin Belousov To: John Baldwin Subject: Re: svn commit: r270850 - in head/sys: i386/i386 i386/include i386/isa x86/acpica Message-ID: <20140911085135.GL2737@kib.kiev.ua> References: <201408301748.s7UHmc6H059701@svn.freebsd.org> <1432043.pIBGVXe1sj@ralph.baldwin.cx> <20140909085813.GC2737@kib.kiev.ua> <21371080.holR7l8cnU@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dGBDEx8Ycw1mGAPo" Content-Disposition: inline In-Reply-To: <21371080.holR7l8cnU@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 08:51:40 -0000 --dGBDEx8Ycw1mGAPo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 10, 2014 at 10:41:00AM -0400, John Baldwin wrote: > On Tuesday, September 09, 2014 11:58:13 AM Konstantin Belousov wrote: > > On Sat, Sep 06, 2014 at 04:04:49PM -0400, John Baldwin wrote: > > Move of the code to initialize CPU from identcpu() to initializecpu() > > seems to be a fix on its own. Since you are moving the fragments > > around, would you mind start using CPUID_MODEL/STEPPING etc constants ? > > The code was ancient, probably predating the defines. >=20 > I will probably split this up into a couple of commits one of which will = be > to move register setting from identcpu.c to initcpu.c. I can look at usi= ng > the constants, but in particular when using CPUID_TO_*() the logic is sli= ghtly > different (e.g. you have to check for model and family values for '6' ins= tead > of '60' or '600'), so I would prefer to do those changes as a separate co= mmit > to help with debugging in the future if I get one wrong. >=20 I only asked about CPUID_MODEL etc constants (masks), which does not require the logic change. I think that CPUID_TO_*() is simply not suitable there. --dGBDEx8Ycw1mGAPo Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUEWKWAAoJEJDCuSvBvK1B0bgP/2zTMXf4074qUDPWqBGkMNZv eNk9SinBlqyanGEE7J38eBZakMkjTV5/VB9+FZsY36Z62pl3hDxQ9k/QOZEX23pJ vh4ZkPORjBfIDL78HY+22EZmBEwNkX9ukvmT/DB/ndPAnB5UN5FzfOnjfbqZtIHY f568XgQAkVo6oo9VbUJqZ2trVuPZTUsIynYPh11nfdmwoRkPiYj+YcrvqFE7PaUq 93uXRCrb8w5/jrujx61jGDTXEnMX39CVlQ0gnjB7W1BP6dTrNagpidLCicEtvyXd 6sh2tF5Y1QgklIqihdHNbkM16LJeQ2d+kkTJY8jksn25jKdwgvCpMdnY962fm/3E LfaTKTZg4QXjR1m20KEg0cvOHVUSB8m8Ea66Ca0B+PfOkoZwGOoLY+S1loS3kD99 9BO8MvYts0F8IhKUfmPAaq+d+kDbCQIGb+1LcneDpOv/v247NSOnYAOIOh64AcTc Ic8iEubGIaBfKJc2BPytNoGq6e/rE1uk6lgMmltDypToLiNyijEIJPKD+tH+o2Yp kNGqx5BVGrHiaAuUdxAy2enbnMKdc2xB/dp/33dD0cAtxeaUVbucQ0aT48cRDnmZ GdkPiq+tctcJtBJOl7kFMYyLNemRZH0fiJjxIyqCO+SUiWVsiB4HqadByIm6uUQ2 hPNdoI+q2MbO/ZgrmmzB =AObg -----END PGP SIGNATURE----- --dGBDEx8Ycw1mGAPo-- From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 08:57:57 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA224495; Thu, 11 Sep 2014 08:57:57 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 6BB7E3B7; Thu, 11 Sep 2014 08:57:56 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA03129; Thu, 11 Sep 2014 11:57:54 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1XS0CQ-00012W-EM; Thu, 11 Sep 2014 11:57:54 +0300 Message-ID: <541163C0.2080903@FreeBSD.org> Date: Thu, 11 Sep 2014 11:56:32 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Robert Watson , Gleb Smirnoff Subject: Re: svn commit: r271418 - head/sbin/dhclient References: <201409110548.s8B5md65014322@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 08:57:58 -0000 On 11/09/2014 11:11, Robert Watson wrote: > A bit behind on commits, but: does this mean that an older userspace dhclient > will no longer work with a newer kernel? At least in my case it appeared to work. I guess this is because the broadcast queries were not affected by the change. > On Thu, 11 Sep 2014, Gleb Smirnoff wrote: > >> Author: glebius >> Date: Thu Sep 11 05:48:39 2014 >> New Revision: 271418 >> URL: http://svnweb.freebsd.org/changeset/base/271418 >> >> Log: >> Since r270929 raw sockets expect network byte order. >> >> Submitted by: avg >> >> Modified: >> head/sbin/dhclient/packet.c >> >> Modified: head/sbin/dhclient/packet.c >> ============================================================================== >> --- head/sbin/dhclient/packet.c Thu Sep 11 03:16:57 2014 (r271417) >> +++ head/sbin/dhclient/packet.c Thu Sep 11 05:48:39 2014 (r271418) >> @@ -127,17 +127,6 @@ assemble_udp_ip_header(unsigned char *bu >> ip.ip_dst.s_addr = to; >> >> ip.ip_sum = wrapsum(checksum((unsigned char *)&ip, sizeof(ip), 0)); >> - >> - /* >> - * While the BPF -- used for broadcasts -- expects a "true" IP header >> - * with all the bytes in network byte order, the raw socket interface >> - * which is used for unicasts expects the ip_len field to be in host >> - * byte order. In both cases, the checksum has to be correct, so this >> - * is as good a place as any to turn the bytes around again. >> - */ >> - if (to != INADDR_BROADCAST) >> - ip.ip_len = ntohs(ip.ip_len); >> - >> memcpy(&buf[*bufix], &ip, sizeof(ip)); >> *bufix += sizeof(ip); >> >> >> > -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 09:16:58 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7CEF0922; Thu, 11 Sep 2014 09:16:58 +0000 (UTC) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.allbsd.org", Issuer "RapidSSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0616A7B8; Thu, 11 Sep 2014 09:16:57 +0000 (UTC) Received: from alph.d.allbsd.org ([IPv6:2001:2f0:104:e010:862b:2bff:febc:8956]) (authenticated bits=56) by mail.allbsd.org (8.14.9/8.14.8) with ESMTP id s8B9GYF2067759 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 11 Sep 2014 18:16:45 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.8/8.14.8) with ESMTP id s8B9GXvU062395; Thu, 11 Sep 2014 18:16:34 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Thu, 11 Sep 2014 18:15:34 +0900 (JST) Message-Id: <20140911.181534.1518812407362343252.hrs@allbsd.org> To: avg@FreeBSD.org Subject: Re: svn commit: r271418 - head/sbin/dhclient From: Hiroki Sato In-Reply-To: <541163C0.2080903@FreeBSD.org> References: <201409110548.s8B5md65014322@svn.freebsd.org> <541163C0.2080903@FreeBSD.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.6 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Thu_Sep_11_18_15_34_2014_044)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (mail.allbsd.org [IPv6:2001:2f0:104:e001::32]); Thu, 11 Sep 2014 18:16:53 +0900 (JST) X-Spam-Status: No, score=-97.9 required=13.0 tests=CONTENT_TYPE_PRESENT, RDNS_NONE,SPF_SOFTFAIL,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, glebius@FreeBSD.org, rwatson@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 09:16:58 -0000 ----Security_Multipart(Thu_Sep_11_18_15_34_2014_044)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Andriy Gapon wrote in <541163C0.2080903@FreeBSD.org>: av> On 11/09/2014 11:11, Robert Watson wrote: av> > A bit behind on commits, but: does this mean that an older userspace dhclient av> > will no longer work with a newer kernel? av> av> At least in my case it appeared to work. I guess this is because the broadcast av> queries were not affected by the change. Only a unicast DHCPREQUEST sent from a DHCP client to renew the lease does not work. "dhclient[N]: send_packet: Invalid argument" log appears at certain interval due to it. A lease will expire, and it will repeatedly restart from the broadcast discovery phase. -- Hiroki ----Security_Multipart(Thu_Sep_11_18_15_34_2014_044)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEABECAAYFAlQRaDYACgkQTyzT2CeTzy3qbQCgrt/yQ7uUXGPtgx/0haMHrb9s c5UAn37KrllEU/iBuxTxjYxTaGrH0QEv =/6SW -----END PGP SIGNATURE----- ----Security_Multipart(Thu_Sep_11_18_15_34_2014_044)---- From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 10:28:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4506D951; Thu, 11 Sep 2014 10:28:00 +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 30FD6E7F; Thu, 11 Sep 2014 10:28:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8BAS0NM046793; Thu, 11 Sep 2014 10:28:00 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BARxdj046785; Thu, 11 Sep 2014 10:27:59 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409111027.s8BARxdj046785@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 11 Sep 2014 10:27:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271421 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 10:28:00 -0000 Author: ae Date: Thu Sep 11 10:27:59 2014 New Revision: 271421 URL: http://svnweb.freebsd.org/changeset/base/271421 Log: * constify argument of in6_addrscope(); * use IN6_IS_ADDR_XXX() macro instead of hardcoded values; * for multicast addresses just return scope value, the only exception is addresses with 0x0F scope value (RFC 4291 p2.7.0); Obtained from: Yandex LLC Sponsored by: Yandex LLC Modified: head/sys/netinet6/in6.h head/sys/netinet6/scope6.c Modified: head/sys/netinet6/in6.h ============================================================================== --- head/sys/netinet6/in6.h Thu Sep 11 07:16:15 2014 (r271420) +++ head/sys/netinet6/in6.h Thu Sep 11 10:27:59 2014 (r271421) @@ -649,7 +649,7 @@ int in6_cksum_pseudo(struct ip6_hdr *, u int in6_cksum(struct mbuf *, u_int8_t, u_int32_t, u_int32_t); int in6_localaddr(struct in6_addr *); int in6_localip(struct in6_addr *); -int in6_addrscope(struct in6_addr *); +int in6_addrscope(const struct in6_addr *); struct in6_ifaddr *in6_ifawithifp(struct ifnet *, struct in6_addr *); extern void in6_if_up(struct ifnet *); struct sockaddr; Modified: head/sys/netinet6/scope6.c ============================================================================== --- head/sys/netinet6/scope6.c Thu Sep 11 07:16:15 2014 (r271420) +++ head/sys/netinet6/scope6.c Thu Sep 11 10:27:59 2014 (r271421) @@ -235,62 +235,24 @@ scope6_get(struct ifnet *ifp, struct sco * Get a scope of the address. Node-local, link-local, site-local or global. */ int -in6_addrscope(struct in6_addr *addr) +in6_addrscope(const struct in6_addr *addr) { - int scope; - - if (addr->s6_addr[0] == 0xfe) { - scope = addr->s6_addr[1] & 0xc0; - - switch (scope) { - case 0x80: - return IPV6_ADDR_SCOPE_LINKLOCAL; - break; - case 0xc0: - return IPV6_ADDR_SCOPE_SITELOCAL; - break; - default: - return IPV6_ADDR_SCOPE_GLOBAL; /* just in case */ - break; - } - } - - - if (addr->s6_addr[0] == 0xff) { - scope = addr->s6_addr[1] & 0x0f; + if (IN6_IS_ADDR_MULTICAST(addr)) { /* - * due to other scope such as reserved, - * return scope doesn't work. + * Addresses with reserved value F must be treated as + * global multicast addresses. */ - switch (scope) { - case IPV6_ADDR_SCOPE_INTFACELOCAL: - return IPV6_ADDR_SCOPE_INTFACELOCAL; - break; - case IPV6_ADDR_SCOPE_LINKLOCAL: - return IPV6_ADDR_SCOPE_LINKLOCAL; - break; - case IPV6_ADDR_SCOPE_SITELOCAL: - return IPV6_ADDR_SCOPE_SITELOCAL; - break; - default: - return IPV6_ADDR_SCOPE_GLOBAL; - break; - } - } - - /* - * Regard loopback and unspecified addresses as global, since - * they have no ambiguity. - */ - if (bcmp(&in6addr_loopback, addr, sizeof(*addr) - 1) == 0) { - if (addr->s6_addr[15] == 1) /* loopback */ - return IPV6_ADDR_SCOPE_LINKLOCAL; - if (addr->s6_addr[15] == 0) /* unspecified */ - return IPV6_ADDR_SCOPE_GLOBAL; /* XXX: correct? */ - } - - return IPV6_ADDR_SCOPE_GLOBAL; + if (IPV6_ADDR_MC_SCOPE(addr) == 0x0f) + return (IPV6_ADDR_SCOPE_GLOBAL); + return (IPV6_ADDR_MC_SCOPE(addr)); + } + if (IN6_IS_ADDR_LINKLOCAL(addr) || + IN6_IS_ADDR_LOOPBACK(addr)) + return (IPV6_ADDR_SCOPE_LINKLOCAL); + if (IN6_IS_ADDR_SITELOCAL(addr)) + return (IPV6_ADDR_SCOPE_SITELOCAL); + return (IPV6_ADDR_SCOPE_GLOBAL); } /* From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 10:53:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C978929F; Thu, 11 Sep 2014 10:53:58 +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 A9E351CD; Thu, 11 Sep 2014 10:53:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8BArw9e060315; Thu, 11 Sep 2014 10:53:58 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BArvDc060308; Thu, 11 Sep 2014 10:53:57 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201409111053.s8BArvDc060308@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 11 Sep 2014 10:53:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271422 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 10:53:59 -0000 Author: andrew Date: Thu Sep 11 10:53:57 2014 New Revision: 271422 URL: http://svnweb.freebsd.org/changeset/base/271422 Log: Rename pmap_kenter_temp to pmap_kenter_temporary to be consistent with the other architectures with this function. Submitted by: Svatopluk Kraus Submitted by: Michal Meloun Modified: head/sys/arm/arm/minidump_machdep.c head/sys/arm/arm/pmap-v6.c head/sys/arm/arm/pmap.c head/sys/arm/include/pmap.h Modified: head/sys/arm/arm/minidump_machdep.c ============================================================================== --- head/sys/arm/arm/minidump_machdep.c Thu Sep 11 10:27:59 2014 (r271421) +++ head/sys/arm/arm/minidump_machdep.c Thu Sep 11 10:53:57 2014 (r271422) @@ -154,7 +154,7 @@ blk_write(struct dumperinfo *di, char *p sz -= len; } else { for (i = 0; i < len; i += PAGE_SIZE) - dump_va = pmap_kenter_temp(pa + i, + dump_va = pmap_kenter_temporary(pa + i, (i + fragsz) >> PAGE_SHIFT); fragsz += len; pa += len; @@ -244,7 +244,7 @@ minidumpsys(struct dumperinfo *di) } if (pmap_pde_v(pdp) && pmap_pde_page(pdp)) { /* Set bit for each valid page in this 1MB block */ - addr = pmap_kenter_temp(*pdp & L1_C_ADDR_MASK, 0); + addr = pmap_kenter_temporary(*pdp & L1_C_ADDR_MASK, 0); pt = (pt_entry_t*)(addr + (((uint32_t)*pdp & L1_C_ADDR_MASK) & PAGE_MASK)); for (k = 0; k < 256; k++) { Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Thu Sep 11 10:27:59 2014 (r271421) +++ head/sys/arm/arm/pmap-v6.c Thu Sep 11 10:53:57 2014 (r271422) @@ -2369,7 +2369,7 @@ pmap_kenter_section(vm_offset_t va, vm_o * to be used for panic dumps. */ void * -pmap_kenter_temp(vm_paddr_t pa, int i) +pmap_kenter_temporary(vm_paddr_t pa, int i) { vm_offset_t va; Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Thu Sep 11 10:27:59 2014 (r271421) +++ head/sys/arm/arm/pmap.c Thu Sep 11 10:53:57 2014 (r271422) @@ -2663,7 +2663,7 @@ pmap_kenter_section(vm_offset_t va, vm_o * to be used for panic dumps. */ void * -pmap_kenter_temp(vm_paddr_t pa, int i) +pmap_kenter_temporary(vm_paddr_t pa, int i) { vm_offset_t va; Modified: head/sys/arm/include/pmap.h ============================================================================== --- head/sys/arm/include/pmap.h Thu Sep 11 10:27:59 2014 (r271421) +++ head/sys/arm/include/pmap.h Thu Sep 11 10:53:57 2014 (r271422) @@ -256,7 +256,7 @@ int pmap_change_attr(vm_offset_t, vm_siz void pmap_kenter(vm_offset_t va, vm_paddr_t pa); void pmap_kenter_nocache(vm_offset_t va, vm_paddr_t pa); void pmap_kenter_device(vm_offset_t va, vm_paddr_t pa); -void *pmap_kenter_temp(vm_paddr_t pa, int i); +void *pmap_kenter_temporary(vm_paddr_t pa, int i); void pmap_kenter_user(vm_offset_t va, vm_paddr_t pa); vm_paddr_t pmap_kextract(vm_offset_t va); void pmap_kremove(vm_offset_t); From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 11:25:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E25F7A92; Thu, 11 Sep 2014 11:25:10 +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 CDBEF6C3; Thu, 11 Sep 2014 11:25:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8BBPA7B074836; Thu, 11 Sep 2014 11:25:10 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BBPA5L074835; Thu, 11 Sep 2014 11:25:10 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409111125.s8BBPA5L074835@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 11 Sep 2014 11:25: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: r271423 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 11:25:11 -0000 Author: kib Date: Thu Sep 11 11:25:10 2014 New Revision: 271423 URL: http://svnweb.freebsd.org/changeset/base/271423 Log: MFC r270993 (by mjg): Fix up proc_realparent to always return correct process. Approved by: re (delphij) Modified: stable/10/sys/kern/kern_exit.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_exit.c ============================================================================== --- stable/10/sys/kern/kern_exit.c Thu Sep 11 10:53:57 2014 (r271422) +++ stable/10/sys/kern/kern_exit.c Thu Sep 11 11:25:10 2014 (r271423) @@ -106,8 +106,12 @@ proc_realparent(struct proc *child) sx_assert(&proctree_lock, SX_LOCKED); if ((child->p_treeflag & P_TREE_ORPHANED) == 0) { - return (child->p_pptr->p_pid == child->p_oppid ? - child->p_pptr : initproc); + if (child->p_oppid == 0 || + child->p_pptr->p_pid == child->p_oppid) + parent = child->p_pptr; + else + parent = initproc; + return (parent); } for (p = child; (p->p_treeflag & P_TREE_FIRST_ORPHAN) == 0;) { /* Cannot use LIST_PREV(), since the list head is not known. */ From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 12:30:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0674687; Thu, 11 Sep 2014 12:30: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 CB62C1AD; Thu, 11 Sep 2014 12:30: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 s8BCUUBV005592; Thu, 11 Sep 2014 12:30:30 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BCUUv1005586; Thu, 11 Sep 2014 12:30:30 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201409111230.s8BCUUv1005586@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 11 Sep 2014 12:30:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271424 - in head: etc etc/defaults share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 12:30:31 -0000 Author: hrs Date: Thu Sep 11 12:30:29 2014 New Revision: 271424 URL: http://svnweb.freebsd.org/changeset/base/271424 Log: - Add $netif_ipexpand_max to specify the upper limit for the number of addresses generated by an address range specification. The default value is 2048. This can be increased by setting $netif_ipexpand_max in rc.conf. - Fix warning messages when an address range spec exceeds the upper limit. PR: 186841 Modified: head/etc/defaults/rc.conf head/etc/network.subr head/share/man/man5/rc.conf.5 Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Thu Sep 11 11:25:10 2014 (r271423) +++ head/etc/defaults/rc.conf Thu Sep 11 12:30:29 2014 (r271424) @@ -110,6 +110,7 @@ synchronous_dhclient="NO" # Start dhclie # interfaces during startup. defaultroute_delay="30" # Time to wait for a default route on a DHCP interface. defaultroute_carrier_delay="5" # Time to wait for carrier while waiting for a default route. +netif_ipexpand_max="2048" # Maximum number of IP addrs in a range spec. wpa_supplicant_program="/usr/sbin/wpa_supplicant" wpa_supplicant_flags="-s" # Extra flags to pass to wpa_supplicant wpa_supplicant_conf_file="/etc/wpa_supplicant.conf" Modified: head/etc/network.subr ============================================================================== --- head/etc/network.subr Thu Sep 11 11:25:10 2014 (r271423) +++ head/etc/network.subr Thu Sep 11 12:30:29 2014 (r271424) @@ -25,9 +25,7 @@ # $FreeBSD$ # IFCONFIG_CMD="/sbin/ifconfig" - -# Maximum number of addresses expanded from a address range specification. -_IPEXPANDMAX=31 +: ${netif_ipexpand_max:=2048} # # Subroutines commonly used from network startup scripts. @@ -886,8 +884,8 @@ ifalias_expand_addr_inet() _ipcount=$_iplow while [ "$_ipcount" -le "$_iphigh" ]; do _retstr="${_retstr} ${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail}${_plen:+/}${_plen}" - if [ $_ipcount -gt $(($_iplow + $_IPEXPANDMAX)) ]; then - warn "Range specification is too large (${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_iphigh}${_iptail:+.}${_iptail}). ${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail} was processed." + if [ $_ipcount -gt $(($_iplow + $netif_ipexpand_max)) ]; then + warn "Range specification is too large (${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_iphigh}${_iptail:+.}${_iptail}). ${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail} was processed. Increase \$netif_ipexpand_max in rc.conf." break else _ipcount=$(($_ipcount + 1)) @@ -976,9 +974,9 @@ ifalias_expand_addr_inet6() $_ipleft $_ipcount $_ipright \ ${_plen:+/}$_plen` _retstr="$_retstr $_r" - if [ $_ipcount -gt $(($_iplow + $_IPEXPANDMAX)) ] + if [ $_ipcount -gt $(($_iplow + $netif_ipexpand_max)) ] then - warn "Range specification is too large $(printf '(%s:%04x%s-%s:%04x%s)' $_ipleft $_iplow $_ipright $_ipleft $_iphigh $_ipright). $(printf '%s:%04x%s-%s:%04x%s' $_ipleft $_iplow $_ipright $_ipleft $_ipcount $_ipright) was processed." + warn "Range specification is too large $(printf '(%s:%x%s-%s:%x%s)' "$_ipleft" "$_iplow" "$_ipright" "$_ipleft" "$_iphigh" "$_ipright"). $(printf '%s:%x%s-%s:%x%s' "$_ipleft" "$_iplow" "$_ipright" "$_ipleft" "$_ipcount" "$_ipright") was processed. Increase \$netif_ipexpand_max in rc.conf." break else _ipcount=$(($_ipcount + 1)) Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Thu Sep 11 11:25:10 2014 (r271423) +++ head/share/man/man5/rc.conf.5 Thu Sep 11 12:30:29 2014 (r271424) @@ -1199,6 +1199,19 @@ or .Li inet6 2001:db8:1-f::1/64 . This notation allows address and prefix length part only, not the other address modifiers. +Note that the maximum number of the generated addresses from a range +specification is limited to an integer value specified in +.Va netif_ipexpand_max +in +.Xr rc.conf 5 +because a small typo can unexpectedly generate a large number of addresses. +The default value is +.Li 2048 . +It can be increased by adding the following line into +.Xr rc.conf 5 : +.Bd -literal +netif_ipexpand_max="4096" +.Ed .Pp In the case of .Li 192.0.2.5-23/24 , From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 12:33:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 175C398D; Thu, 11 Sep 2014 12:33:38 +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 02C1E288; Thu, 11 Sep 2014 12:33:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8BCXbGF007495; Thu, 11 Sep 2014 12:33:37 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BCXbGB007493; Thu, 11 Sep 2014 12:33:37 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409111233.s8BCXbGB007493@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 11 Sep 2014 12:33:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271425 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 12:33:38 -0000 Author: ae Date: Thu Sep 11 12:33:37 2014 New Revision: 271425 URL: http://svnweb.freebsd.org/changeset/base/271425 Log: Introduce new scope related functions. * new macro to remove magic number - IPV6_ADDR_SCOPES_COUNT; * sa6_checkzone() - this function checks sockaddr_in6 structure for correctness of sin6_scope_id. It also can fill correct value sometimes. * in6_getscopezone() - this function returns scope zone id for specified interface and scope. * in6_getlinkifnet() - this function returns struct ifnet for corresponding zone id of link-local scope. Obtained from: Yandex LLC Sponsored by: Yandex LLC Modified: head/sys/netinet6/scope6.c head/sys/netinet6/scope6_var.h Modified: head/sys/netinet6/scope6.c ============================================================================== --- head/sys/netinet6/scope6.c Thu Sep 11 12:30:29 2014 (r271424) +++ head/sys/netinet6/scope6.c Thu Sep 11 12:33:37 2014 (r271425) @@ -467,3 +467,77 @@ in6_getscope(struct in6_addr *in6) return (0); } + +/* + * Return pointer to ifnet structure, corresponding to the zone id of + * link-local scope. + */ +struct ifnet* +in6_getlinkifnet(uint32_t zoneid) +{ + + return (ifnet_byindex((u_short)zoneid)); +} + +/* + * Return zone id for the specified scope. + */ +uint32_t +in6_getscopezone(const struct ifnet *ifp, int scope) +{ + + if (scope == IPV6_ADDR_SCOPE_INTFACELOCAL || + scope == IPV6_ADDR_SCOPE_LINKLOCAL) + return (ifp->if_index); + if (scope >= 0 && scope < IPV6_ADDR_SCOPES_COUNT) + return (SID(ifp)->s6id_list[scope]); + return (0); +} + +/* + * This function is for checking sockaddr_in6 structure passed + * from the application level (usually). + * + * sin6_scope_id should be set for link-local unicast, link-local and + * interface-local multicast addresses. + * + * If it is zero, then look into default zone ids. If default zone id is + * not set or disabled, then return error. + */ +int +sa6_checkzone(struct sockaddr_in6 *sa6) +{ + int scope; + + scope = in6_addrscope(&sa6->sin6_addr); + if (scope == IPV6_ADDR_SCOPE_GLOBAL) + return (sa6->sin6_scope_id ? EINVAL: 0); + if (IN6_IS_ADDR_MULTICAST(&sa6->sin6_addr) && + scope != IPV6_ADDR_SCOPE_LINKLOCAL && + scope != IPV6_ADDR_SCOPE_INTFACELOCAL) { + if (sa6->sin6_scope_id == 0 && V_ip6_use_defzone != 0) + sa6->sin6_scope_id = V_sid_default.s6id_list[scope]; + return (0); + } + /* + * Since ::1 address always configured on the lo0, we can + * automatically set its zone id, when it is not specified. + * Return error, when specified zone id doesn't match with + * actual value. + */ + if (IN6_IS_ADDR_LOOPBACK(&sa6->sin6_addr)) { + if (sa6->sin6_scope_id == 0) + sa6->sin6_scope_id = in6_getscopezone(V_loif, scope); + else if (sa6->sin6_scope_id != in6_getscopezone(V_loif, scope)) + return (EADDRNOTAVAIL); + } + /* XXX: we can validate sin6_scope_id here */ + if (sa6->sin6_scope_id != 0) + return (0); + if (V_ip6_use_defzone != 0) + sa6->sin6_scope_id = V_sid_default.s6id_list[scope]; + /* Return error if we can't determine zone id */ + return (sa6->sin6_scope_id ? 0: EADDRNOTAVAIL); +} + + Modified: head/sys/netinet6/scope6_var.h ============================================================================== --- head/sys/netinet6/scope6_var.h Thu Sep 11 12:30:29 2014 (r271424) +++ head/sys/netinet6/scope6_var.h Thu Sep 11 12:33:37 2014 (r271425) @@ -36,12 +36,13 @@ #ifdef _KERNEL #include +#define IPV6_ADDR_SCOPES_COUNT 16 struct scope6_id { /* * 16 is correspondent to 4bit multicast scope field. * i.e. from node-local to global with some reserved/unassigned types. */ - u_int32_t s6id_list[16]; + uint32_t s6id_list[IPV6_ADDR_SCOPES_COUNT]; }; VNET_DECLARE(int, deembed_scopeid); @@ -56,9 +57,12 @@ int scope6_get_default(struct scope6_id u_int32_t scope6_addr2default(struct in6_addr *); int sa6_embedscope(struct sockaddr_in6 *, int); int sa6_recoverscope(struct sockaddr_in6 *); +int sa6_checkzone(struct sockaddr_in6 *); int in6_setscope(struct in6_addr *, struct ifnet *, u_int32_t *); int in6_clearscope(struct in6_addr *); uint16_t in6_getscope(struct in6_addr *); +uint32_t in6_getscopezone(const struct ifnet *, int); +struct ifnet* in6_getlinkifnet(uint32_t); #endif /* _KERNEL */ #endif /* _NETINET6_SCOPE6_VAR_H_ */ From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 12:54:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C16F131; Thu, 11 Sep 2014 12:54:18 +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 277B87A1; Thu, 11 Sep 2014 12:54:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8BCsIBM016895; Thu, 11 Sep 2014 12:54:18 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BCsI9Q016894; Thu, 11 Sep 2014 12:54:18 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409111254.s8BCsI9Q016894@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 11 Sep 2014 12:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271426 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 12:54:18 -0000 Author: ae Date: Thu Sep 11 12:54:17 2014 New Revision: 271426 URL: http://svnweb.freebsd.org/changeset/base/271426 Log: * use M_ZERO flag with malloc instead of explicit zeroing. * remove MULTI_SCOPE ifdef. Obtained from: Yandex LLC Sponsored by: Yandex LLC Modified: head/sys/netinet6/scope6.c Modified: head/sys/netinet6/scope6.c ============================================================================== --- head/sys/netinet6/scope6.c Thu Sep 11 12:33:37 2014 (r271425) +++ head/sys/netinet6/scope6.c Thu Sep 11 12:54:17 2014 (r271426) @@ -100,22 +100,14 @@ scope6_ifattach(struct ifnet *ifp) { struct scope6_id *sid; - sid = (struct scope6_id *)malloc(sizeof(*sid), M_IFADDR, M_WAITOK); - bzero(sid, sizeof(*sid)); - + sid = malloc(sizeof(*sid), M_IFADDR, M_WAITOK | M_ZERO); /* * XXX: IPV6_ADDR_SCOPE_xxx macros are not standard. * Should we rather hardcode here? */ sid->s6id_list[IPV6_ADDR_SCOPE_INTFACELOCAL] = ifp->if_index; sid->s6id_list[IPV6_ADDR_SCOPE_LINKLOCAL] = ifp->if_index; -#ifdef MULTI_SCOPE - /* by default, we don't care about scope boundary for these scopes. */ - sid->s6id_list[IPV6_ADDR_SCOPE_SITELOCAL] = 1; - sid->s6id_list[IPV6_ADDR_SCOPE_ORGLOCAL] = 1; -#endif - - return sid; + return (sid); } void From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 13:18:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7485FA94; Thu, 11 Sep 2014 13:18: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 44376A62; Thu, 11 Sep 2014 13:18: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 s8BDIgI2027438; Thu, 11 Sep 2014 13:18:42 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BDIf5Q027436; Thu, 11 Sep 2014 13:18:41 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409111318.s8BDIf5Q027436@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 11 Sep 2014 13:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271427 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 13:18:42 -0000 Author: ae Date: Thu Sep 11 13:18:41 2014 New Revision: 271427 URL: http://svnweb.freebsd.org/changeset/base/271427 Log: Add const qualifier to in6_addrhash() function. Add in6ifa_ifwithaddr() function. It is similar to ifa_ifwithaddr, but does fast lookup in the hash of inet6 addresses. Obtained from: Yandex LLC Sponsored by: Yandex LLC Modified: head/sys/netinet6/in6.c head/sys/netinet6/in6_var.h Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Thu Sep 11 12:54:17 2014 (r271426) +++ head/sys/netinet6/in6.c Thu Sep 11 13:18:41 2014 (r271427) @@ -1715,6 +1715,29 @@ in6ifa_ifpforlinklocal(struct ifnet *ifp /* + * find the internet address corresponding to a given address. + * ifaddr is returned referenced. + */ +struct in6_ifaddr * +in6ifa_ifwithaddr(const struct in6_addr *addr, uint32_t zoneid) +{ + struct in6_ifaddr *ia; + + IN6_IFADDR_RLOCK(); + LIST_FOREACH(ia, IN6ADDR_HASH(addr), ia6_hash) { + if (IN6_ARE_ADDR_EQUAL(IA6_IN6(ia), addr)) { + if (zoneid != 0 && + zoneid != ia->ia_addr.sin6_scope_id) + continue; + ifa_ref(&ia->ia_ifa); + break; + } + } + IN6_IFADDR_RUNLOCK(); + return (ia); +} + +/* * find the internet address corresponding to a given interface and address. * ifaddr is returned referenced. */ Modified: head/sys/netinet6/in6_var.h ============================================================================== --- head/sys/netinet6/in6_var.h Thu Sep 11 12:54:17 2014 (r271426) +++ head/sys/netinet6/in6_var.h Thu Sep 11 13:18:41 2014 (r271427) @@ -526,7 +526,7 @@ VNET_DECLARE(u_long, in6_ifaddrhmask); (&V_in6_ifaddrhashtbl[IN6ADDR_HASHVAL(x) & V_in6_ifaddrhmask]) static __inline uint32_t -in6_addrhash(struct in6_addr *in6) +in6_addrhash(const struct in6_addr *in6) { uint32_t x; @@ -812,6 +812,7 @@ void in6_setmaxmtu(void); int in6_if2idlen(struct ifnet *); struct in6_ifaddr *in6ifa_ifpforlinklocal(struct ifnet *, int); struct in6_ifaddr *in6ifa_ifpwithaddr(struct ifnet *, struct in6_addr *); +struct in6_ifaddr *in6ifa_ifwithaddr(const struct in6_addr *, uint32_t); struct in6_ifaddr *in6ifa_llaonifp(struct ifnet *); char *ip6_sprintf(char *, const struct in6_addr *); int in6_addr2zoneid(struct ifnet *, struct in6_addr *, u_int32_t *); From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 15:36:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE0317AF; Thu, 11 Sep 2014 15:36:40 +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 98078CE5; Thu, 11 Sep 2014 15:36:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8BFaeir096384; Thu, 11 Sep 2014 15:36:40 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BFaaCn096361; Thu, 11 Sep 2014 15:36:36 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409111536.s8BFaaCn096361@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 11 Sep 2014 15:36: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: r271428 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 15:36:40 -0000 Author: ian Date: Thu Sep 11 15:36:36 2014 New Revision: 271428 URL: http://svnweb.freebsd.org/changeset/base/271428 Log: Disable debugging-related options in all ARM kernel configs for stable-10. This is a direct commit to stable-10. The following options are disabled in all arm kernel configs: DEADLKRES DIAGNOSTIC INVARIANTS INVARIANTS_SUPPORT WITNESS WITNESS_SKIPSPIN Approved by: re(gjb) Modified: stable/10/sys/arm/conf/AC100 stable/10/sys/arm/conf/AVILA stable/10/sys/arm/conf/BEAGLEBONE stable/10/sys/arm/conf/CAMBRIA stable/10/sys/arm/conf/CUBIEBOARD stable/10/sys/arm/conf/CUBIEBOARD2 stable/10/sys/arm/conf/DB-78XXX stable/10/sys/arm/conf/DB-88F5XXX stable/10/sys/arm/conf/DB-88F6XXX stable/10/sys/arm/conf/DIGI-CCWMX53 stable/10/sys/arm/conf/DOCKSTAR stable/10/sys/arm/conf/DREAMPLUG-1001 stable/10/sys/arm/conf/EA3250 stable/10/sys/arm/conf/EFIKA_MX stable/10/sys/arm/conf/LN2410SBC stable/10/sys/arm/conf/RADXA stable/10/sys/arm/conf/RPI-B stable/10/sys/arm/conf/VERSATILEPB Modified: stable/10/sys/arm/conf/AC100 ============================================================================== --- stable/10/sys/arm/conf/AC100 Thu Sep 11 13:18:41 2014 (r271427) +++ stable/10/sys/arm/conf/AC100 Thu Sep 11 15:36:36 2014 (r271428) @@ -47,9 +47,9 @@ options VERBOSE_SYSINIT #options ALT_BREAK_TO_DEBUGGER options DDB options GDB -options DIAGNOSTIC -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options DIAGNOSTIC +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options KDB options KDB_TRACE #options KTR @@ -57,8 +57,8 @@ options KDB_TRACE #options KTR_ENTRIES=16384 #options KTR_MASK=(KTR_SPARE2) #options KTR_COMPILE=KTR_ALL -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options WITNESS_KDB options MUTEX_DEBUG Modified: stable/10/sys/arm/conf/AVILA ============================================================================== --- stable/10/sys/arm/conf/AVILA Thu Sep 11 13:18:41 2014 (r271427) +++ stable/10/sys/arm/conf/AVILA Thu Sep 11 15:36:36 2014 (r271428) @@ -39,8 +39,8 @@ options KDB #options GDB options DDB # Enable the kernel debugger #options DEADLKRES # Enable the deadlock resolver -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS # Enable checks to detect deadlocks and cycles #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC Modified: stable/10/sys/arm/conf/BEAGLEBONE ============================================================================== --- stable/10/sys/arm/conf/BEAGLEBONE Thu Sep 11 13:18:41 2014 (r271427) +++ stable/10/sys/arm/conf/BEAGLEBONE Thu Sep 11 15:36:36 2014 (r271428) @@ -59,10 +59,10 @@ options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages options KDB options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC # NFS support Modified: stable/10/sys/arm/conf/CAMBRIA ============================================================================== --- stable/10/sys/arm/conf/CAMBRIA Thu Sep 11 13:18:41 2014 (r271427) +++ stable/10/sys/arm/conf/CAMBRIA Thu Sep 11 15:36:36 2014 (r271428) @@ -39,8 +39,8 @@ options KDB #options GDB options DDB # Enable the kernel debugger #options DEADLKRES # Enable the deadlock resolver -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS # Enable checks to detect deadlocks and cycles #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC Modified: stable/10/sys/arm/conf/CUBIEBOARD ============================================================================== --- stable/10/sys/arm/conf/CUBIEBOARD Thu Sep 11 13:18:41 2014 (r271427) +++ stable/10/sys/arm/conf/CUBIEBOARD Thu Sep 11 15:36:36 2014 (r271428) @@ -58,10 +58,10 @@ options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages options KDB options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC # NFS support Modified: stable/10/sys/arm/conf/CUBIEBOARD2 ============================================================================== --- stable/10/sys/arm/conf/CUBIEBOARD2 Thu Sep 11 13:18:41 2014 (r271427) +++ stable/10/sys/arm/conf/CUBIEBOARD2 Thu Sep 11 15:36:36 2014 (r271428) @@ -58,10 +58,10 @@ options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages options KDB options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC # NFS support Modified: stable/10/sys/arm/conf/DB-78XXX ============================================================================== --- stable/10/sys/arm/conf/DB-78XXX Thu Sep 11 13:18:41 2014 (r271427) +++ stable/10/sys/arm/conf/DB-78XXX Thu Sep 11 15:36:36 2014 (r271428) @@ -48,8 +48,8 @@ options DDB #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options KDB -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options WITNESS_KDB device pci Modified: stable/10/sys/arm/conf/DB-88F5XXX ============================================================================== --- stable/10/sys/arm/conf/DB-88F5XXX Thu Sep 11 13:18:41 2014 (r271427) +++ stable/10/sys/arm/conf/DB-88F5XXX Thu Sep 11 15:36:36 2014 (r271428) @@ -47,8 +47,8 @@ options DDB #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options KDB -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options WITNESS_KDB device pci Modified: stable/10/sys/arm/conf/DB-88F6XXX ============================================================================== --- stable/10/sys/arm/conf/DB-88F6XXX Thu Sep 11 13:18:41 2014 (r271427) +++ stable/10/sys/arm/conf/DB-88F6XXX Thu Sep 11 15:36:36 2014 (r271428) @@ -48,8 +48,8 @@ options DDB #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options KDB -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options WITNESS_KDB device pci Modified: stable/10/sys/arm/conf/DIGI-CCWMX53 ============================================================================== --- stable/10/sys/arm/conf/DIGI-CCWMX53 Thu Sep 11 13:18:41 2014 (r271427) +++ stable/10/sys/arm/conf/DIGI-CCWMX53 Thu Sep 11 15:36:36 2014 (r271428) @@ -86,10 +86,10 @@ options KDB # Enable kernel debugger # For full debugger support use this instead: options DDB # Support DDB. #options GDB # Support remote GDB. -options DEADLKRES # Enable the deadlock resolver -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles +#options DEADLKRES # Enable the deadlock resolver +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! Modified: stable/10/sys/arm/conf/DOCKSTAR ============================================================================== --- stable/10/sys/arm/conf/DOCKSTAR Thu Sep 11 13:18:41 2014 (r271427) +++ stable/10/sys/arm/conf/DOCKSTAR Thu Sep 11 15:36:36 2014 (r271428) @@ -146,8 +146,8 @@ options ALT_BREAK_TO_DEBUGGER options DDB options KDB #options DIAGNOSTIC -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS # Enable checks to detect deadlocks and cycles #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options WITNESS_KDB Modified: stable/10/sys/arm/conf/DREAMPLUG-1001 ============================================================================== --- stable/10/sys/arm/conf/DREAMPLUG-1001 Thu Sep 11 13:18:41 2014 (r271427) +++ stable/10/sys/arm/conf/DREAMPLUG-1001 Thu Sep 11 15:36:36 2014 (r271428) @@ -154,8 +154,8 @@ options ALT_BREAK_TO_DEBUGGER options DDB options KDB #options DIAGNOSTIC -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS # Enable checks to detect deadlocks and cycles #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options WITNESS_KDB Modified: stable/10/sys/arm/conf/EA3250 ============================================================================== --- stable/10/sys/arm/conf/EA3250 Thu Sep 11 13:18:41 2014 (r271427) +++ stable/10/sys/arm/conf/EA3250 Thu Sep 11 15:36:36 2014 (r271428) @@ -48,8 +48,8 @@ options DDB #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options KDB -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options WITNESS_KDB # Pseudo devices Modified: stable/10/sys/arm/conf/EFIKA_MX ============================================================================== --- stable/10/sys/arm/conf/EFIKA_MX Thu Sep 11 13:18:41 2014 (r271427) +++ stable/10/sys/arm/conf/EFIKA_MX Thu Sep 11 15:36:36 2014 (r271428) @@ -86,10 +86,10 @@ options KDB # Enable kernel debugger # For full debugger support use this instead: options DDB # Support DDB. #options GDB # Support remote GDB. -options DEADLKRES # Enable the deadlock resolver -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles +#options DEADLKRES # Enable the deadlock resolver +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! Modified: stable/10/sys/arm/conf/LN2410SBC ============================================================================== --- stable/10/sys/arm/conf/LN2410SBC Thu Sep 11 13:18:41 2014 (r271427) +++ stable/10/sys/arm/conf/LN2410SBC Thu Sep 11 15:36:36 2014 (r271428) @@ -73,10 +73,10 @@ device bpf device uart # Debugging for use in -current -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed device md Modified: stable/10/sys/arm/conf/RADXA ============================================================================== --- stable/10/sys/arm/conf/RADXA Thu Sep 11 13:18:41 2014 (r271427) +++ stable/10/sys/arm/conf/RADXA Thu Sep 11 15:36:36 2014 (r271428) @@ -60,9 +60,9 @@ options KDB options DDB # Enable the kernel debugger #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -options DIAGNOSTIC +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options DIAGNOSTIC # NFS support #options NFSCL Modified: stable/10/sys/arm/conf/RPI-B ============================================================================== --- stable/10/sys/arm/conf/RPI-B Thu Sep 11 13:18:41 2014 (r271427) +++ stable/10/sys/arm/conf/RPI-B Thu Sep 11 15:36:36 2014 (r271428) @@ -89,8 +89,8 @@ device bcm2835_bsc options KDB options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS device md device random # Entropy device Modified: stable/10/sys/arm/conf/VERSATILEPB ============================================================================== --- stable/10/sys/arm/conf/VERSATILEPB Thu Sep 11 13:18:41 2014 (r271427) +++ stable/10/sys/arm/conf/VERSATILEPB Thu Sep 11 15:36:36 2014 (r271428) @@ -92,8 +92,8 @@ makeoptions SC_DFLT_FONT=cp437 options KDB options DDB # Enable the kernel debugger -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS device md device random # Entropy device From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 16:21:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1B70656; Thu, 11 Sep 2014 16:21:51 +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 8C516241; Thu, 11 Sep 2014 16:21:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8BGLp1A019868; Thu, 11 Sep 2014 16:21:51 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BGLpYJ019867; Thu, 11 Sep 2014 16:21:51 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201409111621.s8BGLpYJ019867@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 11 Sep 2014 16:21:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271429 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 16:21:51 -0000 Author: smh Date: Thu Sep 11 16:21:51 2014 New Revision: 271429 URL: http://svnweb.freebsd.org/changeset/base/271429 Log: Persist vdev_resilver_txg changes to avoid panic caused by validation vs a vdev_resilver_txg value from a previous resilver. MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Thu Sep 11 15:36:36 2014 (r271428) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Thu Sep 11 16:21:51 2014 (r271429) @@ -1951,12 +1951,15 @@ vdev_dtl_reassess(vdev_t *vd, uint64_t t /* * If the vdev was resilvering and no longer has any - * DTLs then reset its resilvering flag. + * DTLs then reset its resilvering flag and dirty + * the top level so that we persist the change. */ if (vd->vdev_resilver_txg != 0 && range_tree_space(vd->vdev_dtl[DTL_MISSING]) == 0 && - range_tree_space(vd->vdev_dtl[DTL_OUTAGE]) == 0) + range_tree_space(vd->vdev_dtl[DTL_OUTAGE]) == 0) { vd->vdev_resilver_txg = 0; + vdev_config_dirty(vd->vdev_top); + } mutex_exit(&vd->vdev_dtl_lock); From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 18:12:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2E97338; Thu, 11 Sep 2014 18:12:29 +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 9D2228; Thu, 11 Sep 2014 18:12:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8BICT9R073047; Thu, 11 Sep 2014 18:12:29 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BICS6s073041; Thu, 11 Sep 2014 18:12:28 GMT (envelope-from br@FreeBSD.org) Message-Id: <201409111812.s8BICS6s073041@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 11 Sep 2014 18:12:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271431 - in head/sys: arm/altera/socfpga boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 18:12:29 -0000 Author: br Date: Thu Sep 11 18:12:28 2014 New Revision: 271431 URL: http://svnweb.freebsd.org/changeset/base/271431 Log: Add Reset Manager driver. This driver provides generic way to reset and provides sysctl tunables for enable/disable FPGA<->HPS bridges. Sponsored by: DARPA, AFRL Added: head/sys/arm/altera/socfpga/socfpga_l3regs.h (contents, props changed) head/sys/arm/altera/socfpga/socfpga_rstmgr.c (contents, props changed) head/sys/arm/altera/socfpga/socfpga_rstmgr.h (contents, props changed) Modified: head/sys/arm/altera/socfpga/files.socfpga head/sys/arm/altera/socfpga/socfpga_common.c head/sys/boot/fdt/dts/arm/socfpga.dtsi Modified: head/sys/arm/altera/socfpga/files.socfpga ============================================================================== --- head/sys/arm/altera/socfpga/files.socfpga Thu Sep 11 17:19:44 2014 (r271430) +++ head/sys/arm/altera/socfpga/files.socfpga Thu Sep 11 18:12:28 2014 (r271431) @@ -16,3 +16,4 @@ arm/arm/mpcore_timer.c standard arm/altera/socfpga/socfpga_common.c standard arm/altera/socfpga/socfpga_machdep.c standard arm/altera/socfpga/socfpga_manager.c standard +arm/altera/socfpga/socfpga_rstmgr.c standard Modified: head/sys/arm/altera/socfpga/socfpga_common.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_common.c Thu Sep 11 17:19:44 2014 (r271430) +++ head/sys/arm/altera/socfpga/socfpga_common.c Thu Sep 11 18:12:28 2014 (r271431) @@ -42,20 +42,31 @@ __FBSDID("$FreeBSD$"); #include #include -#define RESMAN_BASE 0xFFD05000 -#define RESMAN_CTRL 0x4 -#define SWWARMRSTREQ (1 << 1) +#include void cpu_reset(void) { + uint32_t addr, paddr; bus_addr_t vaddr; + phandle_t node; - if (bus_space_map(fdtbus_bs_tag, RESMAN_BASE, 0x10, 0, &vaddr) == 0) { - bus_space_write_4(fdtbus_bs_tag, vaddr, - RESMAN_CTRL, SWWARMRSTREQ); + if (rstmgr_warmreset() == 0) + goto end; + + node = OF_finddevice("rstmgr"); + if (node == -1) + goto end; + + if ((OF_getprop(node, "reg", &paddr, sizeof(paddr))) > 0) { + addr = fdt32_to_cpu(paddr); + if (bus_space_map(fdtbus_bs_tag, addr, 0x8, 0, &vaddr) == 0) { + bus_space_write_4(fdtbus_bs_tag, vaddr, + RSTMGR_CTRL, CTRL_SWWARMRSTREQ); + } } +end: while (1); } Added: head/sys/arm/altera/socfpga/socfpga_l3regs.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/altera/socfpga/socfpga_l3regs.h Thu Sep 11 18:12:28 2014 (r271431) @@ -0,0 +1,54 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#define L3REGS_REMAP 0x0 /* Remap */ +#define REMAP_LWHPS2FPGA (1 << 4) +#define REMAP_HPS2FPGA (1 << 3) +#define REMAP_MPUZERO (1 << 0) +#define L3REGS_L4MAIN 0x8 /* L4 main peripherals security */ +#define L3REGS_L4SP 0xC /* L4 SP Peripherals Security */ +#define L3REGS_L4MP 0x10 /* L4 MP Peripherals Security */ +#define L3REGS_L4OSC1 0x14 /* L4 OSC1 Peripherals Security */ +#define L3REGS_L4SPIM 0x18 /* L4 SPIM Peripherals Security */ +#define L3REGS_STM 0x1C /* STM Peripheral Security */ +#define L3REGS_LWHPS2FPGAREGS 0x20 /* LWHPS2FPGA AXI Bridge Security */ +#define L3REGS_USB1 0x28 /* USB1 Peripheral Security */ +#define L3REGS_NANDDATA 0x2C /* NAND Flash Controller Data Sec */ +#define L3REGS_USB0 0x80 /* USB0 Peripheral Security */ +#define L3REGS_NANDREGS 0x84 /* NAND Flash Controller Security */ +#define L3REGS_QSPIDATA 0x88 /* QSPI Flash Controller Data Sec */ +#define L3REGS_FPGAMGRDATA 0x8C /* FPGA Manager Data Peripheral Sec */ +#define L3REGS_HPS2FPGAREGS 0x90 /* HPS2FPGA AXI Bridge Perip. Sec */ +#define L3REGS_ACP 0x94 /* MPU ACP Peripheral Security */ +#define L3REGS_ROM 0x98 /* ROM Peripheral Security */ +#define L3REGS_OCRAM 0x9C /* On-chip RAM Peripheral Security */ +#define L3REGS_SDRDATA 0xA0 /* SDRAM Data Peripheral Security */ Added: head/sys/arm/altera/socfpga/socfpga_rstmgr.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/altera/socfpga/socfpga_rstmgr.c Thu Sep 11 18:12:28 2014 (r271431) @@ -0,0 +1,259 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * SOCFPGA Reset Manager. + * Chapter 3, Cyclone V Device Handbook (CV-5V2 2014.07.22) + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +struct rstmgr_softc { + struct resource *res[1]; + bus_space_tag_t bst; + bus_space_handle_t bsh; + device_t dev; +}; + +struct rstmgr_softc *rstmgr_sc; + +static struct resource_spec rstmgr_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { -1, 0 } +}; + +enum { + RSTMGR_SYSCTL_FPGA2HPS, + RSTMGR_SYSCTL_LWHPS2FPGA, + RSTMGR_SYSCTL_HPS2FPGA +}; + +static int +l3remap(struct rstmgr_softc *sc, int remap, int enable) +{ + uint32_t addr, paddr; + bus_addr_t vaddr; + phandle_t node; + int reg; + + /* + * Control whether bridge is visible to L3 masters or not. + * Register is write-only. + */ + + reg = REMAP_MPUZERO; + if (enable) + reg |= (remap); + else + reg &= ~(remap); + + node = OF_finddevice("l3regs"); + if (node == -1) { + device_printf(sc->dev, "Can't find l3regs node\n"); + return (1); + } + + if ((OF_getprop(node, "reg", &paddr, sizeof(paddr))) > 0) { + addr = fdt32_to_cpu(paddr); + if (bus_space_map(fdtbus_bs_tag, addr, 0x4, 0, &vaddr) == 0) { + bus_space_write_4(fdtbus_bs_tag, vaddr, + L3REGS_REMAP, reg); + return (0); + } + } + + return (1); +} + +static int +rstmgr_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct rstmgr_softc *sc; + int enable; + int remap; + int err; + int reg; + int bit; + + sc = arg1; + + switch (arg2) { + case RSTMGR_SYSCTL_FPGA2HPS: + bit = BRGMODRST_FPGA2HPS; + remap = 0; + break; + case RSTMGR_SYSCTL_LWHPS2FPGA: + bit = BRGMODRST_LWHPS2FPGA; + remap = REMAP_LWHPS2FPGA; + break; + case RSTMGR_SYSCTL_HPS2FPGA: + bit = BRGMODRST_HPS2FPGA; + remap = REMAP_HPS2FPGA; + break; + default: + return (1); + }; + + reg = READ4(sc, RSTMGR_BRGMODRST); + enable = reg & bit ? 0 : 1; + + err = sysctl_handle_int(oidp, &enable, 0, req); + if (err || !req->newptr) + return (err); + + if (enable == 1) + reg &= ~(bit); + else if (enable == 0) + reg |= (bit); + else + return (EINVAL); + + WRITE4(sc, RSTMGR_BRGMODRST, reg); + l3remap(sc, remap, enable); + + return (0); +} + +int +rstmgr_warmreset(void) +{ + struct rstmgr_softc *sc; + + sc = rstmgr_sc; + if (sc == NULL) + return (1); + + /* Request warm reset */ + WRITE4(sc, RSTMGR_CTRL, + CTRL_SWWARMRSTREQ); + + return (0); +} + +static int +rstmgr_add_sysctl(struct rstmgr_softc *sc) +{ + struct sysctl_oid_list *children; + struct sysctl_ctx_list *ctx; + + ctx = device_get_sysctl_ctx(sc->dev); + children = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)); + + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "fpga2hps", + CTLTYPE_UINT | CTLFLAG_RW, sc, RSTMGR_SYSCTL_FPGA2HPS, + rstmgr_sysctl, "I", "Enable fpga2hps bridge"); + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "lwhps2fpga", + CTLTYPE_UINT | CTLFLAG_RW, sc, RSTMGR_SYSCTL_LWHPS2FPGA, + rstmgr_sysctl, "I", "Enable lwhps2fpga bridge"); + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "hps2fpga", + CTLTYPE_UINT | CTLFLAG_RW, sc, RSTMGR_SYSCTL_HPS2FPGA, + rstmgr_sysctl, "I", "Enable hps2fpga bridge"); + + return (0); +} + +static int +rstmgr_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "altr,rst-mgr")) + return (ENXIO); + + device_set_desc(dev, "Reset Manager"); + return (BUS_PROBE_DEFAULT); +} + +static int +rstmgr_attach(device_t dev) +{ + struct rstmgr_softc *sc; + + sc = device_get_softc(dev); + sc->dev = dev; + + if (bus_alloc_resources(dev, rstmgr_spec, sc->res)) { + device_printf(dev, "could not allocate resources\n"); + return (ENXIO); + } + + /* Memory interface */ + sc->bst = rman_get_bustag(sc->res[0]); + sc->bsh = rman_get_bushandle(sc->res[0]); + + rstmgr_sc = sc; + rstmgr_add_sysctl(sc); + + return (0); +} + +static device_method_t rstmgr_methods[] = { + DEVMETHOD(device_probe, rstmgr_probe), + DEVMETHOD(device_attach, rstmgr_attach), + { 0, 0 } +}; + +static driver_t rstmgr_driver = { + "rstmgr", + rstmgr_methods, + sizeof(struct rstmgr_softc), +}; + +static devclass_t rstmgr_devclass; + +DRIVER_MODULE(rstmgr, simplebus, rstmgr_driver, rstmgr_devclass, 0, 0); Added: head/sys/arm/altera/socfpga/socfpga_rstmgr.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/altera/socfpga/socfpga_rstmgr.h Thu Sep 11 18:12:28 2014 (r271431) @@ -0,0 +1,46 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#define RSTMGR_STAT 0x0 /* Status */ +#define RSTMGR_CTRL 0x4 /* Control */ +#define CTRL_SWWARMRSTREQ (1 << 1) /* Trigger warm reset */ +#define RSTMGR_COUNTS 0x8 /* Reset Cycles Count */ +#define RSTMGR_MPUMODRST 0x10 /* MPU Module Reset */ +#define RSTMGR_PERMODRST 0x14 /* Peripheral Module Reset */ +#define RSTMGR_PER2MODRST 0x18 /* Peripheral 2 Module Reset */ +#define RSTMGR_BRGMODRST 0x1C /* Bridge Module Reset */ +#define BRGMODRST_FPGA2HPS (1 << 2) +#define BRGMODRST_LWHPS2FPGA (1 << 1) +#define BRGMODRST_HPS2FPGA (1 << 0) +#define RSTMGR_MISCMODRST 0x20 /* Miscellaneous Module Reset */ + +int rstmgr_warmreset(void); Modified: head/sys/boot/fdt/dts/arm/socfpga.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/socfpga.dtsi Thu Sep 11 17:19:44 2014 (r271430) +++ head/sys/boot/fdt/dts/arm/socfpga.dtsi Thu Sep 11 18:12:28 2014 (r271431) @@ -39,6 +39,8 @@ aliases { soc = &SOC; + rstmgr = &rstmgr; + l3regs = &l3regs; serial0 = &serial0; serial1 = &serial1; }; @@ -69,6 +71,16 @@ interrupt-parent = < &GIC >; }; + rstmgr: rstmgr@ffd05000 { + compatible = "altr,rst-mgr"; + reg = <0xffd05000 0x1000>; + }; + + l3regs: l3regs@ff800000 { + compatible = "altr,l3regs"; + reg = <0xff800000 0x1000>; + }; + fpgamgr: fpgamgr@ff706000 { compatible = "altr,fpga-mgr"; reg = <0xff706000 0x1000>, /* FPGAMGRREGS */ From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 18:19:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A70D867; Thu, 11 Sep 2014 18:19: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 457F0EE; Thu, 11 Sep 2014 18:19: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 s8BIJ9sF073993; Thu, 11 Sep 2014 18:19:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BIJ9Cv073992; Thu, 11 Sep 2014 18:19:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409111819.s8BIJ9Cv073992@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 11 Sep 2014 18:19:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271432 - head/contrib/llvm/tools/clang/lib/CodeGen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 18:19:09 -0000 Author: emaste Date: Thu Sep 11 18:19:08 2014 New Revision: 271432 URL: http://svnweb.freebsd.org/changeset/base/271432 Log: Merge upstream Clang rev 205331 debuginfo crash fix: Debug info: fix a crash when emitting IndirectFieldDecls, which were previously not handled at all. rdar://problem/16348575 MFC after: 1 week Sponsored by: DARPA, AFRL Modified: head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Modified: head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Thu Sep 11 18:12:28 2014 (r271431) +++ head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Thu Sep 11 18:19:08 2014 (r271432) @@ -1241,7 +1241,7 @@ CollectTemplateParams(const TemplatePara V = CGM.GetAddrOfFunction(FD); // Member data pointers have special handling too to compute the fixed // offset within the object. - if (isa(D)) { + if (isa(D) || isa(D)) { // These five lines (& possibly the above member function pointer // handling) might be able to be refactored to use similar code in // CodeGenModule::getMemberPointerConstant From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 18:20:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E9CB9A9; Thu, 11 Sep 2014 18:20:50 +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 4042AF7; Thu, 11 Sep 2014 18:20:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8BIKobe074742; Thu, 11 Sep 2014 18:20:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BIKoA1074741; Thu, 11 Sep 2014 18:20:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409111820.s8BIKoA1074741@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 11 Sep 2014 18:20:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271433 - head/contrib/llvm/patches X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 18:20:50 -0000 Author: emaste Date: Thu Sep 11 18:20:49 2014 New Revision: 271433 URL: http://svnweb.freebsd.org/changeset/base/271433 Log: Add clang patch corresponding to r271432 Added: head/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Added: head/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Thu Sep 11 18:20:49 2014 (r271433) @@ -0,0 +1,46 @@ +commit 96365aef99ec463375dfdaf6eb260823e0477b6a +Author: Adrian Prantl +Date: Tue Apr 1 17:52:06 2014 +0000 + + Debug info: fix a crash when emitting IndirectFieldDecls, which were + previously not handled at all. + rdar://problem/16348575 + + git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205331 91177308-0d34-0410-b5e6-96231b3b80d8 + +diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp +index 82db942..2556cf9 100644 +--- tools/clang/lib/CodeGen/CGDebugInfo.cpp ++++ tools/clangb/lib/CodeGen/CGDebugInfo.cpp +@@ -1252,7 +1252,7 @@ CollectTemplateParams(const TemplateParameterList *TPList, + V = CGM.GetAddrOfFunction(FD); + // Member data pointers have special handling too to compute the fixed + // offset within the object. +- if (isa(D)) { ++ if (isa(D) || isa(D)) { + // These five lines (& possibly the above member function pointer + // handling) might be able to be refactored to use similar code in + // CodeGenModule::getMemberPointerConstant +diff --git a/test/CodeGenCXX/debug-info-indirect-field-decl.cpp b/test/CodeGenCXX/debug-info-indirect-field-decl.cpp +new file mode 100644 +index 0000000..131ceba +--- /dev/null ++++ tools/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp +@@ -0,0 +1,17 @@ ++// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s ++// ++// Test that indirect field decls are handled gracefully. ++// rdar://problem/16348575 ++// ++template class Foo { }; ++ ++struct Bar { ++ int i1; ++ // CHECK: [ DW_TAG_member ] [line [[@LINE+1]], size 32, align 32, offset 32] [from _ZTSN3BarUt_E] ++ union { ++ // CHECK: [ DW_TAG_member ] [i2] [line [[@LINE+1]], size 32, align 32, offset 0] [from int] ++ int i2; ++ }; ++}; ++ ++Foo the_foo; From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 18:24:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFA83B2F; Thu, 11 Sep 2014 18:24: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 80E4119C; Thu, 11 Sep 2014 18:24: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 s8BIOGwG078059; Thu, 11 Sep 2014 18:24:16 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BIOGOE078057; Thu, 11 Sep 2014 18:24:16 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201409111824.s8BIOGOE078057@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Thu, 11 Sep 2014 18:24:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271434 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 18:24:16 -0000 Author: wblock (doc committer) Date: Thu Sep 11 18:24:16 2014 New Revision: 271434 URL: http://svnweb.freebsd.org/changeset/base/271434 Log: Update motd, clarifying the information and adding pointers to other resources. MFC after: 3 days Modified: head/etc/motd Modified: head/etc/motd ============================================================================== --- head/etc/motd Thu Sep 11 18:20:49 2014 (r271433) +++ head/etc/motd Thu Sep 11 18:24:16 2014 (r271434) @@ -1,25 +1,21 @@ FreeBSD ?.?.? (UNKNOWN) -Welcome to FreeBSD! +Welcome to FreeBSD! Handy technical support resources: -Before seeking technical support, please use the following resources: +Security advisories and errata: https://www.FreeBSD.org/releases/ +Handbook: https://www.FreeBSD.org/handbook/ +FAQ: https://www.FreeBSD.org/faq/ +Mailing list: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ +Forums: https://forums.FreeBSD.org/ + +Documents installed with the system are in the /usr/local/share/doc/freebsd/ +directory, or can be installed later with: pkg install en-freebsd-doc +For other languages, replace "en" with a language code like de or fr. -o Security advisories and updated errata information for all releases are - at http://www.FreeBSD.org/releases/ - always consult the ERRATA section - for your release first as it's updated frequently. - -o The Handbook and FAQ documents are at http://www.FreeBSD.org/ and, - along with the mailing lists, can be searched by going to - http://www.FreeBSD.org/search/. If the doc package has been installed - (or fetched via pkg install lang-freebsd-doc, where lang is the - 2-letter language code, e.g. en), they are also available formatted - in /usr/local/share/doc/freebsd. - -If you still have a question or problem, please take the output of -`uname -a', along with any relevant error messages, and email it -as a question to the questions@FreeBSD.org mailing list. If you are -unfamiliar with FreeBSD's directory layout, please refer to the hier(7) -manual page. If you are not familiar with manual pages, type `man man'. +Show the version of FreeBSD installed: uname -a +Please include that output and any error messages when posting questions. -Edit /etc/motd to change this login announcement. +Introduction to manual pages: man man +FreeBSD directory layout: man hier +Edit /etc/motd to change this login announcement. From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 18:42:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CE3AF25; Thu, 11 Sep 2014 18:42: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 0C941362; Thu, 11 Sep 2014 18:42: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 s8BIgpRJ087093; Thu, 11 Sep 2014 18:42:51 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BIgpoX087092; Thu, 11 Sep 2014 18:42:51 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201409111842.s8BIgpoX087092@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 11 Sep 2014 18:42:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271435 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 18:42:52 -0000 Author: smh Date: Thu Sep 11 18:42:51 2014 New Revision: 271435 URL: http://svnweb.freebsd.org/changeset/base/271435 Log: MFC r266497: Add sysctls for ZFS dirty data tuning. MFC r266533: Improve sysctl descriptions for new ZFS sysctls. Approved by: re (marius) Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Thu Sep 11 18:24:16 2014 (r271434) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Thu Sep 11 18:42:51 2014 (r271435) @@ -46,6 +46,11 @@ #include #include +#ifdef __FreeBSD__ +#include +#include +#endif + /* * ZFS Write Throttle * ------------------ @@ -130,33 +135,83 @@ uint64_t zfs_delay_scale = 1000 * 1000 * * per-pool basis using zfs.conf. */ +#ifdef __FreeBSD__ + +extern int zfs_vdev_async_write_active_max_dirty_percent; SYSCTL_DECL(_vfs_zfs); -#if 0 -TUNABLE_INT("vfs.zfs.no_write_throttle", &zfs_no_write_throttle); -SYSCTL_INT(_vfs_zfs, OID_AUTO, no_write_throttle, CTLFLAG_RDTUN, - &zfs_no_write_throttle, 0, ""); -TUNABLE_INT("vfs.zfs.write_limit_shift", &zfs_write_limit_shift); -SYSCTL_INT(_vfs_zfs, OID_AUTO, write_limit_shift, CTLFLAG_RDTUN, - &zfs_write_limit_shift, 0, "2^N of physical memory"); -SYSCTL_DECL(_vfs_zfs_txg); -TUNABLE_INT("vfs.zfs.txg.synctime_ms", &zfs_txg_synctime_ms); -SYSCTL_INT(_vfs_zfs_txg, OID_AUTO, synctime_ms, CTLFLAG_RDTUN, - &zfs_txg_synctime_ms, 0, "Target milliseconds to sync a txg"); - -TUNABLE_QUAD("vfs.zfs.write_limit_min", &zfs_write_limit_min); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, write_limit_min, CTLFLAG_RDTUN, - &zfs_write_limit_min, 0, "Minimum write limit"); -TUNABLE_QUAD("vfs.zfs.write_limit_max", &zfs_write_limit_max); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, write_limit_max, CTLFLAG_RDTUN, - &zfs_write_limit_max, 0, "Maximum data payload per txg"); -TUNABLE_QUAD("vfs.zfs.write_limit_inflated", &zfs_write_limit_inflated); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, write_limit_inflated, CTLFLAG_RDTUN, - &zfs_write_limit_inflated, 0, "Maximum size of the dynamic write limit"); -TUNABLE_QUAD("vfs.zfs.write_limit_override", &zfs_write_limit_override); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, write_limit_override, CTLFLAG_RDTUN, - &zfs_write_limit_override, 0, - "Force a txg if dirty buffers exceed this value (bytes)"); + +TUNABLE_QUAD("vfs.zfs.dirty_data_max", &zfs_dirty_data_max); +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, dirty_data_max, CTLFLAG_RWTUN, + &zfs_dirty_data_max, 0, + "The maximum amount of dirty data in bytes after which new writes are " + "halted until space becomes available"); + +TUNABLE_QUAD("vfs.zfs.dirty_data_max_max", &zfs_dirty_data_max_max); +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, dirty_data_max_max, CTLFLAG_RDTUN, + &zfs_dirty_data_max_max, 0, + "The absolute cap on dirty_data_max when auto calculating"); + +TUNABLE_INT("vfs.zfs.dirty_data_max_percent", &zfs_dirty_data_max_percent); +SYSCTL_INT(_vfs_zfs, OID_AUTO, dirty_data_max_percent, CTLFLAG_RDTUN, + &zfs_dirty_data_max_percent, 0, + "The percent of physical memory used to auto calculate dirty_data_max"); + +TUNABLE_QUAD("vfs.zfs.dirty_data_sync", &zfs_dirty_data_sync); +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, dirty_data_sync, CTLFLAG_RWTUN, + &zfs_dirty_data_sync, 0, + "Force a txg if the number of dirty buffer bytes exceed this value"); + +static int sysctl_zfs_delay_min_dirty_percent(SYSCTL_HANDLER_ARGS); +/* No zfs_delay_min_dirty_percent tunable due to limit requirements */ +SYSCTL_PROC(_vfs_zfs, OID_AUTO, delay_min_dirty_percent, + CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RW, 0, sizeof(int), + sysctl_zfs_delay_min_dirty_percent, "I", + "The limit of outstanding dirty data before transations are delayed"); + +static int sysctl_zfs_delay_scale(SYSCTL_HANDLER_ARGS); +/* No zfs_delay_scale tunable due to limit requirements */ +SYSCTL_PROC(_vfs_zfs, OID_AUTO, delay_scale, + CTLTYPE_U64 | CTLFLAG_MPSAFE | CTLFLAG_RW, 0, sizeof(uint64_t), + sysctl_zfs_delay_scale, "QU", + "Controls how quickly the delay approaches infinity"); + +static int +sysctl_zfs_delay_min_dirty_percent(SYSCTL_HANDLER_ARGS) +{ + int val, err; + + val = zfs_delay_min_dirty_percent; + err = sysctl_handle_int(oidp, &val, 0, req); + if (err != 0 || req->newptr == NULL) + return (err); + + if (val < zfs_vdev_async_write_active_max_dirty_percent) + return (EINVAL); + + zfs_delay_min_dirty_percent = val; + + return (0); +} + +static int +sysctl_zfs_delay_scale(SYSCTL_HANDLER_ARGS) +{ + uint64_t val; + int err; + + val = zfs_delay_scale; + err = sysctl_handle_64(oidp, &val, 0, req); + if (err != 0 || req->newptr == NULL) + return (err); + + if (val > UINT64_MAX / zfs_dirty_data_max) + return (EINVAL); + + zfs_delay_scale = val; + + return (0); +} #endif hrtime_t zfs_throttle_delay = MSEC2NSEC(10); From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 19:54:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA1C7319; Thu, 11 Sep 2014 19:54: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 D5E95C19; Thu, 11 Sep 2014 19:54: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 s8BJsUUZ020852; Thu, 11 Sep 2014 19:54:30 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BJsUhP020851; Thu, 11 Sep 2014 19:54:30 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201409111954.s8BJsUhP020851@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 11 Sep 2014 19:54:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271436 - head/usr.bin/rctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 19:54:31 -0000 Author: trasz Date: Thu Sep 11 19:54:30 2014 New Revision: 271436 URL: http://svnweb.freebsd.org/changeset/base/271436 Log: Fix typo. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/rctl/rctl.8 Modified: head/usr.bin/rctl/rctl.8 ============================================================================== --- head/usr.bin/rctl/rctl.8 Thu Sep 11 18:42:51 2014 (r271435) +++ head/usr.bin/rctl/rctl.8 Thu Sep 11 19:54:30 2014 (r271436) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 16, 2014 +.Dd September 11, 2014 .Dt RCTL 8 .Os .Sh NAME @@ -209,7 +209,7 @@ resource would be .Bl -column -offset 3n "pseudoterminals" .It Em action .It Sy deny Ta deny the allocation; not supported for -.Sy cpu +.Sy cputime and .Sy wallclock .It Sy log Ta "log a warning to the console" From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 20:01:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56AC17C2; Thu, 11 Sep 2014 20:01:58 +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 285E1D22; Thu, 11 Sep 2014 20:01:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8BK1wiH025787; Thu, 11 Sep 2014 20:01:58 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BK1woN025786; Thu, 11 Sep 2014 20:01:58 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201409112001.s8BK1woN025786@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 11 Sep 2014 20:01:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271437 - head/usr.sbin/iscsid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 20:01:58 -0000 Author: trasz Date: Thu Sep 11 20:01:57 2014 New Revision: 271437 URL: http://svnweb.freebsd.org/changeset/base/271437 Log: Don't blindly assume the target agreed to transition to Full Feature Phase; if we got a Login Response PDU without the "T" bit set, try again with an empty request. This fixes interoperability with COMSTAR. Reviewed by: mav@ Tested by: mav@ MFC after: 1 week Modified: head/usr.sbin/iscsid/login.c Modified: head/usr.sbin/iscsid/login.c ============================================================================== --- head/usr.sbin/iscsid/login.c Thu Sep 11 19:54:30 2014 (r271436) +++ head/usr.sbin/iscsid/login.c Thu Sep 11 20:01:57 2014 (r271437) @@ -575,7 +575,7 @@ login_negotiate(struct connection *conn) struct pdu *request, *response; struct keys *request_keys, *response_keys; struct iscsi_bhs_login_response *bhslr; - int i; + int i, nrequests = 0; log_debugx("beginning operational parameter negotiation"); request = login_new_request(conn, BHSLR_STAGE_OPERATIONAL_NEGOTIATION); @@ -629,19 +629,41 @@ login_negotiate(struct connection *conn) response_keys->keys_names[i], response_keys->keys_values[i]); } - bhslr = (struct iscsi_bhs_login_response *)response->pdu_bhs; - if ((bhslr->bhslr_flags & BHSLR_FLAGS_TRANSIT) == 0) - log_warnx("received final login response " - "without the \"T\" flag"); - else if (login_nsg(response) != BHSLR_STAGE_FULL_FEATURE_PHASE) + keys_delete(response_keys); + response_keys = NULL; + + for (;;) { + bhslr = (struct iscsi_bhs_login_response *)response->pdu_bhs; + if ((bhslr->bhslr_flags & BHSLR_FLAGS_TRANSIT) != 0) + break; + + nrequests++; + if (nrequests > 5) { + log_warnx("received login response " + "without the \"T\" flag too many times; giving up"); + break; + } + + log_debugx("received login response " + "without the \"T\" flag; sending another request"); + + pdu_delete(response); + + request = login_new_request(conn, + BHSLR_STAGE_OPERATIONAL_NEGOTIATION); + pdu_send(request); + pdu_delete(request); + + response = login_receive(conn); + } + + if (login_nsg(response) != BHSLR_STAGE_FULL_FEATURE_PHASE) log_warnx("received final login response with wrong NSG 0x%x", login_nsg(response)); + pdu_delete(response); log_debugx("operational parameter negotiation done; " "transitioning to Full Feature phase"); - - keys_delete(response_keys); - pdu_delete(response); } static void From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 20:21:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14B571D4; Thu, 11 Sep 2014 20:21: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 E9425F0D; Thu, 11 Sep 2014 20:21:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8BKL5f7035406; Thu, 11 Sep 2014 20:21:05 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BKL3hH035393; Thu, 11 Sep 2014 20:21:03 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201409112021.s8BKL3hH035393@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 11 Sep 2014 20:21:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271438 - in head: share/man/man9 sys/net sys/netinet sys/netinet6 sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 20:21:06 -0000 Author: asomers Date: Thu Sep 11 20:21:03 2014 New Revision: 271438 URL: http://svnweb.freebsd.org/changeset/base/271438 Log: Revisions 264905 and 266860 added a "int fib" argument to ifa_ifwithnet and ifa_ifwithdstaddr. For the sake of backwards compatibility, the new arguments were added to new functions named ifa_ifwithnet_fib and ifa_ifwithdstaddr_fib, while the old functions became wrappers around the new ones that passed RT_ALL_FIBS for the fib argument. However, the backwards compatibility is not desired for FreeBSD 11, because there are numerous other incompatible changes to the ifnet(9) API. We therefore decided to remove it from head but leave it in place for stable/9 and stable/10. In addition, this commit adds the fib argument to ifa_ifwithbroadaddr for consistency's sake. sys/sys/param.h Increment __FreeBSD_version sys/net/if.c sys/net/if_var.h sys/net/route.c Add fibnum argument to ifa_ifwithbroadaddr, and remove the _fib versions of ifa_ifwithdstaddr, ifa_ifwithnet, and ifa_ifwithroute. sys/net/route.c sys/net/rtsock.c sys/netinet/in_pcb.c sys/netinet/ip_options.c sys/netinet/ip_output.c sys/netinet6/nd6.c Fixup calls of modified functions. share/man/man9/ifnet.9 Document changed API. CR: https://reviews.freebsd.org/D458 MFC after: Never Sponsored by: Spectra Logic Modified: head/share/man/man9/ifnet.9 head/sys/net/if.c head/sys/net/if_var.h head/sys/net/route.c head/sys/net/rtsock.c head/sys/netinet/in_pcb.c head/sys/netinet/ip_options.c head/sys/netinet/ip_output.c head/sys/netinet6/nd6.c head/sys/sys/param.h Modified: head/share/man/man9/ifnet.9 ============================================================================== --- head/share/man/man9/ifnet.9 Thu Sep 11 20:01:57 2014 (r271437) +++ head/share/man/man9/ifnet.9 Thu Sep 11 20:21:03 2014 (r271438) @@ -77,9 +77,9 @@ .Ft "struct ifaddr *" .Fn ifa_ifwithaddr "struct sockaddr *addr" .Ft "struct ifaddr *" -.Fn ifa_ifwithdstaddr "struct sockaddr *addr" +.Fn ifa_ifwithdstaddr "struct sockaddr *addr" "int fib" .Ft "struct ifaddr *" -.Fn ifa_ifwithnet "struct sockaddr *addr" "int ignore_ptp" +.Fn ifa_ifwithnet "struct sockaddr *addr" "int ignore_ptp" "int fib" .Ft "struct ifaddr *" .Fn ifaof_ifpforaddr "struct sockaddr *addr" "struct ifnet *ifp" .Ft void @@ -1389,7 +1389,16 @@ returns an interface address for a point remote .Pq Dq destination address is -.Fa addr . +.Fa addr +and a fib is +.Fa fib . +If +.Fa fib +is +.Dv RT_ALL_FIBS , +then the first interface address matching +.Fa addr +will be returned. .Pp .Fn ifa_ifwithnet returns the most specific interface address which matches the @@ -1401,7 +1410,10 @@ address whose remote address is if one is found. If .Fa ignore_ptp -is true, skip point-to-point interface addresses. +is true, skip point-to-point interface addresses. The +.Fa fib +parameter is handled the same way as by +.Fn ifa_ifwithdstaddr . .Pp .Fn ifaof_ifpforaddr returns the most specific address configured on interface Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Thu Sep 11 20:01:57 2014 (r271437) +++ head/sys/net/if.c Thu Sep 11 20:21:03 2014 (r271438) @@ -1694,13 +1694,15 @@ ifa_ifwithaddr_check(struct sockaddr *ad */ /* ARGSUSED */ struct ifaddr * -ifa_ifwithbroadaddr(struct sockaddr *addr) +ifa_ifwithbroadaddr(struct sockaddr *addr, int fibnum) { struct ifnet *ifp; struct ifaddr *ifa; IFNET_RLOCK_NOSLEEP(); TAILQ_FOREACH(ifp, &V_ifnet, if_link) { + if ((fibnum != RT_ALL_FIBS) && (ifp->if_fib != fibnum)) + continue; IF_ADDR_RLOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { if (ifa->ifa_addr->sa_family != addr->sa_family) @@ -1727,7 +1729,7 @@ done: */ /*ARGSUSED*/ struct ifaddr * -ifa_ifwithdstaddr_fib(struct sockaddr *addr, int fibnum) +ifa_ifwithdstaddr(struct sockaddr *addr, int fibnum) { struct ifnet *ifp; struct ifaddr *ifa; @@ -1757,19 +1759,12 @@ done: return (ifa); } -struct ifaddr * -ifa_ifwithdstaddr(struct sockaddr *addr) -{ - - return (ifa_ifwithdstaddr_fib(addr, RT_ALL_FIBS)); -} - /* * Find an interface on a specific network. If many, choice * is most specific found. */ struct ifaddr * -ifa_ifwithnet_fib(struct sockaddr *addr, int ignore_ptp, int fibnum) +ifa_ifwithnet(struct sockaddr *addr, int ignore_ptp, int fibnum) { struct ifnet *ifp; struct ifaddr *ifa; @@ -1867,13 +1862,6 @@ done: return (ifa); } -struct ifaddr * -ifa_ifwithnet(struct sockaddr *addr, int ignore_ptp) -{ - - return (ifa_ifwithnet_fib(addr, ignore_ptp, RT_ALL_FIBS)); -} - /* * Find an interface address specific to an interface best matching * a given address. Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Thu Sep 11 20:01:57 2014 (r271437) +++ head/sys/net/if_var.h Thu Sep 11 20:21:03 2014 (r271438) @@ -513,13 +513,10 @@ int ifa_switch_loopback_route(struct ifa struct ifaddr *ifa_ifwithaddr(struct sockaddr *); int ifa_ifwithaddr_check(struct sockaddr *); -struct ifaddr *ifa_ifwithbroadaddr(struct sockaddr *); -struct ifaddr *ifa_ifwithdstaddr(struct sockaddr *); -struct ifaddr *ifa_ifwithdstaddr_fib(struct sockaddr *, int); -struct ifaddr *ifa_ifwithnet(struct sockaddr *, int); -struct ifaddr *ifa_ifwithnet_fib(struct sockaddr *, int, int); -struct ifaddr *ifa_ifwithroute(int, struct sockaddr *, struct sockaddr *); -struct ifaddr *ifa_ifwithroute_fib(int, struct sockaddr *, struct sockaddr *, u_int); +struct ifaddr *ifa_ifwithbroadaddr(struct sockaddr *, int); +struct ifaddr *ifa_ifwithdstaddr(struct sockaddr *, int); +struct ifaddr *ifa_ifwithnet(struct sockaddr *, int, int); +struct ifaddr *ifa_ifwithroute(int, struct sockaddr *, struct sockaddr *, u_int); struct ifaddr *ifaof_ifpforaddr(struct sockaddr *, struct ifnet *); int ifa_preferred(struct ifaddr *, struct ifaddr *); Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Thu Sep 11 20:01:57 2014 (r271437) +++ head/sys/net/route.c Thu Sep 11 20:21:03 2014 (r271438) @@ -570,7 +570,7 @@ rtredirect_fib(struct sockaddr *dst, } /* verify the gateway is directly reachable */ - if ((ifa = ifa_ifwithnet_fib(gateway, 0, fibnum)) == NULL) { + if ((ifa = ifa_ifwithnet(gateway, 0, fibnum)) == NULL) { error = ENETUNREACH; goto out; } @@ -700,18 +700,8 @@ rtioctl_fib(u_long req, caddr_t data, u_ #endif /* INET */ } -/* - * For both ifa_ifwithroute() routines, 'ifa' is returned referenced. - */ -struct ifaddr * -ifa_ifwithroute(int flags, struct sockaddr *dst, struct sockaddr *gateway) -{ - - return (ifa_ifwithroute_fib(flags, dst, gateway, RT_DEFAULT_FIB)); -} - struct ifaddr * -ifa_ifwithroute_fib(int flags, struct sockaddr *dst, struct sockaddr *gateway, +ifa_ifwithroute(int flags, struct sockaddr *dst, struct sockaddr *gateway, u_int fibnum) { struct ifaddr *ifa; @@ -727,7 +717,7 @@ ifa_ifwithroute_fib(int flags, struct so */ ifa = NULL; if (flags & RTF_HOST) - ifa = ifa_ifwithdstaddr_fib(dst, fibnum); + ifa = ifa_ifwithdstaddr(dst, fibnum); if (ifa == NULL) ifa = ifa_ifwithaddr(gateway); } else { @@ -736,10 +726,10 @@ ifa_ifwithroute_fib(int flags, struct so * or host, the gateway may still be on the * other end of a pt to pt link. */ - ifa = ifa_ifwithdstaddr_fib(gateway, fibnum); + ifa = ifa_ifwithdstaddr(gateway, fibnum); } if (ifa == NULL) - ifa = ifa_ifwithnet_fib(gateway, 0, fibnum); + ifa = ifa_ifwithnet(gateway, 0, fibnum); if (ifa == NULL) { struct rtentry *rt = rtalloc1_fib(gateway, 0, RTF_RNH_LOCKED, fibnum); if (rt == NULL) @@ -853,7 +843,7 @@ rt_getifa_fib(struct rt_addrinfo *info, */ if (info->rti_ifp == NULL && ifpaddr != NULL && ifpaddr->sa_family == AF_LINK && - (ifa = ifa_ifwithnet_fib(ifpaddr, 0, fibnum)) != NULL) { + (ifa = ifa_ifwithnet(ifpaddr, 0, fibnum)) != NULL) { info->rti_ifp = ifa->ifa_ifp; ifa_free(ifa); } @@ -867,10 +857,10 @@ rt_getifa_fib(struct rt_addrinfo *info, if (sa != NULL && info->rti_ifp != NULL) info->rti_ifa = ifaof_ifpforaddr(sa, info->rti_ifp); else if (dst != NULL && gateway != NULL) - info->rti_ifa = ifa_ifwithroute_fib(flags, dst, gateway, + info->rti_ifa = ifa_ifwithroute(flags, dst, gateway, fibnum); else if (sa != NULL) - info->rti_ifa = ifa_ifwithroute_fib(flags, sa, sa, + info->rti_ifa = ifa_ifwithroute(flags, sa, sa, fibnum); } if ((ifa = info->rti_ifa) != NULL) { Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Thu Sep 11 20:01:57 2014 (r271437) +++ head/sys/net/rtsock.c Thu Sep 11 20:21:03 2014 (r271438) @@ -752,7 +752,8 @@ route_output(struct mbuf *m, struct sock rt->rt_ifp->if_type == IFT_PROPVIRTUAL) { struct ifaddr *ifa; - ifa = ifa_ifwithnet(info.rti_info[RTAX_DST], 1); + ifa = ifa_ifwithnet(info.rti_info[RTAX_DST], 1, + RT_ALL_FIBS); if (ifa != NULL) rt_maskedcopy(ifa->ifa_addr, &laddr, Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Thu Sep 11 20:01:57 2014 (r271437) +++ head/sys/netinet/in_pcb.c Thu Sep 11 20:21:03 2014 (r271438) @@ -792,9 +792,11 @@ in_pcbladdr(struct inpcb *inp, struct in struct in_ifaddr *ia; struct ifnet *ifp; - ia = ifatoia(ifa_ifwithdstaddr((struct sockaddr *)sin)); + ia = ifatoia(ifa_ifwithdstaddr((struct sockaddr *)sin, + RT_ALL_FIBS)); if (ia == NULL) - ia = ifatoia(ifa_ifwithnet((struct sockaddr *)sin, 0)); + ia = ifatoia(ifa_ifwithnet((struct sockaddr *)sin, 0, + RT_ALL_FIBS)); if (ia == NULL) { error = ENETUNREACH; goto done; @@ -909,9 +911,10 @@ in_pcbladdr(struct inpcb *inp, struct in sain.sin_len = sizeof(struct sockaddr_in); sain.sin_addr.s_addr = faddr->s_addr; - ia = ifatoia(ifa_ifwithdstaddr(sintosa(&sain))); + ia = ifatoia(ifa_ifwithdstaddr(sintosa(&sain), RT_ALL_FIBS)); if (ia == NULL) - ia = ifatoia(ifa_ifwithnet(sintosa(&sain), 0)); + ia = ifatoia(ifa_ifwithnet(sintosa(&sain), 0, + RT_ALL_FIBS)); if (ia == NULL) ia = ifatoia(ifa_ifwithaddr(sintosa(&sain))); Modified: head/sys/netinet/ip_options.c ============================================================================== --- head/sys/netinet/ip_options.c Thu Sep 11 20:01:57 2014 (r271437) +++ head/sys/netinet/ip_options.c Thu Sep 11 20:21:03 2014 (r271438) @@ -227,8 +227,11 @@ dropit: if (opt == IPOPT_SSRR) { #define INA struct in_ifaddr * #define SA struct sockaddr * - if ((ia = (INA)ifa_ifwithdstaddr((SA)&ipaddr)) == NULL) - ia = (INA)ifa_ifwithnet((SA)&ipaddr, 0); + ia = (INA)ifa_ifwithdstaddr((SA)&ipaddr, + RT_ALL_FIBS); + if (ia == NULL) + ia = (INA)ifa_ifwithnet((SA)&ipaddr, 0, + RT_ALL_FIBS); } else /* XXX MRT 0 for routing */ ia = ip_rtaddr(ipaddr.sin_addr, M_GETFIB(m)); Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Thu Sep 11 20:01:57 2014 (r271437) +++ head/sys/netinet/ip_output.c Thu Sep 11 20:21:03 2014 (r271438) @@ -235,8 +235,10 @@ again: * or the destination address of a ptp interface. */ if (flags & IP_SENDONES) { - if ((ia = ifatoia(ifa_ifwithbroadaddr(sintosa(dst)))) == NULL && - (ia = ifatoia(ifa_ifwithdstaddr(sintosa(dst)))) == NULL) { + if ((ia = ifatoia(ifa_ifwithbroadaddr(sintosa(dst), + RT_ALL_FIBS))) == NULL && + (ia = ifatoia(ifa_ifwithdstaddr(sintosa(dst), + RT_ALL_FIBS))) == NULL) { IPSTAT_INC(ips_noroute); error = ENETUNREACH; goto bad; @@ -248,8 +250,10 @@ again: ip->ip_ttl = 1; isbroadcast = 1; } else if (flags & IP_ROUTETOIF) { - if ((ia = ifatoia(ifa_ifwithdstaddr(sintosa(dst)))) == NULL && - (ia = ifatoia(ifa_ifwithnet(sintosa(dst), 0))) == NULL) { + if ((ia = ifatoia(ifa_ifwithdstaddr(sintosa(dst), + RT_ALL_FIBS))) == NULL && + (ia = ifatoia(ifa_ifwithnet(sintosa(dst), 0, + RT_ALL_FIBS))) == NULL) { IPSTAT_INC(ips_noroute); error = ENETUNREACH; goto bad; Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Thu Sep 11 20:01:57 2014 (r271437) +++ head/sys/netinet6/nd6.c Thu Sep 11 20:21:03 2014 (r271438) @@ -945,7 +945,7 @@ nd6_is_new_addr_neighbor(struct sockaddr * If the address is assigned on the node of the other side of * a p2p interface, the address should be a neighbor. */ - dstaddr = ifa_ifwithdstaddr((struct sockaddr *)addr); + dstaddr = ifa_ifwithdstaddr((struct sockaddr *)addr, RT_ALL_FIBS); if (dstaddr != NULL) { if (dstaddr->ifa_ifp == ifp) { ifa_free(dstaddr); Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Thu Sep 11 20:01:57 2014 (r271437) +++ head/sys/sys/param.h Thu Sep 11 20:21:03 2014 (r271438) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100031 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100032 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 21:15:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 437F42AD; Thu, 11 Sep 2014 21:15: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 303C475F; Thu, 11 Sep 2014 21:15: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 s8BLFLpK060988; Thu, 11 Sep 2014 21:15:21 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BLFLA9060987; Thu, 11 Sep 2014 21:15:21 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201409112115.s8BLFLA9060987@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Thu, 11 Sep 2014 21:15:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271439 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 21:15:21 -0000 Author: neel Date: Thu Sep 11 21:15:20 2014 New Revision: 271439 URL: http://svnweb.freebsd.org/changeset/base/271439 Log: Initialize 'bc_rdonly' to the right value. Note that independent of this change a readonly disk file would still be opened O_RDONLY and protected from writes by the guest. Reviewed by: grehan Modified: head/usr.sbin/bhyve/block_if.c Modified: head/usr.sbin/bhyve/block_if.c ============================================================================== --- head/usr.sbin/bhyve/block_if.c Thu Sep 11 20:21:03 2014 (r271438) +++ head/usr.sbin/bhyve/block_if.c Thu Sep 11 21:15:20 2014 (r271439) @@ -278,6 +278,7 @@ blockif_open(const char *optstr, const c bc->bc_magic = BLOCKIF_SIG; bc->bc_fd = fd; + bc->bc_rdonly = ro; bc->bc_size = size; bc->bc_sectsz = sectsz; pthread_mutex_init(&bc->bc_mtx, NULL); From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 21:38:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DC16B43; Thu, 11 Sep 2014 21:38: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 E9D3B977; Thu, 11 Sep 2014 21:38:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8BLcDpv071058; Thu, 11 Sep 2014 21:38:13 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BLcAGr071038; Thu, 11 Sep 2014 21:38:10 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201409112138.s8BLcAGr071038@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 11 Sep 2014 21:38:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r271440 - in vendor-sys/acpica/dist: . generate/unix generate/unix/acpiexamples generate/unix/acpiexec generate/unix/acpihelp generate/unix/acpinames generate/unix/iasl source/common so... X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 21:38:14 -0000 Author: jkim Date: Thu Sep 11 21:38:09 2014 New Revision: 271440 URL: http://svnweb.freebsd.org/changeset/base/271440 Log: Import ACPICA 20140828. Added: vendor-sys/acpica/dist/source/common/ahuuids.c (contents, props changed) vendor-sys/acpica/dist/source/compiler/aslascii.c (contents, props changed) vendor-sys/acpica/dist/source/compiler/aslparser.y (contents, props changed) vendor-sys/acpica/dist/source/compiler/aslrules.y (contents, props changed) vendor-sys/acpica/dist/source/compiler/aslsupport.y (contents, props changed) vendor-sys/acpica/dist/source/compiler/asltokens.y (contents, props changed) vendor-sys/acpica/dist/source/compiler/asltypes.y (contents, props changed) vendor-sys/acpica/dist/source/components/utilities/uthex.c (contents, props changed) vendor-sys/acpica/dist/source/components/utilities/utuuid.c (contents, props changed) Deleted: vendor-sys/acpica/dist/source/compiler/aslcompiler.y Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/generate/unix/Makefile.config vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile vendor-sys/acpica/dist/generate/unix/acpihelp/Makefile vendor-sys/acpica/dist/generate/unix/acpinames/Makefile vendor-sys/acpica/dist/generate/unix/iasl/Makefile vendor-sys/acpica/dist/source/common/adfile.c vendor-sys/acpica/dist/source/common/adisasm.c vendor-sys/acpica/dist/source/common/adwalk.c vendor-sys/acpica/dist/source/common/ahids.c vendor-sys/acpica/dist/source/common/ahpredef.c vendor-sys/acpica/dist/source/common/dmextern.c vendor-sys/acpica/dist/source/common/dmrestag.c vendor-sys/acpica/dist/source/common/dmtable.c vendor-sys/acpica/dist/source/common/dmtbdump.c vendor-sys/acpica/dist/source/common/dmtbinfo.c vendor-sys/acpica/dist/source/compiler/aslanalyze.c vendor-sys/acpica/dist/source/compiler/aslbtypes.c vendor-sys/acpica/dist/source/compiler/aslcodegen.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/aslcompiler.l vendor-sys/acpica/dist/source/compiler/asldefine.h vendor-sys/acpica/dist/source/compiler/aslerror.c vendor-sys/acpica/dist/source/compiler/aslfileio.c vendor-sys/acpica/dist/source/compiler/aslfiles.c vendor-sys/acpica/dist/source/compiler/aslfold.c vendor-sys/acpica/dist/source/compiler/aslglobal.h vendor-sys/acpica/dist/source/compiler/aslhex.c vendor-sys/acpica/dist/source/compiler/asllength.c vendor-sys/acpica/dist/source/compiler/aslload.c vendor-sys/acpica/dist/source/compiler/asllookup.c vendor-sys/acpica/dist/source/compiler/aslmain.c vendor-sys/acpica/dist/source/compiler/aslmessages.c vendor-sys/acpica/dist/source/compiler/aslmessages.h vendor-sys/acpica/dist/source/compiler/aslmethod.c vendor-sys/acpica/dist/source/compiler/aslnamesp.c vendor-sys/acpica/dist/source/compiler/aslopcodes.c vendor-sys/acpica/dist/source/compiler/asloperands.c vendor-sys/acpica/dist/source/compiler/aslopt.c vendor-sys/acpica/dist/source/compiler/aslprepkg.c vendor-sys/acpica/dist/source/compiler/aslresource.c vendor-sys/acpica/dist/source/compiler/aslrestype1.c vendor-sys/acpica/dist/source/compiler/aslrestype1i.c vendor-sys/acpica/dist/source/compiler/aslrestype2.c vendor-sys/acpica/dist/source/compiler/aslrestype2d.c vendor-sys/acpica/dist/source/compiler/aslrestype2e.c vendor-sys/acpica/dist/source/compiler/aslrestype2q.c vendor-sys/acpica/dist/source/compiler/aslrestype2s.c vendor-sys/acpica/dist/source/compiler/aslrestype2w.c vendor-sys/acpica/dist/source/compiler/aslstartup.c vendor-sys/acpica/dist/source/compiler/aslsupport.l vendor-sys/acpica/dist/source/compiler/asltransform.c vendor-sys/acpica/dist/source/compiler/asltree.c vendor-sys/acpica/dist/source/compiler/asltypes.h vendor-sys/acpica/dist/source/compiler/aslutils.c vendor-sys/acpica/dist/source/compiler/asluuid.c vendor-sys/acpica/dist/source/compiler/aslwalks.c vendor-sys/acpica/dist/source/compiler/aslxref.c vendor-sys/acpica/dist/source/compiler/dtcompile.c vendor-sys/acpica/dist/source/compiler/dtcompiler.h vendor-sys/acpica/dist/source/compiler/dtfield.c vendor-sys/acpica/dist/source/compiler/dtio.c vendor-sys/acpica/dist/source/compiler/dtsubtable.c vendor-sys/acpica/dist/source/compiler/dttable.c vendor-sys/acpica/dist/source/compiler/dttemplate.c vendor-sys/acpica/dist/source/compiler/dttemplate.h vendor-sys/acpica/dist/source/compiler/dtutils.c vendor-sys/acpica/dist/source/compiler/prutils.c vendor-sys/acpica/dist/source/components/debugger/dbcmds.c vendor-sys/acpica/dist/source/components/debugger/dbconvert.c vendor-sys/acpica/dist/source/components/debugger/dbdisply.c vendor-sys/acpica/dist/source/components/debugger/dbexec.c vendor-sys/acpica/dist/source/components/debugger/dbfileio.c vendor-sys/acpica/dist/source/components/debugger/dbhistry.c vendor-sys/acpica/dist/source/components/debugger/dbinput.c vendor-sys/acpica/dist/source/components/debugger/dbmethod.c vendor-sys/acpica/dist/source/components/debugger/dbnames.c vendor-sys/acpica/dist/source/components/debugger/dbstats.c vendor-sys/acpica/dist/source/components/debugger/dbutils.c vendor-sys/acpica/dist/source/components/debugger/dbxface.c vendor-sys/acpica/dist/source/components/disassembler/dmbuffer.c vendor-sys/acpica/dist/source/components/disassembler/dmdeferred.c vendor-sys/acpica/dist/source/components/disassembler/dmnames.c vendor-sys/acpica/dist/source/components/disassembler/dmobject.c vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c vendor-sys/acpica/dist/source/components/disassembler/dmresrc.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl2.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcs.c vendor-sys/acpica/dist/source/components/disassembler/dmutils.c vendor-sys/acpica/dist/source/components/disassembler/dmwalk.c vendor-sys/acpica/dist/source/components/dispatcher/dswstate.c vendor-sys/acpica/dist/source/components/events/evgpe.c vendor-sys/acpica/dist/source/components/events/evgpeinit.c vendor-sys/acpica/dist/source/components/events/evhandler.c vendor-sys/acpica/dist/source/components/events/evregion.c vendor-sys/acpica/dist/source/components/events/evrgnini.c vendor-sys/acpica/dist/source/components/events/evxface.c vendor-sys/acpica/dist/source/components/events/evxfevnt.c vendor-sys/acpica/dist/source/components/events/evxfgpe.c vendor-sys/acpica/dist/source/components/executer/exconvrt.c vendor-sys/acpica/dist/source/components/executer/exdebug.c vendor-sys/acpica/dist/source/components/executer/exdump.c vendor-sys/acpica/dist/source/components/executer/exfield.c vendor-sys/acpica/dist/source/components/executer/exfldio.c vendor-sys/acpica/dist/source/components/executer/exoparg2.c vendor-sys/acpica/dist/source/components/executer/exregion.c vendor-sys/acpica/dist/source/components/namespace/nsalloc.c vendor-sys/acpica/dist/source/components/namespace/nsinit.c vendor-sys/acpica/dist/source/components/namespace/nsobject.c vendor-sys/acpica/dist/source/components/namespace/nsprepkg.c vendor-sys/acpica/dist/source/components/namespace/nswalk.c vendor-sys/acpica/dist/source/components/namespace/nsxfeval.c vendor-sys/acpica/dist/source/components/namespace/nsxfobj.c vendor-sys/acpica/dist/source/components/parser/psloop.c vendor-sys/acpica/dist/source/components/parser/psobject.c vendor-sys/acpica/dist/source/components/parser/psopcode.c vendor-sys/acpica/dist/source/components/parser/psopinfo.c vendor-sys/acpica/dist/source/components/parser/psparse.c vendor-sys/acpica/dist/source/components/parser/psscope.c vendor-sys/acpica/dist/source/components/parser/pstree.c vendor-sys/acpica/dist/source/components/parser/psutils.c vendor-sys/acpica/dist/source/components/parser/pswalk.c vendor-sys/acpica/dist/source/components/resources/rsdump.c vendor-sys/acpica/dist/source/components/resources/rsdumpinfo.c vendor-sys/acpica/dist/source/components/resources/rsutils.c vendor-sys/acpica/dist/source/components/resources/rsxface.c vendor-sys/acpica/dist/source/components/utilities/utclib.c vendor-sys/acpica/dist/source/components/utilities/utdecode.c vendor-sys/acpica/dist/source/components/utilities/utexcep.c vendor-sys/acpica/dist/source/components/utilities/utfileio.c vendor-sys/acpica/dist/source/components/utilities/utinit.c vendor-sys/acpica/dist/source/components/utilities/utmath.c vendor-sys/acpica/dist/source/components/utilities/utmisc.c vendor-sys/acpica/dist/source/components/utilities/utmutex.c vendor-sys/acpica/dist/source/components/utilities/utownerid.c vendor-sys/acpica/dist/source/components/utilities/utprint.c vendor-sys/acpica/dist/source/components/utilities/utresrc.c vendor-sys/acpica/dist/source/components/utilities/utstate.c vendor-sys/acpica/dist/source/components/utilities/utstring.c vendor-sys/acpica/dist/source/components/utilities/utxface.c vendor-sys/acpica/dist/source/components/utilities/utxfinit.c vendor-sys/acpica/dist/source/include/acconfig.h vendor-sys/acpica/dist/source/include/acdisasm.h vendor-sys/acpica/dist/source/include/acdispat.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acnames.h vendor-sys/acpica/dist/source/include/acparser.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/acpredef.h vendor-sys/acpica/dist/source/include/actbl.h vendor-sys/acpica/dist/source/include/actbl1.h vendor-sys/acpica/dist/source/include/actbl2.h vendor-sys/acpica/dist/source/include/actbl3.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/acutils.h vendor-sys/acpica/dist/source/include/platform/achaiku.h vendor-sys/acpica/dist/source/include/platform/aclinux.h vendor-sys/acpica/dist/source/include/platform/aclinuxex.h vendor-sys/acpica/dist/source/include/platform/acmsvc.h vendor-sys/acpica/dist/source/os_specific/service_layers/osefixf.c vendor-sys/acpica/dist/source/os_specific/service_layers/oslibcfs.c vendor-sys/acpica/dist/source/os_specific/service_layers/osunixxf.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswintbl.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswinxf.c vendor-sys/acpica/dist/source/tools/acpibin/abmain.c vendor-sys/acpica/dist/source/tools/acpidump/acpidump.h vendor-sys/acpica/dist/source/tools/acpiexec/aehandlers.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpihelp/acpihelp.h vendor-sys/acpica/dist/source/tools/acpihelp/ahdecode.c vendor-sys/acpica/dist/source/tools/acpihelp/ahmain.c vendor-sys/acpica/dist/source/tools/acpisrc/acpisrc.h vendor-sys/acpica/dist/source/tools/acpisrc/asconvrt.c vendor-sys/acpica/dist/source/tools/acpisrc/asmain.c vendor-sys/acpica/dist/source/tools/acpisrc/astable.c vendor-sys/acpica/dist/source/tools/acpisrc/asutils.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Thu Sep 11 21:15:20 2014 (r271439) +++ vendor-sys/acpica/dist/changes.txt Thu Sep 11 21:38:09 2014 (r271440) @@ -1,4 +1,159 @@ ---------------------------------------- +28 August 2014. Summary of changes for version 20140828: + +1) ACPICA kernel-resident subsystem: + +Fixed a problem related to the internal use of the Timer() operator where +a 64-bit divide could cause an attempted link to a double-precision math +library. This divide is not actually necessary, so the code was +restructured to eliminate it. Lv Zheng. + +ACPI 5.1: Added support for the runtime validation of the _DSD package +(similar to the iASL support). + +ACPI 5.1/Headers: Added support for the GICC affinity subtable to the +SRAT table. Hanjun Guo . + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 98.8K Code, 27.3K Data, 126.1K Total + Debug Version: 192.1K Code, 79.8K Data, 271.9K Total + Previous Release: + Non-Debug Version: 98.7K Code, 27.3K Data, 126.0K Total1 + Debug Version: 192.0K Code, 79.7K Data, 271.7K Total + +2) iASL Compiler/Disassembler and Tools: + +AcpiExec: Fixed a problem on unix systems where the original terminal +state was not always properly restored upon exit. Seen when using the -v +option. ACPICA BZ 1104. + +iASL: Fixed a problem with the validation of the ranges/length within the +Memory24 resource descriptor. There was a boundary condition when the +range was equal to the (length -1) caused by the fact that these values +are defined in 256-byte blocks, not bytes. ACPICA BZ 1098 + +Disassembler: Fixed a problem with the GpioInt descriptor interrupt polarity +flags. The flags are actually 2 bits, not 1, and the "ActiveBoth" keyword is +now supported properly. + +ACPI 5.1: Added the GICC affinity subtable to the SRAT table. Supported +in the disassembler, data table compiler, and table template generator. + +iASL: Added a requirement for Device() objects that one of either a _HID +or _ADR must exist within the scope of a Device, as per the ACPI +specification. Remove a similar requirement that was incorrectly in place +for the _DSD object. + +iASL: Added error detection for illegal named references within control +methods that would cause runtime failures. Now trapped as errors are: 1) +References to objects within a non-parent control method. 2) Forward +references (within a method) -- for control methods, AML interpreters use +a one-pass parse of control methods. ACPICA BZ 1008. + +iASL: Added error checking for dependencies related to the _PSx power +methods. ACPICA BZ 1029. +1) For _PS0, one of these must exist within the same scope: _PS1, _PS2, +_PS3. +2) For _PS1, _PS2, and PS3: A _PS0 object must exist within the same +scope. + +iASL and table compiler: Cleanup miscellaneous memory leaks by fully +deploying the existing object and string caches and adding new caches for +the table compiler. + +iASL: Split the huge parser source file into multiple subfiles to improve +manageability. Generation now requires the M4 macro preprocessor, which +is part of the Bison distribution on both unix and windows platforms. + +AcpiSrc: Fixed and removed all extraneous warnings generated during +entire ACPICA source code scan and/or conversion. + + +---------------------------------------- + +24 July 2014. Summary of changes for version 20140724: + +The ACPI 5.1 specification has been released and is available at: +http://uefi.org/specs/access + + +0) ACPI 5.1 support in ACPICA: + +ACPI 5.1 is fully supported in ACPICA as of this release. + +New predefined names. Support includes iASL and runtime ACPICA +validation. + _CCA (Cache Coherency Attribute). + _DSD (Device-Specific Data). David Box. + +Modifications to existing ACPI tables. Support includes headers, iASL +Data Table compiler, disassembler, and the template generator. + FADT - New fields and flags. Graeme Gregory. + GTDT - One new subtable and new fields. Tomasz Nowicki. + MADT - Two new subtables. Tomasz Nowicki. + PCCT - One new subtable. + +Miscellaneous. + New notification type for System Resource Affinity change events. + + +1) ACPICA kernel-resident subsystem: + +Fixed a regression introduced in 20140627 where a fault can happen during +the deletion of Alias AML namespace objects. The problem affected both +the core ACPICA and the ACPICA tools including iASL and AcpiExec. + +Implemented a new GPE public interface, AcpiMarkGpeForWake. Provides a +simple mechanism to enable wake GPEs that have no associated handler or +control method. Rafael Wysocki. + +Updated the AcpiEnableGpe interface to disallow the enable if there is no +handler or control method associated with the particular GPE. This will +help avoid meaningless GPEs and even GPE floods. Rafael Wysocki. + +Updated GPE handling and dispatch by disabling the GPE before clearing +the status bit for edge-triggered GPEs. Lv Zheng. + +Added Timer() support to the AML Debug object. The current timer value is +now displayed with each invocation of (Store to) the debug object to +enable simple generation of execution times for AML code (method +execution for example.) ACPICA BZ 1093. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 98.7K Code, 27.3K Data, 126.0K Total + Debug Version: 192.0K Code, 79.7K Data, 271.7K Total + Previous Release: + Non-Debug Version: 98.7K Code, 27.2K Data, 125.9K Total + Debug Version: 191.7K Code, 79.6K Data, 271.3K Total + + +2) iASL Compiler/Disassembler and Tools: + +Fixed an issue with the recently added local printf implementation, +concerning width/precision specifiers that could cause incorrect output. +Lv Zheng. ACPICA BZ 1094. + +Disassembler: Added support to detect buffers that contain UUIDs and +disassemble them to an invocation of the ToUUID operator. Also emit +commented descriptions of known ACPI-related UUIDs. + +AcpiHelp: Added support to display known ACPI-related UUIDs. New option, +-u. Adds three new files. + +iASL: Update table compiler and disassembler for DMAR table changes that +were introduced in September 2013. With assistance by David Woodhouse. + +---------------------------------------- 27 June 2014. Summary of changes for version 20140627: 1) ACPICA kernel-resident subsystem: Modified: vendor-sys/acpica/dist/generate/unix/Makefile.config ============================================================================== --- vendor-sys/acpica/dist/generate/unix/Makefile.config Thu Sep 11 21:15:20 2014 (r271439) +++ vendor-sys/acpica/dist/generate/unix/Makefile.config Thu Sep 11 21:38:09 2014 (r271440) @@ -207,6 +207,8 @@ endif # -Wshadow\ # +# M4 macro processor is used to build the final parser file +# # Bison/Flex configuration # # -y: act like yacc @@ -226,6 +228,9 @@ endif YACC= bison YFLAGS += -y +MACROPROC= m4 +MFLAGS= -P -I$(ASL_COMPILER) + LEX= flex LFLAGS += -i -s Modified: vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile Thu Sep 11 21:15:20 2014 (r271439) +++ vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile Thu Sep 11 21:38:09 2014 (r271440) @@ -138,6 +138,7 @@ OBJECTS = \ $(OBJDIR)/uteval.o\ $(OBJDIR)/utexcep.o\ $(OBJDIR)/utglobal.o\ + $(OBJDIR)/uthex.o\ $(OBJDIR)/utids.o\ $(OBJDIR)/utinit.o\ $(OBJDIR)/utlock.o\ Modified: vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile Thu Sep 11 21:15:20 2014 (r271439) +++ vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile Thu Sep 11 21:38:09 2014 (r271440) @@ -45,6 +45,7 @@ OBJECTS = \ $(OBJDIR)/aemain.o\ $(OBJDIR)/aetables.o\ $(OBJDIR)/ahids.o\ + $(OBJDIR)/ahuuids.o\ $(OBJDIR)/cmfsize.o\ $(OBJDIR)/dbcmds.o\ $(OBJDIR)/dbconvert.o\ @@ -204,6 +205,7 @@ OBJECTS = \ $(OBJDIR)/utexcep.o\ $(OBJDIR)/utfileio.o\ $(OBJDIR)/utglobal.o\ + $(OBJDIR)/uthex.o\ $(OBJDIR)/utids.o\ $(OBJDIR)/utinit.o\ $(OBJDIR)/utlock.o\ @@ -219,6 +221,7 @@ OBJECTS = \ $(OBJDIR)/utstate.o\ $(OBJDIR)/utstring.o\ $(OBJDIR)/uttrack.o\ + $(OBJDIR)/utuuid.o\ $(OBJDIR)/utxface.o\ $(OBJDIR)/utxferror.o\ $(OBJDIR)/utxfinit.o\ Modified: vendor-sys/acpica/dist/generate/unix/acpihelp/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpihelp/Makefile Thu Sep 11 21:15:20 2014 (r271439) +++ vendor-sys/acpica/dist/generate/unix/acpihelp/Makefile Thu Sep 11 21:38:09 2014 (r271440) @@ -35,15 +35,18 @@ OBJECTS = \ $(OBJDIR)/ahids.o\ $(OBJDIR)/ahpredef.o\ $(OBJDIR)/ahmain.o\ + $(OBJDIR)/ahuuids.o\ $(OBJDIR)/getopt.o\ $(OBJDIR)/oslibcfs.o\ $(OBJDIR)/osunixxf.o\ $(OBJDIR)/utdebug.o\ $(OBJDIR)/utexcep.o\ $(OBJDIR)/utglobal.o\ + $(OBJDIR)/uthex.o\ $(OBJDIR)/utmath.o\ $(OBJDIR)/utpredef.o\ - $(OBJDIR)/utprint.o + $(OBJDIR)/utprint.o\ + $(OBJDIR)/utuuid.o # # Flags specific to acpihelp Modified: vendor-sys/acpica/dist/generate/unix/acpinames/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpinames/Makefile Thu Sep 11 21:15:20 2014 (r271439) +++ vendor-sys/acpica/dist/generate/unix/acpinames/Makefile Thu Sep 11 21:38:09 2014 (r271440) @@ -103,6 +103,7 @@ OBJECTS = \ $(OBJDIR)/utexcep.o\ $(OBJDIR)/utfileio.o\ $(OBJDIR)/utglobal.o\ + $(OBJDIR)/uthex.o\ $(OBJDIR)/utids.o\ $(OBJDIR)/utinit.o\ $(OBJDIR)/utlock.o\ Modified: vendor-sys/acpica/dist/generate/unix/iasl/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/iasl/Makefile Thu Sep 11 21:15:20 2014 (r271439) +++ vendor-sys/acpica/dist/generate/unix/iasl/Makefile Thu Sep 11 21:38:09 2014 (r271440) @@ -48,7 +48,9 @@ OBJECTS = \ $(OBJDIR)/adwalk.o\ $(OBJDIR)/ahids.o\ $(OBJDIR)/ahpredef.o\ + $(OBJDIR)/ahuuids.o\ $(OBJDIR)/aslanalyze.o\ + $(OBJDIR)/aslascii.o\ $(OBJDIR)/aslbtypes.o\ $(OBJDIR)/aslcodegen.o\ $(OBJDIR)/aslcompile.o\ @@ -193,6 +195,7 @@ OBJECTS = \ $(OBJDIR)/utexcep.o\ $(OBJDIR)/utfileio.o\ $(OBJDIR)/utglobal.o\ + $(OBJDIR)/uthex.o\ $(OBJDIR)/utinit.o\ $(OBJDIR)/utlock.o\ $(OBJDIR)/utmath.o\ @@ -205,10 +208,12 @@ OBJECTS = \ $(OBJDIR)/utresrc.o\ $(OBJDIR)/utstate.o\ $(OBJDIR)/utstring.o\ + $(OBJDIR)/utuuid.o\ $(OBJDIR)/utxface.o\ $(OBJDIR)/utxferror.o INTERMEDIATES = \ + $(OBJDIR)/aslcompiler.y\ $(OBJDIR)/aslcompilerlex.c\ $(OBJDIR)/aslcompilerparse.c\ $(OBJDIR)/dtparserlex.c\ @@ -221,6 +226,18 @@ MISC = \ $(OBJDIR)/dtparser.y.h\ $(OBJDIR)/prparser.y.h +ASL_PARSER = \ + $(ASL_COMPILER)/aslparser.y\ + $(ASL_COMPILER)/asltokens.y\ + $(ASL_COMPILER)/asltypes.y\ + $(ASL_COMPILER)/aslrules.y + +ASL_LEXER = \ + $(ASL_COMPILER)/aslcompiler.l\ + $(ASL_COMPILER)/aslsupport.l\ + $(OBJDIR)/aslcompiler.y.h + + # # Flags specific to iASL compiler # @@ -234,17 +251,22 @@ CFLAGS += \ # include ../Makefile.rules +# +# Macro processing for iASL .y files +# +$(OBJDIR)/aslcompiler.y : $(ASL_PARSER) + $(MACROPROC) $(MFLAGS) $(ASL_COMPILER)/aslparser.y > $(OBJDIR)/aslcompiler.y # # Parser and Lexer - intermediate C files # -$(OBJDIR)/aslcompilerlex.c : $(ASL_COMPILER)/aslcompiler.l $(ASL_COMPILER)/aslsupport.l $(OBJDIR)/aslcompiler.y.h +$(OBJDIR)/aslcompilerlex.c : $(ASL_LEXER) $(LEX) $(LFLAGS) -PAslCompiler -o$@ $(ASL_COMPILER)/aslcompiler.l -$(OBJDIR)/aslcompiler.y.h : $(ASL_COMPILER)/aslcompiler.y +$(OBJDIR)/aslcompiler.y.h : $(OBJDIR)/aslcompiler.y $(YACC) $(YFLAGS) -pAslCompiler -o/dev/null --defines=$@ $< -$(OBJDIR)/aslcompilerparse.c : $(ASL_COMPILER)/aslcompiler.y +$(OBJDIR)/aslcompilerparse.c : $(OBJDIR)/aslcompiler.y $(YACC) $(YFLAGS) -pAslCompiler -o$@ --defines=/dev/null $< $(OBJDIR)/dtparserlex.c : $(ASL_COMPILER)/dtparser.l $(OBJDIR)/dtparser.y.h Modified: vendor-sys/acpica/dist/source/common/adfile.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adfile.c Thu Sep 11 21:15:20 2014 (r271439) +++ vendor-sys/acpica/dist/source/common/adfile.c Thu Sep 11 21:38:09 2014 (r271440) @@ -41,7 +41,7 @@ * POSSIBILITY OF SUCH DAMAGES. */ - +#include "aslcompiler.h" #include "acpi.h" #include "accommon.h" #include "acapps.h" @@ -206,7 +206,7 @@ FlGenerateFilename ( * Copy the original filename to a new buffer. Leave room for the worst * case where we append the suffix, an added dot and the null terminator. */ - NewFilename = ACPI_ALLOCATE_ZEROED ((ACPI_SIZE) + NewFilename = UtStringCacheCalloc ((ACPI_SIZE) strlen (InputFilename) + strlen (Suffix) + 2); if (!NewFilename) { @@ -255,7 +255,7 @@ FlStrdup ( char *NewString; - NewString = ACPI_ALLOCATE ((ACPI_SIZE) strlen (String) + 1); + NewString = UtStringCacheCalloc ((ACPI_SIZE) strlen (String) + 1); if (!NewString) { return (NULL); @@ -337,7 +337,6 @@ FlSplitInputPathname ( if (!Filename) { - ACPI_FREE (DirectoryPath); return (AE_NO_MEMORY); } @@ -349,6 +348,5 @@ FlSplitInputPathname ( return (AE_OK); } - ACPI_FREE (Filename); return (AE_OK); } Modified: vendor-sys/acpica/dist/source/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adisasm.c Thu Sep 11 21:15:20 2014 (r271439) +++ vendor-sys/acpica/dist/source/common/adisasm.c Thu Sep 11 21:38:09 2014 (r271440) @@ -41,12 +41,9 @@ * POSSIBILITY OF SUCH DAMAGES. */ - -#include "acpi.h" -#include "accommon.h" +#include "aslcompiler.h" #include "acparser.h" #include "amlcode.h" -#include "acdebug.h" #include "acdisasm.h" #include "acdispat.h" #include "acnamesp.h" @@ -60,23 +57,6 @@ #define _COMPONENT ACPI_TOOLS ACPI_MODULE_NAME ("adisasm") -/* - * Older versions of Bison won't emit this external in the generated header. - * Newer versions do emit the external, so we don't need to do it. - */ -#ifndef ASLCOMPILER_ASLCOMPILERPARSE_H -extern int AslCompilerdebug; -#endif - -ACPI_STATUS -NsDisplayNamespace ( - void); - -void -NsSetupNamespaceListing ( - void *Handle); - - /* Local prototypes */ static void @@ -654,7 +634,7 @@ AdCreateTableHeader ( } else { - NewFilename = ACPI_ALLOCATE_ZEROED (9); + NewFilename = UtStringCacheCalloc (9); if (NewFilename) { strncat (NewFilename, Table->Signature, 4); @@ -674,8 +654,6 @@ AdCreateTableHeader ( "DefinitionBlock (\"%s\", \"%4.4s\", %hu, \"%.6s\", \"%.8s\", 0x%8.8X)\n", NewFilename, Table->Signature, Table->Revision, Table->OemId, Table->OemTableId, Table->OemRevision); - - ACPI_FREE (NewFilename); } Modified: vendor-sys/acpica/dist/source/common/adwalk.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adwalk.c Thu Sep 11 21:15:20 2014 (r271439) +++ vendor-sys/acpica/dist/source/common/adwalk.c Thu Sep 11 21:38:09 2014 (r271440) @@ -41,7 +41,6 @@ * POSSIBILITY OF SUCH DAMAGES. */ - #include "acpi.h" #include "accommon.h" #include "acparser.h" Modified: vendor-sys/acpica/dist/source/common/ahids.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahids.c Thu Sep 11 21:15:20 2014 (r271439) +++ vendor-sys/acpica/dist/source/common/ahids.c Thu Sep 11 21:38:09 2014 (r271440) @@ -174,7 +174,11 @@ const AH_DEVICE_ID AslDeviceIds[] = {"PNP0C60", "Display Sensor Device"}, {"PNP0C70", "Dock Sensor Device"}, {"PNP0C80", "Memory Device"}, - {"PNP0D40", "Standard Compliant SD Host Controller"}, + {"PNP0D10", "XHCI USB Controller with debug"}, + {"PNP0D15", "XHCI USB Controller without debug"}, + {"PNP0D20", "EHCI USB Controller without debug"}, + {"PNP0D25", "EHCI USB Controller with debug"}, + {"PNP0D40", "SDA Standard Compliant SD Host Controller"}, {"PNP0D80", "Windows-compatible System Power Management Controller"}, {"PNP0F03", "Microsoft PS/2-style Mouse"}, {"SMO91D0", "Sensor Hub"}, Modified: vendor-sys/acpica/dist/source/common/ahpredef.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahpredef.c Thu Sep 11 21:15:20 2014 (r271439) +++ vendor-sys/acpica/dist/source/common/ahpredef.c Thu Sep 11 21:38:09 2014 (r271440) @@ -97,6 +97,7 @@ const AH_PREDEFINED_NAME AslPredefine AH_PREDEF ("_BTM", "Battery Time", "Returns the battery runtime"), AH_PREDEF ("_BTP", "Battery Trip Point", "Sets a Control Method Battery trip point"), AH_PREDEF ("_CBA", "Configuration Base Address", "Sets the base address for a PCI Express host bridge"), + AH_PREDEF ("_CCA", "Cache Coherency Attribute", "Returns a device's support level for cache coherency"), AH_PREDEF ("_CDM", "Clock Domain", "Returns a logical processor's clock domain identifier"), AH_PREDEF ("_CID", "Compatible ID", "Returns a device's Plug and Play Compatible ID list"), AH_PREDEF ("_CLS", "Class Code", "Returns PCI class code and subclass"), @@ -121,6 +122,7 @@ const AH_PREDEFINED_NAME AslPredefine AH_PREDEF ("_DOS", "Disable Output Switching", "Sets the display output switching mode"), AH_PREDEF ("_DPL", "Device Selection Polarity", "Polarity of Device Selection signal, Resource Descriptor field"), AH_PREDEF ("_DRS", "Drive Strength", "Drive Strength setting for GPIO connection, Resource Descriptor field"), + AH_PREDEF ("_DSD", "Device-Specific Data", "Returns a list of device property information"), AH_PREDEF ("_DSM", "Device-Specific Method", "Executes device-specific functions"), AH_PREDEF ("_DSS", "Device Set State", "Sets the display device state"), AH_PREDEF ("_DSW", "Device Sleep Wake", "Sets the sleep and wake transition states for a device"), Added: vendor-sys/acpica/dist/source/common/ahuuids.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/acpica/dist/source/common/ahuuids.c Thu Sep 11 21:38:09 2014 (r271440) @@ -0,0 +1,132 @@ +/****************************************************************************** + * + * Module Name: ahuuids - Table of known ACPI-related UUIDs + * + *****************************************************************************/ + +/* + * Copyright (C) 2000 - 2014, Intel Corp. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + */ + +#include "acpi.h" +#include "accommon.h" + +#define _COMPONENT ACPI_UTILITIES + ACPI_MODULE_NAME ("ahuuids") + +/* + * Table of "known" (ACPI-related) UUIDs + */ +const AH_UUID AcpiUuids[] = +{ + {"PCI Host Bridge Device", + "33db4d5b-1ff7-401c-9657-7441c03dd766"}, + + {"Platform-wide Capabilities", + "0811b06e-4a27-44f9-8d60-3cbbc22e7b48"}, + + {"Dynamic Enumeration", + "d8c1a3a6-be9b-4c9b-91bf-c3cb81fc5daf"}, + + {"GPIO Controller", + "4f248f40-d5e2-499f-834c-27758ea1cd3f"}, + + {"Battery Thermal Limit", + "4c2067e3-887d-475c-9720-4af1d3ed602e"}, + + {"Thermal Extensions", + "14d399cd-7a27-4b18-8fb4-7cb7b9f4e500"}, + + {"USB Controller", + "ce2ee385-00e6-48cb-9f05-2edb927c4899"}, + + {"HID I2C Device", + "3cdff6f7-4267-4555-ad05-b30a3d8938de"}, + + {"Power Button Device", + "dfbcf3c5-e7a5-44e6-9c1f-29c76f6e059c"}, + + {"Device Labeling Interface", + "e5c937d0-3553-4d7a-9117-ea4d19c3434d"}, + + {"SATA Controller", + "e4db149b-fcfe-425b-a6d8-92357d78fc7f"}, + + {"Physical Presence Interface", + "3dddfaa6-361b-4eb4-a424-8d10089d1653"}, + + {"Device Properties for _DSD", + "daffd814-6eba-4d8c-8a91-bc9bbf4aa301"}, + + {NULL, NULL} +}; + + +/******************************************************************************* + * + * FUNCTION: AcpiAhMatchUuid + * + * PARAMETERS: Data - Data buffer containing a UUID + * + * RETURN: ASCII description string for the UUID if it is found. + * + * DESCRIPTION: Returns a description string for "known" UUIDs, which are + * are UUIDs that are related to ACPI in some way. + * + ******************************************************************************/ + +const char * +AcpiAhMatchUuid ( + UINT8 *Data) +{ + const AH_UUID *Info; + UINT8 UuidBuffer[UUID_BUFFER_LENGTH]; + + + /* Walk the table of known ACPI-related UUIDs */ + + for (Info = AcpiUuids; Info->Description; Info++) + { + AcpiUtConvertStringToUuid (Info->String, UuidBuffer); + + if (!ACPI_MEMCMP (Data, UuidBuffer, UUID_BUFFER_LENGTH)) + { + return (Info->Description); + } + } + + return (NULL); +} Modified: vendor-sys/acpica/dist/source/common/dmextern.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmextern.c Thu Sep 11 21:15:20 2014 (r271439) +++ vendor-sys/acpica/dist/source/common/dmextern.c Thu Sep 11 21:38:09 2014 (r271440) @@ -406,18 +406,37 @@ AcpiDmGetExternalsFromFile ( while (fgets (StringBuffer, ASL_MSG_BUFFER_SIZE, ExternalRefFile)) { Token = strtok (StringBuffer, METHOD_SEPARATORS); /* "External" */ - if (!Token) continue; - if (strcmp (Token, "External")) continue; + if (!Token) + { + continue; + } + if (strcmp (Token, "External")) + { + continue; + } MethodName = strtok (NULL, METHOD_SEPARATORS); /* Method namepath */ - if (!MethodName) continue; + if (!MethodName) + { + continue; + } Token = strtok (NULL, METHOD_SEPARATORS); /* "MethodObj" */ - if (!Token) continue; - if (strcmp (Token, "MethodObj")) continue; + if (!Token) + { + continue; + } + + if (strcmp (Token, "MethodObj")) + { + continue; + } Token = strtok (NULL, METHOD_SEPARATORS); /* Arg count */ - if (!Token) continue; + if (!Token) + { + continue; + } /* Convert arg count string to an integer */ Modified: vendor-sys/acpica/dist/source/common/dmrestag.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmrestag.c Thu Sep 11 21:15:20 2014 (r271439) +++ vendor-sys/acpica/dist/source/common/dmrestag.c Thu Sep 11 21:38:09 2014 (r271440) @@ -41,7 +41,6 @@ * POSSIBILITY OF SUCH DAMAGES. */ - #include "acpi.h" #include "accommon.h" #include "acparser.h" Modified: vendor-sys/acpica/dist/source/common/dmtable.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtable.c Thu Sep 11 21:15:20 2014 (r271439) +++ vendor-sys/acpica/dist/source/common/dmtable.c Thu Sep 11 21:38:09 2014 (r271440) @@ -87,9 +87,21 @@ static const char *AcpiDmDmarS "Reserved Memory Region", "Root Port ATS Capability", "Remapping Hardware Static Affinity", + "ACPI Namespace Device Declaration", "Unknown SubTable Type" /* Reserved */ }; +static const char *AcpiDmDmarScope[] = +{ + "Reserved value", + "PCI Endpoint Device", + "PCI Bridge Device", + "IOAPIC Device", + "Message-capable HPET Device", + "Namespace Device", + "Unknown Scope Type" /* Reserved */ +}; + static const char *AcpiDmEinjActions[] = { "Begin Operation", @@ -160,6 +172,13 @@ static const char *AcpiDmErstI "Unknown Instruction" }; +static const char *AcpiDmGtdtSubnames[] = +{ + "Generic Timer Block", + "Generic Watchdog Timer", + "Unknown SubTable Type" /* Reserved */ +}; + static const char *AcpiDmHestSubnames[] = { "IA-32 Machine Check Exception", @@ -189,25 +208,28 @@ static const char *AcpiDmHestN static const char *AcpiDmMadtSubnames[] = { - "Processor Local APIC", /* ACPI_MADT_TYPE_LOCAL_APIC */ - "I/O APIC", /* ACPI_MADT_TYPE_IO_APIC */ - "Interrupt Source Override", /* ACPI_MADT_TYPE_INTERRUPT_OVERRIDE */ - "NMI Source", /* ACPI_MADT_TYPE_NMI_SOURCE */ - "Local APIC NMI", /* ACPI_MADT_TYPE_LOCAL_APIC_NMI */ - "Local APIC Address Override", /* ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE */ - "I/O SAPIC", /* ACPI_MADT_TYPE_IO_SAPIC */ - "Local SAPIC", /* ACPI_MADT_TYPE_LOCAL_SAPIC */ - "Platform Interrupt Sources", /* ACPI_MADT_TYPE_INTERRUPT_SOURCE */ - "Processor Local x2APIC", /* ACPI_MADT_TYPE_LOCAL_X2APIC */ - "Local x2APIC NMI", /* ACPI_MADT_TYPE_LOCAL_X2APIC_NMI */ - "Generic Interrupt Controller", /* ACPI_MADT_GENERIC_INTERRUPT */ - "Generic Interrupt Distributor",/* ACPI_MADT_GENERIC_DISTRIBUTOR */ - "Unknown SubTable Type" /* Reserved */ + "Processor Local APIC", /* ACPI_MADT_TYPE_LOCAL_APIC */ + "I/O APIC", /* ACPI_MADT_TYPE_IO_APIC */ + "Interrupt Source Override", /* ACPI_MADT_TYPE_INTERRUPT_OVERRIDE */ + "NMI Source", /* ACPI_MADT_TYPE_NMI_SOURCE */ + "Local APIC NMI", /* ACPI_MADT_TYPE_LOCAL_APIC_NMI */ + "Local APIC Address Override", /* ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE */ + "I/O SAPIC", /* ACPI_MADT_TYPE_IO_SAPIC */ + "Local SAPIC", /* ACPI_MADT_TYPE_LOCAL_SAPIC */ + "Platform Interrupt Sources", /* ACPI_MADT_TYPE_INTERRUPT_SOURCE */ + "Processor Local x2APIC", /* ACPI_MADT_TYPE_LOCAL_X2APIC */ + "Local x2APIC NMI", /* ACPI_MADT_TYPE_LOCAL_X2APIC_NMI */ + "Generic Interrupt Controller", /* ACPI_MADT_GENERIC_INTERRUPT */ + "Generic Interrupt Distributor", /* ACPI_MADT_GENERIC_DISTRIBUTOR */ + "Generic MSI Frame", /* ACPI_MADT_GENERIC_MSI_FRAME */ + "Generic Interrupt Redistributor", /* ACPI_MADT_GENERIC_REDISTRIBUTOR */ + "Unknown SubTable Type" /* Reserved */ }; static const char *AcpiDmPcctSubnames[] = { "Generic Communications Subspace", /* ACPI_PCCT_TYPE_GENERIC_SUBSPACE */ + "HW-Reduced Communications Subspace", "Unknown SubTable Type" /* Reserved */ }; @@ -231,6 +253,7 @@ static const char *AcpiDmSratS "Processor Local APIC/SAPIC Affinity", "Memory Affinity", "Processor Local x2APIC Affinity", + "GICC Affinity", "Unknown SubTable Type" /* Reserved */ }; @@ -306,7 +329,7 @@ ACPI_DMTABLE_DATA AcpiDmTableData[] = {ACPI_SIG_ERST, NULL, AcpiDmDumpErst, DtCompileErst, TemplateErst, "Error Record Serialization Table"}, {ACPI_SIG_FADT, NULL, AcpiDmDumpFadt, DtCompileFadt, TemplateFadt, "Fixed ACPI Description Table (FADT)"}, {ACPI_SIG_FPDT, NULL, AcpiDmDumpFpdt, DtCompileFpdt, TemplateFpdt, "Firmware Performance Data Table"}, - {ACPI_SIG_GTDT, AcpiDmTableInfoGtdt, NULL, NULL, TemplateGtdt, "Generic Timer Description Table"}, + {ACPI_SIG_GTDT, NULL, AcpiDmDumpGtdt, DtCompileGtdt, TemplateGtdt, "Generic Timer Description Table"}, {ACPI_SIG_HEST, NULL, AcpiDmDumpHest, DtCompileHest, TemplateHest, "Hardware Error Source Table"}, {ACPI_SIG_HPET, AcpiDmTableInfoHpet, NULL, NULL, TemplateHpet, "High Precision Event Timer table"}, {ACPI_SIG_IVRS, NULL, AcpiDmDumpIvrs, DtCompileIvrs, TemplateIvrs, "I/O Virtualization Reporting Structure"}, @@ -705,6 +728,7 @@ AcpiDmDumpTable ( case ACPI_DMT_SPACEID: case ACPI_DMT_ACCWIDTH: case ACPI_DMT_IVRS: + case ACPI_DMT_GTDT: case ACPI_DMT_MADT: case ACPI_DMT_PCCT: case ACPI_DMT_PMTT: @@ -716,6 +740,7 @@ AcpiDmDumpTable ( case ACPI_DMT_EINJINST: case ACPI_DMT_ERSTACT: case ACPI_DMT_ERSTINST: + case ACPI_DMT_DMAR_SCOPE: ByteLength = 1; break; @@ -1047,6 +1072,19 @@ AcpiDmDumpTable ( AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target), AcpiDmDmarSubnames[Temp16]); break; + case ACPI_DMT_DMAR_SCOPE: + + /* DMAR device scope types */ + + Temp8 = *Target; + if (Temp8 > ACPI_DMAR_SCOPE_TYPE_RESERVED) + { + Temp8 = ACPI_DMAR_SCOPE_TYPE_RESERVED; + } + + AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmDmarScope[Temp8]); + break; + case ACPI_DMT_EINJACT: /* EINJ Action types */ @@ -1099,6 +1137,19 @@ AcpiDmDumpTable ( AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmErstInstructions[Temp8]); break; + case ACPI_DMT_GTDT: + + /* GTDT subtable types */ + + Temp8 = *Target; + if (Temp8 > ACPI_GTDT_TYPE_RESERVED) + { + Temp8 = ACPI_GTDT_TYPE_RESERVED; + } + + AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmGtdtSubnames[Temp8]); + break; + case ACPI_DMT_HEST: /* HEST subtable types */ Modified: vendor-sys/acpica/dist/source/common/dmtbdump.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtbdump.c Thu Sep 11 21:15:20 2014 (r271439) +++ vendor-sys/acpica/dist/source/common/dmtbdump.c Thu Sep 11 21:38:09 2014 (r271440) @@ -891,18 +891,24 @@ AcpiDmDumpDmar ( ScopeOffset = sizeof (ACPI_DMAR_RESERVED_MEMORY); break; - case ACPI_DMAR_TYPE_ATSR: + case ACPI_DMAR_TYPE_ROOT_ATS: InfoTable = AcpiDmTableInfoDmar2; ScopeOffset = sizeof (ACPI_DMAR_ATSR); break; - case ACPI_DMAR_HARDWARE_AFFINITY: + case ACPI_DMAR_TYPE_HARDWARE_AFFINITY: InfoTable = AcpiDmTableInfoDmar3; ScopeOffset = sizeof (ACPI_DMAR_RHSA); break; + case ACPI_DMAR_TYPE_NAMESPACE: + + InfoTable = AcpiDmTableInfoDmar4; + ScopeOffset = sizeof (ACPI_DMAR_ANDD); + break; + default: AcpiOsPrintf ("\n**** Unknown DMAR subtable type 0x%X\n\n", SubTable->Type); @@ -916,7 +922,16 @@ AcpiDmDumpDmar ( return; } - /* Dump the device scope entries (if any) */ + /* + * Dump the optional device scope entries + */ + if ((SubTable->Type == ACPI_DMAR_TYPE_HARDWARE_AFFINITY) || + (SubTable->Type == ACPI_DMAR_TYPE_NAMESPACE)) + { + /* These types do not support device scopes */ + + goto NextSubtable; + } ScopeTable = ACPI_ADD_PTR (ACPI_DMAR_DEVICE_SCOPE, SubTable, ScopeOffset); while (ScopeOffset < SubTable->Length) @@ -956,6 +971,7 @@ AcpiDmDumpDmar ( ScopeTable, ScopeTable->Length); } +NextSubtable: /* Point to next subtable */ Offset += SubTable->Length; @@ -1155,6 +1171,123 @@ NextSubTable: /******************************************************************************* * + * FUNCTION: AcpiDmDumpGtdt + * + * PARAMETERS: Table - A GTDT table + * + * RETURN: None + * + * DESCRIPTION: Format the contents of a GTDT. This table type consists + * of an open-ended number of subtables. + * + ******************************************************************************/ + +void +AcpiDmDumpGtdt ( + ACPI_TABLE_HEADER *Table) +{ + ACPI_STATUS Status; + ACPI_GTDT_HEADER *SubTable; + UINT32 Length = Table->Length; + UINT32 Offset = sizeof (ACPI_TABLE_GTDT); + ACPI_DMTABLE_INFO *InfoTable; + UINT32 SubTableLength; + UINT32 GtCount; + ACPI_GTDT_TIMER_ENTRY *GtxTable; + + + /* Main table */ + + Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoGtdt); + if (ACPI_FAILURE (Status)) + { + return; + } + + /* Subtables */ + + SubTable = ACPI_ADD_PTR (ACPI_GTDT_HEADER, Table, Offset); + while (Offset < Table->Length) + { + /* Common subtable header */ + + AcpiOsPrintf ("\n"); + Status = AcpiDmDumpTable (Length, Offset, SubTable, + SubTable->Length, AcpiDmTableInfoGtdtHdr); + if (ACPI_FAILURE (Status)) + { + return; + } + + GtCount = 0; + switch (SubTable->Type) + { + case ACPI_GTDT_TYPE_TIMER_BLOCK: + + SubTableLength = sizeof (ACPI_GTDT_TIMER_BLOCK); + GtCount = (ACPI_CAST_PTR (ACPI_GTDT_TIMER_BLOCK, + SubTable))->TimerCount; + + InfoTable = AcpiDmTableInfoGtdt0; + break; + + case ACPI_GTDT_TYPE_WATCHDOG: + + SubTableLength = sizeof (ACPI_GTDT_WATCHDOG); + + InfoTable = AcpiDmTableInfoGtdt1; + break; + + default: + + /* Cannot continue on unknown type - no length */ + + AcpiOsPrintf ("\n**** Unknown GTDT subtable type 0x%X\n", SubTable->Type); + return; + } + + Status = AcpiDmDumpTable (Length, Offset, SubTable, + SubTable->Length, InfoTable); + if (ACPI_FAILURE (Status)) + { + return; + } + + /* Point to end of current subtable (each subtable above is of fixed length) */ + + Offset += SubTableLength; + + /* If there are any Gt Timer Blocks from above, dump them now */ + + if (GtCount) + { + GtxTable = ACPI_ADD_PTR (ACPI_GTDT_TIMER_ENTRY, SubTable, SubTableLength); + SubTableLength += GtCount * sizeof (ACPI_GTDT_TIMER_ENTRY); + + while (GtCount) + { + AcpiOsPrintf ("\n"); + Status = AcpiDmDumpTable (Length, Offset, GtxTable, + sizeof (ACPI_GTDT_TIMER_ENTRY), AcpiDmTableInfoGtdt0a); + if (ACPI_FAILURE (Status)) + { + return; + } + Offset += sizeof (ACPI_GTDT_TIMER_ENTRY); + GtxTable++; + GtCount--; + } + } + + /* Point to next subtable */ + + SubTable = ACPI_ADD_PTR (ACPI_GTDT_HEADER, SubTable, SubTableLength); + } +} + + +/******************************************************************************* + * * FUNCTION: AcpiDmDumpHest * * PARAMETERS: Table - A HEST table @@ -1662,6 +1795,16 @@ AcpiDmDumpMadt ( InfoTable = AcpiDmTableInfoMadt12; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 21:40:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20750CA4; Thu, 11 Sep 2014 21:40:33 +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 E777D992; Thu, 11 Sep 2014 21:40: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 s8BLeWRb072467; Thu, 11 Sep 2014 21:40:32 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BLeWme072466; Thu, 11 Sep 2014 21:40:32 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201409112140.s8BLeWme072466@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 11 Sep 2014 21:40:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r271441 - vendor-sys/acpica/20140828 X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 21:40:33 -0000 Author: jkim Date: Thu Sep 11 21:40:32 2014 New Revision: 271441 URL: http://svnweb.freebsd.org/changeset/base/271441 Log: Tag ACPICA 20140828. Added: vendor-sys/acpica/20140828/ - copied from r271440, vendor-sys/acpica/dist/ From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 22:39:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5A09CB6; Thu, 11 Sep 2014 22:39:27 +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 9DD08F09; Thu, 11 Sep 2014 22:39:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8BMdREL000142; Thu, 11 Sep 2014 22:39:27 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BMdRhD000141; Thu, 11 Sep 2014 22:39:27 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201409112239.s8BMdRhD000141@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 11 Sep 2014 22:39:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271442 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 22:39:27 -0000 Author: sbruno Date: Thu Sep 11 22:39:27 2014 New Revision: 271442 URL: http://svnweb.freebsd.org/changeset/base/271442 Log: Add device name used in geom_map verbose output. This helps when using geom_map with multiple flash/spi devices. Phabric: https://reviews.freebsd.org/D766 Reviewed by: adrian MFC after: 2 weeks Modified: head/sys/geom/geom_map.c Modified: head/sys/geom/geom_map.c ============================================================================== --- head/sys/geom/geom_map.c Thu Sep 11 21:40:32 2014 (r271441) +++ head/sys/geom/geom_map.c Thu Sep 11 22:39:27 2014 (r271442) @@ -153,8 +153,8 @@ find_marker(struct g_consumer *cp, const return (1); if (bootverbose) { - printf("MAP: search key \"%s\" from 0x%jx, step 0x%jx\n", - search_key, (intmax_t)search_start, (intmax_t)search_step); + printf("MAP: search %s for key \"%s\" from 0x%jx, step 0x%jx\n", + cp->geom->name, search_key, (intmax_t)search_start, (intmax_t)search_step); } /* error if search_key is empty */ @@ -321,9 +321,9 @@ g_map_parse_part(struct g_class *mp, str } if (bootverbose) { - printf("MAP: %jxx%jx, data=%jxx%jx " + printf("MAP: %s: %jxx%jx, data=%jxx%jx " "\"/dev/map/%s\"\n", - (intmax_t)start, (intmax_t)size, (intmax_t)offset, + cp->geom->name, (intmax_t)start, (intmax_t)size, (intmax_t)offset, (intmax_t)dsize, name); } From owner-svn-src-all@FreeBSD.ORG Thu Sep 11 22:40:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12CBDDFE; Thu, 11 Sep 2014 22:40:12 +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 F37B3F14; Thu, 11 Sep 2014 22:40:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8BMeBTE002187; Thu, 11 Sep 2014 22:40:11 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8BMeB48002185; Thu, 11 Sep 2014 22:40:11 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409112240.s8BMeB48002185@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 11 Sep 2014 22:40:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271443 - in head/sys/cam: ctl scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 22:40:12 -0000 Author: mav Date: Thu Sep 11 22:40:11 2014 New Revision: 271443 URL: http://svnweb.freebsd.org/changeset/base/271443 Log: Add support for Extended INQUIRY Data (0x86) VPD page. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/scsi/scsi_all.h Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Thu Sep 11 22:39:27 2014 (r271442) +++ head/sys/cam/ctl/ctl.c Thu Sep 11 22:40:11 2014 (r271443) @@ -320,11 +320,11 @@ SYSCTL_INT(_kern_cam_ctl, OID_AUTO, verb /* * Supported pages (0x00), Serial number (0x80), Device ID (0x83), - * Mode Page Policy (0x87), + * Extended INQUIRY Data (0x86), Mode Page Policy (0x87), * SCSI Ports (0x88), Third-party Copy (0x8F), Block limits (0xB0), * Block Device Characteristics (0xB1) and Logical Block Provisioning (0xB2) */ -#define SCSI_EVPD_NUM_SUPPORTED_PAGES 9 +#define SCSI_EVPD_NUM_SUPPORTED_PAGES 10 static void ctl_isc_event_handler(ctl_ha_channel chanel, ctl_ha_event event, int param); @@ -380,6 +380,7 @@ static void ctl_hndl_per_res_out_on_othe static int ctl_inquiry_evpd_supported(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_serial(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_devid(struct ctl_scsiio *ctsio, int alloc_len); +static int ctl_inquiry_evpd_eid(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_mpp(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_scsi_ports(struct ctl_scsiio *ctsio, int alloc_len); @@ -9838,18 +9839,20 @@ ctl_inquiry_evpd_supported(struct ctl_sc pages->page_list[1] = SVPD_UNIT_SERIAL_NUMBER; /* Device Identification */ pages->page_list[2] = SVPD_DEVICE_ID; + /* Extended INQUIRY Data */ + pages->page_list[3] = SVPD_EXTENDED_INQUIRY_DATA; /* Mode Page Policy */ - pages->page_list[3] = SVPD_MODE_PAGE_POLICY; + pages->page_list[4] = SVPD_MODE_PAGE_POLICY; /* SCSI Ports */ - pages->page_list[4] = SVPD_SCSI_PORTS; + pages->page_list[5] = SVPD_SCSI_PORTS; /* Third-party Copy */ - pages->page_list[5] = SVPD_SCSI_TPC; + pages->page_list[6] = SVPD_SCSI_TPC; /* Block limits */ - pages->page_list[6] = SVPD_BLOCK_LIMITS; + pages->page_list[7] = SVPD_BLOCK_LIMITS; /* Block Device Characteristics */ - pages->page_list[7] = SVPD_BDC; + pages->page_list[8] = SVPD_BDC; /* Logical Block Provisioning */ - pages->page_list[8] = SVPD_LBP; + pages->page_list[9] = SVPD_LBP; ctsio->scsi_status = SCSI_STATUS_OK; @@ -9918,6 +9921,57 @@ ctl_inquiry_evpd_serial(struct ctl_scsii static int +ctl_inquiry_evpd_eid(struct ctl_scsiio *ctsio, int alloc_len) +{ + struct scsi_vpd_extended_inquiry_data *eid_ptr; + struct ctl_lun *lun; + int data_len; + + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + + data_len = sizeof(struct scsi_vpd_mode_page_policy) + + sizeof(struct scsi_vpd_mode_page_policy_descr); + + ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); + eid_ptr = (struct scsi_vpd_extended_inquiry_data *)ctsio->kern_data_ptr; + ctsio->kern_sg_entries = 0; + + if (data_len < alloc_len) { + ctsio->residual = alloc_len - data_len; + ctsio->kern_data_len = data_len; + ctsio->kern_total_len = data_len; + } else { + ctsio->residual = 0; + ctsio->kern_data_len = alloc_len; + ctsio->kern_total_len = alloc_len; + } + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + ctsio->kern_sg_entries = 0; + + /* + * The control device is always connected. The disk device, on the + * other hand, may not be online all the time. + */ + if (lun != NULL) + eid_ptr->device = (SID_QUAL_LU_CONNECTED << 5) | + lun->be_lun->lun_type; + else + eid_ptr->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT; + eid_ptr->page_code = SVPD_EXTENDED_INQUIRY_DATA; + eid_ptr->page_length = data_len - 4; + eid_ptr->flags2 = SVPD_EID_HEADSUP | SVPD_EID_ORDSUP | SVPD_EID_SIMPSUP; + eid_ptr->flags3 = SVPD_EID_V_SUP; + + ctsio->scsi_status = SCSI_STATUS_OK; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); + + return (CTL_RETVAL_COMPLETE); +} + +static int ctl_inquiry_evpd_mpp(struct ctl_scsiio *ctsio, int alloc_len) { struct scsi_vpd_mode_page_policy *mpp_ptr; @@ -10399,6 +10453,9 @@ ctl_inquiry_evpd(struct ctl_scsiio *ctsi case SVPD_DEVICE_ID: retval = ctl_inquiry_evpd_devid(ctsio, alloc_len); break; + case SVPD_EXTENDED_INQUIRY_DATA: + retval = ctl_inquiry_evpd_eid(ctsio, alloc_len); + break; case SVPD_MODE_PAGE_POLICY: retval = ctl_inquiry_evpd_mpp(ctsio, alloc_len); break; Modified: head/sys/cam/scsi/scsi_all.h ============================================================================== --- head/sys/cam/scsi/scsi_all.h Thu Sep 11 22:39:27 2014 (r271442) +++ head/sys/cam/scsi/scsi_all.h Thu Sep 11 22:40:11 2014 (r271443) @@ -2110,6 +2110,55 @@ struct scsi_service_action_in uint8_t control; }; +struct scsi_vpd_extended_inquiry_data +{ + uint8_t device; + uint8_t page_code; +#define SVPD_EXTENDED_INQUIRY_DATA 0x86 + uint8_t reserved; + uint8_t page_length; + uint8_t flags1; +#define SVPD_EID_AM 0xC0 +#define SVPD_EID_SPT 0x38 +#define SVPD_EID_SPT_1 0x00 +#define SVPD_EID_SPT_12 0x08 +#define SVPD_EID_SPT_2 0x10 +#define SVPD_EID_SPT_13 0x18 +#define SVPD_EID_SPT_3 0x20 +#define SVPD_EID_SPT_23 0x28 +#define SVPD_EID_SPT_123 0x38 +#define SVPD_EID_GRD_CHK 0x04 +#define SVPD_EID_APP_CHK 0x02 +#define SVPD_EID_REF_CHK 0x01 + uint8_t flags2; +#define SVPD_EID_UASK_SUP 0x20 +#define SVPD_EID_GROUP_SUP 0x10 +#define SVPD_EID_PRIOR_SUP 0x08 +#define SVPD_EID_HEADSUP 0x04 +#define SVPD_EID_ORDSUP 0x02 +#define SVPD_EID_SIMPSUP 0x01 + uint8_t flags3; +#define SVPD_EID_WU_SUP 0x08 +#define SVPD_EID_CRD_SUP 0x04 +#define SVPD_EID_NV_SUP 0x02 +#define SVPD_EID_V_SUP 0x01 + uint8_t flags4; +#define SVPD_EID_P_I_I_SUP 0x10 +#define SVPD_EID_LUICLT 0x01 + uint8_t flags5; +#define SVPD_EID_R_SUP 0x10 +#define SVPD_EID_CBCS 0x01 + uint8_t flags6; +#define SVPD_EID_MULTI_I_T_FW 0x0F + uint8_t est[2]; + uint8_t flags7; +#define SVPD_EID_POA_SUP 0x80 +#define SVPD_EID_HRA_SUP 0x80 +#define SVPD_EID_VSA_SUP 0x80 + uint8_t max_sense_length; + uint8_t reserved2[50]; +}; + struct scsi_vpd_mode_page_policy_descr { uint8_t page_code; From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 00:05:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13570104; Fri, 12 Sep 2014 00:05: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 F333298D; Fri, 12 Sep 2014 00:05:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8C05F5f043008; Fri, 12 Sep 2014 00:05:15 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8C05FlA043007; Fri, 12 Sep 2014 00:05:15 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409120005.s8C05FlA043007@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 12 Sep 2014 00:05:15 +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: r271444 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 00:05:16 -0000 Author: gjb Date: Fri Sep 12 00:05:15 2014 New Revision: 271444 URL: http://svnweb.freebsd.org/changeset/base/271444 Log: Update stable/10 to -BETA1 as part of the 10.1-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/conf/newvers.sh Modified: stable/10/sys/conf/newvers.sh ============================================================================== --- stable/10/sys/conf/newvers.sh Thu Sep 11 22:40:11 2014 (r271443) +++ stable/10/sys/conf/newvers.sh Fri Sep 12 00:05:15 2014 (r271444) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.1" -BRANCH="PRERELEASE" +BRANCH="BETA1" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 00:08:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35E08275; Fri, 12 Sep 2014 00:08: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 16A409B0; Fri, 12 Sep 2014 00:08:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8C08JeF043461; Fri, 12 Sep 2014 00:08:19 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8C08JN3043460; Fri, 12 Sep 2014 00:08:19 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201409120008.s8C08JN3043460@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Fri, 12 Sep 2014 00:08:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271445 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 00:08:20 -0000 Author: allanjude (doc committer) Date: Fri Sep 12 00:08:19 2014 New Revision: 271445 URL: http://svnweb.freebsd.org/changeset/base/271445 Log: Improve markup and language throughout the ctl.conf man page Reviewed by: trasz Approved by: bcr (mentor) Sponsored by: ScaleEngine Inc. Modified: head/usr.sbin/ctld/ctl.conf.5 Modified: head/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- head/usr.sbin/ctld/ctl.conf.5 Fri Sep 12 00:05:15 2014 (r271444) +++ head/usr.sbin/ctld/ctl.conf.5 Fri Sep 12 00:08:19 2014 (r271445) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 5, 2014 +.Dd September 11, 2014 .Dt CTL.CONF 5 .Os .Sh NAME @@ -46,181 +46,248 @@ The general syntax of the .Nm file is: .Bd -literal -offset indent -pidfile +.No pidfile Ar path -auth-group { - chap - ... +.No auth-group Ar name No { +.Dl chap Ar user Ar secret +.Dl ... } -portal-group { - listen

- listen-iser
- discovery-auth-group - ... +.No portal-group Ar name No { +.Dl listen Ar address +.Dl listen-iser Ar address +.Dl discovery-auth-group Ar name +.Dl ... } -target { - auth-group - portal-group - lun { - path - } - ... +.No target Ar name { +.Dl auth-group Ar name +.Dl portal-group Ar name +.Dl lun Ar number No { +.Dl path Ar path +.Dl } +.Dl ... } .Ed -.Ss global level -The following statements are available at the global level: +.Ss Global Context .Bl -tag -width indent -.It Ic auth-group Aq Ar name -Opens an auth-group section, defining an authentication group, +.It Ic auth-group Ar name +Create an +.Sy auth-group +configuration context, which can then be assigned to any number of targets. -.It Ic debug Aq Ar level -Specifies debug level. +.It Ic debug Ar level +The debug verbosity level. The default is 0. -.It Ic maxproc Aq Ar number -Specifies limit for concurrently running child processes handling +.It Ic maxproc Ar number +The limit for concurrently running child processes handling incoming connections. The default is 30. -Setting it to 0 disables the limit. -.It Ic pidfile Aq Ar path -Specifies path to pidfile. +A setting of 0 disables the limit. +.It Ic pidfile Ar path +The path to the pidfile. The default is .Pa /var/run/ctld.pid . -.It Ic portal-group Aq Ar name -Opens a portal-group section, defining a portal group, +.It Ic portal-group Ar name +Create a +.Sy portal-group +configuration context, which can then be assigned to any number of targets. -.It Ic target Aq Ar name -Opens a target configuration section. -.It Ic timeout Aq Ar seconds -Specifies timeout for login session, after which the connection +.It Ic target Ar name +Create a +.Sy target +configuration context, which can contain one or more +.Sy lun +contexts. +.It Ic timeout Ar seconds +The timeout for login sessions, after which the connection will be forcibly terminated. The default is 60. -Setting it to 0 disables the timeout. +A setting of 0 disables the timeout. .El -.Ss auth-group level -The following statements are available at the auth-group level: +.Ss auth-group Context .Bl -tag -width indent -.It Ic auth-type Ao Ar type Ac -Specifies authentication type. -Type can be either "none", "deny", "chap", or "chap-mutual". + +.It Ic auth-type Ar type +Sets the authentication type. +Type can be either +.Qq Ar none , +.Qq Ar deny , +.Qq Ar chap , +or +.Qq Ar chap-mutual . In most cases it is not necessary to set the type using this clause; -it is usually used to disable authentication for a given auth-group. -.It Ic chap Ao Ar user Ac Aq Ar secret -Specifies CHAP authentication credentials. -.It Ic chap-mutual Ao Ar user Ac Ao Ar secret Ac Ao Ar mutualuser Ac Aq Ar mutualsecret -Specifies mutual CHAP authentication credentials. -Note that for any auth-group, configuration may contain either chap, -or chap-mutual entries; it is an error to mix them. -.It Ic initiator-name Ao Ar initiator-name Ac -Specifies iSCSI initiator name. +it is usually used to disable authentication for a given +.Sy auth-group . +.It Ic chap Ar user Ar secret +A set of CHAP authentication credentials. +Note that for any +.Sy auth-group , +the configuration may only contain either +.Sy chap +or +.Sy chap-mutual +entries; it is an error to mix them. +.It Ic chap-mutual Ar user Ar secret Ar mutualuser Ar mutualsecret +A set of mutual CHAP authentication credentials. +Note that for any +.Sy auth-group , +the configuration may only contain either +.Sy chap +or +.Sy chap-mutual +entries; it is an error to mix them. +.It Ic initiator-name Ar initiator-name +An iSCSI initiator name. +Only initiators with a name matching one of the defined +names will be allowed to connect. If not defined, there will be no restrictions based on initiator name. -Otherwise, only initiators with names matching one of defined -ones will be allowed to connect. -.It Ic initiator-portal Ao Ar address Ac Ao Ar / prefixlen Ac -Specifies the iSCSI initiator portal: an IPv4 or IPv6 address, optionally -followed by slash and prefix length. +.It Ic initiator-portal Ar address Ns Op / Ns Ar prefixlen +An iSCSI initiator portal: an IPv4 or IPv6 address, optionally +followed by a literal slash and a prefix length. +Only initiators with an address matching one of the defined +addresses will be allowed to connect. If not defined, there will be no restrictions based on initiator address. -Otherwise, only initiators with addresses matching one of defined -ones will be allowed to connect. .El -.Ss portal-group level -The following statements are available at the portal-group level: +.Ss portal-group Context .Bl -tag -width indent -.It Ic discovery-auth-group Aq Ar name -Assigns previously defined authentication group to the portal group, +.It Ic discovery-auth-group Ar name +Assign a previously defined authentication group to the portal group, to be used for target discovery. By default, portal groups that do not specify their own auth settings, -using clauses such as "chap" or "initiator-name", are assigned -predefined auth-group "default", which denies discovery. -Another predefined auth-group, "no-authentication", may be used +using clauses such as +.Sy chap +or +.Sy initiator-name , +are assigned +predefined +.Sy auth-group +.Qq Ar default , +which denies discovery. +Another predefined +.Sy auth-group , +.Qq Ar no-authentication , +may be used to permit discovery without authentication. -.It Ic listen Aq Ar address -Specifies IPv4 or IPv6 address and port to listen on for incoming connections. -.It Ic listen-iser Aq Ar address -Specifies IPv4 or IPv6 address and port to listen on for incoming connections +.It Ic listen Ar address +An IPv4 or IPv6 address and port to listen on for incoming connections. +.It Ic listen-iser Ar address +An IPv4 or IPv6 address and port to listen on for incoming connections using iSER (iSCSI over RDMA) protocol. .El -.Ss target level: -The following statements are available at the target level: +.Ss target Context .Bl -tag -width indent -.It Ic alias Aq Ar text -Assigns human-readable description to the target. +.It Ic alias Ar text +Assign a human-readable description to the target. There is no default. -.It Ic auth-group Aq Ar name -Assigns previously defined authentication group to the target. +.It Ic auth-group Ar name +Assign a previously defined authentication group to the target. By default, targets that do not specify their own auth settings, -using clauses such as "chap" or "initiator-name", are assigned -predefined auth-group "default", which denies all access. -Another predefined auth-group, "no-authentication", may be used to permit access +using clauses such as +.Sy chap +or +. Sy initiator-name , +are assigned +predefined +.Sy auth-group +.Qq Ar default , +which denies all access. +Another predefined +.Sy auth-group , +.Qq Ar no-authentication , +may be used to permit access without authentication. -.It Ic auth-type Ao Ar type Ac -Specifies authentication type. -Type can be either "none", "deny", "chap", or "chap-mutual". +Note that targets must only use one of +.Sy auth-group , chap , No or Sy chap-mutual ; +it is a configuration error to mix multiple types in one target. +.It Ic auth-type Ar type +Sets the authentication type. +Type can be either +.Qq Ar none , +.Qq Ar deny , +.Qq Ar chap , +or +.Qq Ar chap-mutual . In most cases it is not necessary to set the type using this clause; -it is usually used to disable authentication for a given target. -This clause is mutually exclusive with auth-group; one cannot use +it is usually used to disable authentication for a given +.Sy target . +This clause is mutually exclusive with +.Sy auth-group ; +one cannot use both in a single target. -.It Ic chap Ao Ar user Ac Aq Ar secret -Specifies CHAP authentication credentials. -Note that targets must use either auth-group, or chap, -or chap-mutual clauses; it is a configuration error to mix them in one target. -.It Ic chap-mutual Ao Ar user Ac Ao Ar secret Ac Ao Ar mutualuser Ac Aq Ar mutualsecret -Specifies mutual CHAP authentication credentials. -Note that targets must use either auth-group, chap, or -chap-mutual clauses; it is a configuration error to mix them in one target. -.It Ic initiator-name Ao Ar initiator-name Ac -Specifies iSCSI initiator name. +.It Ic chap Ar user Ar secret +A set of CHAP authentication credentials. +Note that targets must only use one of +.Sy auth-group , chap , No or Sy chap-mutual ; +it is a configuration error to mix multiple types in one target. +.It Ic chap-mutual Ar user Ar secret Ar mutualuser Ar mutualsecret +A set of mutual CHAP authentication credentials. +Note that targets must only use one of +.Sy auth-group , chap , No or Sy chap-mutual ; +it is a configuration error to mix multiple types in one target. +.It Ic initiator-name Ar initiator-name +An iSCSI initiator name. +Only initiators with a name matching one of the defined +names will be allowed to connect. If not defined, there will be no restrictions based on initiator name. -Otherwise, only initiators with names matching one of defined -ones will be allowed to connect. -This clause is mutually exclusive with auth-group; one cannot use +This clause is mutually exclusive with +.Sy auth-group ; +one cannot use both in a single target. -.It Ic initiator-portal Ao Ar address Ac Ao Ar / prefixlen Ac -Specifies the iSCSI initiator portal: an IPv4 or IPv6 address, optionally -followed by slash and prefix length. +.It Ic initiator-portal Ar address Ns Op / Ns Ar prefixlen +An iSCSI initiator portal: an IPv4 or IPv6 address, optionally +followed by a literal slash and a prefix length. +Only initiators with an address matching one of the defined +addresses will be allowed to connect. If not defined, there will be no restrictions based on initiator address. -Otherwise, only initiators with addresses matching one of defined -ones will be allowed to connect. -This clause is mutually exclusive with auth-group; one cannot use +This clause is mutually exclusive with +.Sy auth-group ; +one cannot use both in a single target. -.It Ic portal-group Aq Ar name -Assigns previously defined portal group to the target. -Default portal group is "default", which makes the target available +.It Ic portal-group Ar name +Assign a previously defined portal group to the target. +The default portal group is +.Qq Ar default , +which makes the target available on TCP port 3260 on all configured IPv4 and IPv6 addresses. -.It Ic lun Aq Ar number -Opens a lun configuration section, defining LUN exported by a target. +.It Ic lun Ar number +Create a +.Sy lun +configuration context, defining a LUN exported by the parent target. .El -.Ss lun level -The following statements are available at the lun level: +.Ss lun Context .Bl -tag -width indent -.It Ic backend Ao Ar block | Ar ramdisk Ac -Specifies the CTL backend to use for a given LUN. +.It Ic backend Ar block No | Ar ramdisk +The CTL backend to use for a given LUN. Valid choices are -.Dq block +.Qq Ar block and -.Dq ramdisk ; +.Qq Ar ramdisk ; block is used for LUNs backed by files or disk device nodes; ramdisk is a bitsink device, used mostly for testing. The default backend is block. -.It Ic blocksize Aq Ar size -Specifies blocksize visible to the initiator. +.It Ic blocksize Ar size +The blocksize visible to the initiator. The default blocksize is 512. -.It Ic device-id Aq Ar string -Specifies SCSI Device Identification string presented to the initiator. -.It Ic option Ao Ar name Ac Aq Ar value -Specifies CTL-specific options passed to the kernel. -.It Ic path Aq Ar path -Specifies path to file or device node used to back the LUN. -.It Ic serial Aq Ar string -Specifies SCSI serial number presented to the initiator. -.It Ic size Aq Ar size -Specifies LUN size, in bytes. +.It Ic device-id Ar string +The SCSI Device Identification string presented to the initiator. +.It Ic option Ar name Ar value +The CTL-specific options passed to the kernel. +All CTL-specific options are documented in the +.Sx OPTIONS +section of +.Xr ctladm 8 +.It Ic path Ar path +The path to the file or device node used to back the LUN. +.It Ic serial Ar string +The SCSI serial number presented to the initiator. +.It Ic size Ar size +The LUN size, in bytes. .El .Sh FILES .Bl -tag -width ".Pa /etc/ctl.conf" -compact From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 00:18:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 822605F3 for ; Fri, 12 Sep 2014 00:18:17 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49D80A79 for ; Fri, 12 Sep 2014 00:18:17 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id s8C0IHmI030732 for ; Fri, 12 Sep 2014 00:18:17 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id s8C0IHc3030726 for svn-src-all@freebsd.org; Fri, 12 Sep 2014 00:18:17 GMT (envelope-from bdrewery) Received: (qmail 65219 invoked from network); 11 Sep 2014 19:18:15 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 11 Sep 2014 19:18:15 -0500 Message-ID: <54123BBF.3030502@FreeBSD.org> Date: Thu, 11 Sep 2014 19:18:07 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: Hiroki Sato , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r271424 - in head: etc etc/defaults share/man/man5 References: <201409111230.s8BCUUv1005586@svn.freebsd.org> In-Reply-To: <201409111230.s8BCUUv1005586@svn.freebsd.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ABpDWgvtrWghIxljbQeooKFA7wTHpSaA1" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 00:18:17 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ABpDWgvtrWghIxljbQeooKFA7wTHpSaA1 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 9/11/2014 7:30 AM, Hiroki Sato wrote: > Author: hrs > Date: Thu Sep 11 12:30:29 2014 > New Revision: 271424 > URL: http://svnweb.freebsd.org/changeset/base/271424 >=20 > Log: > - Add $netif_ipexpand_max to specify the upper limit for the number o= f > addresses generated by an address range specification. The default= > value is 2048. This can be increased by setting $netif_ipexpand_ma= x > in rc.conf. > =20 > - Fix warning messages when an address range spec exceeds the upper l= imit. > =20 > PR: 186841 >=20 > Modified: > head/etc/defaults/rc.conf > head/etc/network.subr > head/share/man/man5/rc.conf.5 Thanks! --=20 Regards, Bryan Drewery --ABpDWgvtrWghIxljbQeooKFA7wTHpSaA1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBAgAGBQJUEju/AAoJEDXXcbtuRpfPIdcH/A5ymX0K0ebskZw+ZCpJAagL OXJCArkLXU8JEkToPFlpQ+K+s3ATOnw0mBSR8zh2yI+7hfV4QWYvKF/ksvA+7qQ4 QsT/H2sWFVaseb9ef5VMt8x/vWkTW7207tvcHy+oJw8dpFOXLhvYMj4GWtN1jVlB e4biIA2lOMXN28ZfNSSx5KmyagN1KYsG+13TjWKzbDJh39OIgES26uEl6N5qBjc8 S06sIJkDlBbGcITxVe+r+bR57JVrukR6cYLIJY5WQMpl6NEBsj5wFN2pwYwkQWaC MwToj9T7ksCKidHzwKLHFztebYz12CCuxVXSP4OYRm5QeIl02A/Vdwpc6HopVKE= =R6qA -----END PGP SIGNATURE----- --ABpDWgvtrWghIxljbQeooKFA7wTHpSaA1-- From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 00:55:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27A66E67; Fri, 12 Sep 2014 00:55: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 12C21DBF; Fri, 12 Sep 2014 00:55: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 s8C0tguG066619; Fri, 12 Sep 2014 00:55:42 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8C0tgLv066618; Fri, 12 Sep 2014 00:55:42 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201409120055.s8C0tgLv066618@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Fri, 12 Sep 2014 00:55:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271446 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 00:55:43 -0000 Author: allanjude (doc committer) Date: Fri Sep 12 00:55:42 2014 New Revision: 271446 URL: http://svnweb.freebsd.org/changeset/base/271446 Log: Fix minor syntax error Submitted by: bjk Approved by: bcr (mentor) Sponsored by: ScaleEngine Inc. Modified: head/usr.sbin/ctld/ctl.conf.5 Modified: head/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- head/usr.sbin/ctld/ctl.conf.5 Fri Sep 12 00:08:19 2014 (r271445) +++ head/usr.sbin/ctld/ctl.conf.5 Fri Sep 12 00:55:42 2014 (r271446) @@ -188,7 +188,7 @@ By default, targets that do not specify using clauses such as .Sy chap or -. Sy initiator-name , +.Sy initiator-name , are assigned predefined .Sy auth-group From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 02:38:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5516456; Fri, 12 Sep 2014 02:38:11 +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 9008C968; Fri, 12 Sep 2014 02:38:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8C2cBOC013102; Fri, 12 Sep 2014 02:38:11 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8C2cBeu013101; Fri, 12 Sep 2014 02:38:11 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201409120238.s8C2cBeu013101@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Fri, 12 Sep 2014 02:38:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271447 - head/share/examples/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 02:38:11 -0000 Author: rodrigc Date: Fri Sep 12 02:38:10 2014 New Revision: 271447 URL: http://svnweb.freebsd.org/changeset/base/271447 Log: Attach the ISO to an ahci-cd emulated device. The ISO will appear to be mounted on a /dev/cd device instead of /dev/vtbd. This is similar to how other virtualization environments handle mounting ISO images. Reviewed by: neel Modified: head/share/examples/bhyve/vmrun.sh Modified: head/share/examples/bhyve/vmrun.sh ============================================================================== --- head/share/examples/bhyve/vmrun.sh Fri Sep 12 00:55:42 2014 (r271446) +++ head/share/examples/bhyve/vmrun.sh Fri Sep 12 02:38:10 2014 (r271447) @@ -196,7 +196,7 @@ while [ 1 ]; do exit 1 fi BOOTDISK=${isofile} - installer_opt="-s 31:0,virtio-blk,${BOOTDISK}" + installer_opt="-s 31:0,ahci-cd,${BOOTDISK}" else BOOTDISK=${virtio_diskdev} installer_opt="" From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 03:54:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7C9ABE9; Fri, 12 Sep 2014 03:54: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 A8F8798; Fri, 12 Sep 2014 03:54: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 s8C3sGBJ050612; Fri, 12 Sep 2014 03:54:16 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8C3sG5S050611; Fri, 12 Sep 2014 03:54:16 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201409120354.s8C3sG5S050611@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Fri, 12 Sep 2014 03:54:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271448 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 03:54:17 -0000 Author: marcel Date: Fri Sep 12 03:54:16 2014 New Revision: 271448 URL: http://svnweb.freebsd.org/changeset/base/271448 Log: Fix checksum calculation: 1. Iterate over all partitions counted in the label, which can be more than the number of partitions given to mkimg(1). 2. Start the checksum from the beginning of the label; not the beginning of the bootarea. Tested with bsdlabel(8). MFC after: 3 days Modified: head/usr.bin/mkimg/bsd.c Modified: head/usr.bin/mkimg/bsd.c ============================================================================== --- head/usr.bin/mkimg/bsd.c Fri Sep 12 02:38:10 2014 (r271447) +++ head/usr.bin/mkimg/bsd.c Fri Sep 12 03:54:16 2014 (r271448) @@ -68,7 +68,7 @@ bsd_write(lba_t imgsz, void *bootcode) struct disklabel *d; struct partition *dp; struct part *part; - int error, n; + int bsdparts, error, n; uint16_t checksum; buf = malloc(BBSIZE); @@ -80,6 +80,9 @@ bsd_write(lba_t imgsz, void *bootcode) } else memset(buf, 0, BBSIZE); + bsdparts = nparts + 1; /* Account for c partition */ + if (bsdparts < MAXPARTITIONS) + bsdparts = MAXPARTITIONS; imgsz = (lba_t)ncyls * nheads * nsecs; error = image_set_size(imgsz); if (error) { @@ -97,7 +100,7 @@ bsd_write(lba_t imgsz, void *bootcode) le32enc(&d->d_secperunit, imgsz); le16enc(&d->d_rpm, 3600); le32enc(&d->d_magic2, DISKMAGIC); - le16enc(&d->d_npartitions, (8 > nparts + 1) ? 8 : nparts + 1); + le16enc(&d->d_npartitions, bsdparts); le32enc(&d->d_bbsize, BBSIZE); dp = &d->d_partitions[RAW_PART]; @@ -110,9 +113,9 @@ bsd_write(lba_t imgsz, void *bootcode) dp->p_fstype = ALIAS_TYPE2INT(part->type); } - dp = &d->d_partitions[nparts + 1]; + dp = &d->d_partitions[bsdparts]; checksum = 0; - for (p = buf; p < (u_char *)dp; p += 2) + for (p = (void *)d; p < (u_char *)dp; p += 2) checksum ^= le16dec(p); le16enc(&d->d_checksum, checksum); From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 04:15:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC368E72; Fri, 12 Sep 2014 04:15:35 +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 AD159222; Fri, 12 Sep 2014 04:15:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8C4FZhW060119; Fri, 12 Sep 2014 04:15:35 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8C4FZtt060118; Fri, 12 Sep 2014 04:15:35 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201409120415.s8C4FZtt060118@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Fri, 12 Sep 2014 04:15:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271449 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 04:15:36 -0000 Author: marcel Date: Fri Sep 12 04:15:35 2014 New Revision: 271449 URL: http://svnweb.freebsd.org/changeset/base/271449 Log: Be compatible with boot code that starts right after the disk label in the second sector by only clearing the amount of bytes needed for the disklabel in the second sector. Previously we were clearing exactly 1 sector worth of bytes and as such writing over boot code that may have been there. Since we do support more than 8 partitions, make sure to set all fields in d_partitions. For the first 8 partitions this is unneeded, but for partitioons 9 and up this compensates for the fact that we don't clear an entire sector anymore. Obviously, one cannot use more than 8 partitions when using boot code that starts right after the disk label. Relevant GRNs: 107879 - Employ unused bytes after the disklabel in the second sector. 189500 - Revert the part of change 107879 that employs the unused bytes after the disklabel in the 2nd sector for boot code. Obtained from: Juniper Networks, Inc. MFC after: 3 days Modified: head/usr.bin/mkimg/bsd.c Modified: head/usr.bin/mkimg/bsd.c ============================================================================== --- head/usr.bin/mkimg/bsd.c Fri Sep 12 03:54:16 2014 (r271448) +++ head/usr.bin/mkimg/bsd.c Fri Sep 12 04:15:35 2014 (r271449) @@ -76,7 +76,7 @@ bsd_write(lba_t imgsz, void *bootcode) return (ENOMEM); if (bootcode != NULL) { memcpy(buf, bootcode, BBSIZE); - memset(buf + secsz, 0, secsz); + memset(buf + secsz, 0, sizeof(struct disklabel)); } else memset(buf, 0, BBSIZE); @@ -110,7 +110,10 @@ bsd_write(lba_t imgsz, void *bootcode) dp = &d->d_partitions[n]; le32enc(&dp->p_size, part->size); le32enc(&dp->p_offset, part->block); + le32enc(&dp->p_fsize, 0); dp->p_fstype = ALIAS_TYPE2INT(part->type); + dp->p_frag = 0; + le16enc(&dp->p_cpg, 0); } dp = &d->d_partitions[bsdparts]; From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 05:25:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 543EF926; Fri, 12 Sep 2014 05:25:57 +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 332319DC; Fri, 12 Sep 2014 05:25:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8C5Pvv6092804; Fri, 12 Sep 2014 05:25:57 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8C5PuJl092801; Fri, 12 Sep 2014 05:25:56 GMT (envelope-from np@FreeBSD.org) Message-Id: <201409120525.s8C5PuJl092801@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 12 Sep 2014 05:25:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271450 - in head: share/man/man4 sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 05:25:57 -0000 Author: np Date: Fri Sep 12 05:25:56 2014 New Revision: 271450 URL: http://svnweb.freebsd.org/changeset/base/271450 Log: cxgbe(4): knobs to enable/disable PAUSE frame based flow control. MFC after: 1 week Modified: head/share/man/man4/cxgbe.4 head/sys/dev/cxgbe/t4_main.c Modified: head/share/man/man4/cxgbe.4 ============================================================================== --- head/share/man/man4/cxgbe.4 Fri Sep 12 04:15:35 2014 (r271449) +++ head/share/man/man4/cxgbe.4 Fri Sep 12 05:25:56 2014 (r271450) @@ -240,8 +240,19 @@ The default is -1 which lets the driver Controls the hardware response to congestion. -1 disables congestion feedback and is not recommended. 0 instructs the hardware to backpressure its pipeline on congestion. -This usually results in the port emitting pause frames. +This usually results in the port emitting PAUSE frames. 1 instructs the hardware to drop frames destined for congested queues. +.It Va hw.cxgbe.pause_settings +PAUSE frame settings. +Bit 0 is rx_pause, bit 1 is tx_pause. +rx_pause = 1 instructs the hardware to heed incoming PAUSE frames, 0 instructs +it to ignore them. +tx_pause = 1 allows the hardware to emit PAUSE frames when its receive FIFO +reaches a high threshold, 0 prohibits the hardware from emitting PAUSE frames. +The default is 3 (both rx_pause and tx_pause = 1). +This tunable establishes the default PAUSE settings for all ports. +Settings can be displayed and controlled on a per-port basis via the +dev.cxgbe.X.pause_settings (dev.cxl.X.pause_settings for T5 cards) sysctl. .It Va hw.cxgbe.buffer_packing Allow the hardware to deliver multiple frames in the same receive buffer opportunistically. Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri Sep 12 04:15:35 2014 (r271449) +++ head/sys/dev/cxgbe/t4_main.c Fri Sep 12 05:25:56 2014 (r271450) @@ -281,6 +281,15 @@ static char t4_cfg_file[32] = DEFAULT_CF TUNABLE_STR("hw.cxgbe.config_file", t4_cfg_file, sizeof(t4_cfg_file)); /* + * PAUSE settings (bit 0, 1 = rx_pause, tx_pause respectively). + * rx_pause = 1 to heed incoming PAUSE frames, 0 to ignore them. + * tx_pause = 1 to emit PAUSE frames when the rx FIFO reaches its high water + * mark or when signalled to do so, 0 to never emit PAUSE. + */ +static int t4_pause_settings = PAUSE_TX | PAUSE_RX; +TUNABLE_INT("hw.cxgbe.pause_settings", &t4_pause_settings); + +/* * Firmware auto-install by driver during attach (0, 1, 2 = prohibited, allowed, * encouraged respectively). */ @@ -393,6 +402,7 @@ static int sysctl_holdoff_tmr_idx(SYSCTL static int sysctl_holdoff_pktc_idx(SYSCTL_HANDLER_ARGS); static int sysctl_qsize_rxq(SYSCTL_HANDLER_ARGS); static int sysctl_qsize_txq(SYSCTL_HANDLER_ARGS); +static int sysctl_pause_settings(SYSCTL_HANDLER_ARGS); static int sysctl_handle_t4_reg64(SYSCTL_HANDLER_ARGS); static int sysctl_temperature(SYSCTL_HANDLER_ARGS); #ifdef SBUF_DRAIN @@ -697,6 +707,12 @@ t4_attach(device_t dev) sc->port[i] = NULL; goto done; } + + pi->link_cfg.requested_fc &= ~(PAUSE_TX | PAUSE_RX); + pi->link_cfg.requested_fc |= t4_pause_settings; + pi->link_cfg.fc &= ~(PAUSE_TX | PAUSE_RX); + pi->link_cfg.fc |= t4_pause_settings; + rc = -t4_link_start(sc, sc->mbox, pi->tx_chan, &pi->link_cfg); if (rc != 0) { device_printf(dev, "port %d l1cfg failed: %d\n", i, rc); @@ -4771,6 +4787,10 @@ cxgbe_sysctls(struct port_info *pi) CTLTYPE_INT | CTLFLAG_RW, pi, 0, sysctl_qsize_txq, "I", "tx queue size"); + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "pause_settings", + CTLTYPE_STRING | CTLFLAG_RW, pi, PAUSE_TX, sysctl_pause_settings, + "A", "PAUSE settings (bit 0 = rx_pause, bit 1 = tx_pause)"); + /* * dev.cxgbe.X.stats. */ @@ -5152,6 +5172,65 @@ sysctl_qsize_txq(SYSCTL_HANDLER_ARGS) } static int +sysctl_pause_settings(SYSCTL_HANDLER_ARGS) +{ + struct port_info *pi = arg1; + struct adapter *sc = pi->adapter; + struct link_config *lc = &pi->link_cfg; + int rc; + + if (req->newptr == NULL) { + struct sbuf *sb; + static char *bits = "\20\1PAUSE_RX\2PAUSE_TX"; + + rc = sysctl_wire_old_buffer(req, 0); + if (rc != 0) + return(rc); + + sb = sbuf_new_for_sysctl(NULL, NULL, 128, req); + if (sb == NULL) + return (ENOMEM); + + sbuf_printf(sb, "%b", lc->fc & (PAUSE_TX | PAUSE_RX), bits); + rc = sbuf_finish(sb); + sbuf_delete(sb); + } else { + char s[2]; + int n; + + s[0] = '0' + (lc->requested_fc & (PAUSE_TX | PAUSE_RX)); + s[1] = 0; + + rc = sysctl_handle_string(oidp, s, sizeof(s), req); + if (rc != 0) + return(rc); + + if (s[1] != 0) + return (EINVAL); + if (s[0] < '0' || s[0] > '9') + return (EINVAL); /* not a number */ + n = s[0] - '0'; + if (n & ~(PAUSE_TX | PAUSE_RX)) + return (EINVAL); /* some other bit is set too */ + + rc = begin_synchronized_op(sc, pi, SLEEP_OK | INTR_OK, "t4PAUSE"); + if (rc) + return (rc); + if ((lc->requested_fc & (PAUSE_TX | PAUSE_RX)) != n) { + int link_ok = lc->link_ok; + + lc->requested_fc &= ~(PAUSE_TX | PAUSE_RX); + lc->requested_fc |= n; + rc = -t4_link_start(sc, sc->mbox, pi->tx_chan, lc); + lc->link_ok = link_ok; /* restore */ + } + end_synchronized_op(sc, 0); + } + + return (rc); +} + +static int sysctl_handle_t4_reg64(SYSCTL_HANDLER_ARGS) { struct adapter *sc = arg1; From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 06:15:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86C22A7; Fri, 12 Sep 2014 06:15: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 710F0DAF; Fri, 12 Sep 2014 06:15: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 s8C6FLQL016068; Fri, 12 Sep 2014 06:15:21 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8C6FKdO016063; Fri, 12 Sep 2014 06:15:20 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201409120615.s8C6FKdO016063@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Fri, 12 Sep 2014 06:15:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271451 - in head/sys/amd64: include vmm vmm/intel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 06:15:21 -0000 Author: neel Date: Fri Sep 12 06:15:20 2014 New Revision: 271451 URL: http://svnweb.freebsd.org/changeset/base/271451 Log: Optimize the common case of injecting an interrupt into a vcpu after a HLT by explicitly moving it out of the interrupt shadow. The hypervisor is done "executing" the HLT and by definition this moves the vcpu out of the 1-instruction interrupt shadow. Prior to this change the interrupt would be held pending because the VMCS guest-interruptibility-state would indicate that "blocking by STI" was in effect. This resulted in an unnecessary round trip into the guest before the pending interrupt could be injected. Reviewed by: grehan Modified: head/sys/amd64/include/vmm.h head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/vmm.c Modified: head/sys/amd64/include/vmm.h ============================================================================== --- head/sys/amd64/include/vmm.h Fri Sep 12 05:25:56 2014 (r271450) +++ head/sys/amd64/include/vmm.h Fri Sep 12 06:15:20 2014 (r271451) @@ -82,6 +82,7 @@ enum vm_reg_name { VM_REG_GUEST_PDPTE1, VM_REG_GUEST_PDPTE2, VM_REG_GUEST_PDPTE3, + VM_REG_GUEST_INTR_SHADOW, VM_REG_LAST }; Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Fri Sep 12 05:25:56 2014 (r271450) +++ head/sys/amd64/vmm/intel/vmx.c Fri Sep 12 06:15:20 2014 (r271451) @@ -2712,6 +2712,46 @@ vmxctx_setreg(struct vmxctx *vmxctx, int } static int +vmx_get_intr_shadow(struct vmx *vmx, int vcpu, int running, uint64_t *retval) +{ + uint64_t gi; + int error; + + error = vmcs_getreg(&vmx->vmcs[vcpu], running, + VMCS_IDENT(VMCS_GUEST_INTERRUPTIBILITY), &gi); + *retval = (gi & HWINTR_BLOCKING) ? 1 : 0; + return (error); +} + +static int +vmx_modify_intr_shadow(struct vmx *vmx, int vcpu, int running, uint64_t val) +{ + struct vmcs *vmcs; + uint64_t gi; + int error, ident; + + /* + * Forcing the vcpu into an interrupt shadow is not supported. + */ + if (val) { + error = EINVAL; + goto done; + } + + vmcs = &vmx->vmcs[vcpu]; + ident = VMCS_IDENT(VMCS_GUEST_INTERRUPTIBILITY); + error = vmcs_getreg(vmcs, running, ident, &gi); + if (error == 0) { + gi &= ~HWINTR_BLOCKING; + error = vmcs_setreg(vmcs, running, ident, gi); + } +done: + VCPU_CTR2(vmx->vm, vcpu, "Setting intr_shadow to %#lx %s", val, + error ? "failed" : "succeeded"); + return (error); +} + +static int vmx_shadow_reg(int reg) { int shreg; @@ -2742,6 +2782,9 @@ vmx_getreg(void *arg, int vcpu, int reg, if (running && hostcpu != curcpu) panic("vmx_getreg: %s%d is running", vm_name(vmx->vm), vcpu); + if (reg == VM_REG_GUEST_INTR_SHADOW) + return (vmx_get_intr_shadow(vmx, vcpu, running, retval)); + if (vmxctx_getreg(&vmx->ctx[vcpu], reg, retval) == 0) return (0); @@ -2760,6 +2803,9 @@ vmx_setreg(void *arg, int vcpu, int reg, if (running && hostcpu != curcpu) panic("vmx_setreg: %s%d is running", vm_name(vmx->vm), vcpu); + if (reg == VM_REG_GUEST_INTR_SHADOW) + return (vmx_modify_intr_shadow(vmx, vcpu, running, val)); + if (vmxctx_setreg(&vmx->ctx[vcpu], reg, val) == 0) return (0); Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Fri Sep 12 05:25:56 2014 (r271450) +++ head/sys/amd64/vmm/vmm.c Fri Sep 12 06:15:20 2014 (r271451) @@ -1090,7 +1090,7 @@ vm_handle_hlt(struct vm *vm, int vcpuid, { struct vcpu *vcpu; const char *wmesg; - int t, vcpu_halted, vm_halted; + int error, t, vcpu_halted, vm_halted; KASSERT(!CPU_ISSET(vcpuid, &vm->halted_cpus), ("vcpu already halted")); @@ -1098,6 +1098,22 @@ vm_handle_hlt(struct vm *vm, int vcpuid, vcpu_halted = 0; vm_halted = 0; + /* + * The typical way to halt a cpu is to execute: "sti; hlt" + * + * STI sets RFLAGS.IF to enable interrupts. However, the processor + * remains in an "interrupt shadow" for an additional instruction + * following the STI. This guarantees that "sti; hlt" sequence is + * atomic and a pending interrupt will be recognized after the HLT. + * + * After the HLT emulation is done the vcpu is no longer in an + * interrupt shadow and a pending interrupt can be injected on + * the next entry into the guest. + */ + error = vm_set_register(vm, vcpuid, VM_REG_GUEST_INTR_SHADOW, 0); + KASSERT(error == 0, ("%s: error %d clearing interrupt shadow", + __func__, error)); + vcpu_lock(vcpu); while (1) { /* From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 06:23:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1281D3E7; Fri, 12 Sep 2014 06:23:58 +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 F1A28E8B; Fri, 12 Sep 2014 06:23:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8C6Nv2N020712; Fri, 12 Sep 2014 06:23:57 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8C6NvBt020711; Fri, 12 Sep 2014 06:23:57 GMT (envelope-from se@FreeBSD.org) Message-Id: <201409120623.s8C6NvBt020711@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Fri, 12 Sep 2014 06:23:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271452 - head/share/vt/keymaps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 06:23:58 -0000 Author: se Date: Fri Sep 12 06:23:57 2014 New Revision: 271452 URL: http://svnweb.freebsd.org/changeset/base/271452 Log: Add forgotten keymap files fr.kbd and fr.acc.kbd to the FILES list. Obtained from: thierry MFC after: 3 days Modified: head/share/vt/keymaps/Makefile Modified: head/share/vt/keymaps/Makefile ============================================================================== --- head/share/vt/keymaps/Makefile Fri Sep 12 06:15:20 2014 (r271451) +++ head/share/vt/keymaps/Makefile Fri Sep 12 06:23:57 2014 (r271452) @@ -31,8 +31,10 @@ FILES= INDEX.keymaps \ es.dvorak.kbd \ es.kbd \ fi.kbd \ + fr.acc.kbd \ fr.dvorak.acc.kbd \ fr.dvorak.kbd \ + fr.kbd \ fr.macbook.kbd \ gr.101.acc.kbd \ gr.elot.acc.kbd \ From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 08:33:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB9E12CB; Fri, 12 Sep 2014 08:33:53 +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 C6FECD51; Fri, 12 Sep 2014 08:33:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8C8Xrea081328; Fri, 12 Sep 2014 08:33:53 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8C8XrCB081327; Fri, 12 Sep 2014 08:33:53 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409120833.s8C8XrCB081327@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 12 Sep 2014 08:33:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271455 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 08:33:54 -0000 Author: glebius Date: Fri Sep 12 08:33:53 2014 New Revision: 271455 URL: http://svnweb.freebsd.org/changeset/base/271455 Log: - Fix argument list after 271387. - While here fix typo. Submitted by: markj Modified: head/share/man/man9/VOP_GETPAGES.9 Modified: head/share/man/man9/VOP_GETPAGES.9 ============================================================================== --- head/share/man/man9/VOP_GETPAGES.9 Fri Sep 12 08:22:29 2014 (r271454) +++ head/share/man/man9/VOP_GETPAGES.9 Fri Sep 12 08:33:53 2014 (r271455) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 27, 2003 +.Dd September 12, 2014 .Dt VOP_GETPAGES 9 .Os .Sh NAME @@ -41,9 +41,9 @@ .In sys/vnode.h .In vm/vm.h .Ft int -.Fn VOP_GETPAGES "struct vnode *vp" "vm_page_t *ma" "int count" "int reqpage" "vm_ooffset_t offset" +.Fn VOP_GETPAGES "struct vnode *vp" "vm_page_t *ma" "int count" "int reqpage" .Ft int -.Fn VOP_PUTPAGES "struct vnode *vp" "vm_page_t *ma" "int count" "int sync" "int *rtvals" "vm_ooffset_t offset" +.Fn VOP_PUTPAGES "struct vnode *vp" "vm_page_t *ma" "int count" "int sync" "int *rtvals" .Sh DESCRIPTION The .Fn VOP_GETPAGES @@ -81,8 +81,6 @@ page written by .It Fa reqpage The index in the page array of the requested page; i.e., the one page which the implementation of this method must handle. -.It Fa offset -Offset in the file at which the mapped pages begin. .El .Pp The status of the @@ -156,7 +154,7 @@ is .Sh SEE ALSO .Xr vm_object_pip_wakeup 9 , .Xr vm_page_free 9 , -.Xr vm_pagge_sunbusy 9 , +.Xr vm_page_sunbusy 9 , .Xr vm_page_undirty 9 , .Xr vm_page_xunbusy 9 , .Xr vnode 9 From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 08:37:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC5E3527; Fri, 12 Sep 2014 08:37: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 D86CFD76; Fri, 12 Sep 2014 08:37: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 s8C8bLXu082248; Fri, 12 Sep 2014 08:37:21 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8C8bL6s082247; Fri, 12 Sep 2014 08:37:21 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409120837.s8C8bL6s082247@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 12 Sep 2014 08:37:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271457 - head/sys/dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 08:37:22 -0000 Author: mav Date: Fri Sep 12 08:37:21 2014 New Revision: 271457 URL: http://svnweb.freebsd.org/changeset/base/271457 Log: Initialize variables before resource_int_value(). Submitted by: Dmitry Luhtionov Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Fri Sep 12 08:35:12 2014 (r271456) +++ head/sys/dev/ahci/ahci.c Fri Sep 12 08:37:21 2014 (r271457) @@ -159,6 +159,7 @@ ahci_attach(device_t dev) device_t child; ctlr->dev = dev; + ctlr->ccc = 0; resource_int_value(device_get_name(dev), device_get_unit(dev), "ccc", &ctlr->ccc); @@ -624,6 +625,7 @@ ahci_ch_attach(device_t dev) ch->subdeviceid = ctlr->subdeviceid; ch->numslots = ((ch->caps & AHCI_CAP_NCS) >> AHCI_CAP_NCS_SHIFT) + 1; mtx_init(&ch->mtx, "AHCI channel lock", NULL, MTX_DEF); + ch->pm_level = 0; resource_int_value(device_get_name(dev), device_get_unit(dev), "pm_level", &ch->pm_level); STAILQ_INIT(&ch->doneq); From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 08:39:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1601869B; Fri, 12 Sep 2014 08:39: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 DC025D8C; Fri, 12 Sep 2014 08:39:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8C8dFUA082669; Fri, 12 Sep 2014 08:39:15 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8C8dFOZ082668; Fri, 12 Sep 2014 08:39:15 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409120839.s8C8dFOZ082668@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 12 Sep 2014 08:39:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271458 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 08:39:16 -0000 Author: glebius Date: Fri Sep 12 08:39:15 2014 New Revision: 271458 URL: http://svnweb.freebsd.org/changeset/base/271458 Log: - Provide a sleepable lock to protect against ioctl() vs ioctl() races. - Use the new lock to protect against simultaneous DIOCSTART and/or DIOCSTOP ioctls. Reported & tested by: jmallett Sponsored by: Nginx, Inc. Modified: head/sys/netpfil/pf/pf_ioctl.c Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Fri Sep 12 08:37:21 2014 (r271457) +++ head/sys/netpfil/pf/pf_ioctl.c Fri Sep 12 08:39:15 2014 (r271458) @@ -191,6 +191,7 @@ static volatile VNET_DEFINE(int, pf_pfil VNET_DEFINE(int, pf_end_threads); struct rwlock pf_rules_lock; +struct sx pf_ioctl_lock; /* pfsync */ pfsync_state_import_t *pfsync_state_import_ptr = NULL; @@ -1095,20 +1096,18 @@ pfioctl(struct cdev *dev, u_long cmd, ca switch (cmd) { case DIOCSTART: - PF_RULES_WLOCK(); + sx_xlock(&pf_ioctl_lock); if (V_pf_status.running) error = EEXIST; else { int cpu; - PF_RULES_WUNLOCK(); error = hook_pf(); if (error) { DPFPRINTF(PF_DEBUG_MISC, ("pf: pfil registration failed\n")); break; } - PF_RULES_WLOCK(); V_pf_status.running = 1; V_pf_status.since = time_second; @@ -1117,27 +1116,23 @@ pfioctl(struct cdev *dev, u_long cmd, ca DPFPRINTF(PF_DEBUG_MISC, ("pf: started\n")); } - PF_RULES_WUNLOCK(); break; case DIOCSTOP: - PF_RULES_WLOCK(); + sx_xlock(&pf_ioctl_lock); if (!V_pf_status.running) error = ENOENT; else { V_pf_status.running = 0; - PF_RULES_WUNLOCK(); error = dehook_pf(); if (error) { V_pf_status.running = 1; DPFPRINTF(PF_DEBUG_MISC, ("pf: pfil unregistration failed\n")); } - PF_RULES_WLOCK(); V_pf_status.since = time_second; DPFPRINTF(PF_DEBUG_MISC, ("pf: stopped\n")); } - PF_RULES_WUNLOCK(); break; case DIOCADDRULE: { @@ -3261,6 +3256,8 @@ DIOCCHANGEADDR_error: break; } fail: + if (sx_xlocked(&pf_ioctl_lock)) + sx_xunlock(&pf_ioctl_lock); CURVNET_RESTORE(); return (error); @@ -3734,6 +3731,7 @@ pf_load(void) VNET_LIST_RUNLOCK(); rw_init(&pf_rules_lock, "pf rulesets"); + sx_init(&pf_ioctl_lock, "pf ioctl"); pf_dev = make_dev(&pf_cdevsw, 0, 0, 0, 0600, PF_NAME); if ((error = pfattach()) != 0) @@ -3747,9 +3745,7 @@ pf_unload(void) { int error = 0; - PF_RULES_WLOCK(); V_pf_status.running = 0; - PF_RULES_WUNLOCK(); swi_remove(V_pf_swi_cookie); error = dehook_pf(); if (error) { @@ -3778,6 +3774,7 @@ pf_unload(void) PF_RULES_WUNLOCK(); destroy_dev(pf_dev); rw_destroy(&pf_rules_lock); + sx_destroy(&pf_ioctl_lock); return (error); } From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 09:50:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B12ABCEA; Fri, 12 Sep 2014 09:50:33 +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 82C05884; Fri, 12 Sep 2014 09:50:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8C9oXAQ021457; Fri, 12 Sep 2014 09:50:33 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8C9oWJp021452; Fri, 12 Sep 2014 09:50:32 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201409120950.s8C9oWJp021452@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 12 Sep 2014 09:50:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271459 - head/tools/regression/acltools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 09:50:33 -0000 Author: trasz Date: Fri Sep 12 09:50:32 2014 New Revision: 271459 URL: http://svnweb.freebsd.org/changeset/base/271459 Log: Fix ACL tests to correctly work with ZFS; previous version used wrong paths. PR: 191545 MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/tools/regression/acltools/01.t head/tools/regression/acltools/03.t head/tools/regression/acltools/04.t Modified: head/tools/regression/acltools/01.t ============================================================================== --- head/tools/regression/acltools/01.t Fri Sep 12 08:39:15 2014 (r271458) +++ head/tools/regression/acltools/01.t Fri Sep 12 09:50:32 2014 (r271459) @@ -51,7 +51,7 @@ TESTDIR=$(dirname $(realpath $0)) # Set up the test filesystem. MD=`mdconfig -at swap -s 64m` MNT=`mktemp -dt acltools` -zpool create -R $MNT acltools /dev/$MD +zpool create -m $MNT acltools /dev/$MD if [ $? -ne 0 ]; then echo "not ok 1 - 'zpool create' failed." exit 1 Modified: head/tools/regression/acltools/03.t ============================================================================== --- head/tools/regression/acltools/03.t Fri Sep 12 08:39:15 2014 (r271458) +++ head/tools/regression/acltools/03.t Fri Sep 12 09:50:32 2014 (r271459) @@ -48,7 +48,7 @@ MNTROOT=`mktemp -dt acltools` MD1=`mdconfig -at swap -s 64m` MNT1=$MNTROOT/nfs4 mkdir $MNT1 -zpool create -R $MNT1 acltools /dev/$MD1 +zpool create -m $MNT1 acltools /dev/$MD1 if [ $? -ne 0 ]; then echo "not ok 1 - 'zpool create' failed." exit 1 Modified: head/tools/regression/acltools/04.t ============================================================================== --- head/tools/regression/acltools/04.t Fri Sep 12 08:39:15 2014 (r271458) +++ head/tools/regression/acltools/04.t Fri Sep 12 09:50:32 2014 (r271459) @@ -43,7 +43,7 @@ TESTDIR=$(dirname $(realpath $0)) # Set up the test filesystem. MD=`mdconfig -at swap -s 64m` MNT=`mktemp -dt acltools` -zpool create -R $MNT acltools /dev/$MD +zpool create -m $MNT acltools /dev/$MD if [ $? -ne 0 ]; then echo "not ok 1 - 'zpool create' failed." exit 1 From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 12:04:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7ADE22BB; Fri, 12 Sep 2014 12:04: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 4C98F794; Fri, 12 Sep 2014 12:04: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 s8CC4qrS097047; Fri, 12 Sep 2014 12:04:52 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CC4pfR097043; Fri, 12 Sep 2014 12:04:51 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409121204.s8CC4pfR097043@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 12 Sep 2014 12:04:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271461 - in head/sys/dev: mvs siis X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 12:04:52 -0000 Author: mav Date: Fri Sep 12 12:04:51 2014 New Revision: 271461 URL: http://svnweb.freebsd.org/changeset/base/271461 Log: Initialize variables before resource_int_value(). Submitted by: Dmitry Luhtionov Modified: head/sys/dev/mvs/mvs.c head/sys/dev/mvs/mvs_pci.c head/sys/dev/mvs/mvs_soc.c head/sys/dev/siis/siis.c Modified: head/sys/dev/mvs/mvs.c ============================================================================== --- head/sys/dev/mvs/mvs.c Fri Sep 12 10:08:11 2014 (r271460) +++ head/sys/dev/mvs/mvs.c Fri Sep 12 12:04:51 2014 (r271461) @@ -122,6 +122,7 @@ mvs_ch_attach(device_t dev) ch->unit = (intptr_t)device_get_ivars(dev); ch->quirks = ctlr->quirks; mtx_init(&ch->mtx, "MVS channel lock", NULL, MTX_DEF); + ch->pm_level = 0; resource_int_value(device_get_name(dev), device_get_unit(dev), "pm_level", &ch->pm_level); if (ch->pm_level > 3) Modified: head/sys/dev/mvs/mvs_pci.c ============================================================================== --- head/sys/dev/mvs/mvs_pci.c Fri Sep 12 10:08:11 2014 (r271460) +++ head/sys/dev/mvs/mvs_pci.c Fri Sep 12 12:04:51 2014 (r271461) @@ -111,6 +111,7 @@ mvs_attach(device_t dev) i++; ctlr->channels = mvs_ids[i].ports; ctlr->quirks = mvs_ids[i].quirks; + ctlr->ccc = 0; resource_int_value(device_get_name(dev), device_get_unit(dev), "ccc", &ctlr->ccc); ctlr->cccc = 8; Modified: head/sys/dev/mvs/mvs_soc.c ============================================================================== --- head/sys/dev/mvs/mvs_soc.c Fri Sep 12 10:08:11 2014 (r271460) +++ head/sys/dev/mvs/mvs_soc.c Fri Sep 12 12:04:51 2014 (r271461) @@ -114,6 +114,7 @@ mvs_attach(device_t dev) i++; ctlr->channels = mvs_ids[i].ports; ctlr->quirks = mvs_ids[i].quirks; + ctlr->ccc = 0; resource_int_value(device_get_name(dev), device_get_unit(dev), "ccc", &ctlr->ccc); ctlr->cccc = 8; Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Fri Sep 12 10:08:11 2014 (r271460) +++ head/sys/dev/siis/siis.c Fri Sep 12 12:04:51 2014 (r271461) @@ -465,6 +465,7 @@ siis_ch_attach(device_t dev) ch->dev = dev; ch->unit = (intptr_t)device_get_ivars(dev); ch->quirks = ctlr->quirks; + ch->pm_level = 0; resource_int_value(device_get_name(dev), device_get_unit(dev), "pm_level", &ch->pm_level); resource_int_value(device_get_name(dev), From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 13:12:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBC7D4D9; Fri, 12 Sep 2014 13:12: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 C70A1DE7; Fri, 12 Sep 2014 13:12: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 s8CDC6Ps035378; Fri, 12 Sep 2014 13:12:06 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CDC6iA035377; Fri, 12 Sep 2014 13:12:06 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201409121312.s8CDC6iA035377@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 12 Sep 2014 13:12:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r271462 - svnadmin/hooks/scripts X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 13:12:07 -0000 Author: bdrewery Date: Fri Sep 12 13:12:06 2014 New Revision: 271462 URL: http://svnweb.freebsd.org/changeset/base/271462 Log: Fix URL for bz hook. Reported by: ngie Pointyhat to: bdrewery Modified: svnadmin/hooks/scripts/notify_bz.sh Modified: svnadmin/hooks/scripts/notify_bz.sh ============================================================================== --- svnadmin/hooks/scripts/notify_bz.sh Fri Sep 12 12:04:51 2014 (r271461) +++ svnadmin/hooks/scripts/notify_bz.sh Fri Sep 12 13:12:06 2014 (r271462) @@ -32,7 +32,7 @@ for pr in $PRS; do echo "Author: $WHO" echo "Date: $(date)" echo "New revision: $REV" - echo "URL: http://svnweb.freebsd.org/changeset/ports/$REV" + echo "URL: http://svnweb.freebsd.org/changeset/base/$REV" echo "" echo "Log:" svnlook log "$REPO" -r "$REV" | sed -e 's/^/ /' From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 14:07:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2AB3A1EB; Fri, 12 Sep 2014 14:07: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 15C793DA; Fri, 12 Sep 2014 14:07: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 s8CE7KpW060169; Fri, 12 Sep 2014 14:07:20 GMT (envelope-from ray@FreeBSD.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CE7KQV060166; Fri, 12 Sep 2014 14:07:20 GMT (envelope-from ray@FreeBSD.org) Message-Id: <201409121407.s8CE7KQV060166@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ray set sender to ray@FreeBSD.org using -f From: Aleksandr Rybalko Date: Fri, 12 Sep 2014 14:07:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271463 - in head/sys/dev/vt: . hw/ofwfb logo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 14:07:21 -0000 Author: ray Date: Fri Sep 12 14:07:20 2014 New Revision: 271463 URL: http://svnweb.freebsd.org/changeset/base/271463 Log: Remove stray whitespaces. Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c head/sys/dev/vt/logo/logo_freebsd.c head/sys/dev/vt/vt_consolectl.c Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- head/sys/dev/vt/hw/ofwfb/ofwfb.c Fri Sep 12 13:12:06 2014 (r271462) +++ head/sys/dev/vt/hw/ofwfb/ofwfb.c Fri Sep 12 14:07:20 2014 (r271463) @@ -53,7 +53,7 @@ struct ofwfb_softc { phandle_t sc_node; ihandle_t sc_handle; - bus_space_tag_t sc_memt; + bus_space_tag_t sc_memt; }; static vd_probe_t ofwfb_probe; Modified: head/sys/dev/vt/logo/logo_freebsd.c ============================================================================== --- head/sys/dev/vt/logo/logo_freebsd.c Fri Sep 12 13:12:06 2014 (r271462) +++ head/sys/dev/vt/logo/logo_freebsd.c Fri Sep 12 14:07:20 2014 (r271463) @@ -637,5 +637,5 @@ unsigned char vt_logo_image[] = { 0x1f, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, }; Modified: head/sys/dev/vt/vt_consolectl.c ============================================================================== --- head/sys/dev/vt/vt_consolectl.c Fri Sep 12 13:12:06 2014 (r271462) +++ head/sys/dev/vt/vt_consolectl.c Fri Sep 12 14:07:20 2014 (r271463) @@ -51,7 +51,7 @@ consolectl_ioctl(struct cdev *dev, u_lon { switch (cmd) { - case CONS_GETVERS: + case CONS_GETVERS: *(int*)data = 0x200; return 0; case CONS_MOUSECTL: { From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 14:14:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22BBC55E; Fri, 12 Sep 2014 14:14:51 +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 0389D6C1; Fri, 12 Sep 2014 14:14:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8CEEonU064615; Fri, 12 Sep 2014 14:14:50 GMT (envelope-from ray@FreeBSD.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CEEora064614; Fri, 12 Sep 2014 14:14:50 GMT (envelope-from ray@FreeBSD.org) Message-Id: <201409121414.s8CEEora064614@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ray set sender to ray@FreeBSD.org using -f From: Aleksandr Rybalko Date: Fri, 12 Sep 2014 14:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271464 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 14:14:51 -0000 Author: ray Date: Fri Sep 12 14:14:50 2014 New Revision: 271464 URL: http://svnweb.freebsd.org/changeset/base/271464 Log: Switch vt(4) to traditional behaviour with copy-paste same as syscons(4) do. Reviewed by: dumbbell (as D755) MFC after: 1 week Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Fri Sep 12 14:07:20 2014 (r271463) +++ head/sys/dev/vt/vt_core.c Fri Sep 12 14:14:50 2014 (r271464) @@ -162,6 +162,7 @@ static int vt_late_window_switch(struct static int vt_proc_alive(struct vt_window *); static void vt_resize(struct vt_device *); static void vt_update_static(void *); +static void vt_mouse_paste(); SET_DECLARE(vt_drv_set, struct vt_driver); @@ -176,10 +177,14 @@ static struct vt_device vt_consdev = { .vd_flags = VDF_INVALID, .vd_windows = { [VT_CONSWINDOW] = &vt_conswindow, }, .vd_curwindow = &vt_conswindow, - .vd_markedwin = NULL, .vd_kbstate = 0, #ifndef SC_NO_CUTPASTE + .vd_pastebuf = { + .vpb_buf = NULL, + .vpb_bufsz = 0, + .vpb_len = 0 + }, .vd_mcursor = &vt_default_mouse_pointer, .vd_mcursor_fg = TC_WHITE, .vd_mcursor_bg = TC_BLACK, @@ -508,7 +513,7 @@ vt_machine_kbdevent(int c) case SPCLKEY | PASTE: /* kbdmap(5) keyword `paste`. */ #ifndef SC_NO_CUTPASTE /* Insert text from cut-paste buffer. */ - /* TODO */ + vt_mouse_paste(); #endif break; case SPCLKEY | PDWN: /* kbdmap(5) keyword `pdwn`. */ @@ -1576,7 +1581,7 @@ vt_mouse_terminput_button(struct vt_devi mouseb[4] = '!' + x; mouseb[5] = '!' + y; - for (i = 0; i < sizeof(mouseb); i++ ) + for (i = 0; i < sizeof(mouseb); i++) terminal_input_char(vw->vw_terminal, mouseb[i]); } @@ -1614,6 +1619,23 @@ vt_mouse_terminput(struct vt_device *vd, } } +static void +vt_mouse_paste() +{ + term_char_t *buf; + int i, len; + + len = VD_PASTEBUFLEN(main_vd); + buf = VD_PASTEBUF(main_vd); + len /= sizeof(term_char_t); + for (i = 0; i < len; i++) { + if (buf[i] == '\0') + continue; + terminal_input_char(main_vd->vd_curwindow->vw_terminal, + buf[i]); + } +} + void vt_mouse_event(int type, int x, int y, int event, int cnt, int mlevel) { @@ -1621,8 +1643,7 @@ vt_mouse_event(int type, int x, int y, i struct vt_window *vw; struct vt_font *vf; term_pos_t size; - term_char_t *buf; - int i, len, mark; + int len, mark; vd = main_vd; vw = vd->vd_curwindow; @@ -1665,17 +1686,10 @@ vt_mouse_event(int type, int x, int y, i vd->vd_mx = x; vd->vd_my = y; - if ((vd->vd_mstate & MOUSE_BUTTON1DOWN) && - (vtbuf_set_mark(&vw->vw_buf, VTB_MARK_MOVE, - vd->vd_mx / vf->vf_width, - vd->vd_my / vf->vf_height) == 1)) { - - /* - * We have something marked to copy, so update pointer - * to window with selection. - */ - vd->vd_markedwin = vw; - } + if (vd->vd_mstate & MOUSE_BUTTON1DOWN) + vtbuf_set_mark(&vw->vw_buf, VTB_MARK_MOVE, + vd->vd_mx / vf->vf_width, + vd->vd_my / vf->vf_height); vt_resume_flush_timer(vw->vw_device, 0); return; /* Done */ @@ -1708,27 +1722,7 @@ vt_mouse_event(int type, int x, int y, i case 0: /* up */ break; default: - if (vd->vd_markedwin == NULL) - return; - /* Get current selecton size in bytes. */ - len = vtbuf_get_marked_len(&vd->vd_markedwin->vw_buf); - if (len <= 0) - return; - - buf = malloc(len, M_VT, M_WAITOK | M_ZERO); - /* Request copy/paste buffer data, no more than `len' */ - vtbuf_extract_marked(&vd->vd_markedwin->vw_buf, buf, - len); - - len /= sizeof(term_char_t); - for (i = 0; i < len; i++ ) { - if (buf[i] == '\0') - continue; - terminal_input_char(vw->vw_terminal, buf[i]); - } - - /* Done, so cleanup. */ - free(buf, M_VT); + vt_mouse_paste(); break; } return; /* Done */ @@ -1761,8 +1755,38 @@ vt_mouse_event(int type, int x, int y, i * We have something marked to copy, so update pointer to * window with selection. */ - vd->vd_markedwin = vw; vt_resume_flush_timer(vw->vw_device, 0); + + switch (mark) { + case VTB_MARK_END: + case VTB_MARK_WORD: + case VTB_MARK_ROW: + case VTB_MARK_EXTEND: + break; + default: + /* Other types of mark do not require to copy data. */ + return; + } + + /* Get current selection size in bytes. */ + len = vtbuf_get_marked_len(&vw->vw_buf); + if (len <= 0) + return; + + /* Reallocate buffer only if old one is too small. */ + if (len > VD_PASTEBUFSZ(vd)) { + VD_PASTEBUF(vd) = realloc(VD_PASTEBUF(vd), len, M_VT, + M_WAITOK | M_ZERO); + /* Update buffer size. */ + VD_PASTEBUFSZ(vd) = len; + } + /* Request copy/paste buffer data, no more than `len' */ + vtbuf_extract_marked(&vw->vw_buf, VD_PASTEBUF(vd), + VD_PASTEBUFSZ(vd)); + + VD_PASTEBUFLEN(vd) = len; + + /* XXX VD_PASTEBUF(vd) have to be freed on shutdown/unload. */ } } From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 14:16:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE3EC6C0; Fri, 12 Sep 2014 14:16:10 +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 9991A6D0; Fri, 12 Sep 2014 14:16:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8CEGAfq064899; Fri, 12 Sep 2014 14:16:10 GMT (envelope-from ray@FreeBSD.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CEGA5r064898; Fri, 12 Sep 2014 14:16:10 GMT (envelope-from ray@FreeBSD.org) Message-Id: <201409121416.s8CEGA5r064898@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ray set sender to ray@FreeBSD.org using -f From: Aleksandr Rybalko Date: Fri, 12 Sep 2014 14:16:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271465 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 14:16:10 -0000 Author: ray Date: Fri Sep 12 14:16:10 2014 New Revision: 271465 URL: http://svnweb.freebsd.org/changeset/base/271465 Log: Switch vt(4) to traditional behaviour with copy-paste same as syscons(4) do. (forgetted in last commit) Reviewed by: dumbbell (as D755) MFC after: 1 week Modified: head/sys/dev/vt/vt.h Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Fri Sep 12 14:14:50 2014 (r271464) +++ head/sys/dev/vt/vt.h Fri Sep 12 14:16:10 2014 (r271465) @@ -113,11 +113,17 @@ typedef unsigned int vt_axis_t; struct vt_mouse_cursor; #endif +struct vt_pastebuf { + term_char_t *vpb_buf; /* Copy-paste buffer. */ + unsigned int vpb_bufsz; /* Buffer size. */ + unsigned int vpb_len; /* Length of a last selection. */ +}; + struct vt_device { struct vt_window *vd_windows[VT_MAXWINDOWS]; /* (c) Windows. */ struct vt_window *vd_curwindow; /* (d) Current window. */ struct vt_window *vd_savedwindow;/* (?) Saved for suspend. */ - struct vt_window *vd_markedwin; /* (?) Copy/paste buf owner. */ + struct vt_pastebuf vd_pastebuf; /* (?) Copy/paste buf. */ const struct vt_driver *vd_driver; /* (c) Graphics driver. */ void *vd_softc; /* (u) Driver data. */ #ifndef SC_NO_CUTPASTE @@ -151,6 +157,10 @@ struct vt_device { unsigned int vd_unit; /* (c) Device unit. */ }; +#define VD_PASTEBUF(vd) ((vd)->vd_pastebuf.vpb_buf) +#define VD_PASTEBUFSZ(vd) ((vd)->vd_pastebuf.vpb_bufsz) +#define VD_PASTEBUFLEN(vd) ((vd)->vd_pastebuf.vpb_len) + /* * Per-window terminal screen buffer. * From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 14:17:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50296907; Fri, 12 Sep 2014 14:17:10 +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 3BF356E5; Fri, 12 Sep 2014 14:17:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8CEHAV8065185; Fri, 12 Sep 2014 14:17:10 GMT (envelope-from ray@FreeBSD.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CEHAjq065184; Fri, 12 Sep 2014 14:17:10 GMT (envelope-from ray@FreeBSD.org) Message-Id: <201409121417.s8CEHAjq065184@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ray set sender to ray@FreeBSD.org using -f From: Aleksandr Rybalko Date: Fri, 12 Sep 2014 14:17:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271466 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 14:17:10 -0000 Author: ray Date: Fri Sep 12 14:17:09 2014 New Revision: 271466 URL: http://svnweb.freebsd.org/changeset/base/271466 Log: Fix stray char on paste. Tested by: dumbbell and me MFC after: 1 week Modified: head/sys/dev/vt/vt_buf.c Modified: head/sys/dev/vt/vt_buf.c ============================================================================== --- head/sys/dev/vt/vt_buf.c Fri Sep 12 14:16:10 2014 (r271465) +++ head/sys/dev/vt/vt_buf.c Fri Sep 12 14:17:09 2014 (r271466) @@ -603,7 +603,7 @@ vtbuf_get_marked_len(struct vt_buf *vb) ei = e.tp_row * vb->vb_scr_size.tp_col + e.tp_col; /* Number symbols and number of rows to inject \n */ - sz = ei - si + ((e.tp_row - s.tp_row) * 2) + 1; + sz = ei - si + ((e.tp_row - s.tp_row) * 2); return (sz * sizeof(term_char_t)); } From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 15:49:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 523C32E6; Fri, 12 Sep 2014 15:49:22 +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 24179A7; Fri, 12 Sep 2014 15:49:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8CFnMYS007744; Fri, 12 Sep 2014 15:49:22 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CFnMwc007743; Fri, 12 Sep 2014 15:49:22 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201409121549.s8CFnMwc007743@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 12 Sep 2014 15:49:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271467 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 15:49:22 -0000 Author: pfg Date: Fri Sep 12 15:49:21 2014 New Revision: 271467 URL: http://svnweb.freebsd.org/changeset/base/271467 Log: ext2fs: add ext2_getpages(). Literally copy/pasted from ffs_getpages(). Tested with: fsx MFC after: 2 months Modified: head/sys/fs/ext2fs/ext2_vnops.c Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Fri Sep 12 14:17:09 2014 (r271466) +++ head/sys/fs/ext2fs/ext2_vnops.c Fri Sep 12 15:49:21 2014 (r271467) @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -65,9 +66,11 @@ #include #include -#include -#include +#include #include +#include +#include +#include #include #include "opt_directio.h" @@ -94,6 +97,7 @@ static int ext2_chown(struct vnode *, ui static vop_close_t ext2_close; static vop_create_t ext2_create; static vop_fsync_t ext2_fsync; +static vop_getpages_t ext2_getpages; static vop_getattr_t ext2_getattr; static vop_ioctl_t ext2_ioctl; static vop_link_t ext2_link; @@ -124,6 +128,7 @@ struct vop_vector ext2_vnodeops = { .vop_close = ext2_close, .vop_create = ext2_create, .vop_fsync = ext2_fsync, + .vop_getpages = ext2_getpages, .vop_getattr = ext2_getattr, .vop_inactive = ext2_inactive, .vop_ioctl = ext2_ioctl, @@ -2058,3 +2063,43 @@ ext2_write(struct vop_write_args *ap) } return (error); } + +/* + * get page routine + */ +static int +ext2_getpages( struct vop_getpages_args *ap) +{ + int i; + vm_page_t mreq; + int pcount; + + pcount = round_page(ap->a_count) / PAGE_SIZE; + mreq = ap->a_m[ap->a_reqpage]; + + /* + * if ANY DEV_BSIZE blocks are valid on a large filesystem block, + * then the entire page is valid. Since the page may be mapped, + * user programs might reference data beyond the actual end of file + * occuring within the page. We have to zero that data. + */ + VM_OBJECT_WLOCK(mreq->object); + if (mreq->valid) { + if (mreq->valid != VM_PAGE_BITS_ALL) + vm_page_zero_invalid(mreq, TRUE); + for (i = 0; i < pcount; i++) { + if (i != ap->a_reqpage) { + vm_page_lock(ap->a_m[i]); + vm_page_free(ap->a_m[i]); + vm_page_unlock(ap->a_m[i]); + } + } + VM_OBJECT_WUNLOCK(mreq->object); + return VM_PAGER_OK; + } + VM_OBJECT_WUNLOCK(mreq->object); + + return vnode_pager_generic_getpages(ap->a_vp, ap->a_m, + ap->a_count, + ap->a_reqpage); +} From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 15:54:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F51A613; Fri, 12 Sep 2014 15:54:19 +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 1AD1218A; Fri, 12 Sep 2014 15:54: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 s8CFsIZZ011697; Fri, 12 Sep 2014 15:54:18 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CFsISg011696; Fri, 12 Sep 2014 15:54:18 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201409121554.s8CFsISg011696@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 12 Sep 2014 15:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271468 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 15:54:19 -0000 Author: pfg Date: Fri Sep 12 15:54:18 2014 New Revision: 271468 URL: http://svnweb.freebsd.org/changeset/base/271468 Log: Extra space from r271467. MFC after: 2 months Modified: head/sys/fs/ext2fs/ext2_vnops.c Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Fri Sep 12 15:49:21 2014 (r271467) +++ head/sys/fs/ext2fs/ext2_vnops.c Fri Sep 12 15:54:18 2014 (r271468) @@ -2068,7 +2068,7 @@ ext2_write(struct vop_write_args *ap) * get page routine */ static int -ext2_getpages( struct vop_getpages_args *ap) +ext2_getpages(struct vop_getpages_args *ap) { int i; vm_page_t mreq; From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 16:22:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1ED01640; Fri, 12 Sep 2014 16:22:04 +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 F27487AE; Fri, 12 Sep 2014 16:22:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8CGM3xB026690; Fri, 12 Sep 2014 16:22:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CGM2kC026674; Fri, 12 Sep 2014 16:22:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409121622.s8CGM2kC026674@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 12 Sep 2014 16:22: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: r271469 - in stable/10/libexec/rtld-elf: . amd64 arm i386 ia64 mips powerpc powerpc64 sparc64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 16:22:04 -0000 Author: kib Date: Fri Sep 12 16:22:01 2014 New Revision: 271469 URL: http://svnweb.freebsd.org/changeset/base/271469 Log: MFC r270798: Process STT_GNU_IFUNC when doing non-plt relocations. MFC r270802: Only do the second pass over non-plt relocations when the first pass found IFUNCs. Approved by: re (gjb) Modified: stable/10/libexec/rtld-elf/amd64/reloc.c stable/10/libexec/rtld-elf/arm/reloc.c stable/10/libexec/rtld-elf/i386/reloc.c stable/10/libexec/rtld-elf/ia64/reloc.c stable/10/libexec/rtld-elf/mips/reloc.c stable/10/libexec/rtld-elf/powerpc/reloc.c stable/10/libexec/rtld-elf/powerpc64/reloc.c stable/10/libexec/rtld-elf/rtld.c stable/10/libexec/rtld-elf/rtld.h stable/10/libexec/rtld-elf/sparc64/reloc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/rtld-elf/amd64/reloc.c ============================================================================== --- stable/10/libexec/rtld-elf/amd64/reloc.c Fri Sep 12 15:54:18 2014 (r271468) +++ stable/10/libexec/rtld-elf/amd64/reloc.c Fri Sep 12 16:22:01 2014 (r271469) @@ -125,213 +125,188 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry const Elf_Rela *relalim; const Elf_Rela *rela; SymCache *cache; - int r = -1; + const Elf_Sym *def; + const Obj_Entry *defobj; + Elf_Addr *where, symval; + Elf32_Addr *where32; + int r; + r = -1; /* * The dynamic loader may be called from a thread, we have * limited amounts of stack available so we cannot use alloca(). */ if (obj != obj_rtld) { - cache = calloc(obj->dynsymcount, sizeof(SymCache)); - /* No need to check for NULL here */ + cache = calloc(obj->dynsymcount, sizeof(SymCache)); + /* No need to check for NULL here */ } else - cache = NULL; + cache = NULL; - relalim = (const Elf_Rela *) ((caddr_t) obj->rela + obj->relasize); + relalim = (const Elf_Rela *)((caddr_t)obj->rela + obj->relasize); for (rela = obj->rela; rela < relalim; rela++) { - Elf_Addr *where = (Elf_Addr *) (obj->relocbase + rela->r_offset); - Elf32_Addr *where32 = (Elf32_Addr *)where; - - switch (ELF_R_TYPE(rela->r_info)) { - - case R_X86_64_NONE: - break; - - case R_X86_64_64: - { - const Elf_Sym *def; - const Obj_Entry *defobj; - - def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - flags, cache, lockstate); - if (def == NULL) - goto done; - - *where = (Elf_Addr) (defobj->relocbase + def->st_value + rela->r_addend); - } - break; - - case R_X86_64_PC32: - /* - * I don't think the dynamic linker should ever see this - * type of relocation. But the binutils-2.6 tools sometimes - * generate it. - */ - { - const Elf_Sym *def; - const Obj_Entry *defobj; - - def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - flags, cache, lockstate); - if (def == NULL) - goto done; - - *where32 = (Elf32_Addr) (unsigned long) (defobj->relocbase + - def->st_value + rela->r_addend - (Elf_Addr) where); - } - break; - /* missing: R_X86_64_GOT32 R_X86_64_PLT32 */ - - case R_X86_64_COPY: /* - * These are deferred until all other relocations have - * been done. All we do here is make sure that the COPY - * relocation is not in a shared library. They are allowed - * only in executable files. + * First, resolve symbol for relocations which + * reference symbols. */ - if (!obj->mainprog) { - _rtld_error("%s: Unexpected R_X86_64_COPY relocation" - " in shared library", obj->path); - goto done; - } - break; - - case R_X86_64_GLOB_DAT: - { - const Elf_Sym *def; - const Obj_Entry *defobj; - - def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - flags, cache, lockstate); - if (def == NULL) - goto done; - - *where = (Elf_Addr) (defobj->relocbase + def->st_value); - } - break; - - case R_X86_64_TPOFF64: - { - const Elf_Sym *def; - const Obj_Entry *defobj; - - def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - flags, cache, lockstate); - if (def == NULL) - goto done; - - /* - * We lazily allocate offsets for static TLS as we - * see the first relocation that references the - * TLS block. This allows us to support (small - * amounts of) static TLS in dynamically loaded - * modules. If we run out of space, we generate an - * error. - */ - if (!defobj->tls_done) { - if (!allocate_tls_offset((Obj_Entry*) defobj)) { - _rtld_error("%s: No space available for static " - "Thread Local Storage", obj->path); - goto done; + switch (ELF_R_TYPE(rela->r_info)) { + case R_X86_64_64: + case R_X86_64_PC32: + case R_X86_64_GLOB_DAT: + case R_X86_64_TPOFF64: + case R_X86_64_TPOFF32: + case R_X86_64_DTPMOD64: + case R_X86_64_DTPOFF64: + case R_X86_64_DTPOFF32: + def = find_symdef(ELF_R_SYM(rela->r_info), obj, + &defobj, flags, cache, lockstate); + if (def == NULL) + goto done; + /* + * If symbol is IFUNC, only perform relocation + * when caller allowed it by passing + * SYMLOOK_IFUNC flag. Skip the relocations + * otherwise. + * + * Also error out in case IFUNC relocations + * are specified for TLS, which cannot be + * usefully interpreted. + */ + if (ELF_ST_TYPE(def->st_info) == STT_GNU_IFUNC) { + switch (ELF_R_TYPE(rela->r_info)) { + case R_X86_64_64: + case R_X86_64_PC32: + case R_X86_64_GLOB_DAT: + if ((flags & SYMLOOK_IFUNC) == 0) { + obj->non_plt_gnu_ifunc = true; + continue; + } + symval = (Elf_Addr)rtld_resolve_ifunc( + defobj, def); + break; + case R_X86_64_TPOFF64: + case R_X86_64_TPOFF32: + case R_X86_64_DTPMOD64: + case R_X86_64_DTPOFF64: + case R_X86_64_DTPOFF32: + _rtld_error("%s: IFUNC for TLS reloc", + obj->path); + goto done; + } + } else { + if ((flags & SYMLOOK_IFUNC) != 0) + continue; + symval = (Elf_Addr)defobj->relocbase + + def->st_value; } - } - - *where = (Elf_Addr) (def->st_value - defobj->tlsoffset + - rela->r_addend); + break; + default: + if ((flags & SYMLOOK_IFUNC) != 0) + continue; + break; } - break; - - case R_X86_64_TPOFF32: - { - const Elf_Sym *def; - const Obj_Entry *defobj; - - def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - flags, cache, lockstate); - if (def == NULL) - goto done; + where = (Elf_Addr *)(obj->relocbase + rela->r_offset); + where32 = (Elf32_Addr *)where; - /* - * We lazily allocate offsets for static TLS as we - * see the first relocation that references the - * TLS block. This allows us to support (small - * amounts of) static TLS in dynamically loaded - * modules. If we run out of space, we generate an - * error. - */ - if (!defobj->tls_done) { - if (!allocate_tls_offset((Obj_Entry*) defobj)) { - _rtld_error("%s: No space available for static " - "Thread Local Storage", obj->path); - goto done; + switch (ELF_R_TYPE(rela->r_info)) { + case R_X86_64_NONE: + break; + case R_X86_64_64: + *where = symval + rela->r_addend; + break; + case R_X86_64_PC32: + /* + * I don't think the dynamic linker should + * ever see this type of relocation. But the + * binutils-2.6 tools sometimes generate it. + */ + *where32 = (Elf32_Addr)(unsigned long)(symval + + rela->r_addend - (Elf_Addr)where); + break; + /* missing: R_X86_64_GOT32 R_X86_64_PLT32 */ + case R_X86_64_COPY: + /* + * These are deferred until all other relocations have + * been done. All we do here is make sure that the COPY + * relocation is not in a shared library. They are allowed + * only in executable files. + */ + if (!obj->mainprog) { + _rtld_error("%s: Unexpected R_X86_64_COPY " + "relocation in shared library", obj->path); + goto done; } - } - - *where32 = (Elf32_Addr) (def->st_value - - defobj->tlsoffset + - rela->r_addend); - } - break; - - case R_X86_64_DTPMOD64: - { - const Elf_Sym *def; - const Obj_Entry *defobj; - - def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - flags, cache, lockstate); - if (def == NULL) - goto done; - - *where += (Elf_Addr) defobj->tlsindex; - } - break; - - case R_X86_64_DTPOFF64: - { - const Elf_Sym *def; - const Obj_Entry *defobj; - - def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - flags, cache, lockstate); - if (def == NULL) - goto done; - - *where += (Elf_Addr) (def->st_value + rela->r_addend); - } - break; - - case R_X86_64_DTPOFF32: - { - const Elf_Sym *def; - const Obj_Entry *defobj; - - def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - flags, cache, lockstate); - if (def == NULL) + break; + case R_X86_64_GLOB_DAT: + *where = symval; + break; + case R_X86_64_TPOFF64: + /* + * We lazily allocate offsets for static TLS + * as we see the first relocation that + * references the TLS block. This allows us to + * support (small amounts of) static TLS in + * dynamically loaded modules. If we run out + * of space, we generate an error. + */ + if (!defobj->tls_done) { + if (!allocate_tls_offset((Obj_Entry*) defobj)) { + _rtld_error("%s: No space available " + "for static Thread Local Storage", + obj->path); + goto done; + } + } + *where = (Elf_Addr)(def->st_value - defobj->tlsoffset + + rela->r_addend); + break; + case R_X86_64_TPOFF32: + /* + * We lazily allocate offsets for static TLS + * as we see the first relocation that + * references the TLS block. This allows us to + * support (small amounts of) static TLS in + * dynamically loaded modules. If we run out + * of space, we generate an error. + */ + if (!defobj->tls_done) { + if (!allocate_tls_offset((Obj_Entry*) defobj)) { + _rtld_error("%s: No space available " + "for static Thread Local Storage", + obj->path); + goto done; + } + } + *where32 = (Elf32_Addr)(def->st_value - + defobj->tlsoffset + rela->r_addend); + break; + case R_X86_64_DTPMOD64: + *where += (Elf_Addr)defobj->tlsindex; + break; + case R_X86_64_DTPOFF64: + *where += (Elf_Addr)(def->st_value + rela->r_addend); + break; + case R_X86_64_DTPOFF32: + *where32 += (Elf32_Addr)(def->st_value + + rela->r_addend); + break; + case R_X86_64_RELATIVE: + *where = (Elf_Addr)(obj->relocbase + rela->r_addend); + break; + /* + * missing: + * R_X86_64_GOTPCREL, R_X86_64_32, R_X86_64_32S, R_X86_64_16, + * R_X86_64_PC16, R_X86_64_8, R_X86_64_PC8 + */ + default: + _rtld_error("%s: Unsupported relocation type %u" + " in non-PLT relocations\n", obj->path, + (unsigned int)ELF_R_TYPE(rela->r_info)); goto done; - - *where32 += (Elf32_Addr) (def->st_value + rela->r_addend); } - break; - - case R_X86_64_RELATIVE: - *where = (Elf_Addr)(obj->relocbase + rela->r_addend); - break; - - /* missing: R_X86_64_GOTPCREL, R_X86_64_32, R_X86_64_32S, R_X86_64_16, R_X86_64_PC16, R_X86_64_8, R_X86_64_PC8 */ - - default: - _rtld_error("%s: Unsupported relocation type %u" - " in non-PLT relocations\n", obj->path, - (unsigned int)ELF_R_TYPE(rela->r_info)); - goto done; - } } r = 0; done: - if (cache != NULL) - free(cache); + free(cache); return (r); } Modified: stable/10/libexec/rtld-elf/arm/reloc.c ============================================================================== --- stable/10/libexec/rtld-elf/arm/reloc.c Fri Sep 12 15:54:18 2014 (r271468) +++ stable/10/libexec/rtld-elf/arm/reloc.c Fri Sep 12 16:22:01 2014 (r271469) @@ -324,6 +324,10 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry /* The relocation for the dynamic loader has already been done. */ if (obj == obj_rtld) return (0); + if ((flags & SYMLOOK_IFUNC) != 0) + /* XXX not implemented */ + return (0); + /* * The dynamic loader may be called from a thread, we have * limited amounts of stack available so we cannot use alloca(). Modified: stable/10/libexec/rtld-elf/i386/reloc.c ============================================================================== --- stable/10/libexec/rtld-elf/i386/reloc.c Fri Sep 12 15:54:18 2014 (r271468) +++ stable/10/libexec/rtld-elf/i386/reloc.c Fri Sep 12 16:22:01 2014 (r271469) @@ -126,168 +126,144 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry const Elf_Rel *rellim; const Elf_Rel *rel; SymCache *cache; - int r = -1; + const Elf_Sym *def; + const Obj_Entry *defobj; + Elf_Addr *where, symval, add; + int r; + r = -1; /* * The dynamic loader may be called from a thread, we have * limited amounts of stack available so we cannot use alloca(). */ if (obj != obj_rtld) { - cache = calloc(obj->dynsymcount, sizeof(SymCache)); - /* No need to check for NULL here */ + cache = calloc(obj->dynsymcount, sizeof(SymCache)); + /* No need to check for NULL here */ } else - cache = NULL; + cache = NULL; - rellim = (const Elf_Rel *) ((caddr_t) obj->rel + obj->relsize); + rellim = (const Elf_Rel *)((caddr_t) obj->rel + obj->relsize); for (rel = obj->rel; rel < rellim; rel++) { - Elf_Addr *where = (Elf_Addr *) (obj->relocbase + rel->r_offset); - - switch (ELF_R_TYPE(rel->r_info)) { - - case R_386_NONE: - break; - - case R_386_32: - { - const Elf_Sym *def; - const Obj_Entry *defobj; - - def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, - flags, cache, lockstate); - if (def == NULL) - goto done; - - *where += (Elf_Addr) (defobj->relocbase + def->st_value); - } - break; - - case R_386_PC32: - /* - * I don't think the dynamic linker should ever see this - * type of relocation. But the binutils-2.6 tools sometimes - * generate it. - */ - { - const Elf_Sym *def; - const Obj_Entry *defobj; - - def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, - flags, cache, lockstate); - if (def == NULL) - goto done; - - *where += - (Elf_Addr) (defobj->relocbase + def->st_value) - - (Elf_Addr) where; - } - break; - - case R_386_COPY: - /* - * These are deferred until all other relocations have - * been done. All we do here is make sure that the COPY - * relocation is not in a shared library. They are allowed - * only in executable files. - */ - if (!obj->mainprog) { - _rtld_error("%s: Unexpected R_386_COPY relocation" - " in shared library", obj->path); - goto done; - } - break; - - case R_386_GLOB_DAT: - { - const Elf_Sym *def; - const Obj_Entry *defobj; - - def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, - flags, cache, lockstate); - if (def == NULL) - goto done; - - *where = (Elf_Addr) (defobj->relocbase + def->st_value); + switch (ELF_R_TYPE(rel->r_info)) { + case R_386_32: + case R_386_PC32: + case R_386_GLOB_DAT: + case R_386_TLS_TPOFF: + case R_386_TLS_TPOFF32: + case R_386_TLS_DTPMOD32: + case R_386_TLS_DTPOFF32: + def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, + flags, cache, lockstate); + if (def == NULL) + goto done; + if (ELF_ST_TYPE(def->st_info) == STT_GNU_IFUNC) { + switch (ELF_R_TYPE(rel->r_info)) { + case R_386_32: + case R_386_PC32: + case R_386_GLOB_DAT: + if ((flags & SYMLOOK_IFUNC) == 0) { + obj->non_plt_gnu_ifunc = true; + continue; + } + symval = (Elf_Addr)rtld_resolve_ifunc( + defobj, def); + break; + case R_386_TLS_TPOFF: + case R_386_TLS_TPOFF32: + case R_386_TLS_DTPMOD32: + case R_386_TLS_DTPOFF32: + _rtld_error("%s: IFUNC for TLS reloc", + obj->path); + goto done; + } + } else { + if ((flags & SYMLOOK_IFUNC) != 0) + continue; + symval = (Elf_Addr)defobj->relocbase + + def->st_value; + } + break; + default: + if ((flags & SYMLOOK_IFUNC) != 0) + continue; + break; } - break; - - case R_386_RELATIVE: - *where += (Elf_Addr) obj->relocbase; - break; - - case R_386_TLS_TPOFF: - case R_386_TLS_TPOFF32: - { - const Elf_Sym *def; - const Obj_Entry *defobj; - Elf_Addr add; - - def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, - flags, cache, lockstate); - if (def == NULL) - goto done; + where = (Elf_Addr *)(obj->relocbase + rel->r_offset); + switch (ELF_R_TYPE(rel->r_info)) { + case R_386_NONE: + break; + case R_386_32: + *where += symval; + break; + case R_386_PC32: /* - * We lazily allocate offsets for static TLS as we - * see the first relocation that references the - * TLS block. This allows us to support (small - * amounts of) static TLS in dynamically loaded - * modules. If we run out of space, we generate an - * error. + * I don't think the dynamic linker should ever + * see this type of relocation. But the + * binutils-2.6 tools sometimes generate it. */ - if (!defobj->tls_done) { - if (!allocate_tls_offset((Obj_Entry*) defobj)) { - _rtld_error("%s: No space available for static " - "Thread Local Storage", obj->path); - goto done; + *where += symval - (Elf_Addr)where; + break; + case R_386_COPY: + /* + * These are deferred until all other + * relocations have been done. All we do here + * is make sure that the COPY relocation is + * not in a shared library. They are allowed + * only in executable files. + */ + if (!obj->mainprog) { + _rtld_error("%s: Unexpected R_386_COPY " + "relocation in shared library", obj->path); + goto done; } - } - add = (Elf_Addr) (def->st_value - defobj->tlsoffset); - if (ELF_R_TYPE(rel->r_info) == R_386_TLS_TPOFF) - *where += add; - else - *where -= add; - } - break; - - case R_386_TLS_DTPMOD32: - { - const Elf_Sym *def; - const Obj_Entry *defobj; - - def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, - flags, cache, lockstate); - if (def == NULL) - goto done; - - *where += (Elf_Addr) defobj->tlsindex; - } - break; - - case R_386_TLS_DTPOFF32: - { - const Elf_Sym *def; - const Obj_Entry *defobj; - - def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, - flags, cache, lockstate); - if (def == NULL) + break; + case R_386_GLOB_DAT: + *where = symval; + break; + case R_386_RELATIVE: + *where += (Elf_Addr)obj->relocbase; + break; + case R_386_TLS_TPOFF: + case R_386_TLS_TPOFF32: + /* + * We lazily allocate offsets for static TLS + * as we see the first relocation that + * references the TLS block. This allows us to + * support (small amounts of) static TLS in + * dynamically loaded modules. If we run out + * of space, we generate an error. + */ + if (!defobj->tls_done) { + if (!allocate_tls_offset((Obj_Entry*) defobj)) { + _rtld_error("%s: No space available " + "for static Thread Local Storage", + obj->path); + goto done; + } + } + add = (Elf_Addr)(def->st_value - defobj->tlsoffset); + if (ELF_R_TYPE(rel->r_info) == R_386_TLS_TPOFF) + *where += add; + else + *where -= add; + break; + case R_386_TLS_DTPMOD32: + *where += (Elf_Addr)defobj->tlsindex; + break; + case R_386_TLS_DTPOFF32: + *where += (Elf_Addr) def->st_value; + break; + default: + _rtld_error("%s: Unsupported relocation type %d" + " in non-PLT relocations\n", obj->path, + ELF_R_TYPE(rel->r_info)); goto done; - - *where += (Elf_Addr) def->st_value; } - break; - - default: - _rtld_error("%s: Unsupported relocation type %d" - " in non-PLT relocations\n", obj->path, - ELF_R_TYPE(rel->r_info)); - goto done; - } } r = 0; done: - if (cache != NULL) - free(cache); + free(cache); return (r); } Modified: stable/10/libexec/rtld-elf/ia64/reloc.c ============================================================================== --- stable/10/libexec/rtld-elf/ia64/reloc.c Fri Sep 12 15:54:18 2014 (r271468) +++ stable/10/libexec/rtld-elf/ia64/reloc.c Fri Sep 12 16:22:01 2014 (r271469) @@ -351,6 +351,10 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry int bytes = obj->dynsymcount * sizeof(SymCache); int r = -1; + if ((flags & SYMLOOK_IFUNC) != 0) + /* XXX not implemented */ + return (0); + /* * The dynamic loader may be called from a thread, we have * limited amounts of stack available so we cannot use alloca(). Modified: stable/10/libexec/rtld-elf/mips/reloc.c ============================================================================== --- stable/10/libexec/rtld-elf/mips/reloc.c Fri Sep 12 15:54:18 2014 (r271468) +++ stable/10/libexec/rtld-elf/mips/reloc.c Fri Sep 12 16:22:01 2014 (r271469) @@ -275,6 +275,10 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry if (obj == obj_rtld) return (0); + if ((flags & SYMLOOK_IFUNC) != 0) + /* XXX not implemented */ + return (0); + #ifdef SUPPORT_OLD_BROKEN_LD broken = 0; sym = obj->symtab; Modified: stable/10/libexec/rtld-elf/powerpc/reloc.c ============================================================================== --- stable/10/libexec/rtld-elf/powerpc/reloc.c Fri Sep 12 15:54:18 2014 (r271468) +++ stable/10/libexec/rtld-elf/powerpc/reloc.c Fri Sep 12 16:22:01 2014 (r271469) @@ -294,6 +294,10 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry SymCache *cache; int r = -1; + if ((flags & SYMLOOK_IFUNC) != 0) + /* XXX not implemented */ + return (0); + /* * The dynamic loader may be called from a thread, we have * limited amounts of stack available so we cannot use alloca(). Modified: stable/10/libexec/rtld-elf/powerpc64/reloc.c ============================================================================== --- stable/10/libexec/rtld-elf/powerpc64/reloc.c Fri Sep 12 15:54:18 2014 (r271468) +++ stable/10/libexec/rtld-elf/powerpc64/reloc.c Fri Sep 12 16:22:01 2014 (r271469) @@ -290,6 +290,10 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry int bytes = obj->dynsymcount * sizeof(SymCache); int r = -1; + if ((flags & SYMLOOK_IFUNC) != 0) + /* XXX not implemented */ + return (0); + /* * The dynamic loader may be called from a thread, we have * limited amounts of stack available so we cannot use alloca(). Modified: stable/10/libexec/rtld-elf/rtld.c ============================================================================== --- stable/10/libexec/rtld-elf/rtld.c Fri Sep 12 15:54:18 2014 (r271468) +++ stable/10/libexec/rtld-elf/rtld.c Fri Sep 12 16:22:01 2014 (r271469) @@ -2475,7 +2475,7 @@ relocate_object(Obj_Entry *obj, bool bin } } - /* Process the non-PLT relocations. */ + /* Process the non-PLT non-IFUNC relocations. */ if (reloc_non_plt(obj, rtldobj, flags, lockstate)) return (-1); @@ -2488,7 +2488,6 @@ relocate_object(Obj_Entry *obj, bool bin } } - /* Set the special PLT or GOT entries. */ init_pltgot(obj); @@ -2500,6 +2499,16 @@ relocate_object(Obj_Entry *obj, bool bin if (reloc_jmpslots(obj, flags, lockstate) == -1) return (-1); + /* + * Process the non-PLT IFUNC relocations. The relocations are + * processed in two phases, because IFUNC resolvers may + * reference other symbols, which must be readily processed + * before resolvers are called. + */ + if (obj->non_plt_gnu_ifunc && + reloc_non_plt(obj, rtldobj, flags | SYMLOOK_IFUNC, lockstate)) + return (-1); + if (obj->relro_size > 0) { if (mprotect(obj->relro_page, obj->relro_size, PROT_READ) == -1) { Modified: stable/10/libexec/rtld-elf/rtld.h ============================================================================== --- stable/10/libexec/rtld-elf/rtld.h Fri Sep 12 15:54:18 2014 (r271468) +++ stable/10/libexec/rtld-elf/rtld.h Fri Sep 12 16:22:01 2014 (r271469) @@ -268,6 +268,7 @@ typedef struct Struct_Obj_Entry { bool filtees_loaded : 1; /* Filtees loaded */ bool irelative : 1; /* Object has R_MACHDEP_IRELATIVE relocs */ bool gnu_ifunc : 1; /* Object has references to STT_GNU_IFUNC */ + bool non_plt_gnu_ifunc : 1; /* Object has non-plt IFUNC references */ bool crt_no_init : 1; /* Object' crt does not call _init/_fini */ bool valid_hash_sysv : 1; /* A valid System V hash hash tag is available */ bool valid_hash_gnu : 1; /* A valid GNU hash tag is available */ @@ -290,6 +291,8 @@ typedef struct Struct_Obj_Entry { #define SYMLOOK_DLSYM 0x02 /* Return newest versioned symbol. Used by dlsym. */ #define SYMLOOK_EARLY 0x04 /* Symlook is done during initialization. */ +#define SYMLOOK_IFUNC 0x08 /* Allow IFUNC processing in + reloc_non_plt(). */ /* Flags for load_object(). */ #define RTLD_LO_NOLOAD 0x01 /* dlopen() specified RTLD_NOLOAD. */ Modified: stable/10/libexec/rtld-elf/sparc64/reloc.c ============================================================================== --- stable/10/libexec/rtld-elf/sparc64/reloc.c Fri Sep 12 15:54:18 2014 (r271468) +++ stable/10/libexec/rtld-elf/sparc64/reloc.c Fri Sep 12 16:22:01 2014 (r271469) @@ -300,6 +300,10 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry SymCache *cache; int r = -1; + if ((flags & SYMLOOK_IFUNC) != 0) + /* XXX not implemented */ + return (0); + /* * The dynamic loader may be called from a thread, we have * limited amounts of stack available so we cannot use alloca(). From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 16:37:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72B42E67; Fri, 12 Sep 2014 16:37:57 +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 5CB2F91B; Fri, 12 Sep 2014 16:37:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8CGbv96032513; Fri, 12 Sep 2014 16:37:57 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CGbvmJ032512; Fri, 12 Sep 2014 16:37:57 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409121637.s8CGbvmJ032512@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 12 Sep 2014 16:37: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: r271470 - stable/10/release/amd64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 16:37:57 -0000 Author: emaste Date: Fri Sep 12 16:37:56 2014 New Revision: 271470 URL: http://svnweb.freebsd.org/changeset/base/271470 Log: MFC r264995 (nwhitehorn): Add script to setup bootable CD ISOs for both BIOS and EFI systems. Tested and working on QEMU. Actually using this script as the regular image generator, like with the memstick one, will require that the kernel support EFI too. In particular, the following two things are required: 1. vt(9) be the default console driver 2. vt_efifb and vt_vga be able to coexist usefully in the same kernel One other note here is that this requires newfs_msdos and mdconfig, which is really ugly. NetBSD's makefs at least seems to support FAT now. If that actually works, it should be imported and we can get rid of the mdconfig mess. Approved by: re Relnotes: Yes Sponsored by: The FreeBSD Foundation Added: stable/10/release/amd64/mkisoimages-uefi.sh - copied unchanged from r264995, head/release/amd64/mkisoimages-uefi.sh Modified: Directory Properties: stable/10/ (props changed) Copied: stable/10/release/amd64/mkisoimages-uefi.sh (from r264995, head/release/amd64/mkisoimages-uefi.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/release/amd64/mkisoimages-uefi.sh Fri Sep 12 16:37:56 2014 (r271470, copy of r264995, head/release/amd64/mkisoimages-uefi.sh) @@ -0,0 +1,60 @@ +#!/bin/sh +# +# Module: mkisoimages.sh +# Author: Jordan K Hubbard +# Date: 22 June 2001 +# +# $FreeBSD$ +# +# This script is used by release/Makefile to build the (optional) ISO images +# for a FreeBSD release. It is considered architecture dependent since each +# platform has a slightly unique way of making bootable CDs. This script +# is also allowed to generate any number of images since that is more of +# publishing decision than anything else. +# +# Usage: +# +# mkisoimages.sh [-b] image-label image-name base-bits-dir [extra-bits-dir] +# +# Where -b is passed if the ISO image should be made "bootable" by +# whatever standards this architecture supports (may be unsupported), +# image-label is the ISO image label, image-name is the filename of the +# resulting ISO image, base-bits-dir contains the image contents and +# extra-bits-dir, if provided, contains additional files to be merged +# into base-bits-dir as part of making the image. + +if [ "x$1" = "x-b" ]; then + # This is highly x86-centric and will be used directly below. + bootable="-o bootimage=i386;$4/boot/cdboot -o no-emul-boot" + + # Make EFI system partition (should be done with makefs in the future) + dd if=/dev/zero of=efiboot.img bs=4k count=100 + device=`mdconfig -a -t vnode -f efiboot.img` + newfs_msdos -F 12 -m 0xf8 /dev/$device + mkdir efi + mount -t msdosfs /dev/$device efi + mkdir -p efi/efi/boot + cp ${4}/boot/loader.efi efi/efi/boot/bootx64.efi + umount efi + rmdir efi + mdconfig -d -u $device + bootable="-o bootimage=i386;efiboot.img -o no-emul-boot $bootable" + + shift +else + bootable="" +fi + +if [ $# -lt 3 ]; then + echo Usage: $0 '[-b] image-label image-name base-bits-dir [extra-bits-dir]' + exit 1 +fi + +LABEL=`echo $1 | tr '[:lower:]' '[:upper:]'`; shift +NAME=$1; shift + +publisher="The FreeBSD Project. http://www.FreeBSD.org/" +echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab +makefs -t cd9660 $bootable -o rockridge -o label=$LABEL -o publisher="$publisher" $NAME $* +rm $1/etc/fstab +rm -f efiboot.img From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 17:01:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6BD077EA; Fri, 12 Sep 2014 17:01:15 +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 5558EB57; Fri, 12 Sep 2014 17:01:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8CH1F5u045271; Fri, 12 Sep 2014 17:01:15 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CH1E3G045266; Fri, 12 Sep 2014 17:01:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409121701.s8CH1E3G045266@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 12 Sep 2014 17:01: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: r271471 - in stable/10/release/doc: en_US.ISO8859-1/share/xml share/mk share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 17:01:15 -0000 Author: gjb Date: Fri Sep 12 17:01:14 2014 New Revision: 271471 URL: http://svnweb.freebsd.org/changeset/base/271471 Log: MFC r271331: Change how the recommended mailing list to track is added to the footer of the release/doc/ pages by moving a hard-coded value (that is subject to human error to change) to release.ent where other values are regularly changed, and adding parsing logic to release.xsl. Approved by: re (implicit, relnotes) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/share/xml/release.xsl stable/10/release/doc/share/mk/doc.relnotes.mk stable/10/release/doc/share/xml/release.ent stable/10/release/doc/share/xml/release.xsl Directory Properties: stable/10/ (props changed) Modified: stable/10/release/doc/en_US.ISO8859-1/share/xml/release.xsl ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/share/xml/release.xsl Fri Sep 12 16:37:56 2014 (r271470) +++ stable/10/release/doc/en_US.ISO8859-1/share/xml/release.xsl Fri Sep 12 17:01:14 2014 (r271471) @@ -8,6 +8,7 @@ +

This file, and other release-related documents, @@ -17,8 +18,8 @@ documentation before contacting <questions@FreeBSD.org>.

-

All users of FreeBSD stable should - subscribe to the <stable@FreeBSD.org> +

All users of FreeBSD should + subscribe to the <@FreeBSD.org> mailing list.

For questions about this documentation, Modified: stable/10/release/doc/share/mk/doc.relnotes.mk ============================================================================== --- stable/10/release/doc/share/mk/doc.relnotes.mk Fri Sep 12 16:37:56 2014 (r271470) +++ stable/10/release/doc/share/mk/doc.relnotes.mk Fri Sep 12 17:01:14 2014 (r271471) @@ -6,6 +6,7 @@ DOC_PREFIX?= ${RELN_ROOT}/../../../doc RELEASETYPE!= grep -o 'release.type "[a-z]*"' ${RELN_ROOT}/share/xml/release.ent | sed 's|[a-z.]* "\([a-z]*\)"|\1|' RELEASEURL!= grep -o 'release.url \"[^\"]*\"' ${RELN_ROOT}/share/xml/release.ent | sed 's|[^ ]* "\([^"]*\)"|\1|' RELEASEBRANCH!= grep -o 'release.branch "\([^"]*\)"' ${RELN_ROOT}/share/xml/release.ent | sed 's|[^ ]* "\([^"]*\)"|\1|' +RELEASEMAILLIST!= grep -o 'release.maillist "\([^"]*\)"' ${RELN_ROOT}/share/xml/release.ent | sed 's|[^ ]* "\([^"]*\)"|\1|' .if ${RELEASETYPE} == "current" PROFILING+= --param profile.attribute "'releasetype'" --param profile.value "'current'" .elif ${RELEASETYPE} == "snapshot" @@ -15,6 +16,7 @@ PROFILING+= --param profile.attribute "' .endif XSLTPROCFLAGS+= --param release.url "'${RELEASEURL}'" XSLTPROCFLAGS+= --param release.branch "'${RELEASEBRANCH}'" +XSLTPROCFLAGS+= --param release.maillist "'${RELEASEMAILLIST}'" # Find the RELNOTESng document catalogs EXTRA_CATALOGS+= file://${RELN_ROOT}/${LANGCODE}/share/xml/catalog.xml \ Modified: stable/10/release/doc/share/xml/release.ent ============================================================================== --- stable/10/release/doc/share/xml/release.ent Fri Sep 12 16:37:56 2014 (r271470) +++ stable/10/release/doc/share/xml/release.ent Fri Sep 12 17:01:14 2014 (r271471) @@ -27,6 +27,9 @@ + + + + + + Modified: stable/9/release/doc/share/xml/release.xsl ============================================================================== --- stable/9/release/doc/share/xml/release.xsl Fri Sep 12 17:01:14 2014 (r271471) +++ stable/9/release/doc/share/xml/release.xsl Fri Sep 12 17:02:13 2014 (r271472) @@ -12,6 +12,7 @@ + From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 17:06:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E35CEEAD; Fri, 12 Sep 2014 17:06:55 +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 CE307C55; Fri, 12 Sep 2014 17:06:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8CH6tfI046969; Fri, 12 Sep 2014 17:06:55 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CH6tRI046968; Fri, 12 Sep 2014 17:06:55 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409121706.s8CH6tRI046968@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 12 Sep 2014 17:06:55 +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: r271473 - stable/10/crypto/heimdal/tools X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 17:06:56 -0000 Author: gjb Date: Fri Sep 12 17:06:55 2014 New Revision: 271473 URL: http://svnweb.freebsd.org/changeset/base/271473 Log: MFC r271284: Include the gssapi_krb5 library in KRB5_LDFLAGS. PR: 156245 Approved by: re (marius) Sponsored by: The FreeBSD Foundation Modified: stable/10/crypto/heimdal/tools/krb5-config.in Directory Properties: stable/10/ (props changed) Modified: stable/10/crypto/heimdal/tools/krb5-config.in ============================================================================== --- stable/10/crypto/heimdal/tools/krb5-config.in Fri Sep 12 17:02:13 2014 (r271472) +++ stable/10/crypto/heimdal/tools/krb5-config.in Fri Sep 12 17:06:55 2014 (r271473) @@ -123,7 +123,7 @@ if test "$do_libs" = "yes"; then lib_flags="-L${libdir}" case $library in gssapi) - lib_flags="$lib_flags -lgssapi -lheimntlm" + lib_flags="$lib_flags -lgssapi -lgssapi_krb5 -lheimntlm" ;; kadm-client) lib_flags="$lib_flags -lkadm5clnt" From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 17:07:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6B5AA5; Fri, 12 Sep 2014 17:07:19 +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 C19D6C6C; Fri, 12 Sep 2014 17:07: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 s8CH7JN6047094; Fri, 12 Sep 2014 17:07:19 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CH7JwO047093; Fri, 12 Sep 2014 17:07:19 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409121707.s8CH7JwO047093@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 12 Sep 2014 17:07: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: r271474 - stable/9/crypto/heimdal/tools X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 17:07:20 -0000 Author: gjb Date: Fri Sep 12 17:07:19 2014 New Revision: 271474 URL: http://svnweb.freebsd.org/changeset/base/271474 Log: MFC r271284: Include the gssapi_krb5 library in KRB5_LDFLAGS. PR: 156245 Sponsored by: The FreeBSD Foundation Modified: stable/9/crypto/heimdal/tools/krb5-config.in Directory Properties: stable/9/crypto/heimdal/ (props changed) Modified: stable/9/crypto/heimdal/tools/krb5-config.in ============================================================================== --- stable/9/crypto/heimdal/tools/krb5-config.in Fri Sep 12 17:06:55 2014 (r271473) +++ stable/9/crypto/heimdal/tools/krb5-config.in Fri Sep 12 17:07:19 2014 (r271474) @@ -93,7 +93,7 @@ if test "$do_libs" = "yes"; then lib_flags="-L${libdir}" case $library in gssapi) - lib_flags="$lib_flags -lgssapi -lheimntlm" + lib_flags="$lib_flags -lgssapi -lgssapi_krb5 -lheimntlm" ;; kadm-client) lib_flags="$lib_flags -lkadm5clnt" From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 17:32:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25D39B46; Fri, 12 Sep 2014 17:32: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 0D538F4B; Fri, 12 Sep 2014 17:32: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 s8CHWTUd060768; Fri, 12 Sep 2014 17:32:29 GMT (envelope-from ambrisko@FreeBSD.org) Received: (from ambrisko@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CHWTm5060762; Fri, 12 Sep 2014 17:32:29 GMT (envelope-from ambrisko@FreeBSD.org) Message-Id: <201409121732.s8CHWTm5060762@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ambrisko set sender to ambrisko@FreeBSD.org using -f From: Doug Ambrisko Date: Fri, 12 Sep 2014 17:32:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271475 - in head/sys/boot: amd64/efi efi/libefi i386/libi386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 17:32:30 -0000 Author: ambrisko Date: Fri Sep 12 17:32:28 2014 New Revision: 271475 URL: http://svnweb.freebsd.org/changeset/base/271475 Log: Add support for serial and null console to UEFI boot loader. Modified: head/sys/boot/amd64/efi/bootinfo.c head/sys/boot/amd64/efi/conf.c head/sys/boot/efi/libefi/Makefile head/sys/boot/i386/libi386/comconsole.c Modified: head/sys/boot/amd64/efi/bootinfo.c ============================================================================== --- head/sys/boot/amd64/efi/bootinfo.c Fri Sep 12 17:07:19 2014 (r271474) +++ head/sys/boot/amd64/efi/bootinfo.c Fri Sep 12 17:32:28 2014 (r271475) @@ -60,6 +60,7 @@ bi_getboothowto(char *kargs) { const char *sw; char *opts; + char *console; int howto, i; howto = 0; @@ -70,6 +71,14 @@ bi_getboothowto(char *kargs) howto |= howto_names[i].mask; } + console = getenv("console"); + if (console != NULL) { + if (strcmp(console, "comconsole") == 0) + howto |= RB_SERIAL; + if (strcmp(console, "nullconsole") == 0) + howto |= RB_MUTE; + } + /* Parse kargs */ if (kargs == NULL) return (howto); Modified: head/sys/boot/amd64/efi/conf.c ============================================================================== --- head/sys/boot/amd64/efi/conf.c Fri Sep 12 17:07:19 2014 (r271474) +++ head/sys/boot/amd64/efi/conf.c Fri Sep 12 17:32:28 2014 (r271475) @@ -62,8 +62,12 @@ struct file_format *file_formats[] = { }; extern struct console efi_console; +extern struct console comconsole; +extern struct console nullconsole; struct console *consoles[] = { &efi_console, + &comconsole, + &nullconsole, NULL }; Modified: head/sys/boot/efi/libefi/Makefile ============================================================================== --- head/sys/boot/efi/libefi/Makefile Fri Sep 12 17:07:19 2014 (r271474) +++ head/sys/boot/efi/libefi/Makefile Fri Sep 12 17:32:28 2014 (r271475) @@ -5,6 +5,8 @@ INTERNALLIB= SRCS= delay.c efi_console.c efinet.c efipart.c errno.c handles.c \ libefi.c time.c +.PATH: ${.CURDIR}/../../i386/libi386 +SRCS+= nullconsole.c comconsole.c .if ${MACHINE_ARCH} == "amd64" CFLAGS+= -fPIC @@ -16,6 +18,8 @@ CFLAGS+= -I${.CURDIR}/../../../../lib/li # Pick up the bootstrap header for some interface items CFLAGS+= -I${.CURDIR}/../../common +CFLAGS+= -DNO_PCI + # Suppress warning from clang for FreeBSD %b and %D formats CFLAGS+= -fformat-extensions Modified: head/sys/boot/i386/libi386/comconsole.c ============================================================================== --- head/sys/boot/i386/libi386/comconsole.c Fri Sep 12 17:07:19 2014 (r271474) +++ head/sys/boot/i386/libi386/comconsole.c Fri Sep 12 17:32:28 2014 (r271475) @@ -214,6 +214,9 @@ comc_port_set(struct env_var *ev, int fl static uint32_t comc_parse_pcidev(const char *string) { +#ifdef NO_PCI + return (0); +#else char *p, *p1; uint8_t bus, dev, func, bar; uint32_t locator; @@ -247,11 +250,15 @@ comc_parse_pcidev(const char *string) locator = (bar << 16) | biospci_locator(bus, dev, func); return (locator); +#endif } static int comc_pcidev_handle(uint32_t locator) { +#ifdef NO_PCI + return (CMD_ERROR); +#else char intbuf[64]; uint32_t port; @@ -275,6 +282,7 @@ comc_pcidev_handle(uint32_t locator) comc_locator = locator; return (CMD_OK); +#endif } static int From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 18:20:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E38CCB8F; Fri, 12 Sep 2014 18:20:36 +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 CD70C662; Fri, 12 Sep 2014 18:20:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8CIKahH081693; Fri, 12 Sep 2014 18:20:36 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CIKZqt081686; Fri, 12 Sep 2014 18:20:35 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201409121820.s8CIKZqt081686@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Fri, 12 Sep 2014 18:20:35 +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: r271476 - stable/9/sys/dev/bxe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 18:20:37 -0000 Author: davidcs Date: Fri Sep 12 18:20:35 2014 New Revision: 271476 URL: http://svnweb.freebsd.org/changeset/base/271476 Log: MFC r268854 Initiate error recovery stats fail to update after 3 retries. Change bxe_panic() ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() to panic only if ECORE_STOP_ON_ERROR is defined. Modified: stable/9/sys/dev/bxe/bxe.c stable/9/sys/dev/bxe/bxe.h stable/9/sys/dev/bxe/bxe_stats.c stable/9/sys/dev/bxe/ecore_reg.h stable/9/sys/dev/bxe/ecore_sp.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bxe/bxe.c ============================================================================== --- stable/9/sys/dev/bxe/bxe.c Fri Sep 12 17:32:28 2014 (r271475) +++ stable/9/sys/dev/bxe/bxe.c Fri Sep 12 18:20:35 2014 (r271476) @@ -11486,6 +11486,10 @@ bxe_process_kill(struct bxe_softc *sc, bxe_process_kill_chip_reset(sc, global); mb(); + /* clear errors in PGB */ + if (!CHIP_IS_E1(sc)) + REG_WR(sc, PGLUE_B_REG_LATCHED_ERRORS_CLR, 0x7f); + /* Recover after reset: */ /* MCP */ if (global && bxe_reset_mcp_comp(sc, val)) { Modified: stable/9/sys/dev/bxe/bxe.h ============================================================================== --- stable/9/sys/dev/bxe/bxe.h Fri Sep 12 17:32:28 2014 (r271475) +++ stable/9/sys/dev/bxe/bxe.h Fri Sep 12 18:20:35 2014 (r271476) @@ -2301,11 +2301,20 @@ void ecore_storm_memset_struct(struct bx } \ } while(0) +#ifdef ECORE_STOP_ON_ERROR + #define bxe_panic(sc, msg) \ do { \ panic msg; \ } while (0) +#else + +#define bxe_panic(sc, msg) \ + device_printf((sc)->dev, "%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + +#endif + #define CATC_TRIGGER(sc, data) REG_WR((sc), 0x2000, (data)); #define CATC_TRIGGER_START(sc) CATC_TRIGGER((sc), 0xcafecafe) Modified: stable/9/sys/dev/bxe/bxe_stats.c ============================================================================== --- stable/9/sys/dev/bxe/bxe_stats.c Fri Sep 12 17:32:28 2014 (r271475) +++ stable/9/sys/dev/bxe/bxe_stats.c Fri Sep 12 18:20:35 2014 (r271476) @@ -1306,7 +1306,10 @@ bxe_stats_update(struct bxe_softc *sc) if (bxe_storm_stats_update(sc)) { if (sc->stats_pending++ == 3) { - bxe_panic(sc, ("storm stats not updated for 3 times\n")); + if (sc->ifnet->if_drv_flags & IFF_DRV_RUNNING) { + atomic_store_rel_long(&sc->chip_tq_flags, CHIP_TQ_REINIT); + taskqueue_enqueue(sc->chip_tq, &sc->chip_tq_task); + } } return; } Modified: stable/9/sys/dev/bxe/ecore_reg.h ============================================================================== --- stable/9/sys/dev/bxe/ecore_reg.h Fri Sep 12 17:32:28 2014 (r271475) +++ stable/9/sys/dev/bxe/ecore_reg.h Fri Sep 12 18:20:35 2014 (r271476) @@ -1039,6 +1039,8 @@ __FBSDID("$FreeBSD$"); 0x942cUL #define PGLUE_B_REG_INTERNAL_PFID_ENABLE_TARGET_READ \ 0x9430UL +#define PGLUE_B_REG_LATCHED_ERRORS_CLR \ + 0x943CUL #define PGLUE_B_REG_PGLUE_B_INT_STS \ 0x9298UL #define PGLUE_B_REG_PGLUE_B_INT_STS_CLR \ Modified: stable/9/sys/dev/bxe/ecore_sp.h ============================================================================== --- stable/9/sys/dev/bxe/ecore_sp.h Fri Sep 12 17:32:28 2014 (r271475) +++ stable/9/sys/dev/bxe/ecore_sp.h Fri Sep 12 18:20:35 2014 (r271476) @@ -223,6 +223,8 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m #define ecore_sp_post(_sc, _a, _b, _c, _d) \ bxe_sp_post(_sc, _a, _b, U64_HI(_c), U64_LO(_c), _d) +#ifdef ECORE_STOP_ON_ERROR + #define ECORE_DBG_BREAK_IF(exp) \ do { \ if (__predict_false(exp)) { \ @@ -242,6 +244,20 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m } \ } while (0) +#else + +#define ECORE_DBG_BREAK_IF(exp) \ + printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + +#define ECORE_BUG(exp) \ + printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + +#define ECORE_BUG_ON(exp) \ + printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + + +#endif /* #ifdef ECORE_STOP_ON_ERROR */ + #define ECORE_ERR(str, ...) \ BLOGE(sc, "ECORE: " str, ##__VA_ARGS__) From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 18:23:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1DDCE3A; Fri, 12 Sep 2014 18:23:23 +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 7291377A; Fri, 12 Sep 2014 18:23:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8CINNM8085031; Fri, 12 Sep 2014 18:23:23 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CINNw0085030; Fri, 12 Sep 2014 18:23:23 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409121823.s8CINNw0085030@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 12 Sep 2014 18:23:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271477 - stable/10/release X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 18:23:23 -0000 Author: gjb Date: Fri Sep 12 18:23:22 2014 New Revision: 271477 URL: http://svnweb.freebsd.org/changeset/base/271477 Log: Connect the UEFI-capable disc1.iso and dvd1.iso variants to the build. This is a direct commit to stable/10. Approved by: re (marius) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Fri Sep 12 18:20:35 2014 (r271476) +++ stable/10/release/Makefile Fri Sep 12 18:23:22 2014 (r271477) @@ -97,6 +97,16 @@ IMAGES+= mini-memstick.img RELEASE_TARGETS+=uefi-memstick.img IMAGES+= uefi-memstick.img .endif +.if exists(${.CURDIR}/${TARGET}/mkisoimages-uefi.sh) +RELEASE_TARGETS+=uefi-disc1.iso +RELEASE_TARGETS+=uefi-bootonly.iso +IMAGES+= uefi-disc1.iso +IMAGES+= uefi-bootonly.iso +. if defined(WITH_DVD) && !empty(WITH_DVD) +RELEASE_TARGETS+=uefi-dvd1.iso +IMAGES+= uefi-dvd1.iso +. endif +.endif CLEANFILES= packagesystem *.txz MANIFEST system ${IMAGES} .if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) @@ -220,9 +230,24 @@ release.iso: disc1.iso disc1.iso: system sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} release +uefi-disc1.iso: system +.if exists(${.CURDIR}/${TARGET}/mkisoimages-uefi.sh) + sh ${.CURDIR}/${TARGET}/mkisoimages-uefi.sh -b FreeBSD_Install ${.TARGET} release +.endif + +uefi-bootonly.iso: bootonly +.if exists(${.CURDIR}/${TARGET}/mkisoimages-uefi.sh) + sh ${.CURDIR}/${TARGET}/mkisoimages-uefi.sh -b FreeBSD_Install ${.TARGET} bootonly +.endif + dvd1.iso: dvd pkg-stage sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} dvd +uefi-dvd1.iso: dvd pkg-stage +.if exists(${.CURDIR}/${TARGET}/mkisoimages-uefi.sh) + sh ${.CURDIR}/${TARGET}/mkisoimages-uefi.sh -b FreeBSD_Install ${.TARGET} dvd +.endif + bootonly.iso: bootonly sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} bootonly From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 18:27:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 927E61E3; Fri, 12 Sep 2014 18:27: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 7CF6F7A2; Fri, 12 Sep 2014 18:27: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 s8CIRLoD085820; Fri, 12 Sep 2014 18:27:21 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CIRKCG085815; Fri, 12 Sep 2014 18:27:20 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201409121827.s8CIRKCG085815@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Fri, 12 Sep 2014 18:27:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r271478 - stable/8/sys/dev/bxe X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 18:27:21 -0000 Author: davidcs Date: Fri Sep 12 18:27:20 2014 New Revision: 271478 URL: http://svnweb.freebsd.org/changeset/base/271478 Log: MFC r268854 Initiate error recovery stats fail to update after 3 retries. Change bxe_panic() ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() to panic only if ECORE_STOP_ON_ERROR is defined. Modified: stable/8/sys/dev/bxe/bxe.c stable/8/sys/dev/bxe/bxe.h stable/8/sys/dev/bxe/bxe_stats.c stable/8/sys/dev/bxe/ecore_reg.h stable/8/sys/dev/bxe/ecore_sp.h Directory Properties: stable/8/ (props changed) stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) Modified: stable/8/sys/dev/bxe/bxe.c ============================================================================== --- stable/8/sys/dev/bxe/bxe.c Fri Sep 12 18:23:22 2014 (r271477) +++ stable/8/sys/dev/bxe/bxe.c Fri Sep 12 18:27:20 2014 (r271478) @@ -11486,6 +11486,10 @@ bxe_process_kill(struct bxe_softc *sc, bxe_process_kill_chip_reset(sc, global); mb(); + /* clear errors in PGB */ + if (!CHIP_IS_E1(sc)) + REG_WR(sc, PGLUE_B_REG_LATCHED_ERRORS_CLR, 0x7f); + /* Recover after reset: */ /* MCP */ if (global && bxe_reset_mcp_comp(sc, val)) { Modified: stable/8/sys/dev/bxe/bxe.h ============================================================================== --- stable/8/sys/dev/bxe/bxe.h Fri Sep 12 18:23:22 2014 (r271477) +++ stable/8/sys/dev/bxe/bxe.h Fri Sep 12 18:27:20 2014 (r271478) @@ -2301,11 +2301,20 @@ void ecore_storm_memset_struct(struct bx } \ } while(0) +#ifdef ECORE_STOP_ON_ERROR + #define bxe_panic(sc, msg) \ do { \ panic msg; \ } while (0) +#else + +#define bxe_panic(sc, msg) \ + device_printf((sc)->dev, "%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + +#endif + #define CATC_TRIGGER(sc, data) REG_WR((sc), 0x2000, (data)); #define CATC_TRIGGER_START(sc) CATC_TRIGGER((sc), 0xcafecafe) Modified: stable/8/sys/dev/bxe/bxe_stats.c ============================================================================== --- stable/8/sys/dev/bxe/bxe_stats.c Fri Sep 12 18:23:22 2014 (r271477) +++ stable/8/sys/dev/bxe/bxe_stats.c Fri Sep 12 18:27:20 2014 (r271478) @@ -1306,7 +1306,10 @@ bxe_stats_update(struct bxe_softc *sc) if (bxe_storm_stats_update(sc)) { if (sc->stats_pending++ == 3) { - bxe_panic(sc, ("storm stats not updated for 3 times\n")); + if (sc->ifnet->if_drv_flags & IFF_DRV_RUNNING) { + atomic_store_rel_long(&sc->chip_tq_flags, CHIP_TQ_REINIT); + taskqueue_enqueue(sc->chip_tq, &sc->chip_tq_task); + } } return; } Modified: stable/8/sys/dev/bxe/ecore_reg.h ============================================================================== --- stable/8/sys/dev/bxe/ecore_reg.h Fri Sep 12 18:23:22 2014 (r271477) +++ stable/8/sys/dev/bxe/ecore_reg.h Fri Sep 12 18:27:20 2014 (r271478) @@ -1039,6 +1039,8 @@ __FBSDID("$FreeBSD$"); 0x942cUL #define PGLUE_B_REG_INTERNAL_PFID_ENABLE_TARGET_READ \ 0x9430UL +#define PGLUE_B_REG_LATCHED_ERRORS_CLR \ + 0x943CUL #define PGLUE_B_REG_PGLUE_B_INT_STS \ 0x9298UL #define PGLUE_B_REG_PGLUE_B_INT_STS_CLR \ Modified: stable/8/sys/dev/bxe/ecore_sp.h ============================================================================== --- stable/8/sys/dev/bxe/ecore_sp.h Fri Sep 12 18:23:22 2014 (r271477) +++ stable/8/sys/dev/bxe/ecore_sp.h Fri Sep 12 18:27:20 2014 (r271478) @@ -223,6 +223,8 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m #define ecore_sp_post(_sc, _a, _b, _c, _d) \ bxe_sp_post(_sc, _a, _b, U64_HI(_c), U64_LO(_c), _d) +#ifdef ECORE_STOP_ON_ERROR + #define ECORE_DBG_BREAK_IF(exp) \ do { \ if (__predict_false(exp)) { \ @@ -242,6 +244,20 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m } \ } while (0) +#else + +#define ECORE_DBG_BREAK_IF(exp) \ + printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + +#define ECORE_BUG(exp) \ + printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + +#define ECORE_BUG_ON(exp) \ + printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + + +#endif /* #ifdef ECORE_STOP_ON_ERROR */ + #define ECORE_ERR(str, ...) \ BLOGE(sc, "ECORE: " str, ##__VA_ARGS__) From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 18:31:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFDC73C2; Fri, 12 Sep 2014 18:31: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 D9F1D849; Fri, 12 Sep 2014 18:31: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 s8CIVjtR089320; Fri, 12 Sep 2014 18:31:45 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CIViX4089314; Fri, 12 Sep 2014 18:31:44 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201409121831.s8CIViX4089314@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Fri, 12 Sep 2014 18:31:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r271479 - stable/7/sys/dev/bxe X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 18:31:46 -0000 Author: davidcs Date: Fri Sep 12 18:31:44 2014 New Revision: 271479 URL: http://svnweb.freebsd.org/changeset/base/271479 Log: MFC r268854 Initiate error recovery stats fail to update after 3 retries. Change bxe_panic() ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() to panic only if ECORE_STOP_ON_ERROR is defined. Modified: stable/7/sys/dev/bxe/bxe.c stable/7/sys/dev/bxe/bxe.h stable/7/sys/dev/bxe/bxe_stats.c stable/7/sys/dev/bxe/ecore_reg.h stable/7/sys/dev/bxe/ecore_sp.h Directory Properties: stable/7/ (props changed) stable/7/sys/ (props changed) Modified: stable/7/sys/dev/bxe/bxe.c ============================================================================== --- stable/7/sys/dev/bxe/bxe.c Fri Sep 12 18:27:20 2014 (r271478) +++ stable/7/sys/dev/bxe/bxe.c Fri Sep 12 18:31:44 2014 (r271479) @@ -11488,6 +11488,10 @@ bxe_process_kill(struct bxe_softc *sc, bxe_process_kill_chip_reset(sc, global); mb(); + /* clear errors in PGB */ + if (!CHIP_IS_E1(sc)) + REG_WR(sc, PGLUE_B_REG_LATCHED_ERRORS_CLR, 0x7f); + /* Recover after reset: */ /* MCP */ if (global && bxe_reset_mcp_comp(sc, val)) { Modified: stable/7/sys/dev/bxe/bxe.h ============================================================================== --- stable/7/sys/dev/bxe/bxe.h Fri Sep 12 18:27:20 2014 (r271478) +++ stable/7/sys/dev/bxe/bxe.h Fri Sep 12 18:31:44 2014 (r271479) @@ -2301,11 +2301,20 @@ void ecore_storm_memset_struct(struct bx } \ } while(0) +#ifdef ECORE_STOP_ON_ERROR + #define bxe_panic(sc, msg) \ do { \ panic msg; \ } while (0) +#else + +#define bxe_panic(sc, msg) \ + device_printf((sc)->dev, "%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + +#endif + #define CATC_TRIGGER(sc, data) REG_WR((sc), 0x2000, (data)); #define CATC_TRIGGER_START(sc) CATC_TRIGGER((sc), 0xcafecafe) Modified: stable/7/sys/dev/bxe/bxe_stats.c ============================================================================== --- stable/7/sys/dev/bxe/bxe_stats.c Fri Sep 12 18:27:20 2014 (r271478) +++ stable/7/sys/dev/bxe/bxe_stats.c Fri Sep 12 18:31:44 2014 (r271479) @@ -1306,7 +1306,10 @@ bxe_stats_update(struct bxe_softc *sc) if (bxe_storm_stats_update(sc)) { if (sc->stats_pending++ == 3) { - bxe_panic(sc, ("storm stats not updated for 3 times\n")); + if (sc->ifnet->if_drv_flags & IFF_DRV_RUNNING) { + atomic_store_rel_long(&sc->chip_tq_flags, CHIP_TQ_REINIT); + taskqueue_enqueue(sc->chip_tq, &sc->chip_tq_task); + } } return; } Modified: stable/7/sys/dev/bxe/ecore_reg.h ============================================================================== --- stable/7/sys/dev/bxe/ecore_reg.h Fri Sep 12 18:27:20 2014 (r271478) +++ stable/7/sys/dev/bxe/ecore_reg.h Fri Sep 12 18:31:44 2014 (r271479) @@ -1039,6 +1039,8 @@ __FBSDID("$FreeBSD$"); 0x942cUL #define PGLUE_B_REG_INTERNAL_PFID_ENABLE_TARGET_READ \ 0x9430UL +#define PGLUE_B_REG_LATCHED_ERRORS_CLR \ + 0x943CUL #define PGLUE_B_REG_PGLUE_B_INT_STS \ 0x9298UL #define PGLUE_B_REG_PGLUE_B_INT_STS_CLR \ Modified: stable/7/sys/dev/bxe/ecore_sp.h ============================================================================== --- stable/7/sys/dev/bxe/ecore_sp.h Fri Sep 12 18:27:20 2014 (r271478) +++ stable/7/sys/dev/bxe/ecore_sp.h Fri Sep 12 18:31:44 2014 (r271479) @@ -223,6 +223,8 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m #define ecore_sp_post(_sc, _a, _b, _c, _d) \ bxe_sp_post(_sc, _a, _b, U64_HI(_c), U64_LO(_c), _d) +#ifdef ECORE_STOP_ON_ERROR + #define ECORE_DBG_BREAK_IF(exp) \ do { \ if (__predict_false(exp)) { \ @@ -242,6 +244,20 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m } \ } while (0) +#else + +#define ECORE_DBG_BREAK_IF(exp) \ + printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + +#define ECORE_BUG(exp) \ + printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + +#define ECORE_BUG_ON(exp) \ + printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + + +#endif /* #ifdef ECORE_STOP_ON_ERROR */ + #define ECORE_ERR(str, ...) \ BLOGE(sc, "ECORE: " str, ##__VA_ARGS__) From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 18:52:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F19AFCC4; Fri, 12 Sep 2014 18:52:01 +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 DD576A3E; Fri, 12 Sep 2014 18:52:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8CIq1o6099610; Fri, 12 Sep 2014 18:52:01 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CIq1Eg099609; Fri, 12 Sep 2014 18:52:01 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409121852.s8CIq1Eg099609@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 12 Sep 2014 18:52:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271480 - head/release/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 18:52:02 -0000 Author: gjb Date: Fri Sep 12 18:52:01 2014 New Revision: 271480 URL: http://svnweb.freebsd.org/changeset/base/271480 Log: Set PKG_CACHEDIR to an 'All/' directory one level lower to fix 'pkg repo' generating repository metadata for the on-disc packages. MFC after: 3 days X-MFC-to-10.1: yes Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/pkg-stage.sh Modified: head/release/scripts/pkg-stage.sh ============================================================================== --- head/release/scripts/pkg-stage.sh Fri Sep 12 18:31:44 2014 (r271479) +++ head/release/scripts/pkg-stage.sh Fri Sep 12 18:52:01 2014 (r271480) @@ -44,7 +44,8 @@ PKG_ABI=$(pkg -vv | grep ^ABI | awk '{pr PKG_ABI="${PKG_ABI%\";}" PKG_ABI="${PKG_ABI#\"}" export PKG_ABI -export PKG_CACHEDIR="dvd/packages/${PKG_ABI}" +export PKG_REPODIR="dvd/packages/${PKG_ABI}" +export PKG_CACHEDIR="${PKG_REPODIR}/${PKG_ABI}/All" /bin/mkdir -p ${PKG_CACHEDIR} @@ -53,7 +54,7 @@ ${PKGCMD} -vv ${PKGCMD} update -f ${PKGCMD} fetch -d ${DVD_PACKAGES} -${PKGCMD} repo ${PKG_CACHEDIR} +${PKGCMD} repo ${PKG_REPODIR} # Always exit '0', even if pkg(8) complains about conflicts. exit 0 From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 19:32:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0BF48668; Fri, 12 Sep 2014 19:32:19 +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 EB1DBE0F; Fri, 12 Sep 2014 19:32:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8CJWItT018470; Fri, 12 Sep 2014 19:32:18 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CJWI4E018469; Fri, 12 Sep 2014 19:32:18 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409121932.s8CJWI4E018469@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 12 Sep 2014 19:32:18 +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: r271481 - stable/10/release X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 19:32:19 -0000 Author: gjb Date: Fri Sep 12 19:32:18 2014 New Revision: 271481 URL: http://svnweb.freebsd.org/changeset/base/271481 Log: Include the 'mini' (bootonly) UEFI memstick image in the list of IMAGES. This is a direct commit to stable/10. Approved by: re (marius) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Fri Sep 12 18:52:01 2014 (r271480) +++ stable/10/release/Makefile Fri Sep 12 19:32:18 2014 (r271481) @@ -95,7 +95,9 @@ IMAGES+= mini-memstick.img .endif .if exists(${.CURDIR}/${TARGET}/make-uefi-memstick.sh) RELEASE_TARGETS+=uefi-memstick.img +RELEASE_TARGETS+=uefi-mini-memstick.img IMAGES+= uefi-memstick.img +IMAGES+= uefi-mini-memstick.img .endif .if exists(${.CURDIR}/${TARGET}/mkisoimages-uefi.sh) RELEASE_TARGETS+=uefi-disc1.iso @@ -265,6 +267,12 @@ uefi-memstick.img: system sh ${.CURDIR}/${TARGET}/make-uefi-memstick.sh release ${.TARGET} .endif +uefi-mini-memstick: uefi-mini-memstick.img +uefi-mini-memstick.img: system +.if exists(${.CURDIR}/${TARGET}/make-uefi-memstick.sh) + sh ${.CURDIR}/${TARGET}/make-uefi-memstick.sh bootonly ${.TARGET} +.endif + packagesystem: base.txz kernel.txz ${EXTRA_PACKAGES} sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST touch ${.TARGET} From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 19:41:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81ED68A3; Fri, 12 Sep 2014 19:41:07 +0000 (UTC) Received: from mail-qa0-x235.google.com (mail-qa0-x235.google.com [IPv6:2607:f8b0:400d:c00::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0EFBBE69; Fri, 12 Sep 2014 19:41:06 +0000 (UTC) Received: by mail-qa0-f53.google.com with SMTP id n8so1230642qaq.26 for ; Fri, 12 Sep 2014 12:41:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=X5amOXBYz89on/CRKp9I1j6/cdJC0SUeP0Z/go4vW78=; b=eBGe6kKUIzfL23LCdNh2OliinUvTCG/pRQKUQu5KGN0pV3QC8qQ7Qp5kW1tgelGzdN uwR3872KDFZfrCP5Kdq7pqYMBVN5C4DCpHqZ3XBvEE5ETtpj30VAxwjlapw7o+Pol9oR agPFDxmr/ZyuvbfNnWMLiiMZOSJqGixr0cR1p9gCOq9eGHDYcHVaxzH4hY3LJcfzBKIQ eFoYLRRa/2FRwcoDmU0YVObN+GLnMX7eC+34PQ0HEtYlfCNiXzsSvVvHrYSfvbkZVie0 ci8jOpoy5aYR8Np4ivpegqcmW7aHM0DJBU6SRDpm2e5aLFbjJF5zwkrUn0RoNHPZZVik M4lA== MIME-Version: 1.0 X-Received: by 10.140.31.75 with SMTP id e69mr16026757qge.2.1410550864396; Fri, 12 Sep 2014 12:41:04 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.39.139 with HTTP; Fri, 12 Sep 2014 12:41:04 -0700 (PDT) In-Reply-To: <201408140531.s7E5VeWw077792@svn.freebsd.org> References: <201408140531.s7E5VeWw077792@svn.freebsd.org> Date: Fri, 12 Sep 2014 12:41:04 -0700 X-Google-Sender-Auth: 1VQTNrfT15Um78Ze9HD5qTMivig Message-ID: Subject: Re: svn commit: r269964 - head/sys/kern From: Adrian Chadd To: Xin LI Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 19:41:07 -0000 Hi guys, Both r269963 and r269964 have broken the MIPS platforms with smaller amounts of RAM (< 64MB.) Sean noticed it and filed a bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193465 Can we please figure out what changed? Otherwise I'm going to revert these two changes until we figure out what happened. Thanks, -a On 13 August 2014 22:31, Xin LI wrote: > Author: delphij > Date: Thu Aug 14 05:31:39 2014 > New Revision: 269964 > URL: http://svnweb.freebsd.org/changeset/base/269964 > > Log: > Add a new loader tunable, vm.kmem_zmax which allows a system administrator > to limit the maximum allocation size that malloc(9) would consider using > the UMA cache allocator as backend. > > Suggested by: alfred > MFC after: 2 weeks > > Modified: > head/sys/kern/kern_malloc.c > > Modified: head/sys/kern/kern_malloc.c > ============================================================================== > --- head/sys/kern/kern_malloc.c Thu Aug 14 05:13:24 2014 (r269963) > +++ head/sys/kern/kern_malloc.c Thu Aug 14 05:31:39 2014 (r269964) > @@ -172,6 +172,10 @@ u_long vm_kmem_size; > SYSCTL_ULONG(_vm, OID_AUTO, kmem_size, CTLFLAG_RDTUN, &vm_kmem_size, 0, > "Size of kernel memory"); > > +static u_long kmem_zmax = KMEM_ZMAX; > +SYSCTL_ULONG(_vm, OID_AUTO, kmem_zmax, CTLFLAG_RDTUN, &kmem_zmax, 0, > + "Maximum allocation size that malloc(9) would use UMA as backend"); > + > static u_long vm_kmem_size_min; > SYSCTL_ULONG(_vm, OID_AUTO, kmem_size_min, CTLFLAG_RDTUN, &vm_kmem_size_min, 0, > "Minimum size of kernel memory"); > @@ -485,7 +489,7 @@ malloc(unsigned long size, struct malloc > size = redzone_size_ntor(size); > #endif > > - if (size <= KMEM_ZMAX) { > + if (size <= kmem_zmax) { > mtip = mtp->ks_handle; > if (size & KMEM_ZMASK) > size = (size & ~KMEM_ZMASK) + KMEM_ZBASE; > @@ -776,6 +780,9 @@ mallocinit(void *dummy) > > uma_startup2(); > > + if (kmem_zmax < PAGE_SIZE || kmem_zmax > KMEM_ZMAX) > + kmem_zmax = KMEM_ZMAX; > + > mt_zone = uma_zcreate("mt_zone", sizeof(struct malloc_type_internal), > #ifdef INVARIANTS > mtrash_ctor, mtrash_dtor, mtrash_init, mtrash_fini, > @@ -800,7 +807,7 @@ mallocinit(void *dummy) > } > for (;i <= size; i+= KMEM_ZBASE) > kmemsize[i >> KMEM_ZSHIFT] = indx; > - > + > } > } > SYSINIT(kmem, SI_SUB_KMEM, SI_ORDER_SECOND, mallocinit, NULL); > From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 20:05:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F01ED2F; Fri, 12 Sep 2014 20:05: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 F2FC5156; Fri, 12 Sep 2014 20:05:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8CK58pU032745; Fri, 12 Sep 2014 20:05:08 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CK58q4032742; Fri, 12 Sep 2014 20:05:08 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201409122005.s8CK58q4032742@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Fri, 12 Sep 2014 20:05:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271482 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 20:05:09 -0000 Author: marcel Date: Fri Sep 12 20:05:08 2014 New Revision: 271482 URL: http://svnweb.freebsd.org/changeset/base/271482 Log: Add support for adding empty partition entries. I.e. skip partition numbers or names. This gives more control over the actual layout and helps to construct BSD disklabels with /usr or /var at dedicated partitions. Obtained from: Juniper Networks, Inc. MFC after: 3 days Relnotes: yes Modified: head/usr.bin/mkimg/mkimg.1 head/usr.bin/mkimg/mkimg.c Modified: head/usr.bin/mkimg/mkimg.1 ============================================================================== --- head/usr.bin/mkimg/mkimg.1 Fri Sep 12 19:32:18 2014 (r271481) +++ head/usr.bin/mkimg/mkimg.1 Fri Sep 12 20:05:08 2014 (r271482) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 4, 2014 +.Dd September 12, 2014 .Dt MKIMG 1 .Os .Sh NAME @@ -171,6 +171,25 @@ utility as follows: .Dl % mkimg -s mbr -b /boot/mbr -p freebsd:-'mkimg -s bsd -b /boot/boot \ -p freebsd-ufs:=root-file-system.ufs -p freebsd-swap::1G' -o mbr-bsd.img .Pp +To accomodate the need to have partitions named or numbered in a certain +way, the +.Nm +utility allows for the specification of empty partitions. +For example, to create an image that is compatible with partition layouts +found in +.Pa /etc/disktab , +the 'd' partition often needs to be skipped. +This is accomplished by inserting an unused partition after the first 2 +partition specifications. +It is worth noting at this time that the BSD scheme will automatically +skip the 'c' partition by virtue of it referring to the entire disk. +To create an image that is compatible with the qp120at disk, use the +.Nm +utility as follows: +.Dl % mkimg -s bsd -b /boot/boot -p freebsd-ufs:=root-file-system.ufs \ +-p freebsd-swap::20M -p- -p- -p- -p- -p freebsd-ufs:=usr-file-system.ufs \ +-o bsd.img +.Pp For partitioning schemes that feature partition labels, the .Nm utility supports assigning labels to the partitions specified. Modified: head/usr.bin/mkimg/mkimg.c ============================================================================== --- head/usr.bin/mkimg/mkimg.c Fri Sep 12 19:32:18 2014 (r271481) +++ head/usr.bin/mkimg/mkimg.c Fri Sep 12 20:05:08 2014 (r271482) @@ -101,6 +101,7 @@ usage(const char *why) "are determined\n\t\t\t\t by the named file\n"); fprintf(stderr, "\t[/]:-\t- partition content and size " "are taken from\n\t\t\t\t the output of the command to run\n"); + fprintf(stderr, "\t-\t\t\t- unused partition entry\n"); fprintf(stderr, "\t where:\n"); fprintf(stderr, "\t\t\t- scheme neutral partition type\n"); fprintf(stderr, "\t\t\t- optional scheme-dependent partition " @@ -140,6 +141,9 @@ pwr_of_two(u_int nr) * '-' contents holds a command to run; the output of * which is the contents of the partition. * contents the specification of a partition's contents + * + * A specification that is a single dash indicates an unused partition + * entry. */ static int parse_part(const char *spec) @@ -149,6 +153,11 @@ parse_part(const char *spec) size_t len; int error; + if (strcmp(spec, "-") == 0) { + nparts++; + return (0); + } + part = calloc(1, sizeof(struct part)); if (part == NULL) return (ENOMEM); From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 20:16:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 756AE7A; Fri, 12 Sep 2014 20:16:56 +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 6148724B; Fri, 12 Sep 2014 20:16:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8CKGuwH037659; Fri, 12 Sep 2014 20:16:56 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CKGu7Y037658; Fri, 12 Sep 2014 20:16:56 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409122016.s8CKGu7Y037658@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 12 Sep 2014 20:16:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271483 - head/release/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 20:16:56 -0000 Author: gjb Date: Fri Sep 12 20:16:55 2014 New Revision: 271483 URL: http://svnweb.freebsd.org/changeset/base/271483 Log: Fix duplicate PKG_ABI in the PKG_CACHEDIR path. MFC after: 3 days X-MFC-With: r271480 Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/pkg-stage.sh Modified: head/release/scripts/pkg-stage.sh ============================================================================== --- head/release/scripts/pkg-stage.sh Fri Sep 12 20:05:08 2014 (r271482) +++ head/release/scripts/pkg-stage.sh Fri Sep 12 20:16:55 2014 (r271483) @@ -45,7 +45,7 @@ PKG_ABI="${PKG_ABI%\";}" PKG_ABI="${PKG_ABI#\"}" export PKG_ABI export PKG_REPODIR="dvd/packages/${PKG_ABI}" -export PKG_CACHEDIR="${PKG_REPODIR}/${PKG_ABI}/All" +export PKG_CACHEDIR="${PKG_REPODIR}/All" /bin/mkdir -p ${PKG_CACHEDIR} From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 20:34:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB505506; Fri, 12 Sep 2014 20:34:19 +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 D695D626; Fri, 12 Sep 2014 20:34: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 s8CKYJcQ046536; Fri, 12 Sep 2014 20:34:19 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CKYJSv046534; Fri, 12 Sep 2014 20:34:19 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409122034.s8CKYJSv046534@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 12 Sep 2014 20:34:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271484 - in head/sys/arm: arm xscale/ixp425 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 20:34:20 -0000 Author: jhb Date: Fri Sep 12 20:34:19 2014 New Revision: 271484 URL: http://svnweb.freebsd.org/changeset/base/271484 Log: - Don't let rman_reserve_resource() activate the resource in nexus_alloc_resource() and don't set a bushandle. nexus_activate_resource() will set a proper bushandle. - Implement a proper nexus_release_resource(). - Fix ixppcib_activate_resource() to call rman_activate_resource() before creating a mapping for the resource. Tested by: jmg Modified: head/sys/arm/arm/nexus.c head/sys/arm/xscale/ixp425/ixp425_pci.c Modified: head/sys/arm/arm/nexus.c ============================================================================== --- head/sys/arm/arm/nexus.c Fri Sep 12 20:16:55 2014 (r271483) +++ head/sys/arm/arm/nexus.c Fri Sep 12 20:34:19 2014 (r271484) @@ -90,6 +90,8 @@ static int nexus_config_intr(device_t de enum intr_polarity pol); static int nexus_deactivate_resource(device_t, device_t, int, int, struct resource *); +static int nexus_release_resource(device_t, device_t, int, int, + struct resource *); static int nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep); @@ -111,6 +113,7 @@ static device_method_t nexus_methods[] = DEVMETHOD(bus_activate_resource, nexus_activate_resource), DEVMETHOD(bus_config_intr, nexus_config_intr), DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), + DEVMETHOD(bus_release_resource, nexus_release_resource), DEVMETHOD(bus_setup_intr, nexus_setup_intr), DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), #ifdef FDT @@ -205,6 +208,8 @@ nexus_alloc_resource(device_t bus, devic struct rman *rm; int needactivate = flags & RF_ACTIVE; + flags &= ~RF_ACTIVE; + switch (type) { case SYS_RES_MEMORY: case SYS_RES_IOPORT: @@ -212,15 +217,14 @@ nexus_alloc_resource(device_t bus, devic break; default: - return (0); + return (NULL); } rv = rman_reserve_resource(rm, start, end, count, flags, child); if (rv == 0) - return (0); + return (NULL); rman_set_rid(rv, *rid); - rman_set_bushandle(rv, rman_get_start(rv)); if (needactivate) { if (bus_activate_resource(child, type, *rid, rv)) { @@ -233,6 +237,20 @@ nexus_alloc_resource(device_t bus, devic } static int +nexus_release_resource(device_t bus, device_t child, int type, int rid, + struct resource *res) +{ + int error; + + if (rman_get_flags(res) & RF_ACTIVE) { + error = bus_deactivate_resource(child, type, rid, res); + if (error) + return (error); + } + return (rman_release_resource(res)); +} + +static int nexus_config_intr(device_t dev, int irq, enum intr_trigger trig, enum intr_polarity pol) { Modified: head/sys/arm/xscale/ixp425/ixp425_pci.c ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425_pci.c Fri Sep 12 20:16:55 2014 (r271483) +++ head/sys/arm/xscale/ixp425/ixp425_pci.c Fri Sep 12 20:34:19 2014 (r271484) @@ -320,9 +320,12 @@ static int ixppcib_activate_resource(device_t bus, device_t child, int type, int rid, struct resource *r) { - struct ixppcib_softc *sc = device_get_softc(bus); + int error; + error = rman_activate_resource(r); + if (error) + return (error); switch (type) { case SYS_RES_IOPORT: rman_set_bustag(r, &sc->sc_pci_iot); @@ -335,7 +338,7 @@ ixppcib_activate_resource(device_t bus, break; } - return (rman_activate_resource(r)); + return (0); } static int From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 20:35:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F47D650; Fri, 12 Sep 2014 20:35:12 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54351634; Fri, 12 Sep 2014 20:35:12 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 121BCB978; Fri, 12 Sep 2014 16:35:11 -0400 (EDT) From: John Baldwin To: Hiroki Sato Subject: Re: svn commit: r271418 - head/sbin/dhclient Date: Fri, 12 Sep 2014 16:16:57 -0400 Message-ID: <2679394.nFinO488kI@ralph.baldwin.cx> User-Agent: KMail/4.10.5 (FreeBSD/10.0-STABLE; KDE/4.10.5; amd64; ; ) In-Reply-To: <20140911.181534.1518812407362343252.hrs@allbsd.org> References: <201409110548.s8B5md65014322@svn.freebsd.org> <541163C0.2080903@FreeBSD.org> <20140911.181534.1518812407362343252.hrs@allbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 12 Sep 2014 16:35:11 -0400 (EDT) Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, avg@freebsd.org, glebius@freebsd.org, rwatson@freebsd.org, svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 20:35:12 -0000 On Thursday, September 11, 2014 06:15:34 PM Hiroki Sato wrote: > Andriy Gapon wrote > in <541163C0.2080903@FreeBSD.org>: > > av> On 11/09/2014 11:11, Robert Watson wrote: > av> > A bit behind on commits, but: does this mean that an older userspace > dhclient av> > will no longer work with a newer kernel? > av> > av> At least in my case it appeared to work. I guess this is because the > broadcast av> queries were not affected by the change. > > Only a unicast DHCPREQUEST sent from a DHCP client to renew the lease > does not work. "dhclient[N]: send_packet: Invalid argument" log > appears at certain interval due to it. A lease will expire, and it > will repeatedly restart from the broadcast discovery phase. Ah, I've seen that for a while on my laptop. Thanks for tracking that down! -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 20:35:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C87837CD; Fri, 12 Sep 2014 20:35:15 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A3A6639; Fri, 12 Sep 2014 20:35:15 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 96D7DB9C9; Fri, 12 Sep 2014 16:35:14 -0400 (EDT) From: John Baldwin To: Slawa Olhovchenkov Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm Date: Fri, 12 Sep 2014 14:31:18 -0400 Message-ID: <2555840.19ciXdqXnI@ralph.baldwin.cx> User-Agent: KMail/4.10.5 (FreeBSD/10.0-STABLE; KDE/4.10.5; amd64; ; ) In-Reply-To: <20140910192921.GB7129@zxy.spb.ru> References: <201408281950.s7SJo90I047213@svn.freebsd.org> <1758851.BtHUmxkW3Q@ralph.baldwin.cx> <20140910192921.GB7129@zxy.spb.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 12 Sep 2014 16:35:14 -0400 (EDT) X-Mailman-Approved-At: Fri, 12 Sep 2014 20:44:22 +0000 Cc: src-committers@freebsd.org, Peter Wemm , Alan Cox , alc@freebsd.org, svn-src-all@freebsd.org, Dmitry Morozovsky , Andriy Gapon , Steven Hartland , "Matthew D. Fuller" , svn-src-head@freebsd.org, Nikolai Lifanov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 20:35:15 -0000 On Wednesday, September 10, 2014 11:29:21 PM Slawa Olhovchenkov wrote: > On Wed, Sep 10, 2014 at 02:29:30PM -0400, John Baldwin wrote: > > > Application must change behaviour when reach limit (run GC, switch > > > algorithm and etc.). > > > But mmap of big data file for scaning and processing don't touch this > > > limit. > > > Must be mmap of some temoprary file touch this limit? I don't know. > > > Must be MAP_ANON touch this limit? I think yes. > > > How to make distinction of mmap data file for processing and mmap > > > temporary file for bypass this limit? I don't know. > > > > Consider also mmap() of shm_open(SHM_ANON). > > No, shm limited separatly. mmap of shm_open(SHM_ANON) don't need to adjust > this limit. It would be another trivial way of escaping RLIMIT_DATA however. > > > PS: question about jemalloc. How I can stop jemalloc to give back > > > memory to OS for some application? > > > > You would have to hack pages_purge() in chunk_mmap.c to always return true > > and not call madvise(). > > And got memory leak? No, that doesn't leak memory. jemalloc() considers that address range free regardless and will always reuse it for a future allocation. This is just a hint to let the VM system take back the backing pages because they are currently not in use by the application, and if the address is reused, the current contents of the pages are not important (can be thrown away). > I am talk about change behaviour from periodic mmap and madvise memory > to only mmap when need and leave for future use when freed by > aplication. I think (may be wrong -- please correct) in some cases > mmap/madvise will be too often. The madvise() does not cause a future mmap(). You would have to munmap() to require a future mmap(). Instead, the madvise() can result in the page being released back to the system. Later when that address is reused by jemalloc, the process would fault on the address requiring the VM to locate a new page. Disabling the madvise() only prevents that fault from occurring (However, leaving all the pages around and marked as in-use may increase memory pressure and cause you to swap and still have to fault the page back in in the future, but at greater expense.) -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 20:55:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACF22EEB; Fri, 12 Sep 2014 20:55:17 +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 98C92855; Fri, 12 Sep 2014 20:55:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8CKtHlG055988; Fri, 12 Sep 2014 20:55:17 GMT (envelope-from ray@FreeBSD.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CKtHLW055986; Fri, 12 Sep 2014 20:55:17 GMT (envelope-from ray@FreeBSD.org) Message-Id: <201409122055.s8CKtHLW055986@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ray set sender to ray@FreeBSD.org using -f From: Aleksandr Rybalko Date: Fri, 12 Sep 2014 20:55:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271485 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 20:55:17 -0000 Author: ray Date: Fri Sep 12 20:55:17 2014 New Revision: 271485 URL: http://svnweb.freebsd.org/changeset/base/271485 Log: Fix 'function declaration isn't a prototype' warning. Pointed by: ian MFC after: 1 week Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Fri Sep 12 20:34:19 2014 (r271484) +++ head/sys/dev/vt/vt_core.c Fri Sep 12 20:55:17 2014 (r271485) @@ -162,7 +162,7 @@ static int vt_late_window_switch(struct static int vt_proc_alive(struct vt_window *); static void vt_resize(struct vt_device *); static void vt_update_static(void *); -static void vt_mouse_paste(); +static void vt_mouse_paste(void); SET_DECLARE(vt_drv_set, struct vt_driver); From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 20:56:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14A2ADF; Fri, 12 Sep 2014 20:56:10 +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 009D2867; Fri, 12 Sep 2014 20:56:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8CKu9UR056148; Fri, 12 Sep 2014 20:56:09 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CKu90H056147; Fri, 12 Sep 2014 20:56:09 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409122056.s8CKu90H056147@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 12 Sep 2014 20:56:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271486 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 20:56:10 -0000 Author: jhb Date: Fri Sep 12 20:56:09 2014 New Revision: 271486 URL: http://svnweb.freebsd.org/changeset/base/271486 Log: Simplify vntype_to_kinfo() by returning when the desired value is found instead of breaking out of the loop and then immediately checking the loop index so that if it was broken out of the proper value can be returned. While here, use nitems(). Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Fri Sep 12 20:55:17 2014 (r271485) +++ head/sys/kern/kern_descrip.c Fri Sep 12 20:56:09 2014 (r271486) @@ -3531,17 +3531,14 @@ vntype_to_kinfo(int vtype) { VREG, KF_VTYPE_VREG }, { VSOCK, KF_VTYPE_VSOCK } }; -#define NVTYPES (sizeof(vtypes_table) / sizeof(*vtypes_table)) unsigned int i; /* * Perform vtype translation. */ - for (i = 0; i < NVTYPES; i++) + for (i = 0; i < nitems(vtypes_table); i++) if (vtypes_table[i].vtype == vtype) - break; - if (i < NVTYPES) - return (vtypes_table[i].kf_vtype); + return (vtypes_table[i].kf_vtype); return (KF_VTYPE_UNKNOWN); } From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 21:01:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACE0E671; Fri, 12 Sep 2014 21:01:39 +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 8D0C08D7; Fri, 12 Sep 2014 21:01:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8CL1dX9060313; Fri, 12 Sep 2014 21:01:39 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CL1dP9060312; Fri, 12 Sep 2014 21:01:39 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409122101.s8CL1dP9060312@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 12 Sep 2014 21:01:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271487 - head/sbin/sysctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 21:01:39 -0000 Author: jhb Date: Fri Sep 12 21:01:39 2014 New Revision: 271487 URL: http://svnweb.freebsd.org/changeset/base/271487 Log: Pass the length of an structure to the pretty-printer backends as a size_t instead of an int. Modified: head/sbin/sysctl/sysctl.c Modified: head/sbin/sysctl/sysctl.c ============================================================================== --- head/sbin/sysctl/sysctl.c Fri Sep 12 20:56:09 2014 (r271486) +++ head/sbin/sysctl/sysctl.c Fri Sep 12 21:01:39 2014 (r271487) @@ -458,12 +458,12 @@ parsefile(const char *filename) /* These functions will dump out various interesting structures. */ static int -S_clockinfo(int l2, void *p) +S_clockinfo(size_t l2, void *p) { struct clockinfo *ci = (struct clockinfo*)p; if (l2 != sizeof(*ci)) { - warnx("S_clockinfo %d != %zu", l2, sizeof(*ci)); + warnx("S_clockinfo %zu != %zu", l2, sizeof(*ci)); return (1); } printf(hflag ? "{ hz = %'d, tick = %'d, profhz = %'d, stathz = %'d }" : @@ -473,12 +473,12 @@ S_clockinfo(int l2, void *p) } static int -S_loadavg(int l2, void *p) +S_loadavg(size_t l2, void *p) { struct loadavg *tv = (struct loadavg*)p; if (l2 != sizeof(*tv)) { - warnx("S_loadavg %d != %zu", l2, sizeof(*tv)); + warnx("S_loadavg %zu != %zu", l2, sizeof(*tv)); return (1); } printf(hflag ? "{ %'.2f %'.2f %'.2f }" : "{ %.2f %.2f %.2f }", @@ -489,14 +489,14 @@ S_loadavg(int l2, void *p) } static int -S_timeval(int l2, void *p) +S_timeval(size_t l2, void *p) { struct timeval *tv = (struct timeval*)p; time_t tv_sec; char *p1, *p2; if (l2 != sizeof(*tv)) { - warnx("S_timeval %d != %zu", l2, sizeof(*tv)); + warnx("S_timeval %zu != %zu", l2, sizeof(*tv)); return (1); } printf(hflag ? "{ sec = %'jd, usec = %'ld } " : @@ -513,13 +513,13 @@ S_timeval(int l2, void *p) } static int -S_vmtotal(int l2, void *p) +S_vmtotal(size_t l2, void *p) { struct vmtotal *v = (struct vmtotal *)p; int pageKilo = getpagesize() / 1024; if (l2 != sizeof(*v)) { - warnx("S_vmtotal %d != %zu", l2, sizeof(*v)); + warnx("S_vmtotal %zu != %zu", l2, sizeof(*v)); return (1); } @@ -540,19 +540,19 @@ S_vmtotal(int l2, void *p) v->t_vmshr * pageKilo, v->t_avmshr * pageKilo); printf("Shared Real Memory:\t(Total: %dK Active: %dK)\n", v->t_rmshr * pageKilo, v->t_armshr * pageKilo); - printf("Free Memory:\t%dK\n", v->t_free * pageKilo); + printf("Free Memory:\t%dK", v->t_free * pageKilo); return (0); } #if defined(__amd64__) || defined(__i386__) static int -S_bios_smap_xattr(int l2, void *p) +S_bios_smap_xattr(size_t l2, void *p) { struct bios_smap_xattr *smap, *end; if (l2 % sizeof(*smap) != 0) { - warnx("S_bios_smap_xattr %d is not a multiple of %zu", l2, + warnx("S_bios_smap_xattr %zu is not a multiple of %zu", l2, sizeof(*smap)); return (1); } @@ -680,7 +680,7 @@ show_var(int *oid, int nlen) size_t intlen; size_t j, len; u_int kind; - int (*func)(int, void *); + int (*func)(size_t, void *); /* Silence GCC. */ umv = mv = intlen = 0; From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 21:20:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41D7DFE0; Fri, 12 Sep 2014 21:20: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 2D8EEAD9; Fri, 12 Sep 2014 21:20: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 s8CLKbiA066807; Fri, 12 Sep 2014 21:20:37 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CLKbeU066806; Fri, 12 Sep 2014 21:20:37 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409122120.s8CLKbeU066806@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 12 Sep 2014 21:20:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271488 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 21:20:37 -0000 Author: jhb Date: Fri Sep 12 21:20:36 2014 New Revision: 271488 URL: http://svnweb.freebsd.org/changeset/base/271488 Log: Tweak pipe_truncate() to more closely match pipe_chown() and pipe_chmod() by checking PIPE_NAMED and using invfo_truncate() for unnamed pipes. Modified: head/sys/kern/sys_pipe.c Modified: head/sys/kern/sys_pipe.c ============================================================================== --- head/sys/kern/sys_pipe.c Fri Sep 12 21:01:39 2014 (r271487) +++ head/sys/kern/sys_pipe.c Fri Sep 12 21:20:36 2014 (r271488) @@ -1324,11 +1324,15 @@ pipe_truncate(fp, length, active_cred, t struct ucred *active_cred; struct thread *td; { + struct pipe *cpipe; + int error; - /* For named pipes call the vnode operation. */ - if (fp->f_vnode != NULL) - return (vnops.fo_truncate(fp, length, active_cred, td)); - return (EINVAL); + cpipe = fp->f_data; + if (cpipe->pipe_state & PIPE_NAMED) + error = vnops.fo_truncate(fp, length, active_cred, td); + else + error = invfo_truncate(fp, length, active_cred, td); + return (error); } /* From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 21:21:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D64661BE for ; Fri, 12 Sep 2014 21:21:37 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7B44B75 for ; Fri, 12 Sep 2014 21:21:37 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id s8CLLb9k054717 for ; Fri, 12 Sep 2014 21:21:37 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id s8CLLbbp054712 for svn-src-all@freebsd.org; Fri, 12 Sep 2014 21:21:37 GMT (envelope-from bdrewery) Received: (qmail 49414 invoked from network); 12 Sep 2014 16:21:35 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 12 Sep 2014 16:21:35 -0500 Message-ID: <541363D6.3080502@FreeBSD.org> Date: Fri, 12 Sep 2014 16:21:26 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: Glen Barber , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r271480 - head/release/scripts References: <201409121852.s8CIq1Eg099609@svn.freebsd.org> In-Reply-To: <201409121852.s8CIq1Eg099609@svn.freebsd.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sJ2BLcToTG3CffBvFjhWeev1RoQeMkg2v" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 21:21:38 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --sJ2BLcToTG3CffBvFjhWeev1RoQeMkg2v Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 9/12/2014 1:52 PM, Glen Barber wrote: > Author: gjb > Date: Fri Sep 12 18:52:01 2014 > New Revision: 271480 > URL: http://svnweb.freebsd.org/changeset/base/271480 >=20 > Log: > Set PKG_CACHEDIR to an 'All/' directory one level lower > to fix 'pkg repo' generating repository metadata for the > on-disc packages. > =20 > MFC after: 3 days > X-MFC-to-10.1: yes > Sponsored by: The FreeBSD Foundation >=20 > Modified: > head/release/scripts/pkg-stage.sh >=20 > Modified: head/release/scripts/pkg-stage.sh > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/release/scripts/pkg-stage.sh Fri Sep 12 18:31:44 2014 (r271479= ) > +++ head/release/scripts/pkg-stage.sh Fri Sep 12 18:52:01 2014 (r271480= ) > @@ -44,7 +44,8 @@ PKG_ABI=3D$(pkg -vv | grep ^ABI | awk '{pr > PKG_ABI=3D"${PKG_ABI%\";}" > PKG_ABI=3D"${PKG_ABI#\"}" > export PKG_ABI > -export PKG_CACHEDIR=3D"dvd/packages/${PKG_ABI}" > +export PKG_REPODIR=3D"dvd/packages/${PKG_ABI}" > +export PKG_CACHEDIR=3D"${PKG_REPODIR}/${PKG_ABI}/All" > =20 > /bin/mkdir -p ${PKG_CACHEDIR} > =20 > @@ -53,7 +54,7 @@ ${PKGCMD} -vv > ${PKGCMD} update -f > ${PKGCMD} fetch -d ${DVD_PACKAGES} > =20 > -${PKGCMD} repo ${PKG_CACHEDIR} > +${PKGCMD} repo ${PKG_REPODIR} > =20 > # Always exit '0', even if pkg(8) complains about conflicts. > exit 0 >=20 There's still an issue with 1.3 here. pkg-fetch now uses mangled package names in its cache dir, and does not use the All/ subdir anymore as you've found. # ls /var/cache/pkg/psutils-1.17_4* /var/cache/pkg/psutils-1.17_4-fe318c25d7.txz /var/cache/pkg/psutils-1.17_4.txz@ Rather the polluting the DVD with these hashed filenames you can just not set PKG_CACHEDIR and use pkg fetch -o ${PKG_REPODIR} -d ${DVD_PACKAGE= S}. You can also now simplify the PKG_ABI lookup 4 lines to just: export PKG_ABI=3D$(pkg config ABI). pkg fetch -o was added to 1.3 specifically for cases such as creating DVD= s. It will then store the files in dvd/packages/${PKG_ABI}/All. See https://people.freebsd.org/~bdrewery/patches/pkg-stage-1.3.diff --=20 Regards, Bryan Drewery --sJ2BLcToTG3CffBvFjhWeev1RoQeMkg2v Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBAgAGBQJUE2PWAAoJEDXXcbtuRpfPi/kIAJzYawO0BrfXRYlNBBeTFNxw m+unX1OwFiZYR/P1cp66TfiLjDfY4aXjsWiHPzoSlwyrg67W8jIPvaCOLZH28F/8 popFl0u+6eMRQQz1nXqWsveNePGwhewEI4yGAWWWfv1V/jqfeEdi62WNvq2jS9pj GWRONNKKZ1BpEyE8aBMlO00aDChuS8rC4vf10LnS2yN1yD0Ccgms7KfK4hw7+/0N mz+Kx50oVlgHWRfPCuhKIkAzEUj32uiK4mUt4lylTuJ4SQd4CwlvPCIeaHl6PTEN c6nqyHNLYsXCAlCLTp/FR2Fd57RUEAWPsrKHNBRqzkqa8IiTUypie+9qwRCt4sQ= =Zlfo -----END PGP SIGNATURE----- --sJ2BLcToTG3CffBvFjhWeev1RoQeMkg2v-- From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 21:29:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CF0F7C9; Fri, 12 Sep 2014 21:29:13 +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 3767AC2C; Fri, 12 Sep 2014 21:29:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8CLTDiw070770; Fri, 12 Sep 2014 21:29:13 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CLTBZ0070756; Fri, 12 Sep 2014 21:29:11 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409122129.s8CLTBZ0070756@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 12 Sep 2014 21:29:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271489 - in head/sys: kern ofed/include/linux opencrypto sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 21:29:13 -0000 Author: jhb Date: Fri Sep 12 21:29:10 2014 New Revision: 271489 URL: http://svnweb.freebsd.org/changeset/base/271489 Log: Fix various issues with invalid file operations: - Add invfo_rdwr() (for read and write), invfo_ioctl(), invfo_poll(), and invfo_kqfilter() for use by file types that do not support the respective operations. Home-grown versions of invfo_poll() were universally broken (they returned an errno value, invfo_poll() uses poll_no_poll() to return an appropriate event mask). Home-grown ioctl routines also tended to return an incorrect errno (invfo_ioctl returns ENOTTY). - Use the invfo_*() functions instead of local versions for unsupported file operations. - Reorder fileops members to match the order in the structure definition to make it easier to spot missing members. - Add several missing methods to linuxfileops used by the OFED shim layer: fo_write(), fo_truncate(), fo_kqfilter(), and fo_stat(). Most of these used invfo_*(), but a dummy fo_stat() implementation was added. Modified: head/sys/kern/kern_descrip.c head/sys/kern/kern_event.c head/sys/kern/sys_procdesc.c head/sys/kern/tty_pts.c head/sys/kern/uipc_mqueue.c head/sys/kern/uipc_sem.c head/sys/kern/uipc_shm.c head/sys/ofed/include/linux/linux_compat.c head/sys/opencrypto/cryptodev.c head/sys/sys/file.h Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Fri Sep 12 21:20:36 2014 (r271488) +++ head/sys/kern/kern_descrip.c Fri Sep 12 21:29:10 2014 (r271489) @@ -3941,6 +3941,14 @@ struct fileops badfileops = { }; int +invfo_rdwr(struct file *fp, struct uio *uio, struct ucred *active_cred, + int flags, struct thread *td) +{ + + return (EOPNOTSUPP); +} + +int invfo_truncate(struct file *fp, off_t length, struct ucred *active_cred, struct thread *td) { @@ -3949,6 +3957,29 @@ invfo_truncate(struct file *fp, off_t le } int +invfo_ioctl(struct file *fp, u_long com, void *data, + struct ucred *active_cred, struct thread *td) +{ + + return (ENOTTY); +} + +int +invfo_poll(struct file *fp, int events, struct ucred *active_cred, + struct thread *td) +{ + + return (poll_no_poll(events)); +} + +int +invfo_kqfilter(struct file *fp, struct knote *kn) +{ + + return (EINVAL); +} + +int invfo_chmod(struct file *fp, mode_t mode, struct ucred *active_cred, struct thread *td) { Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Fri Sep 12 21:20:36 2014 (r271488) +++ head/sys/kern/kern_event.c Fri Sep 12 21:29:10 2014 (r271489) @@ -109,9 +109,6 @@ static void kqueue_wakeup(struct kqueue static struct filterops *kqueue_fo_find(int filt); static void kqueue_fo_release(int filt); -static fo_rdwr_t kqueue_read; -static fo_rdwr_t kqueue_write; -static fo_truncate_t kqueue_truncate; static fo_ioctl_t kqueue_ioctl; static fo_poll_t kqueue_poll; static fo_kqfilter_t kqueue_kqfilter; @@ -119,9 +116,9 @@ static fo_stat_t kqueue_stat; static fo_close_t kqueue_close; static struct fileops kqueueops = { - .fo_read = kqueue_read, - .fo_write = kqueue_write, - .fo_truncate = kqueue_truncate, + .fo_read = invfo_rdwr, + .fo_write = invfo_rdwr, + .fo_truncate = invfo_truncate, .fo_ioctl = kqueue_ioctl, .fo_poll = kqueue_poll, .fo_kqfilter = kqueue_kqfilter, @@ -1602,35 +1599,6 @@ done_nl: return (error); } -/* - * XXX - * This could be expanded to call kqueue_scan, if desired. - */ -/*ARGSUSED*/ -static int -kqueue_read(struct file *fp, struct uio *uio, struct ucred *active_cred, - int flags, struct thread *td) -{ - return (ENXIO); -} - -/*ARGSUSED*/ -static int -kqueue_write(struct file *fp, struct uio *uio, struct ucred *active_cred, - int flags, struct thread *td) -{ - return (ENXIO); -} - -/*ARGSUSED*/ -static int -kqueue_truncate(struct file *fp, off_t length, struct ucred *active_cred, - struct thread *td) -{ - - return (EINVAL); -} - /*ARGSUSED*/ static int kqueue_ioctl(struct file *fp, u_long cmd, void *data, Modified: head/sys/kern/sys_procdesc.c ============================================================================== --- head/sys/kern/sys_procdesc.c Fri Sep 12 21:20:36 2014 (r271488) +++ head/sys/kern/sys_procdesc.c Fri Sep 12 21:29:10 2014 (r271489) @@ -87,28 +87,22 @@ FEATURE(process_descriptors, "Process De static uma_zone_t procdesc_zone; -static fo_rdwr_t procdesc_read; -static fo_rdwr_t procdesc_write; -static fo_truncate_t procdesc_truncate; -static fo_ioctl_t procdesc_ioctl; static fo_poll_t procdesc_poll; static fo_kqfilter_t procdesc_kqfilter; static fo_stat_t procdesc_stat; static fo_close_t procdesc_close; -static fo_chmod_t procdesc_chmod; -static fo_chown_t procdesc_chown; static struct fileops procdesc_ops = { - .fo_read = procdesc_read, - .fo_write = procdesc_write, - .fo_truncate = procdesc_truncate, - .fo_ioctl = procdesc_ioctl, + .fo_read = invfo_rdwr, + .fo_write = invfo_rdwr, + .fo_truncate = invfo_truncate, + .fo_ioctl = invfo_ioctl, .fo_poll = procdesc_poll, .fo_kqfilter = procdesc_kqfilter, .fo_stat = procdesc_stat, .fo_close = procdesc_close, - .fo_chmod = procdesc_chmod, - .fo_chown = procdesc_chown, + .fo_chmod = invfo_chmod, + .fo_chown = invfo_chown, .fo_sendfile = invfo_sendfile, .fo_flags = DFLAG_PASSABLE, }; @@ -413,38 +407,6 @@ procdesc_close(struct file *fp, struct t } static int -procdesc_read(struct file *fp, struct uio *uio, struct ucred *active_cred, - int flags, struct thread *td) -{ - - return (EOPNOTSUPP); -} - -static int -procdesc_write(struct file *fp, struct uio *uio, struct ucred *active_cred, - int flags, struct thread *td) -{ - - return (EOPNOTSUPP); -} - -static int -procdesc_truncate(struct file *fp, off_t length, struct ucred *active_cred, - struct thread *td) -{ - - return (EOPNOTSUPP); -} - -static int -procdesc_ioctl(struct file *fp, u_long com, void *data, - struct ucred *active_cred, struct thread *td) -{ - - return (EOPNOTSUPP); -} - -static int procdesc_poll(struct file *fp, int events, struct ucred *active_cred, struct thread *td) { @@ -569,18 +531,3 @@ procdesc_stat(struct file *fp, struct st return (0); } -static int -procdesc_chmod(struct file *fp, mode_t mode, struct ucred *active_cred, - struct thread *td) -{ - - return (EOPNOTSUPP); -} - -static int -procdesc_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred, - struct thread *td) -{ - - return (EOPNOTSUPP); -} Modified: head/sys/kern/tty_pts.c ============================================================================== --- head/sys/kern/tty_pts.c Fri Sep 12 21:20:36 2014 (r271488) +++ head/sys/kern/tty_pts.c Fri Sep 12 21:29:10 2014 (r271489) @@ -253,14 +253,6 @@ done: ttydisc_rint_done(tp); } static int -ptsdev_truncate(struct file *fp, off_t length, struct ucred *active_cred, - struct thread *td) -{ - - return (EINVAL); -} - -static int ptsdev_ioctl(struct file *fp, u_long cmd, void *data, struct ucred *active_cred, struct thread *td) { @@ -591,7 +583,7 @@ ptsdev_close(struct file *fp, struct thr static struct fileops ptsdev_ops = { .fo_read = ptsdev_read, .fo_write = ptsdev_write, - .fo_truncate = ptsdev_truncate, + .fo_truncate = invfo_truncate, .fo_ioctl = ptsdev_ioctl, .fo_poll = ptsdev_poll, .fo_kqfilter = ptsdev_kqfilter, Modified: head/sys/kern/uipc_mqueue.c ============================================================================== --- head/sys/kern/uipc_mqueue.c Fri Sep 12 21:20:36 2014 (r271488) +++ head/sys/kern/uipc_mqueue.c Fri Sep 12 21:29:10 2014 (r271489) @@ -2418,35 +2418,6 @@ mq_proc_exit(void *arg __unused, struct } static int -mqf_read(struct file *fp, struct uio *uio, struct ucred *active_cred, - int flags, struct thread *td) -{ - return (EOPNOTSUPP); -} - -static int -mqf_write(struct file *fp, struct uio *uio, struct ucred *active_cred, - int flags, struct thread *td) -{ - return (EOPNOTSUPP); -} - -static int -mqf_truncate(struct file *fp, off_t length, struct ucred *active_cred, - struct thread *td) -{ - - return (EINVAL); -} - -static int -mqf_ioctl(struct file *fp, u_long cmd, void *data, - struct ucred *active_cred, struct thread *td) -{ - return (ENOTTY); -} - -static int mqf_poll(struct file *fp, int events, struct ucred *active_cred, struct thread *td) { @@ -2601,16 +2572,16 @@ filt_mqwrite(struct knote *kn, long hint } static struct fileops mqueueops = { - .fo_read = mqf_read, - .fo_write = mqf_write, - .fo_truncate = mqf_truncate, - .fo_ioctl = mqf_ioctl, + .fo_read = invfo_rdwr, + .fo_write = invfo_rdwr, + .fo_truncate = invfo_truncate, + .fo_ioctl = invfo_ioctl, .fo_poll = mqf_poll, .fo_kqfilter = mqf_kqfilter, .fo_stat = mqf_stat, + .fo_close = mqf_close, .fo_chmod = mqf_chmod, .fo_chown = mqf_chown, - .fo_close = mqf_close, .fo_sendfile = invfo_sendfile, }; Modified: head/sys/kern/uipc_sem.c ============================================================================== --- head/sys/kern/uipc_sem.c Fri Sep 12 21:20:36 2014 (r271488) +++ head/sys/kern/uipc_sem.c Fri Sep 12 21:29:10 2014 (r271489) @@ -126,12 +126,6 @@ static int ksem_module_init(void); static int ksem_remove(char *path, Fnv32_t fnv, struct ucred *ucred); static int sem_modload(struct module *module, int cmd, void *arg); -static fo_rdwr_t ksem_read; -static fo_rdwr_t ksem_write; -static fo_truncate_t ksem_truncate; -static fo_ioctl_t ksem_ioctl; -static fo_poll_t ksem_poll; -static fo_kqfilter_t ksem_kqfilter; static fo_stat_t ksem_stat; static fo_close_t ksem_closef; static fo_chmod_t ksem_chmod; @@ -139,12 +133,12 @@ static fo_chown_t ksem_chown; /* File descriptor operations. */ static struct fileops ksem_ops = { - .fo_read = ksem_read, - .fo_write = ksem_write, - .fo_truncate = ksem_truncate, - .fo_ioctl = ksem_ioctl, - .fo_poll = ksem_poll, - .fo_kqfilter = ksem_kqfilter, + .fo_read = invfo_rdwr, + .fo_write = invfo_rdwr, + .fo_truncate = invfo_truncate, + .fo_ioctl = invfo_ioctl, + .fo_poll = invfo_poll, + .fo_kqfilter = invfo_kqfilter, .fo_stat = ksem_stat, .fo_close = ksem_closef, .fo_chmod = ksem_chmod, @@ -156,53 +150,6 @@ static struct fileops ksem_ops = { FEATURE(posix_sem, "POSIX semaphores"); static int -ksem_read(struct file *fp, struct uio *uio, struct ucred *active_cred, - int flags, struct thread *td) -{ - - return (EOPNOTSUPP); -} - -static int -ksem_write(struct file *fp, struct uio *uio, struct ucred *active_cred, - int flags, struct thread *td) -{ - - return (EOPNOTSUPP); -} - -static int -ksem_truncate(struct file *fp, off_t length, struct ucred *active_cred, - struct thread *td) -{ - - return (EINVAL); -} - -static int -ksem_ioctl(struct file *fp, u_long com, void *data, - struct ucred *active_cred, struct thread *td) -{ - - return (EOPNOTSUPP); -} - -static int -ksem_poll(struct file *fp, int events, struct ucred *active_cred, - struct thread *td) -{ - - return (EOPNOTSUPP); -} - -static int -ksem_kqfilter(struct file *fp, struct knote *kn) -{ - - return (EOPNOTSUPP); -} - -static int ksem_stat(struct file *fp, struct stat *sb, struct ucred *active_cred, struct thread *td) { Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Fri Sep 12 21:20:36 2014 (r271488) +++ head/sys/kern/uipc_shm.c Fri Sep 12 21:29:10 2014 (r271489) @@ -120,9 +120,6 @@ static int shm_dotruncate(struct shmfd * static fo_rdwr_t shm_read; static fo_rdwr_t shm_write; static fo_truncate_t shm_truncate; -static fo_ioctl_t shm_ioctl; -static fo_poll_t shm_poll; -static fo_kqfilter_t shm_kqfilter; static fo_stat_t shm_stat; static fo_close_t shm_close; static fo_chmod_t shm_chmod; @@ -134,9 +131,9 @@ static struct fileops shm_ops = { .fo_read = shm_read, .fo_write = shm_write, .fo_truncate = shm_truncate, - .fo_ioctl = shm_ioctl, - .fo_poll = shm_poll, - .fo_kqfilter = shm_kqfilter, + .fo_ioctl = invfo_ioctl, + .fo_poll = invfo_poll, + .fo_kqfilter = invfo_kqfilter, .fo_stat = shm_stat, .fo_close = shm_close, .fo_chmod = shm_chmod, @@ -355,29 +352,6 @@ shm_truncate(struct file *fp, off_t leng } static int -shm_ioctl(struct file *fp, u_long com, void *data, - struct ucred *active_cred, struct thread *td) -{ - - return (EOPNOTSUPP); -} - -static int -shm_poll(struct file *fp, int events, struct ucred *active_cred, - struct thread *td) -{ - - return (EOPNOTSUPP); -} - -static int -shm_kqfilter(struct file *fp, struct knote *kn) -{ - - return (EOPNOTSUPP); -} - -static int shm_stat(struct file *fp, struct stat *sb, struct ucred *active_cred, struct thread *td) { Modified: head/sys/ofed/include/linux/linux_compat.c ============================================================================== --- head/sys/ofed/include/linux/linux_compat.c Fri Sep 12 21:20:36 2014 (r271488) +++ head/sys/ofed/include/linux/linux_compat.c Fri Sep 12 21:29:10 2014 (r271489) @@ -568,11 +568,23 @@ linux_file_ioctl(struct file *fp, u_long return (error); } +static int +linux_file_stat(struct file *fp, struct stat *sb, struct ucred *active_cred, + struct thread *td) +{ + + return (EOPNOTSUPP); +} + struct fileops linuxfileops = { .fo_read = linux_file_read, + .fo_write = invfo_rdwr, + .fo_truncate = invfo_truncate, + .fo_ioctl = linux_file_ioctl, .fo_poll = linux_file_poll, + .fo_kqfilter = invfo_kqfilter, + .fo_stat = linux_file_stat, .fo_close = linux_file_close, - .fo_ioctl = linux_file_ioctl, .fo_chmod = invfo_chmod, .fo_chown = invfo_chown, .fo_sendfile = invfo_sendfile, Modified: head/sys/opencrypto/cryptodev.c ============================================================================== --- head/sys/opencrypto/cryptodev.c Fri Sep 12 21:20:36 2014 (r271488) +++ head/sys/opencrypto/cryptodev.c Fri Sep 12 21:29:10 2014 (r271489) @@ -281,25 +281,19 @@ struct fcrypt { int sesn; }; -static int cryptof_rw(struct file *fp, struct uio *uio, - struct ucred *cred, int flags, struct thread *); -static int cryptof_truncate(struct file *, off_t, struct ucred *, - struct thread *); static int cryptof_ioctl(struct file *, u_long, void *, struct ucred *, struct thread *); -static int cryptof_poll(struct file *, int, struct ucred *, struct thread *); -static int cryptof_kqfilter(struct file *, struct knote *); static int cryptof_stat(struct file *, struct stat *, struct ucred *, struct thread *); static int cryptof_close(struct file *, struct thread *); static struct fileops cryptofops = { - .fo_read = cryptof_rw, - .fo_write = cryptof_rw, - .fo_truncate = cryptof_truncate, + .fo_read = invfo_rdwr, + .fo_write = invfo_rdwr, + .fo_truncate = invfo_truncate, .fo_ioctl = cryptof_ioctl, - .fo_poll = cryptof_poll, - .fo_kqfilter = cryptof_kqfilter, + .fo_poll = invfo_poll, + .fo_kqfilter = invfo_kqfilter, .fo_stat = cryptof_stat, .fo_close = cryptof_close, .fo_chmod = invfo_chmod, @@ -320,29 +314,6 @@ static int cryptodev_op(struct csession static int cryptodev_key(struct crypt_kop *); static int cryptodev_find(struct crypt_find_op *); -static int -cryptof_rw( - struct file *fp, - struct uio *uio, - struct ucred *active_cred, - int flags, - struct thread *td) -{ - - return (EIO); -} - -static int -cryptof_truncate( - struct file *fp, - off_t length, - struct ucred *active_cred, - struct thread *td) -{ - - return (EINVAL); -} - /* * Check a crypto identifier to see if it requested * a software device/driver. This can be done either @@ -961,26 +932,6 @@ cryptodev_find(struct crypt_find_op *fin /* ARGSUSED */ static int -cryptof_poll( - struct file *fp, - int events, - struct ucred *active_cred, - struct thread *td) -{ - - return (0); -} - -/* ARGSUSED */ -static int -cryptof_kqfilter(struct file *fp, struct knote *kn) -{ - - return (0); -} - -/* ARGSUSED */ -static int cryptof_stat( struct file *fp, struct stat *sb, Modified: head/sys/sys/file.h ============================================================================== --- head/sys/sys/file.h Fri Sep 12 21:20:36 2014 (r271488) +++ head/sys/sys/file.h Fri Sep 12 21:29:10 2014 (r271489) @@ -231,10 +231,14 @@ int fget_write(struct thread *td, int fd struct file **fpp); int _fdrop(struct file *fp, struct thread *td); +fo_rdwr_t invfo_rdwr; +fo_truncate_t invfo_truncate; +fo_ioctl_t invfo_ioctl; +fo_poll_t invfo_poll; +fo_kqfilter_t invfo_kqfilter; fo_chmod_t invfo_chmod; fo_chown_t invfo_chown; fo_sendfile_t invfo_sendfile; -fo_truncate_t invfo_truncate; fo_sendfile_t vn_sendfile; fo_seek_t vn_seek; From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 21:55:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06A0B464; Fri, 12 Sep 2014 21:55:30 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D25EAED6; Fri, 12 Sep 2014 21:55:29 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 520AAB94C; Fri, 12 Sep 2014 17:55:28 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Subject: Re: svn commit: r271489 - in head/sys: kern ofed/include/linux opencrypto sys Date: Fri, 12 Sep 2014 17:44:15 -0400 Message-ID: <352667542.FMiDv6jZct@ralph.baldwin.cx> User-Agent: KMail/4.10.5 (FreeBSD/10.0-STABLE; KDE/4.10.5; amd64; ; ) In-Reply-To: <201409122129.s8CLTBZ0070756@svn.freebsd.org> References: <201409122129.s8CLTBZ0070756@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 12 Sep 2014 17:55:28 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 21:55:30 -0000 On Friday, September 12, 2014 09:29:11 PM John Baldwin wrote: > Author: jhb > Date: Fri Sep 12 21:29:10 2014 > New Revision: 271489 > URL: http://svnweb.freebsd.org/changeset/base/271489 > > Log: > Fix various issues with invalid file operations: > - Add invfo_rdwr() (for read and write), invfo_ioctl(), invfo_poll(), > and invfo_kqfilter() for use by file types that do not support the > respective operations. Home-grown versions of invfo_poll() were > universally broken (they returned an errno value, invfo_poll() > uses poll_no_poll() to return an appropriate event mask). Home-grown > ioctl routines also tended to return an incorrect errno (invfo_ioctl > returns ENOTTY). > - Use the invfo_*() functions instead of local versions for > unsupported file operations. > - Reorder fileops members to match the order in the structure definition > to make it easier to spot missing members. > - Add several missing methods to linuxfileops used by the OFED shim > layer: fo_write(), fo_truncate(), fo_kqfilter(), and fo_stat(). Most > of these used invfo_*(), but a dummy fo_stat() implementation was > added. For this last, if you managed to get a handle to one of these file descriptors using any of the associated system calls (write(), fstat(), etc.) would trigger an instant-panic. I don't think that non-root users can get to these descriptors however. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 21:56:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A02536B1; Fri, 12 Sep 2014 21:56:57 +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 8BEB3EF4; Fri, 12 Sep 2014 21:56:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8CLuvDt084339; Fri, 12 Sep 2014 21:56:57 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CLuvDl084338; Fri, 12 Sep 2014 21:56:57 GMT (envelope-from np@FreeBSD.org) Message-Id: <201409122156.s8CLuvDl084338@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 12 Sep 2014 21:56:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271490 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 21:56:57 -0000 Author: np Date: Fri Sep 12 21:56:57 2014 New Revision: 271490 URL: http://svnweb.freebsd.org/changeset/base/271490 Log: cxgbe(4): add support for the SIOCGI2C ioctl. Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri Sep 12 21:29:10 2014 (r271489) +++ head/sys/dev/cxgbe/t4_main.c Fri Sep 12 21:56:57 2014 (r271490) @@ -1378,6 +1378,31 @@ fail: ifmedia_ioctl(ifp, ifr, &pi->media, cmd); break; + case SIOCGI2C: { + struct ifi2creq i2c; + + rc = copyin(ifr->ifr_data, &i2c, sizeof(i2c)); + if (rc != 0) + break; + if (i2c.dev_addr != 0xA0 && i2c.dev_addr != 0xA2) { + rc = EPERM; + break; + } + if (i2c.len > sizeof(i2c.data)) { + rc = EINVAL; + break; + } + rc = begin_synchronized_op(sc, pi, SLEEP_OK | INTR_OK, "t4i2c"); + if (rc) + return (rc); + rc = -t4_i2c_rd(sc, sc->mbox, pi->port_id, i2c.dev_addr, + i2c.offset, i2c.len, &i2c.data[0]); + end_synchronized_op(sc, 0); + if (rc == 0) + rc = copyout(&i2c, ifr->ifr_data, sizeof(i2c)); + break; + } + default: rc = ether_ioctl(ifp, cmd, data); } From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 22:20:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2253B139; Fri, 12 Sep 2014 22:20:08 +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 0E7BD18D; Fri, 12 Sep 2014 22:20:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8CMK7K4094255; Fri, 12 Sep 2014 22:20:07 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CMK7fw094254; Fri, 12 Sep 2014 22:20:07 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409122220.s8CMK7fw094254@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 12 Sep 2014 22:20:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271491 - head/release/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 22:20:08 -0000 Author: gjb Date: Fri Sep 12 22:20:07 2014 New Revision: 271491 URL: http://svnweb.freebsd.org/changeset/base/271491 Log: Simplify dvd package population with pkg-1.3. Submitted by: bdrewery MFC after: 3 days X-MFC-With: r271480, r271483 Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/pkg-stage.sh Modified: head/release/scripts/pkg-stage.sh ============================================================================== --- head/release/scripts/pkg-stage.sh Fri Sep 12 21:56:57 2014 (r271490) +++ head/release/scripts/pkg-stage.sh Fri Sep 12 22:20:07 2014 (r271491) @@ -40,19 +40,15 @@ if [ ! -x /usr/local/sbin/pkg ]; then /usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean fi -PKG_ABI=$(pkg -vv | grep ^ABI | awk '{print $3}') -PKG_ABI="${PKG_ABI%\";}" -PKG_ABI="${PKG_ABI#\"}" -export PKG_ABI +export PKG_ABI=$(pkg config ABI) export PKG_REPODIR="dvd/packages/${PKG_ABI}" -export PKG_CACHEDIR="${PKG_REPODIR}/All" -/bin/mkdir -p ${PKG_CACHEDIR} +/bin/mkdir -p ${PKG_REPODIR} # Print pkg(8) information to make debugging easier. ${PKGCMD} -vv ${PKGCMD} update -f -${PKGCMD} fetch -d ${DVD_PACKAGES} +${PKGCMD} fetch -o ${PKG_REPODIR} -d ${DVD_PACKAGES} ${PKGCMD} repo ${PKG_REPODIR} From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 22:21:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C20C1303; Fri, 12 Sep 2014 22:21:02 +0000 (UTC) Date: Fri, 12 Sep 2014 18:20:59 -0400 From: Glen Barber To: Bryan Drewery Subject: Re: svn commit: r271480 - head/release/scripts Message-ID: <20140912222059.GQ1198@hub.FreeBSD.org> References: <201409121852.s8CIq1Eg099609@svn.freebsd.org> <541363D6.3080502@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PhxIMoEr374zxJm2" Content-Disposition: inline In-Reply-To: <541363D6.3080502@FreeBSD.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 22:21:03 -0000 --PhxIMoEr374zxJm2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 12, 2014 at 04:21:26PM -0500, Bryan Drewery wrote: > There's still an issue with 1.3 here. pkg-fetch now uses mangled package > names in its cache dir, and does not use the All/ subdir anymore as > you've found. >=20 > # ls /var/cache/pkg/psutils-1.17_4* > /var/cache/pkg/psutils-1.17_4-fe318c25d7.txz > /var/cache/pkg/psutils-1.17_4.txz@ >=20 > Rather the polluting the DVD with these hashed filenames you can just > not set PKG_CACHEDIR and use pkg fetch -o ${PKG_REPODIR} -d ${DVD_PACKAGE= S}. >=20 Ah, I overlooked '-o' in 1.3.x. > You can also now simplify the PKG_ABI lookup 4 lines to just: export > PKG_ABI=3D$(pkg config ABI). >=20 > pkg fetch -o was added to 1.3 specifically for cases such as creating DVD= s. >=20 > It will then store the files in dvd/packages/${PKG_ABI}/All. >=20 > See https://people.freebsd.org/~bdrewery/patches/pkg-stage-1.3.diff >=20 Thank you. Committed as r271491. Glen --PhxIMoEr374zxJm2 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJUE3HLAAoJELls3eqvi17QqlYQAKKSc91M/yhsZhmo4yom0MZB sN8HHa08HIfGqRICTNsyeCMA7zq3wlJjMQ4Zs7mGfRTS6SJyH20xJ7mzOq2VW9OF Wq0O6ZPhqBf14V1iNTqcjbu6lVj9AwNMKd8DRWNC+tlMM5eG3GQbjnfKtpaNrffb 3fLTf9eMbotw2PhyPmArzaLJojxYQZFBZtP3yDnKQ1Ji6WJSudy6wBTGJx99qm44 SB6tGRO9KixHHMve1rWIp3pQ/+V2ekNn6QP/qQ3FLuiW1FhIjyty9a3VJehPSeRq YU3AGWOjj5Hga19jMPQpNpeeEhwhW1d527Uiqo6ALRkt2wEQY91dPCZ/it57R5UL 0iyRkExZ5Y8MVL6I8uLRstgz/seiqwIkJNTFtM/mvrO25hsw4DmqjLzT7ESPnV9s Htu+NzIUF08U7gqYcKsqV1xySn/B+e4ap3FsnphTr8uGLs3ELJsgrTjrZ/zGwuDY jdlgl97+sP7etfbv/hcsx/snUfKHwf9AWZlDJEBv6KQw4wAsq8B44bTkGH3Ka4id TR54l7g11+msCSBekImlapsvzHeKVKMvI0qa6LRXURsHtK/CA6ZbjYtZdWUSWfr+ JOA25LWZm2ACiXAE78hQR+8RFzaS1AsIepEG5tXPKF6xMOL25two8/9O4uDArZMr Zyf5+56U9vyUBnkIhM8O =funf -----END PGP SIGNATURE----- --PhxIMoEr374zxJm2-- From owner-svn-src-all@FreeBSD.ORG Fri Sep 12 22:40:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB7FDD67; Fri, 12 Sep 2014 22:40:13 +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 7D32D3CB; Fri, 12 Sep 2014 22:40:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8CMeDvC003690; Fri, 12 Sep 2014 22:40:13 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8CMeDnL003689; Fri, 12 Sep 2014 22:40:13 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201409122240.s8CMeDnL003689@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 12 Sep 2014 22:40:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271492 - head/sys/dev/usb/serial X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2014 22:40:13 -0000 Author: hselasky Date: Fri Sep 12 22:40:12 2014 New Revision: 271492 URL: http://svnweb.freebsd.org/changeset/base/271492 Log: Workaround for receiving Voice Calls using the E1750 dongle from Huawei. It might appear as if the firmware is allocating memory blocks according to the USB transfer size and if there is initially a lot of data, like at the answering machine prompt, it simply dies without any apparent reason. The simple workaround for this is to force a zero length packet at hardware level after every 512 bytes of data. This will force the other side to use smaller memory blocks aswell. MFC after: 1 week Modified: head/sys/dev/usb/serial/u3g.c Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Fri Sep 12 22:20:07 2014 (r271491) +++ head/sys/dev/usb/serial/u3g.c Fri Sep 12 22:40:12 2014 (r271492) @@ -75,6 +75,8 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, #define U3G_MAXPORTS 12 #define U3G_CONFIG_INDEX 0 #define U3G_BSIZE 2048 +#define U3G_TXSIZE (U3G_BSIZE / U3G_TXFRAMES) +#define U3G_TXFRAMES 4 /* Eject methods; See also usb_quirks.h:UQ_MSC_EJECT_* */ #define U3GINIT_HUAWEI 1 /* Requires Huawei init command */ @@ -145,6 +147,7 @@ static const struct usb_config u3g_confi .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .bufsize = U3G_BSIZE,/* bytes */ + .frames = U3G_TXFRAMES, .flags = {.pipe_bof = 1,.force_short_xfer = 1,}, .callback = &u3g_write_callback, }, @@ -1011,14 +1014,22 @@ u3g_write_callback(struct usb_xfer *xfer struct ucom_softc *ucom = usbd_xfer_softc(xfer); struct usb_page_cache *pc; uint32_t actlen; + uint32_t frame; switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: case USB_ST_SETUP: tr_setup: - pc = usbd_xfer_get_frame(xfer, 0); - if (ucom_get_data(ucom, pc, 0, U3G_BSIZE, &actlen)) { - usbd_xfer_set_frame_len(xfer, 0, actlen); + for (frame = 0; frame != U3G_TXFRAMES; frame++) { + usbd_xfer_set_frame_offset(xfer, frame * U3G_TXSIZE, frame); + + pc = usbd_xfer_get_frame(xfer, frame); + if (ucom_get_data(ucom, pc, 0, U3G_TXSIZE, &actlen) == 0) + break; + usbd_xfer_set_frame_len(xfer, frame, actlen); + } + if (frame != 0) { + usbd_xfer_set_frames(xfer, frame); usbd_transfer_submit(xfer); } break; From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 02:15:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E664488; Sat, 13 Sep 2014 02:15: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 753AE995; Sat, 13 Sep 2014 02:15: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 s8D2FW10006081; Sat, 13 Sep 2014 02:15:32 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8D2FWsl006078; Sat, 13 Sep 2014 02:15:32 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409130215.s8D2FWsl006078@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 13 Sep 2014 02:15:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271493 - in head: contrib/hyperv contrib/hyperv/tools contrib/hyperv/tools/scripts etc/mtree etc/rc.d libexec libexec/hyperv share/mk sys/conf sys/dev/hyperv/include sys/dev/hyperv/uti... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 02:15:32 -0000 Author: delphij Date: Sat Sep 13 02:15:31 2014 New Revision: 271493 URL: http://svnweb.freebsd.org/changeset/base/271493 Log: Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft, many thanks for their continued support of FreeBSD. While I'm there, also implement a new build knob, WITHOUT_HYPERV to disable building and installing of the HyperV utilities when necessary. The HyperV utilities are only built for i386 and amd64 targets. This is a stable/10 candidate for inclusion with 10.1-RELEASE. Submitted by: Wei Hu MFC after: 1 week Added: head/contrib/hyperv/ head/contrib/hyperv/tools/ head/contrib/hyperv/tools/hv_kvp_daemon.8 (contents, props changed) head/contrib/hyperv/tools/hv_kvp_daemon.c (contents, props changed) head/contrib/hyperv/tools/scripts/ head/contrib/hyperv/tools/scripts/hv_get_dhcp_info head/contrib/hyperv/tools/scripts/hv_get_dns_info head/contrib/hyperv/tools/scripts/hv_set_ifconfig head/etc/rc.d/hv_kvpd (contents, props changed) head/libexec/hyperv/ head/libexec/hyperv/Makefile (contents, props changed) head/sys/dev/hyperv/utilities/hv_kvp.c (contents, props changed) head/sys/dev/hyperv/utilities/unicode.h (contents, props changed) head/tools/build/options/WITHOUT_HYPERV (contents, props changed) head/tools/build/options/WITH_HYPERV (contents, props changed) head/usr.sbin/hyperv/ head/usr.sbin/hyperv/Makefile (contents, props changed) head/usr.sbin/hyperv/Makefile.inc (contents, props changed) head/usr.sbin/hyperv/tools/ head/usr.sbin/hyperv/tools/Makefile (contents, props changed) Modified: head/etc/mtree/BSD.usr.dist head/etc/mtree/BSD.var.dist head/etc/rc.d/Makefile head/libexec/Makefile head/share/mk/src.opts.mk head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/dev/hyperv/include/hyperv.h head/sys/dev/hyperv/utilities/hv_kvp.h head/sys/dev/hyperv/utilities/hv_util.c head/sys/modules/hyperv/utilities/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.sbin/Makefile.amd64 head/usr.sbin/Makefile.i386 Added: head/contrib/hyperv/tools/hv_kvp_daemon.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/hyperv/tools/hv_kvp_daemon.8 Sat Sep 13 02:15:31 2014 (r271493) @@ -0,0 +1,68 @@ +.\" Copyright (c) 2014 Microsoft Corp. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.Dd September 10, 2013 +.Dt HYPER-V 4 +.Os +.Sh NAME +.Nm hv_kvp_daemon +.Nd Hyper-V Key Value Pair Daemon +.Sh SYNOPSIS +The \fBhv_kvp_daemon\fP daemon provides the ability to store, retrieve, modify and delete +Key Value pairs for FreeBSD guest partitions running on Hyper-V. +.Sh DESCRIPTION +Hyper-V allows administrators to store custom metadata in the form +of Key Value pairs inside the FreeBSD guest partition. Administrators can +use Windows Powershell scripts to add, read, modify and delete such +Key Value pairs. + +The \fBhv_kvp_daemon\fP accepts Key Value pair management requests from the +\fBhv_utils\fP driver and performs the actual metadata management on the file-system. + +The same daemon and driver combination is also used to set and get +IP addresses from a FreeBSD guest. + +The set functionality is particularly +useful when the FreeBSD guest is assigned a static IP address and is failed +over from one Hyper-V host to another. After failover, Hyper-V uses the set IP +functionality to automatically +update the FreeBSD guest's IP address to its original static value. + +On the other hand, the get IP functionality is used to update the guest IP +address in the Hyper-V management console window. +.Sh SEE ALSO +.Xr hv_vmbus 4 , +.Xr hv_utils 4 , +.Xr hv_netvsc 4 , +.Xr hv_storvsc 4 , +.Xr hv_ata_pci_disengage 4 +.Sh HISTORY +Support for Hyper-V in the form of ports was first released in September 2013. +The daemon was developed through a joint effort between Citrix Inc., +Microsoft Corp. and Network Appliance Inc.. +.Sh AUTHORS +.An -nosplit +.Fx +support for \fBhv_kvp_daemon\fP was first added by +.An Microsoft BSD Integration Services Team Aq bsdic@microsoft.com . Added: head/contrib/hyperv/tools/hv_kvp_daemon.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/hyperv/tools/hv_kvp_daemon.c Sat Sep 13 02:15:31 2014 (r271493) @@ -0,0 +1,1518 @@ +/*- + * Copyright (c) 2014 Microsoft Corp. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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. + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "hv_kvp.h" + +typedef uint8_t __u8; +typedef uint16_t __u16; +typedef uint32_t __u32; +typedef uint64_t __u64; + +/* + * ENUM Data + */ + +enum key_index { + FullyQualifiedDomainName = 0, + IntegrationServicesVersion, /*This key is serviced in the kernel*/ + NetworkAddressIPv4, + NetworkAddressIPv6, + OSBuildNumber, + OSName, + OSMajorVersion, + OSMinorVersion, + OSVersion, + ProcessorArchitecture +}; + + +enum { + IPADDR = 0, + NETMASK, + GATEWAY, + DNS +}; + + +/* Global Variables */ + +/* + * The structure for operation handlers. + */ +struct kvp_op_hdlr { + int kvp_op_key; + void (*kvp_op_init)(void); + int (*kvp_op_exec)(struct hv_kvp_msg *kvp_op_msg, void *data); +}; + +static struct kvp_op_hdlr kvp_op_hdlrs[HV_KVP_OP_COUNT]; + +/* OS information */ + +static const char *os_name = ""; +static const char *os_major = ""; +static const char *os_minor = ""; +static const char *processor_arch; +static const char *os_build; +static const char *lic_version = "BSD Pre-Release version"; +static struct utsname uts_buf; + +/* Global flags */ +static int is_daemon = 1; +static int is_debugging = 0; + +#define KVP_LOG(priority, format, args...) do { \ + if (is_debugging == 1) { \ + if (is_daemon == 1) \ + syslog(priority, format, ## args); \ + else \ + printf(format, ## args); \ + } else { \ + if (priority < LOG_DEBUG) { \ + if (is_daemon == 1) \ + syslog(priority, format, ## args); \ + else \ + printf(format, ## args); \ + } \ + } \ + } while(0) + +/* + * For KVP pool file + */ + +#define MAX_FILE_NAME 100 +#define ENTRIES_PER_BLOCK 50 + +struct kvp_record { + char key[HV_KVP_EXCHANGE_MAX_KEY_SIZE]; + char value[HV_KVP_EXCHANGE_MAX_VALUE_SIZE]; +}; + +struct kvp_pool { + int pool_fd; + int num_blocks; + struct kvp_record *records; + int num_records; + char fname[MAX_FILE_NAME]; +}; + +static struct kvp_pool kvp_pools[HV_KVP_POOL_COUNT]; + + +static void +kvp_acquire_lock(int pool) +{ + struct flock fl = { 0, 0, 0, F_WRLCK, SEEK_SET, 0 }; + + fl.l_pid = getpid(); + + if (fcntl(kvp_pools[pool].pool_fd, F_SETLKW, &fl) == -1) { + KVP_LOG(LOG_ERR, "Failed to acquire the lock pool: %d", pool); + exit(EXIT_FAILURE); + } +} + + +static void +kvp_release_lock(int pool) +{ + struct flock fl = { 0, 0, 0, F_UNLCK, SEEK_SET, 0 }; + + fl.l_pid = getpid(); + + if (fcntl(kvp_pools[pool].pool_fd, F_SETLK, &fl) == -1) { + perror("fcntl"); + KVP_LOG(LOG_ERR, "Failed to release the lock pool: %d\n", pool); + exit(EXIT_FAILURE); + } +} + + +/* + * Write in-memory copy of KVP to pool files + */ +static void +kvp_update_file(int pool) +{ + FILE *filep; + size_t bytes_written; + + kvp_acquire_lock(pool); + + filep = fopen(kvp_pools[pool].fname, "w"); + if (!filep) { + kvp_release_lock(pool); + KVP_LOG(LOG_ERR, "Failed to open file, pool: %d\n", pool); + exit(EXIT_FAILURE); + } + + bytes_written = fwrite(kvp_pools[pool].records, + sizeof(struct kvp_record), + kvp_pools[pool].num_records, filep); + + if (ferror(filep) || fclose(filep)) { + kvp_release_lock(pool); + KVP_LOG(LOG_ERR, "Failed to write file, pool: %d\n", pool); + exit(EXIT_FAILURE); + } + + kvp_release_lock(pool); +} + + +/* + * Read KVPs from pool files and store in memory + */ +static void +kvp_update_mem_state(int pool) +{ + FILE *filep; + size_t records_read = 0; + struct kvp_record *record = kvp_pools[pool].records; + struct kvp_record *readp; + int num_blocks = kvp_pools[pool].num_blocks; + int alloc_unit = sizeof(struct kvp_record) * ENTRIES_PER_BLOCK; + + kvp_acquire_lock(pool); + + filep = fopen(kvp_pools[pool].fname, "r"); + if (!filep) { + kvp_release_lock(pool); + KVP_LOG(LOG_ERR, "Failed to open file, pool: %d\n", pool); + exit(EXIT_FAILURE); + } + for ( ; ; ) + { + readp = &record[records_read]; + records_read += fread(readp, sizeof(struct kvp_record), + ENTRIES_PER_BLOCK * num_blocks, + filep); + + if (ferror(filep)) { + KVP_LOG(LOG_ERR, "Failed to read file, pool: %d\n", pool); + exit(EXIT_FAILURE); + } + + if (!feof(filep)) { + /* + * Have more data to read. Expand the memory. + */ + num_blocks++; + record = realloc(record, alloc_unit * num_blocks); + + if (record == NULL) { + KVP_LOG(LOG_ERR, "malloc failed\n"); + exit(EXIT_FAILURE); + } + continue; + } + break; + } + + kvp_pools[pool].num_blocks = num_blocks; + kvp_pools[pool].records = record; + kvp_pools[pool].num_records = records_read; + + fclose(filep); + kvp_release_lock(pool); +} + + +static int +kvp_file_init(void) +{ + int fd; + FILE *filep; + size_t records_read; + char *fname; + struct kvp_record *record; + struct kvp_record *readp; + int num_blocks; + int i; + int alloc_unit = sizeof(struct kvp_record) * ENTRIES_PER_BLOCK; + + if (access("/var/db/hyperv/pool", F_OK)) { + if (mkdir("/var/db/hyperv/pool", + S_IRUSR | S_IWUSR | S_IROTH)) { + KVP_LOG(LOG_ERR, " Failed to create /var/db/hyperv/pool\n"); + exit(EXIT_FAILURE); + } + } + + for (i = 0; i < HV_KVP_POOL_COUNT; i++) + { + fname = kvp_pools[i].fname; + records_read = 0; + num_blocks = 1; + snprintf(fname, MAX_FILE_NAME, "/var/db/hyperv/pool/.kvp_pool_%d", i); + fd = open(fname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IROTH); + + if (fd == -1) { + return (1); + } + + + filep = fopen(fname, "r"); + if (!filep) { + return (1); + } + + record = malloc(alloc_unit * num_blocks); + if (record == NULL) { + fclose(filep); + return (1); + } + for ( ; ; ) + { + readp = &record[records_read]; + records_read += fread(readp, sizeof(struct kvp_record), + ENTRIES_PER_BLOCK, + filep); + + if (ferror(filep)) { + KVP_LOG(LOG_ERR, "Failed to read file, pool: %d\n", + i); + exit(EXIT_FAILURE); + } + + if (!feof(filep)) { + /* + * More data to read. + */ + num_blocks++; + record = realloc(record, alloc_unit * + num_blocks); + if (record == NULL) { + fclose(filep); + return (1); + } + continue; + } + break; + } + kvp_pools[i].pool_fd = fd; + kvp_pools[i].num_blocks = num_blocks; + kvp_pools[i].records = record; + kvp_pools[i].num_records = records_read; + fclose(filep); + } + + return (0); +} + + +static int +kvp_key_delete(int pool, __u8 *key, int key_size) +{ + int i; + int j, k; + int num_records; + struct kvp_record *record; + + KVP_LOG(LOG_DEBUG, "kvp_key_delete: pool = %d, " + "key = %s\n", pool, key); + + /* Update in-memory state */ + kvp_update_mem_state(pool); + + num_records = kvp_pools[pool].num_records; + record = kvp_pools[pool].records; + + for (i = 0; i < num_records; i++) + { + if (memcmp(key, record[i].key, key_size)) { + continue; + } + + KVP_LOG(LOG_DEBUG, "Found delete key in pool %d.\n", + pool); + /* + * We found a match at the end; Just update the number of + * entries and we are done. + */ + if (i == num_records) { + kvp_pools[pool].num_records--; + kvp_update_file(pool); + return (0); + } + + /* + * We found a match in the middle; Move the remaining + * entries up. + */ + j = i; + k = j + 1; + for ( ; k < num_records; k++) + { + strcpy(record[j].key, record[k].key); + strcpy(record[j].value, record[k].value); + j++; + } + kvp_pools[pool].num_records--; + kvp_update_file(pool); + return (0); + } + KVP_LOG(LOG_DEBUG, "Not found delete key in pool %d.\n", + pool); + return (1); +} + + +static int +kvp_key_add_or_modify(int pool, __u8 *key, __u32 key_size, __u8 *value, + __u32 value_size) +{ + int i; + int num_records; + struct kvp_record *record; + int num_blocks; + + KVP_LOG(LOG_DEBUG, "kvp_key_add_or_modify: pool = %d, " + "key = %s, value = %s\n,", pool, key, value); + + if ((key_size > HV_KVP_EXCHANGE_MAX_KEY_SIZE) || + (value_size > HV_KVP_EXCHANGE_MAX_VALUE_SIZE)) { + KVP_LOG(LOG_ERR, "kvp_key_add_or_modify: returning 1\n"); + return (1); + } + + /* Update the in-memory state. */ + kvp_update_mem_state(pool); + + num_records = kvp_pools[pool].num_records; + record = kvp_pools[pool].records; + num_blocks = kvp_pools[pool].num_blocks; + + for (i = 0; i < num_records; i++) + { + if (memcmp(key, record[i].key, key_size)) { + continue; + } + + /* + * Key exists. Just update the value and we are done. + */ + memcpy(record[i].value, value, value_size); + kvp_update_file(pool); + return (0); + } + + /* + * Key doesn't exist; Add a new KVP. + */ + if (num_records == (ENTRIES_PER_BLOCK * num_blocks)) { + /* Increase the size of the recodrd array. */ + record = realloc(record, sizeof(struct kvp_record) * + ENTRIES_PER_BLOCK * (num_blocks + 1)); + + if (record == NULL) { + return (1); + } + kvp_pools[pool].num_blocks++; + } + memcpy(record[i].value, value, value_size); + memcpy(record[i].key, key, key_size); + kvp_pools[pool].records = record; + kvp_pools[pool].num_records++; + kvp_update_file(pool); + return (0); +} + + +static int +kvp_get_value(int pool, __u8 *key, int key_size, __u8 *value, + int value_size) +{ + int i; + int num_records; + struct kvp_record *record; + + KVP_LOG(LOG_DEBUG, "kvp_get_value: pool = %d, key = %s\n,", + pool, key); + + if ((key_size > HV_KVP_EXCHANGE_MAX_KEY_SIZE) || + (value_size > HV_KVP_EXCHANGE_MAX_VALUE_SIZE)) { + return (1); + } + + /* Update the in-memory state first. */ + kvp_update_mem_state(pool); + + num_records = kvp_pools[pool].num_records; + record = kvp_pools[pool].records; + + for (i = 0; i < num_records; i++) + { + if (memcmp(key, record[i].key, key_size)) { + continue; + } + + /* Found the key */ + memcpy(value, record[i].value, value_size); + return (0); + } + + return (1); +} + + +static int +kvp_pool_enumerate(int pool, int index, __u8 *key, int key_size, + __u8 *value, int value_size) +{ + struct kvp_record *record; + + KVP_LOG(LOG_DEBUG, "kvp_pool_enumerate: pool = %d, index = %d\n,", + pool, index); + + /* First update our in-memory state first. */ + kvp_update_mem_state(pool); + record = kvp_pools[pool].records; + + /* Index starts with 0 */ + if (index >= kvp_pools[pool].num_records) { + return (1); + } + + memcpy(key, record[index].key, key_size); + memcpy(value, record[index].value, value_size); + return (0); +} + + +static void +kvp_get_os_info(void) +{ + char *p; + + uname(&uts_buf); + os_build = uts_buf.release; + os_name = uts_buf.sysname; + processor_arch = uts_buf.machine; + + /* + * Win7 host expects the build string to be of the form: x.y.z + * Strip additional information we may have. + */ + p = strchr(os_build, '-'); + if (p) { + *p = '\0'; + } + + /* + * We don't have any other information about the FreeBSD os. + */ + return; +} + +/* + * Given the interface name, return the MAC address. + */ +static char * +kvp_if_name_to_mac(char *if_name) +{ + char *mac_addr = NULL; + struct ifaddrs *ifaddrs_ptr; + struct ifaddrs *head_ifaddrs_ptr; + struct sockaddr_dl *sdl; + int status; + + status = getifaddrs(&ifaddrs_ptr); + + if (status >= 0) { + head_ifaddrs_ptr = ifaddrs_ptr; + do { + sdl = (struct sockaddr_dl *)(uintptr_t)ifaddrs_ptr->ifa_addr; + if ((sdl->sdl_type == IFT_ETHER) && + (strcmp(ifaddrs_ptr->ifa_name, if_name) == 0)) { + mac_addr = strdup(ether_ntoa((struct ether_addr *)(LLADDR(sdl)))); + break; + } + } while ((ifaddrs_ptr = ifaddrs_ptr->ifa_next) != NULL); + freeifaddrs(head_ifaddrs_ptr); + } + + return (mac_addr); +} + + +/* + * Given the MAC address, return the interface name. + */ +static char * +kvp_mac_to_if_name(char *mac) +{ + char *if_name = NULL; + struct ifaddrs *ifaddrs_ptr; + struct ifaddrs *head_ifaddrs_ptr; + struct sockaddr_dl *sdl; + int status; + size_t i; + char *buf_ptr; + + status = getifaddrs(&ifaddrs_ptr); + + if (status >= 0) { + head_ifaddrs_ptr = ifaddrs_ptr; + do { + sdl = (struct sockaddr_dl *)(uintptr_t)ifaddrs_ptr->ifa_addr; + if (sdl->sdl_type == IFT_ETHER) { + buf_ptr = strdup(ether_ntoa((struct ether_addr *)(LLADDR(sdl)))); + for (i = 0; i < strlen(buf_ptr); i++) + { + buf_ptr[i] = toupper(buf_ptr[i]); + } + + if (strncmp(buf_ptr, mac, strlen(mac)) == 0) { + /* Caller will free the memory */ + if_name = strdup(ifaddrs_ptr->ifa_name); + free(buf_ptr); + break; + }else if (buf_ptr != NULL) { + free(buf_ptr); + } + } + } while ((ifaddrs_ptr = ifaddrs_ptr->ifa_next) != NULL); + freeifaddrs(head_ifaddrs_ptr); + } + return (if_name); +} + + +static void +kvp_process_ipconfig_file(char *cmd, + char *config_buf, size_t len, + size_t element_size, int offset) +{ + char buf[256]; + char *p; + char *x; + FILE *file; + + /* + * First execute the command. + */ + file = popen(cmd, "r"); + if (file == NULL) { + return; + } + + if (offset == 0) { + memset(config_buf, 0, len); + } + while ((p = fgets(buf, sizeof(buf), file)) != NULL) { + if ((len - strlen(config_buf)) < (element_size + 1)) { + break; + } + + x = strchr(p, '\n'); + *x = '\0'; + strlcat(config_buf, p, len); + strlcat(config_buf, ";", len); + } + pclose(file); +} + + +static void +kvp_get_ipconfig_info(char *if_name, struct hv_kvp_ipaddr_value *buffer) +{ + char cmd[512]; + char dhcp_info[128]; + char *p; + FILE *file; + + /* + * Retrieve the IPV4 address of default gateway. + */ + snprintf(cmd, sizeof(cmd), "netstat -rn | grep %s | awk '/default/ {print $2 }'", if_name); + + /* + * Execute the command to gather gateway IPV4 info. + */ + kvp_process_ipconfig_file(cmd, (char *)buffer->gate_way, + (MAX_GATEWAY_SIZE * 2), INET_ADDRSTRLEN, 0); + + /* + * Retrieve the IPV6 address of default gateway. + */ + snprintf(cmd, sizeof(cmd), "netstat -rn inet6 | grep %s | awk '/default/ {print $2 }", if_name); + + /* + * Execute the command to gather gateway IPV6 info. + */ + kvp_process_ipconfig_file(cmd, (char *)buffer->gate_way, + (MAX_GATEWAY_SIZE * 2), INET6_ADDRSTRLEN, 1); + + /* + * we just invoke an external script to get the DNS info. + * + * Following is the expected format of the information from the script: + * + * ipaddr1 (nameserver1) + * ipaddr2 (nameserver2) + * . + * . + */ + /* Scripts are stored in /usr/libexec/hyperv/ directory */ + snprintf(cmd, sizeof(cmd), "%s", "sh /usr/libexec/hyperv/hv_get_dns_info"); + + /* + * Execute the command to get DNS info. + */ + kvp_process_ipconfig_file(cmd, (char *)buffer->dns_addr, + (MAX_IP_ADDR_SIZE * 2), INET_ADDRSTRLEN, 0); + + /* + * Invoke an external script to get the DHCP state info. + * The parameter to the script is the interface name. + * Here is the expected output: + * + * Enabled: DHCP enabled. + */ + + + snprintf(cmd, sizeof(cmd), "%s %s", + "sh /usr/libexec/hyperv/hv_get_dhcp_info", if_name); + + file = popen(cmd, "r"); + if (file == NULL) { + return; + } + + p = fgets(dhcp_info, sizeof(dhcp_info), file); + if (p == NULL) { + pclose(file); + return; + } + + if (!strncmp(p, "Enabled", 7)) { + buffer->dhcp_enabled = 1; + } else{ + buffer->dhcp_enabled = 0; + } + + pclose(file); +} + + +static unsigned int +hweight32(unsigned int *w) +{ + unsigned int res = *w - ((*w >> 1) & 0x55555555); + + res = (res & 0x33333333) + ((res >> 2) & 0x33333333); + res = (res + (res >> 4)) & 0x0F0F0F0F; + res = res + (res >> 8); + return ((res + (res >> 16)) & 0x000000FF); +} + + +static int +kvp_process_ip_address(void *addrp, + int family, char *buffer, + int length, int *offset) +{ + struct sockaddr_in *addr; + struct sockaddr_in6 *addr6; + int addr_length; + char tmp[50]; + const char *str; + + if (family == AF_INET) { + addr = (struct sockaddr_in *)addrp; + str = inet_ntop(family, &addr->sin_addr, tmp, 50); + addr_length = INET_ADDRSTRLEN; + } else { + addr6 = (struct sockaddr_in6 *)addrp; + str = inet_ntop(family, &addr6->sin6_addr.s6_addr, tmp, 50); + addr_length = INET6_ADDRSTRLEN; + } + + if ((length - *offset) < addr_length + 1) { + return (HV_KVP_E_FAIL); + } + if (str == NULL) { + strlcpy(buffer, "inet_ntop failed\n", length); + return (HV_KVP_E_FAIL); + } + if (*offset == 0) { + strlcpy(buffer, tmp, length); + } else{ + strlcat(buffer, tmp, length); + } + strlcat(buffer, ";", length); + + *offset += strlen(str) + 1; + return (0); +} + + +static int +kvp_get_ip_info(int family, char *if_name, int op, + void *out_buffer, size_t length) +{ + struct ifaddrs *ifap; + struct ifaddrs *curp; + int offset = 0; + int sn_offset = 0; + int error = 0; + char *buffer; + size_t buffer_length; + struct hv_kvp_ipaddr_value *ip_buffer; + char cidr_mask[5]; + int weight; + int i; + unsigned int *w = NULL; + char *sn_str; + size_t sn_str_length; + struct sockaddr_in6 *addr6; + + if (op == HV_KVP_OP_ENUMERATE) { + buffer = out_buffer; + buffer_length = length; + } else { + ip_buffer = out_buffer; + buffer = (char *)ip_buffer->ip_addr; + buffer_length = sizeof(ip_buffer->ip_addr); + ip_buffer->addr_family = 0; + } + + if (getifaddrs(&ifap)) { + strlcpy(buffer, "getifaddrs failed\n", buffer_length); + return (HV_KVP_E_FAIL); + } + + curp = ifap; + while (curp != NULL) { + if (curp->ifa_addr == NULL) { + curp = curp->ifa_next; + continue; + } + + if ((if_name != NULL) && + (strncmp(curp->ifa_name, if_name, strlen(if_name)))) { + /* + * We want info about a specific interface; + * just continue. + */ + curp = curp->ifa_next; + continue; + } + + /* + * We support two address families: AF_INET and AF_INET6. + * If family value is 0, we gather both supported + * address families; if not we gather info on + * the specified address family. + */ + if ((family != 0) && (curp->ifa_addr->sa_family != family)) { + curp = curp->ifa_next; + continue; + } + if ((curp->ifa_addr->sa_family != AF_INET) && + (curp->ifa_addr->sa_family != AF_INET6)) { + curp = curp->ifa_next; + continue; + } + + if (op == HV_KVP_OP_GET_IP_INFO) { + /* + * Get the info other than the IP address. + */ + if (curp->ifa_addr->sa_family == AF_INET) { + ip_buffer->addr_family |= ADDR_FAMILY_IPV4; + + /* + * Get subnet info. + */ + error = kvp_process_ip_address( + curp->ifa_netmask, + AF_INET, + (char *) + ip_buffer->sub_net, + length, + &sn_offset); + if (error) { + goto kvp_get_ip_info_ipaddr; + } + } else { + ip_buffer->addr_family |= ADDR_FAMILY_IPV6; + + /* + * Get subnet info in CIDR format. + */ + weight = 0; + sn_str = (char *)ip_buffer->sub_net; + sn_str_length = sizeof(ip_buffer->sub_net); + addr6 = (struct sockaddr_in6 *)(uintptr_t) + curp->ifa_netmask; + w = (unsigned int *)(uintptr_t)addr6->sin6_addr.s6_addr; + + for (i = 0; i < 4; i++) + { + weight += hweight32(&w[i]); + } + + snprintf(cidr_mask, sizeof(cidr_mask), "/%d", weight); + if ((length - sn_offset) < + (strlen(cidr_mask) + 1)) { + goto kvp_get_ip_info_ipaddr; + } + + if (sn_offset == 0) { + strlcpy(sn_str, cidr_mask, sn_str_length); + } else{ + strlcat(sn_str, cidr_mask, sn_str_length); + } + strlcat((char *)ip_buffer->sub_net, ";", sn_str_length); + sn_offset += strlen(sn_str) + 1; + } + + /* + * Collect other ip configuration info. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 02:18:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1FB9612; Sat, 13 Sep 2014 02:18:54 +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 DCC359B4; Sat, 13 Sep 2014 02:18:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8D2IsY8006548; Sat, 13 Sep 2014 02:18:54 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8D2IsQM006547; Sat, 13 Sep 2014 02:18:54 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409130218.s8D2IsQM006547@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 13 Sep 2014 02:18:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271494 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 02:18:55 -0000 Author: delphij Date: Sat Sep 13 02:18:54 2014 New Revision: 271494 URL: http://svnweb.freebsd.org/changeset/base/271494 Log: Regen. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sat Sep 13 02:15:31 2014 (r271493) +++ head/share/man/man5/src.conf.5 Sat Sep 13 02:18:54 2014 (r271494) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd September 10, 2014 +.Dd September 12, 2014 .Dt SRC.CONF 5 .Os .Sh NAME @@ -522,6 +522,18 @@ Set to build Hesiod support. .It Va WITHOUT_HTML .\" from FreeBSD: head/tools/build/options/WITHOUT_HTML 156932 2006-03-21 07:50:50Z ru Set to not build HTML docs. +.It Va WITHOUT_HYPERV +.\" from FreeBSD: head/tools/build/options/WITHOUT_HYPERV 271493 2014-09-13 02:15:31Z delphij +Set to not build or install HyperV utilities. +.Pp +It is a default setting on +arm/arm, arm/armeb, arm/armv6, arm/armv6hf, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +.It Va WITH_HYPERV +.\" from FreeBSD: head/tools/build/options/WITH_HYPERV 271493 2014-09-13 02:15:31Z delphij +Set to build and install HyperV utilities. +.Pp +It is a default setting on +amd64/amd64, i386/i386 and pc98/i386. .It Va WITHOUT_ICONV .\" from FreeBSD: head/tools/build/options/WITHOUT_ICONV 254919 2013-08-26 17:15:56Z antoine Set to not build iconv as part of libc. From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 03:10:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2213AED7; Sat, 13 Sep 2014 03:10:03 +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 02417E29; Sat, 13 Sep 2014 03:10:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8D3A2Hx031104; Sat, 13 Sep 2014 03:10:02 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8D3A2OF031100; Sat, 13 Sep 2014 03:10:02 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409130310.s8D3A2OF031100@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 13 Sep 2014 03:10:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271495 - in head: sbin/sysctl sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 03:10:03 -0000 Author: jhb Date: Sat Sep 13 03:10:02 2014 New Revision: 271495 URL: http://svnweb.freebsd.org/changeset/base/271495 Log: Add a sysctl to export the EFI memory map along with a handler in the sysctl(8) binary to format it. Reviewed by: emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D771 Modified: head/sbin/sysctl/sysctl.c head/sys/amd64/amd64/machdep.c Modified: head/sbin/sysctl/sysctl.c ============================================================================== --- head/sbin/sysctl/sysctl.c Sat Sep 13 02:18:54 2014 (r271494) +++ head/sbin/sysctl/sysctl.c Sat Sep 13 03:10:02 2014 (r271495) @@ -48,6 +48,11 @@ static const char rcsid[] = #include #include +#ifdef __amd64__ +#include +#include +#endif + #if defined(__amd64__) || defined(__i386__) #include #endif @@ -545,6 +550,91 @@ S_vmtotal(size_t l2, void *p) return (0); } +#ifdef __amd64__ +#define efi_next_descriptor(ptr, size) \ + ((struct efi_md *)(((uint8_t *) ptr) + size)) + +static int +S_efi_map(size_t l2, void *p) +{ + struct efi_map_header *efihdr; + struct efi_md *map; + const char *type; + size_t efisz; + int ndesc, i; + + static const char *types[] = { + "Reserved", + "LoaderCode", + "LoaderData", + "BootServicesCode", + "BootServicesData", + "RuntimeServicesCode", + "RuntimeServicesData", + "ConventionalMemory", + "UnusableMemory", + "ACPIReclaimMemory", + "ACPIMemoryNVS", + "MemoryMappedIO", + "MemoryMappedIOPortSpace", + "PalCode" + }; + + /* + * Memory map data provided by UEFI via the GetMemoryMap + * Boot Services API. + */ + if (l2 < sizeof(*efihdr)) { + warnx("S_efi_map length less than header"); + return (1); + } + efihdr = p; + efisz = (sizeof(struct efi_map_header) + 0xf) & ~0xf; + map = (struct efi_md *)((uint8_t *)efihdr + efisz); + + if (efihdr->descriptor_size == 0) + return (0); + if (l2 != efisz + efihdr->memory_size) { + warnx("S_efi_map length mismatch %zu vs %zu", l2, efisz + + efihdr->memory_size); + return (1); + } + ndesc = efihdr->memory_size / efihdr->descriptor_size; + + printf("\n%23s %12s %12s %8s %4s", + "Type", "Physical", "Virtual", "#Pages", "Attr"); + + for (i = 0; i < ndesc; i++, + map = efi_next_descriptor(map, efihdr->descriptor_size)) { + if (map->md_type <= EFI_MD_TYPE_PALCODE) + type = types[map->md_type]; + else + type = ""; + printf("\n%23s %012lx %12p %08lx ", type, map->md_phys, + map->md_virt, map->md_pages); + if (map->md_attr & EFI_MD_ATTR_UC) + printf("UC "); + if (map->md_attr & EFI_MD_ATTR_WC) + printf("WC "); + if (map->md_attr & EFI_MD_ATTR_WT) + printf("WT "); + if (map->md_attr & EFI_MD_ATTR_WB) + printf("WB "); + if (map->md_attr & EFI_MD_ATTR_UCE) + printf("UCE "); + if (map->md_attr & EFI_MD_ATTR_WP) + printf("WP "); + if (map->md_attr & EFI_MD_ATTR_RP) + printf("RP "); + if (map->md_attr & EFI_MD_ATTR_XP) + printf("XP "); + if (map->md_attr & EFI_MD_ATTR_RT) + printf("RUNTIME"); + } + return (0); +} +#endif + #if defined(__amd64__) || defined(__i386__) static int S_bios_smap_xattr(size_t l2, void *p) @@ -818,6 +908,10 @@ show_var(int *oid, int nlen) func = S_loadavg; else if (strcmp(fmt, "S,vmtotal") == 0) func = S_vmtotal; +#ifdef __amd64__ + else if (strcmp(fmt, "S,efi_map_header") == 0) + func = S_efi_map; +#endif #if defined(__amd64__) || defined(__i386__) else if (strcmp(fmt, "S,bios_smap_xattr") == 0) func = S_bios_smap_xattr; Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sat Sep 13 02:18:54 2014 (r271494) +++ head/sys/amd64/amd64/machdep.c Sat Sep 13 03:10:02 2014 (r271495) @@ -2124,6 +2124,26 @@ smap_sysctl_handler(SYSCTL_HANDLER_ARGS) SYSCTL_PROC(_machdep, OID_AUTO, smap, CTLTYPE_OPAQUE|CTLFLAG_RD, NULL, 0, smap_sysctl_handler, "S,bios_smap_xattr", "Raw BIOS SMAP data"); +static int +efi_map_sysctl_handler(SYSCTL_HANDLER_ARGS) +{ + struct efi_map_header *efihdr; + caddr_t kmdp; + uint32_t efisize; + + kmdp = preload_search_by_type("elf kernel"); + if (kmdp == NULL) + kmdp = preload_search_by_type("elf64 kernel"); + efihdr = (struct efi_map_header *)preload_search_info(kmdp, + MODINFO_METADATA | MODINFOMD_EFI_MAP); + if (efihdr == NULL) + return (0); + efisize = *((uint32_t *)efihdr - 1); + return (SYSCTL_OUT(req, efihdr, efisize)); +} +SYSCTL_PROC(_machdep, OID_AUTO, efi_map, CTLTYPE_OPAQUE|CTLFLAG_RD, NULL, 0, + efi_map_sysctl_handler, "S,efi_map_header", "Raw EFI Memory Map"); + void spinlock_enter(void) { From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 03:33:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EC3A257; Sat, 13 Sep 2014 03:33:58 +0000 (UTC) Received: from mail-ie0-x232.google.com (mail-ie0-x232.google.com [IPv6:2607:f8b0:4001:c03::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3FC3CCD; Sat, 13 Sep 2014 03:33:58 +0000 (UTC) Received: by mail-ie0-f178.google.com with SMTP id tp5so2075790ieb.9 for ; Fri, 12 Sep 2014 20:33:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=eX+YDwxvRmqDqAIjs1pqXqSuq22kYysKnWBmD6/mk24=; b=fw7M+dfoM+kEFbHOHzATCSvwZUJ5zelXpzdjfT8lTKPSydqM3dumdfgge2xbrGM+ZA SthwcwUGiaDW/Ip9JU+alJcc89uKCoHfck3TQindSyJICDhlpYhiZ+nY+uH9li7+u+AP etwqk1c1mgvEkp3O+oZ5vCUBKno+NQks/Zmi61OLcK9GUhtMHErkQgDlOljw+zcVmHLA Y9BcS+gLLdixWipv9/l1EbKT5MDp1xkyopgrutDOBMDrkEzjuyTCe4OwUGUwlKOHOyMJ vbSBPK5QklqHz0PTt6kIHE5l1HEW8aJmmvxasK/bR5N64j8+coBy4boaNjeMJgtpvVVr cczg== X-Received: by 10.42.41.7 with SMTP id n7mr11741176ice.43.1410579237314; Fri, 12 Sep 2014 20:33:57 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.44.1 with HTTP; Fri, 12 Sep 2014 20:33:37 -0700 (PDT) In-Reply-To: <201409130310.s8D3A2OF031100@svn.freebsd.org> References: <201409130310.s8D3A2OF031100@svn.freebsd.org> From: Ed Maste Date: Fri, 12 Sep 2014 23:33:37 -0400 X-Google-Sender-Auth: I6EPA1mkulCoAZX1Q1YUEyRZ38c Message-ID: Subject: Re: svn commit: r271495 - in head: sbin/sysctl sys/amd64/amd64 To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 03:33:58 -0000 On 12 September 2014 23:10, John Baldwin wrote: > Author: jhb > Date: Sat Sep 13 03:10:02 2014 > New Revision: 271495 > URL: http://svnweb.freebsd.org/changeset/base/271495 > > Log: > Add a sysctl to export the EFI memory map along with a handler in the > sysctl(8) binary to format it. The output (from QEMU in this case) looks like: root@:~ # sysctl machdep.efi_map machdep.efi_map: Type Physical Virtual #Pages Attr ConventionalMemory 000000000000 0x0 000000a0 UC WC WT WB ConventionalMemory 000000100000 0x0 00000720 UC WC WT WB BootServicesData 000000820000 0x0 000007e0 UC WC WT WB ConventionalMemory 000001000000 0x0 00003000 UC WC WT WB BootServicesData 000004000000 0x0 00000020 UC WC WT WB ConventionalMemory 000004020000 0x0 0000088a UC WC WT WB LoaderData 0000048aa000 0x0 00002200 UC WC WT WB LoaderCode 000006aaa000 0x0 0000004a UC WC WT WB LoaderData 000006af4000 0x0 0000004c UC WC WT WB LoaderCode 000006b40000 0x0 0000000f UC WC WT WB ConventionalMemory 000006b4f000 0x0 0000000c UC WC WT WB LoaderData 000006b5b000 0x0 00000005 UC WC WT WB BootServicesData 000006b60000 0x0 0000018c UC WC WT WB BootServicesCode 000006cec000 0x0 00000150 UC WC WT WB RuntimeServicesData 000006e3c000 0x0 00000012 UC WC WT WB RUNTIME BootServicesData 000006e4e000 0x0 00000f00 UC WC WT WB BootServicesCode 000007d4e000 0x0 00000180 UC WC WT WB RuntimeServicesCode 000007ece000 0x0 00000030 UC WC WT WB RUNTIME RuntimeServicesData 000007efe000 0x0 00000024 UC WC WT WB RUNTIME Reserved 000007f22000 0x0 00000004 UC WC WT WB ACPIReclaimMemory 000007f26000 0x0 00000008 UC WC WT WB ACPIMemoryNVS 000007f2e000 0x0 00000004 UC WC WT WB BootServicesData 000007f32000 0x0 0000009e UC WC WT WB RuntimeServicesData 000007fd0000 0x0 00000030 UC WC WT WB RUNTIME From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 04:23:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 367EDB0A; Sat, 13 Sep 2014 04:23:32 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 147867D5; Sat, 13 Sep 2014 04:23:32 +0000 (UTC) Received: from delphij-macbook.local (unknown [10.64.64.50]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id BBC495932; Fri, 12 Sep 2014 21:23:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1410582211; x=1410596611; bh=6wpauIf2or+RML20vaqZPZRybKGXyppeIH2ZY3L4sqE=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=YVgGnwYEzhm9T/EEH/vot2K7xw5BZMdM/n8a3OQdSsPulf0mTBuE/2p9Lx3xTi7+8 85rTrRW3oVBwmFW1AMYFCZ08P0EKFL0BuSoE5tW6Hrx/TVsr2SKn4ax+ZuuQ4AgJYk U5Lw2pJwq3PmTk3pQ/7IDIR1I/XCVSvMtTkw+zZk= Message-ID: <5413C6C1.7090308@delphij.net> Date: Sat, 13 Sep 2014 12:23:29 +0800 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Adrian Chadd , Xin LI Subject: Re: svn commit: r269964 - head/sys/kern References: <201408140531.s7E5VeWw077792@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 04:23:32 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 9/13/14 3:41 AM, Adrian Chadd wrote: > Hi guys, > > Both r269963 and r269964 have broken the MIPS platforms with > smaller amounts of RAM (< 64MB.) > > Sean noticed it and filed a bug: > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193465 > > Can we please figure out what changed? Otherwise I'm going to > revert these two changes until we figure out what happened. Could you please try if this would mitigate the issue? Index: sys/kern/kern_malloc.c =================================================================== - --- sys/kern/kern_malloc.c (revision 271494) +++ sys/kern/kern_malloc.c (working copy) @@ -717,6 +717,8 @@ kmeminit(void) * a given architecture. */ mem_size = vm_cnt.v_page_count; + if (mem_size <= 32768) /* delphij XXX 128MB */ + kmem_zmax = PAGE_SIZE; if (vm_kmem_size_scale < 1) vm_kmem_size_scale = VM_KMEM_SIZE_SCALE; > Thanks, > > > -a > > > On 13 August 2014 22:31, Xin LI wrote: >> Author: delphij Date: Thu Aug 14 05:31:39 2014 New Revision: >> 269964 URL: http://svnweb.freebsd.org/changeset/base/269964 >> >> Log: Add a new loader tunable, vm.kmem_zmax which allows a system >> administrator to limit the maximum allocation size that malloc(9) >> would consider using the UMA cache allocator as backend. >> >> Suggested by: alfred MFC after: 2 weeks >> >> Modified: head/sys/kern/kern_malloc.c >> >> Modified: head/sys/kern/kern_malloc.c >> ============================================================================== >> >> - --- head/sys/kern/kern_malloc.c Thu Aug 14 05:13:24 2014 (r269963) >> +++ head/sys/kern/kern_malloc.c Thu Aug 14 05:31:39 2014 >> (r269964) @@ -172,6 +172,10 @@ u_long vm_kmem_size; >> SYSCTL_ULONG(_vm, OID_AUTO, kmem_size, CTLFLAG_RDTUN, >> &vm_kmem_size, 0, "Size of kernel memory"); >> >> +static u_long kmem_zmax = KMEM_ZMAX; +SYSCTL_ULONG(_vm, >> OID_AUTO, kmem_zmax, CTLFLAG_RDTUN, &kmem_zmax, 0, + "Maximum >> allocation size that malloc(9) would use UMA as backend"); + >> static u_long vm_kmem_size_min; SYSCTL_ULONG(_vm, OID_AUTO, >> kmem_size_min, CTLFLAG_RDTUN, &vm_kmem_size_min, 0, "Minimum size >> of kernel memory"); @@ -485,7 +489,7 @@ malloc(unsigned long >> size, struct malloc size = redzone_size_ntor(size); #endif >> >> - if (size <= KMEM_ZMAX) { + if (size <= kmem_zmax) >> { mtip = mtp->ks_handle; if (size & KMEM_ZMASK) size = (size & >> ~KMEM_ZMASK) + KMEM_ZBASE; @@ -776,6 +780,9 @@ mallocinit(void >> *dummy) >> >> uma_startup2(); >> >> + if (kmem_zmax < PAGE_SIZE || kmem_zmax > KMEM_ZMAX) + >> kmem_zmax = KMEM_ZMAX; + mt_zone = uma_zcreate("mt_zone", >> sizeof(struct malloc_type_internal), #ifdef INVARIANTS >> mtrash_ctor, mtrash_dtor, mtrash_init, mtrash_fini, @@ -800,7 >> +807,7 @@ mallocinit(void *dummy) } for (;i <= size; i+= >> KMEM_ZBASE) kmemsize[i >> KMEM_ZSHIFT] = indx; - + } } >> SYSINIT(kmem, SI_SUB_KMEM, SI_ORDER_SECOND, mallocinit, NULL); >> > -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJUE8bBAAoJEJW2GBstM+nsxp8P+gLu9St6tQsTeSy2nWIe3wKY PIvkntSRxPFnHFyHnaeSqdwpi1+7vVyb2kmy3fj/HYEvyiBwZf1mw4akOxUTjlo2 nTSISdnn07rACrnQXOxrc9gd0PDETbWzZuAZ5gOA5Y/REQ6DVl6nZUrtaBhzfuZr OoQilpXTuP4n82tjl3OufjdN8ObcAlGigrjgjOxLL/deUfW5zktdkgrPSuFbtYYj d5ERr2J48tTul0VnVBbeo7AfE082l/TKynnPJiKeJRhaE0oUVVlT2tkJjZz//E3k Rw5dRdn0ptXroo88Pk/HdwxZi1eOTv2RJyz7zYIH9N8YLSZFNhGnrXbXbH6PFGqV 3cGaYIfiq4OTtSaY0nxjdRRllm/Alm0r9JSTw99nzCpW8G/QI5544znmNNZ52bCF /Z/HNCVLWChzd4rQ4f8PWwjn06vCYhLGWFEH0DBdTRMRxCtBLDDyTBhePBebh7dc RNFTG+1gPQSNXIPMBa/UU9YLqdXBqYYpD53qYKjYxovR3Yp1ZpjwsV1S2ehC4rFM 33+Rma7zVKkTaPsX9GTL4PhqWHyMXfUGbMD3VawAGAVxsJvDUgjVkWyTgWgfeZDi AXq19g79MoGX5sDS1bGx24d9Yy8gEI6nQ0z0hvJSE3g/29+3JnlNgP6537vpSJTo 5+cK52wxY4fKff+Txr/Y =mOQe -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 05:08:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6DCBF0; Sat, 13 Sep 2014 05:08:35 +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 B0ADFB19; Sat, 13 Sep 2014 05:08:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8D58ZgV085703; Sat, 13 Sep 2014 05:08:35 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8D58Z0S085702; Sat, 13 Sep 2014 05:08:35 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201409130508.s8D58Z0S085702@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Sat, 13 Sep 2014 05:08:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271496 - head/share/examples/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 05:08:35 -0000 Author: rodrigc Date: Sat Sep 13 05:08:35 2014 New Revision: 271496 URL: http://svnweb.freebsd.org/changeset/base/271496 Log: Propagate the error status of /usr/sbin/bhyve out of the vmrun.sh script. Clean up the /dev/vmm entry for this VM when vmrun.sh exits. Reviewed by: neel Phabric: D767 Modified: head/share/examples/bhyve/vmrun.sh Modified: head/share/examples/bhyve/vmrun.sh ============================================================================== --- head/share/examples/bhyve/vmrun.sh Sat Sep 13 03:10:02 2014 (r271495) +++ head/share/examples/bhyve/vmrun.sh Sat Sep 13 05:08:35 2014 (r271496) @@ -204,7 +204,8 @@ while [ 1 ]; do ${LOADER} -c ${console} -m ${memsize} -d ${BOOTDISK} ${loader_opt} \ ${vmname} - if [ $? -ne 0 ]; then + bhyve_exit=$? + if [ $bhyve_exit -ne 0 ]; then break fi @@ -239,6 +240,7 @@ while [ 1 ]; do ${installer_opt} \ ${vmname} + bhyve_exit=$? # bhyve returns the following status codes: # 0 - VM has been reset # 1 - VM has been powered off @@ -246,9 +248,18 @@ while [ 1 ]; do # 3 - VM generated a triple fault # all other non-zero status codes are errors # - if [ $? -ne 0 ]; then + if [ $bhyve_exit -ne 0 ]; then break fi done -exit 99 + +case $bhyve_exit in + 0|1|2) + # Cleanup /dev/vmm entry when bhyve did not exit + # due to an error. + ${BHYVECTL} --vm=${vmname} --destroy > /dev/null 2>&1 + ;; +esac + +exit $bhyve_exit From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 05:22:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0947E47A; Sat, 13 Sep 2014 05:22:55 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CFC76C97; Sat, 13 Sep 2014 05:22:54 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s8D5MfSG084298 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 Sep 2014 22:22:41 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s8D5MfMx084297; Fri, 12 Sep 2014 22:22:41 -0700 (PDT) (envelope-from jmg) Date: Fri, 12 Sep 2014 22:22:41 -0700 From: John-Mark Gurney To: d@delphij.net Subject: Re: svn commit: r269964 - head/sys/kern Message-ID: <20140913052241.GU82175@funkthat.com> References: <201408140531.s7E5VeWw077792@svn.freebsd.org> <5413C6C1.7090308@delphij.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5413C6C1.7090308@delphij.net> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Fri, 12 Sep 2014 22:22:41 -0700 (PDT) Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , Xin LI , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 05:22:55 -0000 Xin Li wrote this message on Sat, Sep 13, 2014 at 12:23 +0800: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 9/13/14 3:41 AM, Adrian Chadd wrote: > > Hi guys, > > > > Both r269963 and r269964 have broken the MIPS platforms with > > smaller amounts of RAM (< 64MB.) > > > > Sean noticed it and filed a bug: > > > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193465 > > > > Can we please figure out what changed? Otherwise I'm going to > > revert these two changes until we figure out what happened. > > Could you please try if this would mitigate the issue? > > Index: sys/kern/kern_malloc.c > =================================================================== > - --- sys/kern/kern_malloc.c (revision 271494) > +++ sys/kern/kern_malloc.c (working copy) > @@ -717,6 +717,8 @@ kmeminit(void) > * a given architecture. > */ > mem_size = vm_cnt.v_page_count; > + if (mem_size <= 32768) /* delphij XXX 128MB */ > + kmem_zmax = PAGE_SIZE; > > if (vm_kmem_size_scale < 1) > vm_kmem_size_scale = VM_KMEM_SIZE_SCALE; > Has more research been done on this? My 64MB AVILA board boots fine, and ath attaches fine... I can't test if ath works yet since I can't find my antennas... FreeBSD 11.0-CURRENT #35 r271408M: Wed Sep 10 14:42:46 PDT 2014 jmg@carbon.funkthat.com:/usr/obj/arm.armeb/usr/src.avila/sys/AVILA arm gcc version 4.2.1 20070831 patched [FreeBSD] CPU: IXP425 266MHz rev 1 (ARMv5TE) (XScale core) Big-endian DC enabled IC enabled WB enabled LABT branch prediction enabled 32KB/32B 32-way instruction cache 32KB/32B 32-way write-back-locking data cache real memory = 67104768 (63 MB) avail memory = 58843136 (56 MB) random: initialized ixp0: ixp0: 37603 pcib0: on ixp0 pci0: on pcib0 ath0: irq 27 at device 2.0 on pci0 ath0: AR9220 mac 128.2 RF5133 phy 13.0 ath0: 2GHz radio: 0x0000; 5GHz radio: 0x00c0 [...] -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 06:05:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B1BF90A; Sat, 13 Sep 2014 06:05:54 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7B326F88; Sat, 13 Sep 2014 06:05:54 +0000 (UTC) Received: from delphij-macbook.local (unknown [1.202.73.210]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 8125A5E3B; Fri, 12 Sep 2014 23:05:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1410588353; x=1410602753; bh=lnr/S0UoLTpFVRa5gZcasbCYqdK00Q1uthGFQdR2bVY=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=s9wvZNyqBSv06PmJw2Wo/AXc5IVvtIGBb72YiMHaDdHuF62ovZ0ztGgEyGhf9c1QC Nb3VrlSSIjkk4vpKW92ivdP87UkJegW0gkTeRmci7F6HQalGbqhciWkAvIZ1I7cGV6 ++H22xIIRiR7N1ZkD8QF5m36otOebozc0BXPHW24= Message-ID: <5413DEBE.7060301@delphij.net> Date: Sat, 13 Sep 2014 14:05:50 +0800 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: John-Mark Gurney , d@delphij.net Subject: Re: svn commit: r269964 - head/sys/kern References: <201408140531.s7E5VeWw077792@svn.freebsd.org> <5413C6C1.7090308@delphij.net> <20140913052241.GU82175@funkthat.com> In-Reply-To: <20140913052241.GU82175@funkthat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , Xin LI , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 06:05:54 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 9/13/14 1:22 PM, John-Mark Gurney wrote: > Xin Li wrote this message on Sat, Sep 13, 2014 at 12:23 +0800: >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 >> >> On 9/13/14 3:41 AM, Adrian Chadd wrote: >>> Hi guys, >>> >>> Both r269963 and r269964 have broken the MIPS platforms with >>> smaller amounts of RAM (< 64MB.) >>> >>> Sean noticed it and filed a bug: >>> >>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193465 >>> >>> Can we please figure out what changed? Otherwise I'm going to >>> revert these two changes until we figure out what happened. >> >> Could you please try if this would mitigate the issue? >> >> Index: sys/kern/kern_malloc.c >> =================================================================== >> >> - - --- sys/kern/kern_malloc.c (revision 271494) >> +++ sys/kern/kern_malloc.c (working copy) @@ -717,6 +717,8 >> @@ kmeminit(void) * a given architecture. */ mem_size = >> vm_cnt.v_page_count; + if (mem_size <= 32768) /* delphij >> XXX 128MB */ + kmem_zmax = PAGE_SIZE; >> >> if (vm_kmem_size_scale < 1) vm_kmem_size_scale = >> VM_KMEM_SIZE_SCALE; >> > > Has more research been done on this? My 64MB AVILA board boots > fine, and ath attaches fine... It's theoretically possible that my change brings a regression for small system, as the larger allocation units now "caches" the allocation instead of returning them immediately. Sean also confirms that reverting the two changes only would fix the issue, so I think we should use some autotune here. Cheers, -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJUE96+AAoJEJW2GBstM+nsb6AP/RrwGeuuNUVpfHhOqIaZEBm3 vtYINve38oxTF9D3FCONWpib7/ZggSfdN7kkSJ5oKNbjJtrbhqqIrhuKNyo03L7o WbR3TLam0+8tCYL7EYe93D6wqWlkyPZkOv4G1amh2UxwWnfhP/uruLA/LJPm/z/+ 41gT2DHRUDj9JmeDt4R7EPIO7UOZ9uqs+dJ8mpx0hvxvTUgxR94umtX5/Ijmp6Fj MHuiVjgkJ9DM6RHlXECenYj8gTEbwV8MVNQhoIrlqDSbZsy+O4FMek3byFy6OL9U pPd9O/QDHCfPoOK12RULv3+7c6NhXXiVYU3RoBrwDEJx5XhfG8bvrdRZha2JgJkz KwyVBKqMXH6QjhRFtisgd630cchew7XO+21TK5zeKt0sad6CETLJyIsiHuOkHYI3 vFkIPGu3uF9YFMzacqiQKydhaN/6chQYh2vlmxpcnuiP3ispfJjZyPyCCs1vadip 5uJkG0bIHb/kQZJ8LouEk+W9QA0XUlIaYbP0JxzTMqvH5iyqMTId9XgsVgqWK/th XrCGzXuoi5fQw0NauhdKoihJeJ/Ut+7cblv6h7IpmLFEDUJZvVtgYcaZOsOhC2FG 4C//ENzbcioBimvujnktvOJEwT7XpoBwuIcfIVoz/tMZYgx3y5w1mRIGUoh1/XAP kTQmYqaG5A1CrBEFPeOI =i4ee -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 07:25:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 298C4718; Sat, 13 Sep 2014 07:25:41 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id F2AB4831; Sat, 13 Sep 2014 07:25:40 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s8D7PWnN086006 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 13 Sep 2014 00:25:33 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s8D7PWgP086005; Sat, 13 Sep 2014 00:25:32 -0700 (PDT) (envelope-from jmg) Date: Sat, 13 Sep 2014 00:25:32 -0700 From: John-Mark Gurney To: d@delphij.net Subject: Re: svn commit: r269964 - head/sys/kern Message-ID: <20140913072532.GV82175@funkthat.com> References: <201408140531.s7E5VeWw077792@svn.freebsd.org> <5413C6C1.7090308@delphij.net> <20140913052241.GU82175@funkthat.com> <5413DEBE.7060301@delphij.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5413DEBE.7060301@delphij.net> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Sat, 13 Sep 2014 00:25:33 -0700 (PDT) Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , Xin LI , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 07:25:41 -0000 Xin Li wrote this message on Sat, Sep 13, 2014 at 14:05 +0800: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 9/13/14 1:22 PM, John-Mark Gurney wrote: > > Xin Li wrote this message on Sat, Sep 13, 2014 at 12:23 +0800: > >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 > >> > >> On 9/13/14 3:41 AM, Adrian Chadd wrote: > >>> Hi guys, > >>> > >>> Both r269963 and r269964 have broken the MIPS platforms with > >>> smaller amounts of RAM (< 64MB.) > >>> > >>> Sean noticed it and filed a bug: > >>> > >>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193465 > >>> > >>> Can we please figure out what changed? Otherwise I'm going to > >>> revert these two changes until we figure out what happened. > >> > >> Could you please try if this would mitigate the issue? > >> > >> Index: sys/kern/kern_malloc.c > >> =================================================================== > >> > >> > - - --- sys/kern/kern_malloc.c (revision 271494) > >> +++ sys/kern/kern_malloc.c (working copy) @@ -717,6 +717,8 > >> @@ kmeminit(void) * a given architecture. */ mem_size = > >> vm_cnt.v_page_count; + if (mem_size <= 32768) /* delphij > >> XXX 128MB */ + kmem_zmax = PAGE_SIZE; > >> > >> if (vm_kmem_size_scale < 1) vm_kmem_size_scale = > >> VM_KMEM_SIZE_SCALE; > >> > > > > Has more research been done on this? My 64MB AVILA board boots > > fine, and ath attaches fine... > > It's theoretically possible that my change brings a regression for > small system, as the larger allocation units now "caches" the > allocation instead of returning them immediately. Sean also confirms > that reverting the two changes only would fix the issue, so I think we > should use some autotune here. I agree that it could possibly bring a regression for small memory systems, but I'm not seeing that w/ mine... and it looks like we have zone draining in the case of low memory, though it looks like we don't have a "target" for how much memory to free, nor do we order which zones we should free from (like remembering where we stopped, so we don't flush all memory, or target zones/buckets)... I'm also concerned that your patch prevents people from using a larger max if they'd like by setting a tunable... Your patch just hard sets it, preventing the tunable to doing anything useful on these smaller systems, so if someone wants the additional zones, they'd need to modify the source... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 07:45:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 146B0BFD; Sat, 13 Sep 2014 07:45:04 +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 F34FE9AD; Sat, 13 Sep 2014 07:45:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8D7j3lP059437; Sat, 13 Sep 2014 07:45:03 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8D7j3jv059435; Sat, 13 Sep 2014 07:45:03 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409130745.s8D7j3jv059435@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 13 Sep 2014 07:45:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271503 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 07:45:04 -0000 Author: mav Date: Sat Sep 13 07:45:03 2014 New Revision: 271503 URL: http://svnweb.freebsd.org/changeset/base/271503 Log: Implement range checks between UNMAP and READ/WRITE commands. Before this change UNMAP completely blocked other I/Os while running. Now it blocks only colliding ones, slowing down others only due to ZFS locks collisions. Sponsored by: iXsystems, Inc. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_ser_table.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sat Sep 13 06:51:19 2014 (r271502) +++ head/sys/cam/ctl/ctl.c Sat Sep 13 07:45:03 2014 (r271503) @@ -390,7 +390,7 @@ static int ctl_inquiry_evpd_bdc(struct c static int ctl_inquiry_evpd_lbp(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd(struct ctl_scsiio *ctsio); static int ctl_inquiry_std(struct ctl_scsiio *ctsio); -static int ctl_get_lba_len(union ctl_io *io, uint64_t *lba, uint32_t *len); +static int ctl_get_lba_len(union ctl_io *io, uint64_t *lba, uint64_t *len); static ctl_action ctl_extent_check(union ctl_io *io1, union ctl_io *io2); static ctl_action ctl_check_for_blockage(union ctl_io *pending_io, union ctl_io *ooa_io); @@ -5259,6 +5259,8 @@ ctl_data_submit_done(union ctl_io *io) void ctl_config_write_done(union ctl_io *io) { + uint8_t *buf; + /* * If the IO_CONT flag is set, we need to call the supplied * function to continue processing the I/O, instead of completing @@ -5278,9 +5280,13 @@ ctl_config_write_done(union ctl_io *io) * have data allocated, like write buffer, and commands that have * no data, like start/stop unit, we need to check here. */ - if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT) - free(io->scsiio.kern_data_ptr, M_CTL); + if (io->io_hdr.flags & CTL_FLAG_ALLOCATED) + buf = io->scsiio.kern_data_ptr; + else + buf = NULL; ctl_done(io); + if (buf) + free(buf, M_CTL); } /* @@ -6041,7 +6047,7 @@ ctl_unmap(struct ctl_scsiio *ctsio) struct scsi_unmap *cdb; struct ctl_ptr_len_flags *ptrlen; struct scsi_unmap_header *hdr; - struct scsi_unmap_desc *buf, *end; + struct scsi_unmap_desc *buf, *end, *range; uint64_t lba; uint32_t num_blocks; int len, retval; @@ -6094,14 +6100,9 @@ ctl_unmap(struct ctl_scsiio *ctsio) buf = (struct scsi_unmap_desc *)(hdr + 1); end = buf + len / sizeof(*buf); - ptrlen = (struct ctl_ptr_len_flags *)&ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; - ptrlen->ptr = (void *)buf; - ptrlen->len = len; - ptrlen->flags = byte2; - - for (; buf < end; buf++) { - lba = scsi_8btou64(buf->lba); - num_blocks = scsi_4btoul(buf->length); + for (range = buf; range < end; range++) { + lba = scsi_8btou64(range->lba); + num_blocks = scsi_4btoul(range->length); if (((lba + num_blocks) > (lun->be_lun->maxlba + 1)) || ((lba + num_blocks) < lba)) { ctl_set_lba_out_of_range(ctsio); @@ -6110,8 +6111,16 @@ ctl_unmap(struct ctl_scsiio *ctsio) } } - retval = lun->backend->config_write((union ctl_io *)ctsio); + mtx_lock(&lun->lun_lock); + ptrlen = (struct ctl_ptr_len_flags *) + &ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; + ptrlen->ptr = (void *)buf; + ptrlen->len = len; + ptrlen->flags = byte2; + ctl_check_blocked(lun); + mtx_unlock(&lun->lun_lock); + retval = lun->backend->config_write((union ctl_io *)ctsio); return (retval); } @@ -10795,7 +10804,7 @@ ctl_inquiry(struct ctl_scsiio *ctsio) * For known CDB types, parse the LBA and length. */ static int -ctl_get_lba_len(union ctl_io *io, uint64_t *lba, uint32_t *len) +ctl_get_lba_len(union ctl_io *io, uint64_t *lba, uint64_t *len) { if (io->io_hdr.io_type != CTL_IO_SCSI) return (1); @@ -10925,6 +10934,11 @@ ctl_get_lba_len(union ctl_io *io, uint64 *len = scsi_4btoul(cdb->length); break; } + case UNMAP: { + *lba = 0; + *len = UINT64_MAX; + break; + } default: return (1); break; /* NOTREACHED */ @@ -10934,7 +10948,7 @@ ctl_get_lba_len(union ctl_io *io, uint64 } static ctl_action -ctl_extent_check_lba(uint64_t lba1, uint32_t len1, uint64_t lba2, uint32_t len2) +ctl_extent_check_lba(uint64_t lba1, uint64_t len1, uint64_t lba2, uint64_t len2) { uint64_t endlba1, endlba2; @@ -10948,19 +10962,53 @@ ctl_extent_check_lba(uint64_t lba1, uint return (CTL_ACTION_BLOCK); } +static int +ctl_extent_check_unmap(union ctl_io *io, uint64_t lba2, uint64_t len2) +{ + struct ctl_ptr_len_flags *ptrlen; + struct scsi_unmap_desc *buf, *end, *range; + uint64_t lba; + uint32_t len; + + /* If not UNMAP -- go other way. */ + if (io->io_hdr.io_type != CTL_IO_SCSI || + io->scsiio.cdb[0] != UNMAP) + return (CTL_ACTION_ERROR); + + /* If UNMAP without data -- block and wait for data. */ + ptrlen = (struct ctl_ptr_len_flags *) + &io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; + if ((io->io_hdr.flags & CTL_FLAG_ALLOCATED) == 0 || + ptrlen->ptr == NULL) + return (CTL_ACTION_BLOCK); + + /* UNMAP with data -- check for collision. */ + buf = (struct scsi_unmap_desc *)ptrlen->ptr; + end = buf + ptrlen->len / sizeof(*buf); + for (range = buf; range < end; range++) { + lba = scsi_8btou64(range->lba); + len = scsi_4btoul(range->length); + if ((lba < lba2 + len2) && (lba + len > lba2)) + return (CTL_ACTION_BLOCK); + } + return (CTL_ACTION_PASS); +} + static ctl_action ctl_extent_check(union ctl_io *io1, union ctl_io *io2) { uint64_t lba1, lba2; - uint32_t len1, len2; + uint64_t len1, len2; int retval; - retval = ctl_get_lba_len(io1, &lba1, &len1); - if (retval != 0) + if (ctl_get_lba_len(io1, &lba1, &len1) != 0) return (CTL_ACTION_ERROR); - retval = ctl_get_lba_len(io2, &lba2, &len2); - if (retval != 0) + retval = ctl_extent_check_unmap(io2, lba1, len1); + if (retval != CTL_ACTION_ERROR) + return (retval); + + if (ctl_get_lba_len(io2, &lba2, &len2) != 0) return (CTL_ACTION_ERROR); return (ctl_extent_check_lba(lba1, len1, lba2, len2)); @@ -12571,7 +12619,7 @@ ctl_cmd_pattern_match(struct ctl_scsiio */ if (filtered_pattern & CTL_LUN_PAT_RANGE) { uint64_t lba1; - uint32_t len1; + uint64_t len1; ctl_action action; int retval; Modified: head/sys/cam/ctl/ctl_ser_table.c ============================================================================== --- head/sys/cam/ctl/ctl_ser_table.c Sat Sep 13 06:51:19 2014 (r271502) +++ head/sys/cam/ctl/ctl_ser_table.c Sat Sep 13 07:45:03 2014 (r271503) @@ -64,7 +64,7 @@ ctl_serialize_table[CTL_SERIDX_COUNT][CT /*TUR */{ pS, pS, pS, pS, bK, bK, bK, pS, pS, bK, pS, bK, bK}, /*READ */{ pS, pS, xT, bK, bK, bK, bK, pS, pS, bK, pS, bK, bK}, /*WRITE */{ pS, xT, xT, bK, bK, bK, bK, pS, pS, bK, pS, bK, bK}, -/*UNMAP */{ pS, bK, bK, pS, bK, bK, bK, pS, pS, bK, pS, bK, bK}, +/*UNMAP */{ pS, xT, xT, pS, bK, bK, bK, pS, pS, bK, pS, bK, bK}, /*MD_SNS */{ bK, bK, bK, bK, pS, bK, bK, pS, pS, bK, pS, bK, bK}, /*MD_SEL */{ bK, bK, bK, bK, bK, bK, bK, pS, pS, bK, pS, bK, bK}, /*RQ_SNS */{ pS, pS, pS, pS, pS, pS, bK, pS, pS, bK, pS, bK, bK}, From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 08:26:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E18D316E; Sat, 13 Sep 2014 08:26:11 +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 CA5D0C83; Sat, 13 Sep 2014 08:26:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8D8QBKR078353; Sat, 13 Sep 2014 08:26:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8D8Q9Wx078339; Sat, 13 Sep 2014 08:26:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201409130826.s8D8Q9Wx078339@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 13 Sep 2014 08:26:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271504 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront net netinet ofed/drivers/net/mlx4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 08:26:12 -0000 Author: hselasky Date: Sat Sep 13 08:26:09 2014 New Revision: 271504 URL: http://svnweb.freebsd.org/changeset/base/271504 Log: Improve transmit sending offload, TSO, algorithm in general. The current TSO limitation feature only takes the total number of bytes in an mbuf chain into account and does not limit by the number of mbufs in a chain. Some kinds of hardware is limited by two factors. One is the fragment length and the second is the fragment count. Both of these limits need to be taken into account when doing TSO. Else some kinds of hardware might have to drop completely valid mbuf chains because they cannot loaded into the given hardware's DMA engine. The new way of doing TSO limitation has been made backwards compatible as input from other FreeBSD developers and will use defaults for values not set. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/oce/oce_if.c head/sys/dev/oce/oce_if.h head/sys/dev/vmware/vmxnet3/if_vmx.c head/sys/dev/vmware/vmxnet3/if_vmxvar.h head/sys/dev/xen/netfront/netfront.c head/sys/net/if.c head/sys/net/if_lagg.c head/sys/net/if_var.h head/sys/net/if_vlan.c head/sys/netinet/tcp_output.c head/sys/ofed/drivers/net/mlx4/en_netdev.c Modified: head/sys/dev/oce/oce_if.c ============================================================================== --- head/sys/dev/oce/oce_if.c Sat Sep 13 07:45:03 2014 (r271503) +++ head/sys/dev/oce/oce_if.c Sat Sep 13 08:26:09 2014 (r271504) @@ -1731,7 +1731,10 @@ oce_attach_ifp(POCE_SOFTC sc) sc->ifp->if_baudrate = IF_Gbps(10); #if __FreeBSD_version >= 1000000 - sc->ifp->if_hw_tsomax = OCE_MAX_TSO_SIZE; + sc->ifp->if_hw_tsomax = IF_HW_TSOMAX_BUILD_VALUE( + 65535 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN) /* bytes */, + OCE_MAX_TX_ELEMENTS /* maximum frag count */, + 12 /* 4K frag size */); #endif ether_ifattach(sc->ifp, sc->macaddr.mac_addr); Modified: head/sys/dev/oce/oce_if.h ============================================================================== --- head/sys/dev/oce/oce_if.h Sat Sep 13 07:45:03 2014 (r271503) +++ head/sys/dev/oce/oce_if.h Sat Sep 13 08:26:09 2014 (r271504) @@ -152,7 +152,6 @@ extern int mp_ncpus; /* system's total #define OCE_MAX_TX_ELEMENTS 29 #define OCE_MAX_TX_DESC 1024 #define OCE_MAX_TX_SIZE 65535 -#define OCE_MAX_TSO_SIZE (65535 - ETHER_HDR_LEN) #define OCE_MAX_RX_SIZE 4096 #define OCE_MAX_RQ_POSTS 255 #define OCE_DEFAULT_PROMISCUOUS 0 Modified: head/sys/dev/vmware/vmxnet3/if_vmx.c ============================================================================== --- head/sys/dev/vmware/vmxnet3/if_vmx.c Sat Sep 13 07:45:03 2014 (r271503) +++ head/sys/dev/vmware/vmxnet3/if_vmx.c Sat Sep 13 08:26:09 2014 (r271504) @@ -1722,7 +1722,11 @@ vmxnet3_setup_interface(struct vmxnet3_s ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_init = vmxnet3_init; ifp->if_ioctl = vmxnet3_ioctl; - ifp->if_hw_tsomax = VMXNET3_TSO_MAXSIZE; + + ifp->if_hw_tsomax = IF_HW_TSOMAX_BUILD_VALUE( + 65535 - sizeof(struct ether_vlan_header) /* bytes */, + VMXNET3_TX_MAXSEGS /* maximum frag count */, + VMXNET3_TX_MAXSEGSHIFT /* frag size */); #ifdef VMXNET3_LEGACY_TX ifp->if_start = vmxnet3_start; Modified: head/sys/dev/vmware/vmxnet3/if_vmxvar.h ============================================================================== --- head/sys/dev/vmware/vmxnet3/if_vmxvar.h Sat Sep 13 07:45:03 2014 (r271503) +++ head/sys/dev/vmware/vmxnet3/if_vmxvar.h Sat Sep 13 08:26:09 2014 (r271504) @@ -277,14 +277,13 @@ struct vmxnet3_softc { */ #define VMXNET3_TX_MAXSEGS 32 #define VMXNET3_TX_MAXSIZE (VMXNET3_TX_MAXSEGS * MCLBYTES) -#define VMXNET3_TSO_MAXSIZE \ - (VMXNET3_TX_MAXSIZE - sizeof(struct ether_vlan_header)) /* * Maximum support Tx segments size. The length field in the * Tx descriptor is 14 bits. */ -#define VMXNET3_TX_MAXSEGSIZE (1 << 14) +#define VMXNET3_TX_MAXSEGSHIFT 14 +#define VMXNET3_TX_MAXSEGSIZE (1 << VMXNET3_TX_MAXSEGSHIFT) /* * The maximum number of Rx segments we accept. When LRO is enabled, Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Sat Sep 13 07:45:03 2014 (r271503) +++ head/sys/dev/xen/netfront/netfront.c Sat Sep 13 08:26:09 2014 (r271504) @@ -134,7 +134,6 @@ static const int MODPARM_rx_flip = 0; * to mirror the Linux MAX_SKB_FRAGS constant. */ #define MAX_TX_REQ_FRAGS (65536 / PAGE_SIZE + 2) -#define NF_TSO_MAXBURST ((IP_MAXPACKET / PAGE_SIZE) * MCLBYTES) #define RX_COPY_THRESHOLD 256 @@ -2102,7 +2101,10 @@ create_netdev(device_t dev) ifp->if_hwassist = XN_CSUM_FEATURES; ifp->if_capabilities = IFCAP_HWCSUM; - ifp->if_hw_tsomax = NF_TSO_MAXBURST; + ifp->if_hw_tsomax = IF_HW_TSOMAX_BUILD_VALUE( + 65535 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN) /* bytes */, + MAX_TX_REQ_FRAGS /* maximum frag count */, + PAGE_SHIFT /* PAGE_SIZE frag size */); ether_ifattach(ifp, np->mac); callout_init(&np->xn_stat_ch, CALLOUT_MPSAFE); Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Sat Sep 13 07:45:03 2014 (r271503) +++ head/sys/net/if.c Sat Sep 13 08:26:09 2014 (r271504) @@ -423,6 +423,52 @@ if_grow(void) } /* + * Compute the least common value of two "if_hw_tsomax" values: + */ +u_int +if_hw_tsomax_common(u_int a, u_int b) +{ + u_int a_bytes = IF_HW_TSOMAX_GET_BYTES(a); + u_int a_frag_count = IF_HW_TSOMAX_GET_FRAG_COUNT(a); + u_int a_frag_size = IF_HW_TSOMAX_GET_FRAG_SIZE(a); + u_int b_bytes = IF_HW_TSOMAX_GET_BYTES(b); + u_int b_frag_count = IF_HW_TSOMAX_GET_FRAG_COUNT(b); + u_int b_frag_size = IF_HW_TSOMAX_GET_FRAG_SIZE(b); + + return (IF_HW_TSOMAX_BUILD_VALUE(min(a_bytes, b_bytes), + min(a_frag_count, b_frag_count), + min(a_frag_size, b_frag_size))); +} + +/* + * Range check the "if_hw_tsomax" value: + */ +u_int +if_hw_tsomax_range_check(u_int a) +{ + u_int a_bytes = IF_HW_TSOMAX_GET_BYTES(a); + u_int a_frag_count = IF_HW_TSOMAX_GET_FRAG_COUNT(a); + u_int a_frag_size = IF_HW_TSOMAX_GET_FRAG_SIZE(a); + + /* round down to nearest 4 bytes */ + a_bytes &= 0xFFFC; + + /* use default, if zero */ + if (a_bytes == 0) + a_bytes = IF_HW_TSOMAX_DEFAULT_BYTES; + + /* use default, if zero */ + if (a_frag_count == 0) + a_frag_count = IF_HW_TSOMAX_DEFAULT_FRAG_COUNT; + + /* use default, if zero */ + if (a_frag_size == 0) + a_frag_size = IF_HW_TSOMAX_DEFAULT_FRAG_SIZE; + + return (IF_HW_TSOMAX_BUILD_VALUE(a_bytes, a_frag_count, a_frag_size)); +} + +/* * Allocate a struct ifnet and an index for an interface. A layer 2 * common structure will also be allocated if an allocation routine is * registered for the passed type. @@ -445,6 +491,7 @@ if_alloc(u_char type) ifp->if_index = idx; ifp->if_type = type; ifp->if_alloctype = type; + ifp->if_hw_tsomax = IF_HW_TSOMAX_DEFAULT_VALUE(); if (if_com_alloc[type] != NULL) { ifp->if_l2com = if_com_alloc[type](type, ifp); if (ifp->if_l2com == NULL) { @@ -657,16 +704,9 @@ if_attach_internal(struct ifnet *ifp, in TAILQ_INSERT_HEAD(&ifp->if_addrhead, ifa, ifa_link); /* Reliably crash if used uninitialized. */ ifp->if_broadcastaddr = NULL; - -#if defined(INET) || defined(INET6) - /* Initialize to max value. */ - if (ifp->if_hw_tsomax == 0) - ifp->if_hw_tsomax = min(IP_MAXPACKET, 32 * MCLBYTES - - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN)); - KASSERT(ifp->if_hw_tsomax <= IP_MAXPACKET && - ifp->if_hw_tsomax >= IP_MAXPACKET / 8, - ("%s: tsomax outside of range", __func__)); -#endif + /* range check TSO value */ + ifp->if_hw_tsomax = + if_hw_tsomax_range_check(ifp->if_hw_tsomax); } #ifdef VIMAGE else { Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Sat Sep 13 07:45:03 2014 (r271503) +++ head/sys/net/if_lagg.c Sat Sep 13 08:26:09 2014 (r271504) @@ -445,11 +445,7 @@ lagg_capabilities(struct lagg_softc *sc) struct lagg_port *lp; int cap = ~0, ena = ~0; u_long hwa = ~0UL; -#if defined(INET) || defined(INET6) - u_int hw_tsomax = IP_MAXPACKET; /* Initialize to the maximum value. */ -#else - u_int hw_tsomax = ~0; /* if_hw_tsomax is only for INET/INET6, but.. */ -#endif + u_int hw_tsomax = IF_HW_TSOMAX_DEFAULT_VALUE(); LAGG_WLOCK_ASSERT(sc); @@ -458,10 +454,9 @@ lagg_capabilities(struct lagg_softc *sc) cap &= lp->lp_ifp->if_capabilities; ena &= lp->lp_ifp->if_capenable; hwa &= lp->lp_ifp->if_hwassist; - /* Set to the minimum value of the lagg ports. */ - if (lp->lp_ifp->if_hw_tsomax < hw_tsomax && - lp->lp_ifp->if_hw_tsomax > 0) - hw_tsomax = lp->lp_ifp->if_hw_tsomax; + /* Set to the common value of the lagg ports. */ + hw_tsomax = if_hw_tsomax_common(hw_tsomax, + lp->lp_ifp->if_hw_tsomax); } cap = (cap == ~0 ? 0 : cap); ena = (ena == ~0 ? 0 : ena); Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Sat Sep 13 07:45:03 2014 (r271503) +++ head/sys/net/if_var.h Sat Sep 13 08:26:09 2014 (r271504) @@ -120,6 +120,43 @@ typedef int (*if_transmit_fn_t)(if_t, st typedef uint64_t (*if_get_counter_t)(if_t, ifnet_counter); /* + * Macros defining how to decode the "if_hw_tsomax" field: + */ +#define IF_HW_TSOMAX_GET_BYTES(x) \ + ((uint16_t)(x)) /* 32..65535 */ + +#define IF_HW_TSOMAX_GET_FRAG_COUNT(x) \ + ((uint8_t)((x) >> 16)) /* 1..255 */ + +#define IF_HW_TSOMAX_GET_FRAG_SIZE(x) \ + ((uint8_t)((x) >> 24)) /* 12..16 */ + +/* + * The following macro defines how to build the "if_hw_tsomax" + * field. The "bytes" field has unit 1 bytes and declares the maximum + * number of bytes which can be transferred by a single transmit + * offload, TSO, job. The "bytes" field is rounded down to the neares + * 4 bytes to avoid having the hardware do unaligned memory + * accesses. The "frag_count" field has unit 1 fragment and declares + * the maximum number of fragments a TSO job can contain. The + * "frag_size" field has unit logarithm in base 2 of the actual value + * in bytes and declares the maximum size of a fragment. + */ +#define IF_HW_TSOMAX_BUILD_VALUE(bytes, frag_count, frag_size) \ + (((bytes) & 0xFFFC) | (((frag_count) & 0xFF) << 16) | \ + (((frag_size) & 0xFF) << 24)) + +#define IF_HW_TSOMAX_DEFAULT_BYTES (65536 - 4) +#define IF_HW_TSOMAX_DEFAULT_FRAG_COUNT 255 +#define IF_HW_TSOMAX_DEFAULT_FRAG_SIZE 16 + +#define IF_HW_TSOMAX_DEFAULT_VALUE() \ + IF_HW_TSOMAX_BUILD_VALUE( \ + IF_HW_TSOMAX_DEFAULT_BYTES, \ + IF_HW_TSOMAX_DEFAULT_FRAG_COUNT, \ + IF_HW_TSOMAX_DEFAULT_FRAG_SIZE) + +/* * Structure defining a network interface. * * Size ILP32: 592 (approx) @@ -222,8 +259,7 @@ struct ifnet { if_get_counter_t if_get_counter; /* get counter values */ /* Stuff that's only temporary and doesn't belong here. */ - u_int if_hw_tsomax; /* tso burst length limit, the minimum - * is (IP_MAXPACKET / 8). + u_int if_hw_tsomax; /* TSO burst length limits. * XXXAO: Have to find a better place * for it eventually. */ /* @@ -608,6 +644,10 @@ void if_setioctlfn(if_t ifp, int (*)(if_ void if_setstartfn(if_t ifp, void (*)(if_t)); void if_settransmitfn(if_t ifp, if_transmit_fn_t); void if_setqflushfn(if_t ifp, if_qflush_fn_t); + +/* "if_hw_tsomax" related functions */ +u_int if_hw_tsomax_common(u_int, u_int); +u_int if_hw_tsomax_range_check(u_int); /* Revisit the below. These are inline functions originally */ int drbr_inuse_drv(if_t ifp, struct buf_ring *br); Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Sat Sep 13 07:45:03 2014 (r271503) +++ head/sys/net/if_vlan.c Sat Sep 13 08:26:09 2014 (r271504) @@ -1511,8 +1511,8 @@ vlan_capabilities(struct ifvlan *ifv) * propagate the hardware-assisted flag. TSO on VLANs * does not necessarily require hardware VLAN tagging. */ - if (p->if_hw_tsomax > 0) - ifp->if_hw_tsomax = p->if_hw_tsomax; + ifp->if_hw_tsomax = if_hw_tsomax_common(ifp->if_hw_tsomax, + p->if_hw_tsomax); if (p->if_capabilities & IFCAP_VLAN_HWTSO) ifp->if_capabilities |= p->if_capabilities & IFCAP_TSO; if (p->if_capenable & IFCAP_VLAN_HWTSO) { Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Sat Sep 13 07:45:03 2014 (r271503) +++ head/sys/netinet/tcp_output.c Sat Sep 13 08:26:09 2014 (r271504) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -767,18 +768,88 @@ send: flags &= ~TH_FIN; if (tso) { + u_int if_hw_tsomax_bytes; + u_int if_hw_tsomax_frag_count; + u_int if_hw_tsomax_frag_size; + struct mbuf *mb; + u_int moff; + int max_len; + + /* extract TSO information */ + if_hw_tsomax_bytes = + IF_HW_TSOMAX_GET_BYTES(tp->t_tsomax); + if_hw_tsomax_frag_count = + IF_HW_TSOMAX_GET_FRAG_COUNT(tp->t_tsomax); + if_hw_tsomax_frag_size = + IF_HW_TSOMAX_GET_FRAG_SIZE(tp->t_tsomax); + + /* compute maximum TSO length */ + max_len = (if_hw_tsomax_bytes - hdrlen); + + /* clamp maximum length value */ + if (max_len > IP_MAXPACKET) + max_len = IP_MAXPACKET; + else if (max_len < 0) + max_len = 0; + + /* get smallest length */ + if (len > (u_int)max_len) { + if (max_len != 0) + sendalot = 1; + len = (u_int)max_len; + } + KASSERT(ipoptlen == 0, ("%s: TSO can't do IP options", __func__)); + max_len = 0; + mb = sbsndptr(&so->so_snd, off, len, &moff); + + /* now make sure the number of fragments fit too */ + while (mb != NULL && (u_int)max_len < len) { + u_int cur_length; + u_int cur_frags; + + /* + * Get length of mbuf fragment and how + * many hardware frags, rounded up, it + * would use: + */ + cur_length = (mb->m_len - moff); + cur_frags = (cur_length + + (1 << if_hw_tsomax_frag_size) - 1) >> + if_hw_tsomax_frag_size; + + /* Handle special case: Zero Length Mbuf */ + if (cur_frags == 0) + cur_frags = 1; + + /* + * Check if the fragment limit will be + * reached or exceeded: + */ + if (cur_frags >= if_hw_tsomax_frag_count) { + max_len += min(cur_length, + if_hw_tsomax_frag_count << + if_hw_tsomax_frag_size); + break; + } + max_len += cur_length; + if_hw_tsomax_frag_count -= cur_frags; + moff = 0; + mb = mb->m_next; + } + /* * Limit a burst to t_tsomax minus IP, * TCP and options length to keep ip->ip_len * from overflowing or exceeding the maximum * length allowed by the network interface. */ - if (len > tp->t_tsomax - hdrlen) { - len = tp->t_tsomax - hdrlen; - sendalot = 1; + if (len > (u_int)max_len) { + if (max_len != 0) + sendalot = 1; + len = (u_int)max_len; } /* Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Sat Sep 13 07:45:03 2014 (r271503) +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Sat Sep 13 08:26:09 2014 (r271504) @@ -673,6 +673,12 @@ int mlx4_en_do_start_port(struct net_dev else priv->rx_csum = 0; + /* set TSO limits so that we don't have to drop TX packets */ + dev->if_hw_tsomax = IF_HW_TSOMAX_BUILD_VALUE( + 65535 - sizeof(struct ether_vlan_header) /* bytes */, + 16 /* maximum frag count */, + 16 /* can do up to 4GByte */); + err = mlx4_wol_read(priv->mdev->dev, &config, priv->port); if (err) { en_err(priv, "Failed to get WoL info, unable to modify\n"); From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 08:55:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1BA568FF; Sat, 13 Sep 2014 08:55:23 +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 062FFED3; Sat, 13 Sep 2014 08:55:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8D8tMrL092159; Sat, 13 Sep 2014 08:55:22 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8D8tMS5092155; Sat, 13 Sep 2014 08:55:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409130855.s8D8tMS5092155@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 13 Sep 2014 08:55:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271505 - in head: sys/cam/ctl usr.sbin/ctladm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 08:55:23 -0000 Author: mav Date: Sat Sep 13 08:55:22 2014 New Revision: 271505 URL: http://svnweb.freebsd.org/changeset/base/271505 Log: Add "readcache" and "writecache" LUN options to control default behavior. Default values are "on". Disabling requires backend to support IO_DIRECT and IO_SYNC flags respectively, or some alternatives. Modified: head/sys/cam/ctl/ctl.c head/usr.sbin/ctladm/ctladm.8 Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sat Sep 13 08:26:09 2014 (r271504) +++ head/sys/cam/ctl/ctl.c Sat Sep 13 08:55:22 2014 (r271505) @@ -4095,6 +4095,7 @@ ctl_init_page_index(struct ctl_lun *lun) int i; struct ctl_page_index *page_index; struct ctl_softc *softc; + const char *value; memcpy(&lun->mode_pages.index, page_index_template, sizeof(page_index_template)); @@ -4244,26 +4245,31 @@ ctl_init_page_index(struct ctl_lun *lun) break; } case SMS_CACHING_PAGE: { + struct scsi_caching_page *caching_page; if (page_index->subpage != SMS_SUBPAGE_PAGE_0) panic("invalid subpage value %d", page_index->subpage); - /* - * Defaults should be okay here, no calculations - * needed. - */ - memcpy(&lun->mode_pages.caching_page[CTL_PAGE_CURRENT], + memcpy(&lun->mode_pages.caching_page[CTL_PAGE_DEFAULT], &caching_page_default, sizeof(caching_page_default)); memcpy(&lun->mode_pages.caching_page[ CTL_PAGE_CHANGEABLE], &caching_page_changeable, sizeof(caching_page_changeable)); - memcpy(&lun->mode_pages.caching_page[CTL_PAGE_DEFAULT], - &caching_page_default, - sizeof(caching_page_default)); memcpy(&lun->mode_pages.caching_page[CTL_PAGE_SAVED], &caching_page_default, sizeof(caching_page_default)); + caching_page = &lun->mode_pages.caching_page[ + CTL_PAGE_SAVED]; + value = ctl_get_opt(&lun->be_lun->options, "writecache"); + if (value != NULL && strcmp(value, "off") == 0) + caching_page->flags1 &= ~SCP_WCE; + value = ctl_get_opt(&lun->be_lun->options, "readcache"); + if (value != NULL && strcmp(value, "off") == 0) + caching_page->flags1 |= SCP_RCD; + memcpy(&lun->mode_pages.caching_page[CTL_PAGE_CURRENT], + &lun->mode_pages.caching_page[CTL_PAGE_SAVED], + sizeof(caching_page_default)); page_index->page_data = (uint8_t *)lun->mode_pages.caching_page; break; Modified: head/usr.sbin/ctladm/ctladm.8 ============================================================================== --- head/usr.sbin/ctladm/ctladm.8 Sat Sep 13 08:26:09 2014 (r271504) +++ head/usr.sbin/ctladm/ctladm.8 Sat Sep 13 08:55:22 2014 (r271505) @@ -34,7 +34,7 @@ .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" $FreeBSD$ .\" -.Dd July 9, 2014 +.Dd September 13, 2014 .Dt CTLADM 8 .Os .Sh NAME @@ -959,8 +959,12 @@ Setting to "on" allows EXTENDED COPY com other LUNs on this host, not accessible otherwise. This allows to offload copying between different iSCSI targets residing on the same host in trusted environments. +.It Va readcache +Set to "off", disables read caching for the LUN, if supported by the backend. .It Va unmap -Set to "on", enables UNMAP support for the LUN. +Set to "on", enables UNMAP support for the LUN, if supported by the backend. +.It Va writecache +Set to "off", disables write caching for the LUN, if supported by the backend. .El .Pp Options specific for block backend: From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 09:33:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11D01F8; Sat, 13 Sep 2014 09:33:38 +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 F0DE526A; Sat, 13 Sep 2014 09:33: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 s8D9Xbwv010800; Sat, 13 Sep 2014 09:33:37 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8D9XbY1010799; Sat, 13 Sep 2014 09:33:37 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201409130933.s8D9XbY1010799@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Sat, 13 Sep 2014 09:33:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271506 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 09:33:38 -0000 Author: dumbbell Date: Sat Sep 13 09:33:37 2014 New Revision: 271506 URL: http://svnweb.freebsd.org/changeset/base/271506 Log: vt(4): Enclose vt_mouse_paste() prototype inside #ifndef SC_NO_CUTPASTE/#endif This fixes the build with sparc64 LINT for instance. Reported by: bz@ MFC after: 3 days Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Sat Sep 13 08:55:22 2014 (r271505) +++ head/sys/dev/vt/vt_core.c Sat Sep 13 09:33:37 2014 (r271506) @@ -162,7 +162,9 @@ static int vt_late_window_switch(struct static int vt_proc_alive(struct vt_window *); static void vt_resize(struct vt_device *); static void vt_update_static(void *); +#ifndef SC_NO_CUTPASTE static void vt_mouse_paste(void); +#endif SET_DECLARE(vt_drv_set, struct vt_driver); From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 10:34:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0104A0F; Sat, 13 Sep 2014 10:34:24 +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 A0EE7948; Sat, 13 Sep 2014 10:34:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DAYOcH038828; Sat, 13 Sep 2014 10:34:24 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DAYNDG038824; Sat, 13 Sep 2014 10:34:23 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409131034.s8DAYNDG038824@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 13 Sep 2014 10:34:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271507 - in head: sys/cam/ctl usr.sbin/ctladm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 10:34:25 -0000 Author: mav Date: Sat Sep 13 10:34:23 2014 New Revision: 271507 URL: http://svnweb.freebsd.org/changeset/base/271507 Log: Implement control over command reordering via options and control mode page. It allows to bypass range checks between UNMAP and READ/WRITE commands, which may introduce additional delays while waiting for UNMAP parameters. READ and WRITE commands are always processed in safe order since their range checks are almost free. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_private.h head/sys/cam/ctl/ctl_ser_table.c head/usr.sbin/ctladm/ctladm.8 Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sat Sep 13 09:33:37 2014 (r271506) +++ head/sys/cam/ctl/ctl.c Sat Sep 13 10:34:23 2014 (r271507) @@ -280,7 +280,7 @@ static struct scsi_control_page control_ /*page_code*/SMS_CONTROL_MODE_PAGE, /*page_length*/sizeof(struct scsi_control_page) - 2, /*rlec*/0, - /*queue_flags*/0, + /*queue_flags*/SCP_QUEUE_ALG_RESTRICTED, /*eca_and_aen*/0, /*flags4*/SCP_TAS, /*aen_holdoff_period*/{0, 0}, @@ -292,7 +292,7 @@ static struct scsi_control_page control_ /*page_code*/SMS_CONTROL_MODE_PAGE, /*page_length*/sizeof(struct scsi_control_page) - 2, /*rlec*/SCP_DSENSE, - /*queue_flags*/0, + /*queue_flags*/SCP_QUEUE_ALG_MASK, /*eca_and_aen*/0, /*flags4*/0, /*aen_holdoff_period*/{0, 0}, @@ -392,8 +392,8 @@ static int ctl_inquiry_evpd(struct ctl_s static int ctl_inquiry_std(struct ctl_scsiio *ctsio); static int ctl_get_lba_len(union ctl_io *io, uint64_t *lba, uint64_t *len); static ctl_action ctl_extent_check(union ctl_io *io1, union ctl_io *io2); -static ctl_action ctl_check_for_blockage(union ctl_io *pending_io, - union ctl_io *ooa_io); +static ctl_action ctl_check_for_blockage(struct ctl_lun *lun, + union ctl_io *pending_io, union ctl_io *ooa_io); static ctl_action ctl_check_ooa(struct ctl_lun *lun, union ctl_io *pending_io, union ctl_io *starting_io); static int ctl_check_blocked(struct ctl_lun *lun); @@ -4275,27 +4275,31 @@ ctl_init_page_index(struct ctl_lun *lun) break; } case SMS_CONTROL_MODE_PAGE: { + struct scsi_control_page *control_page; if (page_index->subpage != SMS_SUBPAGE_PAGE_0) panic("invalid subpage value %d", page_index->subpage); - /* - * Defaults should be okay here, no calculations - * needed. - */ - memcpy(&lun->mode_pages.control_page[CTL_PAGE_CURRENT], + memcpy(&lun->mode_pages.control_page[CTL_PAGE_DEFAULT], &control_page_default, sizeof(control_page_default)); memcpy(&lun->mode_pages.control_page[ CTL_PAGE_CHANGEABLE], &control_page_changeable, sizeof(control_page_changeable)); - memcpy(&lun->mode_pages.control_page[CTL_PAGE_DEFAULT], - &control_page_default, - sizeof(control_page_default)); memcpy(&lun->mode_pages.control_page[CTL_PAGE_SAVED], &control_page_default, sizeof(control_page_default)); + control_page = &lun->mode_pages.control_page[ + CTL_PAGE_SAVED]; + value = ctl_get_opt(&lun->be_lun->options, "reordering"); + if (value != NULL && strcmp(value, "unrestricted") == 0) { + control_page->queue_flags &= ~SCP_QUEUE_ALG_MASK; + control_page->queue_flags |= SCP_QUEUE_ALG_UNRESTRICTED; + } + memcpy(&lun->mode_pages.control_page[CTL_PAGE_CURRENT], + &lun->mode_pages.control_page[CTL_PAGE_SAVED], + sizeof(control_page_default)); page_index->page_data = (uint8_t *)lun->mode_pages.control_page; break; @@ -6189,65 +6193,13 @@ ctl_control_page_handler(struct ctl_scsi lun->flags &= ~CTL_LUN_SENSE_DESC; set_ua = 1; } - if (current_cp->queue_flags & SCP_QUEUE_DQUE) { - if (user_cp->queue_flags & SCP_QUEUE_DQUE) { -#ifdef NEEDTOPORT - csevent_log(CSC_CTL | CSC_SHELF_SW | - CTL_UNTAG_TO_UNTAG, - csevent_LogType_Trace, - csevent_Severity_Information, - csevent_AlertLevel_Green, - csevent_FRU_Firmware, - csevent_FRU_Unknown, - "Received untagged to untagged transition"); -#endif /* NEEDTOPORT */ - } else { -#ifdef NEEDTOPORT - csevent_log(CSC_CTL | CSC_SHELF_SW | - CTL_UNTAG_TO_TAG, - csevent_LogType_ConfigChange, - csevent_Severity_Information, - csevent_AlertLevel_Green, - csevent_FRU_Firmware, - csevent_FRU_Unknown, - "Received untagged to tagged " - "queueing transition"); -#endif /* NEEDTOPORT */ - - current_cp->queue_flags &= ~SCP_QUEUE_DQUE; - saved_cp->queue_flags &= ~SCP_QUEUE_DQUE; - set_ua = 1; - } - } else { - if (user_cp->queue_flags & SCP_QUEUE_DQUE) { -#ifdef NEEDTOPORT - csevent_log(CSC_CTL | CSC_SHELF_SW | - CTL_TAG_TO_UNTAG, - csevent_LogType_ConfigChange, - csevent_Severity_Warning, - csevent_AlertLevel_Yellow, - csevent_FRU_Firmware, - csevent_FRU_Unknown, - "Received tagged queueing to untagged " - "transition"); -#endif /* NEEDTOPORT */ - - current_cp->queue_flags |= SCP_QUEUE_DQUE; - saved_cp->queue_flags |= SCP_QUEUE_DQUE; - set_ua = 1; - } else { -#ifdef NEEDTOPORT - csevent_log(CSC_CTL | CSC_SHELF_SW | - CTL_TAG_TO_TAG, - csevent_LogType_Trace, - csevent_Severity_Information, - csevent_AlertLevel_Green, - csevent_FRU_Firmware, - csevent_FRU_Unknown, - "Received tagged queueing to tagged " - "queueing transition"); -#endif /* NEEDTOPORT */ - } + if ((current_cp->queue_flags & SCP_QUEUE_ALG_MASK) != + (user_cp->queue_flags & SCP_QUEUE_ALG_MASK)) { + current_cp->queue_flags &= ~SCP_QUEUE_ALG_MASK; + current_cp->queue_flags |= user_cp->queue_flags & SCP_QUEUE_ALG_MASK; + saved_cp->queue_flags &= ~SCP_QUEUE_ALG_MASK; + saved_cp->queue_flags |= user_cp->queue_flags & SCP_QUEUE_ALG_MASK; + set_ua = 1; } if (set_ua != 0) { int i; @@ -6290,12 +6242,13 @@ ctl_caching_sp_handler(struct ctl_scsiio mtx_lock(&lun->lun_lock); if ((current_cp->flags1 & (SCP_WCE | SCP_RCD)) != - (user_cp->flags1 & (SCP_WCE | SCP_RCD))) + (user_cp->flags1 & (SCP_WCE | SCP_RCD))) { + current_cp->flags1 &= ~(SCP_WCE | SCP_RCD); + current_cp->flags1 |= user_cp->flags1 & (SCP_WCE | SCP_RCD); + saved_cp->flags1 &= ~(SCP_WCE | SCP_RCD); + saved_cp->flags1 |= user_cp->flags1 & (SCP_WCE | SCP_RCD); set_ua = 1; - current_cp->flags1 &= ~(SCP_WCE | SCP_RCD); - current_cp->flags1 |= user_cp->flags1 & (SCP_WCE | SCP_RCD); - saved_cp->flags1 &= ~(SCP_WCE | SCP_RCD); - saved_cp->flags1 |= user_cp->flags1 & (SCP_WCE | SCP_RCD); + } if (set_ua != 0) { int i; /* @@ -11021,7 +10974,8 @@ ctl_extent_check(union ctl_io *io1, unio } static ctl_action -ctl_check_for_blockage(union ctl_io *pending_io, union ctl_io *ooa_io) +ctl_check_for_blockage(struct ctl_lun *lun, union ctl_io *pending_io, + union ctl_io *ooa_io) { const struct ctl_cmd_entry *pending_entry, *ooa_entry; ctl_serialize_action *serialize_row; @@ -11104,20 +11058,25 @@ ctl_check_for_blockage(union ctl_io *pen switch (serialize_row[pending_entry->seridx]) { case CTL_SER_BLOCK: return (CTL_ACTION_BLOCK); - break; /* NOTREACHED */ case CTL_SER_EXTENT: return (ctl_extent_check(pending_io, ooa_io)); - break; /* NOTREACHED */ + case CTL_SER_EXTENTOPT: + if ((lun->mode_pages.control_page[CTL_PAGE_CURRENT].queue_flags + & SCP_QUEUE_ALG_MASK) != SCP_QUEUE_ALG_UNRESTRICTED) + return (ctl_extent_check(pending_io, ooa_io)); + /* FALLTHROUGH */ case CTL_SER_PASS: return (CTL_ACTION_PASS); - break; /* NOTREACHED */ + case CTL_SER_BLOCKOPT: + if ((lun->mode_pages.control_page[CTL_PAGE_CURRENT].queue_flags + & SCP_QUEUE_ALG_MASK) != SCP_QUEUE_ALG_UNRESTRICTED) + return (CTL_ACTION_BLOCK); + return (CTL_ACTION_PASS); case CTL_SER_SKIP: return (CTL_ACTION_SKIP); - break; default: panic("invalid serialization value %d", serialize_row[pending_entry->seridx]); - break; /* NOTREACHED */ } return (CTL_ACTION_ERROR); @@ -11154,7 +11113,7 @@ ctl_check_ooa(struct ctl_lun *lun, union * of it in the queue. It doesn't queue/dequeue * cur_blocked. */ - action = ctl_check_for_blockage(pending_io, ooa_io); + action = ctl_check_for_blockage(lun, pending_io, ooa_io); switch (action) { case CTL_ACTION_BLOCK: case CTL_ACTION_OVERLAP: Modified: head/sys/cam/ctl/ctl_private.h ============================================================================== --- head/sys/cam/ctl/ctl_private.h Sat Sep 13 09:33:37 2014 (r271506) +++ head/sys/cam/ctl/ctl_private.h Sat Sep 13 10:34:23 2014 (r271507) @@ -115,7 +115,9 @@ struct ctl_ioctl_info { typedef enum { CTL_SER_BLOCK, + CTL_SER_BLOCKOPT, CTL_SER_EXTENT, + CTL_SER_EXTENTOPT, CTL_SER_PASS, CTL_SER_SKIP } ctl_serialize_action; Modified: head/sys/cam/ctl/ctl_ser_table.c ============================================================================== --- head/sys/cam/ctl/ctl_ser_table.c Sat Sep 13 09:33:37 2014 (r271506) +++ head/sys/cam/ctl/ctl_ser_table.c Sat Sep 13 10:34:23 2014 (r271507) @@ -54,17 +54,19 @@ /****************************************************************************/ #define sK CTL_SER_SKIP /* Skip */ -#define pS CTL_SER_PASS /* pS */ +#define pS CTL_SER_PASS /* Pass */ #define bK CTL_SER_BLOCK /* Blocked */ +#define bO CTL_SER_BLOCKOPT /* Optional block */ #define xT CTL_SER_EXTENT /* Extent check */ +#define xO CTL_SER_EXTENTOPT /* Optional extent check */ static ctl_serialize_action ctl_serialize_table[CTL_SERIDX_COUNT][CTL_SERIDX_COUNT] = { /**>IDX_ :: 2nd:TUR RD WRT UNM MDSN MDSL RQSN INQ RDCP RES LSNS FMT STR*/ /*TUR */{ pS, pS, pS, pS, bK, bK, bK, pS, pS, bK, pS, bK, bK}, -/*READ */{ pS, pS, xT, bK, bK, bK, bK, pS, pS, bK, pS, bK, bK}, -/*WRITE */{ pS, xT, xT, bK, bK, bK, bK, pS, pS, bK, pS, bK, bK}, -/*UNMAP */{ pS, xT, xT, pS, bK, bK, bK, pS, pS, bK, pS, bK, bK}, +/*READ */{ pS, pS, xT, bO, bK, bK, bK, pS, pS, bK, pS, bK, bK}, +/*WRITE */{ pS, xT, xT, bO, bK, bK, bK, pS, pS, bK, pS, bK, bK}, +/*UNMAP */{ pS, xO, xO, pS, bK, bK, bK, pS, pS, bK, pS, bK, bK}, /*MD_SNS */{ bK, bK, bK, bK, pS, bK, bK, pS, pS, bK, pS, bK, bK}, /*MD_SEL */{ bK, bK, bK, bK, bK, bK, bK, pS, pS, bK, pS, bK, bK}, /*RQ_SNS */{ pS, pS, pS, pS, pS, pS, bK, pS, pS, bK, pS, bK, bK}, Modified: head/usr.sbin/ctladm/ctladm.8 ============================================================================== --- head/usr.sbin/ctladm/ctladm.8 Sat Sep 13 09:33:37 2014 (r271506) +++ head/usr.sbin/ctladm/ctladm.8 Sat Sep 13 10:34:23 2014 (r271507) @@ -961,6 +961,13 @@ This allows to offload copying between d on the same host in trusted environments. .It Va readcache Set to "off", disables read caching for the LUN, if supported by the backend. +.It Va reordering +Set to "unrestricted", allows target to process commands with SIMPLE task +attribute in arbitrary order. Any data integrity exposures related to +command sequence order shall be explicitly handled by the application +client through the selection of appropriate commands and task attributes. +The default value is "restricted". It improves data integrity, but may +introduce some additional delays. .It Va unmap Set to "on", enables UNMAP support for the LUN, if supported by the backend. .It Va writecache From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 13:36:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DAF51E3; Sat, 13 Sep 2014 13:36:18 +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 783E5A25; Sat, 13 Sep 2014 13:36:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DDaIER023384; Sat, 13 Sep 2014 13:36:18 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DDaIWW023382; Sat, 13 Sep 2014 13:36:18 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201409131336.s8DDaIWW023382@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sat, 13 Sep 2014 13:36:18 +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: r271508 - stable/9/sbin/mount_nfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 13:36:18 -0000 Author: bz Date: Sat Sep 13 13:36:17 2014 New Revision: 271508 URL: http://svnweb.freebsd.org/changeset/base/271508 Log: MFC r269583: Provide -o vers= support for mount_nfs. Our mount_nfs does use -o nfsv<2|3|4> or -2 or -3 to specify the version. OSX (these days), Solaris, and Linux use -o vers=<2,3,4>. With the upcoming autofs support we can make a lot of (entrerprisy) setups getting mount options from LDAP just work by providing -o vers= compatibility. Reviewed by: wblock, bjk (man page), rmacklem, emaste Sponsored by: DARPA,AFRL PR: 192379 Modified: stable/9/sbin/mount_nfs/mount_nfs.8 stable/9/sbin/mount_nfs/mount_nfs.c Directory Properties: stable/9/sbin/mount_nfs/ (props changed) Modified: stable/9/sbin/mount_nfs/mount_nfs.8 ============================================================================== --- stable/9/sbin/mount_nfs/mount_nfs.8 Sat Sep 13 10:34:23 2014 (r271507) +++ stable/9/sbin/mount_nfs/mount_nfs.8 Sat Sep 13 13:36:17 2014 (r271508) @@ -28,7 +28,7 @@ .\" @(#)mount_nfs.8 8.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd December 7, 2013 +.Dd August 5, 2014 .Dt MOUNT_NFS 8 .Os .Sh NAME @@ -335,6 +335,14 @@ tune the timeout interval.) .It Cm udp Use UDP transport. +.It Cm vers Ns = Ns Aq Ar vers_number +Use the specified version number for NFS requests. +See the +.Cm nfsv2 , +.Cm nfsv3 , +and +.Cm nfsv4 +options for details. .It Cm wcommitsize Ns = Ns Aq Ar value Set the maximum pending write commit size to the specified value. This determines the maximum amount of pending write data that the NFS @@ -430,6 +438,26 @@ Same as Same as .Fl o Cm retrans Ns = Ns Aq Ar value .El +.Pp +The following +.Fl o +named options are equivalent to other +.Fl o +named options and are supported for compatibility with other +operating systems (e.g., Linux, Solaris, and OSX) to ease usage of +.Xr autofs 5 +support. +.Bl -tag -width indent +.It Fl o Cm vers Ns = Ns 2 +Same as +.Fl o Cm nfsv2 +.It Fl o Cm vers Ns = Ns 3 +Same as +.Fl o Cm nfsv3 +.It Fl o Cm vers Ns = Ns 4 +Same as +.Fl o Cm nfsv4 +.El .Sh SEE ALSO .Xr nmount 2 , .Xr unmount 2 , Modified: stable/9/sbin/mount_nfs/mount_nfs.c ============================================================================== --- stable/9/sbin/mount_nfs/mount_nfs.c Sat Sep 13 10:34:23 2014 (r271507) +++ stable/9/sbin/mount_nfs/mount_nfs.c Sat Sep 13 13:36:17 2014 (r271508) @@ -311,6 +311,32 @@ main(int argc, char *argv[]) if (*p || num <= 0) errx(1, "illegal maxgroups value -- %s", val); //set_rpc_maxgrouplist(num); + } else if (strcmp(opt, "vers") == 0) { + num = strtol(val, &p, 10); + if (*p || num <= 0) + errx(1, "illegal vers value -- " + "%s", val); + switch (num) { + case 2: + mountmode = V2; + break; + case 3: + mountmode = V3; + build_iovec(&iov, &iovlen, + "nfsv3", NULL, 0); + break; + case 4: + mountmode = V4; + fstype = "nfs"; + nfsproto = IPPROTO_TCP; + if (portspec == NULL) + portspec = "2049"; + break; + default: + errx(1, "illegal nfs version " + "value -- %s", val); + } + pass_flag_to_nmount=0; } if (pass_flag_to_nmount) build_iovec(&iov, &iovlen, opt, val, From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 13:46:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7BA5389; Sat, 13 Sep 2014 13:46:17 +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 78E67AE0; Sat, 13 Sep 2014 13:46:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DDkHRa028045; Sat, 13 Sep 2014 13:46:17 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DDkHn5028043; Sat, 13 Sep 2014 13:46:17 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201409131346.s8DDkHn5028043@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 13 Sep 2014 13:46:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271509 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 13:46:17 -0000 Author: melifaro Date: Sat Sep 13 13:46:16 2014 New Revision: 271509 URL: http://svnweb.freebsd.org/changeset/base/271509 Log: Fix error handling in cpuset_setithread() introduced in r267716. Noted by: kib MFC after: 1 week Modified: head/sys/kern/kern_cpuset.c Modified: head/sys/kern/kern_cpuset.c ============================================================================== --- head/sys/kern/kern_cpuset.c Sat Sep 13 13:36:17 2014 (r271508) +++ head/sys/kern/kern_cpuset.c Sat Sep 13 13:46:16 2014 (r271509) @@ -731,6 +731,7 @@ cpuset_setithread(lwpid_t id, u_char cpu nset = uma_zalloc(cpuset_zone, M_WAITOK); rset = uma_zalloc(cpuset_zone, M_WAITOK); + cs_id = CPUSET_INVALID; CPU_ZERO(&mask); if (cpu == NOCPU) @@ -739,13 +740,14 @@ cpuset_setithread(lwpid_t id, u_char cpu CPU_SET(cpu, &mask); error = cpuset_which(CPU_WHICH_TID, id, &p, &td, &old_set); - if (((cs_id = alloc_unr(cpuset_unr)) == CPUSET_INVALID) || error != 0) + if (error != 0 || ((cs_id = alloc_unr(cpuset_unr)) == CPUSET_INVALID)) goto out; - thread_lock(td); + /* cpuset_which() returns with PROC_LOCK held. */ old_set = td->td_cpuset; if (cpu == NOCPU) { + /* * roll back to default set. We're not using cpuset_shadow() * here because we can fail CPU_SUBSET() check. This can happen @@ -759,7 +761,14 @@ cpuset_setithread(lwpid_t id, u_char cpu if (old_set->cs_id == 1 || (old_set->cs_id == CPUSET_INVALID && old_set->cs_parent->cs_id == 1)) { - /* Default mask, we need to use new root set */ + + /* + * Current set is either default (1) or + * shadowed version of default set. + * + * Allocate new root set to be able to shadow it + * with any mask. + */ error = _cpuset_create(rset, cpuset_zero, &cpuset_zero->cs_mask, cs_id); if (error != 0) { @@ -772,18 +781,20 @@ cpuset_setithread(lwpid_t id, u_char cpu cs_id = CPUSET_INVALID; } else { /* Assume existing set was already allocated by previous call */ - parent = td->td_cpuset; + parent = old_set; old_set = NULL; } error = cpuset_shadow(parent, nset, &mask); applyset: if (error == 0) { + thread_lock(td); td->td_cpuset = nset; sched_affinity(td); + thread_unlock(td); nset = NULL; - } - thread_unlock(td); + } else + old_set = NULL; PROC_UNLOCK(p); if (old_set != NULL) cpuset_rel(old_set); From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 14:23:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7AF8C91; Sat, 13 Sep 2014 14:23:51 +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 D205EDEB; Sat, 13 Sep 2014 14:23:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DENpVI046818; Sat, 13 Sep 2014 14:23:51 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DENpPW046817; Sat, 13 Sep 2014 14:23:51 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409131423.s8DENpPW046817@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 13 Sep 2014 14:23:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r271510 - vendor-sys/illumos/dist/uts/common/fs/zfs/sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 14:23:52 -0000 Author: delphij Date: Sat Sep 13 14:23:51 2014 New Revision: 271510 URL: http://svnweb.freebsd.org/changeset/base/271510 Log: 5151 blkdev should support reporting of physical block size Reviewed by: Josef 'Jeff' Sipek Reviewed by: Garrett D'Amore Approved by: Dan McDonald Author: Hans Rosenfeld illumos/illumos-gate@32ce6b819524e8719d4ce58db40a00e9f17843e2 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h Sat Sep 13 13:46:16 2014 (r271509) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h Sat Sep 13 14:23:51 2014 (r271510) @@ -56,7 +56,7 @@ extern "C" { * Fixed constants. */ #define DNODE_SHIFT 9 /* 512 bytes */ -#define DN_MIN_INDBLKSHIFT 10 /* 1k */ +#define DN_MIN_INDBLKSHIFT 12 /* 4k */ #define DN_MAX_INDBLKSHIFT 14 /* 16k */ #define DNODE_BLOCK_SHIFT 14 /* 16k */ #define DNODE_CORE_SIZE 64 /* 64 bytes for dnode sans blkptrs */ From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 14:30:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B5CCF21; Sat, 13 Sep 2014 14:30:47 +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 6C498E19; Sat, 13 Sep 2014 14:30:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DEUlXj049737; Sat, 13 Sep 2014 14:30:47 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DEUlxV049736; Sat, 13 Sep 2014 14:30:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409131430.s8DEUlxV049736@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 13 Sep 2014 14:30:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r271511 - vendor/illumos/dist/lib/libzfs/common X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 14:30:47 -0000 Author: delphij Date: Sat Sep 13 14:30:46 2014 New Revision: 271511 URL: http://svnweb.freebsd.org/changeset/base/271511 Log: 5135 zpool_find_import_cached() can use fnvlist_* Reviewed by: Christopher Siden Reviewed by: Max Grossman Reviewed by: Richard Elling Approved by: Dan McDonald Author: Matthew Ahrens illumos/illumos-gate@b18d6b0e20b5bf6e2007c550bb33dcbab6b5dddc Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_import.c Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_import.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_import.c Sat Sep 13 14:23:51 2014 (r271510) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_import.c Sat Sep 13 14:30:46 2014 (r271511) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ @@ -1377,21 +1377,15 @@ zpool_find_import_cached(libzfs_handle_t elem = NULL; while ((elem = nvlist_next_nvpair(raw, elem)) != NULL) { - verify(nvpair_value_nvlist(elem, &src) == 0); + src = fnvpair_value_nvlist(elem); - verify(nvlist_lookup_string(src, ZPOOL_CONFIG_POOL_NAME, - &name) == 0); + name = fnvlist_lookup_string(src, ZPOOL_CONFIG_POOL_NAME); if (poolname != NULL && strcmp(poolname, name) != 0) continue; - verify(nvlist_lookup_uint64(src, ZPOOL_CONFIG_POOL_GUID, - &this_guid) == 0); - if (guid != 0) { - verify(nvlist_lookup_uint64(src, ZPOOL_CONFIG_POOL_GUID, - &this_guid) == 0); - if (guid != this_guid) - continue; - } + this_guid = fnvlist_lookup_uint64(src, ZPOOL_CONFIG_POOL_GUID); + if (guid != 0 && guid != this_guid) + continue; if (pool_active(hdl, name, this_guid, &active) != 0) { nvlist_free(raw); From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 15:05:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 779625E3; Sat, 13 Sep 2014 15:05:11 +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 6201C183; Sat, 13 Sep 2014 15:05:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DF5Bpx066126; Sat, 13 Sep 2014 15:05:11 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DF5BpZ066125; Sat, 13 Sep 2014 15:05:11 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409131505.s8DF5BpZ066125@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 13 Sep 2014 15:05:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r271512 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 15:05:11 -0000 Author: delphij Date: Sat Sep 13 15:05:10 2014 New Revision: 271512 URL: http://svnweb.freebsd.org/changeset/base/271512 Log: 5136 fix write throttle comment in dsl_pool.c Reviewed by: Adam Leventhal Reviewed by: Christopher Siden Reviewed by: Max Grossman Reviewed by: Josef 'Jeff' Sipek Reviewed by: Richard Elling Approved by: Dan McDonald Author: Matthew Ahrens illumos/illumos-gate@d85a1e969ce08b3bc4a7cb3626a6e33a28b5caeb Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c Sat Sep 13 14:30:46 2014 (r271511) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c Sat Sep 13 15:05:10 2014 (r271512) @@ -111,8 +111,8 @@ int zfs_delay_min_dirty_percent = 60; /* * This controls how quickly the delay approaches infinity. - * Larger values cause it to delay less for a given amount of dirty data. - * Therefore larger values will cause there to be more dirty data for a + * Larger values cause it to delay more for a given amount of dirty data. + * Therefore larger values will cause there to be less dirty data for a * given throughput. * * For the smoothest delay, this value should be about 1 billion divided @@ -125,12 +125,6 @@ int zfs_delay_min_dirty_percent = 60; uint64_t zfs_delay_scale = 1000 * 1000 * 1000 / 2000; -/* - * XXX someday maybe turn these into #defines, and you have to tune it on a - * per-pool basis using zfs.conf. - */ - - hrtime_t zfs_throttle_delay = MSEC2NSEC(10); hrtime_t zfs_throttle_resolution = MSEC2NSEC(10); From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 15:20:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E5E23D2; Sat, 13 Sep 2014 15:20:50 +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 29272327; Sat, 13 Sep 2014 15:20:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DFKobp078539; Sat, 13 Sep 2014 15:20:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DFKoqB078538; Sat, 13 Sep 2014 15:20:50 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409131520.s8DFKoqB078538@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 13 Sep 2014 15:20:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r271513 - stable/9/sys/dev/sound/pcm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 15:20:50 -0000 Author: mav Date: Sat Sep 13 15:20:49 2014 New Revision: 271513 URL: http://svnweb.freebsd.org/changeset/base/271513 Log: MFC r269228: Add support for SOUND_MIXER_INFO IOCTL, used by gstreamer. Submitted by: Dmitry Luhtionov Modified: stable/9/sys/dev/sound/pcm/mixer.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/pcm/mixer.c ============================================================================== --- stable/9/sys/dev/sound/pcm/mixer.c Sat Sep 13 15:05:10 2014 (r271512) +++ stable/9/sys/dev/sound/pcm/mixer.c Sat Sep 13 15:20:49 2014 (r271513) @@ -1222,6 +1222,15 @@ mixer_ioctl(struct cdev *i_dev, u_long c return (ret); } +static void +mixer_mixerinfo(struct snd_mixer *m, mixer_info *mi) +{ + bzero((void *)mi, sizeof(*mi)); + strlcpy(mi->id, m->name, sizeof(mi->id)); + strlcpy(mi->name, device_get_desc(m->dev), sizeof(mi->name)); + mi->modify_counter = m->modify_counter; +} + /* * XXX Make sure you can guarantee concurrency safety before calling this * function, be it through Giant, PCM_*, etc ! @@ -1280,6 +1289,10 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo *arg_i = SOUND_VERSION; ret = 0; goto done; + case SOUND_MIXER_INFO: + mixer_mixerinfo(m, (mixer_info *)arg); + ret = 0; + goto done; } if ((cmd & ~0xff) == MIXER_WRITE(0)) { if (j == SOUND_MIXER_RECSRC) From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 15:22:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B9E1507; Sat, 13 Sep 2014 15:22: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 462663C4; Sat, 13 Sep 2014 15:22: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 s8DFM9NC079693; Sat, 13 Sep 2014 15:22:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DFM9dT079692; Sat, 13 Sep 2014 15:22:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409131522.s8DFM9dT079692@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 13 Sep 2014 15:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r271514 - stable/8/sys/dev/sound/pcm X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 15:22:09 -0000 Author: mav Date: Sat Sep 13 15:22:08 2014 New Revision: 271514 URL: http://svnweb.freebsd.org/changeset/base/271514 Log: MFC r269228: Add support for SOUND_MIXER_INFO IOCTL, used by gstreamer. Submitted by: Dmitry Luhtionov Modified: stable/8/sys/dev/sound/pcm/mixer.c Directory Properties: stable/8/ (props changed) stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/pcm/ (props changed) Modified: stable/8/sys/dev/sound/pcm/mixer.c ============================================================================== --- stable/8/sys/dev/sound/pcm/mixer.c Sat Sep 13 15:20:49 2014 (r271513) +++ stable/8/sys/dev/sound/pcm/mixer.c Sat Sep 13 15:22:08 2014 (r271514) @@ -1222,6 +1222,15 @@ mixer_ioctl(struct cdev *i_dev, u_long c return (ret); } +static void +mixer_mixerinfo(struct snd_mixer *m, mixer_info *mi) +{ + bzero((void *)mi, sizeof(*mi)); + strlcpy(mi->id, m->name, sizeof(mi->id)); + strlcpy(mi->name, device_get_desc(m->dev), sizeof(mi->name)); + mi->modify_counter = m->modify_counter; +} + /* * XXX Make sure you can guarantee concurrency safety before calling this * function, be it through Giant, PCM_*, etc ! @@ -1280,6 +1289,10 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo *arg_i = SOUND_VERSION; ret = 0; goto done; + case SOUND_MIXER_INFO: + mixer_mixerinfo(m, (mixer_info *)arg); + ret = 0; + goto done; } if ((cmd & ~0xff) == MIXER_WRITE(0)) { if (j == SOUND_MIXER_RECSRC) From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 15:24:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59A51644; Sat, 13 Sep 2014 15:24:36 +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 447FE3CD; Sat, 13 Sep 2014 15:24:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DFOaj2080058; Sat, 13 Sep 2014 15:24:36 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DFOaHI080057; Sat, 13 Sep 2014 15:24:36 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409131524.s8DFOaHI080057@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 13 Sep 2014 15:24:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r271515 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 15:24:36 -0000 Author: delphij Date: Sat Sep 13 15:24:35 2014 New Revision: 271515 URL: http://svnweb.freebsd.org/changeset/base/271515 Log: 5138 add tunable for maximum number of blocks freed in one txg Reviewed by: Adam Leventhal Reviewed by: Mattew Ahrens Reviewed by: Josef 'Jeff' Sipek Reviewed by: Richard Elling Reviewed by: George Wilson Approved by: Dan McDonald Author: Max Grossman illumos/illumos-gate@af3465da8fa420c4ec701e3e57704d537a6f755b Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c Sat Sep 13 15:22:08 2014 (r271514) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c Sat Sep 13 15:24:35 2014 (r271515) @@ -69,6 +69,8 @@ boolean_t zfs_no_scrub_io = B_FALSE; /* boolean_t zfs_no_scrub_prefetch = B_FALSE; /* set to disable scrub prefetch */ enum ddt_class zfs_scrub_ddt_class_max = DDT_CLASS_DUPLICATE; int dsl_scan_delay_completion = B_FALSE; /* set to delay scan completion */ +/* max number of blocks to free in a single TXG */ +uint64_t zfs_free_max_blocks = UINT64_MAX; #define DSL_SCAN_IS_SCRUB_RESILVER(scn) \ ((scn)->scn_phys.scn_func == POOL_SCAN_SCRUB || \ @@ -1319,6 +1321,9 @@ dsl_scan_free_should_pause(dsl_scan_t *s if (zfs_recover) return (B_FALSE); + if (scn->scn_visited_this_txg >= zfs_free_max_blocks) + return (B_TRUE); + elapsed_nanosecs = gethrtime() - scn->scn_sync_start_time; return (elapsed_nanosecs / NANOSEC > zfs_txg_timeout || (NSEC2MSEC(elapsed_nanosecs) > zfs_free_min_time_ms && From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 15:27:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A098078E; Sat, 13 Sep 2014 15:27: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 8BD0E3ED; Sat, 13 Sep 2014 15:27: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 s8DFRkcB080503; Sat, 13 Sep 2014 15:27:46 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DFRk3J080502; Sat, 13 Sep 2014 15:27:46 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409131527.s8DFRk3J080502@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 13 Sep 2014 15:27:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r271516 - vendor/illumos/dist/lib/libzpool/common X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 15:27:46 -0000 Author: delphij Date: Sat Sep 13 15:27:46 2014 New Revision: 271516 URL: http://svnweb.freebsd.org/changeset/base/271516 Log: 5134 if ZFS_DEBUG or debug= is set, libzpool should enable debug prints Reviewed by: Adam Leventhal Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Saso Kiselkov Approved by: Dan McDonald Author: Matthew Ahrens illumos/illumos-gate@7fa49ea5e7d23077615525b1738f90f273258b05 Modified: vendor/illumos/dist/lib/libzpool/common/kernel.c Modified: vendor/illumos/dist/lib/libzpool/common/kernel.c ============================================================================== --- vendor/illumos/dist/lib/libzpool/common/kernel.c Sat Sep 13 15:24:35 2014 (r271515) +++ vendor/illumos/dist/lib/libzpool/common/kernel.c Sat Sep 13 15:27:46 2014 (r271516) @@ -629,6 +629,9 @@ dprintf_setup(int *argc, char **argv) */ if (dprintf_find_string("on")) dprintf_print_all = 1; + + if (dprintf_string != NULL) + zfs_flags |= ZFS_DEBUG_DPRINTF; } /* From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 15:31:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C80319D0; Sat, 13 Sep 2014 15:31: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 B250A668; Sat, 13 Sep 2014 15:31: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 s8DFVbwU084498; Sat, 13 Sep 2014 15:31:37 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DFVbDi084497; Sat, 13 Sep 2014 15:31:37 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409131531.s8DFVbDi084497@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 13 Sep 2014 15:31:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r271517 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 15:31:37 -0000 Author: delphij Date: Sat Sep 13 15:31:37 2014 New Revision: 271517 URL: http://svnweb.freebsd.org/changeset/base/271517 Log: 5140 message about "%recv could not be opened" is printed when booting after crash Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Max Grossman Reviewed by: Richard Elling Approved by: Dan McDonald Author: Matthew Ahrens illumos/illumos-gate@22438533bcc131ecebd4c16c699c35e91d321b76 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c Sat Sep 13 15:27:46 2014 (r271516) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c Sat Sep 13 15:31:37 2014 (r271517) @@ -635,7 +635,14 @@ zil_claim(const char *osname, void *txar error = dmu_objset_own(osname, DMU_OST_ANY, B_FALSE, FTAG, &os); if (error != 0) { - cmn_err(CE_WARN, "can't open objset for %s", osname); + /* + * EBUSY indicates that the objset is inconsistent, in which + * case it can not have a ZIL. + */ + if (error != EBUSY) { + cmn_err(CE_WARN, "can't open objset for %s, error %u", + osname, error); + } return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 15:34:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CF9CB40; Sat, 13 Sep 2014 15:34:13 +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 4CB4C68A; Sat, 13 Sep 2014 15:34:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DFYDev084885; Sat, 13 Sep 2014 15:34:13 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DFYCkQ084883; Sat, 13 Sep 2014 15:34:12 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409131534.s8DFYCkQ084883@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 13 Sep 2014 15:34:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r271518 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 15:34:13 -0000 Author: delphij Date: Sat Sep 13 15:34:12 2014 New Revision: 271518 URL: http://svnweb.freebsd.org/changeset/base/271518 Log: 5139 SEEK_HOLE failed to report a hole at end of file Reviewed by: Adam Leventhal Reviewed by: Alex Reece Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Max Grossman Reviewed by: Peng Dai Reviewed by: Richard Elling Approved by: Dan McDonald Author: Matthew Ahrens illumos/illumos-gate@0fbc0cd0e52a11f6c4397a1714f94412cbf98b60 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c Sat Sep 13 15:31:37 2014 (r271517) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c Sat Sep 13 15:34:12 2014 (r271518) @@ -1943,6 +1943,15 @@ dnode_next_offset(dnode_t *dn, int flags flags, offset, lvl, blkfill, txg); } + /* + * There's always a "virtual hole" at the end of the object, even + * if all BP's which physically exist are non-holes. + */ + if ((flags & DNODE_FIND_HOLE) && error == ESRCH && txg == 0 && + minlvl == 1 && blkfill == 1 && !(flags & DNODE_FIND_BACKWARDS)) { + error = 0; + } + if (error == 0 && (flags & DNODE_FIND_BACKWARDS ? initial_offset < *offset : initial_offset > *offset)) error = SET_ERROR(ESRCH); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c Sat Sep 13 15:31:37 2014 (r271517) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c Sat Sep 13 15:34:12 2014 (r271518) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ @@ -271,16 +271,19 @@ zfs_holey(vnode_t *vp, int cmd, offset_t error = dmu_offset_next(zp->z_zfsvfs->z_os, zp->z_id, hole, &noff); - /* end of file? */ - if ((error == ESRCH) || (noff > file_sz)) { - /* - * Handle the virtual hole at the end of file. - */ - if (hole) { - *off = file_sz; - return (0); - } + if (error == ESRCH) return (SET_ERROR(ENXIO)); + + /* + * We could find a hole that begins after the logical end-of-file, + * because dmu_offset_next() only works on whole blocks. If the + * EOF falls mid-block, then indicate that the "virtual hole" + * at the end of the file begins at the logical EOF, rather than + * at the end of the last block. + */ + if (noff > file_sz) { + ASSERT(hole); + noff = file_sz; } if (noff < *off) From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 15:59:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E42B1A5; Sat, 13 Sep 2014 15:59:19 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 82E268A5; Sat, 13 Sep 2014 15:59:19 +0000 (UTC) Received: from delphij-macbook.local (unknown [10.64.64.50]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 316556DD4; Sat, 13 Sep 2014 08:59:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1410623959; x=1410638359; bh=2XYQ26leZ6TCPAYGkjL0F99pTkheSprVmlCpNaLtQcE=; h=Date:From:Reply-To:To:Subject:References:In-Reply-To; b=WSxAQ1q28Bt1AAxuuhfizWHRHfuMy9FhiRpWVSmV6eDAU1/xV8YXzFzOezTjxCRRz XINKuyDHzBXLEfUUGA/9i4sXNS3WicjbDRgZzFguo3+F/hxVPRdF3+Nb8KvurtfRG7 6h/PPgZ+Y3hVhn6KPX0waO86c/XscltRUrwssync= Message-ID: <541469D4.70503@delphij.net> Date: Sat, 13 Sep 2014 23:59:16 +0800 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: Re: svn commit: r271510 - vendor-sys/illumos/dist/uts/common/fs/zfs/sys References: <201409131423.s8DENpPW046817@svn.freebsd.org> In-Reply-To: <201409131423.s8DENpPW046817@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 15:59:19 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 9/13/14 10:23 PM, Xin LI wrote: > Author: delphij Date: Sat Sep 13 14:23:51 2014 New Revision: > 271510 URL: http://svnweb.freebsd.org/changeset/base/271510 > > Log: 5151 blkdev should support reporting of physical block size > Reviewed by: Josef 'Jeff' Sipek Reviewed > by: Garrett D'Amore Approved by: Dan McDonald > Author: Hans Rosenfeld > > > illumos/illumos-gate@32ce6b819524e8719d4ce58db40a00e9f17843e2 Whoops, this was wrong, should read: === 5141 zfs minimum indirect block size is 4K Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Richard Elling Approved by: Dan McDonald Author: Matthew Ahrens illumos/illumos-gate@e94f268a6264bf027b3bc556fb4cceb84f7323c5 === Cheers, -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJUFGnUAAoJEJW2GBstM+nsVXsP/AuL/M+zJJUWnUpqbQekV4H2 Yq5m5lTJQvWcZw4XhG659JIvAWkc9O+pOvUpP0HiYe5ErSV4wHyIcB4hZepDh25y EbkzHKnDo5hUIlmbfGSQ+m7oYnFeDew8MjOPtoicqbc/JXVgcvQMuHNzE8ejQ9AO JYDNnhakT1mafqXOTqcePF57lGDZVDMJplSMJlsTUTc9QJBAGP+lc54oAUW4JGEc O01C6tuEpT/E9BKD5aI8a1UaTQxRk2uzhq42MF2u5N/iO9HApkR9+ZZcucHGykY5 lJz99NegfUYfBsktVSvg5XaAohwLbvWC2LPR3p3Uh52Gtd613l7TLw9IwTZmZysv /Jfa4LZRs7k1ppUvyOhZtllkcIy1GEnJpQx50URrYxtIhF/ttNf9QrkbfKc/E3+3 Ch/ulj/8RhwQhGj0X+nXDpIFOCTPWpUPWCmgREaA/lt+WRwCsYZmN1ipY7aX7BSx oHh89A197VnYZ9MTpxxzdA1LUcTM57F0TiFlkhywe5GsGGEAYPDuf3rAy8RAVFmD MmNVgUx6N4ADwxkccHNHsH8qXhQusm9fArnSNyWh++qw+2tOQqUcEPjuWmuFOtNs ueOLMAGm0fMiqAvM36dj08LCXKCBk317S6r6EQo+kmGZTzg6xFhgjnqzoErtQhB/ jznoIT1i1FuGiKOTl/x+ =oCxp -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 16:02:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 009A341F; Sat, 13 Sep 2014 16:02: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 D47AB954; Sat, 13 Sep 2014 16:02: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 s8DG2hjF098699; Sat, 13 Sep 2014 16:02:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DG2hXE098698; Sat, 13 Sep 2014 16:02:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409131602.s8DG2hXE098698@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 13 Sep 2014 16:02: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: r271523 - stable/10/sys/dev/ahci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 16:02:44 -0000 Author: mav Date: Sat Sep 13 16:02:43 2014 New Revision: 271523 URL: http://svnweb.freebsd.org/changeset/base/271523 Log: MFC r271163, 271196: Invert AHCI_Q_NOBSYRES quirk meaning, waiting for readiness by default. I gave up to update list of Marvell chips that require this quirk. The final nail was growing number of PCIe/M.2 SSDs where Marvell chips have PCI IDs of different vendors. Approved by: re (delphij) Modified: stable/10/sys/dev/ahci/ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ahci/ahci.c ============================================================================== --- stable/10/sys/dev/ahci/ahci.c Sat Sep 13 16:00:35 2014 (r271522) +++ stable/10/sys/dev/ahci/ahci.c Sat Sep 13 16:02:43 2014 (r271523) @@ -257,31 +257,31 @@ static struct { AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, {0x614511ab, 0x00, "Marvell 88SE6145", AHCI_Q_NOFORCE | AHCI_Q_4CH | AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, - {0x91201b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_NOBSYRES}, - {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2|AHCI_Q_NOBSYRES}, - {0x91251b4b, 0x00, "Marvell 88SE9125", AHCI_Q_NOBSYRES}, - {0x91281b4b, 0x00, "Marvell 88SE9128", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x91301b4b, 0x00, "Marvell 88SE9130", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x91721b4b, 0x00, "Marvell 88SE9172", AHCI_Q_NOBSYRES}, - {0x91821b4b, 0x00, "Marvell 88SE9182", AHCI_Q_NOBSYRES}, - {0x91831b4b, 0x00, "Marvell 88SS9183", AHCI_Q_NOBSYRES}, - {0x91a01b4b, 0x00, "Marvell 88SE91Ax", AHCI_Q_NOBSYRES}, - {0x92151b4b, 0x00, "Marvell 88SE9215", AHCI_Q_NOBSYRES}, - {0x92201b4b, 0x00, "Marvell 88SE9220", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x92301b4b, 0x00, "Marvell 88SE9230", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x92351b4b, 0x00, "Marvell 88SE9235", AHCI_Q_NOBSYRES}, - {0x06201103, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES}, - {0x06201b4b, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES}, - {0x06221103, 0x00, "HighPoint RocketRAID 622", AHCI_Q_NOBSYRES}, - {0x06221b4b, 0x00, "HighPoint RocketRAID 622", AHCI_Q_NOBSYRES}, - {0x06401103, 0x00, "HighPoint RocketRAID 640", AHCI_Q_NOBSYRES}, - {0x06401b4b, 0x00, "HighPoint RocketRAID 640", AHCI_Q_NOBSYRES}, - {0x06441103, 0x00, "HighPoint RocketRAID 644", AHCI_Q_NOBSYRES}, - {0x06441b4b, 0x00, "HighPoint RocketRAID 644", AHCI_Q_NOBSYRES}, - {0x06411103, 0x00, "HighPoint RocketRAID 640L", AHCI_Q_NOBSYRES}, - {0x06421103, 0x00, "HighPoint RocketRAID 642L", AHCI_Q_NOBSYRES}, - {0x06451103, 0x00, "HighPoint RocketRAID 644L", AHCI_Q_NOBSYRES}, + {0x91201b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS}, + {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_ALTSIG}, + {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2}, + {0x91251b4b, 0x00, "Marvell 88SE9125", 0}, + {0x91281b4b, 0x00, "Marvell 88SE9128", AHCI_Q_ALTSIG}, + {0x91301b4b, 0x00, "Marvell 88SE9130", AHCI_Q_ALTSIG}, + {0x91721b4b, 0x00, "Marvell 88SE9172", 0}, + {0x91821b4b, 0x00, "Marvell 88SE9182", 0}, + {0x91831b4b, 0x00, "Marvell 88SS9183", 0}, + {0x91a01b4b, 0x00, "Marvell 88SE91Ax", 0}, + {0x92151b4b, 0x00, "Marvell 88SE9215", 0}, + {0x92201b4b, 0x00, "Marvell 88SE9220", AHCI_Q_ALTSIG}, + {0x92301b4b, 0x00, "Marvell 88SE9230", AHCI_Q_ALTSIG}, + {0x92351b4b, 0x00, "Marvell 88SE9235", 0}, + {0x06201103, 0x00, "HighPoint RocketRAID 620", 0}, + {0x06201b4b, 0x00, "HighPoint RocketRAID 620", 0}, + {0x06221103, 0x00, "HighPoint RocketRAID 622", 0}, + {0x06221b4b, 0x00, "HighPoint RocketRAID 622", 0}, + {0x06401103, 0x00, "HighPoint RocketRAID 640", 0}, + {0x06401b4b, 0x00, "HighPoint RocketRAID 640", 0}, + {0x06441103, 0x00, "HighPoint RocketRAID 644", 0}, + {0x06441b4b, 0x00, "HighPoint RocketRAID 644", 0}, + {0x06411103, 0x00, "HighPoint RocketRAID 640L", 0}, + {0x06421103, 0x00, "HighPoint RocketRAID 642L", 0}, + {0x06451103, 0x00, "HighPoint RocketRAID 644L", 0}, {0x044c10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, {0x044d10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, {0x044e10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, @@ -491,10 +491,9 @@ ahci_attach(device_t dev) ctlr->ichannels = ATA_INL(ctlr->r_mem, AHCI_PI); /* Identify and set separate quirks for HBA and RAID f/w Marvells. */ - if ((ctlr->quirks & AHCI_Q_NOBSYRES) && - (ctlr->quirks & AHCI_Q_ALTSIG) && + if ((ctlr->quirks & AHCI_Q_ALTSIG) && (ctlr->caps & AHCI_CAP_SPM) == 0) - ctlr->quirks &= ~AHCI_Q_NOBSYRES; + ctlr->quirks |= AHCI_Q_NOBSYRES; if (ctlr->quirks & AHCI_Q_1CH) { ctlr->caps &= ~AHCI_CAP_NPMASK; @@ -1988,9 +1987,15 @@ ahci_execute_transaction(struct ahci_slo } } - /* Marvell controllers do not wait for readyness. */ - if ((ch->quirks & AHCI_Q_NOBSYRES) && softreset == 2 && - et == AHCI_ERR_NONE) { + /* + * Marvell HBAs with non-RAID firmware do not wait for + * readiness after soft reset, so we have to wait here. + * Marvell RAIDs do not have this problem, but instead + * sometimes forget to update FIS receive area, breaking + * this wait. + */ + if ((ch->quirks & AHCI_Q_NOBSYRES) == 0 && + softreset == 2 && et == AHCI_ERR_NONE) { while ((val = fis[2]) & ATA_S_BUSY) { DELAY(10); if (count++ >= timeout) From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 16:04:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68B2F5B8; Sat, 13 Sep 2014 16:04:56 +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 53FAE97B; Sat, 13 Sep 2014 16:04:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DG4u0W099114; Sat, 13 Sep 2014 16:04:56 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DG4u9D099113; Sat, 13 Sep 2014 16:04:56 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201409131604.s8DG4u9D099113@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 13 Sep 2014 16:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271524 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 16:04:56 -0000 Author: melifaro Date: Sat Sep 13 16:04:55 2014 New Revision: 271524 URL: http://svnweb.freebsd.org/changeset/base/271524 Log: Do not try to read i2c info when no transceiver is present. MFC with: r270064 Sponsored by: Yandex LLC Modified: head/sbin/ifconfig/sfp.c Modified: head/sbin/ifconfig/sfp.c ============================================================================== --- head/sbin/ifconfig/sfp.c Sat Sep 13 16:02:43 2014 (r271523) +++ head/sbin/ifconfig/sfp.c Sat Sep 13 16:04:55 2014 (r271524) @@ -764,11 +764,13 @@ sfp_status(int s, struct ifreq *ifr, int /* * Try to read byte 0 from i2c: * Both SFF-8472 and SFF-8436 use it as - * 'identification byte' + * 'identification byte'. + * Stop reading status on zero as value - + * this might happen in case of empty transceiver slot. */ id_byte = 0; ii.f(&ii, SFF_8472_BASE, SFF_8472_ID, 1, (caddr_t)&id_byte); - if (ii.error != 0) + if (ii.error != 0 || id_byte == 0) return; switch (id_byte) { From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 16:07:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A57B70D; Sat, 13 Sep 2014 16:07:44 +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 0285D990; Sat, 13 Sep 2014 16:07:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DG7h8j099575; Sat, 13 Sep 2014 16:07:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DG7hgX099574; Sat, 13 Sep 2014 16:07:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409131607.s8DG7hgX099574@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 13 Sep 2014 16:07: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: r271525 - in stable/9/sys/dev: ahci usb/wlan X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 16:07:44 -0000 Author: mav Date: Sat Sep 13 16:07:43 2014 New Revision: 271525 URL: http://svnweb.freebsd.org/changeset/base/271525 Log: MFC r271163, r271196: Invert AHCI_Q_NOBSYRES quirk meaning, waiting for readiness by default. I gave up to update list of Marvell chips that require this quirk. The final nail was growing number of PCIe/M.2 SSDs where Marvell chips have PCI IDs of different vendors. Modified: stable/9/sys/dev/ahci/ahci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/forth/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/i386/gptboot/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/dev/run/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/dev/puc/ (props changed) stable/9/sys/dev/usb/wlan/if_run.c (props changed) stable/9/sys/dev/usb/wlan/if_runreg.h (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) stable/9/sys/modules/ixgbe/ (props changed) stable/9/sys/modules/svr4/ (props changed) stable/9/sys/net/ (props changed) stable/9/sys/netpfil/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/dev/ahci/ahci.c ============================================================================== --- stable/9/sys/dev/ahci/ahci.c Sat Sep 13 16:04:55 2014 (r271524) +++ stable/9/sys/dev/ahci/ahci.c Sat Sep 13 16:07:43 2014 (r271525) @@ -261,31 +261,31 @@ static struct { AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, {0x614511ab, 0x00, "Marvell 88SE6145", AHCI_Q_NOFORCE | AHCI_Q_4CH | AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, - {0x91201b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_NOBSYRES}, - {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2|AHCI_Q_NOBSYRES}, - {0x91251b4b, 0x00, "Marvell 88SE9125", AHCI_Q_NOBSYRES}, - {0x91281b4b, 0x00, "Marvell 88SE9128", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x91301b4b, 0x00, "Marvell 88SE9130", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x91721b4b, 0x00, "Marvell 88SE9172", AHCI_Q_NOBSYRES}, - {0x91821b4b, 0x00, "Marvell 88SE9182", AHCI_Q_NOBSYRES}, - {0x91831b4b, 0x00, "Marvell 88SS9183", AHCI_Q_NOBSYRES}, - {0x91a01b4b, 0x00, "Marvell 88SE91Ax", AHCI_Q_NOBSYRES}, - {0x92151b4b, 0x00, "Marvell 88SE9215", AHCI_Q_NOBSYRES}, - {0x92201b4b, 0x00, "Marvell 88SE9220", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x92301b4b, 0x00, "Marvell 88SE9230", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x92351b4b, 0x00, "Marvell 88SE9235", AHCI_Q_NOBSYRES}, - {0x06201103, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES}, - {0x06201b4b, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES}, - {0x06221103, 0x00, "HighPoint RocketRAID 622", AHCI_Q_NOBSYRES}, - {0x06221b4b, 0x00, "HighPoint RocketRAID 622", AHCI_Q_NOBSYRES}, - {0x06401103, 0x00, "HighPoint RocketRAID 640", AHCI_Q_NOBSYRES}, - {0x06401b4b, 0x00, "HighPoint RocketRAID 640", AHCI_Q_NOBSYRES}, - {0x06441103, 0x00, "HighPoint RocketRAID 644", AHCI_Q_NOBSYRES}, - {0x06441b4b, 0x00, "HighPoint RocketRAID 644", AHCI_Q_NOBSYRES}, - {0x06411103, 0x00, "HighPoint RocketRAID 640L", AHCI_Q_NOBSYRES}, - {0x06421103, 0x00, "HighPoint RocketRAID 642L", AHCI_Q_NOBSYRES}, - {0x06451103, 0x00, "HighPoint RocketRAID 644L", AHCI_Q_NOBSYRES}, + {0x91201b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS}, + {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_ALTSIG}, + {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2}, + {0x91251b4b, 0x00, "Marvell 88SE9125", 0}, + {0x91281b4b, 0x00, "Marvell 88SE9128", AHCI_Q_ALTSIG}, + {0x91301b4b, 0x00, "Marvell 88SE9130", AHCI_Q_ALTSIG}, + {0x91721b4b, 0x00, "Marvell 88SE9172", 0}, + {0x91821b4b, 0x00, "Marvell 88SE9182", 0}, + {0x91831b4b, 0x00, "Marvell 88SS9183", 0}, + {0x91a01b4b, 0x00, "Marvell 88SE91Ax", 0}, + {0x92151b4b, 0x00, "Marvell 88SE9215", 0}, + {0x92201b4b, 0x00, "Marvell 88SE9220", AHCI_Q_ALTSIG}, + {0x92301b4b, 0x00, "Marvell 88SE9230", AHCI_Q_ALTSIG}, + {0x92351b4b, 0x00, "Marvell 88SE9235", 0}, + {0x06201103, 0x00, "HighPoint RocketRAID 620", 0}, + {0x06201b4b, 0x00, "HighPoint RocketRAID 620", 0}, + {0x06221103, 0x00, "HighPoint RocketRAID 622", 0}, + {0x06221b4b, 0x00, "HighPoint RocketRAID 622", 0}, + {0x06401103, 0x00, "HighPoint RocketRAID 640", 0}, + {0x06401b4b, 0x00, "HighPoint RocketRAID 640", 0}, + {0x06441103, 0x00, "HighPoint RocketRAID 644", 0}, + {0x06441b4b, 0x00, "HighPoint RocketRAID 644", 0}, + {0x06411103, 0x00, "HighPoint RocketRAID 640L", 0}, + {0x06421103, 0x00, "HighPoint RocketRAID 642L", 0}, + {0x06451103, 0x00, "HighPoint RocketRAID 644L", 0}, {0x044c10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, {0x044d10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, {0x044e10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, @@ -487,10 +487,9 @@ ahci_attach(device_t dev) ctlr->ichannels = ATA_INL(ctlr->r_mem, AHCI_PI); /* Identify and set separate quirks for HBA and RAID f/w Marvells. */ - if ((ctlr->quirks & AHCI_Q_NOBSYRES) && - (ctlr->quirks & AHCI_Q_ALTSIG) && + if ((ctlr->quirks & AHCI_Q_ALTSIG) && (ctlr->caps & AHCI_CAP_SPM) == 0) - ctlr->quirks &= ~AHCI_Q_NOBSYRES; + ctlr->quirks |= AHCI_Q_NOBSYRES; if (ctlr->quirks & AHCI_Q_1CH) { ctlr->caps &= ~AHCI_CAP_NPMASK; @@ -1972,9 +1971,15 @@ ahci_execute_transaction(struct ahci_slo } } - /* Marvell controllers do not wait for readyness. */ - if ((ch->quirks & AHCI_Q_NOBSYRES) && softreset == 2 && - et == AHCI_ERR_NONE) { + /* + * Marvell HBAs with non-RAID firmware do not wait for + * readiness after soft reset, so we have to wait here. + * Marvell RAIDs do not have this problem, but instead + * sometimes forget to update FIS receive area, breaking + * this wait. + */ + if ((ch->quirks & AHCI_Q_NOBSYRES) == 0 && + softreset == 2 && et == AHCI_ERR_NONE) { while ((val = fis[2]) & ATA_S_BUSY) { DELAY(10); if (count++ >= timeout) From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 16:26:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1DB2EC8D; Sat, 13 Sep 2014 16:26:15 +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 E25A6B5A; Sat, 13 Sep 2014 16:26: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 s8DGQE1M009046; Sat, 13 Sep 2014 16:26:14 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DGQEpW009044; Sat, 13 Sep 2014 16:26:14 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409131626.s8DGQEpW009044@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 13 Sep 2014 16:26:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271526 - in head/sys/cddl: boot/zfs contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 16:26:15 -0000 Author: delphij Date: Sat Sep 13 16:26:14 2014 New Revision: 271526 URL: http://svnweb.freebsd.org/changeset/base/271526 Log: MFV r271510: Enforce 4K as smallest indirect block size (previously the smallest indirect block size was 1K but that was never used). This makes some space estimates more accurate and uses less memory for some data structures. Illumos issue: 5141 zfs minimum indirect block size is 4K MFC after: 2 weeks Modified: head/sys/cddl/boot/zfs/zfsimpl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/boot/zfs/zfsimpl.h ============================================================================== --- head/sys/cddl/boot/zfs/zfsimpl.h Sat Sep 13 16:07:43 2014 (r271525) +++ head/sys/cddl/boot/zfs/zfsimpl.h Sat Sep 13 16:26:14 2014 (r271526) @@ -840,7 +840,7 @@ struct uberblock { * Fixed constants. */ #define DNODE_SHIFT 9 /* 512 bytes */ -#define DN_MIN_INDBLKSHIFT 10 /* 1k */ +#define DN_MIN_INDBLKSHIFT 12 /* 4k */ #define DN_MAX_INDBLKSHIFT 14 /* 16k */ #define DNODE_BLOCK_SHIFT 14 /* 16k */ #define DNODE_CORE_SIZE 64 /* 64 bytes for dnode sans blkptrs */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Sat Sep 13 16:07:43 2014 (r271525) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Sat Sep 13 16:26:14 2014 (r271526) @@ -56,7 +56,7 @@ extern "C" { * Fixed constants. */ #define DNODE_SHIFT 9 /* 512 bytes */ -#define DN_MIN_INDBLKSHIFT 10 /* 1k */ +#define DN_MIN_INDBLKSHIFT 12 /* 4k */ #define DN_MAX_INDBLKSHIFT 14 /* 16k */ #define DNODE_BLOCK_SHIFT 14 /* 16k */ #define DNODE_CORE_SIZE 64 /* 64 bytes for dnode sans blkptrs */ From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 16:41:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32911FCE; Sat, 13 Sep 2014 16:41:40 +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 0385FCF3; Sat, 13 Sep 2014 16:41:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DGfdAA016615; Sat, 13 Sep 2014 16:41:39 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DGfdjR016612; Sat, 13 Sep 2014 16:41:39 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409131641.s8DGfdjR016612@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 13 Sep 2014 16:41:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271527 - head/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 16:41:40 -0000 Author: delphij Date: Sat Sep 13 16:41:39 2014 New Revision: 271527 URL: http://svnweb.freebsd.org/changeset/base/271527 Log: MFV r271511: Use fnvlist_* to make code more readable. Illumos issue: 5135 zpool_find_import_cached() can use fnvlist_* MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Sat Sep 13 16:26:14 2014 (r271526) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Sat Sep 13 16:41:39 2014 (r271527) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ @@ -1426,21 +1426,15 @@ zpool_find_import_cached(libzfs_handle_t elem = NULL; while ((elem = nvlist_next_nvpair(raw, elem)) != NULL) { - verify(nvpair_value_nvlist(elem, &src) == 0); + src = fnvpair_value_nvlist(elem); - verify(nvlist_lookup_string(src, ZPOOL_CONFIG_POOL_NAME, - &name) == 0); + name = fnvlist_lookup_string(src, ZPOOL_CONFIG_POOL_NAME); if (poolname != NULL && strcmp(poolname, name) != 0) continue; - verify(nvlist_lookup_uint64(src, ZPOOL_CONFIG_POOL_GUID, - &this_guid) == 0); - if (guid != 0) { - verify(nvlist_lookup_uint64(src, ZPOOL_CONFIG_POOL_GUID, - &this_guid) == 0); - if (guid != this_guid) - continue; - } + this_guid = fnvlist_lookup_uint64(src, ZPOOL_CONFIG_POOL_GUID); + if (guid != 0 && guid != this_guid) + continue; if (pool_active(hdl, name, this_guid, &active) != 0) { nvlist_free(raw); From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 16:51:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AFA93A2; Sat, 13 Sep 2014 16:51:23 +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 86144E00; Sat, 13 Sep 2014 16:51:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DGpNfd020501; Sat, 13 Sep 2014 16:51:23 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DGpNba020500; Sat, 13 Sep 2014 16:51:23 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409131651.s8DGpNba020500@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 13 Sep 2014 16:51:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271528 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 16:51:23 -0000 Author: delphij Date: Sat Sep 13 16:51:23 2014 New Revision: 271528 URL: http://svnweb.freebsd.org/changeset/base/271528 Log: MFV r271512: Illumos issue: 5136 fix write throttle comment in dsl_pool.c MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Sat Sep 13 16:41:39 2014 (r271527) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Sat Sep 13 16:51:23 2014 (r271528) @@ -116,8 +116,8 @@ int zfs_delay_min_dirty_percent = 60; /* * This controls how quickly the delay approaches infinity. - * Larger values cause it to delay less for a given amount of dirty data. - * Therefore larger values will cause there to be more dirty data for a + * Larger values cause it to delay more for a given amount of dirty data. + * Therefore larger values will cause there to be less dirty data for a * given throughput. * * For the smoothest delay, this value should be about 1 billion divided @@ -130,11 +130,6 @@ int zfs_delay_min_dirty_percent = 60; uint64_t zfs_delay_scale = 1000 * 1000 * 1000 / 2000; -/* - * XXX someday maybe turn these into #defines, and you have to tune it on a - * per-pool basis using zfs.conf. - */ - #ifdef __FreeBSD__ extern int zfs_vdev_async_write_active_max_dirty_percent; From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 16:54:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DA715D2; Sat, 13 Sep 2014 16:54:43 +0000 (UTC) Received: from mail-qa0-x22a.google.com (mail-qa0-x22a.google.com [IPv6:2607:f8b0:400d:c00::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A9A5E42; Sat, 13 Sep 2014 16:54:43 +0000 (UTC) Received: by mail-qa0-f42.google.com with SMTP id j7so2211415qaq.15 for ; Sat, 13 Sep 2014 09:54:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=1sxdNBCQlrRGoXrvtpXyHVKs2hIAH/lnYYJzIvK4Cfs=; b=vjrfQI4YIMJygT/Qp9i1Yz7ugFsM/Fki5QqxilEk2n5uqN3igeCa980GcdKjzLehf9 DRzB8upJlWiMcIpmKm3yjZzuoUWfEQGqg/DbSaQUZqyZ4SWs0DzZFZQWeUpc93AnBL5y Bl5ZzoB7OHqqMa2icTqAZBrXoz9QHx/yrYv64PAxOCzKW54LVObPHkvW/O8wvZf9MaT8 UPfO4EzGGjakrwMNReTUQO67LR5rnDp91nEjm4cdjoT/9KE21z2PArzjb/DFyi5BFrTa 3aib01/rQkVQo840xCugL9w6RRP7zqf8IH9OnxdELpamCaHNX3XkWVf8750hmbczZEO3 OenQ== MIME-Version: 1.0 X-Received: by 10.224.86.5 with SMTP id q5mr23686464qal.36.1410627282211; Sat, 13 Sep 2014 09:54:42 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.39.139 with HTTP; Sat, 13 Sep 2014 09:54:42 -0700 (PDT) In-Reply-To: <201409130826.s8D8Q9Wx078339@svn.freebsd.org> References: <201409130826.s8D8Q9Wx078339@svn.freebsd.org> Date: Sat, 13 Sep 2014 09:54:42 -0700 X-Google-Sender-Auth: TXY7QaBoJHBYns6yeQqPJRY7nL0 Message-ID: Subject: Re: svn commit: r271504 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront net netinet ofed/drivers/net/mlx4 From: Adrian Chadd To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 16:54:43 -0000 Hi, Just for the record: * I'm glad you're tackling the TSO config stuff; * I'm not glad you're trying to pack it into a u_int rather than creating a new structure and adding fields for it. I appreciate that you're trying to rush this in before 10.1, but this is exactly why things shouldn't be rushed in before release deadlines. :) I'd really like to see this be broken out as a structure and the bit shifting games for what really shouldn't be packed into a u_int fixed. Otherwise this is going to be deadweight that has to persist past 11.0. Thanks, -a On 13 September 2014 01:26, Hans Petter Selasky wrote: > Author: hselasky > Date: Sat Sep 13 08:26:09 2014 > New Revision: 271504 > URL: http://svnweb.freebsd.org/changeset/base/271504 > > Log: > Improve transmit sending offload, TSO, algorithm in general. > > The current TSO limitation feature only takes the total number of > bytes in an mbuf chain into account and does not limit by the number > of mbufs in a chain. Some kinds of hardware is limited by two > factors. One is the fragment length and the second is the fragment > count. Both of these limits need to be taken into account when doing > TSO. Else some kinds of hardware might have to drop completely valid > mbuf chains because they cannot loaded into the given hardware's DMA > engine. The new way of doing TSO limitation has been made backwards > compatible as input from other FreeBSD developers and will use > defaults for values not set. > > MFC after: 1 week > Sponsored by: Mellanox Technologies > > Modified: > head/sys/dev/oce/oce_if.c > head/sys/dev/oce/oce_if.h > head/sys/dev/vmware/vmxnet3/if_vmx.c > head/sys/dev/vmware/vmxnet3/if_vmxvar.h > head/sys/dev/xen/netfront/netfront.c > head/sys/net/if.c > head/sys/net/if_lagg.c > head/sys/net/if_var.h > head/sys/net/if_vlan.c > head/sys/netinet/tcp_output.c > head/sys/ofed/drivers/net/mlx4/en_netdev.c > > Modified: head/sys/dev/oce/oce_if.c > ============================================================================== > --- head/sys/dev/oce/oce_if.c Sat Sep 13 07:45:03 2014 (r271503) > +++ head/sys/dev/oce/oce_if.c Sat Sep 13 08:26:09 2014 (r271504) > @@ -1731,7 +1731,10 @@ oce_attach_ifp(POCE_SOFTC sc) > sc->ifp->if_baudrate = IF_Gbps(10); > > #if __FreeBSD_version >= 1000000 > - sc->ifp->if_hw_tsomax = OCE_MAX_TSO_SIZE; > + sc->ifp->if_hw_tsomax = IF_HW_TSOMAX_BUILD_VALUE( > + 65535 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN) /* bytes */, > + OCE_MAX_TX_ELEMENTS /* maximum frag count */, > + 12 /* 4K frag size */); > #endif > > ether_ifattach(sc->ifp, sc->macaddr.mac_addr); > > Modified: head/sys/dev/oce/oce_if.h > ============================================================================== > --- head/sys/dev/oce/oce_if.h Sat Sep 13 07:45:03 2014 (r271503) > +++ head/sys/dev/oce/oce_if.h Sat Sep 13 08:26:09 2014 (r271504) > @@ -152,7 +152,6 @@ extern int mp_ncpus; /* system's total > #define OCE_MAX_TX_ELEMENTS 29 > #define OCE_MAX_TX_DESC 1024 > #define OCE_MAX_TX_SIZE 65535 > -#define OCE_MAX_TSO_SIZE (65535 - ETHER_HDR_LEN) > #define OCE_MAX_RX_SIZE 4096 > #define OCE_MAX_RQ_POSTS 255 > #define OCE_DEFAULT_PROMISCUOUS 0 > > Modified: head/sys/dev/vmware/vmxnet3/if_vmx.c > ============================================================================== > --- head/sys/dev/vmware/vmxnet3/if_vmx.c Sat Sep 13 07:45:03 2014 (r271503) > +++ head/sys/dev/vmware/vmxnet3/if_vmx.c Sat Sep 13 08:26:09 2014 (r271504) > @@ -1722,7 +1722,11 @@ vmxnet3_setup_interface(struct vmxnet3_s > ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; > ifp->if_init = vmxnet3_init; > ifp->if_ioctl = vmxnet3_ioctl; > - ifp->if_hw_tsomax = VMXNET3_TSO_MAXSIZE; > + > + ifp->if_hw_tsomax = IF_HW_TSOMAX_BUILD_VALUE( > + 65535 - sizeof(struct ether_vlan_header) /* bytes */, > + VMXNET3_TX_MAXSEGS /* maximum frag count */, > + VMXNET3_TX_MAXSEGSHIFT /* frag size */); > > #ifdef VMXNET3_LEGACY_TX > ifp->if_start = vmxnet3_start; > > Modified: head/sys/dev/vmware/vmxnet3/if_vmxvar.h > ============================================================================== > --- head/sys/dev/vmware/vmxnet3/if_vmxvar.h Sat Sep 13 07:45:03 2014 (r271503) > +++ head/sys/dev/vmware/vmxnet3/if_vmxvar.h Sat Sep 13 08:26:09 2014 (r271504) > @@ -277,14 +277,13 @@ struct vmxnet3_softc { > */ > #define VMXNET3_TX_MAXSEGS 32 > #define VMXNET3_TX_MAXSIZE (VMXNET3_TX_MAXSEGS * MCLBYTES) > -#define VMXNET3_TSO_MAXSIZE \ > - (VMXNET3_TX_MAXSIZE - sizeof(struct ether_vlan_header)) > > /* > * Maximum support Tx segments size. The length field in the > * Tx descriptor is 14 bits. > */ > -#define VMXNET3_TX_MAXSEGSIZE (1 << 14) > +#define VMXNET3_TX_MAXSEGSHIFT 14 > +#define VMXNET3_TX_MAXSEGSIZE (1 << VMXNET3_TX_MAXSEGSHIFT) > > /* > * The maximum number of Rx segments we accept. When LRO is enabled, > > Modified: head/sys/dev/xen/netfront/netfront.c > ============================================================================== > --- head/sys/dev/xen/netfront/netfront.c Sat Sep 13 07:45:03 2014 (r271503) > +++ head/sys/dev/xen/netfront/netfront.c Sat Sep 13 08:26:09 2014 (r271504) > @@ -134,7 +134,6 @@ static const int MODPARM_rx_flip = 0; > * to mirror the Linux MAX_SKB_FRAGS constant. > */ > #define MAX_TX_REQ_FRAGS (65536 / PAGE_SIZE + 2) > -#define NF_TSO_MAXBURST ((IP_MAXPACKET / PAGE_SIZE) * MCLBYTES) > > #define RX_COPY_THRESHOLD 256 > > @@ -2102,7 +2101,10 @@ create_netdev(device_t dev) > > ifp->if_hwassist = XN_CSUM_FEATURES; > ifp->if_capabilities = IFCAP_HWCSUM; > - ifp->if_hw_tsomax = NF_TSO_MAXBURST; > + ifp->if_hw_tsomax = IF_HW_TSOMAX_BUILD_VALUE( > + 65535 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN) /* bytes */, > + MAX_TX_REQ_FRAGS /* maximum frag count */, > + PAGE_SHIFT /* PAGE_SIZE frag size */); > > ether_ifattach(ifp, np->mac); > callout_init(&np->xn_stat_ch, CALLOUT_MPSAFE); > > Modified: head/sys/net/if.c > ============================================================================== > --- head/sys/net/if.c Sat Sep 13 07:45:03 2014 (r271503) > +++ head/sys/net/if.c Sat Sep 13 08:26:09 2014 (r271504) > @@ -423,6 +423,52 @@ if_grow(void) > } > > /* > + * Compute the least common value of two "if_hw_tsomax" values: > + */ > +u_int > +if_hw_tsomax_common(u_int a, u_int b) > +{ > + u_int a_bytes = IF_HW_TSOMAX_GET_BYTES(a); > + u_int a_frag_count = IF_HW_TSOMAX_GET_FRAG_COUNT(a); > + u_int a_frag_size = IF_HW_TSOMAX_GET_FRAG_SIZE(a); > + u_int b_bytes = IF_HW_TSOMAX_GET_BYTES(b); > + u_int b_frag_count = IF_HW_TSOMAX_GET_FRAG_COUNT(b); > + u_int b_frag_size = IF_HW_TSOMAX_GET_FRAG_SIZE(b); > + > + return (IF_HW_TSOMAX_BUILD_VALUE(min(a_bytes, b_bytes), > + min(a_frag_count, b_frag_count), > + min(a_frag_size, b_frag_size))); > +} > + > +/* > + * Range check the "if_hw_tsomax" value: > + */ > +u_int > +if_hw_tsomax_range_check(u_int a) > +{ > + u_int a_bytes = IF_HW_TSOMAX_GET_BYTES(a); > + u_int a_frag_count = IF_HW_TSOMAX_GET_FRAG_COUNT(a); > + u_int a_frag_size = IF_HW_TSOMAX_GET_FRAG_SIZE(a); > + > + /* round down to nearest 4 bytes */ > + a_bytes &= 0xFFFC; > + > + /* use default, if zero */ > + if (a_bytes == 0) > + a_bytes = IF_HW_TSOMAX_DEFAULT_BYTES; > + > + /* use default, if zero */ > + if (a_frag_count == 0) > + a_frag_count = IF_HW_TSOMAX_DEFAULT_FRAG_COUNT; > + > + /* use default, if zero */ > + if (a_frag_size == 0) > + a_frag_size = IF_HW_TSOMAX_DEFAULT_FRAG_SIZE; > + > + return (IF_HW_TSOMAX_BUILD_VALUE(a_bytes, a_frag_count, a_frag_size)); > +} > + > +/* > * Allocate a struct ifnet and an index for an interface. A layer 2 > * common structure will also be allocated if an allocation routine is > * registered for the passed type. > @@ -445,6 +491,7 @@ if_alloc(u_char type) > ifp->if_index = idx; > ifp->if_type = type; > ifp->if_alloctype = type; > + ifp->if_hw_tsomax = IF_HW_TSOMAX_DEFAULT_VALUE(); > if (if_com_alloc[type] != NULL) { > ifp->if_l2com = if_com_alloc[type](type, ifp); > if (ifp->if_l2com == NULL) { > @@ -657,16 +704,9 @@ if_attach_internal(struct ifnet *ifp, in > TAILQ_INSERT_HEAD(&ifp->if_addrhead, ifa, ifa_link); > /* Reliably crash if used uninitialized. */ > ifp->if_broadcastaddr = NULL; > - > -#if defined(INET) || defined(INET6) > - /* Initialize to max value. */ > - if (ifp->if_hw_tsomax == 0) > - ifp->if_hw_tsomax = min(IP_MAXPACKET, 32 * MCLBYTES - > - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN)); > - KASSERT(ifp->if_hw_tsomax <= IP_MAXPACKET && > - ifp->if_hw_tsomax >= IP_MAXPACKET / 8, > - ("%s: tsomax outside of range", __func__)); > -#endif > + /* range check TSO value */ > + ifp->if_hw_tsomax = > + if_hw_tsomax_range_check(ifp->if_hw_tsomax); > } > #ifdef VIMAGE > else { > > Modified: head/sys/net/if_lagg.c > ============================================================================== > --- head/sys/net/if_lagg.c Sat Sep 13 07:45:03 2014 (r271503) > +++ head/sys/net/if_lagg.c Sat Sep 13 08:26:09 2014 (r271504) > @@ -445,11 +445,7 @@ lagg_capabilities(struct lagg_softc *sc) > struct lagg_port *lp; > int cap = ~0, ena = ~0; > u_long hwa = ~0UL; > -#if defined(INET) || defined(INET6) > - u_int hw_tsomax = IP_MAXPACKET; /* Initialize to the maximum value. */ > -#else > - u_int hw_tsomax = ~0; /* if_hw_tsomax is only for INET/INET6, but.. */ > -#endif > + u_int hw_tsomax = IF_HW_TSOMAX_DEFAULT_VALUE(); > > LAGG_WLOCK_ASSERT(sc); > > @@ -458,10 +454,9 @@ lagg_capabilities(struct lagg_softc *sc) > cap &= lp->lp_ifp->if_capabilities; > ena &= lp->lp_ifp->if_capenable; > hwa &= lp->lp_ifp->if_hwassist; > - /* Set to the minimum value of the lagg ports. */ > - if (lp->lp_ifp->if_hw_tsomax < hw_tsomax && > - lp->lp_ifp->if_hw_tsomax > 0) > - hw_tsomax = lp->lp_ifp->if_hw_tsomax; > + /* Set to the common value of the lagg ports. */ > + hw_tsomax = if_hw_tsomax_common(hw_tsomax, > + lp->lp_ifp->if_hw_tsomax); > } > cap = (cap == ~0 ? 0 : cap); > ena = (ena == ~0 ? 0 : ena); > > Modified: head/sys/net/if_var.h > ============================================================================== > --- head/sys/net/if_var.h Sat Sep 13 07:45:03 2014 (r271503) > +++ head/sys/net/if_var.h Sat Sep 13 08:26:09 2014 (r271504) > @@ -120,6 +120,43 @@ typedef int (*if_transmit_fn_t)(if_t, st > typedef uint64_t (*if_get_counter_t)(if_t, ifnet_counter); > > /* > + * Macros defining how to decode the "if_hw_tsomax" field: > + */ > +#define IF_HW_TSOMAX_GET_BYTES(x) \ > + ((uint16_t)(x)) /* 32..65535 */ > + > +#define IF_HW_TSOMAX_GET_FRAG_COUNT(x) \ > + ((uint8_t)((x) >> 16)) /* 1..255 */ > + > +#define IF_HW_TSOMAX_GET_FRAG_SIZE(x) \ > + ((uint8_t)((x) >> 24)) /* 12..16 */ > + > +/* > + * The following macro defines how to build the "if_hw_tsomax" > + * field. The "bytes" field has unit 1 bytes and declares the maximum > + * number of bytes which can be transferred by a single transmit > + * offload, TSO, job. The "bytes" field is rounded down to the neares > + * 4 bytes to avoid having the hardware do unaligned memory > + * accesses. The "frag_count" field has unit 1 fragment and declares > + * the maximum number of fragments a TSO job can contain. The > + * "frag_size" field has unit logarithm in base 2 of the actual value > + * in bytes and declares the maximum size of a fragment. > + */ > +#define IF_HW_TSOMAX_BUILD_VALUE(bytes, frag_count, frag_size) \ > + (((bytes) & 0xFFFC) | (((frag_count) & 0xFF) << 16) | \ > + (((frag_size) & 0xFF) << 24)) > + > +#define IF_HW_TSOMAX_DEFAULT_BYTES (65536 - 4) > +#define IF_HW_TSOMAX_DEFAULT_FRAG_COUNT 255 > +#define IF_HW_TSOMAX_DEFAULT_FRAG_SIZE 16 > + > +#define IF_HW_TSOMAX_DEFAULT_VALUE() \ > + IF_HW_TSOMAX_BUILD_VALUE( \ > + IF_HW_TSOMAX_DEFAULT_BYTES, \ > + IF_HW_TSOMAX_DEFAULT_FRAG_COUNT, \ > + IF_HW_TSOMAX_DEFAULT_FRAG_SIZE) > + > +/* > * Structure defining a network interface. > * > * Size ILP32: 592 (approx) > @@ -222,8 +259,7 @@ struct ifnet { > if_get_counter_t if_get_counter; /* get counter values */ > > /* Stuff that's only temporary and doesn't belong here. */ > - u_int if_hw_tsomax; /* tso burst length limit, the minimum > - * is (IP_MAXPACKET / 8). > + u_int if_hw_tsomax; /* TSO burst length limits. > * XXXAO: Have to find a better place > * for it eventually. */ > /* > @@ -608,6 +644,10 @@ void if_setioctlfn(if_t ifp, int (*)(if_ > void if_setstartfn(if_t ifp, void (*)(if_t)); > void if_settransmitfn(if_t ifp, if_transmit_fn_t); > void if_setqflushfn(if_t ifp, if_qflush_fn_t); > + > +/* "if_hw_tsomax" related functions */ > +u_int if_hw_tsomax_common(u_int, u_int); > +u_int if_hw_tsomax_range_check(u_int); > > /* Revisit the below. These are inline functions originally */ > int drbr_inuse_drv(if_t ifp, struct buf_ring *br); > > Modified: head/sys/net/if_vlan.c > ============================================================================== > --- head/sys/net/if_vlan.c Sat Sep 13 07:45:03 2014 (r271503) > +++ head/sys/net/if_vlan.c Sat Sep 13 08:26:09 2014 (r271504) > @@ -1511,8 +1511,8 @@ vlan_capabilities(struct ifvlan *ifv) > * propagate the hardware-assisted flag. TSO on VLANs > * does not necessarily require hardware VLAN tagging. > */ > - if (p->if_hw_tsomax > 0) > - ifp->if_hw_tsomax = p->if_hw_tsomax; > + ifp->if_hw_tsomax = if_hw_tsomax_common(ifp->if_hw_tsomax, > + p->if_hw_tsomax); > if (p->if_capabilities & IFCAP_VLAN_HWTSO) > ifp->if_capabilities |= p->if_capabilities & IFCAP_TSO; > if (p->if_capenable & IFCAP_VLAN_HWTSO) { > > Modified: head/sys/netinet/tcp_output.c > ============================================================================== > --- head/sys/netinet/tcp_output.c Sat Sep 13 07:45:03 2014 (r271503) > +++ head/sys/netinet/tcp_output.c Sat Sep 13 08:26:09 2014 (r271504) > @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); > #include > > #include > +#include > #include > #include > > @@ -767,18 +768,88 @@ send: > flags &= ~TH_FIN; > > if (tso) { > + u_int if_hw_tsomax_bytes; > + u_int if_hw_tsomax_frag_count; > + u_int if_hw_tsomax_frag_size; > + struct mbuf *mb; > + u_int moff; > + int max_len; > + > + /* extract TSO information */ > + if_hw_tsomax_bytes = > + IF_HW_TSOMAX_GET_BYTES(tp->t_tsomax); > + if_hw_tsomax_frag_count = > + IF_HW_TSOMAX_GET_FRAG_COUNT(tp->t_tsomax); > + if_hw_tsomax_frag_size = > + IF_HW_TSOMAX_GET_FRAG_SIZE(tp->t_tsomax); > + > + /* compute maximum TSO length */ > + max_len = (if_hw_tsomax_bytes - hdrlen); > + > + /* clamp maximum length value */ > + if (max_len > IP_MAXPACKET) > + max_len = IP_MAXPACKET; > + else if (max_len < 0) > + max_len = 0; > + > + /* get smallest length */ > + if (len > (u_int)max_len) { > + if (max_len != 0) > + sendalot = 1; > + len = (u_int)max_len; > + } > + > KASSERT(ipoptlen == 0, > ("%s: TSO can't do IP options", __func__)); > > + max_len = 0; > + mb = sbsndptr(&so->so_snd, off, len, &moff); > + > + /* now make sure the number of fragments fit too */ > + while (mb != NULL && (u_int)max_len < len) { > + u_int cur_length; > + u_int cur_frags; > + > + /* > + * Get length of mbuf fragment and how > + * many hardware frags, rounded up, it > + * would use: > + */ > + cur_length = (mb->m_len - moff); > + cur_frags = (cur_length + > + (1 << if_hw_tsomax_frag_size) - 1) >> > + if_hw_tsomax_frag_size; > + > + /* Handle special case: Zero Length Mbuf */ > + if (cur_frags == 0) > + cur_frags = 1; > + > + /* > + * Check if the fragment limit will be > + * reached or exceeded: > + */ > + if (cur_frags >= if_hw_tsomax_frag_count) { > + max_len += min(cur_length, > + if_hw_tsomax_frag_count << > + if_hw_tsomax_frag_size); > + break; > + } > + max_len += cur_length; > + if_hw_tsomax_frag_count -= cur_frags; > + moff = 0; > + mb = mb->m_next; > + } > + > /* > * Limit a burst to t_tsomax minus IP, > * TCP and options length to keep ip->ip_len > * from overflowing or exceeding the maximum > * length allowed by the network interface. > */ > - if (len > tp->t_tsomax - hdrlen) { > - len = tp->t_tsomax - hdrlen; > - sendalot = 1; > + if (len > (u_int)max_len) { > + if (max_len != 0) > + sendalot = 1; > + len = (u_int)max_len; > } > > /* > > Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c > ============================================================================== > --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Sat Sep 13 07:45:03 2014 (r271503) > +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Sat Sep 13 08:26:09 2014 (r271504) > @@ -673,6 +673,12 @@ int mlx4_en_do_start_port(struct net_dev > else > priv->rx_csum = 0; > > + /* set TSO limits so that we don't have to drop TX packets */ > + dev->if_hw_tsomax = IF_HW_TSOMAX_BUILD_VALUE( > + 65535 - sizeof(struct ether_vlan_header) /* bytes */, > + 16 /* maximum frag count */, > + 16 /* can do up to 4GByte */); > + > err = mlx4_wol_read(priv->mdev->dev, &config, priv->port); > if (err) { > en_err(priv, "Failed to get WoL info, unable to modify\n"); > From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 17:08:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A9ED9E9; Sat, 13 Sep 2014 17:08:28 +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 0B85AF78; Sat, 13 Sep 2014 17:08:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DH8RxG028190; Sat, 13 Sep 2014 17:08:27 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DH8R1M028188; Sat, 13 Sep 2014 17:08:27 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409131708.s8DH8R1M028188@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 13 Sep 2014 17:08:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271529 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 17:08:28 -0000 Author: mav Date: Sat Sep 13 17:08:27 2014 New Revision: 271529 URL: http://svnweb.freebsd.org/changeset/base/271529 Log: MFC r271362: Make ctl_port_mask an array to support more then 32 ports. Overflow reported by Coverity. CID: 1229894 Approved by: re (marius) Modified: stable/10/sys/cam/ctl/ctl_frontend.c stable/10/sys/cam/ctl/ctl_private.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.c Sat Sep 13 16:51:23 2014 (r271528) +++ stable/10/sys/cam/ctl/ctl_frontend.c Sat Sep 13 17:08:27 2014 (r271529) @@ -147,9 +147,9 @@ ctl_port_register(struct ctl_port *port, KASSERT(control_softc != NULL, ("CTL is not initialized")); mtx_lock(&control_softc->ctl_lock); - port_num = ctl_ffz(&control_softc->ctl_port_mask, CTL_MAX_PORTS); + port_num = ctl_ffz(control_softc->ctl_port_mask, CTL_MAX_PORTS); if ((port_num == -1) - || (ctl_set_mask(&control_softc->ctl_port_mask, port_num) == -1)) { + || (ctl_set_mask(control_softc->ctl_port_mask, port_num) == -1)) { port->targ_port = -1; mtx_unlock(&control_softc->ctl_lock); return (1); @@ -183,7 +183,7 @@ ctl_port_register(struct ctl_port *port, error: port->targ_port = -1; mtx_lock(&control_softc->ctl_lock); - ctl_clear_mask(&control_softc->ctl_port_mask, port_num); + ctl_clear_mask(control_softc->ctl_port_mask, port_num); mtx_unlock(&control_softc->ctl_lock); return (retval); } @@ -223,7 +223,7 @@ ctl_port_deregister(struct ctl_port *por control_softc->num_ports--; port_num = (port->targ_port < CTL_MAX_PORTS) ? port->targ_port : port->targ_port - CTL_MAX_PORTS; - ctl_clear_mask(&control_softc->ctl_port_mask, port_num); + ctl_clear_mask(control_softc->ctl_port_mask, port_num); control_softc->ctl_ports[port_num] = NULL; mtx_unlock(&control_softc->ctl_lock); Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Sat Sep 13 16:51:23 2014 (r271528) +++ stable/10/sys/cam/ctl/ctl_private.h Sat Sep 13 17:08:27 2014 (r271529) @@ -441,9 +441,9 @@ struct ctl_softc { struct ctl_io_pool *othersc_pool; struct proc *ctl_proc; int targ_online; - uint32_t ctl_lun_mask[CTL_MAX_LUNS >> 5]; + uint32_t ctl_lun_mask[(CTL_MAX_LUNS + 31) / 32]; struct ctl_lun *ctl_luns[CTL_MAX_LUNS]; - uint32_t ctl_port_mask; + uint32_t ctl_port_mask[(CTL_MAX_PORTS + 31) / 32]; uint64_t aps_locked_lun; STAILQ_HEAD(, ctl_lun) lun_list; STAILQ_HEAD(, ctl_be_lun) pending_lun_queue; From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 17:13:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F261DB5F; Sat, 13 Sep 2014 17:13:04 +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 DD083AE; Sat, 13 Sep 2014 17:13:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DHD49q032291; Sat, 13 Sep 2014 17:13:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DHD479032290; Sat, 13 Sep 2014 17:13:04 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409131713.s8DHD479032290@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 13 Sep 2014 17:13: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: r271530 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 17:13:05 -0000 Author: mav Date: Sat Sep 13 17:13:04 2014 New Revision: 271530 URL: http://svnweb.freebsd.org/changeset/base/271530 Log: MFC r271407: Extend UNMAP blacklist on all STEC SSD models. None of existing STEC devices need UNMAP or even support it well, having many limitations and even hanging sometimes executing those commands. New devices that may use UNMAP going to be released under HGST name. Approved by: re (delphij) Modified: stable/10/sys/cam/scsi/scsi_da.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_da.c Sat Sep 13 17:08:27 2014 (r271529) +++ stable/10/sys/cam/scsi/scsi_da.c Sat Sep 13 17:13:04 2014 (r271530) @@ -354,9 +354,9 @@ static struct da_quirk_entry da_quirk_ta }, { /* - * The STEC 842 sometimes hang on UNMAP. + * The STEC SSDs sometimes hang on UNMAP. */ - {T_DIRECT, SIP_MEDIA_FIXED, "STEC", "S842E800M2", "*"}, + {T_DIRECT, SIP_MEDIA_FIXED, "STEC", "*", "*"}, /*quirks*/ DA_Q_NO_UNMAP }, /* USB mass storage devices supported by umass(4) */ From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 17:14:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64CD1C9C; Sat, 13 Sep 2014 17:14:02 +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 4FF5DBC; Sat, 13 Sep 2014 17:14:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DHE2XP032464; Sat, 13 Sep 2014 17:14:02 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DHE2o1032463; Sat, 13 Sep 2014 17:14:02 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409131714.s8DHE2o1032463@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 13 Sep 2014 17:14:02 +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: r271531 - stable/9/sys/cam/scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 17:14:02 -0000 Author: mav Date: Sat Sep 13 17:14:01 2014 New Revision: 271531 URL: http://svnweb.freebsd.org/changeset/base/271531 Log: MFC r271407: Extend UNMAP blacklist on all STEC SSD models. None of existing STEC devices need UNMAP or even support it well, having many limitations and even hanging sometimes executing those commands. New devices that may use UNMAP going to be released under HGST name. Modified: stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Sat Sep 13 17:13:04 2014 (r271530) +++ stable/9/sys/cam/scsi/scsi_da.c Sat Sep 13 17:14:01 2014 (r271531) @@ -355,9 +355,9 @@ static struct da_quirk_entry da_quirk_ta }, { /* - * The STEC 842 sometimes hang on UNMAP. + * The STEC SSDs sometimes hang on UNMAP. */ - {T_DIRECT, SIP_MEDIA_FIXED, "STEC", "S842E800M2", "*"}, + {T_DIRECT, SIP_MEDIA_FIXED, "STEC", "*", "*"}, /*quirks*/ DA_Q_NO_UNMAP }, /* USB mass storage devices supported by umass(4) */ From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 17:24:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84F60EE4; Sat, 13 Sep 2014 17:24:57 +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 55C7318D; Sat, 13 Sep 2014 17:24:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DHOvbX037170; Sat, 13 Sep 2014 17:24:57 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DHOvJR037169; Sat, 13 Sep 2014 17:24:57 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409131724.s8DHOvJR037169@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 13 Sep 2014 17:24:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271532 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 17:24:57 -0000 Author: delphij Date: Sat Sep 13 17:24:56 2014 New Revision: 271532 URL: http://svnweb.freebsd.org/changeset/base/271532 Log: MFV r271515: Add a new tunable/sysctl, vfs.zfs.free_max_blocks, which can be used to limit how many blocks can be free'ed before a new transaction group is created. The default is no limit (infinite), but we should probably have a lower default, e.g. 100,000. With this limit, we can guard against the case where ZFS could run out of memory when destroying large numbers of blocks in a single transaction group, as the entire DDT needs to be brought into memory. Illumos issue: 5138 add tunable for maximum number of blocks freed in one txg MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Sat Sep 13 17:14:01 2014 (r271531) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Sat Sep 13 17:24:56 2014 (r271532) @@ -90,6 +90,11 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, no_scrub_ &zfs_no_scrub_prefetch, 0, "Disable scrub prefetching"); enum ddt_class zfs_scrub_ddt_class_max = DDT_CLASS_DUPLICATE; +/* max number of blocks to free in a single TXG */ +uint64_t zfs_free_max_blocks = UINT64_MAX; +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, free_max_blocks, CTLFLAG_RWTUN, + &zfs_free_max_blocks, 0, "Maximum number of blocks to free in one TXG"); + #define DSL_SCAN_IS_SCRUB_RESILVER(scn) \ ((scn)->scn_phys.scn_func == POOL_SCAN_SCRUB || \ @@ -1341,6 +1346,9 @@ dsl_scan_free_should_pause(dsl_scan_t *s if (zfs_recover) return (B_FALSE); + if (scn->scn_visited_this_txg >= zfs_free_max_blocks) + return (B_TRUE); + elapsed_nanosecs = gethrtime() - scn->scn_sync_start_time; return (elapsed_nanosecs / NANOSEC > zfs_txg_timeout || (NSEC2MSEC(elapsed_nanosecs) > zfs_free_min_time_ms && From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 17:30:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88AF61C3; Sat, 13 Sep 2014 17:30:47 +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 73B341C8; Sat, 13 Sep 2014 17:30:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DHUlER039840; Sat, 13 Sep 2014 17:30:47 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DHUlDO039839; Sat, 13 Sep 2014 17:30:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409131730.s8DHUlDO039839@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 13 Sep 2014 17:30:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271533 - head/cddl/contrib/opensolaris/lib/libzpool/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 17:30:47 -0000 Author: delphij Date: Sat Sep 13 17:30:46 2014 New Revision: 271533 URL: http://svnweb.freebsd.org/changeset/base/271533 Log: MFV r271516: Enable debug printf's when ZFS_DEBUG or debug= is set. Illumos issue: 5134 if ZFS_DEBUG or debug= is set, libzpool should enable debug prints MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Sat Sep 13 17:24:56 2014 (r271532) +++ head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Sat Sep 13 17:30:46 2014 (r271533) @@ -650,6 +650,9 @@ dprintf_setup(int *argc, char **argv) */ if (dprintf_find_string("on")) dprintf_print_all = 1; + + if (dprintf_string != NULL) + zfs_flags |= ZFS_DEBUG_DPRINTF; } int From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 17:36:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE0C43DE; Sat, 13 Sep 2014 17:36:34 +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 96648280; Sat, 13 Sep 2014 17:36:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DHaYsM042075; Sat, 13 Sep 2014 17:36:34 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DHaYY3042074; Sat, 13 Sep 2014 17:36:34 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409131736.s8DHaYY3042074@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 13 Sep 2014 17:36:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271534 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 17:36:34 -0000 Author: delphij Date: Sat Sep 13 17:36:34 2014 New Revision: 271534 URL: http://svnweb.freebsd.org/changeset/base/271534 Log: MFV r271517: In zil_claim, don't issue warning if we get EBUSY (inconsistent) when opening an objset, instead, ignore it silently. Illumos issue: 5140 message about "%recv could not be opened" is printed when booting after crash MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Sat Sep 13 17:30:46 2014 (r271533) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Sat Sep 13 17:36:34 2014 (r271534) @@ -644,7 +644,14 @@ zil_claim(const char *osname, void *txar error = dmu_objset_own(osname, DMU_OST_ANY, B_FALSE, FTAG, &os); if (error != 0) { - cmn_err(CE_WARN, "can't open objset for %s", osname); + /* + * EBUSY indicates that the objset is inconsistent, in which + * case it can not have a ZIL. + */ + if (error != EBUSY) { + cmn_err(CE_WARN, "can't open objset for %s, error %u", + osname, error); + } return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 17:38:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 037FB532; Sat, 13 Sep 2014 17:38:27 +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 E327729B; Sat, 13 Sep 2014 17:38:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DHcQCj042354; Sat, 13 Sep 2014 17:38:26 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DHcQBS042353; Sat, 13 Sep 2014 17:38:26 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409131738.s8DHcQBS042353@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 13 Sep 2014 17:38:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271535 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 17:38:27 -0000 Author: ian Date: Sat Sep 13 17:38:26 2014 New Revision: 271535 URL: http://svnweb.freebsd.org/changeset/base/271535 Log: Make inclusion of fdt clock support conditional on fdt_clock, not just fdt. There are plenty of platforms that use fdt without needing the overhead of the new clock support routines. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Sep 13 17:36:34 2014 (r271534) +++ head/sys/conf/files Sat Sep 13 17:38:26 2014 (r271535) @@ -1377,8 +1377,8 @@ dev/fatm/if_fatm.c optional fatm pci dev/fb/fbd.c optional fbd | vt dev/fb/fb_if.m standard dev/fb/splash.c optional sc splash -dev/fdt/fdt_clock.c optional fdt -dev/fdt/fdt_clock_if.m optional fdt +dev/fdt/fdt_clock.c optional fdt_clock +dev/fdt/fdt_clock_if.m optional fdt_clock dev/fdt/fdt_common.c optional fdt dev/fdt/fdt_slicer.c optional fdt cfi | fdt nand dev/fdt/fdt_static_dtb.S optional fdt fdt_dtb_static \ From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 17:48:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DD986FB; Sat, 13 Sep 2014 17:48: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 EC69F382; Sat, 13 Sep 2014 17:48:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DHmicA046971; Sat, 13 Sep 2014 17:48:44 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DHmiFO046969; Sat, 13 Sep 2014 17:48:44 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409131748.s8DHmiFO046969@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 13 Sep 2014 17:48:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271536 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 17:48:45 -0000 Author: delphij Date: Sat Sep 13 17:48:44 2014 New Revision: 271536 URL: http://svnweb.freebsd.org/changeset/base/271536 Log: MFV r271518: Correctly report hole at end of file. When asked to find a hole, the DMU sees that there are no holes in the object, and returns ESRCH. The ZPL interprets this as "no holes before the end of the file", and therefore inserts the "virtual hole" at the end of the file. Because DMU and ZPL have different ideas of where the end of an object/file is, we will end up returning the end of file, which is generally larger, instead of returning the end of object. The fix is to handle the "virtual hole" in the DMU. If no hole is found, the DMU will return a hole at the end of the file, rather than an error. Illumos issue: 5139 SEEK_HOLE failed to report a hole at end of file MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Sat Sep 13 17:38:26 2014 (r271535) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Sat Sep 13 17:48:44 2014 (r271536) @@ -1948,6 +1948,15 @@ dnode_next_offset(dnode_t *dn, int flags flags, offset, lvl, blkfill, txg); } + /* + * There's always a "virtual hole" at the end of the object, even + * if all BP's which physically exist are non-holes. + */ + if ((flags & DNODE_FIND_HOLE) && error == ESRCH && txg == 0 && + minlvl == 1 && blkfill == 1 && !(flags & DNODE_FIND_BACKWARDS)) { + error = 0; + } + if (error == 0 && (flags & DNODE_FIND_BACKWARDS ? initial_offset < *offset : initial_offset > *offset)) error = SET_ERROR(ESRCH); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sat Sep 13 17:38:26 2014 (r271535) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sat Sep 13 17:48:44 2014 (r271536) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ @@ -266,16 +266,19 @@ zfs_holey(vnode_t *vp, u_long cmd, offse error = dmu_offset_next(zp->z_zfsvfs->z_os, zp->z_id, hole, &noff); - /* end of file? */ - if ((error == ESRCH) || (noff > file_sz)) { - /* - * Handle the virtual hole at the end of file. - */ - if (hole) { - *off = file_sz; - return (0); - } + if (error == ESRCH) return (SET_ERROR(ENXIO)); + + /* + * We could find a hole that begins after the logical end-of-file, + * because dmu_offset_next() only works on whole blocks. If the + * EOF falls mid-block, then indicate that the "virtual hole" + * at the end of the file begins at the logical EOF, rather than + * at the end of the last block. + */ + if (noff > file_sz) { + ASSERT(hole); + noff = file_sz; } if (noff < *off) From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 18:13:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04089DE1; Sat, 13 Sep 2014 18:13: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 E2F2A846; Sat, 13 Sep 2014 18:13:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DID8ss061539; Sat, 13 Sep 2014 18:13:08 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DID8vR061538; Sat, 13 Sep 2014 18:13:08 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201409131813.s8DID8vR061538@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 13 Sep 2014 18:13:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271538 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 18:13:09 -0000 Author: melifaro Date: Sat Sep 13 18:13:08 2014 New Revision: 271538 URL: http://svnweb.freebsd.org/changeset/base/271538 Log: Switch if_vlan(4) to use counter(9) using new if_get_counter api. Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Sat Sep 13 17:58:34 2014 (r271537) +++ head/sys/net/if_vlan.c Sat Sep 13 18:13:08 2014 (r271538) @@ -105,6 +105,11 @@ struct ifvlan { struct ifvlantrunk *ifv_trunk; struct ifnet *ifv_ifp; void *ifv_cookie; + counter_u64_t ifv_ipackets; + counter_u64_t ifv_ibytes; + counter_u64_t ifv_opackets; + counter_u64_t ifv_obytes; + counter_u64_t ifv_omcasts; #define TRUNK(ifv) ((ifv)->ifv_trunk) #define PARENT(ifv) ((ifv)->ifv_trunk->parent) int ifv_pflags; /* special flags we have set on parent */ @@ -194,6 +199,7 @@ static void vlan_init(void *foo); static void vlan_input(struct ifnet *ifp, struct mbuf *m); static int vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr); static void vlan_qflush(struct ifnet *ifp); +static uint64_t vlan_get_counter(struct ifnet *ifp, ifnet_counter cnt); static int vlan_setflag(struct ifnet *ifp, int flag, int status, int (*func)(struct ifnet *, int)); static int vlan_setflags(struct ifnet *ifp, int status); @@ -945,6 +951,12 @@ vlan_clone_create(struct if_clone *ifc, return (ENOSPC); } SLIST_INIT(&ifv->vlan_mc_listhead); + /* Prepare pcpu counters */ + ifv->ifv_ipackets = counter_u64_alloc(M_WAITOK); + ifv->ifv_opackets = counter_u64_alloc(M_WAITOK); + ifv->ifv_ibytes = counter_u64_alloc(M_WAITOK); + ifv->ifv_obytes = counter_u64_alloc(M_WAITOK); + ifv->ifv_omcasts = counter_u64_alloc(M_WAITOK); ifp->if_softc = ifv; /* @@ -964,6 +976,7 @@ vlan_clone_create(struct if_clone *ifc, ifp->if_qflush = vlan_qflush; ifp->if_ioctl = vlan_ioctl; ifp->if_flags = VLAN_IFFLAGS; + ifp->if_get_counter = vlan_get_counter; ether_ifattach(ifp, eaddr); /* Now undo some of the damage... */ ifp->if_baudrate = 0; @@ -1006,6 +1019,11 @@ vlan_clone_destroy(struct if_clone *ifc, ether_ifdetach(ifp); /* first, remove it from system-wide lists */ vlan_unconfig(ifp); /* now it can be unconfigured and freed */ if_free(ifp); + counter_u64_free(ifv->ifv_ipackets); + counter_u64_free(ifv->ifv_opackets); + counter_u64_free(ifv->ifv_ibytes); + counter_u64_free(ifv->ifv_obytes); + counter_u64_free(ifv->ifv_omcasts); free(ifv, M_VLAN); ifc_free_unit(ifc, unit); @@ -1099,15 +1117,39 @@ vlan_transmit(struct ifnet *ifp, struct * Send it, precisely as ether_output() would have. */ error = (p->if_transmit)(p, m); - if (!error) { - ifp->if_opackets++; - ifp->if_omcasts += mcast; - ifp->if_obytes += len; + if (error == 0) { + counter_u64_add(ifv->ifv_opackets, 1); + counter_u64_add(ifv->ifv_obytes, len); + counter_u64_add(ifv->ifv_omcasts, 1); } else ifp->if_oerrors++; return (error); } +static uint64_t +vlan_get_counter(struct ifnet *ifp, ifnet_counter cnt) +{ + struct ifvlan *ifv; + + ifv = ifp->if_softc; + + switch (cnt) { + case IFCOUNTER_IPACKETS: + return (counter_u64_fetch(ifv->ifv_ipackets)); + case IFCOUNTER_OPACKETS: + return (counter_u64_fetch(ifv->ifv_opackets)); + case IFCOUNTER_IBYTES: + return (counter_u64_fetch(ifv->ifv_ibytes)); + case IFCOUNTER_OBYTES: + return (counter_u64_fetch(ifv->ifv_obytes)); + case IFCOUNTER_OMCASTS: + return (counter_u64_fetch(ifv->ifv_omcasts)); + default: + return (if_get_counter_compat(ifp, cnt)); + } + /* NOTREACHED */ +} + /* * The ifp->if_qflush entry point for vlan(4) is a no-op. */ @@ -1181,7 +1223,8 @@ vlan_input(struct ifnet *ifp, struct mbu TRUNK_RUNLOCK(trunk); m->m_pkthdr.rcvif = ifv->ifv_ifp; - ifv->ifv_ifp->if_ipackets++; + counter_u64_add(ifv->ifv_ipackets, 1); + counter_u64_add(ifv->ifv_ibytes, m->m_pkthdr.len); /* Pass it back through the parent's input routine. */ (*ifp->if_input)(ifv->ifv_ifp, m); From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 18:24:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91C03265; Sat, 13 Sep 2014 18:24:57 +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 7A9AB937; Sat, 13 Sep 2014 18:24:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DIOv0A067092; Sat, 13 Sep 2014 18:24:57 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DIOstv067066; Sat, 13 Sep 2014 18:24:54 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201409131824.s8DIOstv067066@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sat, 13 Sep 2014 18:24:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271539 - in head/usr.sbin/bsdinstall: partedit scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 18:24:57 -0000 Author: nwhitehorn Date: Sat Sep 13 18:24:54 2014 New Revision: 271539 URL: http://svnweb.freebsd.org/changeset/base/271539 Log: Add ZFS support to the bsdinstall partition editor and sade. Submitted by: Kurt Lidl (original version) MFC after: 6 weeks Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c head/usr.sbin/bsdinstall/partedit/part_wizard.c head/usr.sbin/bsdinstall/partedit/partedit.c head/usr.sbin/bsdinstall/partedit/partedit.h head/usr.sbin/bsdinstall/partedit/partedit_generic.c head/usr.sbin/bsdinstall/partedit/partedit_pc98.c head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c head/usr.sbin/bsdinstall/partedit/partedit_sparc64.c head/usr.sbin/bsdinstall/partedit/partedit_x86.c head/usr.sbin/bsdinstall/partedit/sade.8 head/usr.sbin/bsdinstall/partedit/scripted.c head/usr.sbin/bsdinstall/scripts/config head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/gpart_ops.c Sat Sep 13 18:13:08 2014 (r271538) +++ head/usr.sbin/bsdinstall/partedit/gpart_ops.c Sat Sep 13 18:24:54 2014 (r271539) @@ -27,6 +27,7 @@ */ #include +#include #include #include #include @@ -119,6 +120,53 @@ newfs_command(const char *fstype, char * else if (strcmp(items[i].name, "TRIM") == 0) strcat(command, "-t "); } + } else if (strcmp(fstype, "freebsd-zfs") == 0) { + int i; + DIALOG_LISTITEM items[] = { + {"fletcher4", "checksum algorithm: fletcher4", + "Use fletcher4 for data integrity checking. " + "(default)", 1 }, + {"fletcher2", "checksum algorithm: fletcher2", + "Use fletcher2 for data integrity checking. " + "(not recommended)", 0 }, + {"sha256", "checksum algorithm: sha256", + "Use sha256 for data integrity checking. " + "(not recommended)", 0 }, + {"atime", "Update atimes for files", + "Disable atime update", 0 }, + }; + + if (!use_default) { + int choice; + choice = dlg_checklist("ZFS Options", "", 0, 0, 0, + sizeof(items)/sizeof(items[0]), items, NULL, + FLAG_CHECK, &i); + if (choice == 1) /* Cancel */ + return; + } + + strcpy(command, "zpool create -f -m none "); + if (getenv("BSDINSTALL_TMPBOOT") != NULL) { + char zfsboot_path[MAXPATHLEN]; + sprintf(zfsboot_path, "%s/zfs", + getenv("BSDINSTALL_TMPBOOT")); + mkdir(zfsboot_path, S_IRWXU | S_IRGRP | S_IXGRP | + S_IROTH | S_IXOTH); + sprintf(command, "%s -o cachefile=%s/zpool.cache ", + command, zfsboot_path); + } + for (i = 0; i < (int)(sizeof(items)/sizeof(items[0])); i++) { + if (items[i].state == 0) + continue; + if (strcmp(items[i].name, "fletcher4") == 0) + strcat(command, "-O checksum=fletcher4 "); + else if (strcmp(items[i].name, "fletcher2") == 0) + strcat(command, "-O checksum=fletcher2 "); + else if (strcmp(items[i].name, "sha256") == 0) + strcat(command, "-O checksum=sha256 "); + else if (strcmp(items[i].name, "atime") == 0) + strcat(command, "-O atime=off "); + } } else if (strcmp(fstype, "fat32") == 0 || strcmp(fstype, "efi") == 0) { int i; DIALOG_LISTITEM items[] = { @@ -329,7 +377,7 @@ gpart_bootcode(struct ggeom *gp) } static void -gpart_partcode(struct gprovider *pp) +gpart_partcode(struct gprovider *pp, const char *fstype) { struct gconfig *gc; const char *scheme; @@ -344,7 +392,7 @@ gpart_partcode(struct gprovider *pp) } /* Make sure this partition scheme needs partcode on this platform */ - if (partcode_path(scheme) == NULL) + if (partcode_path(scheme, fstype) == NULL) return; LIST_FOREACH(gc, &pp->lg_config, lg_config) { @@ -356,7 +404,7 @@ gpart_partcode(struct gprovider *pp) /* Shell out to gpart for partcode for now */ sprintf(command, "gpart bootcode -p %s -i %s %s", - partcode_path(scheme), indexstr, pp->lg_geom->lg_name); + partcode_path(scheme, fstype), indexstr, pp->lg_geom->lg_name); if (system(command) != 0) { sprintf(message, "Error installing partcode on partition %s", pp->lg_name); @@ -416,15 +464,15 @@ gpart_edit(struct gprovider *pp) const char *errstr, *oldtype, *scheme; struct partition_metadata *md; char sizestr[32]; - char newfs[64]; + char newfs[255]; intmax_t idx; int hadlabel, choice, junk, nitems; unsigned i; DIALOG_FORMITEM items[] = { {0, "Type:", 5, 0, 0, FALSE, "", 11, 0, 12, 15, 0, - FALSE, "Filesystem type (e.g. freebsd-ufs, freebsd-swap)", - FALSE}, + FALSE, "Filesystem type (e.g. freebsd-ufs, freebsd-zfs, " + "freebsd-swap)", FALSE}, {0, "Size:", 5, 1, 0, FALSE, "", 11, 1, 12, 0, 0, FALSE, "Partition size. Append K, M, G for kilobytes, " "megabytes or gigabytes.", FALSE}, @@ -565,6 +613,8 @@ set_default_part_metadata(const char *na const char *type, const char *mountpoint, const char *newfs) { struct partition_metadata *md; + char *zpool_name = NULL; + int i; /* Set part metadata */ md = get_part_metadata(name, 1); @@ -577,8 +627,18 @@ set_default_part_metadata(const char *na if (newfs != NULL && newfs[0] != '\0') { md->newfs = malloc(strlen(newfs) + strlen(" /dev/") + - strlen(name) + 1); - sprintf(md->newfs, "%s /dev/%s", newfs, name); + strlen(mountpoint) + 5 + strlen(name) + 1); + if (strcmp("freebsd-zfs", type) == 0) { + zpool_name = strdup((strlen(mountpoint) == 1) ? + "root" : &mountpoint[1]); + for (i = 0; zpool_name[i] != 0; i++) + if (!isalnum(zpool_name[i])) + zpool_name[i] = '_'; + sprintf(md->newfs, "%s %s /dev/%s", newfs, + zpool_name, name); + } else { + sprintf(md->newfs, "%s /dev/%s", newfs, name); + } } } @@ -587,8 +647,9 @@ set_default_part_metadata(const char *na if (strcmp(type, bootpart_type(scheme)) == 0) md->bootcode = 1; - /* VTOC8 needs partcode in UFS partitions */ - if (strcmp(scheme, "VTOC8") == 0 && strcmp(type, "freebsd-ufs") == 0) + /* VTOC8 needs partcode at the start of partitions */ + if (strcmp(scheme, "VTOC8") == 0 && (strcmp(type, "freebsd-ufs") == 0 + || strcmp(type, "freebsd-zfs") == 0)) md->bootcode = 1; if (mountpoint == NULL || mountpoint[0] == '\0') { @@ -611,8 +672,13 @@ set_default_part_metadata(const char *na free(md->fstab->fs_mntops); free(md->fstab->fs_type); } - md->fstab->fs_spec = malloc(strlen(name) + 6); - sprintf(md->fstab->fs_spec, "/dev/%s", name); + if (strcmp("freebsd-zfs", type) == 0) { + md->fstab->fs_spec = strdup(zpool_name); + } else { + md->fstab->fs_spec = malloc(strlen(name) + + strlen("/dev/") + 1); + sprintf(md->fstab->fs_spec, "/dev/%s", name); + } md->fstab->fs_file = strdup(mountpoint); /* Get VFS from text after freebsd-, if possible */ if (strncmp("freebsd-", type, 8) == 0) @@ -625,6 +691,10 @@ set_default_part_metadata(const char *na md->fstab->fs_type = strdup(FSTAB_SW); md->fstab->fs_freq = 0; md->fstab->fs_passno = 0; + } else if (strcmp(type, "freebsd-zfs") == 0) { + md->fstab->fs_type = strdup(FSTAB_RW); + md->fstab->fs_freq = 0; + md->fstab->fs_passno = 0; } else { md->fstab->fs_type = strdup(FSTAB_RW); if (strcmp(mountpoint, "/") == 0) { @@ -637,6 +707,9 @@ set_default_part_metadata(const char *na } md->fstab->fs_mntops = strdup(md->fstab->fs_type); } + + if (zpool_name != NULL) + free(zpool_name); } static @@ -748,7 +821,7 @@ gpart_create(struct gprovider *pp, char struct ggeom *geom; const char *errstr, *scheme; char sizestr[32], startstr[32], output[64], *newpartname; - char newfs[64], options_fstype[64]; + char newfs[255], options_fstype[64]; intmax_t maxsize, size, sector, firstfree, stripe; uint64_t bytes; int nitems, choice, junk; @@ -756,8 +829,8 @@ gpart_create(struct gprovider *pp, char DIALOG_FORMITEM items[] = { {0, "Type:", 5, 0, 0, FALSE, "freebsd-ufs", 11, 0, 12, 15, 0, - FALSE, "Filesystem type (e.g. freebsd-ufs, freebsd-swap)", - FALSE}, + FALSE, "Filesystem type (e.g. freebsd-ufs, freebsd-zfs, " + "freebsd-swap)", FALSE}, {0, "Size:", 5, 1, 0, FALSE, "", 11, 1, 12, 15, 0, FALSE, "Partition size. Append K, M, G for kilobytes, " "megabytes or gigabytes.", FALSE}, @@ -935,6 +1008,20 @@ addpartform: goto addpartform; } + /* If this is the root partition, check that this fs is bootable */ + if (strcmp(items[2].text, "/") == 0 && !is_fs_bootable(scheme, + items[0].text)) { + char message[512]; + sprintf(message, "This file system (%s) is not bootable " + "on this system. Are you sure you want to proceed?", + items[0].text); + dialog_vars.defaultno = TRUE; + choice = dialog_yesno("Warning", message, 0, 0); + dialog_vars.defaultno = FALSE; + if (choice == 1) /* cancel */ + goto addpartform; + } + /* * If this is the root partition, and we need a boot partition, ask * the user to add one. @@ -1177,12 +1264,22 @@ gpart_commit(struct gmesh *mesh) struct gctl_req *r; const char *errstr; const char *modified; + const char *rootfs; LIST_FOREACH(classp, &mesh->lg_class, lg_class) { if (strcmp(classp->lg_name, "PART") == 0) break; } + /* Figure out what filesystem / uses */ + rootfs = "ufs"; /* Assume ufs if nothing else present */ + TAILQ_FOREACH(md, &part_metadata, metadata) { + if (md->fstab != NULL && strcmp(md->fstab->fs_file, "/") == 0) { + rootfs = md->fstab->fs_vfstype; + break; + } + } + if (strcmp(classp->lg_name, "PART") != 0) { dialog_msgbox("Error", "gpart not found!", 0, 0, TRUE); return; @@ -1222,7 +1319,7 @@ gpart_commit(struct gmesh *mesh) break; if (cp == NULL) /* No sub-partitions */ - gpart_partcode(pp); + gpart_partcode(pp, rootfs); } r = gctl_get_handle(); Modified: head/usr.sbin/bsdinstall/partedit/part_wizard.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/part_wizard.c Sat Sep 13 18:13:08 2014 (r271538) +++ head/usr.sbin/bsdinstall/partedit/part_wizard.c Sat Sep 13 18:24:54 2014 (r271539) @@ -31,6 +31,9 @@ #include #include +#include +#include + #include #include #include @@ -44,10 +47,16 @@ static char *boot_disk(struct gmesh *mes static char *wizard_partition(struct gmesh *mesh, const char *disk); int -part_wizard(void) { +part_wizard(const char *fsreq) { int error; struct gmesh mesh; char *disk, *schemeroot; + const char *fstype; + + if (fsreq != NULL) + fstype = fsreq; + else + fstype = "ufs"; startwizard: error = geom_gettree(&mesh); @@ -70,11 +79,11 @@ startwizard: dlg_put_backtitle(); error = geom_gettree(&mesh); - error = wizard_makeparts(&mesh, schemeroot, 1); + error = wizard_makeparts(&mesh, schemeroot, fstype, 1); if (error) goto startwizard; free(schemeroot); - + geom_deletetree(&mesh); return (0); @@ -106,9 +115,9 @@ boot_disk(struct gmesh *mesh) LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { desc = type = NULL; LIST_FOREACH(gc, &pp->lg_config, lg_config) { - if (strcmp(gc->lg_name, "type") == 0) + if (strcmp(gc->lg_name, "type") == 0) type = gc->lg_val; - if (strcmp(gc->lg_name, "descr") == 0) + if (strcmp(gc->lg_name, "descr") == 0) desc = gc->lg_val; } @@ -200,7 +209,7 @@ wizard_partition(struct gmesh *mesh, con break; if (classp != NULL) { - LIST_FOREACH(gpart, &classp->lg_geom, lg_geom) + LIST_FOREACH(gpart, &classp->lg_geom, lg_geom) if (strcmp(gpart->lg_name, disk) == 0) break; } @@ -282,21 +291,29 @@ query: } int -wizard_makeparts(struct gmesh *mesh, const char *disk, int interactive) +wizard_makeparts(struct gmesh *mesh, const char *disk, const char *fstype, int interactive) { struct gmesh submesh; struct gclass *classp; struct ggeom *gp; struct gprovider *pp; intmax_t swapsize, available; - char swapsizestr[10], rootsizestr[10]; + char swapsizestr[10], rootsizestr[10], *fsname; + char *fsnames[] = {"freebsd-ufs", "freebsd-zfs"}; int retval; + if (strcmp(fstype, "zfs") == 0) { + fsname = fsnames[1]; + } else { + /* default to UFS */ + fsname = fsnames[0]; + } + LIST_FOREACH(classp, &mesh->lg_class, lg_class) if (strcmp(classp->lg_name, "PART") == 0) break; - LIST_FOREACH(gp, &classp->lg_geom, lg_geom) + LIST_FOREACH(gp, &classp->lg_geom, lg_geom) if (strcmp(gp->lg_name, disk) == 0) break; @@ -331,7 +348,7 @@ wizard_makeparts(struct gmesh *mesh, con geom_gettree(&submesh); pp = provider_for_name(&submesh, disk); - gpart_create(pp, "freebsd-ufs", rootsizestr, "/", NULL, 0); + gpart_create(pp, fsname, rootsizestr, "/", NULL, 0); geom_deletetree(&submesh); geom_gettree(&submesh); Modified: head/usr.sbin/bsdinstall/partedit/partedit.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit.c Sat Sep 13 18:13:08 2014 (r271538) +++ head/usr.sbin/bsdinstall/partedit/partedit.c Sat Sep 13 18:24:54 2014 (r271539) @@ -95,7 +95,12 @@ main(int argc, const char **argv) if (strcmp(basename(argv[0]), "autopart") == 0) { /* Guided */ prompt = "Please review the disk setup. When complete, press " "the Finish button."; - part_wizard(); + /* Experimental ZFS autopartition support */ + if (argc > 1 && strcmp(argv[1], "zfs") == 0) { + part_wizard("zfs"); + } else { + part_wizard("ufs"); + } } else if (strcmp(basename(argv[0]), "scriptedpart") == 0) { error = scripted_editor(argc, argv); prompt = NULL; @@ -162,7 +167,7 @@ main(int argc, const char **argv) init_fstab_metadata(); break; case 4: /* Auto */ - part_wizard(); + part_wizard("ufs"); break; } Modified: head/usr.sbin/bsdinstall/partedit/partedit.h ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit.h Sat Sep 13 18:13:08 2014 (r271538) +++ head/usr.sbin/bsdinstall/partedit/partedit.h Sat Sep 13 18:24:54 2014 (r271539) @@ -54,9 +54,10 @@ struct partition_metadata { struct partition_metadata *get_part_metadata(const char *name, int create); void delete_part_metadata(const char *name); -int part_wizard(void); +int part_wizard(const char *fstype); int scripted_editor(int argc, const char **argv); -int wizard_makeparts(struct gmesh *mesh, const char *disk, int interactive); +int wizard_makeparts(struct gmesh *mesh, const char *disk, const char *fstype, + int interactive); /* gpart operations */ void gpart_delete(struct gprovider *pp); @@ -75,9 +76,10 @@ void set_default_part_metadata(const cha /* machine-dependent bootability checks */ const char *default_scheme(void); int is_scheme_bootable(const char *scheme); +int is_fs_bootable(const char *scheme, const char *fs); size_t bootpart_size(const char *scheme); const char *bootpart_type(const char *scheme); const char *bootcode_path(const char *scheme); -const char *partcode_path(const char *scheme); +const char *partcode_path(const char *scheme, const char *fs_type); #endif Modified: head/usr.sbin/bsdinstall/partedit/partedit_generic.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit_generic.c Sat Sep 13 18:13:08 2014 (r271538) +++ head/usr.sbin/bsdinstall/partedit/partedit_generic.c Sat Sep 13 18:24:54 2014 (r271539) @@ -50,6 +50,11 @@ is_scheme_bootable(const char *part_type return (1); } +int +is_fs_bootable(const char *part_type, const char *fs) { + return (1); +} + /* No clue => no boot partition, bootcode, or partcode */ size_t @@ -68,7 +73,7 @@ bootcode_path(const char *part_type) { } const char * -partcode_path(const char *part_type) { +partcode_path(const char *part_type, const char *fs_type) { return (NULL); } Modified: head/usr.sbin/bsdinstall/partedit/partedit_pc98.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit_pc98.c Sat Sep 13 18:13:08 2014 (r271538) +++ head/usr.sbin/bsdinstall/partedit/partedit_pc98.c Sat Sep 13 18:24:54 2014 (r271539) @@ -45,6 +45,15 @@ is_scheme_bootable(const char *part_type return (0); } +int +is_fs_bootable(const char *part_type, const char *fs) +{ + if (strcmp(fs, "freebsd-ufs") == 0) + return (1); + + return (0); +} + size_t bootpart_size(const char *part_type) { /* No boot partition */ @@ -67,7 +76,7 @@ bootcode_path(const char *part_type) { } const char * -partcode_path(const char *part_type) { +partcode_path(const char *part_type, const char *fs_type) { /* No partcode */ return (NULL); } Modified: head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c Sat Sep 13 18:13:08 2014 (r271538) +++ head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c Sat Sep 13 18:24:54 2014 (r271539) @@ -67,6 +67,15 @@ is_scheme_bootable(const char *part_type return (0); } +int +is_fs_bootable(const char *part_type, const char *fs) +{ + if (strcmp(fs, "freebsd-ufs") == 0) + return (1); + + return (0); +} + size_t bootpart_size(const char *part_type) { size_t platlen = sizeof(platform); @@ -100,7 +109,7 @@ bootcode_path(const char *part_type) { } const char * -partcode_path(const char *part_type) { +partcode_path(const char *part_type, const char *fs_type) { size_t platlen = sizeof(platform); if (strlen(platform) == 0) sysctlbyname("hw.platform", platform, &platlen, NULL, -1); Modified: head/usr.sbin/bsdinstall/partedit/partedit_sparc64.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit_sparc64.c Sat Sep 13 18:13:08 2014 (r271538) +++ head/usr.sbin/bsdinstall/partedit/partedit_sparc64.c Sat Sep 13 18:24:54 2014 (r271539) @@ -42,6 +42,15 @@ is_scheme_bootable(const char *part_type return (0); } +int +is_fs_bootable(const char *part_type, const char *fs) +{ + if (strcmp(fs, "freebsd-ufs") == 0 || strcmp(fs, "freebsd-zfs") == 0) + return (1); + return (0); +} + + size_t bootpart_size(const char *part_type) { /* No standalone boot partition */ @@ -58,11 +67,16 @@ const char * bootcode_path(const char *part_type) { return (NULL); } - + const char * -partcode_path(const char *part_type) { - if (strcmp(part_type, "VTOC8") == 0) - return ("/boot/boot1"); +partcode_path(const char *part_type, const char *fs_type) { + if (strcmp(part_type, "VTOC8") == 0) { + if (strcmp(fs_type, "ufs") == 0) { + return ("/boot/boot1"); + } else if (strcmp(fs_type, "zfs") == 0) { + return ("/boot/zfsboot"); + } + } return (NULL); } Modified: head/usr.sbin/bsdinstall/partedit/partedit_x86.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit_x86.c Sat Sep 13 18:13:08 2014 (r271538) +++ head/usr.sbin/bsdinstall/partedit/partedit_x86.c Sat Sep 13 18:24:54 2014 (r271539) @@ -58,6 +58,21 @@ is_scheme_bootable(const char *part_type return (0); } +int +is_fs_bootable(const char *part_type, const char *fs) { + size_t platlen = sizeof(platform); + if (strlen(platform) == 0) + sysctlbyname(platform_sysctl, platform, &platlen, NULL, -1); + + if (strcmp(fs, "freebsd-ufs") == 0) + return (1); + + if (strcmp(fs, "freebsd-zfs") == 0 && strcmp(platform, "BIOS") == 0) + return (1); + + return (0); +} + size_t bootpart_size(const char *scheme) { size_t platlen = sizeof(platform); @@ -107,7 +122,7 @@ bootcode_path(const char *part_type) { } const char * -partcode_path(const char *part_type) { +partcode_path(const char *part_type, const char *fs_type) { size_t platlen = sizeof(platform); if (strlen(platform) == 0) sysctlbyname(platform_sysctl, platform, &platlen, NULL, -1); @@ -115,6 +130,8 @@ partcode_path(const char *part_type) { if (strcmp(part_type, "GPT") == 0) { if (strcmp(platform, "UEFI") == 0) return ("/boot/boot1.efifat"); + else if (strcmp(fs_type, "zfs") == 0) + return ("/boot/gptzfsboot"); else return ("/boot/gptboot"); } Modified: head/usr.sbin/bsdinstall/partedit/sade.8 ============================================================================== --- head/usr.sbin/bsdinstall/partedit/sade.8 Sat Sep 13 18:13:08 2014 (r271538) +++ head/usr.sbin/bsdinstall/partedit/sade.8 Sat Sep 13 18:24:54 2014 (r271539) @@ -68,7 +68,5 @@ with the equivalent part of .Sh BUGS The utility misses a lot of nice features, such as tools for manipulating -.Xr gmirror 8 -or -.Xr zfs 8 . +.Xr gmirror 8 . These will be added later. Modified: head/usr.sbin/bsdinstall/partedit/scripted.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/scripted.c Sat Sep 13 18:13:08 2014 (r271538) +++ head/usr.sbin/bsdinstall/partedit/scripted.c Sat Sep 13 18:24:54 2014 (r271539) @@ -109,7 +109,7 @@ part_config(char *disk, const char *sche /* Create partitions */ if (config == NULL) { - wizard_makeparts(&mesh, disk, 0); + wizard_makeparts(&mesh, disk, "ufs", 0); goto finished; } Modified: head/usr.sbin/bsdinstall/scripts/config ============================================================================== --- head/usr.sbin/bsdinstall/scripts/config Sat Sep 13 18:13:08 2014 (r271538) +++ head/usr.sbin/bsdinstall/scripts/config Sat Sep 13 18:24:54 2014 (r271539) @@ -36,6 +36,7 @@ cp $BSDINSTALL_TMPETC/* $BSDINSTALL_CHRO cat $BSDINSTALL_TMPBOOT/loader.conf.* >> $BSDINSTALL_TMPBOOT/loader.conf rm $BSDINSTALL_TMPBOOT/loader.conf.* +df -t zfs $BSDINSTALL_CHROOT > /dev/null && echo "zfs_load=\"YES\"" >> $BSDINSTALL_TMPBOOT/loader.conf cp $BSDINSTALL_TMPBOOT/* $BSDINSTALL_CHROOT/boot Modified: head/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Sat Sep 13 18:13:08 2014 (r271538) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Sat Sep 13 18:24:54 2014 (r271539) @@ -1272,8 +1272,6 @@ zfs_create_boot() "$funcname" f_eval_catch $funcname echo "$ECHO_APPEND" 'zfs_enable=\"YES\"' \ $BSDINSTALL_TMPETC/rc.conf.zfs || return $FAILURE - f_eval_catch $funcname echo "$ECHO_APPEND" 'zfs_load=\"YES\"' \ - $BSDINSTALL_TMPBOOT/loader.conf.zfs || return $FAILURE f_eval_catch $funcname echo "$ECHO_APPEND" \ 'kern.geom.label.disk_ident.enable=\"0\"' \ $BSDINSTALL_TMPBOOT/loader.conf.zfs || return $FAILURE From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 18:26:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 280CC541; Sat, 13 Sep 2014 18:26: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 07EA494C; Sat, 13 Sep 2014 18:26: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 s8DIQDfL068266; Sat, 13 Sep 2014 18:26:13 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DIQDD6068262; Sat, 13 Sep 2014 18:26:13 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201409131826.s8DIQDD6068262@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 13 Sep 2014 18:26:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271540 - in head/sys: fs/ext2fs ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 18:26:14 -0000 Author: alc Date: Sat Sep 13 18:26:13 2014 New Revision: 271540 URL: http://svnweb.freebsd.org/changeset/base/271540 Log: We don't need an exclusive object lock on the expected execution path through {ext2,ffs}_getpages(). Reviewed by: kib, pfg MFC after: 6 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/sys/fs/ext2fs/ext2_vnops.c head/sys/ufs/ffs/ffs_vnops.c Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Sat Sep 13 18:24:54 2014 (r271539) +++ head/sys/fs/ext2fs/ext2_vnops.c Sat Sep 13 18:26:13 2014 (r271540) @@ -2074,19 +2074,25 @@ ext2_getpages(struct vop_getpages_args * vm_page_t mreq; int pcount; - pcount = round_page(ap->a_count) / PAGE_SIZE; mreq = ap->a_m[ap->a_reqpage]; /* + * Since the caller has busied the requested page, that page's valid + * field will not be changed by other threads. + */ + vm_page_assert_xbusied(mreq); + + /* * if ANY DEV_BSIZE blocks are valid on a large filesystem block, * then the entire page is valid. Since the page may be mapped, * user programs might reference data beyond the actual end of file * occuring within the page. We have to zero that data. */ - VM_OBJECT_WLOCK(mreq->object); if (mreq->valid) { + VM_OBJECT_WLOCK(mreq->object); if (mreq->valid != VM_PAGE_BITS_ALL) vm_page_zero_invalid(mreq, TRUE); + pcount = round_page(ap->a_count) / PAGE_SIZE; for (i = 0; i < pcount; i++) { if (i != ap->a_reqpage) { vm_page_lock(ap->a_m[i]); @@ -2097,7 +2103,6 @@ ext2_getpages(struct vop_getpages_args * VM_OBJECT_WUNLOCK(mreq->object); return VM_PAGER_OK; } - VM_OBJECT_WUNLOCK(mreq->object); return vnode_pager_generic_getpages(ap->a_vp, ap->a_m, ap->a_count, Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Sat Sep 13 18:24:54 2014 (r271539) +++ head/sys/ufs/ffs/ffs_vnops.c Sat Sep 13 18:26:13 2014 (r271540) @@ -857,19 +857,25 @@ ffs_getpages(ap) vm_page_t mreq; int pcount; - pcount = round_page(ap->a_count) / PAGE_SIZE; mreq = ap->a_m[ap->a_reqpage]; /* + * Since the caller has busied the requested page, that page's valid + * field will not be changed by other threads. + */ + vm_page_assert_xbusied(mreq); + + /* * if ANY DEV_BSIZE blocks are valid on a large filesystem block, * then the entire page is valid. Since the page may be mapped, * user programs might reference data beyond the actual end of file * occuring within the page. We have to zero that data. */ - VM_OBJECT_WLOCK(mreq->object); if (mreq->valid) { + VM_OBJECT_WLOCK(mreq->object); if (mreq->valid != VM_PAGE_BITS_ALL) vm_page_zero_invalid(mreq, TRUE); + pcount = round_page(ap->a_count) / PAGE_SIZE; for (i = 0; i < pcount; i++) { if (i != ap->a_reqpage) { vm_page_lock(ap->a_m[i]); @@ -880,7 +886,6 @@ ffs_getpages(ap) VM_OBJECT_WUNLOCK(mreq->object); return VM_PAGER_OK; } - VM_OBJECT_WUNLOCK(mreq->object); return vnode_pager_generic_getpages(ap->a_vp, ap->a_m, ap->a_count, From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 18:27:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAFEE68F; Sat, 13 Sep 2014 18:27:47 +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 BAF39964; Sat, 13 Sep 2014 18:27:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DIRlkZ068691; Sat, 13 Sep 2014 18:27:47 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DIRlas068689; Sat, 13 Sep 2014 18:27:47 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201409131827.s8DIRlas068689@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 13 Sep 2014 18:27: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: r271541 - in stable/10/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 18:27:48 -0000 Author: pfg Date: Sat Sep 13 18:27:47 2014 New Revision: 271541 URL: http://svnweb.freebsd.org/changeset/base/271541 Log: MFC r271149: Apply known workarounds for less modern MacBooks. The legacy USB circuit tends to give trouble on older MacBooks. While the original report covered MacBook4, extend the fix preemptively for the newer MacBookPro4 too. PR: 191693 Reviewed by: emaste Approved by: re Modified: stable/10/sys/amd64/amd64/machdep.c stable/10/sys/i386/i386/machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/machdep.c Sat Sep 13 18:26:13 2014 (r271540) +++ stable/10/sys/amd64/amd64/machdep.c Sat Sep 13 18:27:47 2014 (r271541) @@ -238,9 +238,11 @@ cpu_startup(dummy) if (sysenv != NULL) { if (strncmp(sysenv, "MacBook1,1", 10) == 0 || strncmp(sysenv, "MacBook3,1", 10) == 0 || + strncmp(sysenv, "MacBook4,1", 10) == 0 || strncmp(sysenv, "MacBookPro1,1", 13) == 0 || strncmp(sysenv, "MacBookPro1,2", 13) == 0 || strncmp(sysenv, "MacBookPro3,1", 13) == 0 || + strncmp(sysenv, "MacBookPro4,1", 13) == 0 || strncmp(sysenv, "Macmini1,1", 10) == 0) { if (bootverbose) printf("Disabling LEGACY_USB_EN bit on " Modified: stable/10/sys/i386/i386/machdep.c ============================================================================== --- stable/10/sys/i386/i386/machdep.c Sat Sep 13 18:26:13 2014 (r271540) +++ stable/10/sys/i386/i386/machdep.c Sat Sep 13 18:27:47 2014 (r271541) @@ -273,9 +273,11 @@ cpu_startup(dummy) if (sysenv != NULL) { if (strncmp(sysenv, "MacBook1,1", 10) == 0 || strncmp(sysenv, "MacBook3,1", 10) == 0 || + strncmp(sysenv, "MacBook4,1", 10) == 0 || strncmp(sysenv, "MacBookPro1,1", 13) == 0 || strncmp(sysenv, "MacBookPro1,2", 13) == 0 || strncmp(sysenv, "MacBookPro3,1", 13) == 0 || + strncmp(sysenv, "MacBookPro4,1", 13) == 0 || strncmp(sysenv, "Macmini1,1", 10) == 0) { if (bootverbose) printf("Disabling LEGACY_USB_EN bit on " From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 18:34:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFC59B8D; Sat, 13 Sep 2014 18:34:57 +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 8FD12A53; Sat, 13 Sep 2014 18:34:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DIYvjX074055; Sat, 13 Sep 2014 18:34:57 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DIYv85074052; Sat, 13 Sep 2014 18:34:57 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201409131834.s8DIYv85074052@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 13 Sep 2014 18:34:57 +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: r271542 - in stable/9/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 18:34:57 -0000 Author: pfg Date: Sat Sep 13 18:34:56 2014 New Revision: 271542 URL: http://svnweb.freebsd.org/changeset/base/271542 Log: MFC r271149: Apply known workarounds for less modern MacBooks. The legacy USB circuit tends to give trouble on older MacBooks. While the original report covered MacBook4, extend the fix preemptively for the newer MacBookPro4 too. PR: 191693 Reviewed by: emaste Modified: stable/9/sys/amd64/amd64/machdep.c stable/9/sys/i386/i386/machdep.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/machdep.c ============================================================================== --- stable/9/sys/amd64/amd64/machdep.c Sat Sep 13 18:27:47 2014 (r271541) +++ stable/9/sys/amd64/amd64/machdep.c Sat Sep 13 18:34:56 2014 (r271542) @@ -230,9 +230,11 @@ cpu_startup(dummy) if (sysenv != NULL) { if (strncmp(sysenv, "MacBook1,1", 10) == 0 || strncmp(sysenv, "MacBook3,1", 10) == 0 || + strncmp(sysenv, "MacBook4,1", 10) == 0 || strncmp(sysenv, "MacBookPro1,1", 13) == 0 || strncmp(sysenv, "MacBookPro1,2", 13) == 0 || strncmp(sysenv, "MacBookPro3,1", 13) == 0 || + strncmp(sysenv, "MacBookPro4,1", 13) == 0 || strncmp(sysenv, "Macmini1,1", 10) == 0) { if (bootverbose) printf("Disabling LEGACY_USB_EN bit on " Modified: stable/9/sys/i386/i386/machdep.c ============================================================================== --- stable/9/sys/i386/i386/machdep.c Sat Sep 13 18:27:47 2014 (r271541) +++ stable/9/sys/i386/i386/machdep.c Sat Sep 13 18:34:56 2014 (r271542) @@ -269,9 +269,11 @@ cpu_startup(dummy) if (sysenv != NULL) { if (strncmp(sysenv, "MacBook1,1", 10) == 0 || strncmp(sysenv, "MacBook3,1", 10) == 0 || + strncmp(sysenv, "MacBook4,1", 10) == 0 || strncmp(sysenv, "MacBookPro1,1", 13) == 0 || strncmp(sysenv, "MacBookPro1,2", 13) == 0 || strncmp(sysenv, "MacBookPro3,1", 13) == 0 || + strncmp(sysenv, "MacBookPro4,1", 13) == 0 || strncmp(sysenv, "Macmini1,1", 10) == 0) { if (bootverbose) printf("Disabling LEGACY_USB_EN bit on " From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 18:40:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C70A8E8C; Sat, 13 Sep 2014 18:40:13 +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 B0176AA8; Sat, 13 Sep 2014 18:40:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DIeDik076014; Sat, 13 Sep 2014 18:40:13 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DIeCP3076009; Sat, 13 Sep 2014 18:40:12 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201409131840.s8DIeCP3076009@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 13 Sep 2014 18:40:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271543 - in head: share/man/man4 usr.bin/iscsictl usr.sbin/iscsid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 18:40:13 -0000 Author: allanjude (doc committer) Date: Sat Sep 13 18:40:12 2014 New Revision: 271543 URL: http://svnweb.freebsd.org/changeset/base/271543 Log: Add the new iscsi(4) man page Cross reference it from iscsid(8) and iscsictl(8) Reviewed by: trasz Approved by: bcr (mentor), wblock (mentor) Sponsored by: ScaleEngine Inc. CR: https://reviews.freebsd.org/D741 Added: head/share/man/man4/iscsi.4 (contents, props changed) Modified: head/share/man/man4/Makefile head/usr.bin/iscsictl/iscsictl.8 head/usr.sbin/iscsid/iscsid.8 Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sat Sep 13 18:34:56 2014 (r271542) +++ head/share/man/man4/Makefile Sat Sep 13 18:40:12 2014 (r271543) @@ -206,6 +206,7 @@ MAN= aac.4 \ ipw.4 \ ipwfw.4 \ isci.4 \ + iscsi.4 \ iscsi_initiator.4 \ ismt.4 \ isp.4 \ Added: head/share/man/man4/iscsi.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/iscsi.4 Sat Sep 13 18:40:12 2014 (r271543) @@ -0,0 +1,111 @@ +.\" Copyright (c) 2014 Edward Tomasz Napierala +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.Dd September 11, 2014 +.Dt ISCSI 4 +.Os +.Sh NAME +.Nm iscsi +.Nd iSCSI initiator +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in the +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device iscsi" +.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 +iscsi_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +subsystem provides the kernel component of an iSCSI initiator. +The initiator is the iSCSI client, which connects to an iSCSI target, +providing local access to a remote block device. +The userland component is provided by +.Xr iscsid 8 +and both the kernel and userland are configured using +.Xr iscsictl 8 . +The +.Nm +subsystem is responsible for implementing the +.Qq Full Feature Phase +of the iSCSI protocol. +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width indent +.It Va kern.iscsi.ping_timeout +The number of seconds to wait for the target to respond to a NOP-Out +PDU. +In the event that there is no response within that time the session gets +forcibly restarted. +.It Va kern.iscsi.iscsid_timeout +The number of seconds to wait for +.Xr ctld 8 +to establish a session. +After that time +.Nm +will abort and retry. +.It Va kern.iscsi.login_timeout +The number of seconds to wait for a login attempt to succeed. +After that time +.Nm +will abort and retry. +.It Va kern.iscsi.maxtags +The maximum number of outstanding IO requests. +.It Va kern.iscsi.fail_on_disconnection +Controls the behavior after an iSCSI connection has been dropped due to +network problems. +When set to 1, a dropped connection causes the iSCSI device nodes +to be destroyed. +After reconnecting, they will be created again. +By default, the device nodes are left intact. +While the connection is down all input/output operations are suspended, to be +retried after the connection is reestablished. +.El +.Sh SEE ALSO +.Xr iscsi.conf 5 , +.Xr iscsictl 8 , +.Xr iscsid 8 +.Sh HISTORY +The +.Nm +subsystem first appeared in +.Fx 10.0 . +.Sh AUTHORS +The +.Nm +subsystem was developed by +.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org +under sponsorship from the FreeBSD Foundation. Modified: head/usr.bin/iscsictl/iscsictl.8 ============================================================================== --- head/usr.bin/iscsictl/iscsictl.8 Sat Sep 13 18:34:56 2014 (r271542) +++ head/usr.bin/iscsictl/iscsictl.8 Sat Sep 13 18:40:12 2014 (r271543) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 18, 2014 +.Dd September 12, 2014 .Dt ISCSICTL 8 .Os .Sh NAME @@ -171,6 +171,7 @@ Attach to target iqn.2012-06.com.example Disconnect all iSCSI sessions: .Dl Nm Fl Ra .Sh SEE ALSO +.Xr iscsi 4 , .Xr iscsi.conf 5 , .Xr iscsid 8 .Sh HISTORY @@ -181,6 +182,6 @@ command appeared in .Sh AUTHORS The .Nm -was developed by +utility was developed by .An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org under sponsorship from the FreeBSD Foundation. Modified: head/usr.sbin/iscsid/iscsid.8 ============================================================================== --- head/usr.sbin/iscsid/iscsid.8 Sat Sep 13 18:34:56 2014 (r271542) +++ head/usr.sbin/iscsid/iscsid.8 Sat Sep 13 18:40:12 2014 (r271543) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 20, 2012 +.Dd September 12, 2014 .Dt ISCSID 8 .Os .Sh NAME @@ -49,12 +49,13 @@ as well as performing SendTargets discov Upon startup, the .Nm daemon opens the iSCSI initiator device file and waits for kernel requests. -It doesn't use any configuration file; all the information it needs it gets -from the kernel. +.Nm +does not use any configuration files. +All needed information is supplied by the kernel. .Pp When the .Nm -damon is not running, already established iSCSI connections continue +daemon is not running, already established iSCSI connections continue to work. However, establishing new connections, or recovering existing ones in case of connection error, is not possible. @@ -99,6 +100,7 @@ The .Nm utility exits 0 on success, and >0 if an error occurs. .Sh SEE ALSO +.Xr iscsi 4 , .Xr iscsictl 8 .Sh HISTORY The @@ -108,6 +110,6 @@ command appeared in .Sh AUTHORS The .Nm -was developed by +utility was developed by .An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org under sponsorship from the FreeBSD Foundation. From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 18:41:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F606FEB; Sat, 13 Sep 2014 18:41:25 +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 30141B3F; Sat, 13 Sep 2014 18:41:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DIfPkQ078919; Sat, 13 Sep 2014 18:41:25 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DIfPkU078918; Sat, 13 Sep 2014 18:41:25 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201409131841.s8DIfPkU078918@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 13 Sep 2014 18:41:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271544 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 18:41:25 -0000 Author: melifaro Date: Sat Sep 13 18:41:24 2014 New Revision: 271544 URL: http://svnweb.freebsd.org/changeset/base/271544 Log: Switch if_vlan(4) to rmlock. MFC after: 2 weeks Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Sat Sep 13 18:40:12 2014 (r271543) +++ head/sys/net/if_vlan.c Sat Sep 13 18:41:24 2014 (r271544) @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include #include @@ -84,7 +84,7 @@ LIST_HEAD(ifvlanhead, ifvlan); struct ifvlantrunk { struct ifnet *parent; /* parent interface of this trunk */ - struct rwlock rw; + struct rmlock lock; #ifdef VLAN_ARRAY #define VLAN_ARRAY_SIZE (EVL_VLID_MASK + 1) struct ifvlan *vlans[VLAN_ARRAY_SIZE]; /* static table */ @@ -175,14 +175,15 @@ static struct sx ifv_lock; #define VLAN_LOCK_ASSERT() sx_assert(&ifv_lock, SA_LOCKED) #define VLAN_LOCK() sx_xlock(&ifv_lock) #define VLAN_UNLOCK() sx_xunlock(&ifv_lock) -#define TRUNK_LOCK_INIT(trunk) rw_init(&(trunk)->rw, vlanname) -#define TRUNK_LOCK_DESTROY(trunk) rw_destroy(&(trunk)->rw) -#define TRUNK_LOCK(trunk) rw_wlock(&(trunk)->rw) -#define TRUNK_UNLOCK(trunk) rw_wunlock(&(trunk)->rw) -#define TRUNK_LOCK_ASSERT(trunk) rw_assert(&(trunk)->rw, RA_WLOCKED) -#define TRUNK_RLOCK(trunk) rw_rlock(&(trunk)->rw) -#define TRUNK_RUNLOCK(trunk) rw_runlock(&(trunk)->rw) -#define TRUNK_LOCK_RASSERT(trunk) rw_assert(&(trunk)->rw, RA_RLOCKED) +#define TRUNK_LOCK_INIT(trunk) rm_init(&(trunk)->lock, vlanname) +#define TRUNK_LOCK_DESTROY(trunk) rm_destroy(&(trunk)->lock) +#define TRUNK_LOCK(trunk) rm_wlock(&(trunk)->lock) +#define TRUNK_UNLOCK(trunk) rm_wunlock(&(trunk)->lock) +#define TRUNK_LOCK_ASSERT(trunk) rm_assert(&(trunk)->lock, RA_WLOCKED) +#define TRUNK_RLOCK(trunk) rm_rlock(&(trunk)->lock, &tracker) +#define TRUNK_RUNLOCK(trunk) rm_runlock(&(trunk)->lock, &tracker) +#define TRUNK_LOCK_RASSERT(trunk) rm_assert(&(trunk)->lock, RA_RLOCKED) +#define TRUNK_LOCK_READER struct rm_priotracker tracker #ifndef VLAN_ARRAY static void vlan_inithash(struct ifvlantrunk *trunk); @@ -687,6 +688,7 @@ vlan_devat(struct ifnet *ifp, uint16_t v { struct ifvlantrunk *trunk; struct ifvlan *ifv; + TRUNK_LOCK_READER; trunk = ifp->if_vlantrunk; if (trunk == NULL) @@ -1163,6 +1165,7 @@ vlan_input(struct ifnet *ifp, struct mbu { struct ifvlantrunk *trunk = ifp->if_vlantrunk; struct ifvlan *ifv; + TRUNK_LOCK_READER; uint16_t vid; KASSERT(trunk != NULL, ("%s: no trunk", __func__)); From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 18:54:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB85742F; Sat, 13 Sep 2014 18:54: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 127AAC3E; Sat, 13 Sep 2014 18:54: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 s8DIsFgv084147; Sat, 13 Sep 2014 18:54:15 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DIsF8W084145; Sat, 13 Sep 2014 18:54:15 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201409131854.s8DIsF8W084145@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Sat, 13 Sep 2014 18:54:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271545 - in head/etc: . rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 18:54:17 -0000 Author: hrs Date: Sat Sep 13 18:54:15 2014 New Revision: 271545 URL: http://svnweb.freebsd.org/changeset/base/271545 Log: Do not set net.inet.ip.{sourceroute,accept_sourceroute} in a vnet jail. The following warnings were displayed: sysctl: net.inet.ip.sourceroute=0: Operation not permitted sysctl: net.inet.ip.accept_sourceroute=0: Operation not permitted Modified: head/etc/rc.d/routing head/etc/rc.subr Modified: head/etc/rc.d/routing ============================================================================== --- head/etc/rc.d/routing Sat Sep 13 18:41:24 2014 (r271544) +++ head/etc/rc.d/routing Sat Sep 13 18:54:15 2014 (r271545) @@ -326,20 +326,22 @@ options_inet() ${SYSCTL} net.inet.ip.forwarding=0 > /dev/null fi - if checkyesno forward_sourceroute; then - ropts_init inet - echo -n ' do source routing=YES' - ${SYSCTL} net.inet.ip.sourceroute=1 > /dev/null - else - ${SYSCTL} net.inet.ip.sourceroute=0 > /dev/null - fi - - if checkyesno accept_sourceroute; then - ropts_init inet - echo -n ' accept source routing=YES' - ${SYSCTL} net.inet.ip.accept_sourceroute=1 > /dev/null - else - ${SYSCTL} net.inet.ip.accept_sourceroute=0 > /dev/null + if ! check_jail vnet; then + if checkyesno forward_sourceroute; then + ropts_init inet + echo -n ' do source routing=YES' + ${SYSCTL} net.inet.ip.sourceroute=1 > /dev/null + else + ${SYSCTL} net.inet.ip.sourceroute=0 > /dev/null + fi + + if checkyesno accept_sourceroute; then + ropts_init inet + echo -n ' accept source routing=YES' + ${SYSCTL} net.inet.ip.accept_sourceroute=1 > /dev/null + else + ${SYSCTL} net.inet.ip.accept_sourceroute=0 > /dev/null + fi fi if checkyesno arpproxy_all; then Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Sat Sep 13 18:41:24 2014 (r271544) +++ head/etc/rc.subr Sat Sep 13 18:54:15 2014 (r271545) @@ -1966,6 +1966,22 @@ check_required_after() return 0 } +# check_jail mib +# Return true if security.jail.$mib exists and set to 1. + +check_jail() +{ + local _mib _v + + _mib=$1 + if _v=$(${SYSCTL_N} "security.jail.$_mib" 2> /dev/null); then + case $_v in + 1) return 0;; + esac + fi + return 1 +} + # check_kern_features mib # Return existence of kern.features.* sysctl MIB as true or # false. The result will be cached in $_rc_cache_kern_features_ From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 19:03:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34D75615; Sat, 13 Sep 2014 19:03:34 +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 1426DD0F; Sat, 13 Sep 2014 19:03:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DJ3X2n088887; Sat, 13 Sep 2014 19:03:33 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DJ3X26088883; Sat, 13 Sep 2014 19:03:33 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409131903.s8DJ3X26088883@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 13 Sep 2014 19:03:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271546 - in head/sys: conf dev/fdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 19:03:34 -0000 Author: ian Date: Sat Sep 13 19:03:32 2014 New Revision: 271546 URL: http://svnweb.freebsd.org/changeset/base/271546 Log: Create an interface and support routines for drivers that handle IO pin multiplexing and configuration based on FDT data. Reviewed by: imp Added: head/sys/dev/fdt/fdt_pinctrl.c (contents, props changed) head/sys/dev/fdt/fdt_pinctrl.h (contents, props changed) head/sys/dev/fdt/fdt_pinctrl_if.m (contents, props changed) Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Sep 13 18:54:15 2014 (r271545) +++ head/sys/conf/files Sat Sep 13 19:03:32 2014 (r271546) @@ -1377,9 +1377,11 @@ dev/fatm/if_fatm.c optional fatm pci dev/fb/fbd.c optional fbd | vt dev/fb/fb_if.m standard dev/fb/splash.c optional sc splash -dev/fdt/fdt_clock.c optional fdt_clock -dev/fdt/fdt_clock_if.m optional fdt_clock +dev/fdt/fdt_clock.c optional fdt fdt_clock +dev/fdt/fdt_clock_if.m optional fdt fdt_clock dev/fdt/fdt_common.c optional fdt +dev/fdt/fdt_pinctrl.c optional fdt fdt_pinctrl +dev/fdt/fdt_pinctrl_if.m optional fdt fdt_pinctrl dev/fdt/fdt_slicer.c optional fdt cfi | fdt nand dev/fdt/fdt_static_dtb.S optional fdt fdt_dtb_static \ dependency "$S/boot/fdt/dts/${MACHINE}/${FDT_DTS_FILE}" Added: head/sys/dev/fdt/fdt_pinctrl.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/fdt/fdt_pinctrl.c Sat Sep 13 19:03:32 2014 (r271546) @@ -0,0 +1,151 @@ +/*- + * Copyright (c) 2014 Ian Lepore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include + +#include +#include + +#include "fdt_pinctrl_if.h" + +#include +#include + +int +fdt_pinctrl_configure(device_t client, u_int index) +{ + device_t pinctrl; + phandle_t *configs; + int i, nconfigs; + char name[16]; + + snprintf(name, sizeof(name), "pinctrl-%u", index); + nconfigs = OF_getprop_alloc(ofw_bus_get_node(client), name, + sizeof(*configs), (void **)&configs); + if (nconfigs < 0) + return (ENOENT); + if (nconfigs == 0) + return (0); /* Empty property is documented as valid. */ + for (i = 0; i < nconfigs; i++) { + if ((pinctrl = OF_device_from_xref(configs[i])) != NULL) + FDT_PINCTRL_CONFIGURE(pinctrl, configs[i]); + } + free(configs, M_OFWPROP); + return (0); +} + +int +fdt_pinctrl_configure_by_name(device_t client, const char * name) +{ + char * names; + int i, offset, nameslen; + + nameslen = OF_getprop_alloc(ofw_bus_get_node(client), "pinctrl-names", + sizeof(*names), (void **)&names); + if (nameslen <= 0) + return (ENOENT); + for (i = 0, offset = 0; offset < nameslen; i++) { + if (strcmp(name, &names[offset]) == 0) + break; + offset += strlen(&names[offset]) + 1; + } + free(names, M_OFWPROP); + if (offset < nameslen) + return (fdt_pinctrl_configure(client, i)); + else + return (ENOENT); +} + +static int +pinctrl_register_children(device_t pinctrl, phandle_t parent, + const char *pinprop) +{ + phandle_t node; + + /* + * Recursively descend from parent, looking for nodes that have the + * given property, and associate the pinctrl device_t with each one. + */ + for (node = OF_child(parent); node != 0; node = OF_peer(node)) { + pinctrl_register_children(pinctrl, node, pinprop); + if (pinprop == NULL || OF_hasprop(node, pinprop)) { + OF_device_register_xref(OF_xref_from_node(node), + pinctrl); + } + } + return (0); +} + +int +fdt_pinctrl_register(device_t pinctrl, const char *pinprop) +{ + phandle_t node; + + node = ofw_bus_get_node(pinctrl); + OF_device_register_xref(OF_xref_from_node(node), pinctrl); + return (pinctrl_register_children(pinctrl, node, pinprop)); +} + +static int +pinctrl_configure_children(device_t pinctrl, phandle_t parent) +{ + phandle_t node, *configs; + int i, nconfigs; + + for (node = OF_child(parent); node != 0; node = OF_peer(node)) { + if (!fdt_is_enabled(node)) + continue; + pinctrl_configure_children(pinctrl, node); + nconfigs = OF_getencprop_alloc(node, "pinctrl-0", + sizeof(*configs), (void **)&configs); +#ifdef DEBUG + { + char name[32]; + OF_getprop(node, "name", &name, sizeof(name)); + printf("%d items in pinctrl-0 for %s\n", nconfigs, name); + } +#endif + if (nconfigs <= 0) + continue; + for (i = 0; i < nconfigs; i++) { + if (OF_device_from_xref(configs[i]) == pinctrl) + FDT_PINCTRL_CONFIGURE(pinctrl, configs[i]); + } + free(configs, M_OFWPROP); + } + return (0); +} + +int +fdt_pinctrl_configure_tree(device_t pinctrl) +{ + + return (pinctrl_configure_children(pinctrl, OF_peer(0))); +} + Added: head/sys/dev/fdt/fdt_pinctrl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/fdt/fdt_pinctrl.h Sat Sep 13 19:03:32 2014 (r271546) @@ -0,0 +1,58 @@ +/*- + * Copyright (c) 2014 Ian Lepore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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$ + */ + +#ifndef DEV_FDT_PINCTRL_H +#define DEV_FDT_PINCTRL_H + +#include "fdt_pinctrl_if.h" + +/* + * Configure pins by name or index. This looks up the pinctrl-N property in + * client's fdt data by index or name, and passes each handle in it to the + * pinctrl driver for configuration. + */ +int fdt_pinctrl_configure(device_t client, u_int index); +int fdt_pinctrl_configure_by_name(device_t client, const char * name); + +/* + * Register a pinctrl driver so that it can be used by other devices which call + * fdt_pinctrl_configure(). The pinprop argument is the name of a property that + * identifies each descendent of the pinctrl node which is a pin configuration + * node whose xref phandle can be passed to FDT_PINCTRL_CONFIGURE(). If this is + * NULL, every descendant node is registered. + */ +int fdt_pinctrl_register(device_t pinctrl, const char *pinprop); + +/* + * Walk the device tree and configure pins for each enabled device whose + * pinctrl-0 property contains references to nodes which are children of the + * given pinctrl device. This helper routine is for use by pinctrl drivers. + */ +int fdt_pinctrl_configure_tree(device_t pinctrl); + +#endif /* DEV_FDT_PINCTRL_H */ + Added: head/sys/dev/fdt/fdt_pinctrl_if.m ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/fdt/fdt_pinctrl_if.m Sat Sep 13 19:03:32 2014 (r271546) @@ -0,0 +1,47 @@ +#- +# Copyright (c) 2014 Ian Lepore +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +#include +#include + +# +# This is the interface that fdt_pinctrl drivers provide to other drivers. +# + +INTERFACE fdt_pinctrl; + +# +# Set pins to the specified configuration. The cfgxref arg is an xref phandle +# to a descendent node (child, grandchild, ...) of the pinctrl device node. +# Returns 0 on success or a standard errno value. +# +METHOD int configure { + device_t pinctrl; + phandle_t cfgxref; +}; + From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 19:37:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 148F0CB8; Sat, 13 Sep 2014 19:37:12 +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 E78C3F73; Sat, 13 Sep 2014 19:37:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DJbBD0004207; Sat, 13 Sep 2014 19:37:11 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DJbBr6004205; Sat, 13 Sep 2014 19:37:11 GMT (envelope-from np@FreeBSD.org) Message-Id: <201409131937.s8DJbBr6004205@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 13 Sep 2014 19:37:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r271547 - in stable/8/sys: net sys X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 19:37:12 -0000 Author: np Date: Sat Sep 13 19:37:11 2014 New Revision: 271547 URL: http://svnweb.freebsd.org/changeset/base/271547 Log: MFC r234098 (jhb) and r255047. r234098: Add media types for 40G media that might be used with FreeBSD. r255047: Add a routine for attaching an mbuf to a buffer with an external refcount. This one is willing to work with buffers that may already be referenced. MEXTADD/m_extadd are suitable only for the first attachment to a cluster -- they initialize the refcount to 1. Modified: stable/8/sys/net/if_media.h stable/8/sys/sys/mbuf.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/net/ (props changed) stable/8/sys/sys/ (props changed) Modified: stable/8/sys/net/if_media.h ============================================================================== --- stable/8/sys/net/if_media.h Sat Sep 13 19:03:32 2014 (r271546) +++ stable/8/sys/net/if_media.h Sat Sep 13 19:37:11 2014 (r271547) @@ -150,6 +150,9 @@ uint64_t ifmedia_baudrate(int); #define IFM_10G_LRM 24 /* 10GBase-LRM 850nm Multi-mode */ #define IFM_UNKNOWN 25 /* media types not defined yet */ #define IFM_10G_T 26 /* 10GBase-T - RJ45 */ +#define IFM_40G_CR4 27 /* 40GBase-CR4 */ +#define IFM_40G_SR4 28 /* 40GBase-SR4 */ +#define IFM_40G_LR4 29 /* 40GBase-LR4 */ /* * Please update ieee8023ad_lacp.c:lacp_compose_key() * after adding new Ethernet media types. @@ -369,6 +372,9 @@ struct ifmedia_description { { IFM_10G_TWINAX_LONG, "10Gbase-Twinax-Long" }, \ { IFM_UNKNOWN, "Unknown" }, \ { IFM_10G_T, "10Gbase-T" }, \ + { IFM_40G_CR4, "40Gbase-CR4" }, \ + { IFM_40G_SR4, "40Gbase-SR4" }, \ + { IFM_40G_LR4, "40Gbase-LR4" }, \ { 0, NULL }, \ } @@ -665,6 +671,9 @@ struct ifmedia_baudrate { { IFM_ETHER | IFM_10G_TWINAX_LONG, IF_Gbps(10ULL) }, \ { IFM_ETHER | IFM_10G_LRM, IF_Gbps(10ULL) }, \ { IFM_ETHER | IFM_10G_T, IF_Gbps(10ULL) }, \ + { IFM_ETHER | IFM_40G_CR4, IF_Gbps(40ULL) }, \ + { IFM_ETHER | IFM_40G_SR4, IF_Gbps(40ULL) }, \ + { IFM_ETHER | IFM_40G_LR4, IF_Gbps(40ULL) }, \ \ { IFM_TOKEN | IFM_TOK_STP4, IF_Mbps(4) }, \ { IFM_TOKEN | IFM_TOK_STP16, IF_Mbps(16) }, \ Modified: stable/8/sys/sys/mbuf.h ============================================================================== --- stable/8/sys/sys/mbuf.h Sat Sep 13 19:03:32 2014 (r271546) +++ stable/8/sys/sys/mbuf.h Sat Sep 13 19:37:11 2014 (r271547) @@ -406,6 +406,28 @@ m_gettype(int size) return (type); } +/* + * Associated an external reference counted buffer with an mbuf. + */ +static __inline void +m_extaddref(struct mbuf *m, caddr_t buf, u_int size, u_int *ref_cnt, + void (*freef)(void *, void *), void *arg1, void *arg2) +{ + + KASSERT(ref_cnt != NULL, ("%s: ref_cnt not provided", __func__)); + + atomic_add_int(ref_cnt, 1); + m->m_flags |= M_EXT; + m->m_ext.ext_buf = buf; + m->m_ext.ref_cnt = ref_cnt; + m->m_data = m->m_ext.ext_buf; + m->m_ext.ext_size = size; + m->m_ext.ext_free = freef; + m->m_ext.ext_arg1 = arg1; + m->m_ext.ext_arg2 = arg2; + m->m_ext.ext_type = EXT_EXTREF; +} + static __inline uma_zone_t m_getzone(int size) { From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 19:49:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF5C1195; Sat, 13 Sep 2014 19:49:38 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6EDDE2; Sat, 13 Sep 2014 19:49:38 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id C922C1FE027; Sat, 13 Sep 2014 21:49:35 +0200 (CEST) Message-ID: <54149FC4.7020307@selasky.org> Date: Sat, 13 Sep 2014 21:49:24 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r271504 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront net netinet ofed/drivers/net/mlx4 References: <201409130826.s8D8Q9Wx078339@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 19:49:39 -0000 On 09/13/14 18:54, Adrian Chadd wrote: > Hi, > > Just for the record: > > * I'm glad you're tackling the TSO config stuff; > * I'm not glad you're trying to pack it into a u_int rather than > creating a new structure and adding fields for it. > > I appreciate that you're trying to rush this in before 10.1, but this > is exactly why things shouldn't be rushed in before release deadlines. > :) > > I'd really like to see this be broken out as a structure and the bit > shifting games for what really shouldn't be packed into a u_int fixed. > Otherwise this is going to be deadweight that has to persist past > 11.0. > Hi Adrian, I can make that change for -current, making the new structure and such. This change was intended for 10 where there is only one u_int for this information. Or do you want me to change that in 10 too? --HPS From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 19:59:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CE52610; Sat, 13 Sep 2014 19:59:17 +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 1283A1CC; Sat, 13 Sep 2014 19:59:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DJxGb2013875; Sat, 13 Sep 2014 19:59:16 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DJxGND013873; Sat, 13 Sep 2014 19:59:16 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409131959.s8DJxGND013873@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 13 Sep 2014 19:59:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271548 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 19:59:17 -0000 Author: ian Date: Sat Sep 13 19:59:16 2014 New Revision: 271548 URL: http://svnweb.freebsd.org/changeset/base/271548 Log: Convert the at91_pinctrl driver to use the new fdt_pinctrl interface. Modified: head/sys/arm/at91/at91_pinctrl.c head/sys/arm/at91/files.at91 Modified: head/sys/arm/at91/at91_pinctrl.c ============================================================================== --- head/sys/arm/at91/at91_pinctrl.c Sat Sep 13 19:37:11 2014 (r271547) +++ head/sys/arm/at91/at91_pinctrl.c Sat Sep 13 19:59:16 2014 (r271548) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -250,6 +251,8 @@ at91_pinctrl_attach(device_t dev) device_set_ivars(cdev, di); } + fdt_pinctrl_register(dev, "atmel,pins"); + return (bus_generic_attach(dev)); } @@ -370,93 +373,70 @@ pinctrl_print_child(device_t bus, device const char *periphs[] = {"gpio", "periph A", "periph B", "periph C", "periph D", "periph E" }; -static void -pinctrl_walk_tree(device_t bus, phandle_t node) +struct pincfg { + uint32_t unit; + uint32_t pin; + uint32_t periph; + uint32_t flags; +}; + +static int +pinctrl_configure_pins(device_t bus, phandle_t cfgxref) { struct pinctrl_softc *sc; - char status[10]; + struct pincfg *cfg, *cfgdata; char name[32]; - phandle_t pinctrl[32], pins[32 * 4], scratch; - ssize_t len, npins; - int i, j; + phandle_t node; + ssize_t npins; + int i; sc = device_get_softc(bus); - for (node = OF_child(node); node > 0; node = OF_peer(node)) { - pinctrl_walk_tree(bus, node); - memset(status, 0, sizeof(status)); - memset(name, 0, sizeof(name)); - OF_getprop(node, "status", status, sizeof(status)); - OF_getprop(node, "name", name, sizeof(name)); - if (strcmp(status, "okay") != 0) { -// printf("pinctrl: skipping node %s status %s\n", name, -// status); - continue; - } - len = OF_getencprop(node, "pinctrl-0", pinctrl, sizeof(pinctrl)); - if (len <= 0) { -// printf("pinctrl: skipping node %s no pinctrl-0\n", -// name, status); - continue; - } - len /= sizeof(phandle_t); - printf("pinctrl: Found active node %s\n", name); - for (i = 0; i < len; i++) { - scratch = OF_node_from_xref(pinctrl[i]); - npins = OF_getencprop(scratch, "atmel,pins", pins, - sizeof(pins)); - if (npins <= 0) { - printf("We're doing it wrong %s\n", name); - continue; - } - memset(name, 0, sizeof(name)); - OF_getprop(scratch, "name", name, sizeof(name)); - npins /= (4 * 4); - printf("----> need to cope with %d more pins for %s\n", - npins, name); - for (j = 0; j < npins; j++) { - uint32_t unit = pins[j * 4]; - uint32_t pin = pins[j * 4 + 1]; - uint32_t periph = pins[j * 4 + 2]; - uint32_t flags = pins[j * 4 + 3]; - uint32_t pio; - - pio = (0xfffffff & sc->ranges[0].bus) + - 0x200 * unit; - printf("P%c%d %s %#x\n", unit + 'A', pin, - periphs[periph], flags); - switch (periph) { - case 0: - at91_pio_use_gpio(pio, 1u << pin); - at91_pio_gpio_pullup(pio, 1u << pin, - !!(flags & 1)); - at91_pio_gpio_high_z(pio, 1u << pin, - !!(flags & 2)); - at91_pio_gpio_set_deglitch(pio, - 1u << pin, !!(flags & 4)); -// at91_pio_gpio_pulldown(pio, 1u << pin, -// !!(flags & 8)); -// at91_pio_gpio_dis_schmidt(pio, -// 1u << pin, !!(flags & 16)); - break; - case 1: - at91_pio_use_periph_a(pio, 1u << pin, - flags); - break; - case 2: - at91_pio_use_periph_b(pio, 1u << pin, - flags); - break; - } - } + node = OF_node_from_xref(cfgxref); + memset(name, 0, sizeof(name)); + OF_getprop(node, "name", name, sizeof(name)); + npins = OF_getencprop_alloc(node, "atmel,pins", sizeof(*cfgdata), + (void **)&cfgdata); + if (npins < 0) { + printf("We're doing it wrong %s\n", name); + return (ENXIO); + } + if (npins == 0) + return (0); + for (i = 0, cfg = cfgdata; i < npins; i++, cfg++) { + uint32_t pio; + pio = (0xfffffff & sc->ranges[0].bus) + 0x200 * cfg->unit; + printf("P%c%d %s %#x\n", cfg->unit + 'A', cfg->pin, + periphs[cfg->periph], cfg->flags); + switch (cfg->periph) { + case 0: + at91_pio_use_gpio(pio, 1u << cfg->pin); + at91_pio_gpio_pullup(pio, 1u << cfg->pin, + !!(cfg->flags & 1)); + at91_pio_gpio_high_z(pio, 1u << cfg->pin, + !!(cfg->flags & 2)); + at91_pio_gpio_set_deglitch(pio, + 1u << cfg->pin, !!(cfg->flags & 4)); +// at91_pio_gpio_pulldown(pio, 1u << cfg->pin, +// !!(cfg->flags & 8)); +// at91_pio_gpio_dis_schmidt(pio, +// 1u << cfg->pin, !!(cfg->flags & 16)); + break; + case 1: + at91_pio_use_periph_a(pio, 1u << cfg->pin, cfg->flags); + break; + case 2: + at91_pio_use_periph_b(pio, 1u << cfg->pin, cfg->flags); + break; } } + free(cfgdata, M_OFWPROP); + return (0); } static void pinctrl_new_pass(device_t bus) { struct pinctrl_softc *sc; - phandle_t node; sc = device_get_softc(bus); @@ -466,10 +446,7 @@ pinctrl_new_pass(device_t bus) return; sc->done_pinmux++; - node = OF_peer(0); - if (node == -1) - return; - pinctrl_walk_tree(bus, node); + fdt_pinctrl_configure_tree(bus); } static device_method_t at91_pinctrl_methods[] = { @@ -496,6 +473,8 @@ static device_method_t at91_pinctrl_meth DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), + /* fdt_pintrl interface */ + DEVMETHOD(fdt_pinctrl_configure,pinctrl_configure_pins), DEVMETHOD_END }; Modified: head/sys/arm/at91/files.at91 ============================================================================== --- head/sys/arm/at91/files.at91 Sat Sep 13 19:37:11 2014 (r271547) +++ head/sys/arm/at91/files.at91 Sat Sep 13 19:59:16 2014 (r271548) @@ -10,7 +10,7 @@ arm/at91/at91_smc.c standard arm/at91/at91_cfata.c optional at91_cfata arm/at91/at91_common.c optional fdt arm/at91/at91_mci.c optional at91_mci -arm/at91/at91_pinctrl.c optional fdt +arm/at91/at91_pinctrl.c optional fdt fdt_pinctrl arm/at91/at91_pit.c optional at91sam9 arm/at91/at91_reset.S optional at91sam9 arm/at91/at91_rst.c optional at91sam9 From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 20:04:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7185825; Sat, 13 Sep 2014 20:04:28 +0000 (UTC) Received: from esa-annu.net.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 498DB279; Sat, 13 Sep 2014 20:04:27 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqIEANyiFFSDaFve/2dsb2JhbABehDuCeMpngyEBgR54hAQBAQQjVhsYAgINEgcCWQaIUacMlSQBF4EsjW00B4J4gVMFskeCG4FfIYF3gQIBAQE X-IronPort-AV: E=Sophos;i="5.04,518,1406606400"; d="scan'208";a="155011177" Received: from muskoka.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.222]) by esa-annu.net.uoguelph.ca with ESMTP; 13 Sep 2014 16:04:20 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id A09C6B4095; Sat, 13 Sep 2014 16:04:20 -0400 (EDT) Date: Sat, 13 Sep 2014 16:04:20 -0400 (EDT) From: Rick Macklem To: Hans Petter Selasky Message-ID: <405398541.35874200.1410638660648.JavaMail.root@uoguelph.ca> In-Reply-To: <54149FC4.7020307@selasky.org> Subject: Re: svn commit: r271504 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront net netinet ofed/drivers/net/mlx4 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 7.2.6_GA_2926 (ZimbraWebClient - FF3.0 (Win)/7.2.6_GA_2926) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Adrian Chadd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 20:04:28 -0000 Hans Petter Selasky wrote: > On 09/13/14 18:54, Adrian Chadd wrote: > > Hi, > > > > Just for the record: > > > > * I'm glad you're tackling the TSO config stuff; > > * I'm not glad you're trying to pack it into a u_int rather than > > creating a new structure and adding fields for it. > > > > I appreciate that you're trying to rush this in before 10.1, but > > this > > is exactly why things shouldn't be rushed in before release > > deadlines. > > :) > > > > I'd really like to see this be broken out as a structure and the > > bit > > shifting games for what really shouldn't be packed into a u_int > > fixed. > > Otherwise this is going to be deadweight that has to persist past > > 11.0. > > > > Hi Adrian, > > I can make that change for -current, making the new structure and > such. > This change was intended for 10 where there is only one u_int for > this > information. Or do you want me to change that in 10 too? > Well, there are spare fields (if_ispare[4]) in struct ifnet that I believe can be used for new u_ints when MFC'ng a patch that adds fields to struct ifnet in head. (If I have this wrong, someone please correct me.) I'll admit I don't really see an advantage to defining a structure vs just defining a couple of additional u_ints, but so long as the structure doesn't cause alignment issues for any arch, I don't see a problem with a structure. I tend to agree with Adrian that this shouldn't be rushed. (I, personally, think that if_hw_tsomax was poorly chosen, but that is already in use, so I think we need to add to that and not replace it.) I also hope that your testing has included quite a bit of activity on an NFS mount using TSO and the default 64K rsize, wsize, since that is going to generate a bunch of 35 mbuf transmit fragment lists and there is an edge case where the total data length excluding ethernet header is just under 64K (by less than the ethernet header length) where the list must be split by tcp_output() to avoid disaster. rick > --HPS > > > From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 20:08:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B8BCAAC; Sat, 13 Sep 2014 20:08:28 +0000 (UTC) Received: from cyrus.watson.org (cyrus.watson.org [198.74.231.69]) by mx1.freebsd.org (Postfix) with ESMTP id E62852C1; Sat, 13 Sep 2014 20:08:27 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [198.74.231.63]) by cyrus.watson.org (Postfix) with ESMTPS id 6B1AA46B7F; Sat, 13 Sep 2014 16:08:27 -0400 (EDT) Date: Sat, 13 Sep 2014 21:08:27 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Rick Macklem Subject: Re: svn commit: r271504 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront net netinet ofed/drivers/net/mlx4 In-Reply-To: <405398541.35874200.1410638660648.JavaMail.root@uoguelph.ca> Message-ID: References: <405398541.35874200.1410638660648.JavaMail.root@uoguelph.ca> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Hans Petter Selasky , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Adrian Chadd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 20:08:28 -0000 On Sat, 13 Sep 2014, Rick Macklem wrote: > Well, there are spare fields (if_ispare[4]) in struct ifnet that I believe > can be used for new u_ints when MFC'ng a patch that adds fields to struct > ifnet in head. (If I have this wrong, someone please correct me.) In my notes from a few years ago on KBIs, it looked like we could potentially convert ifnet from "only use spares" to "OK to append to the structure in a stable branch". It used to be that ifnet was embedded in driver softcs, and so ifnet changes broke compiled driver modules, but this is no longer the case. A careful review might suggest to us that it's OK to simply add the new fields we want to the end, but need to do that review before assuming it. Robert From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 20:09:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB96BBF2; Sat, 13 Sep 2014 20:09:02 +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 D61F62D5; Sat, 13 Sep 2014 20:09:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DK92lt019815; Sat, 13 Sep 2014 20:09:02 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DK922G019814; Sat, 13 Sep 2014 20:09:02 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201409132009.s8DK922G019814@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sat, 13 Sep 2014 20:09:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271549 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 20:09:03 -0000 Author: nwhitehorn Date: Sat Sep 13 20:09:02 2014 New Revision: 271549 URL: http://svnweb.freebsd.org/changeset/base/271549 Log: Create /tmp/bsdinstall_etc even if we aren't starting the installer so that dhclient can write resolv.conf when used from the live environment. PR: 176078 MFC after: 3 days Modified: head/release/rc.local Modified: head/release/rc.local ============================================================================== --- head/release/rc.local Sat Sep 13 19:59:16 2014 (r271548) +++ head/release/rc.local Sat Sep 13 20:09:02 2014 (r271549) @@ -10,6 +10,9 @@ MACHINE=`uname -m` +# resolv.conf from DHCP ends up in here, so make sure the directory exists +mkdir /tmp/bsdinstall_etc + kbdcontrol -d >/dev/null 2>&1 if [ $? -eq 0 ]; then # Syscons: use xterm, start interesting things on other VTYs From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 20:09:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3C8FD3F; Sat, 13 Sep 2014 20:09:35 +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 C2E592E5; Sat, 13 Sep 2014 20:09:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DK9Z5j020029; Sat, 13 Sep 2014 20:09:35 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DK9YDC020017; Sat, 13 Sep 2014 20:09:34 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409132009.s8DK9YDC020017@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 13 Sep 2014 20:09:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271550 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 20:09:36 -0000 Author: ian Date: Sat Sep 13 20:09:34 2014 New Revision: 271550 URL: http://svnweb.freebsd.org/changeset/base/271550 Log: Replace the imx5 and imx6 iomux drivers with a single common driver that uses the new fdt_pinctrl interface. Added: head/sys/arm/freescale/imx/imx_iomux.c (contents, props changed) Deleted: head/sys/arm/freescale/imx/imx51_iomux.c head/sys/arm/freescale/imx/imx51_iomuxreg.h head/sys/arm/freescale/imx/imx6_iomux.c head/sys/arm/freescale/imx/imx6_iomuxreg.h Modified: head/sys/arm/freescale/imx/files.imx51 head/sys/arm/freescale/imx/files.imx53 head/sys/arm/freescale/imx/files.imx6 head/sys/arm/freescale/imx/std.imx51 head/sys/arm/freescale/imx/std.imx53 head/sys/arm/freescale/imx/std.imx6 Modified: head/sys/arm/freescale/imx/files.imx51 ============================================================================== --- head/sys/arm/freescale/imx/files.imx51 Sat Sep 13 20:09:02 2014 (r271549) +++ head/sys/arm/freescale/imx/files.imx51 Sat Sep 13 20:09:34 2014 (r271550) @@ -19,7 +19,7 @@ arm/arm/bus_space-v6.c standard arm/freescale/imx/tzic.c standard # IOMUX - external pins multiplexor -arm/freescale/imx/imx51_iomux.c standard +arm/freescale/imx/imx_iomux.c standard # GPIO arm/freescale/imx/imx_gpio.c optional gpio Modified: head/sys/arm/freescale/imx/files.imx53 ============================================================================== --- head/sys/arm/freescale/imx/files.imx53 Sat Sep 13 20:09:02 2014 (r271549) +++ head/sys/arm/freescale/imx/files.imx53 Sat Sep 13 20:09:34 2014 (r271550) @@ -22,7 +22,7 @@ dev/uart/uart_dev_imx.c optional uart arm/freescale/imx/tzic.c standard # IOMUX - external pins multiplexor -arm/freescale/imx/imx51_iomux.c standard +arm/freescale/imx/imx_iomux.c standard # GPIO arm/freescale/imx/imx_gpio.c optional gpio Modified: head/sys/arm/freescale/imx/files.imx6 ============================================================================== --- head/sys/arm/freescale/imx/files.imx6 Sat Sep 13 20:09:02 2014 (r271549) +++ head/sys/arm/freescale/imx/files.imx6 Sat Sep 13 20:09:34 2014 (r271550) @@ -20,11 +20,11 @@ arm/arm/mpcore_timer.c standard arm/freescale/fsl_ocotp.c standard arm/freescale/imx/imx6_anatop.c standard arm/freescale/imx/imx6_ccm.c standard -arm/freescale/imx/imx6_iomux.c standard arm/freescale/imx/imx6_machdep.c standard arm/freescale/imx/imx6_mp.c optional smp arm/freescale/imx/imx6_pl310.c standard arm/freescale/imx/imx_common.c standard +arm/freescale/imx/imx_iomux.c standard arm/freescale/imx/imx_machdep.c standard arm/freescale/imx/imx_gpt.c standard arm/freescale/imx/imx_gpio.c optional gpio Added: head/sys/arm/freescale/imx/imx_iomux.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/freescale/imx/imx_iomux.c Sat Sep 13 20:09:34 2014 (r271550) @@ -0,0 +1,266 @@ +/*- + * Copyright (c) 2014 Ian Lepore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +struct iomux_softc { + device_t dev; + struct resource *mem_res; + u_int last_gpreg; +}; + +static struct iomux_softc *iomux_sc; + +static struct ofw_compat_data compat_data[] = { + {"fsl,imx6dl-iomuxc", true}, + {"fsl,imx6q-iomuxc", true}, + {"fsl,imx6sl-iomuxc", true}, + {"fsl,imx6sx-iomuxc", true}, + {"fsl,imx53-iomuxc", true}, + {"fsl,imx51-iomuxc", true}, + {NULL, false}, +}; + +/* + * Each tuple in an fsl,pins property contains these fields. + */ +struct pincfg { + uint32_t mux_reg; + uint32_t padconf_reg; + uint32_t input_reg; + uint32_t mux_val; + uint32_t input_val; + uint32_t padconf_val; +}; + +static inline uint32_t +RD4(struct iomux_softc *sc, bus_size_t off) +{ + + return (bus_read_4(sc->mem_res, off)); +} + +static inline void +WR4(struct iomux_softc *sc, bus_size_t off, uint32_t val) +{ + + bus_write_4(sc->mem_res, off, val); +} + +static int +iomux_configure_pins(device_t dev, phandle_t cfgxref) +{ + struct iomux_softc * sc; + struct pincfg *cfgtuples, *cfg; + phandle_t cfgnode; + int i, ntuples; + + sc = device_get_softc(dev); + cfgnode = OF_node_from_xref(cfgxref); + ntuples = OF_getencprop_alloc(cfgnode, "fsl,pins", sizeof(*cfgtuples), + (void **)&cfgtuples); +#ifdef DEBUG + { + char name[32]; + OF_getprop(cfgnode, "name", &name, sizeof(name)); + printf("found %d tuples in fsl,pins for %s\n", ntuples, name); + } +#endif + if (ntuples < 0) + return (ENOENT); + if (ntuples == 0) + return (0); /* Empty property is not an error. */ + for (i = 0, cfg = cfgtuples; i < ntuples; i++, cfg++) { + WR4(sc, cfg->mux_reg, cfg->mux_val); + WR4(sc, cfg->input_reg, cfg->input_val); + WR4(sc, cfg->padconf_reg, cfg->padconf_val); + } + free(cfgtuples, M_OFWPROP); + return (0); +} + +static int +iomux_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) + return (ENXIO); + + device_set_desc(dev, "Freescale i.MX pin configuration"); + return (BUS_PROBE_DEFAULT); +} + +static int +iomux_detach(device_t dev) +{ + + /* This device is always present. */ + return (EBUSY); +} + +static int +iomux_attach(device_t dev) +{ + struct iomux_softc * sc; + int rid; + + sc = device_get_softc(dev); + sc->dev = dev; + + switch (imx_soc_type()) { + case IMXSOC_51: + sc->last_gpreg = 1; + break; + case IMXSOC_53: + sc->last_gpreg = 2; + break; + case IMXSOC_6DL: + case IMXSOC_6S: + case IMXSOC_6SL: + case IMXSOC_6Q: + sc->last_gpreg = 13; + break; + default: + device_printf(dev, "Unknown SoC type\n"); + return (ENXIO); + } + + rid = 0; + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (sc->mem_res == NULL) { + device_printf(dev, "Cannot allocate memory resources\n"); + return (ENXIO); + } + + iomux_sc = sc; + + /* + * Register as a pinctrl device, and call the convenience function that + * walks the entire device tree invoking FDT_PINCTRL_CONFIGURE() on any + * pinctrl-0 property cells whose xref phandle refers to a configuration + * that is a child node of our node in the tree. + * + * The pinctrl bindings documentation specifically mentions that the + * pinctrl device itself may have a pinctrl-0 property which contains + * static configuration to be applied at device init time. The tree + * walk will automatically handle this for us when it passes through our + * node in the tree. + */ + fdt_pinctrl_register(dev, "fsl,pins"); + fdt_pinctrl_configure_tree(dev); + + return (0); +} + +uint32_t +imx_iomux_gpr_get(u_int regnum) +{ + struct iomux_softc * sc; + + sc = iomux_sc; + KASSERT(sc != NULL, ("%s called before attach", __FUNCTION__)); + KASSERT(regnum >= 0 && regnum <= sc->last_gpreg, + ("%s bad regnum %u, max %u", __FUNCTION__, regnum, sc->last_gpreg)); + + return (RD4(iomux_sc, regnum * 4)); +} + +void +imx_iomux_gpr_set(u_int regnum, uint32_t val) +{ + struct iomux_softc * sc; + + sc = iomux_sc; + KASSERT(sc != NULL, ("%s called before attach", __FUNCTION__)); + KASSERT(regnum >= 0 && regnum <= sc->last_gpreg, + ("%s bad regnum %u, max %u", __FUNCTION__, regnum, sc->last_gpreg)); + + WR4(iomux_sc, regnum * 4, val); +} + +void +imx_iomux_gpr_set_masked(u_int regnum, uint32_t clrbits, uint32_t setbits) +{ + struct iomux_softc * sc; + uint32_t val; + + sc = iomux_sc; + KASSERT(sc != NULL, ("%s called before attach", __FUNCTION__)); + KASSERT(regnum >= 0 && regnum <= sc->last_gpreg, + ("%s bad regnum %u, max %u", __FUNCTION__, regnum, sc->last_gpreg)); + + val = RD4(iomux_sc, regnum * 4); + val = (val & ~clrbits) | setbits; + WR4(iomux_sc, regnum * 4, val); +} + +static device_method_t imx_iomux_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, iomux_probe), + DEVMETHOD(device_attach, iomux_attach), + DEVMETHOD(device_detach, iomux_detach), + + /* fdt_pinctrl interface */ + DEVMETHOD(fdt_pinctrl_configure,iomux_configure_pins), + + DEVMETHOD_END +}; + +static driver_t imx_iomux_driver = { + "imx_iomux", + imx_iomux_methods, + sizeof(struct iomux_softc), +}; + +static devclass_t imx_iomux_devclass; + +EARLY_DRIVER_MODULE(imx_iomux, simplebus, imx_iomux_driver, + imx_iomux_devclass, 0, 0, BUS_PASS_CPU + BUS_PASS_ORDER_LATE); + Modified: head/sys/arm/freescale/imx/std.imx51 ============================================================================== --- head/sys/arm/freescale/imx/std.imx51 Sat Sep 13 20:09:02 2014 (r271549) +++ head/sys/arm/freescale/imx/std.imx51 Sat Sep 13 20:09:34 2014 (r271550) @@ -10,5 +10,7 @@ options KERNPHYSADDR=0x90100000 makeoptions KERNPHYSADDR=0x90100000 options PHYSADDR=0x90000000 +device fdt_pinctrl + files "../freescale/imx/files.imx51" Modified: head/sys/arm/freescale/imx/std.imx53 ============================================================================== --- head/sys/arm/freescale/imx/std.imx53 Sat Sep 13 20:09:02 2014 (r271549) +++ head/sys/arm/freescale/imx/std.imx53 Sat Sep 13 20:09:34 2014 (r271550) @@ -10,5 +10,7 @@ options KERNPHYSADDR=0x70100000 makeoptions KERNPHYSADDR=0x70100000 options PHYSADDR=0x70000000 +device fdt_pinctrl + files "../freescale/imx/files.imx53" Modified: head/sys/arm/freescale/imx/std.imx6 ============================================================================== --- head/sys/arm/freescale/imx/std.imx6 Sat Sep 13 20:09:02 2014 (r271549) +++ head/sys/arm/freescale/imx/std.imx6 Sat Sep 13 20:09:34 2014 (r271550) @@ -13,5 +13,7 @@ options PHYSADDR = 0x10000000 options IPI_IRQ_START=0 options IPI_IRQ_END=15 +device fdt_pinctrl + files "../freescale/imx/files.imx6" From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 20:14:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7890F97; Sat, 13 Sep 2014 20:14:45 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 728963B0; Sat, 13 Sep 2014 20:14:45 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 351A71FE027; Sat, 13 Sep 2014 22:14:43 +0200 (CEST) Message-ID: <5414A5A7.9030108@selasky.org> Date: Sat, 13 Sep 2014 22:14:31 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Rick Macklem Subject: Re: svn commit: r271504 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront net netinet ofed/drivers/net/mlx4 References: <405398541.35874200.1410638660648.JavaMail.root@uoguelph.ca> In-Reply-To: <405398541.35874200.1410638660648.JavaMail.root@uoguelph.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Adrian Chadd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 20:14:45 -0000 On 09/13/14 22:04, Rick Macklem wrote: > Hans Petter Selasky wrote: >> On 09/13/14 18:54, Adrian Chadd wrote: >>> Hi, >>> >>> Just for the record: >>> >>> * I'm glad you're tackling the TSO config stuff; >>> * I'm not glad you're trying to pack it into a u_int rather than >>> creating a new structure and adding fields for it. >>> >>> I appreciate that you're trying to rush this in before 10.1, but >>> this >>> is exactly why things shouldn't be rushed in before release >>> deadlines. >>> :) >>> >>> I'd really like to see this be broken out as a structure and the >>> bit >>> shifting games for what really shouldn't be packed into a u_int >>> fixed. >>> Otherwise this is going to be deadweight that has to persist past >>> 11.0. >>> >> >> Hi Adrian, >> >> I can make that change for -current, making the new structure and >> such. >> This change was intended for 10 where there is only one u_int for >> this >> information. Or do you want me to change that in 10 too? >> > Well, there are spare fields (if_ispare[4]) in struct ifnet that I > believe can be used for new u_ints when MFC'ng a patch that adds > fields to struct ifnet in head. (If I have this wrong, someone please > correct me.) > > I'll admit I don't really see an advantage to defining a structure vs > just defining a couple of additional u_ints, but so long as the structure > doesn't cause alignment issues for any arch, I don't see a problem with > a structure. > > I tend to agree with Adrian that this shouldn't be rushed. (I, personally, > think that if_hw_tsomax was poorly chosen, but that is already in use, so > I think we need to add to that and not replace it.) > > I also hope that your testing has included quite a bit of activity on > an NFS mount using TSO and the default 64K rsize, wsize, since that is > going to generate a bunch of 35 mbuf transmit fragment lists and there > is an edge case where the total data length excluding ethernet header > is just under 64K (by less than the ethernet header length) where the > list must be split by tcp_output() to avoid disaster. Hi, The ethernet and VLAN headers are still subtracted. --HPS From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 20:28:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A06B03A4; Sat, 13 Sep 2014 20:28:22 +0000 (UTC) Received: from esa-annu.net.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 301B7684; Sat, 13 Sep 2014 20:28:21 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqIEAI2nFFSDaFve/2dsb2JhbABehDuCeMpngyEBgR54hAQBAQQjVhsYAgINEgcCWQaIUacOlSMBF4EsjW00B4J4gVMFskeCG4FfIYF3gQIBAQE X-IronPort-AV: E=Sophos;i="5.04,518,1406606400"; d="scan'208";a="155012754" Received: from muskoka.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.222]) by esa-annu.net.uoguelph.ca with ESMTP; 13 Sep 2014 16:28:20 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id DF16CB4039; Sat, 13 Sep 2014 16:28:20 -0400 (EDT) Date: Sat, 13 Sep 2014 16:28:20 -0400 (EDT) From: Rick Macklem To: Hans Petter Selasky Message-ID: <1971026585.35877589.1410640100903.JavaMail.root@uoguelph.ca> In-Reply-To: <5414A5A7.9030108@selasky.org> Subject: Re: svn commit: r271504 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront net netinet ofed/drivers/net/mlx4 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.209] X-Mailer: Zimbra 7.2.6_GA_2926 (ZimbraWebClient - FF3.0 (Win)/7.2.6_GA_2926) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Adrian Chadd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 20:28:22 -0000 Hans Petter Selasky wrote: > On 09/13/14 22:04, Rick Macklem wrote: > > Hans Petter Selasky wrote: > >> On 09/13/14 18:54, Adrian Chadd wrote: > >>> Hi, > >>> > >>> Just for the record: > >>> > >>> * I'm glad you're tackling the TSO config stuff; > >>> * I'm not glad you're trying to pack it into a u_int rather than > >>> creating a new structure and adding fields for it. > >>> > >>> I appreciate that you're trying to rush this in before 10.1, but > >>> this > >>> is exactly why things shouldn't be rushed in before release > >>> deadlines. > >>> :) > >>> > >>> I'd really like to see this be broken out as a structure and the > >>> bit > >>> shifting games for what really shouldn't be packed into a u_int > >>> fixed. > >>> Otherwise this is going to be deadweight that has to persist past > >>> 11.0. > >>> > >> > >> Hi Adrian, > >> > >> I can make that change for -current, making the new structure and > >> such. > >> This change was intended for 10 where there is only one u_int for > >> this > >> information. Or do you want me to change that in 10 too? > >> > > Well, there are spare fields (if_ispare[4]) in struct ifnet that I > > believe can be used for new u_ints when MFC'ng a patch that adds > > fields to struct ifnet in head. (If I have this wrong, someone > > please > > correct me.) > > > > I'll admit I don't really see an advantage to defining a structure > > vs > > just defining a couple of additional u_ints, but so long as the > > structure > > doesn't cause alignment issues for any arch, I don't see a problem > > with > > a structure. > > > > I tend to agree with Adrian that this shouldn't be rushed. (I, > > personally, > > think that if_hw_tsomax was poorly chosen, but that is already in > > use, so > > I think we need to add to that and not replace it.) > > > > I also hope that your testing has included quite a bit of activity > > on > > an NFS mount using TSO and the default 64K rsize, wsize, since that > > is > > going to generate a bunch of 35 mbuf transmit fragment lists and > > there > > is an edge case where the total data length excluding ethernet > > header > > is just under 64K (by less than the ethernet header length) where > > the > > list must be split by tcp_output() to avoid disaster. > > Hi, > > The ethernet and VLAN headers are still subtracted. > Where? I couldn't see it when I glanced at the patch. (hdrlen in tcp_output() does not include ethernet header length and that is the only thing I see subtracted from the max_len.) I see the default set to (65536 - 4). I don't know why you subtracted 4 but I would have expected the max ethernet header length to be subtracted here? Note that this must be subtracted before use by tcp_output() because there are several network device drivers that support 32 transmit segments and this means that the TSO segment including ethernet headers must fit in 65536bytes (32 * MCLBYTES). If it does not, then NFS over these devices is busted because even m_defrag() can`t make them fit. rick rick > --HPS > > > From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 20:28:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46DF94E6; Sat, 13 Sep 2014 20:28:41 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0281B68A; Sat, 13 Sep 2014 20:28:40 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 0E4CC1FE027; Sat, 13 Sep 2014 22:28:36 +0200 (CEST) Message-ID: <5414A8E9.8040009@selasky.org> Date: Sat, 13 Sep 2014 22:28:25 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Rick Macklem Subject: Re: svn commit: r271504 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront net netinet ofed/drivers/net/mlx4 References: <405398541.35874200.1410638660648.JavaMail.root@uoguelph.ca> <5414A5A7.9030108@selasky.org> In-Reply-To: <5414A5A7.9030108@selasky.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Adrian Chadd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 20:28:41 -0000 On 09/13/14 22:14, Hans Petter Selasky wrote: > On 09/13/14 22:04, Rick Macklem wrote: >> Hans Petter Selasky wrote: >>> On 09/13/14 18:54, Adrian Chadd wrote: >>>> Hi, > > Hi, > > The ethernet and VLAN headers are still subtracted. > > --HPS > Hi, Adrian @ and I have agreed that we will work out a new patch during the next 5 days, which correctly adds the new TSO fields in a more appropriate manner with regard to the conventions around in the network stack. For now I will revert the current TSO patch, if there are no big objections? --HPS From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 20:35:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5BF78920; Sat, 13 Sep 2014 20:35:39 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE5F47B6; Sat, 13 Sep 2014 20:35:38 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 870BB1FE027; Sat, 13 Sep 2014 22:35:36 +0200 (CEST) Message-ID: <5414AA8C.8000809@selasky.org> Date: Sat, 13 Sep 2014 22:35:24 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Rick Macklem Subject: Re: svn commit: r271504 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront net netinet ofed/drivers/net/mlx4 References: <1971026585.35877589.1410640100903.JavaMail.root@uoguelph.ca> In-Reply-To: <1971026585.35877589.1410640100903.JavaMail.root@uoguelph.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Adrian Chadd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 20:35:39 -0000 On 09/13/14 22:28, Rick Macklem wrote: > Hans Petter Selasky wrote: >> On 09/13/14 22:04, Rick Macklem wrote: >>> Hans Petter Selasky wrote: >>>> On 09/13/14 18:54, Adrian Chadd wrote: >>>>> Hi, >>>>> >>>>> Just for the record: >>>>> >>>>> * I'm glad you're tackling the TSO config stuff; >>>>> * I'm not glad you're trying to pack it into a u_int rather than >>>>> creating a new structure and adding fields for it. >>>>> >>>>> I appreciate that you're trying to rush this in before 10.1, but >>>>> this >>>>> is exactly why things shouldn't be rushed in before release >>>>> deadlines. >>>>> :) >>>>> >>>>> I'd really like to see this be broken out as a structure and the >>>>> bit >>>>> shifting games for what really shouldn't be packed into a u_int >>>>> fixed. >>>>> Otherwise this is going to be deadweight that has to persist past >>>>> 11.0. >>>>> >>>> >>>> Hi Adrian, >>>> >>>> I can make that change for -current, making the new structure and >>>> such. >>>> This change was intended for 10 where there is only one u_int for >>>> this >>>> information. Or do you want me to change that in 10 too? >>>> >>> Well, there are spare fields (if_ispare[4]) in struct ifnet that I >>> believe can be used for new u_ints when MFC'ng a patch that adds >>> fields to struct ifnet in head. (If I have this wrong, someone >>> please >>> correct me.) >>> >>> I'll admit I don't really see an advantage to defining a structure >>> vs >>> just defining a couple of additional u_ints, but so long as the >>> structure >>> doesn't cause alignment issues for any arch, I don't see a problem >>> with >>> a structure. >>> >>> I tend to agree with Adrian that this shouldn't be rushed. (I, >>> personally, >>> think that if_hw_tsomax was poorly chosen, but that is already in >>> use, so >>> I think we need to add to that and not replace it.) >>> >>> I also hope that your testing has included quite a bit of activity >>> on >>> an NFS mount using TSO and the default 64K rsize, wsize, since that >>> is >>> going to generate a bunch of 35 mbuf transmit fragment lists and >>> there >>> is an edge case where the total data length excluding ethernet >>> header >>> is just under 64K (by less than the ethernet header length) where >>> the >>> list must be split by tcp_output() to avoid disaster. >> >> Hi, >> >> The ethernet and VLAN headers are still subtracted. >> > Where? I couldn't see it when I glanced at the patch. > (hdrlen in tcp_output() does not include ethernet header length and > that is the only thing I see subtracted from the max_len.) Hi Rick, When the drivers setup the "if_hw_tsomax" field, they need to subtract the ethernet and vlan headers from the maximum TSO payload. For example here: + sc->ifp->if_hw_tsomax = IF_HW_TSOMAX_BUILD_VALUE( + 65535 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN) /* bytes */, + OCE_MAX_TX_ELEMENTS /* maximum frag count */, + 12 /* 4K frag size */); > > I see the default set to (65536 - 4). I don't know why you subtracted 4 > but I would have expected the max ethernet header length to be subtracted > here? That is another technical point. If you have a bunch of data to transfer you want the start and stop physical addresses to be aligned to some boundary, like cache line or 32-bit or 64-bit, because then the hardware doesn't have to do the byte shifting when it starts reading the data payload - right? > > Note that this must be subtracted before use by tcp_output() because there > are several network device drivers that support 32 transmit segments and this > means that the TSO segment including ethernet headers must fit in 65536 bytes > (32 * MCLBYTES). If it does not, then NFS over these devices is busted because > even m_defrag() can`t make them fit. I only found a few network drivers which actually set the TSO limit, and for the rest: The default limit is 255 frags of MAX 65536 bytes, which should not be reached in the cases you are describing. --HPS From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 20:39:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3E02B35; Sat, 13 Sep 2014 20:39:03 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FB477CC; Sat, 13 Sep 2014 20:39:02 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 833351FE027; Sat, 13 Sep 2014 22:39:00 +0200 (CEST) Message-ID: <5414AB58.6040400@selasky.org> Date: Sat, 13 Sep 2014 22:38:48 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Rick Macklem Subject: Re: svn commit: r271504 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront net netinet ofed/drivers/net/mlx4 References: <1971026585.35877589.1410640100903.JavaMail.root@uoguelph.ca> <5414AA8C.8000809@selasky.org> In-Reply-To: <5414AA8C.8000809@selasky.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Adrian Chadd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 20:39:04 -0000 On 09/13/14 22:35, Hans Petter Selasky wrote: > > I see the default set to (65536 - 4). I don't know why you subtracted 4 > but I would have expected the max ethernet header length to be subtracted > here? You mean to say that the default should be 65535 - ethernet header - vlan header ? --HPS From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 20:45:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 297CBDDB; Sat, 13 Sep 2014 20:45:16 +0000 (UTC) Received: from esa-annu.net.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id AD0A188A; Sat, 13 Sep 2014 20:45:15 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqIEAF6sFFSDaFve/2dsb2JhbABfhDuCeMpngyEBgR54hAQBAQQjBFIbGAICDRIHAlkGCohHpw+VIwEXgSyNSiM0B4J4gVMFskeBZx4WgV8hgTZBgQIBAQE X-IronPort-AV: E=Sophos;i="5.04,518,1406606400"; d="scan'208";a="155014070" Received: from muskoka.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.222]) by esa-annu.net.uoguelph.ca with ESMTP; 13 Sep 2014 16:45:14 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 4009EB4031; Sat, 13 Sep 2014 16:45:14 -0400 (EDT) Date: Sat, 13 Sep 2014 16:45:14 -0400 (EDT) From: Rick Macklem To: Hans Petter Selasky Message-ID: <205391404.35879067.1410641114256.JavaMail.root@uoguelph.ca> In-Reply-To: <5414AA8C.8000809@selasky.org> Subject: Re: svn commit: r271504 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront net netinet ofed/drivers/net/mlx4 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 7.2.6_GA_2926 (ZimbraWebClient - FF3.0 (Win)/7.2.6_GA_2926) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Adrian Chadd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 20:45:16 -0000 Hans Petter Selasky wrote: > On 09/13/14 22:28, Rick Macklem wrote: > > Hans Petter Selasky wrote: > >> On 09/13/14 22:04, Rick Macklem wrote: > >>> Hans Petter Selasky wrote: > >>>> On 09/13/14 18:54, Adrian Chadd wrote: > >>>>> Hi, > >>>>> > >>>>> Just for the record: > >>>>> > >>>>> * I'm glad you're tackling the TSO config stuff; > >>>>> * I'm not glad you're trying to pack it into a u_int rather > >>>>> than > >>>>> creating a new structure and adding fields for it. > >>>>> > >>>>> I appreciate that you're trying to rush this in before 10.1, > >>>>> but > >>>>> this > >>>>> is exactly why things shouldn't be rushed in before release > >>>>> deadlines. > >>>>> :) > >>>>> > >>>>> I'd really like to see this be broken out as a structure and > >>>>> the > >>>>> bit > >>>>> shifting games for what really shouldn't be packed into a u_int > >>>>> fixed. > >>>>> Otherwise this is going to be deadweight that has to persist > >>>>> past > >>>>> 11.0. > >>>>> > >>>> > >>>> Hi Adrian, > >>>> > >>>> I can make that change for -current, making the new structure > >>>> and > >>>> such. > >>>> This change was intended for 10 where there is only one u_int > >>>> for > >>>> this > >>>> information. Or do you want me to change that in 10 too? > >>>> > >>> Well, there are spare fields (if_ispare[4]) in struct ifnet that > >>> I > >>> believe can be used for new u_ints when MFC'ng a patch that adds > >>> fields to struct ifnet in head. (If I have this wrong, someone > >>> please > >>> correct me.) > >>> > >>> I'll admit I don't really see an advantage to defining a > >>> structure > >>> vs > >>> just defining a couple of additional u_ints, but so long as the > >>> structure > >>> doesn't cause alignment issues for any arch, I don't see a > >>> problem > >>> with > >>> a structure. > >>> > >>> I tend to agree with Adrian that this shouldn't be rushed. (I, > >>> personally, > >>> think that if_hw_tsomax was poorly chosen, but that is already in > >>> use, so > >>> I think we need to add to that and not replace it.) > >>> > >>> I also hope that your testing has included quite a bit of > >>> activity > >>> on > >>> an NFS mount using TSO and the default 64K rsize, wsize, since > >>> that > >>> is > >>> going to generate a bunch of 35 mbuf transmit fragment lists and > >>> there > >>> is an edge case where the total data length excluding ethernet > >>> header > >>> is just under 64K (by less than the ethernet header length) where > >>> the > >>> list must be split by tcp_output() to avoid disaster. > >> > >> Hi, > >> > >> The ethernet and VLAN headers are still subtracted. > >> > > Where? I couldn't see it when I glanced at the patch. > > (hdrlen in tcp_output() does not include ethernet header length and > > that is the only thing I see subtracted from the max_len.) > > Hi Rick, > > When the drivers setup the "if_hw_tsomax" field, they need to > subtract > the ethernet and vlan headers from the maximum TSO payload. > > For example here: > > + sc->ifp->if_hw_tsomax = IF_HW_TSOMAX_BUILD_VALUE( > + 65535 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN) /* bytes */, > + OCE_MAX_TX_ELEMENTS /* maximum frag count */, > + 12 /* 4K frag size */); > > > > > I see the default set to (65536 - 4). I don't know why you > > subtracted 4 > > but I would have expected the max ethernet header length to be > > subtracted > > here? > > That is another technical point. If you have a bunch of data to > transfer > you want the start and stop physical addresses to be aligned to some > boundary, like cache line or 32-bit or 64-bit, because then the > hardware > doesn't have to do the byte shifting when it starts reading the data > payload - right? > > > > > Note that this must be subtracted before use by tcp_output() > > because there > > are several network device drivers that support 32 transmit > > segments and this > > means that the TSO segment including ethernet headers must fit in > > 65536 bytes > > (32 * MCLBYTES). If it does not, then NFS over these devices is > > busted because > > even m_defrag() can`t make them fit. > > I only found a few network drivers which actually set the TSO limit, > and > for the rest: The default limit is 255 frags of MAX 65536 bytes, > which > should not be reached in the cases you are describing. > The problem is that almost no driver (last I looked xen/netfront was the only one) sets if_hw_tsomax. However many of these driver do need the maximum TSO segment size to be 64K - max_ethernet_header_len, so they can pack the TSO segment (including ethernet header) into 32 mbuf clusters via m_defrag(). So, the default needs to handle this case, because the drivers may never get fixed. rick > --HPS > > From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 20:52:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A82587E; Sat, 13 Sep 2014 20:52:04 +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 90CBE951; Sat, 13 Sep 2014 20:52:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DKq48T045769; Sat, 13 Sep 2014 20:52:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DKq2P0045750; Sat, 13 Sep 2014 20:52:02 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201409132052.s8DKq2P0045750@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 13 Sep 2014 20:52:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271551 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront net netinet ofed/drivers/net/mlx4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 20:52:04 -0000 Author: hselasky Date: Sat Sep 13 20:52:01 2014 New Revision: 271551 URL: http://svnweb.freebsd.org/changeset/base/271551 Log: Revert r271504. A new patch to solve this issue will be made. Suggested by: adrian @ Modified: head/sys/dev/oce/oce_if.c head/sys/dev/oce/oce_if.h head/sys/dev/vmware/vmxnet3/if_vmx.c head/sys/dev/vmware/vmxnet3/if_vmxvar.h head/sys/dev/xen/netfront/netfront.c head/sys/net/if.c head/sys/net/if_lagg.c head/sys/net/if_var.h head/sys/net/if_vlan.c head/sys/netinet/tcp_output.c head/sys/ofed/drivers/net/mlx4/en_netdev.c Modified: head/sys/dev/oce/oce_if.c ============================================================================== --- head/sys/dev/oce/oce_if.c Sat Sep 13 20:09:34 2014 (r271550) +++ head/sys/dev/oce/oce_if.c Sat Sep 13 20:52:01 2014 (r271551) @@ -1731,10 +1731,7 @@ oce_attach_ifp(POCE_SOFTC sc) sc->ifp->if_baudrate = IF_Gbps(10); #if __FreeBSD_version >= 1000000 - sc->ifp->if_hw_tsomax = IF_HW_TSOMAX_BUILD_VALUE( - 65535 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN) /* bytes */, - OCE_MAX_TX_ELEMENTS /* maximum frag count */, - 12 /* 4K frag size */); + sc->ifp->if_hw_tsomax = OCE_MAX_TSO_SIZE; #endif ether_ifattach(sc->ifp, sc->macaddr.mac_addr); Modified: head/sys/dev/oce/oce_if.h ============================================================================== --- head/sys/dev/oce/oce_if.h Sat Sep 13 20:09:34 2014 (r271550) +++ head/sys/dev/oce/oce_if.h Sat Sep 13 20:52:01 2014 (r271551) @@ -152,6 +152,7 @@ extern int mp_ncpus; /* system's total #define OCE_MAX_TX_ELEMENTS 29 #define OCE_MAX_TX_DESC 1024 #define OCE_MAX_TX_SIZE 65535 +#define OCE_MAX_TSO_SIZE (65535 - ETHER_HDR_LEN) #define OCE_MAX_RX_SIZE 4096 #define OCE_MAX_RQ_POSTS 255 #define OCE_DEFAULT_PROMISCUOUS 0 Modified: head/sys/dev/vmware/vmxnet3/if_vmx.c ============================================================================== --- head/sys/dev/vmware/vmxnet3/if_vmx.c Sat Sep 13 20:09:34 2014 (r271550) +++ head/sys/dev/vmware/vmxnet3/if_vmx.c Sat Sep 13 20:52:01 2014 (r271551) @@ -1722,11 +1722,7 @@ vmxnet3_setup_interface(struct vmxnet3_s ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_init = vmxnet3_init; ifp->if_ioctl = vmxnet3_ioctl; - - ifp->if_hw_tsomax = IF_HW_TSOMAX_BUILD_VALUE( - 65535 - sizeof(struct ether_vlan_header) /* bytes */, - VMXNET3_TX_MAXSEGS /* maximum frag count */, - VMXNET3_TX_MAXSEGSHIFT /* frag size */); + ifp->if_hw_tsomax = VMXNET3_TSO_MAXSIZE; #ifdef VMXNET3_LEGACY_TX ifp->if_start = vmxnet3_start; Modified: head/sys/dev/vmware/vmxnet3/if_vmxvar.h ============================================================================== --- head/sys/dev/vmware/vmxnet3/if_vmxvar.h Sat Sep 13 20:09:34 2014 (r271550) +++ head/sys/dev/vmware/vmxnet3/if_vmxvar.h Sat Sep 13 20:52:01 2014 (r271551) @@ -277,13 +277,14 @@ struct vmxnet3_softc { */ #define VMXNET3_TX_MAXSEGS 32 #define VMXNET3_TX_MAXSIZE (VMXNET3_TX_MAXSEGS * MCLBYTES) +#define VMXNET3_TSO_MAXSIZE \ + (VMXNET3_TX_MAXSIZE - sizeof(struct ether_vlan_header)) /* * Maximum support Tx segments size. The length field in the * Tx descriptor is 14 bits. */ -#define VMXNET3_TX_MAXSEGSHIFT 14 -#define VMXNET3_TX_MAXSEGSIZE (1 << VMXNET3_TX_MAXSEGSHIFT) +#define VMXNET3_TX_MAXSEGSIZE (1 << 14) /* * The maximum number of Rx segments we accept. When LRO is enabled, Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Sat Sep 13 20:09:34 2014 (r271550) +++ head/sys/dev/xen/netfront/netfront.c Sat Sep 13 20:52:01 2014 (r271551) @@ -134,6 +134,7 @@ static const int MODPARM_rx_flip = 0; * to mirror the Linux MAX_SKB_FRAGS constant. */ #define MAX_TX_REQ_FRAGS (65536 / PAGE_SIZE + 2) +#define NF_TSO_MAXBURST ((IP_MAXPACKET / PAGE_SIZE) * MCLBYTES) #define RX_COPY_THRESHOLD 256 @@ -2101,10 +2102,7 @@ create_netdev(device_t dev) ifp->if_hwassist = XN_CSUM_FEATURES; ifp->if_capabilities = IFCAP_HWCSUM; - ifp->if_hw_tsomax = IF_HW_TSOMAX_BUILD_VALUE( - 65535 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN) /* bytes */, - MAX_TX_REQ_FRAGS /* maximum frag count */, - PAGE_SHIFT /* PAGE_SIZE frag size */); + ifp->if_hw_tsomax = NF_TSO_MAXBURST; ether_ifattach(ifp, np->mac); callout_init(&np->xn_stat_ch, CALLOUT_MPSAFE); Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Sat Sep 13 20:09:34 2014 (r271550) +++ head/sys/net/if.c Sat Sep 13 20:52:01 2014 (r271551) @@ -423,52 +423,6 @@ if_grow(void) } /* - * Compute the least common value of two "if_hw_tsomax" values: - */ -u_int -if_hw_tsomax_common(u_int a, u_int b) -{ - u_int a_bytes = IF_HW_TSOMAX_GET_BYTES(a); - u_int a_frag_count = IF_HW_TSOMAX_GET_FRAG_COUNT(a); - u_int a_frag_size = IF_HW_TSOMAX_GET_FRAG_SIZE(a); - u_int b_bytes = IF_HW_TSOMAX_GET_BYTES(b); - u_int b_frag_count = IF_HW_TSOMAX_GET_FRAG_COUNT(b); - u_int b_frag_size = IF_HW_TSOMAX_GET_FRAG_SIZE(b); - - return (IF_HW_TSOMAX_BUILD_VALUE(min(a_bytes, b_bytes), - min(a_frag_count, b_frag_count), - min(a_frag_size, b_frag_size))); -} - -/* - * Range check the "if_hw_tsomax" value: - */ -u_int -if_hw_tsomax_range_check(u_int a) -{ - u_int a_bytes = IF_HW_TSOMAX_GET_BYTES(a); - u_int a_frag_count = IF_HW_TSOMAX_GET_FRAG_COUNT(a); - u_int a_frag_size = IF_HW_TSOMAX_GET_FRAG_SIZE(a); - - /* round down to nearest 4 bytes */ - a_bytes &= 0xFFFC; - - /* use default, if zero */ - if (a_bytes == 0) - a_bytes = IF_HW_TSOMAX_DEFAULT_BYTES; - - /* use default, if zero */ - if (a_frag_count == 0) - a_frag_count = IF_HW_TSOMAX_DEFAULT_FRAG_COUNT; - - /* use default, if zero */ - if (a_frag_size == 0) - a_frag_size = IF_HW_TSOMAX_DEFAULT_FRAG_SIZE; - - return (IF_HW_TSOMAX_BUILD_VALUE(a_bytes, a_frag_count, a_frag_size)); -} - -/* * Allocate a struct ifnet and an index for an interface. A layer 2 * common structure will also be allocated if an allocation routine is * registered for the passed type. @@ -491,7 +445,6 @@ if_alloc(u_char type) ifp->if_index = idx; ifp->if_type = type; ifp->if_alloctype = type; - ifp->if_hw_tsomax = IF_HW_TSOMAX_DEFAULT_VALUE(); if (if_com_alloc[type] != NULL) { ifp->if_l2com = if_com_alloc[type](type, ifp); if (ifp->if_l2com == NULL) { @@ -704,9 +657,16 @@ if_attach_internal(struct ifnet *ifp, in TAILQ_INSERT_HEAD(&ifp->if_addrhead, ifa, ifa_link); /* Reliably crash if used uninitialized. */ ifp->if_broadcastaddr = NULL; - /* range check TSO value */ - ifp->if_hw_tsomax = - if_hw_tsomax_range_check(ifp->if_hw_tsomax); + +#if defined(INET) || defined(INET6) + /* Initialize to max value. */ + if (ifp->if_hw_tsomax == 0) + ifp->if_hw_tsomax = min(IP_MAXPACKET, 32 * MCLBYTES - + (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN)); + KASSERT(ifp->if_hw_tsomax <= IP_MAXPACKET && + ifp->if_hw_tsomax >= IP_MAXPACKET / 8, + ("%s: tsomax outside of range", __func__)); +#endif } #ifdef VIMAGE else { Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Sat Sep 13 20:09:34 2014 (r271550) +++ head/sys/net/if_lagg.c Sat Sep 13 20:52:01 2014 (r271551) @@ -445,7 +445,11 @@ lagg_capabilities(struct lagg_softc *sc) struct lagg_port *lp; int cap = ~0, ena = ~0; u_long hwa = ~0UL; - u_int hw_tsomax = IF_HW_TSOMAX_DEFAULT_VALUE(); +#if defined(INET) || defined(INET6) + u_int hw_tsomax = IP_MAXPACKET; /* Initialize to the maximum value. */ +#else + u_int hw_tsomax = ~0; /* if_hw_tsomax is only for INET/INET6, but.. */ +#endif LAGG_WLOCK_ASSERT(sc); @@ -454,9 +458,10 @@ lagg_capabilities(struct lagg_softc *sc) cap &= lp->lp_ifp->if_capabilities; ena &= lp->lp_ifp->if_capenable; hwa &= lp->lp_ifp->if_hwassist; - /* Set to the common value of the lagg ports. */ - hw_tsomax = if_hw_tsomax_common(hw_tsomax, - lp->lp_ifp->if_hw_tsomax); + /* Set to the minimum value of the lagg ports. */ + if (lp->lp_ifp->if_hw_tsomax < hw_tsomax && + lp->lp_ifp->if_hw_tsomax > 0) + hw_tsomax = lp->lp_ifp->if_hw_tsomax; } cap = (cap == ~0 ? 0 : cap); ena = (ena == ~0 ? 0 : ena); Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Sat Sep 13 20:09:34 2014 (r271550) +++ head/sys/net/if_var.h Sat Sep 13 20:52:01 2014 (r271551) @@ -120,43 +120,6 @@ typedef int (*if_transmit_fn_t)(if_t, st typedef uint64_t (*if_get_counter_t)(if_t, ifnet_counter); /* - * Macros defining how to decode the "if_hw_tsomax" field: - */ -#define IF_HW_TSOMAX_GET_BYTES(x) \ - ((uint16_t)(x)) /* 32..65535 */ - -#define IF_HW_TSOMAX_GET_FRAG_COUNT(x) \ - ((uint8_t)((x) >> 16)) /* 1..255 */ - -#define IF_HW_TSOMAX_GET_FRAG_SIZE(x) \ - ((uint8_t)((x) >> 24)) /* 12..16 */ - -/* - * The following macro defines how to build the "if_hw_tsomax" - * field. The "bytes" field has unit 1 bytes and declares the maximum - * number of bytes which can be transferred by a single transmit - * offload, TSO, job. The "bytes" field is rounded down to the neares - * 4 bytes to avoid having the hardware do unaligned memory - * accesses. The "frag_count" field has unit 1 fragment and declares - * the maximum number of fragments a TSO job can contain. The - * "frag_size" field has unit logarithm in base 2 of the actual value - * in bytes and declares the maximum size of a fragment. - */ -#define IF_HW_TSOMAX_BUILD_VALUE(bytes, frag_count, frag_size) \ - (((bytes) & 0xFFFC) | (((frag_count) & 0xFF) << 16) | \ - (((frag_size) & 0xFF) << 24)) - -#define IF_HW_TSOMAX_DEFAULT_BYTES (65536 - 4) -#define IF_HW_TSOMAX_DEFAULT_FRAG_COUNT 255 -#define IF_HW_TSOMAX_DEFAULT_FRAG_SIZE 16 - -#define IF_HW_TSOMAX_DEFAULT_VALUE() \ - IF_HW_TSOMAX_BUILD_VALUE( \ - IF_HW_TSOMAX_DEFAULT_BYTES, \ - IF_HW_TSOMAX_DEFAULT_FRAG_COUNT, \ - IF_HW_TSOMAX_DEFAULT_FRAG_SIZE) - -/* * Structure defining a network interface. * * Size ILP32: 592 (approx) @@ -259,7 +222,8 @@ struct ifnet { if_get_counter_t if_get_counter; /* get counter values */ /* Stuff that's only temporary and doesn't belong here. */ - u_int if_hw_tsomax; /* TSO burst length limits. + u_int if_hw_tsomax; /* tso burst length limit, the minimum + * is (IP_MAXPACKET / 8). * XXXAO: Have to find a better place * for it eventually. */ /* @@ -644,10 +608,6 @@ void if_setioctlfn(if_t ifp, int (*)(if_ void if_setstartfn(if_t ifp, void (*)(if_t)); void if_settransmitfn(if_t ifp, if_transmit_fn_t); void if_setqflushfn(if_t ifp, if_qflush_fn_t); - -/* "if_hw_tsomax" related functions */ -u_int if_hw_tsomax_common(u_int, u_int); -u_int if_hw_tsomax_range_check(u_int); /* Revisit the below. These are inline functions originally */ int drbr_inuse_drv(if_t ifp, struct buf_ring *br); Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Sat Sep 13 20:09:34 2014 (r271550) +++ head/sys/net/if_vlan.c Sat Sep 13 20:52:01 2014 (r271551) @@ -1557,8 +1557,8 @@ vlan_capabilities(struct ifvlan *ifv) * propagate the hardware-assisted flag. TSO on VLANs * does not necessarily require hardware VLAN tagging. */ - ifp->if_hw_tsomax = if_hw_tsomax_common(ifp->if_hw_tsomax, - p->if_hw_tsomax); + if (p->if_hw_tsomax > 0) + ifp->if_hw_tsomax = p->if_hw_tsomax; if (p->if_capabilities & IFCAP_VLAN_HWTSO) ifp->if_capabilities |= p->if_capabilities & IFCAP_TSO; if (p->if_capenable & IFCAP_VLAN_HWTSO) { Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Sat Sep 13 20:09:34 2014 (r271550) +++ head/sys/netinet/tcp_output.c Sat Sep 13 20:52:01 2014 (r271551) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -768,88 +767,18 @@ send: flags &= ~TH_FIN; if (tso) { - u_int if_hw_tsomax_bytes; - u_int if_hw_tsomax_frag_count; - u_int if_hw_tsomax_frag_size; - struct mbuf *mb; - u_int moff; - int max_len; - - /* extract TSO information */ - if_hw_tsomax_bytes = - IF_HW_TSOMAX_GET_BYTES(tp->t_tsomax); - if_hw_tsomax_frag_count = - IF_HW_TSOMAX_GET_FRAG_COUNT(tp->t_tsomax); - if_hw_tsomax_frag_size = - IF_HW_TSOMAX_GET_FRAG_SIZE(tp->t_tsomax); - - /* compute maximum TSO length */ - max_len = (if_hw_tsomax_bytes - hdrlen); - - /* clamp maximum length value */ - if (max_len > IP_MAXPACKET) - max_len = IP_MAXPACKET; - else if (max_len < 0) - max_len = 0; - - /* get smallest length */ - if (len > (u_int)max_len) { - if (max_len != 0) - sendalot = 1; - len = (u_int)max_len; - } - KASSERT(ipoptlen == 0, ("%s: TSO can't do IP options", __func__)); - max_len = 0; - mb = sbsndptr(&so->so_snd, off, len, &moff); - - /* now make sure the number of fragments fit too */ - while (mb != NULL && (u_int)max_len < len) { - u_int cur_length; - u_int cur_frags; - - /* - * Get length of mbuf fragment and how - * many hardware frags, rounded up, it - * would use: - */ - cur_length = (mb->m_len - moff); - cur_frags = (cur_length + - (1 << if_hw_tsomax_frag_size) - 1) >> - if_hw_tsomax_frag_size; - - /* Handle special case: Zero Length Mbuf */ - if (cur_frags == 0) - cur_frags = 1; - - /* - * Check if the fragment limit will be - * reached or exceeded: - */ - if (cur_frags >= if_hw_tsomax_frag_count) { - max_len += min(cur_length, - if_hw_tsomax_frag_count << - if_hw_tsomax_frag_size); - break; - } - max_len += cur_length; - if_hw_tsomax_frag_count -= cur_frags; - moff = 0; - mb = mb->m_next; - } - /* * Limit a burst to t_tsomax minus IP, * TCP and options length to keep ip->ip_len * from overflowing or exceeding the maximum * length allowed by the network interface. */ - if (len > (u_int)max_len) { - if (max_len != 0) - sendalot = 1; - len = (u_int)max_len; + if (len > tp->t_tsomax - hdrlen) { + len = tp->t_tsomax - hdrlen; + sendalot = 1; } /* Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Sat Sep 13 20:09:34 2014 (r271550) +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Sat Sep 13 20:52:01 2014 (r271551) @@ -673,12 +673,6 @@ int mlx4_en_do_start_port(struct net_dev else priv->rx_csum = 0; - /* set TSO limits so that we don't have to drop TX packets */ - dev->if_hw_tsomax = IF_HW_TSOMAX_BUILD_VALUE( - 65535 - sizeof(struct ether_vlan_header) /* bytes */, - 16 /* maximum frag count */, - 16 /* can do up to 4GByte */); - err = mlx4_wol_read(priv->mdev->dev, &config, priv->port); if (err) { en_err(priv, "Failed to get WoL info, unable to modify\n"); From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 20:54:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 441CD1F2; Sat, 13 Sep 2014 20:54:11 +0000 (UTC) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id B6A5F960; Sat, 13 Sep 2014 20:54:10 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqIEAK+tFFSDaFve/2dsb2JhbABfhDuCeMpngyEBgR54hAQBAQQjBFIbGAICDRIHAlkGiFGnD5UiAReBLI1KIzQHgniBUwWyR4IbgV8hgTZBgQIBAQE X-IronPort-AV: E=Sophos;i="5.04,518,1406606400"; d="scan'208";a="153896753" Received: from muskoka.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.222]) by esa-jnhn.mail.uoguelph.ca with ESMTP; 13 Sep 2014 16:54:09 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id E9CB0B4221; Sat, 13 Sep 2014 16:54:08 -0400 (EDT) Date: Sat, 13 Sep 2014 16:54:08 -0400 (EDT) From: Rick Macklem To: Hans Petter Selasky Message-ID: <1935263641.35880661.1410641648947.JavaMail.root@uoguelph.ca> In-Reply-To: <5414AB58.6040400@selasky.org> Subject: Re: svn commit: r271504 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront net netinet ofed/drivers/net/mlx4 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.201] X-Mailer: Zimbra 7.2.6_GA_2926 (ZimbraWebClient - FF3.0 (Win)/7.2.6_GA_2926) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Adrian Chadd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 20:54:11 -0000 Hans Petter Selasky wrote: > On 09/13/14 22:35, Hans Petter Selasky wrote: > > > > I see the default set to (65536 - 4). I don't know why you > > subtracted 4 > > but I would have expected the max ethernet header length to be > > subtracted > > here? > > You mean to say that the default should be > > 65535 - ethernet header - vlan header ? > Almost. It is actually: 65536 - ethernet header - vlan header (or the min of IP_MAXPACKET vs 32*MCLBYTES - ethernet header - vlan header if you want to cover your butt for the case where the value of MCLBYTES is changed) IP_MAXPACKET (65535) comes from the fact that some devices use the iplen field of the ip header in the TSO segment for its length, I think? (Some do not and can support TSO segments greater than IP_MAXPACKET in length, but again, the default shouldn't assume this nor should it assume the device does the vlan header in hardware --> "- vlan header" to be safe for default.) This is because there are lots of broken drivers (basically any one that has a limit of 32 transmit segments) and this at least makes them work correctly. Unfortunately they still do a lot of m_defrag() calls for this case, but with a patch like yours, the drivers may eventually get patched to use the max_frags setting and then avoid the need to do m_defrag() calls. rick > --HPS > > From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 20:57:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16C3E344; Sat, 13 Sep 2014 20:57:10 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6CF7972; Sat, 13 Sep 2014 20:57:09 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 15E441FE027; Sat, 13 Sep 2014 22:57:07 +0200 (CEST) Message-ID: <5414AF97.50509@selasky.org> Date: Sat, 13 Sep 2014 22:56:55 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Rick Macklem Subject: Re: svn commit: r271504 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront net netinet ofed/drivers/net/mlx4 References: <1935263641.35880661.1410641648947.JavaMail.root@uoguelph.ca> In-Reply-To: <1935263641.35880661.1410641648947.JavaMail.root@uoguelph.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Adrian Chadd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 20:57:10 -0000 On 09/13/14 22:54, Rick Macklem wrote: > Hans Petter Selasky wrote: >> On 09/13/14 22:35, Hans Petter Selasky wrote: >>> >>> I see the default set to (65536 - 4). I don't know why you >>> subtracted 4 >>> but I would have expected the max ethernet header length to be >>> subtracted >>> here? >> >> You mean to say that the default should be >> >> 65535 - ethernet header - vlan header ? >> > Almost. It is actually: > 65536 - ethernet header - vlan header > (or the min of IP_MAXPACKET vs 32*MCLBYTES - ethernet header - vlan header > if you want to cover your butt for the case where the value of > MCLBYTES is changed) IP_MAXPACKET (65535) comes from the fact that > some devices use the iplen field of the ip header in the TSO segment > for its length, I think? (Some do not and can support TSO segments > greater than IP_MAXPACKET in length, but again, the default shouldn't > assume this nor should it assume the device does the vlan header in > hardware --> "- vlan header" to be safe for default.) > > This is because there are lots of broken drivers (basically any one > that has a limit of 32 transmit segments) and this at least makes > them work correctly. Unfortunately they still do a lot of m_defrag() > calls for this case, but with a patch like yours, the drivers may > eventually get patched to use the max_frags setting and then avoid > the need to do m_defrag() calls. > > rick Hi Rick, Thanks for shedding light into existing practices. --HPS From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 21:45:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29C68524; Sat, 13 Sep 2014 21:45:45 +0000 (UTC) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 91F0DD6F; Sat, 13 Sep 2014 21:45:43 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqIEAG+6FFSDaFve/2dsb2JhbABfhDuCeMppgyEBgR54hAQBAQQjBFIbGBESBwIEVQaIUacQlR0BF452IxkWBQeCeIFTBZNVnnKCG4FfIYE2QYECAQEB X-IronPort-AV: E=Sophos;i="5.04,519,1406606400"; d="scan'208";a="153901264" Received: from muskoka.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.222]) by esa-jnhn.mail.uoguelph.ca with ESMTP; 13 Sep 2014 17:45:42 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id AFC58B4032; Sat, 13 Sep 2014 17:45:42 -0400 (EDT) Date: Sat, 13 Sep 2014 17:45:42 -0400 (EDT) From: Rick Macklem To: Hans Petter Selasky Message-ID: <597691144.35887030.1410644742707.JavaMail.root@uoguelph.ca> In-Reply-To: <54149FC4.7020307@selasky.org> Subject: Re: svn commit: r271504 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront net netinet ofed/drivers/net/mlx4 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_35887028_143598570.1410644742704" X-Originating-IP: [172.17.91.203] X-Mailer: Zimbra 7.2.6_GA_2926 (ZimbraWebClient - FF3.0 (Win)/7.2.6_GA_2926) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Adrian Chadd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 21:45:45 -0000 ------=_Part_35887028_143598570.1410644742704 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hans Petter Selasky wrote: > On 09/13/14 18:54, Adrian Chadd wrote: > > Hi, > > > > Just for the record: > > > > * I'm glad you're tackling the TSO config stuff; > > * I'm not glad you're trying to pack it into a u_int rather than > > creating a new structure and adding fields for it. > > > > I appreciate that you're trying to rush this in before 10.1, but > > this > > is exactly why things shouldn't be rushed in before release > > deadlines. > > :) > > > > I'd really like to see this be broken out as a structure and the > > bit > > shifting games for what really shouldn't be packed into a u_int > > fixed. > > Otherwise this is going to be deadweight that has to persist past > > 11.0. > > > > Hi Adrian, > > I can make that change for -current, making the new structure and > such. > This change was intended for 10 where there is only one u_int for > this > information. Or do you want me to change that in 10 too? > > --HPS > > > Btw, your patch calls sbsndptr() in tcp_output(), which advances sb_sndptroff and sb_sndptr by the length. Then it loops around and reduces the length for the case where there are too many mbufs in the chain. I don't know this algorithm well enough to know if advancing sb_sndptroff and sb_sndptr by too much for this case will cause a problem? I avoided the question by implementing sbsndmbuf() that was cloned from sbsndptr() to avoid this when I did my draft patch. It is in the attached patch, in case it is useful. (It avoids updating sb_sndptroff and sb_sndptr.) rick ------=_Part_35887028_143598570.1410644742704 Content-Type: text/x-patch; name=tsomaxseg.patch Content-Disposition: attachment; filename=tsomaxseg.patch Content-Transfer-Encoding: base64 LS0tIGtlcm4vdWlwY19zb2NrYnVmLmMuc2F2CTIwMTQtMDEtMzAgMjA6Mjc6MTcuMDAwMDAwMDAw IC0wNTAwCisrKyBrZXJuL3VpcGNfc29ja2J1Zi5jCTIwMTQtMDEtMzAgMjI6MTI6MDguMDAwMDAw MDAwIC0wNTAwCkBAIC05NjUsNiArOTY1LDM5IEBAIHNic25kcHRyKHN0cnVjdCBzb2NrYnVmICpz YiwgdV9pbnQgb2ZmLCAKIH0KIAogLyoKKyAqIFJldHVybiB0aGUgZmlyc3QgbWJ1ZiBmb3IgdGhl IHByb3ZpZGVkIG9mZnNldC4KKyAqLworc3RydWN0IG1idWYgKgorc2JzbmRtYnVmKHN0cnVjdCBz b2NrYnVmICpzYiwgdV9pbnQgb2ZmLCBsb25nICpmaXJzdF9sZW4pCit7CisJc3RydWN0IG1idWYg Km07CisKKwlLQVNTRVJUKHNiLT5zYl9tYiAhPSBOVUxMLCAoIiVzOiBzYl9tYiBpcyBOVUxMIiwg X19mdW5jX18pKTsKKworCSpmaXJzdF9sZW4gPSAwOworCS8qCisJICogSXMgb2ZmIGJlbG93IHN0 b3JlZCBvZmZzZXQ/IEhhcHBlbnMgb24gcmV0cmFuc21pdHMuCisJICogSWYgc28sIGp1c3QgdXNl IHNiX21iLgorCSAqLworCWlmIChzYi0+c2Jfc25kcHRyID09IE5VTEwgfHwgc2ItPnNiX3NuZHB0 cm9mZiA+IG9mZikKKwkJbSA9IHNiLT5zYl9tYjsKKwllbHNlIHsKKwkJbSA9IHNiLT5zYl9zbmRw dHI7CisJCW9mZiAtPSBzYi0+c2Jfc25kcHRyb2ZmOworCX0KKwl3aGlsZSAob2ZmID4gMCAmJiBt ICE9IE5VTEwpIHsKKwkJaWYgKG9mZiA8IG0tPm1fbGVuKQorCQkJYnJlYWs7CisJCW9mZiAtPSBt LT5tX2xlbjsKKwkJbSA9IG0tPm1fbmV4dDsKKwl9CisJaWYgKG0gIT0gTlVMTCkKKwkJKmZpcnN0 X2xlbiA9IG0tPm1fbGVuIC0gb2ZmOworCisJcmV0dXJuIChtKTsKK30KKworLyoKICAqIERyb3Ag YSByZWNvcmQgb2ZmIHRoZSBmcm9udCBvZiBhIHNvY2tidWYgYW5kIG1vdmUgdGhlIG5leHQgcmVj b3JkIHRvIHRoZQogICogZnJvbnQuCiAgKi8KLS0tIHN5cy9zb2NrYnVmLmguc2F2CTIwMTQtMDEt MzAgMjA6NDI6MjguMDAwMDAwMDAwIC0wNTAwCisrKyBzeXMvc29ja2J1Zi5oCTIwMTQtMDEtMzAg MjI6MDg6NDMuMDAwMDAwMDAwIC0wNTAwCkBAIC0xNTMsNiArMTUzLDggQEAgaW50CXNicmVzZXJ2 ZV9sb2NrZWQoc3RydWN0IHNvY2tidWYgKnNiLAogCSAgICBzdHJ1Y3QgdGhyZWFkICp0ZCk7CiBz dHJ1Y3QgbWJ1ZiAqCiAJc2JzbmRwdHIoc3RydWN0IHNvY2tidWYgKnNiLCB1X2ludCBvZmYsIHVf aW50IGxlbiwgdV9pbnQgKm1vZmYpOworc3RydWN0IG1idWYgKgorCXNic25kbWJ1ZihzdHJ1Y3Qg c29ja2J1ZiAqc2IsIHVfaW50IG9mZiwgbG9uZyAqZmlyc3RfbGVuKTsKIHZvaWQJc2J0b3hzb2Nr YnVmKHN0cnVjdCBzb2NrYnVmICpzYiwgc3RydWN0IHhzb2NrYnVmICp4c2IpOwogaW50CXNid2Fp dChzdHJ1Y3Qgc29ja2J1ZiAqc2IpOwogaW50CXNibG9jayhzdHJ1Y3Qgc29ja2J1ZiAqc2IsIGlu dCBmbGFncyk7Ci0tLSBuZXRpbmV0L3RjcF9pbnB1dC5jLnNhdgkyMDE0LTAxLTMwIDE5OjM3OjUy LjAwMDAwMDAwMCAtMDUwMAorKysgbmV0aW5ldC90Y3BfaW5wdXQuYwkyMDE0LTAxLTMwIDE5OjM5 OjA3LjAwMDAwMDAwMCAtMDUwMApAQCAtMzYyNyw2ICszNjI3LDcgQEAgdGNwX21zcyhzdHJ1Y3Qg dGNwY2IgKnRwLCBpbnQgb2ZmZXIpCiAJaWYgKGNhcC5pZmNhcCAmIENTVU1fVFNPKSB7CiAJCXRw LT50X2ZsYWdzIHw9IFRGX1RTTzsKIAkJdHAtPnRfdHNvbWF4ID0gY2FwLnRzb21heDsKKwkJdHAt PnRfdHNvbWF4c2VncyA9IGNhcC50c29tYXhzZWdzOwogCX0KIH0KIAotLS0gbmV0aW5ldC90Y3Bf b3V0cHV0LmMuc2F2CTIwMTQtMDEtMzAgMTg6NTU6MTUuMDAwMDAwMDAwIC0wNTAwCisrKyBuZXRp bmV0L3RjcF9vdXRwdXQuYwkyMDE0LTAxLTMwIDIyOjE4OjU2LjAwMDAwMDAwMCAtMDUwMApAQCAt MTY2LDggKzE2Niw4IEBAIGludAogdGNwX291dHB1dChzdHJ1Y3QgdGNwY2IgKnRwKQogewogCXN0 cnVjdCBzb2NrZXQgKnNvID0gdHAtPnRfaW5wY2ItPmlucF9zb2NrZXQ7Ci0JbG9uZyBsZW4sIHJl Y3dpbiwgc2VuZHdpbjsKLQlpbnQgb2ZmLCBmbGFncywgZXJyb3IgPSAwOwkvKiBLZWVwIGNvbXBp bGVyIGhhcHB5ICovCisJbG9uZyBsZW4sIHJlY3dpbiwgc2VuZHdpbiwgdHNvX3RsZW47CisJaW50 IGNudCwgb2ZmLCBmbGFncywgZXJyb3IgPSAwOwkvKiBLZWVwIGNvbXBpbGVyIGhhcHB5ICovCiAJ c3RydWN0IG1idWYgKm07CiAJc3RydWN0IGlwICppcCA9IE5VTEw7CiAJc3RydWN0IGlwb3ZseSAq aXBvdiA9IE5VTEw7CkBAIC03ODAsNiArNzgwLDI0IEBAIHNlbmQ6CiAJCQl9CiAKIAkJCS8qCisJ CQkgKiBMaW1pdCB0aGUgbnVtYmVyIG9mIFRTTyB0cmFuc21pdCBzZWdtZW50cyAobWJ1ZnMKKwkJ CSAqIGluIG1idWYgbGlzdCkgdG8gdHAtPnRfdHNvbWF4c2Vncy4KKwkJCSAqLworCQkJY250ID0g MDsKKwkJCW0gPSBzYnNuZG1idWYoJnNvLT5zb19zbmQsIG9mZiwgJnRzb190bGVuKTsKKwkJCXdo aWxlIChtICE9IE5VTEwgJiYgY250IDwgdHAtPnRfdHNvbWF4c2VncyAmJgorCQkJICAgIHRzb190 bGVuIDwgbGVuKSB7CisJCQkJaWYgKGNudCA+IDApCisJCQkJCXRzb190bGVuICs9IG0tPm1fbGVu OworCQkJCWNudCsrOworCQkJCW0gPSBtLT5tX25leHQ7CisJCQl9CisJCQlpZiAobSAhPSBOVUxM ICYmIHRzb190bGVuIDwgbGVuKSB7CisJCQkJbGVuID0gdHNvX3RsZW47CisJCQkJc2VuZGFsb3Qg PSAxOworCQkJfQorCisJCQkvKgogCQkJICogUHJldmVudCB0aGUgbGFzdCBzZWdtZW50IGZyb20g YmVpbmcKIAkJCSAqIGZyYWN0aW9uYWwgdW5sZXNzIHRoZSBzZW5kIHNvY2tidWYgY2FuCiAJCQkg KiBiZSBlbXB0aWVkLgotLS0gbmV0aW5ldC90Y3Bfc3Vici5jLnNhdgkyMDE0LTAxLTMwIDE5OjQ0 OjM1LjAwMDAwMDAwMCAtMDUwMAorKysgbmV0aW5ldC90Y3Bfc3Vici5jCTIwMTQtMDEtMzAgMjA6 NTY6MTIuMDAwMDAwMDAwIC0wNTAwCkBAIC0xODAwLDYgKzE4MDAsMTIgQEAgdGNwX21heG10dShz dHJ1Y3QgaW5fY29ubmluZm8gKmluYywgc3RydQogCQkJICAgIGlmcC0+aWZfaHdhc3Npc3QgJiBD U1VNX1RTTykKIAkJCQljYXAtPmlmY2FwIHw9IENTVU1fVFNPOwogCQkJCWNhcC0+dHNvbWF4ID0g aWZwLT5pZl9od190c29tYXg7CisjaWZkZWYgbm90eWV0CisJCQkJY2FwLT50c29tYXhzZWdzID0g aWZwLT5pZl9od190c29tYXhzZWdzOworI2VuZGlmCisJCQkJaWYgKGNhcC0+dHNvbWF4c2VncyA9 PSAwKQorCQkJCQljYXAtPnRzb21heHNlZ3MgPQorCQkJCQkgICAgVENQVFNPX01BWF9UWF9TRUdT X0RFRkFVTFQ7CiAJCX0KIAkJUlRGUkVFKHNyby5yb19ydCk7CiAJfQotLS0gbmV0aW5ldC90Y3Bf dmFyLmguc2F2CTIwMTQtMDEtMzAgMTk6Mzk6MjIuMDAwMDAwMDAwIC0wNTAwCisrKyBuZXRpbmV0 L3RjcF92YXIuaAkyMDE0LTAxLTMwIDIwOjUyOjU3LjAwMDAwMDAwMCAtMDUwMApAQCAtMjA5LDYg KzIwOSw3IEBAIHN0cnVjdCB0Y3BjYiB7CiAJdV9pbnQJdF9rZWVwY250OwkJLyogbnVtYmVyIG9m IGtlZXBhbGl2ZXMgYmVmb3JlIGNsb3NlICovCiAKIAl1X2ludAl0X3Rzb21heDsJCS8qIHRzbyBi dXJzdCBsZW5ndGggbGltaXQgKi8KKwl1X2ludAl0X3Rzb21heHNlZ3M7CQkvKiB0c28gYnVyc3Qg c2VnbWVudCBsaW1pdCAqLwogCiAJdWludDMyX3QgdF9pc3BhcmVbOF07CQkvKiA1IFVUTywgMyBU QkQgKi8KIAl2b2lkCSp0X3BzcGFyZTJbNF07CQkvKiA0IFRCRCAqLwpAQCAtMjY4LDYgKzI2OSwx MSBAQCBzdHJ1Y3QgdGNwY2IgewogI2RlZmluZQlUQ1BPT0JfSEFWRURBVEEJMHgwMQogI2RlZmlu ZQlUQ1BPT0JfSEFEREFUQQkweDAyCiAKKy8qCisgKiBEZWZhdWx0IHZhbHVlIGZvciBUU08gbWF4 aW11bSBudW1iZXIgb2YgdHJhbnNtaXQgc2VnbWVudHMgKGNvdW50IG9mIG1idWZzKS4KKyAqLwor I2RlZmluZQlUQ1BUU09fTUFYX1RYX1NFR1NfREVGQVVMVAkzMAorCiAjaWZkZWYgVENQX1NJR05B VFVSRQogLyoKICAqIERlZmluZXMgd2hpY2ggYXJlIG5lZWRlZCBieSB0aGUgeGZvcm1fdGNwIG1v ZHVsZSBhbmQgdGNwX1tpbnxvdXRdcHV0CkBAIC0zMzMsNiArMzM5LDcgQEAgc3RydWN0IGhjX21l dHJpY3NfbGl0ZSB7CS8qIG11c3Qgc3RheSBpbgogc3RydWN0IHRjcF9pZmNhcCB7CiAJaW50CWlm Y2FwOwogCXVfaW50CXRzb21heDsKKwl1X2ludAl0c29tYXhzZWdzOwogfTsKIAogI2lmbmRlZiBf TkVUSU5FVF9JTl9QQ0JfSF8K ------=_Part_35887028_143598570.1410644742704-- From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 22:03:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89DF4A4A; Sat, 13 Sep 2014 22:03: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 748EBEEA; Sat, 13 Sep 2014 22:03: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 s8DM3qlV079699; Sat, 13 Sep 2014 22:03:52 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DM3qjX079698; Sat, 13 Sep 2014 22:03:52 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201409132203.s8DM3qjX079698@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sat, 13 Sep 2014 22:03:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271552 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 22:03:52 -0000 Author: nwhitehorn Date: Sat Sep 13 22:03:51 2014 New Revision: 271552 URL: http://svnweb.freebsd.org/changeset/base/271552 Log: Make the default choice for the chroot shell at the end be "No". This allows just pressing enter repeatedly to successfully install a reasonable system. Modified: head/usr.sbin/bsdinstall/scripts/auto Modified: head/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- head/usr.sbin/bsdinstall/scripts/auto Sat Sep 13 20:52:01 2014 (r271551) +++ head/usr.sbin/bsdinstall/scripts/auto Sat Sep 13 22:03:51 2014 (r271552) @@ -252,7 +252,8 @@ if [ ! -z "$BSDINSTALL_FETCHDEST" ]; the fi dialog --backtitle "FreeBSD Installer" --title "Manual Configuration" \ - --yesno "The installation is now finished. Before exiting the installer, would you like to open a shell in the new system to make any final manual modifications?" 0 0 + --default-button no --yesno \ + "The installation is now finished. Before exiting the installer, would you like to open a shell in the new system to make any final manual modifications?" 0 0 if [ $? -eq 0 ]; then clear mount -t devfs devfs "$BSDINSTALL_CHROOT/dev" From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 22:10:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D498DEE8; Sat, 13 Sep 2014 22:10:21 +0000 (UTC) Date: Sat, 13 Sep 2014 18:10:18 -0400 From: Glen Barber To: Nathan Whitehorn Subject: Re: svn commit: r271552 - head/usr.sbin/bsdinstall/scripts Message-ID: <20140913221018.GD1198@hub.FreeBSD.org> References: <201409132203.s8DM3qjX079698@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9XMFo0eNrVFj6oBf" Content-Disposition: inline In-Reply-To: <201409132203.s8DM3qjX079698@svn.freebsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 22:10:22 -0000 --9XMFo0eNrVFj6oBf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 13, 2014 at 10:03:52PM +0000, Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Sat Sep 13 22:03:51 2014 > New Revision: 271552 > URL: http://svnweb.freebsd.org/changeset/base/271552 >=20 > Log: > Make the default choice for the chroot shell at the end be "No". This a= llows > just pressing enter repeatedly to successfully install a reasonable sys= tem. >=20 Thank you! Glen --9XMFo0eNrVFj6oBf Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJUFMDKAAoJELls3eqvi17QaFAP+wdKxzgecxYL8D3S8Ri0BQ9T WaeeC36SdFeVtpAy0BXfXJsw28wvvdVgTl3Akv0fjkEJFRyTSHkWReOa/eiWrnMd Mlgigq9tXOsYqfkFWOIfUKh7yrov9xbt7ifO39Q2YbVCkPTo1DxwmhDhk+fsHIP/ C2vfz79+RNQrrpT9cQbPdy2B+cOnjGjfiTlJp2/cm5GRiL6tnz025hIK9a5YdCOl 9ZTgKCzuqXin/YXngUMaKF53nmEK2vB/uRX0pJ9Mp5yNBGa+1tMhOMunN/Qbu5St D2xrpc3Fl5U/pVrz77cWQ1K3uJIH8+dTJPfRSXNnW1TfS2d0P0+kOu2XdBWJqnr0 dXdTEb1lK8mJ2PVQyd8Vi06+tgroTq9Gkf6Vb6OLslSyYLn9Qq//FTK3gBPlJGT+ Tye1S6EBlf/H/wJFVShtNvCHlAOlAvISxrz4CWJX0TLDAQc9iSMn1NVPOZJ3Hn+c q+Df027I0P8NnazEEISIPvj/sLmVR/GjSIu9PDN1ukvxAAZ8MryehCPcDMsRQRHS qECQl5b2GUaoNDQKle7hmIVnYb0KQ1mAuxY6VS9ydRa6wNDkykkRsOLuCUr3VcGD zz1zykxo5dMkgu3DKqw53bWcMJM+KpnCNNEIJup7ac618dW3rqUC2Na5SpOGCiLv Wzv2EdmHSqMqy8SXZcZe =ISLn -----END PGP SIGNATURE----- --9XMFo0eNrVFj6oBf-- From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 22:14:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 77B59B2; Sat, 13 Sep 2014 22:14: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 62AABFC0; Sat, 13 Sep 2014 22:14:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DMEKJL084662; Sat, 13 Sep 2014 22:14:20 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DMEKhf084661; Sat, 13 Sep 2014 22:14:20 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201409132214.s8DMEKhf084661@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sat, 13 Sep 2014 22:14:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271553 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 22:14:20 -0000 Author: nwhitehorn Date: Sat Sep 13 22:14:19 2014 New Revision: 271553 URL: http://svnweb.freebsd.org/changeset/base/271553 Log: Rename the choices in the partitioning methods dialog to reflect current reality. In particular, draw a connection between the auto ZFS script and the auto UFS one, since they fulfill similar functions. I'm not sure the auto ZFS code is actually experimental anymore, so it might be worth changing that label still. Modified: head/usr.sbin/bsdinstall/scripts/auto Modified: head/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- head/usr.sbin/bsdinstall/scripts/auto Sat Sep 13 22:03:51 2014 (r271552) +++ head/usr.sbin/bsdinstall/scripts/auto Sat Sep 13 22:14:19 2014 (r271553) @@ -107,14 +107,14 @@ rm -f $PATH_FSTAB touch $PATH_FSTAB PMODES="\ -Guided \"Partitioning Tool (Recommended for Beginners)\" \ -Manual \"Manually Configure Partitions (Expert)\" \ +\"Auto (UFS)\" \"Guided Disk Setup\" \ +Manual \"Manual Disk Setup (experts)\" \ Shell \"Open a shell and partition by hand\"" CURARCH=$( uname -m ) case $CURARCH in amd64|i386) # Booting ZFS Supported - PMODES="$PMODES ZFS \"Automatic Root-on-ZFS (Experimental)\"" + PMODES="$PMODES \"Auto (ZFS)\" \"Guided Root-on-ZFS (Experimental)\"" ;; *) # Booting ZFS Unspported ;; @@ -128,7 +128,7 @@ PARTMODE=`echo $PMODES | xargs dialog -- exec 3>&- case "$PARTMODE" in -"Guided") # Guided +"Auto (UFS)") # Guided bsdinstall autopart || error "Partitioning error" bsdinstall mount || error "Failed to mount filesystem" ;; @@ -146,7 +146,7 @@ case "$PARTMODE" in fi bsdinstall mount || error "Failed to mount filesystem" ;; -"ZFS") # ZFS +"Auto (ZFS)") # ZFS bsdinstall zfsboot || error "ZFS setup failed" bsdinstall mount || error "Failed to mount filesystem" ;; From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 22:30:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 605AE3BE; Sat, 13 Sep 2014 22:30: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 46E7510F; Sat, 13 Sep 2014 22:30: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 s8DMU6qx090186; Sat, 13 Sep 2014 22:30:06 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DMU5Nt090175; Sat, 13 Sep 2014 22:30:05 GMT (envelope-from np@FreeBSD.org) Message-Id: <201409132230.s8DMU5Nt090175@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 13 Sep 2014 22:30:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r271555 - in stable/8: share/man/man4 sys/conf sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/firmware sys/modules/cxgbe sys/modules/cxgbe/firmware sys/modules/cxgbe/t4_firmware sys/m... X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 22:30:06 -0000 Author: np Date: Sat Sep 13 22:30:04 2014 New Revision: 271555 URL: http://svnweb.freebsd.org/changeset/base/271555 Log: cxgbe(4): backport Chelsio T5 support from the 9-STABLE branch. This is a direct commit to get the base 40GbE/10GbE T5 driver to 8-STABLE. There were too many changes between 8 and 9 (t4_tom, iw_cxgbe, etc.) and MFC'ing everything and then ripping out stuff selectively would have been too much trouble. Tested with "make -DMAKE_JUST_KERNELS universe". Added: stable/8/sys/dev/cxgbe/firmware/t4fw-1.11.27.0.bin.uu (contents, props changed) stable/8/sys/dev/cxgbe/firmware/t5fw-1.11.27.0.bin.uu (contents, props changed) stable/8/sys/dev/cxgbe/firmware/t5fw_cfg.txt (contents, props changed) stable/8/sys/dev/cxgbe/firmware/t5fw_cfg_fpga.txt (contents, props changed) stable/8/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt (contents, props changed) stable/8/sys/modules/cxgbe/t4_firmware/ stable/8/sys/modules/cxgbe/t4_firmware/Makefile (contents, props changed) stable/8/sys/modules/cxgbe/t5_firmware/ stable/8/sys/modules/cxgbe/t5_firmware/Makefile (contents, props changed) Deleted: stable/8/sys/dev/cxgbe/firmware/t4fw-1.8.4.0.bin.uu stable/8/sys/modules/cxgbe/firmware/ Modified: stable/8/share/man/man4/cxgbe.4 stable/8/sys/conf/files stable/8/sys/dev/cxgbe/adapter.h stable/8/sys/dev/cxgbe/common/common.h stable/8/sys/dev/cxgbe/common/t4_hw.c stable/8/sys/dev/cxgbe/common/t4_hw.h stable/8/sys/dev/cxgbe/common/t4_msg.h stable/8/sys/dev/cxgbe/common/t4_regs.h stable/8/sys/dev/cxgbe/common/t4_regs_values.h stable/8/sys/dev/cxgbe/firmware/t4fw_cfg.txt stable/8/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt stable/8/sys/dev/cxgbe/firmware/t4fw_interface.h stable/8/sys/dev/cxgbe/offload.h stable/8/sys/dev/cxgbe/osdep.h stable/8/sys/dev/cxgbe/t4_ioctl.h stable/8/sys/dev/cxgbe/t4_main.c stable/8/sys/dev/cxgbe/t4_sge.c stable/8/sys/modules/cxgbe/Makefile Modified: stable/8/share/man/man4/cxgbe.4 ============================================================================== --- stable/8/share/man/man4/cxgbe.4 Sat Sep 13 22:16:40 2014 (r271554) +++ stable/8/share/man/man4/cxgbe.4 Sat Sep 13 22:30:04 2014 (r271555) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2011-2012, Chelsio Inc +.\" Copyright (c) 2011-2014, Chelsio Inc .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -31,12 +31,12 @@ .\" .\" $FreeBSD$ .\" -.Dd February 25, 2012 +.Dd March 20, 2014 .Dt CXGBE 4 .Os .Sh NAME .Nm cxgbe -.Nd "Chelsio T4 10Gb and 1Gb Ethernet adapter driver" +.Nd "Chelsio T4 and T5 based 40Gb, 10Gb, and 1Gb Ethernet adapter driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -46,16 +46,18 @@ kernel configuration file: .Ed .Pp To load the driver as a -module at boot time, place the following line in +module at boot time, place the following lines in .Xr loader.conf 5 : .Bd -literal -offset indent +t4fw_cfg_load="YES" +t5fw_cfg_load="YES" if_cxgbe_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for PCI Express Ethernet adapters based on -the Chelsio Terminator 4 (T4) ASIC. +the Chelsio Terminator 4 and Terminator 5 ASICs (T4 and T5). The driver supports Jumbo Frames, Transmit/Receive checksum offload, TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN tag insertion/extraction, VLAN checksum offload, VLAN TSO, and @@ -64,11 +66,49 @@ For further hardware information and que requirements, see .Pa http://www.chelsio.com/ . .Pp +Note that ports of T5 cards are named cxl and attach to a t5nex parent device +(in contrast to ports named cxgbe that attach to a t4nex parent for a T4 card). +Loader tunables with the hw.cxgbe prefix apply to both T4 and T5 cards. +The sysctl MIBs are at dev.t5nex and dev.cxl for T5 cards and at dev.t4nex and +dev.cxgbe for T4 cards. +.Pp For more information on configuring this device, see .Xr ifconfig 8 . .Sh HARDWARE The .Nm +driver supports 40Gb, 10Gb and 1Gb Ethernet adapters based on the T5 ASIC +(ports will be named cxl): +.Pp +.Bl -bullet -compact +.It +Chelsio T580-CR +.It +Chelsio T580-LP-CR +.It +Chelsio T580-LP-SO-CR +.It +Chelsio T560-CR +.It +Chelsio T540-CR +.It +Chelsio T540-LP-CR +.It +Chelsio T522-CR +.It +Chelsio T520-LL-CR +.It +Chelsio T520-CR +.It +Chelsio T520-SO +.It +Chelsio T520-BT +.It +Chelsio T504-BT +.El +.Pp +The +.Nm driver supports 10Gb and 1Gb Ethernet adapters based on the T4 ASIC: .Pp .Bl -bullet -compact @@ -100,11 +140,11 @@ prompt before booting the kernel or stor .Xr loader.conf 5 . .Bl -tag -width indent .It Va hw.cxgbe.ntxq10g -The number of tx queues to use for a 10Gb port. +The number of tx queues to use for a 10Gb or 40Gb port. The default is 16 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nrxq10g -The number of rx queues to use for a 10Gb port. +The number of rx queues to use for a 10Gb or 40Gb port. The default is 8 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.ntxq1g @@ -116,11 +156,11 @@ The number of rx queues to use for a 1Gb The default is 2 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nofldtxq10g -The number of TOE tx queues to use for a 10Gb port. +The number of TOE tx queues to use for a 10Gb or 40Gb port. The default is 8 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nofldrxq10g -The number of TOE rx queues to use for a 10Gb port. +The number of TOE rx queues to use for a 10Gb or 40Gb port. The default is 2 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nofldtxq1g @@ -136,20 +176,18 @@ The timer index value to use to delay in The holdoff timer list has the values 1, 5, 10, 50, 100, and 200 by default (all values are in microseconds) and the index selects a value from this list. -The default value is 1 for both 10Gb and 1Gb ports, which means the -timer value is 5us. -Different cxgbe interfaces can be assigned different values at any time via the -dev.cxgbe.X.holdoff_tmr_idx sysctl. +The default value is 1 which means the timer value is 5us. +Different interfaces can be assigned different values at any time via the +dev.cxgbe.X.holdoff_tmr_idx or dev.cxl.X.holdoff_tmr_idx sysctl. .It Va hw.cxgbe.holdoff_pktc_idx_10G .It Va hw.cxgbe.holdoff_pktc_idx_1G The packet-count index value to use to delay interrupts. The packet-count list has the values 1, 8, 16, and 32 by default and the index selects a value from this list. -The default value is -1 for both 10Gb and 1Gb ports, which means packet -counting is disabled and interrupts are generated based solely on the -holdoff timer value. -Different cxgbe interfaces can be assigned different values via the -dev.cxgbe.X.holdoff_pktc_idx sysctl. +The default value is -1 which means packet counting is disabled and interrupts +are generated based solely on the holdoff timer value. +Different interfaces can be assigned different values via the +dev.cxgbe.X.holdoff_pktc_idx or dev.cxl.X.holdoff_pktc_idx sysctl. This sysctl works only when the interface has never been marked up (as done by ifconfig up). .It Va hw.cxgbe.qsize_txq @@ -160,16 +198,16 @@ software queuing. See .Xr ifnet 9 . The default value is 1024. -Different cxgbe interfaces can be assigned different values via the -dev.cxgbe.X.qsize_txq sysctl. +Different interfaces can be assigned different values via the +dev.cxgbe.X.qsize_txq sysctl or dev.cxl.X.qsize_txq sysctl. This sysctl works only when the interface has never been marked up (as done by ifconfig up). .It Va hw.cxgbe.qsize_rxq The size, in number of entries, of the descriptor ring used for an rx queue. The default value is 1024. -Different cxgbe interfaces can be assigned different values via the -dev.cxgbe.X.qsize_rxq sysctl. +Different interfaces can be assigned different values via the +dev.cxgbe.X.qsize_rxq or dev.cxl.X.qsize_rxq sysctl. This sysctl works only when the interface has never been marked up (as done by ifconfig up). .It Va hw.cxgbe.interrupt_types @@ -187,6 +225,43 @@ already on the card. long as it is compatible with the driver and is a different version than the one already on the card. The default is 1. +.It Va hw.cxgbe.fl_pktshift +The number of bytes of padding inserted before the begining of an Ethernet +frame in the receive buffer. +The default value of 2 ensures that the Ethernet payload (usually the IP header) +is at a 4 byte aligned address. +0-7 are all valid values. +.It Va hw.cxgbe.fl_pad +A non-zero value ensures that writes from the hardware to a receive buffer are +padded up to the specified boundary. +The default is -1 which lets the driver pick a pad boundary. +0 disables trailer padding completely. +.It Va hw.cxgbe.cong_drop +Controls the hardware response to congestion. +-1 disables congestion feedback and is not recommended. +0 instructs the hardware to backpressure its pipeline on congestion. +This usually results in the port emitting pause frames. +1 instructs the hardware to drop frames destined for congested queues. +.It Va hw.cxgbe.buffer_packing +Allow the hardware to deliver multiple frames in the same receive buffer +opportunistically. +The default is -1 which lets the driver decide. +0 or 1 explicitly disable or enable this feature. +.It Va hw.cxgbe.allow_mbufs_in_cluster +1 allows the driver to lay down one or more mbufs within the receive buffer +opportunistically. This is the default. +0 prohibits the driver from doing so. +.It Va hw.cxgbe.largest_rx_cluster +.It Va hw.cxgbe.safest_rx_cluster +Sizes of rx clusters. Each of these must be set to one of the sizes available +(usually 2048, 4096, 9216, and 16384) and largest_rx_cluster must be greater +than or equal to safest_rx_cluster. +The defaults are 16384 and 4096 respectively. +The driver will never attempt to allocate a receive buffer larger than +largest_rx_cluster and will fall back to allocating buffers of +safest_rx_cluster size if an allocation larger than safest_rx_cluster fails. +Note that largest_rx_cluster merely establishes a ceiling -- the driver is +allowed to allocate buffers of smaller sizes. .It Va hw.cxgbe.config_file Select a pre-packaged device configuration file. A configuration file contains a recipe for partitioning and configuring the @@ -194,7 +269,7 @@ hardware resources on the card. This tunable is for specialized applications only and should not be used in normal operation. The configuration profile currently in use is available in the dev.t4nex.X.cf -and dev.t4nex.X.cfcsum sysctls. +and dev.t4nex.X.cfcsum (dev.t5nex for T5 cards) sysctls. .It Va hw.cxgbe.linkcaps_allowed .It Va hw.cxgbe.niccaps_allowed .It Va hw.cxgbe.toecaps_allowed @@ -208,7 +283,7 @@ capability. This tunable is for specialized applications only and should not be used in normal operation. The capabilities for which hardware resources have been reserved are listed in -dev.t4nex.X.*caps sysctls. +dev.t4nex.X.*caps or dev.t5nex.X.*caps sysctls. .El .Sh SUPPORT For general information and support, @@ -230,6 +305,10 @@ The .Nm device driver first appeared in .Fx 9.0 . +Support for T5 cards first appeared in +.Fx 9.2 +and +.Fx 10.0 . .Sh AUTHORS .An -nosplit The Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Sat Sep 13 22:16:40 2014 (r271554) +++ stable/8/sys/conf/files Sat Sep 13 22:30:04 2014 (r271555) @@ -850,10 +850,34 @@ t4fw.fwo optional cxgbe \ no-implicit-rule \ clean "t4fw.fwo" t4fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t4fw-1.8.4.0.bin.uu" \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.11.27.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t4fw.fw" +t5fw_cfg.c optional cxgbe \ + compile-with "${AWK} -f $S/tools/fw_stub.awk t5fw_cfg.fw:t5fw_cfg t5fw.fw:t5fw -mt5fw_cfg -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "t5fw_cfg.c" +t5fw_cfg.fwo optional cxgbe \ + dependency "t5fw_cfg.fw" \ + compile-with "${NORMAL_FWO}" \ + no-implicit-rule \ + clean "t5fw_cfg.fwo" +t5fw_cfg.fw optional cxgbe \ + dependency "$S/dev/cxgbe/firmware/t5fw_cfg.txt" \ + compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ + no-obj no-implicit-rule \ + clean "t5fw_cfg.fw" +t5fw.fwo optional cxgbe \ + dependency "t5fw.fw" \ + compile-with "${NORMAL_FWO}" \ + no-implicit-rule \ + clean "t5fw.fwo" +t5fw.fw optional cxgbe \ + dependency "$S/dev/cxgbe/firmware/t5fw-1.11.27.0.bin.uu" \ + compile-with "${NORMAL_FW}" \ + no-obj no-implicit-rule \ + clean "t5fw.fw" dev/cy/cy.c optional cy dev/cy/cy_isa.c optional cy isa dev/cy/cy_pci.c optional cy pci Modified: stable/8/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/8/sys/dev/cxgbe/adapter.h Sat Sep 13 22:16:40 2014 (r271554) +++ stable/8/sys/dev/cxgbe/adapter.h Sat Sep 13 22:30:04 2014 (r271555) @@ -50,9 +50,6 @@ #include "offload.h" #include "firmware/t4fw_interface.h" -#define T4_CFGNAME "t4fw_cfg" -#define T4_FWNAME "t4fw" - MALLOC_DECLARE(M_CXGBE); #define CXGBE_UNIMPLEMENTED(s) \ panic("%s (%s, line %d) not implemented yet.", s, __FILE__, __LINE__) @@ -140,11 +137,11 @@ enum { RX_FL_ESIZE = EQ_ESIZE, /* 8 64bit addresses */ #if MJUMPAGESIZE != MCLBYTES - FL_BUF_SIZES = 4, /* cluster, jumbop, jumbo9k, jumbo16k */ + SW_ZONE_SIZES = 4, /* cluster, jumbop, jumbo9k, jumbo16k */ #else - FL_BUF_SIZES = 3, /* cluster, jumbo9k, jumbo16k */ + SW_ZONE_SIZES = 3, /* cluster, jumbo9k, jumbo16k */ #endif - OFLD_BUF_SIZE = MJUM16BYTES, /* size of fl buffer for TOE rxq */ + CL_METADATA_SIZE = CACHE_LINE_SIZE, CTRL_EQ_QSIZE = 128, @@ -153,12 +150,6 @@ enum { TX_WR_FLITS = SGE_MAX_WR_LEN / 8 }; -#ifdef T4_PKT_TIMESTAMP -#define RX_COPY_THRESHOLD (MINCLSIZE - 8) -#else -#define RX_COPY_THRESHOLD MINCLSIZE -#endif - enum { /* adapter intr_type */ INTR_INTX = (1 << 0), @@ -184,6 +175,7 @@ enum { MASTER_PF = (1 << 3), ADAP_SYSCTL_CTX = (1 << 4), TOM_INIT_DONE = (1 << 5), + BUF_PACKING_OK = (1 << 6), CXGBE_BUSY = (1 << 9), @@ -211,6 +203,7 @@ struct port_info { unsigned long flags; int if_flags; + uint16_t *rss; uint16_t viid; int16_t xact_addr_filt;/* index of exact MAC address filter */ uint16_t rss_size; /* size of VI's RSS table slice */ @@ -220,10 +213,12 @@ struct port_info { uint8_t mod_type; uint8_t port_id; uint8_t tx_chan; + uint8_t rx_chan_map; /* rx MPS channel bitmap */ /* 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 */ #ifdef TCP_OFFLOAD @@ -237,6 +232,7 @@ struct port_info { int qsize_rxq; int qsize_txq; + int linkdnrc; struct link_config link_cfg; struct port_stats stats; @@ -246,16 +242,28 @@ struct port_info { uint8_t hw_addr[ETHER_ADDR_LEN]; /* factory MAC address, won't change */ }; -struct fl_sdesc { - struct mbuf *m; - bus_dmamap_t map; - caddr_t cl; - uint8_t tag_idx; /* the sc->fl_tag this map comes from */ +/* Where the cluster came from, how it has been carved up. */ +struct cluster_layout { + int8_t zidx; + int8_t hwidx; + uint16_t region1; /* mbufs laid out within this region */ + /* region2 is the DMA region */ + uint16_t region3; /* cluster_metadata within this region */ +}; + +struct cluster_metadata { + u_int refcount; #ifdef INVARIANTS - __be64 ba_tag; + struct fl_sdesc *sd; /* For debug only. Could easily be stale */ #endif }; +struct fl_sdesc { + caddr_t cl; + uint16_t nmbuf; /* # of driver originated mbufs with ref on cluster */ + struct cluster_layout cll; +}; + struct tx_desc { __be64 flit[8]; }; @@ -334,6 +342,9 @@ enum { EQ_STALLED = (1 << 6), /* out of hw descriptors or dmamaps */ }; +/* Listed in order of preference. Update t4_sysctls too if you change these */ +enum {DOORBELL_UDB, DOORBELL_WCWR, DOORBELL_UDBWC, DOORBELL_KDB}; + /* * Egress Queue: driver is producer, T4 is consumer. * @@ -351,6 +362,9 @@ struct sge_eq { struct tx_desc *desc; /* KVA of descriptor ring */ bus_addr_t ba; /* bus address of descriptor ring */ struct sge_qstat *spg; /* status page, for convenience */ + int doorbells; + volatile uint32_t *udb; /* KVA of doorbell (lies within BAR2) */ + u_int udb_qid; /* relative qid within the doorbell page */ uint16_t cap; /* max # of desc, for convenience */ uint16_t avail; /* available descriptors, for convenience */ uint16_t qsize; /* size (# of entries) of the queue */ @@ -368,9 +382,24 @@ struct sge_eq { uint32_t unstalled; /* recovered from stall */ }; +struct sw_zone_info { + uma_zone_t zone; /* zone that this cluster comes from */ + int size; /* size of cluster: 2K, 4K, 9K, 16K, etc. */ + int type; /* EXT_xxx type of the cluster */ + int8_t head_hwidx; + int8_t tail_hwidx; +}; + +struct hw_buf_info { + int8_t zidx; /* backpointer to zone; -ve means unused */ + int8_t next; /* next hwidx for this zone; -1 means no more */ + int size; +}; + enum { FL_STARVING = (1 << 0), /* on the adapter's list of starving fl's */ FL_DOOMED = (1 << 1), /* about to be destroyed */ + FL_BUF_PACKING = (1 << 2), /* buffer packing enabled */ }; #define FL_RUNNING_LOW(fl) (fl->cap - fl->needed <= fl->lowat) @@ -379,8 +408,8 @@ enum { struct sge_fl { bus_dma_tag_t desc_tag; bus_dmamap_t desc_map; - bus_dma_tag_t tag[FL_BUF_SIZES]; - uint8_t tag_idx; + struct cluster_layout cll_def; /* default refill zone, layout */ + struct cluster_layout cll_alt; /* alternate refill zone, layout */ struct mtx fl_lock; char lockname[16]; int flags; @@ -392,12 +421,22 @@ struct sge_fl { uint16_t qsize; /* size (# of entries) of the queue */ uint16_t cntxt_id; /* SGE context id for the freelist */ uint32_t cidx; /* consumer idx (buffer idx, NOT hw desc idx) */ + uint32_t rx_offset; /* offset in fl buf (when buffer packing) */ uint32_t pidx; /* producer idx (buffer idx, NOT hw desc idx) */ uint32_t needed; /* # of buffers needed to fill up fl. */ uint32_t lowat; /* # of buffers <= this means fl needs help */ uint32_t pending; /* # of bufs allocated since last doorbell */ - unsigned int dmamap_failed; TAILQ_ENTRY(sge_fl) link; /* All starving freelists */ + + struct mbuf *m0; + struct mbuf **pnext; + u_int remaining; + + uint64_t mbuf_allocated;/* # of mbuf allocated from zone_mbuf */ + uint64_t mbuf_inlined; /* # of mbuf created within clusters */ + uint64_t cl_allocated; /* # of clusters allocated */ + uint64_t cl_recycled; /* # of clusters recycled */ + uint64_t cl_fast_recycled; /* # of clusters recycled (fast) */ }; /* txq: SGE egress queue + what's needed for Ethernet NIC */ @@ -503,6 +542,9 @@ struct sge { int timer_val[SGE_NTIMERS]; int counter_val[SGE_NCOUNTERS]; int fl_starve_threshold; + int fl_starve_threshold2; + int eq_s_qpp; + int iq_s_qpp; int nrxq; /* total # of Ethernet rx queues */ int ntxq; /* total # of Ethernet tx tx queues */ @@ -527,6 +569,12 @@ struct sge { int eq_start; struct sge_iq **iqmap; /* iq->cntxt_id to iq mapping */ struct sge_eq **eqmap; /* eq->cntxt_id to eq mapping */ + + int pack_boundary; + int8_t safe_hwidx1; /* may not have room for metadata */ + int8_t safe_hwidx2; /* with room for metadata and maybe more */ + struct sw_zone_info sw_zone_info[SW_ZONE_SIZES]; + struct hw_buf_info hw_buf_info[SGE_FLBUF_SIZES]; }; struct rss_header; @@ -548,6 +596,9 @@ struct adapter { bus_space_handle_t bh; bus_space_tag_t bt; bus_size_t mmio_len; + int udbs_rid; + struct resource *udbs_res; + volatile uint8_t *udbs_base; unsigned int pf; unsigned int mbox; @@ -568,7 +619,6 @@ struct adapter { struct taskqueue *tq[NCHAN]; /* taskqueues that flush data out */ struct port_info *port[MAX_NPORTS]; uint8_t chan_map[NCHAN]; - uint32_t filter_mode; #ifdef TCP_OFFLOAD void *tom_softc; /* (struct tom_data *) */ @@ -577,6 +627,7 @@ struct adapter { struct l2t_data *l2t; /* L2 table */ struct tid_info tids; + int doorbells; int open_device_map; #ifdef TCP_OFFLOAD int offload_map; @@ -614,6 +665,8 @@ struct adapter { const char *last_op; const void *last_op_thr; #endif + + int sc_do_rxcopy; }; #define ADAPTER_LOCK(sc) mtx_lock(&(sc)->sc_lock) @@ -755,13 +808,22 @@ t4_os_set_hw_addr(struct adapter *sc, in bcopy(hw_addr, sc->port[idx]->hw_addr, ETHER_ADDR_LEN); } -static inline bool is_10G_port(const struct port_info *pi) +static inline bool +is_10G_port(const struct port_info *pi) { return ((pi->link_cfg.supported & FW_PORT_CAP_SPEED_10G) != 0); } -static inline int tx_resume_threshold(struct sge_eq *eq) +static inline bool +is_40G_port(const struct port_info *pi) +{ + + return ((pi->link_cfg.supported & FW_PORT_CAP_SPEED_40G) != 0); +} + +static inline int +tx_resume_threshold(struct sge_eq *eq) { return (eq->qsize / 4); @@ -774,7 +836,7 @@ int t4_os_find_pci_capability(struct ada int t4_os_pci_save_state(struct adapter *); int t4_os_pci_restore_state(struct adapter *); void t4_os_portmod_changed(const struct adapter *, int); -void t4_os_link_changed(struct adapter *, int, int); +void t4_os_link_changed(struct adapter *, int, int, int); void t4_iterate(void (*)(struct adapter *, void *), void *); int t4_register_cpl_handler(struct adapter *, int, cpl_handler_t); int t4_register_an_handler(struct adapter *, an_handler_t); @@ -785,8 +847,12 @@ void end_synchronized_op(struct adapter /* t4_sge.c */ void t4_sge_modload(void); -int t4_sge_init(struct adapter *); +void t4_init_sge_cpl_handlers(struct adapter *); +void t4_tweak_chip_settings(struct adapter *); +int t4_read_chip_settings(struct adapter *); int t4_create_dma_tag(struct adapter *); +void t4_sge_sysctls(struct adapter *, struct sysctl_ctx_list *, + struct sysctl_oid_list *); int t4_destroy_dma_tag(struct adapter *); int t4_setup_adapter_queues(struct adapter *); int t4_teardown_adapter_queues(struct adapter *); Modified: stable/8/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/8/sys/dev/cxgbe/common/common.h Sat Sep 13 22:16:40 2014 (r271554) +++ stable/8/sys/dev/cxgbe/common/common.h Sat Sep 13 22:30:04 2014 (r271555) @@ -42,15 +42,19 @@ enum { MACADDR_LEN = 12, /* MAC Address length */ }; -enum { MEM_EDC0, MEM_EDC1, MEM_MC }; +enum { MEM_EDC0, MEM_EDC1, MEM_MC, MEM_MC0 = MEM_MC, MEM_MC1 }; enum { MEMWIN0_APERTURE = 2048, MEMWIN0_BASE = 0x1b800, MEMWIN1_APERTURE = 32768, MEMWIN1_BASE = 0x28000, - MEMWIN2_APERTURE = 65536, - MEMWIN2_BASE = 0x30000, + + MEMWIN2_APERTURE_T4 = 65536, + MEMWIN2_BASE_T4 = 0x30000, + + MEMWIN2_APERTURE_T5 = 128 * 1024, + MEMWIN2_BASE_T5 = 0x60000, }; enum dev_master { MASTER_CANT, MASTER_MAY, MASTER_MUST }; @@ -63,15 +67,10 @@ enum { PAUSE_AUTONEG = 1 << 2 }; -#define FW_VERSION_MAJOR 1 -#define FW_VERSION_MINOR 8 -#define FW_VERSION_MICRO 4 -#define FW_VERSION_BUILD 0 - -#define FW_VERSION (V_FW_HDR_FW_VER_MAJOR(FW_VERSION_MAJOR) | \ - V_FW_HDR_FW_VER_MINOR(FW_VERSION_MINOR) | \ - V_FW_HDR_FW_VER_MICRO(FW_VERSION_MICRO) | \ - V_FW_HDR_FW_VER_BUILD(FW_VERSION_BUILD)) +struct memwin { + uint32_t base; + uint32_t aperture; +}; struct port_stats { u64 tx_octets; /* total # of octets in good frames */ @@ -220,6 +219,12 @@ struct tp_params { unsigned int dack_re; /* DACK timer resolution */ unsigned int la_mask; /* what events are recorded by TP LA */ unsigned short tx_modq[NCHAN]; /* channel to modulation queue map */ + uint32_t vlan_pri_map; + uint32_t ingress_config; + int8_t vlan_shift; + int8_t vnic_shift; + int8_t port_shift; + int8_t protocol_shift; }; struct vpd_params { @@ -241,7 +246,7 @@ struct pci_params { * Firmware device log. */ struct devlog_params { - u32 memtype; /* which memory (EDC0, EDC1, MC) */ + u32 memtype; /* which memory (FW_MEMTYPE_* ) */ u32 start; /* start of log in firmware memory */ u32 size; /* size of log */ }; @@ -262,23 +267,29 @@ struct adapter_params { unsigned short a_wnd[NCCTRL_WIN]; unsigned short b_wnd[NCCTRL_WIN]; - unsigned int mc_size; /* MC memory size */ - unsigned int nfilters; /* size of filter region */ + u_int ftid_min; + u_int ftid_max; + u_int etid_min; + u_int netids; unsigned int cim_la_size; - /* Used as int in sysctls, do not reduce size */ - unsigned int nports; /* # of ethernet ports */ - unsigned int portvec; - unsigned int rev; /* chip revision */ - unsigned int offload; + uint8_t nports; /* # of ethernet ports */ + uint8_t portvec; + unsigned int chipid:4; /* chip ID. T4 = 4, T5 = 5, ... */ + unsigned int rev:4; /* chip revision */ + unsigned int fpga:1; /* this is an FPGA */ + unsigned int offload:1; /* hw is TOE capable, fw has divvied up card + resources for TOE operation. */ + unsigned int bypass:1; /* this is a bypass card */ + unsigned int ethoffload:1; unsigned int ofldq_wr_cred; + unsigned int eo_wr_cred; }; -enum { /* chip revisions */ - T4_REV_A = 0, -}; +#define CHELSIO_T4 0x4 +#define CHELSIO_T5 0x5 struct trace_params { u32 data[TRACE_LEN / 4]; @@ -311,11 +322,53 @@ struct link_config { #define for_each_port(adapter, iter) \ for (iter = 0; iter < (adapter)->params.nports; ++iter) +static inline int is_ftid(const struct adapter *sc, u_int tid) +{ + + return (tid >= sc->params.ftid_min && tid <= sc->params.ftid_max); +} + +static inline int is_etid(const struct adapter *sc, u_int tid) +{ + + return (tid >= sc->params.etid_min); +} + static inline int is_offload(const struct adapter *adap) { return adap->params.offload; } +static inline int is_ethoffload(const struct adapter *adap) +{ + return adap->params.ethoffload; +} + +static inline int chip_id(struct adapter *adap) +{ + return adap->params.chipid; +} + +static inline int chip_rev(struct adapter *adap) +{ + return adap->params.rev; +} + +static inline int is_t4(struct adapter *adap) +{ + return adap->params.chipid == CHELSIO_T4; +} + +static inline int is_t5(struct adapter *adap) +{ + return adap->params.chipid == CHELSIO_T5; +} + +static inline int is_fpga(struct adapter *adap) +{ + return adap->params.fpga; +} + static inline unsigned int core_ticks_per_usec(const struct adapter *adap) { return adap->params.vpd.cclk / 1000; @@ -388,13 +441,15 @@ int t4_read_flash(struct adapter *adapte int t4_load_fw(struct adapter *adapter, const u8 *fw_data, unsigned int size); int t4_load_boot(struct adapter *adap, u8 *boot_data, unsigned int boot_addr, unsigned int size); -unsigned int t4_flash_cfg_addr(struct adapter *adapter); +int t4_flash_cfg_addr(struct adapter *adapter); int t4_load_cfg(struct adapter *adapter, const u8 *cfg_data, unsigned int size); int t4_get_fw_version(struct adapter *adapter, u32 *vers); int t4_get_tp_version(struct adapter *adapter, u32 *vers); int t4_check_fw_version(struct adapter *adapter); int t4_init_hw(struct adapter *adapter, u32 fw_params); int t4_prep_adapter(struct adapter *adapter); +int t4_init_tp_params(struct adapter *adap); +int t4_filter_field_shift(const struct adapter *adap, int filter_sel); int t4_port_init(struct port_info *p, int mbox, int pf, int vf); int t4_reinit_adapter(struct adapter *adap); void t4_fatal_err(struct adapter *adapter); @@ -437,7 +492,8 @@ int t4_cim_read_la(struct adapter *adap, void t4_cim_read_pif_la(struct adapter *adap, u32 *pif_req, u32 *pif_rsp, unsigned int *pif_req_wrptr, unsigned int *pif_rsp_wrptr); void t4_cim_read_ma_la(struct adapter *adap, u32 *ma_req, u32 *ma_rsp); -int t4_mc_read(struct adapter *adap, u32 addr, __be32 *data, u64 *parity); +int t4_mc_read(struct adapter *adap, int idx, u32 addr, + __be32 *data, u64 *parity); int t4_edc_read(struct adapter *adap, int idx, u32 addr, __be32 *data, u64 *parity); int t4_mem_read(struct adapter *adap, int mtype, u32 addr, u32 size, __be32 *data); @@ -527,12 +583,18 @@ int t4_enable_vi(struct adapter *adap, u bool rx_en, bool tx_en); int t4_identify_port(struct adapter *adap, unsigned int mbox, unsigned int viid, unsigned int nblinks); -int t4_i2c_rd(struct adapter *adap, unsigned int mbox, unsigned int port_id, - u8 dev_addr, u8 offset, u8 *valp); int t4_mdio_rd(struct adapter *adap, unsigned int mbox, unsigned int phy_addr, unsigned int mmd, unsigned int reg, unsigned int *valp); int t4_mdio_wr(struct adapter *adap, unsigned int mbox, unsigned int phy_addr, unsigned int mmd, unsigned int reg, unsigned int val); +int t4_i2c_rd(struct adapter *adap, unsigned int mbox, + int port, unsigned int devid, + unsigned int offset, unsigned int len, + u8 *buf); +int t4_i2c_wr(struct adapter *adap, unsigned int mbox, + int port, unsigned int devid, + unsigned int offset, unsigned int len, + u8 *buf); int t4_iq_start_stop(struct adapter *adap, unsigned int mbox, bool start, unsigned int pf, unsigned int vf, unsigned int iqid, unsigned int fl0id, unsigned int fl1id); @@ -552,4 +614,8 @@ int t4_sge_ctxt_rd_bd(struct adapter *ad int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox); int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl); int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox, u32 addr, u32 val); +int t4_sched_config(struct adapter *adapter, int type, int minmaxen); +int t4_sched_params(struct adapter *adapter, int type, int level, int mode, + int rateunit, int ratemode, int channel, int cl, + int minrate, int maxrate, int weight, int pktsize); #endif /* __CHELSIO_COMMON_H */ Modified: stable/8/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/8/sys/dev/cxgbe/common/t4_hw.c Sat Sep 13 22:16:40 2014 (r271554) +++ stable/8/sys/dev/cxgbe/common/t4_hw.c Sat Sep 13 22:30:04 2014 (r271555) @@ -176,9 +176,7 @@ static void t4_report_fw_error(struct ad u32 pcie_fw; pcie_fw = t4_read_reg(adap, A_PCIE_FW); - if (!(pcie_fw & F_PCIE_FW_ERR)) - CH_ERR(adap, "Firmware error report called with no error\n"); - else + if (pcie_fw & F_PCIE_FW_ERR) CH_ERR(adap, "Firmware reports adapter error: %s\n", reason[G_PCIE_FW_EVAL(pcie_fw)]); } @@ -312,6 +310,7 @@ int t4_wr_mbox_meat(struct adapter *adap /** * t4_mc_read - read from MC through backdoor accesses * @adap: the adapter + * @idx: which MC to access * @addr: address of first byte requested * @data: 64 bytes of data containing the requested address * @ecc: where to store the corresponding 64-bit ECC word @@ -320,22 +319,40 @@ int t4_wr_mbox_meat(struct adapter *adap * that covers the requested address @addr. If @parity is not %NULL it * is assigned the 64-bit ECC word for the read data. */ -int t4_mc_read(struct adapter *adap, u32 addr, __be32 *data, u64 *ecc) +int t4_mc_read(struct adapter *adap, int idx, u32 addr, __be32 *data, u64 *ecc) { int i; + u32 mc_bist_cmd_reg, mc_bist_cmd_addr_reg, mc_bist_cmd_len_reg; + u32 mc_bist_status_rdata_reg, mc_bist_data_pattern_reg; + + if (is_t4(adap)) { + mc_bist_cmd_reg = A_MC_BIST_CMD; + mc_bist_cmd_addr_reg = A_MC_BIST_CMD_ADDR; + mc_bist_cmd_len_reg = A_MC_BIST_CMD_LEN; + mc_bist_status_rdata_reg = A_MC_BIST_STATUS_RDATA; + mc_bist_data_pattern_reg = A_MC_BIST_DATA_PATTERN; + } else { + mc_bist_cmd_reg = MC_REG(A_MC_P_BIST_CMD, idx); + mc_bist_cmd_addr_reg = MC_REG(A_MC_P_BIST_CMD_ADDR, idx); + mc_bist_cmd_len_reg = MC_REG(A_MC_P_BIST_CMD_LEN, idx); + mc_bist_status_rdata_reg = MC_REG(A_MC_P_BIST_STATUS_RDATA, + idx); + mc_bist_data_pattern_reg = MC_REG(A_MC_P_BIST_DATA_PATTERN, + idx); + } - if (t4_read_reg(adap, A_MC_BIST_CMD) & F_START_BIST) + if (t4_read_reg(adap, mc_bist_cmd_reg) & F_START_BIST) return -EBUSY; - t4_write_reg(adap, A_MC_BIST_CMD_ADDR, addr & ~0x3fU); - t4_write_reg(adap, A_MC_BIST_CMD_LEN, 64); - t4_write_reg(adap, A_MC_BIST_DATA_PATTERN, 0xc); - t4_write_reg(adap, A_MC_BIST_CMD, V_BIST_OPCODE(1) | F_START_BIST | - V_BIST_CMD_GAP(1)); - i = t4_wait_op_done(adap, A_MC_BIST_CMD, F_START_BIST, 0, 10, 1); + t4_write_reg(adap, mc_bist_cmd_addr_reg, addr & ~0x3fU); + t4_write_reg(adap, mc_bist_cmd_len_reg, 64); + t4_write_reg(adap, mc_bist_data_pattern_reg, 0xc); + t4_write_reg(adap, mc_bist_cmd_reg, V_BIST_OPCODE(1) | + F_START_BIST | V_BIST_CMD_GAP(1)); + i = t4_wait_op_done(adap, mc_bist_cmd_reg, F_START_BIST, 0, 10, 1); if (i) return i; -#define MC_DATA(i) MC_BIST_STATUS_REG(A_MC_BIST_STATUS_RDATA, i) +#define MC_DATA(i) MC_BIST_STATUS_REG(mc_bist_status_rdata_reg, i) for (i = 15; i >= 0; i--) *data++ = ntohl(t4_read_reg(adap, MC_DATA(i))); @@ -360,20 +377,47 @@ int t4_mc_read(struct adapter *adap, u32 int t4_edc_read(struct adapter *adap, int idx, u32 addr, __be32 *data, u64 *ecc) { int i; + u32 edc_bist_cmd_reg, edc_bist_cmd_addr_reg, edc_bist_cmd_len_reg; + u32 edc_bist_cmd_data_pattern, edc_bist_status_rdata_reg; - idx *= EDC_STRIDE; - if (t4_read_reg(adap, A_EDC_BIST_CMD + idx) & F_START_BIST) + if (is_t4(adap)) { + edc_bist_cmd_reg = EDC_REG(A_EDC_BIST_CMD, idx); + edc_bist_cmd_addr_reg = EDC_REG(A_EDC_BIST_CMD_ADDR, idx); + edc_bist_cmd_len_reg = EDC_REG(A_EDC_BIST_CMD_LEN, idx); + edc_bist_cmd_data_pattern = EDC_REG(A_EDC_BIST_DATA_PATTERN, + idx); + edc_bist_status_rdata_reg = EDC_REG(A_EDC_BIST_STATUS_RDATA, + idx); + } else { +/* + * These macro are missing in t4_regs.h file. + * Added temporarily for testing. + */ +#define EDC_STRIDE_T5 (EDC_T51_BASE_ADDR - EDC_T50_BASE_ADDR) +#define EDC_REG_T5(reg, idx) (reg + EDC_STRIDE_T5 * idx) + edc_bist_cmd_reg = EDC_REG_T5(A_EDC_H_BIST_CMD, idx); + edc_bist_cmd_addr_reg = EDC_REG_T5(A_EDC_H_BIST_CMD_ADDR, idx); + edc_bist_cmd_len_reg = EDC_REG_T5(A_EDC_H_BIST_CMD_LEN, idx); + edc_bist_cmd_data_pattern = EDC_REG_T5(A_EDC_H_BIST_DATA_PATTERN, + idx); + edc_bist_status_rdata_reg = EDC_REG_T5(A_EDC_H_BIST_STATUS_RDATA, + idx); +#undef EDC_REG_T5 +#undef EDC_STRIDE_T5 + } + + if (t4_read_reg(adap, edc_bist_cmd_reg) & F_START_BIST) return -EBUSY; - t4_write_reg(adap, A_EDC_BIST_CMD_ADDR + idx, addr & ~0x3fU); - t4_write_reg(adap, A_EDC_BIST_CMD_LEN + idx, 64); - t4_write_reg(adap, A_EDC_BIST_DATA_PATTERN + idx, 0xc); - t4_write_reg(adap, A_EDC_BIST_CMD + idx, + t4_write_reg(adap, edc_bist_cmd_addr_reg, addr & ~0x3fU); + t4_write_reg(adap, edc_bist_cmd_len_reg, 64); + t4_write_reg(adap, edc_bist_cmd_data_pattern, 0xc); + t4_write_reg(adap, edc_bist_cmd_reg, V_BIST_OPCODE(1) | V_BIST_CMD_GAP(1) | F_START_BIST); - i = t4_wait_op_done(adap, A_EDC_BIST_CMD + idx, F_START_BIST, 0, 10, 1); + i = t4_wait_op_done(adap, edc_bist_cmd_reg, F_START_BIST, 0, 10, 1); if (i) return i; -#define EDC_DATA(i) (EDC_BIST_STATUS_REG(A_EDC_BIST_STATUS_RDATA, i) + idx) +#define EDC_DATA(i) EDC_BIST_STATUS_REG(edc_bist_status_rdata_reg, i) for (i = 15; i >= 0; i--) *data++ = ntohl(t4_read_reg(adap, EDC_DATA(i))); @@ -425,8 +469,8 @@ int t4_mem_read(struct adapter *adap, in /* * Read the chip's memory block and bail if there's an error. */ - if (mtype == MEM_MC) - ret = t4_mc_read(adap, pos, data, NULL); + if ((mtype == MEM_MC) || (mtype == MEM_MC1)) + ret = t4_mc_read(adap, mtype - MEM_MC, pos, data, NULL); else ret = t4_edc_read(adap, mtype, pos, data, NULL); if (ret) @@ -464,8 +508,9 @@ struct t4_vpd_hdr { #define EEPROM_STAT_ADDR 0x7bfc #define VPD_BASE 0x400 #define VPD_BASE_OLD 0 -#define VPD_LEN 512 +#define VPD_LEN 1024 #define VPD_INFO_FLD_HDR_SIZE 3 +#define CHELSIO_VPD_UNIQUE_ID 0x82 /** * t4_seeprom_read - read a serial EEPROM location @@ -630,7 +675,7 @@ static int get_vpd_params(struct adapter * it at 0. */ ret = t4_seeprom_read(adapter, VPD_BASE, (u32 *)(vpd)); - addr = *vpd == 0x82 ? VPD_BASE : VPD_BASE_OLD; + addr = *vpd == CHELSIO_VPD_UNIQUE_ID ? VPD_BASE : VPD_BASE_OLD; for (i = 0; i < sizeof(vpd); i += 4) { ret = t4_seeprom_read(adapter, addr + i, (u32 *)(vpd + i)); @@ -668,8 +713,10 @@ static int get_vpd_params(struct adapter i = vpd[sn - VPD_INFO_FLD_HDR_SIZE + 2]; memcpy(p->sn, vpd + sn, min(i, SERNUM_LEN)); strstrip(p->sn); + i = vpd[pn - VPD_INFO_FLD_HDR_SIZE + 2]; memcpy(p->pn, vpd + pn, min(i, PN_LEN)); strstrip((char *)p->pn); + i = vpd[na - VPD_INFO_FLD_HDR_SIZE + 2]; memcpy(p->na, vpd + na, min(i, MACADDR_LEN)); strstrip((char *)p->na); @@ -914,6 +961,7 @@ int t4_get_tp_version(struct adapter *ad int t4_check_fw_version(struct adapter *adapter) { int ret, major, minor, micro; + int exp_major, exp_minor, exp_micro; ret = t4_get_fw_version(adapter, &adapter->params.fw_vers); if (!ret) @@ -925,13 +973,30 @@ int t4_check_fw_version(struct adapter * minor = G_FW_HDR_FW_VER_MINOR(adapter->params.fw_vers); micro = G_FW_HDR_FW_VER_MICRO(adapter->params.fw_vers); - if (major != FW_VERSION_MAJOR) { /* major mismatch - fail */ + switch (chip_id(adapter)) { + case CHELSIO_T4: + exp_major = T4FW_VERSION_MAJOR; + exp_minor = T4FW_VERSION_MINOR; + exp_micro = T4FW_VERSION_MICRO; + break; + case CHELSIO_T5: + exp_major = T5FW_VERSION_MAJOR; + exp_minor = T5FW_VERSION_MINOR; + exp_micro = T5FW_VERSION_MICRO; + break; + default: + CH_ERR(adapter, "Unsupported chip type, %x\n", + chip_id(adapter)); + return -EINVAL; + } + + if (major != exp_major) { /* major mismatch - fail */ CH_ERR(adapter, "card FW has major version %u, driver wants " - "%u\n", major, FW_VERSION_MAJOR); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 22:44:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8AE90651; Sat, 13 Sep 2014 22:44:33 +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 74A12270; Sat, 13 Sep 2014 22:44:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DMiXP0098583; Sat, 13 Sep 2014 22:44:33 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DMiXc9098582; Sat, 13 Sep 2014 22:44:33 GMT (envelope-from np@FreeBSD.org) Message-Id: <201409132244.s8DMiXc9098582@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 13 Sep 2014 22:44:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r271556 - stable/8/sys/net X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 22:44:33 -0000 Author: np Date: Sat Sep 13 22:44:33 2014 New Revision: 271556 URL: http://svnweb.freebsd.org/changeset/base/271556 Log: MFC r258692 and r260207 (both by gnn). r258692: Add constants for use in interrogating various fiber and copper connectors most often used with network interfaces. The SFF-8472 standard defines the information that can be retrieved from an optic or a copper cable plugged into a NIC, most often referred to as SFP+. Examples of values that can be read include the cable vendor's name, part number, date of manufacture as well as running data such as temperature, voltage and tx and rx power. Copious comments on how to use these values with an I2C interface are given in the header file itself. r260207: Convert #defines to enums so that the values are visible in the debugger. Added: stable/8/sys/net/sff8472.h - copied, changed from r258692, head/sys/net/sff8472.h Modified: Directory Properties: stable/8/sys/ (props changed) stable/8/sys/net/ (props changed) Copied and modified: stable/8/sys/net/sff8472.h (from r258692, head/sys/net/sff8472.h) ============================================================================== --- head/sys/net/sff8472.h Wed Nov 27 20:20:02 2013 (r258692, copy source) +++ stable/8/sys/net/sff8472.h Sat Sep 13 22:44:33 2014 (r271556) @@ -62,104 +62,107 @@ /* Table 3.1 Two-wire interface ID: Data Fields */ -#define SFF_8472_BASE 0xa0 /* Base address for all our queries. */ -#define SFF_8472_ID 0 /* Transceiver Type (Table 3.2) */ -#define SFF_8472_EXT_ID 1 /* Extended transceiver type (Table 3.3) */ -#define SFF_8472_CONNECTOR 2 /* Connector type (Table 3.4) */ -#define SFF_8472_TRANS_START 3 /* Elec or Optical Compatibility +enum { + SFF_8472_BASE = 0xa0, /* Base address for all our queries. */ + SFF_8472_ID = 0, /* Transceiver Type (Table 3.2) */ + SFF_8472_EXT_ID = 1, /* Extended transceiver type (Table 3.3) */ + SFF_8472_CONNECTOR = 2, /* Connector type (Table 3.4) */ + SFF_8472_TRANS_START = 3, /* Elec or Optical Compatibility * (Table 3.5) */ -#define SFF_8472_TRANS_END 10 -#define SFF_8472_ENCODING 11 /* Encoding Code for high speed - * serial encoding algorithm (see - * Table 3.6) */ -#define SFF_8472_BITRATE 12 /* Nominal signaling rate, units - * of 100MBd. (see details for - * rates > 25.0Gb/s) */ -#define SFF_8472_RATEID 13 /* Type of rate select - * functionality (see Table - * 3.6a) */ -#define SFF_8472_LEN_SMF_KM 14 /* Link length supported for single + SFF_8472_TRANS_END = 10, + SFF_8472_ENCODING = 11, /* Encoding Code for high speed + * serial encoding algorithm (see + * Table 3.6) */ + SFF_8472_BITRATE = 12, /* Nominal signaling rate, units + * of 100MBd. (see details for + * rates > 25.0Gb/s) */ + SFF_8472_RATEID = 13, /* Type of rate select + * functionality (see Table + * 3.6a) */ + SFF_8472_LEN_SMF_KM = 14, /* Link length supported for single * mode fiber, units of km */ -#define SFF_8472_LEN_SMF 15 /* Link length supported for single + SFF_8472_LEN_SMF = 15, /* Link length supported for single * mode fiber, units of 100 m */ -#define SFF_8472_LEN_50UM 16 /* Link length supported for 50 um + SFF_8472_LEN_50UM = 16, /* Link length supported for 50 um * OM2 fiber, units of 10 m */ -#define SFF_8472_LEN_625UM 17 /* Link length supported for 62.5 + SFF_8472_LEN_625UM = 17, /* Link length supported for 62.5 * um OM1 fiber, units of 10 m */ -#define SFF_8472_LEN_OM4 18 /* Link length supported for 50um + SFF_8472_LEN_OM4 = 18, /* Link length supported for 50um * OM4 fiber, units of 10m. * Alternatively copper or direct * attach cable, units of m */ -#define SFF_8472_LEN_OM3 19 /* Link length supported for 50 um OM3 fiber, units of 10 m */ -#define SFF_8472_VENDOR_START 20 /* Vendor name [Address A0h, Bytes + SFF_8472_LEN_OM3 = 19, /* Link length supported for 50 um OM3 fiber, units of 10 m */ + SFF_8472_VENDOR_START = 20, /* Vendor name [Address A0h, Bytes * 20-35] */ -#define SFF_8472_VENDOR_END 35 -#define SFF_8472_TRANS 36 /* Transceiver Code for electronic + SFF_8472_VENDOR_END = 35, + SFF_8472_TRANS = 36, /* Transceiver Code for electronic * or optical compatibility (see * Table 3.5) */ -#define SFF_8472_VENDOR_OUI_START 37 /* Vendor OUI SFP vendor IEEE + SFF_8472_VENDOR_OUI_START = 37, /* Vendor OUI SFP vendor IEEE * company ID */ -#define SFF_8472_VENDOR_OUI_END 39 -#define SFF_8472_PN_START 40 /* Vendor PN */ -#define SFF_8472_PN_END 55 -#define SFF_8472_REV_START 56 /* Vendor Revision */ -#define SFF_8472_REV_END 59 -#define SFF_8472_WAVELEN_START 60 /* Wavelength Laser wavelength + SFF_8472_VENDOR_OUI_END = 39, + SFF_8472_PN_START = 40, /* Vendor PN */ + SFF_8472_PN_END = 55, + SFF_8472_REV_START = 56, /* Vendor Revision */ + SFF_8472_REV_END = 59, + SFF_8472_WAVELEN_START = 60, /* Wavelength Laser wavelength * (Passive/Active Cable * Specification Compliance) */ -#define SFF_8472_WAVELEN_END 61 -#define SFF_8472_CC_BASE 63 /* CC_BASE Check code for Base ID + SFF_8472_WAVELEN_END = 61, + SFF_8472_CC_BASE = 63, /* CC_BASE Check code for Base ID * Fields (addresses 0 to 62) */ /* * Extension Fields (optional) check the options before reading other * addresses. */ -#define SFF_8472_OPTIONS_MSB 64 /* Options Indicates which optional + SFF_8472_OPTIONS_MSB = 64, /* Options Indicates which optional * transceiver signals are * implemented */ -#define SFF_8472_OPTIONS_LSB 65 /* (see Table 3.7) */ -#define SFF_8472_BR_MAX 66 /* BR max Upper bit rate margin, + SFF_8472_OPTIONS_LSB = 65, /* (see Table 3.7) */ + SFF_8472_BR_MAX = 66, /* BR max Upper bit rate margin, * units of % (see details for * rates > 25.0Gb/s) */ -#define SFF_8472_BR_MIN 67 /* Lower bit rate margin, units of + SFF_8472_BR_MIN = 67, /* Lower bit rate margin, units of * % (see details for rates > * 25.0Gb/s) */ -#define SFF_8472_SN_START 68 /* Vendor SN [Address A0h, Bytes 68-83] */ -#define SFF_8472_SN_END 83 -#define SFF_8472_DATE_START 84 /* Date code Vendor’s manufacturing + SFF_8472_SN_START = 68, /* Vendor SN [Address A0h, Bytes 68-83] */ + SFF_8472_SN_END = 83, + SFF_8472_DATE_START = 84, /* Date code Vendor’s manufacturing * date code (see Table 3.8) */ -#define SFF_8472_DATE_END 91 -#define SFF_8472_DIAG_TYPE 92 /* Diagnostic Monitoring Type + SFF_8472_DATE_END = 91, + SFF_8472_DIAG_TYPE = 92, /* Diagnostic Monitoring Type * Indicates which type of * diagnostic monitoring is * implemented (if any) in the * transceiver (see Table 3.9) */ -#define SFF_8472_DIAG_IMPL (1 << 6) /* Required to be 1 */ -#define SFF_8472_DIAG_INTERNAL (1 << 5) /* Internal measurements. */ -#define SFF_8472_DIAG_EXTERNAL (1 << 4) /* External measurements. */ -#define SFF_8472_DIAG_POWER (1 << 3) /* Power measurement type */ -#define SFF_8472_DIAG_ADDR_CHG (1 << 2) /* Address change required. - * See SFF-8472 doc. */ -#define SFF_8472_ENHANCED 93 /* Enhanced Options Indicates which + SFF_8472_ENHANCED = 93, /* Enhanced Options Indicates which * optional enhanced features are * implemented (if any) in the * transceiver (see Table 3.10) */ -#define SFF_8472_COMPLIANCE 94 /* SFF-8472 Compliance Indicates + SFF_8472_COMPLIANCE = 94, /* SFF-8472 Compliance Indicates * which revision of SFF-8472 the * transceiver complies with. (see * Table 3.12)*/ -#define SFF_8472_CC_EXT 95 /* Check code for the Extended ID + SFF_8472_CC_EXT = 95, /* Check code for the Extended ID * Fields (addresses 64 to 94) */ -#define SFF_8472_VENDOR_RSRVD_START 96 -#define SFF_8472_VENDOR_RSRVD_END 127 + SFF_8472_VENDOR_RSRVD_START = 96, + SFF_8472_VENDOR_RSRVD_END = 127, -#define SFF_8472_RESERVED_START 128 -#define SFF_8472_RESERVED_END 255 + SFF_8472_RESERVED_START = 128, + SFF_8472_RESERVED_END = 255 +}; + +#define SFF_8472_DIAG_IMPL (1 << 6) /* Required to be 1 */ +#define SFF_8472_DIAG_INTERNAL (1 << 5) /* Internal measurements. */ +#define SFF_8472_DIAG_EXTERNAL (1 << 4) /* External measurements. */ +#define SFF_8472_DIAG_POWER (1 << 3) /* Power measurement type */ +#define SFF_8472_DIAG_ADDR_CHG (1 << 2) /* Address change required. + * See SFF-8472 doc. */ /* * Diagnostics are available at the two wire address 0xa2. All @@ -167,77 +170,78 @@ * see which, if any are supported. */ -#define SFF_8472_DIAG 0xa2 /* Base address for diagnostics. */ +enum {SFF_8472_DIAG = 0xa2}; /* Base address for diagnostics. */ /* * Table 3.15 Alarm and Warning Thresholds All values are 2 bytes * and MUST be read in a single read operation starting at the MSB */ -#define SFF_8472_TEMP_HIGH_ALM 0 /* Temp High Alarm */ -#define SFF_8472_TEMP_LOW_ALM 2 /* Temp Low Alarm */ -#define SFF_8472_TEMP_HIGH_WARN 4 /* Temp High Warning */ -#define SFF_8472_TEMP_LOW_WARN 6 /* Temp Low Warning */ -#define SFF_8472_VOLTAGE_HIGH_ALM 8 /* Voltage High Alarm */ -#define SFF_8472_VOLTAGE_LOW_ALM 10 /* Voltage Low Alarm */ -#define SFF_8472_VOLTAGE_HIGH_WARN 12 /* Voltage High Warning */ -#define SFF_8472_VOLTAGE_LOW_WARN 14 /* Voltage Low Warning */ -#define SFF_8472_BIAS_HIGH_ALM 16 /* Bias High Alarm */ -#define SFF_8472_BIAS_LOW_ALM 18 /* Bias Low Alarm */ -#define SFF_8472_BIAS_HIGH_WARN 20 /* Bias High Warning */ -#define SFF_8472_BIAS_LOW_WARN 22 /* Bias Low Warning */ -#define SFF_8472_TX_POWER_HIGH_ALM 24 /* TX Power High Alarm */ -#define SFF_8472_TX_POWER_LOW_ALM 26 /* TX Power Low Alarm */ -#define SFF_8472_TX_POWER_HIGH_WARN 28 /* TX Power High Warning */ -#define SFF_8472_TX_POWER_LOW_WARN 30 /* TX Power Low Warning */ -#define SFF_8472_RX_POWER_HIGH_ALM 32 /* RX Power High Alarm */ -#define SFF_8472_RX_POWER_LOW_ALM 34 /* RX Power Low Alarm */ -#define SFF_8472_RX_POWER_HIGH_WARN 36 /* RX Power High Warning */ -#define SFF_8472_RX_POWER_LOW_WARN 38 /* RX Power Low Warning */ +enum { + SFF_8472_TEMP_HIGH_ALM = 0, /* Temp High Alarm */ + SFF_8472_TEMP_LOW_ALM = 2, /* Temp Low Alarm */ + SFF_8472_TEMP_HIGH_WARN = 4, /* Temp High Warning */ + SFF_8472_TEMP_LOW_WARN = 6, /* Temp Low Warning */ + SFF_8472_VOLTAGE_HIGH_ALM = 8, /* Voltage High Alarm */ + SFF_8472_VOLTAGE_LOW_ALM = 10, /* Voltage Low Alarm */ + SFF_8472_VOLTAGE_HIGH_WARN = 12, /* Voltage High Warning */ + SFF_8472_VOLTAGE_LOW_WARN = 14, /* Voltage Low Warning */ + SFF_8472_BIAS_HIGH_ALM = 16, /* Bias High Alarm */ + SFF_8472_BIAS_LOW_ALM = 18, /* Bias Low Alarm */ + SFF_8472_BIAS_HIGH_WARN = 20, /* Bias High Warning */ + SFF_8472_BIAS_LOW_WARN = 22, /* Bias Low Warning */ + SFF_8472_TX_POWER_HIGH_ALM = 24, /* TX Power High Alarm */ + SFF_8472_TX_POWER_LOW_ALM = 26, /* TX Power Low Alarm */ + SFF_8472_TX_POWER_HIGH_WARN = 28, /* TX Power High Warning */ + SFF_8472_TX_POWER_LOW_WARN = 30, /* TX Power Low Warning */ + SFF_8472_RX_POWER_HIGH_ALM = 32, /* RX Power High Alarm */ + SFF_8472_RX_POWER_LOW_ALM = 34, /* RX Power Low Alarm */ + SFF_8472_RX_POWER_HIGH_WARN = 36, /* RX Power High Warning */ + SFF_8472_RX_POWER_LOW_WARN = 38, /* RX Power Low Warning */ -#define SFF_8472_RX_POWER4 56 /* Rx_PWR(4) Single precision + SFF_8472_RX_POWER4 = 56, /* Rx_PWR(4) Single precision * floating point calibration data * - Rx optical power. Bit 7 of * byte 56 is MSB. Bit 0 of byte * 59 is LSB. Rx_PWR(4) should be * set to zero for “internally * calibrated” devices. */ -#define SFF_8472_RX_POWER3 60 /* Rx_PWR(3) Single precision + SFF_8472_RX_POWER3 = 60, /* Rx_PWR(3) Single precision * floating point calibration data * - Rx optical power. Bit 7 of * byte 60 is MSB. Bit 0 of byte 63 * is LSB. Rx_PWR(3) should be set * to zero for “internally * calibrated” devices.*/ -#define SFF_8472_RX_POWER2 64 /* Rx_PWR(2) Single precision + SFF_8472_RX_POWER2 = 64, /* Rx_PWR(2) Single precision * floating point calibration data, * Rx optical power. Bit 7 of byte * 64 is MSB, bit 0 of byte 67 is * LSB. Rx_PWR(2) should be set to * zero for “internally calibrated” * devices. */ -#define SFF_8472_RX_POWER1 68 /* Rx_PWR(1) Single precision + SFF_8472_RX_POWER1 = 68, /* Rx_PWR(1) Single precision * floating point calibration data, * Rx optical power. Bit 7 of byte * 68 is MSB, bit 0 of byte 71 is * LSB. Rx_PWR(1) should be set to * 1 for “internally calibrated” * devices. */ -#define SFF_8472_RX_POWER0 72 /* Rx_PWR(0) Single precision + SFF_8472_RX_POWER0 = 72, /* Rx_PWR(0) Single precision * floating point calibration data, * Rx optical power. Bit 7 of byte * 72 is MSB, bit 0 of byte 75 is * LSB. Rx_PWR(0) should be set to * zero for “internally calibrated” * devices. */ -#define SFF_8472_TX_I_SLOPE 76 /* Tx_I(Slope) Fixed decimal + SFF_8472_TX_I_SLOPE = 76, /* Tx_I(Slope) Fixed decimal * (unsigned) calibration data, * laser bias current. Bit 7 of * byte 76 is MSB, bit 0 of byte 77 * is LSB. Tx_I(Slope) should be * set to 1 for “internally * calibrated” devices. */ -#define SFF_8472_TX_I_OFFSET 78 /* Tx_I(Offset) Fixed decimal + SFF_8472_TX_I_OFFSET = 78, /* Tx_I(Offset) Fixed decimal * (signed two’s complement) * calibration data, laser bias * current. Bit 7 of byte 78 is @@ -245,7 +249,7 @@ * LSB. Tx_I(Offset) should be set * to zero for “internally * calibrated” devices. */ -#define SFF_8472_TX_POWER_SLOPE 80 /* Tx_PWR(Slope) Fixed decimal + SFF_8472_TX_POWER_SLOPE = 80, /* Tx_PWR(Slope) Fixed decimal * (unsigned) calibration data, * transmitter coupled output * power. Bit 7 of byte 80 is MSB, @@ -253,22 +257,22 @@ * Tx_PWR(Slope) should be set to 1 * for “internally calibrated” * devices. */ -#define SFF_8472_TX_POWER_OFFSET 82 /* Tx_PWR(Offset) Fixed decimal - * (signed two’s complement) - * calibration data, transmitter - * coupled output power. Bit 7 of - * byte 82 is MSB, bit 0 of byte 83 - * is LSB. Tx_PWR(Offset) should be - * set to zero for “internally - * calibrated” devices. */ -#define SFF_8472_T_SLOPE 84 /* T (Slope) Fixed decimal + SFF_8472_TX_POWER_OFFSET = 82, /* Tx_PWR(Offset) Fixed decimal + * (signed two’s complement) + * calibration data, transmitter + * coupled output power. Bit 7 of + * byte 82 is MSB, bit 0 of byte 83 + * is LSB. Tx_PWR(Offset) should be + * set to zero for “internally + * calibrated” devices. */ + SFF_8472_T_SLOPE = 84, /* T (Slope) Fixed decimal * (unsigned) calibration data, * internal module temperature. Bit * 7 of byte 84 is MSB, bit 0 of * byte 85 is LSB. T(Slope) should * be set to 1 for “internally * calibrated” devices. */ -#define SFF_8472_T_OFFSET 86 /* T (Offset) Fixed decimal (signed + SFF_8472_T_OFFSET = 86, /* T (Offset) Fixed decimal (signed * two’s complement) calibration * data, internal module * temperature. Bit 7 of byte 86 is @@ -276,7 +280,7 @@ * T(Offset) should be set to zero * for “internally calibrated” * devices. */ -#define SFF_8472_V_SLOPE 88 /* V (Slope) Fixed decimal + SFF_8472_V_SLOPE = 88, /* V (Slope) Fixed decimal * (unsigned) calibration data, * internal module supply * voltage. Bit 7 of byte 88 is @@ -284,7 +288,7 @@ * LSB. V(Slope) should be set to 1 * for “internally calibrated” * devices. */ -#define SFF_8472_V_OFFSET 90 /* V (Offset) Fixed decimal (signed + SFF_8472_V_OFFSET = 90, /* V (Offset) Fixed decimal (signed * two’s complement) calibration * data, internal module supply * voltage. Bit 7 of byte 90 is @@ -292,21 +296,21 @@ * LSB. V(Offset) should be set to * zero for “internally calibrated” * devices. */ -#define SFF_8472_CHECKSUM 95 /* Checksum Byte 95 contains the + SFF_8472_CHECKSUM = 95, /* Checksum Byte 95 contains the * low order 8 bits of the sum of * bytes 0 – 94. */ - /* Internal measurements. */ + /* Internal measurements. */ -#define SFF_8472_TEMP 96 /* Internally measured module temperature. */ -#define SFF_8472_VCC 98 /* Internally measured supply + SFF_8472_TEMP = 96, /* Internally measured module temperature. */ + SFF_8472_VCC = 98, /* Internally measured supply * voltage in transceiver. */ -#define SFF_8472_TX_BIAS 100 /* Internally measured TX Bias Current. */ -#define SFF_8472_TX_POWER 102 /* Measured TX output power. */ -#define SFF_8472_RX_POWER 104 /* Measured RX input power. */ - -#define SFF_8472_STATUS 110 /* See below */ + SFF_8472_TX_BIAS = 100, /* Internally measured TX Bias Current. */ + SFF_8472_TX_POWER = 102, /* Measured TX output power. */ + SFF_8472_RX_POWER = 104, /* Measured RX input power. */ + SFF_8472_STATUS = 110 /* See below */ +}; /* Status Bits Described */ /* @@ -372,20 +376,22 @@ #define SFF_8472_STATUS_DATA_READY (1 << 0) /* Table 3.2 Identifier values */ -#define SFF_8472_ID_UNKNOWN 0x0 /* Unknown or unspecified */ -#define SFF_8472_ID_GBIC 0x1 /* GBIC */ -#define SFF_8472_ID_SFF 0x2 /* Module soldered to motherboard (ex: SFF)*/ -#define SFF_8472_ID_SFP 0x3 /* SFP or SFP “Plus” */ -#define SFF_8472_ID_XBI 0x4 /* Reserved for “300 pin XBI” devices */ -#define SFF_8472_ID_XENPAK 0x5 /* Reserved for “Xenpak” devices */ -#define SFF_8472_ID_XFP 0x6 /* Reserved for “XFP” devices */ -#define SFF_8472_ID_XFF 0x7 /* Reserved for “XFF” devices */ -#define SFF_8472_ID_XFPE 0x8 /* Reserved for “XFP-E” devices */ -#define SFF_8472_ID_XPAK 0x9 /* Reserved for “XPak” devices */ -#define SFF_8472_ID_X2 0xA /* Reserved for “X2” devices */ -#define SFF_8472_ID_DWDM_SFP 0xB /* Reserved for “DWDM-SFP” devices */ -#define SFF_8472_ID_QSFP 0xC /* Reserved for “QSFP” devices */ -#define SFF_8472_ID_LAST SFF_8472_ID_QSFP +enum { + SFF_8472_ID_UNKNOWN = 0x0, /* Unknown or unspecified */ + SFF_8472_ID_GBIC = 0x1, /* GBIC */ + SFF_8472_ID_SFF = 0x2, /* Module soldered to motherboard (ex: SFF)*/ + SFF_8472_ID_SFP = 0x3, /* SFP or SFP “Plus” */ + SFF_8472_ID_XBI = 0x4, /* Reserved for “300 pin XBI” devices */ + SFF_8472_ID_XENPAK = 0x5, /* Reserved for “Xenpak” devices */ + SFF_8472_ID_XFP = 0x6, /* Reserved for “XFP” devices */ + SFF_8472_ID_XFF = 0x7, /* Reserved for “XFF” devices */ + SFF_8472_ID_XFPE = 0x8, /* Reserved for “XFP-E” devices */ + SFF_8472_ID_XPAK = 0x9, /* Reserved for “XPak” devices */ + SFF_8472_ID_X2 = 0xA, /* Reserved for “X2” devices */ + SFF_8472_ID_DWDM_SFP = 0xB, /* Reserved for “DWDM-SFP” devices */ + SFF_8472_ID_QSFP = 0xC, /* Reserved for “QSFP” devices */ + SFF_8472_ID_LAST = SFF_8472_ID_QSFP + }; static char *sff_8472_id[SFF_8472_ID_LAST + 1] = {"Unknown", "GBIC", From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 23:03:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33A60AE3; Sat, 13 Sep 2014 23:03:47 +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 1D741614; Sat, 13 Sep 2014 23:03:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DN3lR6007944; Sat, 13 Sep 2014 23:03:47 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DN3khI007941; Sat, 13 Sep 2014 23:03:46 GMT (envelope-from np@FreeBSD.org) Message-Id: <201409132303.s8DN3khI007941@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 13 Sep 2014 23:03:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r271558 - stable/8/tools/tools/cxgbetool X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 23:03:47 -0000 Author: np Date: Sat Sep 13 23:03:46 2014 New Revision: 271558 URL: http://svnweb.freebsd.org/changeset/base/271558 Log: cxgbetool from 9-STABLE (this one works with T5 cards). Added: stable/8/tools/tools/cxgbetool/reg_defs_t5.c (contents, props changed) Modified: stable/8/tools/tools/cxgbetool/Makefile stable/8/tools/tools/cxgbetool/cxgbetool.c Modified: stable/8/tools/tools/cxgbetool/Makefile ============================================================================== --- stable/8/tools/tools/cxgbetool/Makefile Sat Sep 13 22:45:04 2014 (r271557) +++ stable/8/tools/tools/cxgbetool/Makefile Sat Sep 13 23:03:46 2014 (r271558) @@ -3,7 +3,7 @@ PROG= cxgbetool SRCS= cxgbetool.c NO_MAN= -CFLAGS+= -I${.CURDIR}/../../../sys/dev/cxgbe -I. +CFLAGS+= -I${.CURDIR}/../../../sys/dev/cxgbe -I${.CURDIR}/../../../sys -I. BINDIR?= /usr/sbin .include Modified: stable/8/tools/tools/cxgbetool/cxgbetool.c ============================================================================== --- stable/8/tools/tools/cxgbetool/cxgbetool.c Sat Sep 13 22:45:04 2014 (r271557) +++ stable/8/tools/tools/cxgbetool/cxgbetool.c Sat Sep 13 23:03:46 2014 (r271558) @@ -46,14 +46,16 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "t4_ioctl.h" #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) - +#define in_range(val, lo, hi) ( val < 0 || (val <= hi && val >= lo)) #define max(x, y) ((x) > (y) ? (x) : (y)) static const char *progname, *nexus; +static int chip_id; /* 4 for T4, 5 for T5 */ struct reg_info { const char *name; @@ -77,6 +79,7 @@ struct field_desc { #include "reg_defs_t4.c" #include "reg_defs_t4vf.c" +#include "reg_defs_t5.c" static void usage(FILE *fp) @@ -92,9 +95,12 @@ usage(FILE *fp) "\ti2c [] read from i2c device\n" "\tloadfw install firmware\n" "\tmemdump dump a memory range\n" + "\tmodinfo [raw] optics/cable information\n" "\treg

[=] read/write register\n" "\treg64
[=] read/write 64 bit register\n" "\tregdump [] ... dump registers\n" + "\tsched-class params .. configure TX scheduler class\n" + "\tsched-queue bind NIC queues to TX Scheduling class\n" "\tstdio interactive mode\n" "\ttcb read TCB\n" ); @@ -121,6 +127,7 @@ real_doit(unsigned long cmd, void *data, rc = errno; return (rc); } + chip_id = nexus[1] - '0'; } rc = ioctl(fd, cmd, data); @@ -315,7 +322,7 @@ dump_regs_t4(int argc, const char *argv[ T4_MODREGS(ma), { "edc0", t4_edc_0_regs }, { "edc1", t4_edc_1_regs }, - T4_MODREGS(cim), + T4_MODREGS(cim), T4_MODREGS(tp), T4_MODREGS(ulp_rx), T4_MODREGS(ulp_tx), @@ -327,7 +334,7 @@ dump_regs_t4(int argc, const char *argv[ { "i2c", t4_i2cm_regs }, T4_MODREGS(mi), T4_MODREGS(uart), - T4_MODREGS(pmu), + T4_MODREGS(pmu), T4_MODREGS(sf), T4_MODREGS(pl), T4_MODREGS(le), @@ -354,34 +361,75 @@ dump_regs_t4vf(int argc, const char *arg ARRAY_SIZE(t4vf_mod)); } +#define T5_MODREGS(name) { #name, t5_##name##_regs } +static int +dump_regs_t5(int argc, const char *argv[], const uint32_t *regs) +{ + static struct mod_regs t5_mod[] = { + T5_MODREGS(sge), + { "pci", t5_pcie_regs }, + T5_MODREGS(dbg), + { "mc0", t5_mc_0_regs }, + { "mc1", t5_mc_1_regs }, + T5_MODREGS(ma), + { "edc0", t5_edc_t50_regs }, + { "edc1", t5_edc_t51_regs }, + T5_MODREGS(cim), + T5_MODREGS(tp), + { "ulprx", t5_ulp_rx_regs }, + { "ulptx", t5_ulp_tx_regs }, + { "pmrx", t5_pm_rx_regs }, + { "pmtx", t5_pm_tx_regs }, + T5_MODREGS(mps), + { "cplsw", t5_cpl_switch_regs }, + T5_MODREGS(smb), + { "i2c", t5_i2cm_regs }, + T5_MODREGS(mi), + T5_MODREGS(uart), + T5_MODREGS(pmu), + T5_MODREGS(sf), + T5_MODREGS(pl), + T5_MODREGS(le), + T5_MODREGS(ncsi), + T5_MODREGS(mac), + { "hma", t5_hma_t5_regs } + }; + + return dump_regs_table(argc, argv, regs, t5_mod, ARRAY_SIZE(t5_mod)); +} +#undef T5_MODREGS + static int dump_regs(int argc, const char *argv[]) { - int vers, revision, is_pcie, rc; + int vers, revision, rc; struct t4_regdump regs; + uint32_t len; - regs.data = calloc(1, T4_REGDUMP_SIZE); + len = max(T4_REGDUMP_SIZE, T5_REGDUMP_SIZE); + regs.data = calloc(1, len); if (regs.data == NULL) { warnc(ENOMEM, "regdump"); return (ENOMEM); } - regs.len = T4_REGDUMP_SIZE; + regs.len = len; rc = doit(CHELSIO_T4_REGDUMP, ®s); if (rc != 0) return (rc); vers = get_card_vers(regs.version); revision = (regs.version >> 10) & 0x3f; - is_pcie = (regs.version & 0x80000000) != 0; if (vers == 4) { if (revision == 0x3f) rc = dump_regs_t4vf(argc, argv, regs.data); else rc = dump_regs_t4(argc, argv, regs.data); - } else { - warnx("%s (type %d, rev %d) is not a T4 card.", + } else if (vers == 5) + rc = dump_regs_t5(argc, argv, regs.data); + else { + warnx("%s (type %d, rev %d) is not a known card.", nexus, vers, revision); return (ENOTSUP); } @@ -825,6 +873,9 @@ get_filter_mode(void) if (mode & T4_FILTER_IP_DPORT) printf("dport "); + if (mode & T4_FILTER_IP_FRAGMENT) + printf("frag "); + if (mode & T4_FILTER_MPS_HIT_TYPE) printf("matchtype "); @@ -844,7 +895,7 @@ get_filter_mode(void) printf("vlan "); if (mode & T4_FILTER_VNIC) - printf("vnic "); + printf("vnic/ovlan "); if (mode & T4_FILTER_PORT) printf("iport "); @@ -863,6 +914,9 @@ set_filter_mode(int argc, const char *ar uint32_t mode = 0; for (; argc; argc--, argv++) { + if (!strcmp(argv[0], "frag")) + mode |= T4_FILTER_IP_FRAGMENT; + if (!strcmp(argv[0], "matchtype")) mode |= T4_FILTER_MPS_HIT_TYPE; @@ -917,6 +971,7 @@ set_filter(uint32_t idx, int argc, const }; bzero(&t, sizeof (t)); t.idx = idx; + t.fs.hitcnts = 1; for (start_arg = 0; start_arg + 2 <= argc; start_arg += 2) { const char **args = &argv[start_arg]; @@ -1310,7 +1365,16 @@ show_sge_context(const struct t4_sge_con FIELD1("CngDBPHdr:", 6), FIELD1("CngDBPData:", 5), FIELD1("CngIMSG:", 4), - FIELD("CngChMap:", 0, 3), + { "CngChMap:", 0, 3, 0, 1, 0}, + { NULL } + }; + static struct field_desc t5_conm[] = { + FIELD1("CngMPSEnable:", 21), + FIELD("CngTPMode:", 19, 20), + FIELD1("CngDBPHdr:", 18), + FIELD1("CngDBPData:", 17), + FIELD1("CngIMSG:", 16), + { "CngChMap:", 0, 15, 0, 1, 0}, { NULL } }; @@ -1321,7 +1385,7 @@ show_sge_context(const struct t4_sge_con else if (p->mem_id == SGE_CONTEXT_INGRESS) show_struct(p->data, 5, ingress); else if (p->mem_id == SGE_CONTEXT_CNM) - show_struct(p->data, 1, conm); + show_struct(p->data, 1, chip_id == 5 ? t5_conm : conm); } #undef FIELD @@ -1609,6 +1673,469 @@ clearstats(int argc, const char *argv[]) } static int +modinfo_raw(int port_id) +{ + uint8_t offset; + struct t4_i2c_data i2cd; + int rc; + + for (offset = 0; offset < 96; offset += sizeof(i2cd.data)) { + bzero(&i2cd, sizeof(i2cd)); + i2cd.port_id = port_id; + i2cd.dev_addr = 0xa0; + i2cd.offset = offset; + i2cd.len = sizeof(i2cd.data); + rc = doit(CHELSIO_T4_GET_I2C, &i2cd); + if (rc != 0) + return (rc); + printf("%02x: %02x %02x %02x %02x %02x %02x %02x %02x", + offset, i2cd.data[0], i2cd.data[1], i2cd.data[2], + i2cd.data[3], i2cd.data[4], i2cd.data[5], i2cd.data[6], + i2cd.data[7]); + + printf(" %c%c%c%c %c%c%c%c\n", + isprint(i2cd.data[0]) ? i2cd.data[0] : '.', + isprint(i2cd.data[1]) ? i2cd.data[1] : '.', + isprint(i2cd.data[2]) ? i2cd.data[2] : '.', + isprint(i2cd.data[3]) ? i2cd.data[3] : '.', + isprint(i2cd.data[4]) ? i2cd.data[4] : '.', + isprint(i2cd.data[5]) ? i2cd.data[5] : '.', + isprint(i2cd.data[6]) ? i2cd.data[6] : '.', + isprint(i2cd.data[7]) ? i2cd.data[7] : '.'); + } + + return (0); +} + +static int +modinfo(int argc, const char *argv[]) +{ + long port; + char string[16], *p; + struct t4_i2c_data i2cd; + int rc, i; + uint16_t temp, vcc, tx_bias, tx_power, rx_power; + + if (argc < 1) { + warnx("must supply a port"); + return (EINVAL); + } + + if (argc > 2) { + warnx("too many arguments"); + return (EINVAL); + } + + p = str_to_number(argv[0], &port, NULL); + if (*p || port > UCHAR_MAX) { + warnx("invalid port id \"%s\"", argv[0]); + return (EINVAL); + } + + if (argc == 2) { + if (!strcmp(argv[1], "raw")) + return (modinfo_raw(port)); + else { + warnx("second argument can only be \"raw\""); + return (EINVAL); + } + } + + bzero(&i2cd, sizeof(i2cd)); + i2cd.len = 1; + i2cd.port_id = port; + i2cd.dev_addr = SFF_8472_BASE; + + i2cd.offset = SFF_8472_ID; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + + if (i2cd.data[0] > SFF_8472_ID_LAST) + printf("Unknown ID\n"); + else + printf("ID: %s\n", sff_8472_id[i2cd.data[0]]); + + bzero(&string, sizeof(string)); + for (i = SFF_8472_VENDOR_START; i < SFF_8472_VENDOR_END; i++) { + i2cd.offset = i; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + string[i - SFF_8472_VENDOR_START] = i2cd.data[0]; + } + printf("Vendor %s\n", string); + + bzero(&string, sizeof(string)); + for (i = SFF_8472_SN_START; i < SFF_8472_SN_END; i++) { + i2cd.offset = i; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + string[i - SFF_8472_SN_START] = i2cd.data[0]; + } + printf("SN %s\n", string); + + bzero(&string, sizeof(string)); + for (i = SFF_8472_PN_START; i < SFF_8472_PN_END; i++) { + i2cd.offset = i; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + string[i - SFF_8472_PN_START] = i2cd.data[0]; + } + printf("PN %s\n", string); + + bzero(&string, sizeof(string)); + for (i = SFF_8472_REV_START; i < SFF_8472_REV_END; i++) { + i2cd.offset = i; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + string[i - SFF_8472_REV_START] = i2cd.data[0]; + } + printf("Rev %s\n", string); + + i2cd.offset = SFF_8472_DIAG_TYPE; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + + if ((char )i2cd.data[0] & (SFF_8472_DIAG_IMPL | + SFF_8472_DIAG_INTERNAL)) { + + /* Switch to reading from the Diagnostic address. */ + i2cd.dev_addr = SFF_8472_DIAG; + i2cd.len = 1; + + i2cd.offset = SFF_8472_TEMP; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + temp = i2cd.data[0] << 8; + printf("Temp: "); + if ((temp & SFF_8472_TEMP_SIGN) == SFF_8472_TEMP_SIGN) + printf("-"); + else + printf("+"); + printf("%dC\n", (temp & SFF_8472_TEMP_MSK) >> + SFF_8472_TEMP_SHIFT); + + i2cd.offset = SFF_8472_VCC; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + vcc = i2cd.data[0] << 8; + printf("Vcc %fV\n", vcc / SFF_8472_VCC_FACTOR); + + i2cd.offset = SFF_8472_TX_BIAS; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + tx_bias = i2cd.data[0] << 8; + printf("TX Bias %fuA\n", tx_bias / SFF_8472_BIAS_FACTOR); + + i2cd.offset = SFF_8472_TX_POWER; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + tx_power = i2cd.data[0] << 8; + printf("TX Power %fmW\n", tx_power / SFF_8472_POWER_FACTOR); + + i2cd.offset = SFF_8472_RX_POWER; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + rx_power = i2cd.data[0] << 8; + printf("RX Power %fmW\n", rx_power / SFF_8472_POWER_FACTOR); + + } else + printf("Diagnostics not supported.\n"); + + return(0); + +fail: + if (rc == EPERM) + warnx("No module/cable in port %ld", port); + return (rc); + +} + +/* XXX: pass in a low/high and do range checks as well */ +static int +get_sched_param(const char *param, const char *args[], long *val) +{ + char *p; + + if (strcmp(param, args[0]) != 0) + return (EINVAL); + + p = str_to_number(args[1], val, NULL); + if (*p) { + warnx("parameter \"%s\" has bad value \"%s\"", args[0], + args[1]); + return (EINVAL); + } + + return (0); +} + +static int +sched_class(int argc, const char *argv[]) +{ + struct t4_sched_params op; + int errs, i; + + memset(&op, 0xff, sizeof(op)); + op.subcmd = -1; + op.type = -1; + if (argc == 0) { + warnx("missing scheduling sub-command"); + return (EINVAL); + } + if (!strcmp(argv[0], "config")) { + op.subcmd = SCHED_CLASS_SUBCMD_CONFIG; + op.u.config.minmax = -1; + } else if (!strcmp(argv[0], "params")) { + op.subcmd = SCHED_CLASS_SUBCMD_PARAMS; + op.u.params.level = op.u.params.mode = op.u.params.rateunit = + op.u.params.ratemode = op.u.params.channel = + op.u.params.cl = op.u.params.minrate = op.u.params.maxrate = + op.u.params.weight = op.u.params.pktsize = -1; + } else { + warnx("invalid scheduling sub-command \"%s\"", argv[0]); + return (EINVAL); + } + + /* Decode remaining arguments ... */ + errs = 0; + for (i = 1; i < argc; i += 2) { + const char **args = &argv[i]; + long l; + + if (i + 1 == argc) { + warnx("missing argument for \"%s\"", args[0]); + errs++; + break; + } + + if (!strcmp(args[0], "type")) { + if (!strcmp(args[1], "packet")) + op.type = SCHED_CLASS_TYPE_PACKET; + else { + warnx("invalid type parameter \"%s\"", args[1]); + errs++; + } + + continue; + } + + if (op.subcmd == SCHED_CLASS_SUBCMD_CONFIG) { + if(!get_sched_param("minmax", args, &l)) + op.u.config.minmax = (int8_t)l; + else { + warnx("unknown scheduler config parameter " + "\"%s\"", args[0]); + errs++; + } + + continue; + } + + /* Rest applies only to SUBCMD_PARAMS */ + if (op.subcmd != SCHED_CLASS_SUBCMD_PARAMS) + continue; + + if (!strcmp(args[0], "level")) { + if (!strcmp(args[1], "cl-rl")) + op.u.params.level = SCHED_CLASS_LEVEL_CL_RL; + else if (!strcmp(args[1], "cl-wrr")) + op.u.params.level = SCHED_CLASS_LEVEL_CL_WRR; + else if (!strcmp(args[1], "ch-rl")) + op.u.params.level = SCHED_CLASS_LEVEL_CH_RL; + else { + warnx("invalid level parameter \"%s\"", + args[1]); + errs++; + } + } else if (!strcmp(args[0], "mode")) { + if (!strcmp(args[1], "class")) + op.u.params.mode = SCHED_CLASS_MODE_CLASS; + else if (!strcmp(args[1], "flow")) + op.u.params.mode = SCHED_CLASS_MODE_FLOW; + else { + warnx("invalid mode parameter \"%s\"", args[1]); + errs++; + } + } else if (!strcmp(args[0], "rate-unit")) { + if (!strcmp(args[1], "bits")) + op.u.params.rateunit = SCHED_CLASS_RATEUNIT_BITS; + else if (!strcmp(args[1], "pkts")) + op.u.params.rateunit = SCHED_CLASS_RATEUNIT_PKTS; + else { + warnx("invalid rate-unit parameter \"%s\"", + args[1]); + errs++; + } + } else if (!strcmp(args[0], "rate-mode")) { + if (!strcmp(args[1], "relative")) + op.u.params.ratemode = SCHED_CLASS_RATEMODE_REL; + else if (!strcmp(args[1], "absolute")) + op.u.params.ratemode = SCHED_CLASS_RATEMODE_ABS; + else { + warnx("invalid rate-mode parameter \"%s\"", + args[1]); + errs++; + } + } else if (!get_sched_param("channel", args, &l)) + op.u.params.channel = (int8_t)l; + else if (!get_sched_param("class", args, &l)) + op.u.params.cl = (int8_t)l; + else if (!get_sched_param("min-rate", args, &l)) + op.u.params.minrate = (int32_t)l; + else if (!get_sched_param("max-rate", args, &l)) + op.u.params.maxrate = (int32_t)l; + else if (!get_sched_param("weight", args, &l)) + op.u.params.weight = (int16_t)l; + else if (!get_sched_param("pkt-size", args, &l)) + op.u.params.pktsize = (int16_t)l; + else { + warnx("unknown scheduler parameter \"%s\"", args[0]); + errs++; + } + } + + /* + * Catch some logical fallacies in terms of argument combinations here + * so we can offer more than just the EINVAL return from the driver. + * The driver will be able to catch a lot more issues since it knows + * the specifics of the device hardware capabilities like how many + * channels, classes, etc. the device supports. + */ + if (op.type < 0) { + warnx("sched \"type\" parameter missing"); + errs++; + } + if (op.subcmd == SCHED_CLASS_SUBCMD_CONFIG) { + if (op.u.config.minmax < 0) { + warnx("sched config \"minmax\" parameter missing"); + errs++; + } + } + if (op.subcmd == SCHED_CLASS_SUBCMD_PARAMS) { + if (op.u.params.level < 0) { + warnx("sched params \"level\" parameter missing"); + errs++; + } + if (op.u.params.mode < 0) { + warnx("sched params \"mode\" parameter missing"); + errs++; + } + if (op.u.params.rateunit < 0) { + warnx("sched params \"rate-unit\" parameter missing"); + errs++; + } + if (op.u.params.ratemode < 0) { + warnx("sched params \"rate-mode\" parameter missing"); + errs++; + } + if (op.u.params.channel < 0) { + warnx("sched params \"channel\" missing"); + errs++; + } + if (op.u.params.cl < 0) { + warnx("sched params \"class\" missing"); + errs++; + } + if (op.u.params.maxrate < 0 && + (op.u.params.level == SCHED_CLASS_LEVEL_CL_RL || + op.u.params.level == SCHED_CLASS_LEVEL_CH_RL)) { + warnx("sched params \"max-rate\" missing for " + "rate-limit level"); + errs++; + } + if (op.u.params.weight < 0 && + op.u.params.level == SCHED_CLASS_LEVEL_CL_WRR) { + warnx("sched params \"weight\" missing for " + "weighted-round-robin level"); + errs++; + } + if (op.u.params.pktsize < 0 && + (op.u.params.level == SCHED_CLASS_LEVEL_CL_RL || + op.u.params.level == SCHED_CLASS_LEVEL_CH_RL)) { + warnx("sched params \"pkt-size\" missing for " + "rate-limit level"); + errs++; + } + if (op.u.params.mode == SCHED_CLASS_MODE_FLOW && + op.u.params.ratemode != SCHED_CLASS_RATEMODE_ABS) { + warnx("sched params mode flow needs rate-mode absolute"); + errs++; + } + if (op.u.params.ratemode == SCHED_CLASS_RATEMODE_REL && + !in_range(op.u.params.maxrate, 1, 100)) { + warnx("sched params \"max-rate\" takes " + "percentage value(1-100) for rate-mode relative"); + errs++; + } + if (op.u.params.ratemode == SCHED_CLASS_RATEMODE_ABS && + !in_range(op.u.params.maxrate, 1, 10000000)) { + warnx("sched params \"max-rate\" takes " + "value(1-10000000) for rate-mode absolute"); + errs++; + } + if (op.u.params.maxrate > 0 && + op.u.params.maxrate < op.u.params.minrate) { + warnx("sched params \"max-rate\" is less than " + "\"min-rate\""); + errs++; + } + } + + if (errs > 0) { + warnx("%d error%s in sched-class command", errs, + errs == 1 ? "" : "s"); + return (EINVAL); + } + + return doit(CHELSIO_T4_SCHED_CLASS, &op); +} + +static int +sched_queue(int argc, const char *argv[]) +{ + struct t4_sched_queue op = {0}; + char *p; + long val; + + if (argc != 3) { + /* need " */ + warnx("incorrect number of arguments."); + return (EINVAL); + } + + p = str_to_number(argv[0], &val, NULL); + if (*p || val > UCHAR_MAX) { + warnx("invalid port id \"%s\"", argv[0]); + return (EINVAL); + } + op.port = (uint8_t)val; + + if (!strcmp(argv[1], "all") || !strcmp(argv[1], "*")) + op.queue = -1; + else { + p = str_to_number(argv[1], &val, NULL); + if (*p || val < -1) { + warnx("invalid queue \"%s\"", argv[1]); + return (EINVAL); + } + op.queue = (int8_t)val; + } + + if (!strcmp(argv[2], "unbind") || !strcmp(argv[2], "clear")) + op.cl = -1; + else { + p = str_to_number(argv[2], &val, NULL); + if (*p || val < -1) { + warnx("invalid class \"%s\"", argv[2]); + return (EINVAL); + } + op.cl = (int8_t)val; + } + + return doit(CHELSIO_T4_SCHED_QUEUE, &op); +} + +static int run_cmd(int argc, const char *argv[]) { int rc = -1; @@ -1638,6 +2165,12 @@ run_cmd(int argc, const char *argv[]) rc = read_i2c(argc, argv); else if (!strcmp(cmd, "clearstats")) rc = clearstats(argc, argv); + else if (!strcmp(cmd, "modinfo")) + rc = modinfo(argc, argv); + else if (!strcmp(cmd, "sched-class")) + rc = sched_class(argc, argv); + else if (!strcmp(cmd, "sched-queue")) + rc = sched_queue(argc, argv); else { rc = EINVAL; warnx("invalid command \"%s\"", cmd); Added: stable/8/tools/tools/cxgbetool/reg_defs_t5.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/tools/cxgbetool/reg_defs_t5.c Sat Sep 13 23:03:46 2014 (r271558) @@ -0,0 +1,65039 @@ +/* This file is automatically generated --- changes will be lost */ +__FBSDID("$FreeBSD$"); + +struct reg_info t5_sge_regs[] = { + { "SGE_PF_KDOORBELL", 0x1e000, 0 }, + { "QID", 15, 17 }, + { "Priority", 14, 1 }, + { "Type", 13, 1 }, + { "PIDX", 0, 13 }, + { "SGE_PF_GTS", 0x1e004, 0 }, + { "IngressQID", 16, 16 }, + { "TimerReg", 13, 3 }, + { "SEIntArm", 12, 1 }, + { "CIDXInc", 0, 12 }, + { "SGE_PF_KTIMESTAMP_LO", 0x1e008, 0 }, + { "SGE_PF_KTIMESTAMP_HI", 0x1e00c, 0 }, + { "SGE_PF_KDOORBELL", 0x1e400, 0 }, + { "QID", 15, 17 }, + { "Priority", 14, 1 }, + { "Type", 13, 1 }, + { "PIDX", 0, 13 }, + { "SGE_PF_GTS", 0x1e404, 0 }, + { "IngressQID", 16, 16 }, + { "TimerReg", 13, 3 }, + { "SEIntArm", 12, 1 }, + { "CIDXInc", 0, 12 }, + { "SGE_PF_KTIMESTAMP_LO", 0x1e408, 0 }, + { "SGE_PF_KTIMESTAMP_HI", 0x1e40c, 0 }, + { "SGE_PF_KDOORBELL", 0x1e800, 0 }, + { "QID", 15, 17 }, + { "Priority", 14, 1 }, + { "Type", 13, 1 }, + { "PIDX", 0, 13 }, + { "SGE_PF_GTS", 0x1e804, 0 }, + { "IngressQID", 16, 16 }, + { "TimerReg", 13, 3 }, + { "SEIntArm", 12, 1 }, + { "CIDXInc", 0, 12 }, + { "SGE_PF_KTIMESTAMP_LO", 0x1e808, 0 }, + { "SGE_PF_KTIMESTAMP_HI", 0x1e80c, 0 }, + { "SGE_PF_KDOORBELL", 0x1ec00, 0 }, + { "QID", 15, 17 }, + { "Priority", 14, 1 }, + { "Type", 13, 1 }, + { "PIDX", 0, 13 }, + { "SGE_PF_GTS", 0x1ec04, 0 }, + { "IngressQID", 16, 16 }, + { "TimerReg", 13, 3 }, + { "SEIntArm", 12, 1 }, + { "CIDXInc", 0, 12 }, + { "SGE_PF_KTIMESTAMP_LO", 0x1ec08, 0 }, + { "SGE_PF_KTIMESTAMP_HI", 0x1ec0c, 0 }, + { "SGE_PF_KDOORBELL", 0x1f000, 0 }, + { "QID", 15, 17 }, + { "Priority", 14, 1 }, + { "Type", 13, 1 }, + { "PIDX", 0, 13 }, + { "SGE_PF_GTS", 0x1f004, 0 }, + { "IngressQID", 16, 16 }, + { "TimerReg", 13, 3 }, + { "SEIntArm", 12, 1 }, + { "CIDXInc", 0, 12 }, + { "SGE_PF_KTIMESTAMP_LO", 0x1f008, 0 }, + { "SGE_PF_KTIMESTAMP_HI", 0x1f00c, 0 }, + { "SGE_PF_KDOORBELL", 0x1f400, 0 }, + { "QID", 15, 17 }, + { "Priority", 14, 1 }, + { "Type", 13, 1 }, + { "PIDX", 0, 13 }, + { "SGE_PF_GTS", 0x1f404, 0 }, + { "IngressQID", 16, 16 }, + { "TimerReg", 13, 3 }, + { "SEIntArm", 12, 1 }, + { "CIDXInc", 0, 12 }, + { "SGE_PF_KTIMESTAMP_LO", 0x1f408, 0 }, + { "SGE_PF_KTIMESTAMP_HI", 0x1f40c, 0 }, + { "SGE_PF_KDOORBELL", 0x1f800, 0 }, + { "QID", 15, 17 }, + { "Priority", 14, 1 }, + { "Type", 13, 1 }, + { "PIDX", 0, 13 }, + { "SGE_PF_GTS", 0x1f804, 0 }, + { "IngressQID", 16, 16 }, + { "TimerReg", 13, 3 }, + { "SEIntArm", 12, 1 }, + { "CIDXInc", 0, 12 }, + { "SGE_PF_KTIMESTAMP_LO", 0x1f808, 0 }, + { "SGE_PF_KTIMESTAMP_HI", 0x1f80c, 0 }, + { "SGE_PF_KDOORBELL", 0x1fc00, 0 }, + { "QID", 15, 17 }, + { "Priority", 14, 1 }, + { "Type", 13, 1 }, + { "PIDX", 0, 13 }, + { "SGE_PF_GTS", 0x1fc04, 0 }, + { "IngressQID", 16, 16 }, + { "TimerReg", 13, 3 }, + { "SEIntArm", 12, 1 }, + { "CIDXInc", 0, 12 }, + { "SGE_PF_KTIMESTAMP_LO", 0x1fc08, 0 }, + { "SGE_PF_KTIMESTAMP_HI", 0x1fc0c, 0 }, + { "SGE_CONTROL", 0x1008, 0 }, + { "IgrAllCPLtoFL", 31, 1 }, + { "FLSplitMin", 22, 9 }, + { "RxPktCPLMode", 18, 1 }, + { "EgrStatusPageSize", 17, 1 }, + { "IngHintEnable1", 15, 1 }, + { "IngHintEnable0", 14, 1 }, + { "IngIntCompareIDX", 13, 1 }, + { "PktShift", 10, 3 }, + { "IngPCIeBoundary", 7, 3 }, + { "IngPadBoundary", 4, 3 }, + { "GlobalEnable", 0, 1 }, + { "SGE_HOST_PAGE_SIZE", 0x100c, 0 }, + { "HostPageSizePF7", 28, 4 }, + { "HostPageSizePF6", 24, 4 }, + { "HostPageSizePF5", 20, 4 }, + { "HostPageSizePF4", 16, 4 }, + { "HostPageSizePF3", 12, 4 }, + { "HostPageSizePF2", 8, 4 }, + { "HostPageSizePF1", 4, 4 }, + { "HostPageSizePF0", 0, 4 }, + { "SGE_EGRESS_QUEUES_PER_PAGE_PF", 0x1010, 0 }, + { "QueuesPerPagePF7", 28, 4 }, + { "QueuesPerPagePF6", 24, 4 }, + { "QueuesPerPagePF5", 20, 4 }, + { "QueuesPerPagePF4", 16, 4 }, + { "QueuesPerPagePF3", 12, 4 }, + { "QueuesPerPagePF2", 8, 4 }, + { "QueuesPerPagePF1", 4, 4 }, + { "QueuesPerPagePF0", 0, 4 }, + { "SGE_EGRESS_QUEUES_PER_PAGE_VF", 0x1014, 0 }, + { "QueuesPerPageVFPF7", 28, 4 }, + { "QueuesPerPageVFPF6", 24, 4 }, + { "QueuesPerPageVFPF5", 20, 4 }, + { "QueuesPerPageVFPF4", 16, 4 }, + { "QueuesPerPageVFPF3", 12, 4 }, + { "QueuesPerPageVFPF2", 8, 4 }, + { "QueuesPerPageVFPF1", 4, 4 }, + { "QueuesPerPageVFPF0", 0, 4 }, + { "SGE_USER_MODE_LIMITS", 0x1018, 0 }, + { "Opcode_Min", 24, 8 }, + { "Opcode_Max", 16, 8 }, + { "Length_Min", 8, 8 }, + { "Length_Max", 0, 8 }, + { "SGE_WR_ERROR", 0x101c, 0 }, + { "SGE_PERR_INJECT", 0x1020, 0 }, + { "MemSel", 1, 5 }, + { "InjectDataErr", 0, 1 }, + { "SGE_INT_CAUSE1", 0x1024, 0 }, + { "perr_pc_chpi_rsp2", 31, 1 }, + { "perr_flm_CreditFifo", 30, 1 }, + { "perr_imsg_hint_fifo", 29, 1 }, + { "perr_pc_mctag", 24, 1 }, + { "perr_pc_chpi_rsp1", 23, 1 }, + { "perr_pc_chpi_rsp0", 22, 1 }, + { "perr_dbp_pc_rsp_fifo3", 21, 1 }, + { "perr_dbp_pc_rsp_fifo2", 20, 1 }, + { "perr_dbp_pc_rsp_fifo1", 19, 1 }, + { "perr_dbp_pc_rsp_fifo0", 18, 1 }, + { "perr_dmarbt", 17, 1 }, + { "perr_flm_DbpFifo", 16, 1 }, + { "perr_flm_MCReq_fifo", 15, 1 }, + { "perr_flm_HintFifo", 14, 1 }, + { "perr_align_ctl_fifo3", 13, 1 }, + { "perr_align_ctl_fifo2", 12, 1 }, + { "perr_align_ctl_fifo1", 11, 1 }, + { "perr_align_ctl_fifo0", 10, 1 }, + { "perr_edma_fifo3", 9, 1 }, + { "perr_edma_fifo2", 8, 1 }, + { "perr_edma_fifo1", 7, 1 }, + { "perr_edma_fifo0", 6, 1 }, + { "perr_pd_fifo3", 5, 1 }, + { "perr_pd_fifo2", 4, 1 }, + { "perr_pd_fifo1", 3, 1 }, + { "perr_pd_fifo0", 2, 1 }, + { "perr_ing_ctxt_mifrsp", 1, 1 }, + { "perr_egr_ctxt_mifrsp", 0, 1 }, + { "SGE_INT_ENABLE1", 0x1028, 0 }, + { "perr_pc_chpi_rsp2", 31, 1 }, + { "perr_flm_CreditFifo", 30, 1 }, + { "perr_imsg_hint_fifo", 29, 1 }, + { "perr_pc_mctag", 24, 1 }, + { "perr_pc_chpi_rsp1", 23, 1 }, + { "perr_pc_chpi_rsp0", 22, 1 }, + { "perr_dbp_pc_rsp_fifo3", 21, 1 }, + { "perr_dbp_pc_rsp_fifo2", 20, 1 }, + { "perr_dbp_pc_rsp_fifo1", 19, 1 }, + { "perr_dbp_pc_rsp_fifo0", 18, 1 }, + { "perr_dmarbt", 17, 1 }, + { "perr_flm_DbpFifo", 16, 1 }, + { "perr_flm_MCReq_fifo", 15, 1 }, + { "perr_flm_HintFifo", 14, 1 }, + { "perr_align_ctl_fifo3", 13, 1 }, + { "perr_align_ctl_fifo2", 12, 1 }, + { "perr_align_ctl_fifo1", 11, 1 }, + { "perr_align_ctl_fifo0", 10, 1 }, + { "perr_edma_fifo3", 9, 1 }, + { "perr_edma_fifo2", 8, 1 }, + { "perr_edma_fifo1", 7, 1 }, + { "perr_edma_fifo0", 6, 1 }, + { "perr_pd_fifo3", 5, 1 }, + { "perr_pd_fifo2", 4, 1 }, + { "perr_pd_fifo1", 3, 1 }, + { "perr_pd_fifo0", 2, 1 }, + { "perr_ing_ctxt_mifrsp", 1, 1 }, + { "perr_egr_ctxt_mifrsp", 0, 1 }, + { "SGE_PERR_ENABLE1", 0x102c, 0 }, + { "perr_pc_chpi_rsp2", 31, 1 }, + { "perr_flm_CreditFifo", 30, 1 }, + { "perr_imsg_hint_fifo", 29, 1 }, + { "perr_pc_mctag", 24, 1 }, + { "perr_pc_chpi_rsp1", 23, 1 }, + { "perr_pc_chpi_rsp0", 22, 1 }, + { "perr_dbp_pc_rsp_fifo3", 21, 1 }, + { "perr_dbp_pc_rsp_fifo2", 20, 1 }, + { "perr_dbp_pc_rsp_fifo1", 19, 1 }, + { "perr_dbp_pc_rsp_fifo0", 18, 1 }, + { "perr_dmarbt", 17, 1 }, + { "perr_flm_DbpFifo", 16, 1 }, + { "perr_flm_MCReq_fifo", 15, 1 }, + { "perr_flm_HintFifo", 14, 1 }, + { "perr_align_ctl_fifo3", 13, 1 }, + { "perr_align_ctl_fifo2", 12, 1 }, + { "perr_align_ctl_fifo1", 11, 1 }, + { "perr_align_ctl_fifo0", 10, 1 }, + { "perr_edma_fifo3", 9, 1 }, + { "perr_edma_fifo2", 8, 1 }, + { "perr_edma_fifo1", 7, 1 }, + { "perr_edma_fifo0", 6, 1 }, + { "perr_pd_fifo3", 5, 1 }, + { "perr_pd_fifo2", 4, 1 }, + { "perr_pd_fifo1", 3, 1 }, + { "perr_pd_fifo0", 2, 1 }, + { "perr_ing_ctxt_mifrsp", 1, 1 }, + { "perr_egr_ctxt_mifrsp", 0, 1 }, + { "SGE_INT_CAUSE2", 0x1030, 0 }, + { "perr_dbp_hint_fl_fifo", 24, 1 }, + { "perr_egr_dbp_tx_coal", 23, 1 }, + { "perr_dbp_fl_fifo", 22, 1 }, + { "perr_eswitch_fifo3", 21, 1 }, + { "perr_eswitch_fifo2", 20, 1 }, + { "perr_eswitch_fifo1", 19, 1 }, + { "perr_eswitch_fifo0", 18, 1 }, + { "perr_pc_dbp1", 17, 1 }, + { "perr_pc_dbp0", 16, 1 }, + { "perr_pc_dbp2", 15, 1 }, + { "perr_conm_sram", 14, 1 }, + { "perr_pc_mc_rsp", 13, 1 }, + { "perr_isw_idma0_fifo", 12, 1 }, + { "perr_isw_idma1_fifo", 11, 1 }, + { "perr_isw_dbp_fifo", 10, 1 }, + { "perr_isw_gts_fifo", 9, 1 }, + { "perr_itp_evr", 8, 1 }, + { "perr_flm_cntxmem", 7, 1 }, + { "perr_flm_l1Cache", 6, 1 }, + { "perr_dbp_hint_fifo", 5, 1 }, + { "perr_dbp_hp_fifo", 4, 1 }, + { "perr_dbp_lp_fifo", 3, 1 }, + { "perr_ing_ctxt_cache", 2, 1 }, + { "perr_egr_ctxt_cache", 1, 1 }, + { "perr_base_size", 0, 1 }, + { "SGE_INT_ENABLE2", 0x1034, 0 }, + { "perr_dbp_hint_fl_fifo", 24, 1 }, + { "perr_egr_dbp_tx_coal", 23, 1 }, + { "perr_dbp_fl_fifo", 22, 1 }, + { "perr_eswitch_fifo3", 21, 1 }, + { "perr_eswitch_fifo2", 20, 1 }, + { "perr_eswitch_fifo1", 19, 1 }, + { "perr_eswitch_fifo0", 18, 1 }, + { "perr_pc_dbp1", 17, 1 }, + { "perr_pc_dbp0", 16, 1 }, + { "perr_pc_dbp2", 15, 1 }, + { "perr_conm_sram", 14, 1 }, + { "perr_pc_mc_rsp", 13, 1 }, + { "perr_isw_idma0_fifo", 12, 1 }, + { "perr_isw_idma1_fifo", 11, 1 }, + { "perr_isw_dbp_fifo", 10, 1 }, + { "perr_isw_gts_fifo", 9, 1 }, + { "perr_itp_evr", 8, 1 }, + { "perr_flm_cntxmem", 7, 1 }, + { "perr_flm_l1Cache", 6, 1 }, + { "perr_dbp_hint_fifo", 5, 1 }, + { "perr_dbp_hp_fifo", 4, 1 }, + { "perr_dbp_lp_fifo", 3, 1 }, + { "perr_ing_ctxt_cache", 2, 1 }, + { "perr_egr_ctxt_cache", 1, 1 }, + { "perr_base_size", 0, 1 }, + { "SGE_PERR_ENABLE2", 0x1038, 0 }, + { "perr_dbp_hint_fl_fifo", 24, 1 }, + { "perr_egr_dbp_tx_coal", 23, 1 }, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Sep 13 23:50:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1277F1BC; Sat, 13 Sep 2014 23:50: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 F1B3B9F6; Sat, 13 Sep 2014 23:50:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8DNop4e027861; Sat, 13 Sep 2014 23:50:51 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8DNop7F027860; Sat, 13 Sep 2014 23:50:51 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201409132350.s8DNop7F027860@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 13 Sep 2014 23:50:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271560 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 23:50:52 -0000 Author: allanjude (doc committer) Date: Sat Sep 13 23:50:51 2014 New Revision: 271560 URL: http://svnweb.freebsd.org/changeset/base/271560 Log: Resolve an ambiguity with the definition of a new auth-group Resolve a markup mistake Reviewed by: trasz Approved by: bcr (mentor), wblock (mentor) Sponsored by: ScaleEngine Inc. CR: https://reviews.freebsd.org/D735 Modified: head/usr.sbin/ctld/ctl.conf.5 Modified: head/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- head/usr.sbin/ctld/ctl.conf.5 Sat Sep 13 23:48:43 2014 (r271559) +++ head/usr.sbin/ctld/ctl.conf.5 Sat Sep 13 23:50:51 2014 (r271560) @@ -75,6 +75,7 @@ file is: Create an .Sy auth-group configuration context, +defining a new auth-group, which can then be assigned to any number of targets. .It Ic debug Ar level The debug verbosity level.