From owner-svn-src-all@FreeBSD.ORG Sun May 31 00:52:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 749D3480; Sun, 31 May 2015 00:52:46 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61D5818AA; Sun, 31 May 2015 00:52:46 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4V0qkn7047711; Sun, 31 May 2015 00:52:46 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4V0qk1e047710; Sun, 31 May 2015 00:52:46 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505310052.t4V0qk1e047710@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 31 May 2015 00:52: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: r283796 - stable/10/usr.sbin/pw 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 00:52:46 -0000 Author: bapt Date: Sun May 31 00:52:45 2015 New Revision: 283796 URL: https://svnweb.freebsd.org/changeset/base/283796 Log: MFC: r283695 Remove dead declaration PR: 195928 Modified: stable/10/usr.sbin/pw/pwupd.h Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pw/pwupd.h ============================================================================== --- stable/10/usr.sbin/pw/pwupd.h Sat May 30 23:37:47 2015 (r283795) +++ stable/10/usr.sbin/pw/pwupd.h Sun May 31 00:52:45 2015 (r283796) @@ -93,7 +93,6 @@ char * getpwpath(char const * file); int addgrent(struct group * grp); int delgrent(struct group * grp); int chggrent(char const * name, struct group * grp); -int editgroups(char *name, char **groups); int setgrdir(const char * dir); char * getgrpath(const char *file); From owner-svn-src-all@FreeBSD.ORG Sun May 31 02:21:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CE791B3; Sun, 31 May 2015 02:21:37 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 706151B99; Sun, 31 May 2015 02:21:37 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4V2Lb9j092608; Sun, 31 May 2015 02:21:37 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4V2LaMo092604; Sun, 31 May 2015 02:21:36 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201505310221.t4V2LaMo092604@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Sun, 31 May 2015 02:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283801 - head/contrib/netbsd-tests/lib/libc/c063 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 02:21:37 -0000 Author: araujo (ports committer) Date: Sun May 31 02:21:35 2015 New Revision: 283801 URL: https://svnweb.freebsd.org/changeset/base/283801 Log: Fix warning of implicit declaration of function 'mkdir'. Differential Revision: D2662 Reviewed by: rodrigc, ngie Modified: head/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c head/contrib/netbsd-tests/lib/libc/c063/t_openat.c head/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c head/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c Modified: head/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c Sun May 31 02:15:22 2015 (r283800) +++ head/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c Sun May 31 02:21:35 2015 (r283801) @@ -40,6 +40,9 @@ __RCSID("$NetBSD: t_faccessat.c,v 1.2 20 #include #include #include +#ifdef __FreeBSD__ +#include +#endif #define DIR "dir" #define FILE "dir/faccessat" Modified: head/contrib/netbsd-tests/lib/libc/c063/t_openat.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_openat.c Sun May 31 02:15:22 2015 (r283800) +++ head/contrib/netbsd-tests/lib/libc/c063/t_openat.c Sun May 31 02:21:35 2015 (r283801) @@ -40,6 +40,9 @@ __RCSID("$NetBSD: t_openat.c,v 1.2 2013/ #include #include #include +#ifdef __FreeBSD__ +#include +#endif #define DIR "dir" #define FILE "dir/openat" Modified: head/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c Sun May 31 02:15:22 2015 (r283800) +++ head/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c Sun May 31 02:21:35 2015 (r283801) @@ -40,6 +40,9 @@ __RCSID("$NetBSD: t_readlinkat.c,v 1.3 2 #include #include #include +#ifdef __FreeBSD__ +#include +#endif #define DIR "dir" #define FILE "dir/readlinkat" Modified: head/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c Sun May 31 02:15:22 2015 (r283800) +++ head/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c Sun May 31 02:21:35 2015 (r283801) @@ -40,6 +40,9 @@ __RCSID("$NetBSD: t_unlinkat.c,v 1.2 201 #include #include #include +#ifdef __FreeBSD__ +#include +#endif #define DIR "dir" #define FILE "dir/unlinkat" From owner-svn-src-all@FreeBSD.ORG Sun May 31 06:07:57 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C95251B8 for ; Sun, 31 May 2015 06:07:57 +0000 (UTC) (envelope-from agh@fastmail.fm) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98C9F1BAC for ; Sun, 31 May 2015 06:07:57 +0000 (UTC) (envelope-from agh@fastmail.fm) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id D6A3220915; Sun, 31 May 2015 02:01:07 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Sun, 31 May 2015 02:01:07 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.fm; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=2rxJV AFCItVbpu+CmxlhRdZVJfM=; b=jaGrGCTRCqPPxd0pI7gvX6xD/9NWC20XqDiBz Ipsu3i7rE4U/NPCsAui+aIcuC4yvOBZsxYyI1jhsFZRZIHM+T99uLy0XXBw4Ftf5 RTVvniqvVsKrwcrI4WXQ/Y5RqpI69kAiUpyrINYEdB+xxdcPb6uijOMRAf1pslHy hqlWw0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=2rxJVAFCItVbpu+CmxlhRdZVJfM=; b=m2mUK bjBSxmQxfhYuPV9a7Jidkap8/QQn/X+oZsf1mqcLli0kA7H4kjKT9PD7+6yS7s2E KghTlw2DvpfV1vbCuE1YASVVj7CI5f1SQ2T0z+IkyA9BFH7recqEDbIquVljC5y+ H8N7b6kWQkqvz+W65QO2hG/YgYk5qlqRJdDapk= X-Sasl-enc: B2BiHu6YO+qdI9Wkoc5OG1wYbME9nT2/MkEwIXhOkQku 1433052067 Received: from kropotkin.auxio (unknown [223.252.30.161]) by mail.messagingengine.com (Postfix) with ESMTPA id 2B034C00015; Sun, 31 May 2015 02:01:05 -0400 (EDT) Date: Sun, 31 May 2015 14:01:02 +0800 From: Alastair Hogge To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283572 - head Message-ID: <20150531060102.GS55490@kropotkin.auxio> References: <201505261625.t4QGPTot039810@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201505261625.t4QGPTot039810@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 06:07:57 -0000 On 2015-05-26 Tue 16:25:29 +0000 Baptiste Daroussin , wrote: > Author: bapt > Date: Tue May 26 16:25:28 2015 > New Revision: 283572 > URL: https://svnweb.freebsd.org/changeset/base/283572 > > Log: > Fix build WITHOUT_CDDL by unconditionnaly adding libproc and librtld_db > on supported arches to the prebuild libs Thank you. -- "I keep seeing spots in front of my eyes." "Did you ever see a doctor?" "No, just spots." From owner-svn-src-all@FreeBSD.ORG Sun May 31 07:28:35 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 553E7BFE; Sun, 31 May 2015 07:28:35 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4355C1D1B; Sun, 31 May 2015 07:28:35 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4V7SZh3050272; Sun, 31 May 2015 07:28:35 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4V7SZVA050271; Sun, 31 May 2015 07:28:35 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505310728.t4V7SZVA050271@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 31 May 2015 07:28:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283804 - head/contrib/gcc/config/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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 07:28:35 -0000 Author: andrew Date: Sun May 31 07:28:34 2015 New Revision: 283804 URL: https://svnweb.freebsd.org/changeset/base/283804 Log: Use a spelling of .thumb clang understands. Modified: head/contrib/gcc/config/arm/lib1funcs.asm Modified: head/contrib/gcc/config/arm/lib1funcs.asm ============================================================================== --- head/contrib/gcc/config/arm/lib1funcs.asm Sun May 31 07:16:31 2015 (r283803) +++ head/contrib/gcc/config/arm/lib1funcs.asm Sun May 31 07:28:34 2015 (r283804) @@ -252,7 +252,7 @@ SYM (\name): #ifdef __thumb__ #define THUMB_FUNC .thumb_func -#define THUMB_CODE .force_thumb +#define THUMB_CODE .thumb #else #define THUMB_FUNC #define THUMB_CODE From owner-svn-src-all@FreeBSD.ORG Sun May 31 07:31:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35570E47; Sun, 31 May 2015 07:31:21 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23CB71E80; Sun, 31 May 2015 07:31:21 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4V7VLH9052643; Sun, 31 May 2015 07:31:21 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4V7VKB5052642; Sun, 31 May 2015 07:31:21 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505310731.t4V7VKB5052642@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 31 May 2015 07:31:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283805 - head/sys/libkern/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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 07:31:21 -0000 Author: andrew Date: Sun May 31 07:31:20 2015 New Revision: 283805 URL: https://svnweb.freebsd.org/changeset/base/283805 Log: Add more __aeabi_memcpy functions, later versions of clang generate calls to these functions. Modified: head/sys/libkern/arm/memcpy.S Modified: head/sys/libkern/arm/memcpy.S ============================================================================== --- head/sys/libkern/arm/memcpy.S Sun May 31 07:28:34 2015 (r283804) +++ head/sys/libkern/arm/memcpy.S Sun May 31 07:31:20 2015 (r283805) @@ -31,7 +31,11 @@ __FBSDID("$FreeBSD$"); #ifdef __ARM_EABI__ ENTRY_NP(__aeabi_memcpy) +EENTRY_NP(__aeabi_memcpy4) +EENTRY_NP(__aeabi_memcpy8) b memcpy +EEND(__aeabi_memcpy8) +EEND(__aeabi_memcpy4) END(__aeabi_memcpy) #endif From owner-svn-src-all@FreeBSD.ORG Sun May 31 08:10:35 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE526468; Sun, 31 May 2015 08:10:35 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB673164C; Sun, 31 May 2015 08:10:35 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4V8AZlZ074649; Sun, 31 May 2015 08:10:35 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4V8AZWR074647; Sun, 31 May 2015 08:10:35 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505310810.t4V8AZWR074647@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 08:10:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283806 - head/contrib/traceroute 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 08:10:36 -0000 Author: tuexen Date: Sun May 31 08:10:35 2015 New Revision: 283806 URL: https://svnweb.freebsd.org/changeset/base/283806 Log: When the packet verification fails in verbose mode, print the correct number of words in host byte order. Also remove a stray 'x'. MFC after: 3 days Modified: head/contrib/traceroute/traceroute.c Modified: head/contrib/traceroute/traceroute.c ============================================================================== --- head/contrib/traceroute/traceroute.c Sun May 31 07:31:20 2015 (r283805) +++ head/contrib/traceroute/traceroute.c Sun May 31 08:10:35 2015 (r283806) @@ -1346,8 +1346,8 @@ packet_ok(register u_char *buf, int cc, Printf("\n%d bytes from %s to ", cc, inet_ntoa(from->sin_addr)); Printf("%s: icmp type %d (%s) code %d\n", inet_ntoa(ip->ip_dst), type, pr_type(type), icp->icmp_code); - for (i = 4; i < cc ; i += sizeof(*lp)) - Printf("%2d: x%8.8x\n", i, *lp++); + for (i = 4; i <= cc - ICMP_MINLEN; i += sizeof(*lp)) + Printf("%2d: %8.8x\n", i, ntohl(*lp++)); } #endif return(0); From owner-svn-src-all@FreeBSD.ORG Sun May 31 09:07:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07973A4D; Sun, 31 May 2015 09:07:28 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF4A5127A; Sun, 31 May 2015 09:07:27 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4V97Rfp003438; Sun, 31 May 2015 09:07:27 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4V97RLB003435; Sun, 31 May 2015 09:07:27 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505310907.t4V97RLB003435@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 31 May 2015 09:07:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283807 - head/lib/libc/arm/aeabi 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 09:07:28 -0000 Author: andrew Date: Sun May 31 09:07:26 2015 New Revision: 283807 URL: https://svnweb.freebsd.org/changeset/base/283807 Log: Use a register to set the cpsr bits. The ip register is safe to be changed within all of these functions, and is only stored in some to correctly pad the stack. This will be needed to build as Thumb-2 as, unlike with ARM instructions, the msr instruction only takes a register as the input. Modified: head/lib/libc/arm/aeabi/aeabi_asm_double.S head/lib/libc/arm/aeabi/aeabi_asm_float.S Modified: head/lib/libc/arm/aeabi/aeabi_asm_double.S ============================================================================== --- head/lib/libc/arm/aeabi/aeabi_asm_double.S Sun May 31 08:10:35 2015 (r283806) +++ head/lib/libc/arm/aeabi/aeabi_asm_double.S Sun May 31 09:07:26 2015 (r283807) @@ -56,7 +56,7 @@ ENTRY(__aeabi_cdcmple) cmp r0, #1 bne 1f /* Yes, clear Z and C */ - msr cpsr_c, #(0) + mov ip, #(0) b 99f 1: @@ -70,14 +70,15 @@ ENTRY(__aeabi_cdcmple) cmp r0, #1 bne 2f /* Yes, set Z and C */ - msr cpsr_c, #(PCR_Z | PCR_C) + mov ip, #(PCR_Z | PCR_C) b 99f 2: /* Not less than or equal, set C and clear Z */ - msr cpsr_c, #(PCR_C) + mov ip, #(PCR_C) 99: + msr cpsr_c, ip pop {r4, r5, r6, r7, ip, pc} END(__aeabi_cdcmple) @@ -112,6 +113,7 @@ ENTRY(__aeabi_cdcmpeq) RET 1: - msr cpsr_c, #(PCR_C) + mov ip, #(PCR_C) + msr cpsr_c, ip RET END(__aeabi_cdcmpeq) Modified: head/lib/libc/arm/aeabi/aeabi_asm_float.S ============================================================================== --- head/lib/libc/arm/aeabi/aeabi_asm_float.S Sun May 31 08:10:35 2015 (r283806) +++ head/lib/libc/arm/aeabi/aeabi_asm_float.S Sun May 31 09:07:26 2015 (r283807) @@ -54,7 +54,7 @@ ENTRY(__aeabi_cfcmple) cmp r0, #1 bne 1f /* Yes, clear Z and C */ - msr cpsr_c, #(0) + mov ip, #(0) b 99f 1: @@ -66,14 +66,15 @@ ENTRY(__aeabi_cfcmple) cmp r0, #1 bne 2f /* Yes, set Z and C */ - msr cpsr_c, #(PCR_Z | PCR_C) + mov ip, #(PCR_Z | PCR_C) b 99f 2: /* Not less than or equal, set C and clear Z */ - msr cpsr_c, #(PCR_C) + mov ip, #(PCR_C) 99: + msr cpsr_c, ip pop {r4, r5, ip, pc} END(__aeabi_cfcmple) @@ -103,6 +104,7 @@ ENTRY(__aeabi_cfcmpeq) RET 1: - msreq cpsr_c, #(PCR_C) + mov ip, #(PCR_C) + msr cpsr_c, ip RET END(__aeabi_cfcmpeq) From owner-svn-src-all@FreeBSD.ORG Sun May 31 09:12:47 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F980BFE; Sun, 31 May 2015 09:12:47 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BC2214D0; Sun, 31 May 2015 09:12:47 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4V9Clq9007978; Sun, 31 May 2015 09:12:47 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4V9Ck7f007976; Sun, 31 May 2015 09:12:46 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505310912.t4V9Ck7f007976@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 09:12:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283808 - head/contrib/traceroute 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 09:12:47 -0000 Author: tuexen Date: Sun May 31 09:12:46 2015 New Revision: 283808 URL: https://svnweb.freebsd.org/changeset/base/283808 Log: Don't send malformed SCTP probe packets. MFC after: 3 days Modified: head/contrib/traceroute/traceroute.8 head/contrib/traceroute/traceroute.c Modified: head/contrib/traceroute/traceroute.8 ============================================================================== --- head/contrib/traceroute/traceroute.8 Sun May 31 09:07:26 2015 (r283807) +++ head/contrib/traceroute/traceroute.8 Sun May 31 09:12:46 2015 (r283808) @@ -16,7 +16,7 @@ .\" $Id: traceroute.8,v 1.19 2000/09/21 08:44:19 leres Exp $ .\" $FreeBSD$ .\" -.Dd June 19, 2012 +.Dd May 31, 2015 .Dt TRACEROUTE 8 .Os .Sh NAME @@ -65,7 +65,7 @@ Turn on AS# lookups and use the giv default. .It Fl e Firewall evasion mode. -Use fixed destination ports for UDP and TCP probes. +Use fixed destination ports for UDP, TCP and SCTP probes. The destination port does NOT increment with each packet sent. .It Fl f Ar first_ttl Set the initial time-to-live used in the first outgoing probe packet. @@ -110,14 +110,14 @@ Print hop addresses numerically rather t path). .It Fl P Ar proto Send packets of specified IP protocol. The currently supported protocols -are: UDP, TCP, GRE and ICMP. Other protocols may also be specified (either by -name or by number), though +are: UDP, TCP, SCTP, GRE and ICMP. Other protocols may also be specified +(either by name or by number), though .Nm does not implement any special knowledge of their packet formats. This option is useful for determining which router along a path may be blocking packets based on IP protocol number. But see BUGS below. .It Fl p Ar port -Protocol specific. For UDP and TCP, sets +Protocol specific. For UDP, TCP and SCTP, sets the base .Ar port number used in probes (default is 33434). Modified: head/contrib/traceroute/traceroute.c ============================================================================== --- head/contrib/traceroute/traceroute.c Sun May 31 09:07:26 2015 (r283807) +++ head/contrib/traceroute/traceroute.c Sun May 31 09:12:46 2015 (r283808) @@ -219,6 +219,7 @@ static const char rcsid[] = #include #include #include +#include #include #include #include @@ -367,6 +368,7 @@ void freehostinfo(struct hostinfo *); void getaddr(u_int32_t *, char *); struct hostinfo *gethostinfo(char *); u_short in_cksum(u_short *, int); +u_int32_t sctp_crc32c(const void *, u_int32_t); char *inetname(struct in_addr); int main(int, char **); u_short p_cksum(struct ip *, u_short *, int); @@ -391,6 +393,8 @@ void udp_prep(struct outdata *); int udp_check(const u_char *, int); void tcp_prep(struct outdata *); int tcp_check(const u_char *, int); +void sctp_prep(struct outdata *); +int sctp_check(const u_char *, int); void gre_prep(struct outdata *); int gre_check(const u_char *, int); void gen_prep(struct outdata *); @@ -433,6 +437,15 @@ struct outproto protos[] = { tcp_check }, { + "sctp", + "spt dpt vtag crc tyfllen tyfllen ", + IPPROTO_SCTP, + sizeof(struct sctphdr), + 32768 + 666, + sctp_prep, + sctp_check + }, + { "gre", "flg pro len clid", IPPROTO_GRE, @@ -707,6 +720,11 @@ main(int argc, char **argv) #endif protlen = packlen - sizeof(*outip) - optlen; + if ((proto->num == IPPROTO_SCTP) && (packlen & 3)) { + Fprintf(stderr, "%s: packet length must be a multiple of 4\n", + prog); + exit(1); + } outip = (struct ip *)malloc((unsigned)packlen); if (outip == NULL) { @@ -1432,6 +1450,47 @@ tcp_check(const u_char *data, int seq) } void +sctp_prep(struct outdata *outdata) +{ + struct sctphdr *const sctp = (struct sctphdr *) outp; + struct sctp_chunkhdr *chk; + + sctp->src_port = htons(ident); + sctp->dest_port = htons(port + (fixedPort ? 0 : outdata->seq)); + sctp->v_tag = (sctp->src_port << 16) | sctp->dest_port; + sctp->checksum = htonl(0); + if (protlen >= + (int)(sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr))) { + chk = (struct sctp_chunkhdr *)(sctp + 1); + chk->chunk_type = SCTP_SHUTDOWN_ACK; + chk->chunk_flags = 0; + chk->chunk_length = htons(4); + } + if (protlen >= + (int)(sizeof(struct sctphdr) + 2 * sizeof(struct sctp_chunkhdr))) { + chk = chk + 1; + chk->chunk_type = SCTP_PAD_CHUNK; + chk->chunk_flags = 0; + chk->chunk_length = htons(protlen - + (sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr))); + } + if (doipcksum) { + sctp->checksum = sctp_crc32c(sctp, protlen); + } +} + +int +sctp_check(const u_char *data, int seq) +{ + struct sctphdr *const sctp = (struct sctphdr *) data; + + return (ntohs(sctp->src_port) == ident + && ntohs(sctp->dest_port) == port + (fixedPort ? 0 : seq) + && sctp->v_tag == + (u_int32_t)((sctp->src_port << 16) | sctp->dest_port)); +} + +void gre_prep(struct outdata *outdata) { struct grehdr *const gre = (struct grehdr *) outp; @@ -1550,6 +1609,98 @@ in_cksum(register u_short *addr, registe } /* + * CRC32C routine for the Stream Control Transmission Protocol + */ + +#define CRC32C(c, d) (c = (c>>8) ^ crc_c[(c^(d))&0xFF]) + +static u_int32_t crc_c[256] = { + 0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, + 0xC79A971F, 0x35F1141C, 0x26A1E7E8, 0xD4CA64EB, + 0x8AD958CF, 0x78B2DBCC, 0x6BE22838, 0x9989AB3B, + 0x4D43CFD0, 0xBF284CD3, 0xAC78BF27, 0x5E133C24, + 0x105EC76F, 0xE235446C, 0xF165B798, 0x030E349B, + 0xD7C45070, 0x25AFD373, 0x36FF2087, 0xC494A384, + 0x9A879FA0, 0x68EC1CA3, 0x7BBCEF57, 0x89D76C54, + 0x5D1D08BF, 0xAF768BBC, 0xBC267848, 0x4E4DFB4B, + 0x20BD8EDE, 0xD2D60DDD, 0xC186FE29, 0x33ED7D2A, + 0xE72719C1, 0x154C9AC2, 0x061C6936, 0xF477EA35, + 0xAA64D611, 0x580F5512, 0x4B5FA6E6, 0xB93425E5, + 0x6DFE410E, 0x9F95C20D, 0x8CC531F9, 0x7EAEB2FA, + 0x30E349B1, 0xC288CAB2, 0xD1D83946, 0x23B3BA45, + 0xF779DEAE, 0x05125DAD, 0x1642AE59, 0xE4292D5A, + 0xBA3A117E, 0x4851927D, 0x5B016189, 0xA96AE28A, + 0x7DA08661, 0x8FCB0562, 0x9C9BF696, 0x6EF07595, + 0x417B1DBC, 0xB3109EBF, 0xA0406D4B, 0x522BEE48, + 0x86E18AA3, 0x748A09A0, 0x67DAFA54, 0x95B17957, + 0xCBA24573, 0x39C9C670, 0x2A993584, 0xD8F2B687, + 0x0C38D26C, 0xFE53516F, 0xED03A29B, 0x1F682198, + 0x5125DAD3, 0xA34E59D0, 0xB01EAA24, 0x42752927, + 0x96BF4DCC, 0x64D4CECF, 0x77843D3B, 0x85EFBE38, + 0xDBFC821C, 0x2997011F, 0x3AC7F2EB, 0xC8AC71E8, + 0x1C661503, 0xEE0D9600, 0xFD5D65F4, 0x0F36E6F7, + 0x61C69362, 0x93AD1061, 0x80FDE395, 0x72966096, + 0xA65C047D, 0x5437877E, 0x4767748A, 0xB50CF789, + 0xEB1FCBAD, 0x197448AE, 0x0A24BB5A, 0xF84F3859, + 0x2C855CB2, 0xDEEEDFB1, 0xCDBE2C45, 0x3FD5AF46, + 0x7198540D, 0x83F3D70E, 0x90A324FA, 0x62C8A7F9, + 0xB602C312, 0x44694011, 0x5739B3E5, 0xA55230E6, + 0xFB410CC2, 0x092A8FC1, 0x1A7A7C35, 0xE811FF36, + 0x3CDB9BDD, 0xCEB018DE, 0xDDE0EB2A, 0x2F8B6829, + 0x82F63B78, 0x709DB87B, 0x63CD4B8F, 0x91A6C88C, + 0x456CAC67, 0xB7072F64, 0xA457DC90, 0x563C5F93, + 0x082F63B7, 0xFA44E0B4, 0xE9141340, 0x1B7F9043, + 0xCFB5F4A8, 0x3DDE77AB, 0x2E8E845F, 0xDCE5075C, + 0x92A8FC17, 0x60C37F14, 0x73938CE0, 0x81F80FE3, + 0x55326B08, 0xA759E80B, 0xB4091BFF, 0x466298FC, + 0x1871A4D8, 0xEA1A27DB, 0xF94AD42F, 0x0B21572C, + 0xDFEB33C7, 0x2D80B0C4, 0x3ED04330, 0xCCBBC033, + 0xA24BB5A6, 0x502036A5, 0x4370C551, 0xB11B4652, + 0x65D122B9, 0x97BAA1BA, 0x84EA524E, 0x7681D14D, + 0x2892ED69, 0xDAF96E6A, 0xC9A99D9E, 0x3BC21E9D, + 0xEF087A76, 0x1D63F975, 0x0E330A81, 0xFC588982, + 0xB21572C9, 0x407EF1CA, 0x532E023E, 0xA145813D, + 0x758FE5D6, 0x87E466D5, 0x94B49521, 0x66DF1622, + 0x38CC2A06, 0xCAA7A905, 0xD9F75AF1, 0x2B9CD9F2, + 0xFF56BD19, 0x0D3D3E1A, 0x1E6DCDEE, 0xEC064EED, + 0xC38D26C4, 0x31E6A5C7, 0x22B65633, 0xD0DDD530, + 0x0417B1DB, 0xF67C32D8, 0xE52CC12C, 0x1747422F, + 0x49547E0B, 0xBB3FFD08, 0xA86F0EFC, 0x5A048DFF, + 0x8ECEE914, 0x7CA56A17, 0x6FF599E3, 0x9D9E1AE0, + 0xD3D3E1AB, 0x21B862A8, 0x32E8915C, 0xC083125F, + 0x144976B4, 0xE622F5B7, 0xF5720643, 0x07198540, + 0x590AB964, 0xAB613A67, 0xB831C993, 0x4A5A4A90, + 0x9E902E7B, 0x6CFBAD78, 0x7FAB5E8C, 0x8DC0DD8F, + 0xE330A81A, 0x115B2B19, 0x020BD8ED, 0xF0605BEE, + 0x24AA3F05, 0xD6C1BC06, 0xC5914FF2, 0x37FACCF1, + 0x69E9F0D5, 0x9B8273D6, 0x88D28022, 0x7AB90321, + 0xAE7367CA, 0x5C18E4C9, 0x4F48173D, 0xBD23943E, + 0xF36E6F75, 0x0105EC76, 0x12551F82, 0xE03E9C81, + 0x34F4F86A, 0xC69F7B69, 0xD5CF889D, 0x27A40B9E, + 0x79B737BA, 0x8BDCB4B9, 0x988C474D, 0x6AE7C44E, + 0xBE2DA0A5, 0x4C4623A6, 0x5F16D052, 0xAD7D5351 +}; + +u_int32_t +sctp_crc32c(const void *packet, u_int32_t len) +{ + u_int32_t i, crc32c; + u_int8_t byte0, byte1, byte2, byte3; + const u_int8_t *buf = (const u_int8_t *)packet; + + crc32c = ~0; + for (i = 0; i < len; i++) + CRC32C(crc32c, buf[i]); + crc32c = ~crc32c; + byte0 = crc32c & 0xff; + byte1 = (crc32c>>8) & 0xff; + byte2 = (crc32c>>16) & 0xff; + byte3 = (crc32c>>24) & 0xff; + crc32c = ((byte0 << 24) | (byte1 << 16) | (byte2 << 8) | byte3); + return htonl(crc32c); +} + +/* * Subtract 2 timeval structs: out = out - in. * Out is assumed to be within about LONG_MAX seconds of in. */ From owner-svn-src-all@FreeBSD.ORG Sun May 31 10:02:02 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BC8192E; Sun, 31 May 2015 10:02:02 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29D551FF5; Sun, 31 May 2015 10:02:02 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VA22sL034663; Sun, 31 May 2015 10:02:02 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VA22fM034662; Sun, 31 May 2015 10:02:02 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505311002.t4VA22fM034662@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 31 May 2015 10:02:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283809 - head/usr.sbin/pw 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 10:02:02 -0000 Author: bapt Date: Sun May 31 10:02:01 2015 New Revision: 283809 URL: https://svnweb.freebsd.org/changeset/base/283809 Log: Use asprintf instead of malloc + snprintf and test the memory allocation Modified: head/usr.sbin/pw/pw.c Modified: head/usr.sbin/pw/pw.c ============================================================================== --- head/usr.sbin/pw/pw.c Sun May 31 09:12:46 2015 (r283808) +++ head/usr.sbin/pw/pw.c Sun May 31 10:02:01 2015 (r283809) @@ -221,8 +221,9 @@ main(int argc, char *argv[]) char * etcpath = getarg(&arglist, 'V')->val; if (*etcpath) { if (config == NULL) { /* Only override config location if -C not specified */ - config = malloc(MAXPATHLEN); - snprintf(config, MAXPATHLEN, "%s/pw.conf", etcpath); + asprintf(&config, "%s/pw.conf", etcpath); + if (config == NULL) + errx(EX_OSERR, "out of memory"); } memcpy(&PWF, &VPWF, sizeof PWF); setpwdir(etcpath); From owner-svn-src-all@FreeBSD.ORG Sun May 31 10:14:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C7D7BDE; Sun, 31 May 2015 10:14:14 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69DA3122C; Sun, 31 May 2015 10:14:14 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VAEEWe040386; Sun, 31 May 2015 10:14:14 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VAEEvY040385; Sun, 31 May 2015 10:14:14 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505311014.t4VAEEvY040385@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 31 May 2015 10:14:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283810 - head/usr.sbin/pw 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 10:14:14 -0000 Author: bapt Date: Sun May 31 10:14:13 2015 New Revision: 283810 URL: https://svnweb.freebsd.org/changeset/base/283810 Log: Remove uneeded intermediate variable Modified: head/usr.sbin/pw/grupd.c Modified: head/usr.sbin/pw/grupd.c ============================================================================== --- head/usr.sbin/pw/grupd.c Sun May 31 10:02:01 2015 (r283809) +++ head/usr.sbin/pw/grupd.c Sun May 31 10:14:13 2015 (r283810) @@ -116,9 +116,6 @@ chggrent(char const * login, struct grou int delgrent(struct group * grp) { - char group[MAXLOGNAME]; - strlcpy(group, grp->gr_name, MAXLOGNAME); - - return gr_update(NULL, group); + return (gr_update(NULL, grp->gr_name)); } From owner-svn-src-all@FreeBSD.ORG Sun May 31 10:18:11 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72909E8D; Sun, 31 May 2015 10:18:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FDB51253; Sun, 31 May 2015 10:18:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VAIB2F041260; Sun, 31 May 2015 10:18:11 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VAIBJN041259; Sun, 31 May 2015 10:18:11 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505311018.t4VAIBJN041259@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 31 May 2015 10:18:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283811 - head/usr.sbin/pw 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 10:18:11 -0000 Author: bapt Date: Sun May 31 10:18:10 2015 New Revision: 283811 URL: https://svnweb.freebsd.org/changeset/base/283811 Log: Remove uneeded intermediate variable Modified: head/usr.sbin/pw/pwupd.c Modified: head/usr.sbin/pw/pwupd.c ============================================================================== --- head/usr.sbin/pw/pwupd.c Sun May 31 10:14:13 2015 (r283810) +++ head/usr.sbin/pw/pwupd.c Sun May 31 10:18:10 2015 (r283811) @@ -162,9 +162,6 @@ chgpwent(char const * login, struct pass int delpwent(struct passwd * pwd) { - char login[MAXLOGNAME]; - - strlcpy(login, pwd->pw_name, MAXLOGNAME); - return (pw_update(NULL, login)); + return (pw_update(NULL, pwd->pw_name)); } From owner-svn-src-all@FreeBSD.ORG Sun May 31 10:51:07 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BCAD336B; Sun, 31 May 2015 10:51:07 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FFF719CC; Sun, 31 May 2015 10:51:07 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VAp7CE060747; Sun, 31 May 2015 10:51:07 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VAp6Kc060744; Sun, 31 May 2015 10:51:06 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505311051.t4VAp6Kc060744@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 31 May 2015 10:51:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283812 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 10:51:07 -0000 Author: andrew Date: Sun May 31 10:51:06 2015 New Revision: 283812 URL: https://svnweb.freebsd.org/changeset/base/283812 Log: We only support the ARM EABI in head, remove the check on __ARM_EABI__. Modified: head/sys/arm/include/_types.h head/sys/arm/include/asm.h head/sys/arm/include/proc.h Modified: head/sys/arm/include/_types.h ============================================================================== --- head/sys/arm/include/_types.h Sun May 31 10:18:10 2015 (r283811) +++ head/sys/arm/include/_types.h Sun May 31 10:51:06 2015 (r283812) @@ -105,15 +105,9 @@ typedef __uint32_t __vm_paddr_t; typedef __uint64_t __vm_pindex_t; typedef __uint32_t __vm_size_t; -#ifdef __ARM_EABI__ typedef unsigned int ___wchar_t; #define __WCHAR_MIN 0 /* min value for a wchar_t */ #define __WCHAR_MAX __UINT_MAX /* max value for a wchar_t */ -#else -typedef int ___wchar_t; -#define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ -#define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ -#endif /* * Unusual type definitions. Modified: head/sys/arm/include/asm.h ============================================================================== --- head/sys/arm/include/asm.h Sun May 31 10:18:10 2015 (r283811) +++ head/sys/arm/include/asm.h Sun May 31 10:51:06 2015 (r283812) @@ -49,7 +49,7 @@ # define _ALIGN_TEXT .align 2 #endif -#if defined(__ARM_EABI__) && !defined(_STANDALONE) +#ifndef _STANDALONE #define STOP_UNWINDING .cantunwind #define _FNSTART .fnstart #define _FNEND .fnend Modified: head/sys/arm/include/proc.h ============================================================================== --- head/sys/arm/include/proc.h Sun May 31 10:18:10 2015 (r283811) +++ head/sys/arm/include/proc.h Sun May 31 10:51:06 2015 (r283812) @@ -61,11 +61,7 @@ struct mdproc { void *md_sigtramp; }; -#ifdef __ARM_EABI__ #define KINFO_PROC_SIZE 816 -#else -#define KINFO_PROC_SIZE 792 -#endif #define MAXARGS 8 /* From owner-svn-src-all@FreeBSD.ORG Sun May 31 10:51:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D24834AA; Sun, 31 May 2015 10:51:37 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFB3F1AC6; Sun, 31 May 2015 10:51:37 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VApbBp061368; Sun, 31 May 2015 10:51:37 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VApbNU061367; Sun, 31 May 2015 10:51:37 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505311051.t4VApbNU061367@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 10:51:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283813 - head/contrib/traceroute 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 10:51:37 -0000 Author: tuexen Date: Sun May 31 10:51:36 2015 New Revision: 283813 URL: https://svnweb.freebsd.org/changeset/base/283813 Log: Use an empty string for field descriptions of unknown protocols. MFC after: 3 days Modified: head/contrib/traceroute/traceroute.c Modified: head/contrib/traceroute/traceroute.c ============================================================================== --- head/contrib/traceroute/traceroute.c Sun May 31 10:51:06 2015 (r283812) +++ head/contrib/traceroute/traceroute.c Sun May 31 10:51:36 2015 (r283813) @@ -465,7 +465,7 @@ struct outproto protos[] = { }, { NULL, - NULL, + "", 0, 2 * sizeof(u_short), 0, From owner-svn-src-all@FreeBSD.ORG Sun May 31 11:23:20 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FBBB877; Sun, 31 May 2015 11:23:20 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 103491170; Sun, 31 May 2015 11:23:20 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VBNJSS077774; Sun, 31 May 2015 11:23:19 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VBNJd3077772; Sun, 31 May 2015 11:23:19 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505311123.t4VBNJd3077772@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 31 May 2015 11:23:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283814 - head/usr.sbin/pw 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 11:23:20 -0000 Author: bapt Date: Sun May 31 11:23:19 2015 New Revision: 283814 URL: https://svnweb.freebsd.org/changeset/base/283814 Log: Make pw_user()/pw_group() more consitent about errors Some of errors were returned to the main function, some others caused a direct exit via err(3). The main function is only interested in EXIT_SUCCESS, so in all other cases replace warn(3) + return err by err(3) Modified: head/usr.sbin/pw/pw_group.c head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Sun May 31 10:51:36 2015 (r283813) +++ head/usr.sbin/pw/pw_group.c Sun May 31 11:23:19 2015 (r283814) @@ -135,8 +135,7 @@ pw_group(struct userconf * cnf, int mode if (rc == -1) err(EX_IOERR, "group '%s' not available (NIS?)", grp->gr_name); else if (rc != 0) { - warn("group update"); - return EX_IOERR; + err(EX_IOERR, "group update"); } pw_log(cnf, mode, W_GROUP, "%s(%ld) removed", a_name->val, (long) gid); return EXIT_SUCCESS; @@ -201,10 +200,8 @@ pw_group(struct userconf * cnf, int mode fputc('\n', stdout); fflush(stdout); } - if (b < 0) { - warn("-h file descriptor"); - return EX_OSERR; - } + if (b < 0) + err(EX_OSERR, "-h file descriptor"); line[b] = '\0'; if ((p = strpbrk(line, " \t\r\n")) != NULL) *p = '\0'; @@ -265,16 +262,16 @@ pw_group(struct userconf * cnf, int mode if (mode == M_ADD && (rc = addgrent(grp)) != 0) { if (rc == -1) - warnx("group '%s' already exists", grp->gr_name); + errx(EX_IOERR, "group '%s' already exists", + grp->gr_name); else - warn("group update"); - return EX_IOERR; + err(EX_IOERR, "group update"); } else if (mode == M_UPDATE && (rc = chggrent(a_name->val, grp)) != 0) { if (rc == -1) - warnx("group '%s' not available (NIS?)", grp->gr_name); + errx(EX_IOERR, "group '%s' not available (NIS?)", + grp->gr_name); else - warn("group update"); - return EX_IOERR; + err(EX_IOERR, "group update"); } arg = a_newname != NULL ? a_newname : a_name; Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sun May 31 10:51:36 2015 (r283813) +++ head/usr.sbin/pw/pw_user.c Sun May 31 11:23:19 2015 (r283814) @@ -286,8 +286,7 @@ pw_user(struct userconf * cnf, int mode, arg = getarg(args, 'C'); if (write_userconfig(arg ? arg->val : NULL)) return EXIT_SUCCESS; - warn("config update"); - return EX_IOERR; + err(EX_IOERR, "config udpate"); } if (mode == M_PRINT && getarg(args, 'a')) { @@ -416,10 +415,8 @@ pw_user(struct userconf * cnf, int mode, rc = delpwent(pwd); if (rc == -1) err(EX_IOERR, "user '%s' does not exist", pwd->pw_name); - else if (rc != 0) { - warn("passwd update"); - return EX_IOERR; - } + else if (rc != 0) + err(EX_IOERR, "passwd update"); if (cnf->nispasswd && *cnf->nispasswd=='/') { rc = delnispwent(cnf->nispasswd, a_name->val); @@ -672,11 +669,9 @@ pw_user(struct userconf * cnf, int mode, fputc('\n', stdout); fflush(stdout); } - if (b < 0) { - warn("-%c file descriptor", precrypt ? 'H' : - 'h'); - return EX_IOERR; - } + if (b < 0) + err(EX_IOERR, "-%c file descriptor", + precrypt ? 'H' : 'h'); line[b] = '\0'; if ((p = strpbrk(line, "\r\n")) != NULL) *p = '\0'; @@ -709,13 +704,11 @@ pw_user(struct userconf * cnf, int mode, if (mode == M_ADD) { edited = 1; /* Always */ rc = addpwent(pwd); - if (rc == -1) { - warnx("user '%s' already exists", pwd->pw_name); - return EX_IOERR; - } else if (rc != 0) { - warn("passwd file update"); - return EX_IOERR; - } + if (rc == -1) + errx(EX_IOERR, "user '%s' already exists", + pwd->pw_name); + else if (rc != 0) + err(EX_IOERR, "passwd file update"); if (cnf->nispasswd && *cnf->nispasswd=='/') { rc = addnispwent(cnf->nispasswd, pwd); if (rc == -1) @@ -727,13 +720,10 @@ pw_user(struct userconf * cnf, int mode, } else if (mode == M_UPDATE || mode == M_LOCK || mode == M_UNLOCK) { if (edited) { /* Only updated this if required */ rc = chgpwent(a_name->val, pwd); - if (rc == -1) { - warnx("user '%s' does not exist (NIS?)", pwd->pw_name); - return EX_IOERR; - } else if (rc != 0) { - warn("passwd file update"); - return EX_IOERR; - } + if (rc == -1) + errx(EX_IOERR, "user '%s' does not exist (NIS?)", pwd->pw_name); + else if (rc != 0) + err(EX_IOERR, "passwd file update"); if ( cnf->nispasswd && *cnf->nispasswd=='/') { rc = chgnispwent(cnf->nispasswd, a_name->val, pwd); if (rc == -1) From owner-svn-src-all@FreeBSD.ORG Sun May 31 11:55:29 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F07ECB9; Sun, 31 May 2015 11:55:29 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7FF631844; Sun, 31 May 2015 11:55:29 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VBtTw1094107; Sun, 31 May 2015 11:55:29 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VBtT2u094106; Sun, 31 May 2015 11:55:29 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505311155.t4VBtT2u094106@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 31 May 2015 11:55:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283815 - head/usr.sbin/pw 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 11:55:29 -0000 Author: bapt Date: Sun May 31 11:55:28 2015 New Revision: 283815 URL: https://svnweb.freebsd.org/changeset/base/283815 Log: Return early in case we cannot read the configuration file This drops one level of indentation Modified: head/usr.sbin/pw/pw_conf.c Modified: head/usr.sbin/pw/pw_conf.c ============================================================================== --- head/usr.sbin/pw/pw_conf.c Sun May 31 11:23:19 2015 (r283814) +++ head/usr.sbin/pw/pw_conf.c Sun May 31 11:55:28 2015 (r283815) @@ -241,126 +241,127 @@ read_userconfig(char const * file) if (file == NULL) file = _PATH_PW_CONF; - if ((fp = fopen(file, "r")) != NULL) { - while ((linelen = getline(&buf, &linecap, fp)) > 0) { - if (*buf && (p = strtok(buf, " \t\r\n=")) != NULL && *p != '#') { - static char const toks[] = " \t\r\n,="; - char *q = strtok(NULL, toks); - int i = 0; - mode_t *modeset; + if ((fp = fopen(file, "r")) == NULL) + return (&config); - while (i < _UC_FIELDS && strcmp(p, kwds[i]) != 0) - ++i; + while ((linelen = getline(&buf, &linecap, fp)) > 0) { + if (*buf && (p = strtok(buf, " \t\r\n=")) != NULL && *p != '#') { + static char const toks[] = " \t\r\n,="; + char *q = strtok(NULL, toks); + int i = 0; + mode_t *modeset; + + while (i < _UC_FIELDS && strcmp(p, kwds[i]) != 0) + ++i; #if debugging - if (i == _UC_FIELDS) - printf("Got unknown kwd `%s' val=`%s'\n", p, q ? q : ""); - else - printf("Got kwd[%s]=%s\n", p, q); + if (i == _UC_FIELDS) + printf("Got unknown kwd `%s' val=`%s'\n", p, q ? q : ""); + else + printf("Got kwd[%s]=%s\n", p, q); #endif - switch (i) { - case _UC_DEFAULTPWD: - config.default_password = boolean_val(q, 1); - break; - case _UC_REUSEUID: - config.reuse_uids = boolean_val(q, 0); - break; - case _UC_REUSEGID: - config.reuse_gids = boolean_val(q, 0); - break; - case _UC_NISPASSWD: - config.nispasswd = (q == NULL || !boolean_val(q, 1)) - ? NULL : newstr(q); - break; - case _UC_DOTDIR: - config.dotdir = (q == NULL || !boolean_val(q, 1)) - ? NULL : newstr(q); - break; + switch (i) { + case _UC_DEFAULTPWD: + config.default_password = boolean_val(q, 1); + break; + case _UC_REUSEUID: + config.reuse_uids = boolean_val(q, 0); + break; + case _UC_REUSEGID: + config.reuse_gids = boolean_val(q, 0); + break; + case _UC_NISPASSWD: + config.nispasswd = (q == NULL || !boolean_val(q, 1)) + ? NULL : newstr(q); + break; + case _UC_DOTDIR: + config.dotdir = (q == NULL || !boolean_val(q, 1)) + ? NULL : newstr(q); + break; case _UC_NEWMAIL: - config.newmail = (q == NULL || !boolean_val(q, 1)) - ? NULL : newstr(q); - break; - case _UC_LOGFILE: - config.logfile = (q == NULL || !boolean_val(q, 1)) - ? NULL : newstr(q); - break; - case _UC_HOMEROOT: - config.home = (q == NULL || !boolean_val(q, 1)) - ? "/home" : newstr(q); - break; - case _UC_HOMEMODE: - modeset = setmode(q); - config.homemode = (q == NULL || !boolean_val(q, 1)) - ? _DEF_DIRMODE : getmode(modeset, _DEF_DIRMODE); - free(modeset); - break; - case _UC_SHELLPATH: - config.shelldir = (q == NULL || !boolean_val(q, 1)) - ? "/bin" : newstr(q); - break; - case _UC_SHELLS: - for (i = 0; i < _UC_MAXSHELLS && q != NULL; i++, q = strtok(NULL, toks)) - system_shells[i] = newstr(q); - if (i > 0) - while (i < _UC_MAXSHELLS) - system_shells[i++] = NULL; - break; - case _UC_DEFAULTSHELL: - config.shell_default = (q == NULL || !boolean_val(q, 1)) - ? (char *) bourne_shell : newstr(q); - break; - case _UC_DEFAULTGROUP: - q = unquote(q); - config.default_group = (q == NULL || !boolean_val(q, 1) || GETGRNAM(q) == NULL) - ? NULL : newstr(q); - break; - case _UC_EXTRAGROUPS: - for (i = 0; q != NULL; q = strtok(NULL, toks)) { - if (extendarray(&config.groups, &config.numgroups, i + 2) != -1) - config.groups[i++] = newstr(q); - } - if (i > 0) - while (i < config.numgroups) - config.groups[i++] = NULL; - break; - case _UC_DEFAULTCLASS: - config.default_class = (q == NULL || !boolean_val(q, 1)) - ? NULL : newstr(q); - break; - case _UC_MINUID: - if ((q = unquote(q)) != NULL && isdigit(*q)) - config.min_uid = (uid_t) atol(q); - break; - case _UC_MAXUID: - if ((q = unquote(q)) != NULL && isdigit(*q)) - config.max_uid = (uid_t) atol(q); - break; - case _UC_MINGID: - if ((q = unquote(q)) != NULL && isdigit(*q)) - config.min_gid = (gid_t) atol(q); - break; - case _UC_MAXGID: - if ((q = unquote(q)) != NULL && isdigit(*q)) - config.max_gid = (gid_t) atol(q); - break; - case _UC_EXPIRE: - if ((q = unquote(q)) != NULL && isdigit(*q)) - config.expire_days = atoi(q); - break; - case _UC_PASSWORD: - if ((q = unquote(q)) != NULL && isdigit(*q)) - config.password_days = atoi(q); - break; - case _UC_FIELDS: - case _UC_NONE: - break; + config.newmail = (q == NULL || !boolean_val(q, 1)) + ? NULL : newstr(q); + break; + case _UC_LOGFILE: + config.logfile = (q == NULL || !boolean_val(q, 1)) + ? NULL : newstr(q); + break; + case _UC_HOMEROOT: + config.home = (q == NULL || !boolean_val(q, 1)) + ? "/home" : newstr(q); + break; + case _UC_HOMEMODE: + modeset = setmode(q); + config.homemode = (q == NULL || !boolean_val(q, 1)) + ? _DEF_DIRMODE : getmode(modeset, _DEF_DIRMODE); + free(modeset); + break; + case _UC_SHELLPATH: + config.shelldir = (q == NULL || !boolean_val(q, 1)) + ? "/bin" : newstr(q); + break; + case _UC_SHELLS: + for (i = 0; i < _UC_MAXSHELLS && q != NULL; i++, q = strtok(NULL, toks)) + system_shells[i] = newstr(q); + if (i > 0) + while (i < _UC_MAXSHELLS) + system_shells[i++] = NULL; + break; + case _UC_DEFAULTSHELL: + config.shell_default = (q == NULL || !boolean_val(q, 1)) + ? (char *) bourne_shell : newstr(q); + break; + case _UC_DEFAULTGROUP: + q = unquote(q); + config.default_group = (q == NULL || !boolean_val(q, 1) || GETGRNAM(q) == NULL) + ? NULL : newstr(q); + break; + case _UC_EXTRAGROUPS: + for (i = 0; q != NULL; q = strtok(NULL, toks)) { + if (extendarray(&config.groups, &config.numgroups, i + 2) != -1) + config.groups[i++] = newstr(q); } + if (i > 0) + while (i < config.numgroups) + config.groups[i++] = NULL; + break; + case _UC_DEFAULTCLASS: + config.default_class = (q == NULL || !boolean_val(q, 1)) + ? NULL : newstr(q); + break; + case _UC_MINUID: + if ((q = unquote(q)) != NULL && isdigit(*q)) + config.min_uid = (uid_t) atol(q); + break; + case _UC_MAXUID: + if ((q = unquote(q)) != NULL && isdigit(*q)) + config.max_uid = (uid_t) atol(q); + break; + case _UC_MINGID: + if ((q = unquote(q)) != NULL && isdigit(*q)) + config.min_gid = (gid_t) atol(q); + break; + case _UC_MAXGID: + if ((q = unquote(q)) != NULL && isdigit(*q)) + config.max_gid = (gid_t) atol(q); + break; + case _UC_EXPIRE: + if ((q = unquote(q)) != NULL && isdigit(*q)) + config.expire_days = atoi(q); + break; + case _UC_PASSWORD: + if ((q = unquote(q)) != NULL && isdigit(*q)) + config.password_days = atoi(q); + break; + case _UC_FIELDS: + case _UC_NONE: + break; } } if (linecap > 0) free(buf); fclose(fp); } - return &config; + return (&config); } From owner-svn-src-all@FreeBSD.ORG Sun May 31 11:57:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30835E24; Sun, 31 May 2015 11:57:00 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F0271858; Sun, 31 May 2015 11:57:00 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VBux7t094404; Sun, 31 May 2015 11:56:59 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VBux9n094402; Sun, 31 May 2015 11:56:59 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505311156.t4VBux9n094402@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 31 May 2015 11:56:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283816 - head/usr.sbin/pw 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 11:57:00 -0000 Author: bapt Date: Sun May 31 11:56:59 2015 New Revision: 283816 URL: https://svnweb.freebsd.org/changeset/base/283816 Log: Remove useless test before free() Modified: head/usr.sbin/pw/pw_conf.c Modified: head/usr.sbin/pw/pw_conf.c ============================================================================== --- head/usr.sbin/pw/pw_conf.c Sun May 31 11:55:28 2015 (r283815) +++ head/usr.sbin/pw/pw_conf.c Sun May 31 11:56:59 2015 (r283816) @@ -357,8 +357,7 @@ read_userconfig(char const * file) break; } } - if (linecap > 0) - free(buf); + free(buf); fclose(fp); } return (&config); From owner-svn-src-all@FreeBSD.ORG Sun May 31 12:03:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 989D61BF; Sun, 31 May 2015 12:03:39 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78F791A61; Sun, 31 May 2015 12:03:39 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VC3dfY099306; Sun, 31 May 2015 12:03:39 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VC3d4Y099302; Sun, 31 May 2015 12:03:39 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505311203.t4VC3d4Y099302@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 12:03:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283817 - head/contrib/traceroute 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 12:03:39 -0000 Author: tuexen Date: Sun May 31 12:03:38 2015 New Revision: 283817 URL: https://svnweb.freebsd.org/changeset/base/283817 Log: Don't send illegal packets when using UDP-Lite. MFC after: 3 days Modified: head/contrib/traceroute/traceroute.8 head/contrib/traceroute/traceroute.c Modified: head/contrib/traceroute/traceroute.8 ============================================================================== --- head/contrib/traceroute/traceroute.8 Sun May 31 11:56:59 2015 (r283816) +++ head/contrib/traceroute/traceroute.8 Sun May 31 12:03:38 2015 (r283817) @@ -65,7 +65,7 @@ Turn on AS# lookups and use the giv default. .It Fl e Firewall evasion mode. -Use fixed destination ports for UDP, TCP and SCTP probes. +Use fixed destination ports for UDP, UDP-Lite, TCP and SCTP probes. The destination port does NOT increment with each packet sent. .It Fl f Ar first_ttl Set the initial time-to-live used in the first outgoing probe packet. @@ -110,18 +110,21 @@ Print hop addresses numerically rather t path). .It Fl P Ar proto Send packets of specified IP protocol. The currently supported protocols -are: UDP, TCP, SCTP, GRE and ICMP. Other protocols may also be specified -(either by name or by number), though +are: UDP, UDP-Lite, TCP, SCTP, GRE and ICMP. Other protocols may also be +specified (either by name or by number), though .Nm does not implement any special knowledge of their packet formats. This option is useful for determining which router along a path may be blocking packets based on IP protocol number. But see BUGS below. .It Fl p Ar port -Protocol specific. For UDP, TCP and SCTP, sets +Protocol specific. For UDP, UDP-Lite, TCP and SCTP, sets the base .Ar port number used in probes (default is 33434). -Traceroute hopes that nothing is listening on UDP ports +Traceroute hopes that nothing is listening on UDP ports (or UDP-Lite ports +if used by +.Nm +and supported by the peer) .Em base to .Em base + nhops * nprobes - 1 Modified: head/contrib/traceroute/traceroute.c ============================================================================== --- head/contrib/traceroute/traceroute.c Sun May 31 11:56:59 2015 (r283816) +++ head/contrib/traceroute/traceroute.c Sun May 31 12:03:38 2015 (r283817) @@ -371,7 +371,7 @@ u_short in_cksum(u_short *, int); u_int32_t sctp_crc32c(const void *, u_int32_t); char *inetname(struct in_addr); int main(int, char **); -u_short p_cksum(struct ip *, u_short *, int); +u_short p_cksum(struct ip *, u_short *, int, int); int packet_ok(u_char *, int, struct sockaddr_in *, int); char *pr_type(u_char); void print(u_char *, int, struct sockaddr_in *); @@ -391,6 +391,8 @@ int usleep(u_int); void udp_prep(struct outdata *); int udp_check(const u_char *, int); +void udplite_prep(struct outdata *); +int udplite_check(const u_char *, int); void tcp_prep(struct outdata *); int tcp_check(const u_char *, int); void sctp_prep(struct outdata *); @@ -428,6 +430,15 @@ struct outproto protos[] = { udp_check }, { + "udplite", + "spt dpt cov sum", + IPPROTO_UDPLITE, + sizeof(struct udphdr), + 32768 + 666, + udplite_prep, + udplite_check + }, + { "tcp", "spt dpt seq ack xxflwin sum urp", IPPROTO_TCP, @@ -1404,7 +1415,7 @@ udp_prep(struct outdata *outdata) outudp->uh_ulen = htons((u_short)protlen); outudp->uh_sum = 0; if (doipcksum) { - u_short sum = p_cksum(outip, (u_short*)outudp, protlen); + u_short sum = p_cksum(outip, (u_short*)outudp, protlen, protlen); outudp->uh_sum = (sum) ? sum : 0xffff; } @@ -1421,6 +1432,32 @@ udp_check(const u_char *data, int seq) } void +udplite_prep(struct outdata *outdata) +{ + struct udphdr *const outudp = (struct udphdr *) outp; + + outudp->uh_sport = htons(ident + (fixedPort ? outdata->seq : 0)); + outudp->uh_dport = htons(port + (fixedPort ? 0 : outdata->seq)); + outudp->uh_ulen = htons(8); + outudp->uh_sum = 0; + if (doipcksum) { + u_short sum = p_cksum(outip, (u_short*)outudp, protlen, 8); + outudp->uh_sum = (sum) ? sum : 0xffff; + } + + return; +} + +int +udplite_check(const u_char *data, int seq) +{ + struct udphdr *const udp = (struct udphdr *) data; + + return (ntohs(udp->uh_sport) == ident + (fixedPort ? seq : 0) && + ntohs(udp->uh_dport) == port + (fixedPort ? 0 : seq)); +} + +void tcp_prep(struct outdata *outdata) { struct tcphdr *const tcp = (struct tcphdr *) outp; @@ -1434,7 +1471,7 @@ tcp_prep(struct outdata *outdata) tcp->th_sum = 0; if (doipcksum) { - u_short sum = p_cksum(outip, (u_short*)tcp, protlen); + u_short sum = p_cksum(outip, (u_short*)tcp, protlen, protlen); tcp->th_sum = (sum) ? sum : 0xffff; } } @@ -1557,7 +1594,7 @@ print(register u_char *buf, register int * Checksum routine for UDP and TCP headers. */ u_short -p_cksum(struct ip *ip, u_short *data, int len) +p_cksum(struct ip *ip, u_short *data, int len, int cov) { static struct ipovly ipo; u_short sum[2]; @@ -1568,7 +1605,7 @@ p_cksum(struct ip *ip, u_short *data, in ipo.ih_dst = ip->ip_dst; sum[1] = in_cksum((u_short*)&ipo, sizeof(ipo)); /* pseudo ip hdr cksum */ - sum[0] = in_cksum(data, len); /* payload data cksum */ + sum[0] = in_cksum(data, cov); /* payload data cksum */ return ~in_cksum(sum, sizeof(sum)); } From owner-svn-src-all@FreeBSD.ORG Sun May 31 12:04:06 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7DC5306; Sun, 31 May 2015 12:04:06 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5FF81A67; Sun, 31 May 2015 12:04:06 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VC46WG099442; Sun, 31 May 2015 12:04:06 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VC46A6099441; Sun, 31 May 2015 12:04:06 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505311204.t4VC46A6099441@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 31 May 2015 12:04:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283818 - head/usr.sbin/pw 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 12:04:07 -0000 Author: bapt Date: Sun May 31 12:04:06 2015 New Revision: 283818 URL: https://svnweb.freebsd.org/changeset/base/283818 Log: Move cleanup functions to the right place Modified: head/usr.sbin/pw/pw_conf.c Modified: head/usr.sbin/pw/pw_conf.c ============================================================================== --- head/usr.sbin/pw/pw_conf.c Sun May 31 12:03:38 2015 (r283817) +++ head/usr.sbin/pw/pw_conf.c Sun May 31 12:04:06 2015 (r283818) @@ -357,9 +357,10 @@ read_userconfig(char const * file) break; } } - free(buf); - fclose(fp); } + free(buf); + fclose(fp); + return (&config); } From owner-svn-src-all@FreeBSD.ORG Sun May 31 12:11:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 042CB4DE; Sun, 31 May 2015 12:11:06 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5CEF1BEB; Sun, 31 May 2015 12:11:05 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VCB5wS003480; Sun, 31 May 2015 12:11:05 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VCB53x003479; Sun, 31 May 2015 12:11:05 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505311211.t4VCB53x003479@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 12:11:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283819 - head/contrib/traceroute 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 12:11:06 -0000 Author: tuexen Date: Sun May 31 12:11:05 2015 New Revision: 283819 URL: https://svnweb.freebsd.org/changeset/base/283819 Log: A TCP checksum of 0 is completely valid. Mapping 0 to 0xffff only applies to UDP and UDP-Lite. MFC after: 3 days Modified: head/contrib/traceroute/traceroute.c Modified: head/contrib/traceroute/traceroute.c ============================================================================== --- head/contrib/traceroute/traceroute.c Sun May 31 12:04:06 2015 (r283818) +++ head/contrib/traceroute/traceroute.c Sun May 31 12:11:05 2015 (r283819) @@ -1470,10 +1470,8 @@ tcp_prep(struct outdata *outdata) tcp->th_flags = TH_SYN; tcp->th_sum = 0; - if (doipcksum) { - u_short sum = p_cksum(outip, (u_short*)tcp, protlen, protlen); - tcp->th_sum = (sum) ? sum : 0xffff; - } + if (doipcksum) + tcp->th_sum = p_cksum(outip, (u_short*)tcp, protlen, protlen); } int From owner-svn-src-all@FreeBSD.ORG Sun May 31 12:18:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A115365E; Sun, 31 May 2015 12:18:31 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F1361CBF; Sun, 31 May 2015 12:18:31 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VCIVi1005847; Sun, 31 May 2015 12:18:31 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VCIVow005846; Sun, 31 May 2015 12:18:31 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505311218.t4VCIVow005846@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 12:18:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283820 - head/contrib/traceroute 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 12:18:31 -0000 Author: tuexen Date: Sun May 31 12:18:30 2015 New Revision: 283820 URL: https://svnweb.freebsd.org/changeset/base/283820 Log: The code starts with base + 1 as the first port. Fix to documentation to match that. MFC after: 3 days Modified: head/contrib/traceroute/traceroute.8 Modified: head/contrib/traceroute/traceroute.8 ============================================================================== --- head/contrib/traceroute/traceroute.8 Sun May 31 12:11:05 2015 (r283819) +++ head/contrib/traceroute/traceroute.8 Sun May 31 12:18:30 2015 (r283820) @@ -125,9 +125,9 @@ Traceroute hopes that nothing is listeni if used by .Nm and supported by the peer) -.Em base +.Em base + 1 to -.Em base + nhops * nprobes - 1 +.Em base + nhops * nprobes at the destination host (so an ICMP PORT_UNREACHABLE message will be returned to terminate the route tracing). If something is listening on a port in the default range, this option can be used From owner-svn-src-all@FreeBSD.ORG Sun May 31 12:42:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A739E895; Sun, 31 May 2015 12:42:35 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B24112C0; Sun, 31 May 2015 12:42:35 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VCgZSo020376; Sun, 31 May 2015 12:42:35 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VCgYdT020373; Sun, 31 May 2015 12:42:34 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505311242.t4VCgYdT020373@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 12:42: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: r283821 - stable/10/sys/netinet 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 12:42:35 -0000 Author: tuexen Date: Sun May 31 12:42:34 2015 New Revision: 283821 URL: https://svnweb.freebsd.org/changeset/base/283821 Log: MFC r283648: Address some compiler warnings. No functional change. Modified: stable/10/sys/netinet/sctp_indata.c stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctputil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_indata.c ============================================================================== --- stable/10/sys/netinet/sctp_indata.c Sun May 31 12:18:30 2015 (r283820) +++ stable/10/sys/netinet/sctp_indata.c Sun May 31 12:42:34 2015 (r283821) @@ -3462,12 +3462,18 @@ sctp_fs_audit(struct sctp_association *a { struct sctp_tmit_chunk *chk; int inflight = 0, resend = 0, inbetween = 0, acked = 0, above = 0; - int entry_flight, entry_cnt, ret; + int ret; +#ifndef INVARIANTS + int entry_flight, entry_cnt; + +#endif + + ret = 0; +#ifndef INVARIANTS entry_flight = asoc->total_flight; entry_cnt = asoc->total_flight_count; - ret = 0; - +#endif if (asoc->pr_sctp_cnt >= asoc->sent_queue_cnt) return (0); Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Sun May 31 12:18:30 2015 (r283820) +++ stable/10/sys/netinet/sctp_output.c Sun May 31 12:42:34 2015 (r283821) @@ -12012,9 +12012,6 @@ sctp_copy_one(struct sctp_stream_queue_p struct uio *uio, int resv_upfront) { - int left; - - left = sp->length; sp->data = m_uiotombuf(uio, M_WAITOK, sp->length, resv_upfront, 0); if (sp->data == NULL) { Modified: stable/10/sys/netinet/sctputil.c ============================================================================== --- stable/10/sys/netinet/sctputil.c Sun May 31 12:18:30 2015 (r283820) +++ stable/10/sys/netinet/sctputil.c Sun May 31 12:42:34 2015 (r283821) @@ -1449,7 +1449,7 @@ sctp_timeout_handler(void *t) struct socket *so; #endif - int did_output, type; + int did_output; tmr = (struct sctp_timer *)t; inp = (struct sctp_inpcb *)tmr->ep; @@ -1488,7 +1488,6 @@ sctp_timeout_handler(void *t) } /* if this is an iterator timeout, get the struct and clear inp */ tmr->stopped_from = 0xa003; - type = tmr->type; if (inp) { SCTP_INP_INCR_REF(inp); if ((inp->sctp_socket == NULL) && @@ -1873,7 +1872,7 @@ out_decr: } out_no_decr: SCTPDBG(SCTP_DEBUG_TIMER1, "Timer now complete (type %d)\n", - type); + tmr->type); CURVNET_RESTORE(); } From owner-svn-src-all@FreeBSD.ORG Sun May 31 12:46:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 570559FA; Sun, 31 May 2015 12:46:44 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43BFC12E0; Sun, 31 May 2015 12:46:44 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VCkiTN021079; Sun, 31 May 2015 12:46:44 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VCkfVA021062; Sun, 31 May 2015 12:46:41 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505311246.t4VCkfVA021062@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 12:46:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283822 - in stable/10/sys: netinet 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 12:46:44 -0000 Author: tuexen Date: Sun May 31 12:46:40 2015 New Revision: 283822 URL: https://svnweb.freebsd.org/changeset/base/283822 Log: MFC r283650: Fix and cleanup the debug information. This has no user-visible changes. Thanks to Irene Ruengeler for proving a patch. Modified: stable/10/sys/netinet/sctp_asconf.c stable/10/sys/netinet/sctp_cc_functions.c stable/10/sys/netinet/sctp_constants.h stable/10/sys/netinet/sctp_indata.c stable/10/sys/netinet/sctp_input.c stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctp_pcb.c stable/10/sys/netinet/sctp_timer.c stable/10/sys/netinet/sctp_usrreq.c stable/10/sys/netinet/sctputil.c stable/10/sys/netinet6/sctp6_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_asconf.c ============================================================================== --- stable/10/sys/netinet/sctp_asconf.c Sun May 31 12:42:34 2015 (r283821) +++ stable/10/sys/netinet/sctp_asconf.c Sun May 31 12:46:40 2015 (r283822) @@ -555,7 +555,9 @@ sctp_process_asconf_set_primary(struct s (stcb->asoc.primary_destination->dest_state & SCTP_ADDR_UNCONFIRMED) == 0) { - sctp_timer_stop(SCTP_TIMER_TYPE_PRIM_DELETED, stcb->sctp_ep, stcb, NULL, SCTP_FROM_SCTP_TIMER + SCTP_LOC_7); + sctp_timer_stop(SCTP_TIMER_TYPE_PRIM_DELETED, + stcb->sctp_ep, stcb, NULL, + SCTP_FROM_SCTP_ASCONF + SCTP_LOC_1); if (sctp_is_mobility_feature_on(stcb->sctp_ep, SCTP_MOBILITY_FASTHANDOFF)) { sctp_assoc_immediate_retrans(stcb, @@ -991,7 +993,7 @@ sctp_assoc_immediate_retrans(struct sctp SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, &stcb->asoc.primary_destination->ro._l_addr.sa); sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, stcb->asoc.deleted_primary, - SCTP_FROM_SCTP_TIMER + SCTP_LOC_8); + SCTP_FROM_SCTP_ASCONF + SCTP_LOC_3); stcb->asoc.num_send_timers_up--; if (stcb->asoc.num_send_timers_up < 0) { stcb->asoc.num_send_timers_up = 0; @@ -1030,7 +1032,7 @@ sctp_net_immediate_retrans(struct sctp_t SCTPDBG(SCTP_DEBUG_ASCONF1, "net_immediate_retrans: RTO is %d\n", net->RTO); sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_TIMER + SCTP_LOC_5); + SCTP_FROM_SCTP_ASCONF + SCTP_LOC_4); stcb->asoc.cc_functions.sctp_set_initial_cc_param(stcb, net); net->error_count = 0; TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) { @@ -1684,7 +1686,7 @@ sctp_handle_asconf_ack(struct mbuf *m, i if (serial_num == asoc->asconf_seq_out - 1) { /* stop our timer */ sctp_timer_stop(SCTP_TIMER_TYPE_ASCONF, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_ASCONF + SCTP_LOC_3); + SCTP_FROM_SCTP_ASCONF + SCTP_LOC_5); } /* process the ASCONF-ACK contents */ ack_length = ntohs(cp->ch.chunk_length) - Modified: stable/10/sys/netinet/sctp_cc_functions.c ============================================================================== --- stable/10/sys/netinet/sctp_cc_functions.c Sun May 31 12:42:34 2015 (r283821) +++ stable/10/sys/netinet/sctp_cc_functions.c Sun May 31 12:46:40 2015 (r283822) @@ -226,7 +226,8 @@ sctp_cwnd_update_after_fr(struct sctp_tc } sctp_timer_stop(SCTP_TIMER_TYPE_SEND, - stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_32); + stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_CC_FUNCTIONS + SCTP_LOC_1); sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net); } @@ -1732,7 +1733,8 @@ sctp_hs_cwnd_update_after_fr(struct sctp } sctp_timer_stop(SCTP_TIMER_TYPE_SEND, - stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_32); + stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_CC_FUNCTIONS + SCTP_LOC_2); sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net); } @@ -2264,7 +2266,8 @@ sctp_htcp_cwnd_update_after_fr(struct sc } sctp_timer_stop(SCTP_TIMER_TYPE_SEND, - stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_32); + stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_CC_FUNCTIONS + SCTP_LOC_3); sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net); } Modified: stable/10/sys/netinet/sctp_constants.h ============================================================================== --- stable/10/sys/netinet/sctp_constants.h Sun May 31 12:42:34 2015 (r283821) +++ stable/10/sys/netinet/sctp_constants.h Sun May 31 12:46:40 2015 (r283822) @@ -765,18 +765,19 @@ __FBSDID("$FreeBSD$"); */ /* File defines */ -#define SCTP_FROM_SCTP_INPUT 0x10000000 -#define SCTP_FROM_SCTP_PCB 0x20000000 -#define SCTP_FROM_SCTP_INDATA 0x30000000 -#define SCTP_FROM_SCTP_TIMER 0x40000000 -#define SCTP_FROM_SCTP_USRREQ 0x50000000 -#define SCTP_FROM_SCTPUTIL 0x60000000 -#define SCTP_FROM_SCTP6_USRREQ 0x70000000 -#define SCTP_FROM_SCTP_ASCONF 0x80000000 -#define SCTP_FROM_SCTP_OUTPUT 0x90000000 -#define SCTP_FROM_SCTP_PEELOFF 0xa0000000 -#define SCTP_FROM_SCTP_PANDA 0xb0000000 -#define SCTP_FROM_SCTP_SYSCTL 0xc0000000 +#define SCTP_FROM_SCTP_INPUT 0x10000000 +#define SCTP_FROM_SCTP_PCB 0x20000000 +#define SCTP_FROM_SCTP_INDATA 0x30000000 +#define SCTP_FROM_SCTP_TIMER 0x40000000 +#define SCTP_FROM_SCTP_USRREQ 0x50000000 +#define SCTP_FROM_SCTPUTIL 0x60000000 +#define SCTP_FROM_SCTP6_USRREQ 0x70000000 +#define SCTP_FROM_SCTP_ASCONF 0x80000000 +#define SCTP_FROM_SCTP_OUTPUT 0x90000000 +#define SCTP_FROM_SCTP_PEELOFF 0xa0000000 +#define SCTP_FROM_SCTP_PANDA 0xb0000000 +#define SCTP_FROM_SCTP_SYSCTL 0xc0000000 +#define SCTP_FROM_SCTP_CC_FUNCTIONS 0xd0000000 /* Location ID's */ #define SCTP_LOC_1 0x00000001 @@ -812,6 +813,8 @@ __FBSDID("$FreeBSD$"); #define SCTP_LOC_31 0x0000001f #define SCTP_LOC_32 0x00000020 #define SCTP_LOC_33 0x00000021 +#define SCTP_LOC_34 0x00000022 +#define SCTP_LOC_35 0x00000023 /* Free assoc codes */ Modified: stable/10/sys/netinet/sctp_indata.c ============================================================================== --- stable/10/sys/netinet/sctp_indata.c Sun May 31 12:42:34 2015 (r283821) +++ stable/10/sys/netinet/sctp_indata.c Sun May 31 12:46:40 2015 (r283822) @@ -1034,7 +1034,7 @@ sctp_queue_data_for_reasm(struct sctp_tc chk->rec.data.TSN_seq, (chk->rec.data.rcv_flags & SCTP_DATA_UNORDERED) ? 1 : 0); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_7; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_8; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; @@ -1056,7 +1056,7 @@ sctp_queue_data_for_reasm(struct sctp_tc chk->rec.data.stream_number, chk->rec.data.stream_seq); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_8; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_9; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; @@ -1073,7 +1073,7 @@ sctp_queue_data_for_reasm(struct sctp_tc chk->rec.data.stream_number, chk->rec.data.stream_seq); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_9; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_10; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; @@ -1100,7 +1100,7 @@ sctp_queue_data_for_reasm(struct sctp_tc chk->rec.data.stream_number, chk->rec.data.stream_seq); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_10; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_11; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; @@ -1123,7 +1123,7 @@ sctp_queue_data_for_reasm(struct sctp_tc chk->rec.data.stream_number, chk->rec.data.stream_seq); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_11; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_12; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; @@ -1144,7 +1144,7 @@ sctp_queue_data_for_reasm(struct sctp_tc chk->rec.data.stream_number, chk->rec.data.stream_seq); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_12; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_13; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; @@ -1162,7 +1162,7 @@ sctp_queue_data_for_reasm(struct sctp_tc chk->rec.data.TSN_seq, (chk->rec.data.rcv_flags & SCTP_DATA_UNORDERED) ? 1 : 0); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_12; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_14; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; @@ -1184,7 +1184,7 @@ sctp_queue_data_for_reasm(struct sctp_tc chk->rec.data.stream_number, chk->rec.data.stream_seq); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_13; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_15; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; @@ -1476,7 +1476,7 @@ sctp_process_a_data_chunk(struct sctp_tc asoc->strmin[strmno].last_sequence_delivered, tsn, strmno, strmseq); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_14; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_16; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); @@ -1713,7 +1713,7 @@ failed_pdapi_express_del: snprintf(msg, sizeof(msg), "Reas. queue emtpy, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", tsn, strmno, strmseq); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_15; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_17; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; if (last_chunk) { @@ -1732,7 +1732,7 @@ failed_pdapi_express_del: snprintf(msg, sizeof(msg), "PD ongoing, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", tsn, strmno, strmseq); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_16; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_18; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; if (last_chunk) { @@ -1761,7 +1761,7 @@ failed_pdapi_express_del: snprintf(msg, sizeof(msg), "No PD ongoing, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", tsn, strmno, strmseq); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_17; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_19; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; if (last_chunk) { @@ -2159,7 +2159,8 @@ sctp_sack_check(struct sctp_tcb *stcb, i */ if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { sctp_timer_stop(SCTP_TIMER_TYPE_RECV, - stcb->sctp_ep, stcb, NULL, SCTP_FROM_SCTP_INDATA + SCTP_LOC_18); + stcb->sctp_ep, stcb, NULL, + SCTP_FROM_SCTP_INDATA + SCTP_LOC_20); } sctp_send_shutdown(stcb, ((stcb->asoc.alternate) ? stcb->asoc.alternate : stcb->asoc.primary_destination)); @@ -2382,7 +2383,7 @@ sctp_process_data(struct mbuf **mm, int snprintf(msg, sizeof(msg), "DATA chunk of length %d", chk_length); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_19; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_21; sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, mflowtype, mflowid, @@ -2397,7 +2398,7 @@ sctp_process_data(struct mbuf **mm, int struct mbuf *op_err; op_err = sctp_generate_no_user_data_cause(ch->dp.tsn); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_19; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_22; sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, mflowtype, mflowid, @@ -3628,7 +3629,7 @@ sctp_express_handle_sack(struct sctp_tcb snprintf(msg, sizeof(msg), "Cum ack %8.8x greater or equal than TSN %8.8x", cumack, send_s); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_23; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } @@ -3824,7 +3825,9 @@ sctp_express_handle_sack(struct sctp_tcb } if (net->dest_state & SCTP_ADDR_PF) { net->dest_state &= ~SCTP_ADDR_PF; - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_3); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, + stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_INDATA + SCTP_LOC_24); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net); asoc->cc_functions.sctp_cwnd_update_exit_pf(stcb, net); /* Done with this net */ @@ -3910,7 +3913,7 @@ again: } else if (SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_22); + SCTP_FROM_SCTP_INDATA + SCTP_LOC_25); } } } @@ -3984,7 +3987,7 @@ again: *abort_now = 1; /* XXX */ op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, ""); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_24; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_26; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); } else { struct sctp_nets *netp; @@ -4197,7 +4200,7 @@ sctp_handle_sack(struct mbuf *m, int off snprintf(msg, sizeof(msg), "Cum ack %8.8x greater or equal than TSN %8.8x", cum_ack, send_s); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_27; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } @@ -4229,7 +4232,7 @@ sctp_handle_sack(struct mbuf *m, int off /* stop any timers */ TAILQ_FOREACH(net, &asoc->nets, sctp_next) { sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, - stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_26); + stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_28); net->partial_bytes_acked = 0; net->flight_size = 0; } @@ -4434,14 +4437,14 @@ sctp_handle_sack(struct mbuf *m, int off if (net->new_pseudo_cumack) sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_27); + SCTP_FROM_SCTP_INDATA + SCTP_LOC_29); } } else { if (accum_moved) { TAILQ_FOREACH(net, &asoc->nets, sctp_next) { sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, - stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_28); + stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_30); } } } @@ -4614,7 +4617,9 @@ sctp_handle_sack(struct mbuf *m, int off } if (net->dest_state & SCTP_ADDR_PF) { net->dest_state &= ~SCTP_ADDR_PF; - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_3); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, + stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_INDATA + SCTP_LOC_31); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net); asoc->cc_functions.sctp_cwnd_update_exit_pf(stcb, net); /* Done with this net */ @@ -4637,7 +4642,8 @@ sctp_handle_sack(struct mbuf *m, int off TAILQ_FOREACH(net, &asoc->nets, sctp_next) { /* stop all timers */ sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, - stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_30); + stcb, net, + SCTP_FROM_SCTP_INDATA + SCTP_LOC_32); net->flight_size = 0; net->partial_bytes_acked = 0; } @@ -4693,7 +4699,7 @@ sctp_handle_sack(struct mbuf *m, int off *abort_now = 1; /* XXX */ op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, ""); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_31; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_33; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } else { @@ -4845,7 +4851,7 @@ again: } else if (SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_22); + SCTP_FROM_SCTP_INDATA + SCTP_LOC_34); } } } @@ -5135,7 +5141,7 @@ sctp_handle_forward_tsn(struct sctp_tcb "New cum ack %8.8x too high, highest TSN %8.8x", new_cum_tsn, asoc->highest_tsn_inside_map); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_33; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_35; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } Modified: stable/10/sys/netinet/sctp_input.c ============================================================================== --- stable/10/sys/netinet/sctp_input.c Sun May 31 12:42:34 2015 (r283821) +++ stable/10/sys/netinet/sctp_input.c Sun May 31 12:46:40 2015 (r283822) @@ -513,7 +513,7 @@ sctp_process_init_ack(struct mbuf *m, in * primary. */ sctp_timer_stop(SCTP_TIMER_TYPE_INIT, stcb->sctp_ep, stcb, - asoc->primary_destination, SCTP_FROM_SCTP_INPUT + SCTP_LOC_4); + asoc->primary_destination, SCTP_FROM_SCTP_INPUT + SCTP_LOC_3); /* calculate the RTO */ net->RTO = sctp_calculate_rto(stcb, asoc, net, &asoc->time_entered, sctp_align_safe_nocopy, @@ -633,7 +633,8 @@ sctp_handle_heartbeat_ack(struct sctp_he } sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_CONFIRMED, stcb, 0, (void *)r_net, SCTP_SO_NOT_LOCKED); - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, r_net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_3); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, + r_net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_4); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, r_net); } old_error_counter = r_net->error_count; @@ -654,7 +655,8 @@ sctp_handle_heartbeat_ack(struct sctp_he stcb->asoc.cc_functions.sctp_cwnd_update_exit_pf(stcb, net); } if (old_error_counter > 0) { - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, r_net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_3); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, + stcb, r_net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_5); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, r_net); } if (r_net == stcb->asoc.primary_destination) { @@ -673,7 +675,9 @@ sctp_handle_heartbeat_ack(struct sctp_he sctp_is_mobility_feature_on(stcb->sctp_ep, SCTP_MOBILITY_PRIM_DELETED)) { - sctp_timer_stop(SCTP_TIMER_TYPE_PRIM_DELETED, stcb->sctp_ep, stcb, NULL, SCTP_FROM_SCTP_TIMER + SCTP_LOC_7); + sctp_timer_stop(SCTP_TIMER_TYPE_PRIM_DELETED, + stcb->sctp_ep, stcb, NULL, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_6); if (sctp_is_mobility_feature_on(stcb->sctp_ep, SCTP_MOBILITY_FASTHANDOFF)) { sctp_assoc_immediate_retrans(stcb, @@ -795,7 +799,8 @@ sctp_handle_abort(struct sctp_abort_chun error = 0; } /* stop any receive timers */ - sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_6); + sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_7); /* notify user of the abort and clean up... */ sctp_abort_notification(stcb, 1, error, abort, SCTP_SO_NOT_LOCKED); /* free the tcb */ @@ -817,7 +822,7 @@ sctp_handle_abort(struct sctp_abort_chun #endif stcb->asoc.state |= SCTP_STATE_WAS_ABORTED; (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, - SCTP_FROM_SCTP_INPUT + SCTP_LOC_6); + SCTP_FROM_SCTP_INPUT + SCTP_LOC_8); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -932,7 +937,8 @@ sctp_handle_shutdown(struct sctp_shutdow * stop the shutdown timer, since we WILL move to * SHUTDOWN-ACK-SENT. */ - sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_8); + sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, + net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_9); } /* Now is there unsent data on a stream somewhere? */ some_on_streamwheel = sctp_is_there_unsent_data(stcb, SCTP_SO_NOT_LOCKED); @@ -1025,7 +1031,8 @@ sctp_handle_shutdown_ack(struct sctp_shu } #endif /* stop the timer */ - sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_9); + sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_10); /* send SHUTDOWN-COMPLETE */ sctp_send_shutdown_complete(stcb, net, 0); /* notify upper layer protocol */ @@ -1046,7 +1053,7 @@ sctp_handle_shutdown_ack(struct sctp_shu atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, - SCTP_FROM_SCTP_INPUT + SCTP_LOC_10); + SCTP_FROM_SCTP_INPUT + SCTP_LOC_11); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -1206,7 +1213,7 @@ sctp_handle_error(struct sctp_chunkhdr * atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, - SCTP_FROM_SCTP_INPUT + SCTP_LOC_11); + SCTP_FROM_SCTP_INPUT + SCTP_LOC_12); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -1558,9 +1565,12 @@ sctp_process_cookie_existing(struct mbuf return (NULL); } /* we have already processed the INIT so no problem */ - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, - net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_12); - sctp_timer_stop(SCTP_TIMER_TYPE_INIT, inp, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_13); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, + stcb, net, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_13); + sctp_timer_stop(SCTP_TIMER_TYPE_INIT, inp, + stcb, net, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_14); /* update current state */ if (SCTP_GET_STATE(asoc) == SCTP_STATE_COOKIE_ECHOED) SCTP_STAT_INCR_COUNTER32(sctps_activeestab); @@ -1720,7 +1730,8 @@ sctp_process_cookie_existing(struct mbuf } if (how_indx < sizeof(asoc->cookie_how)) asoc->cookie_how[how_indx] = 8; - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_14); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_15); sctp_stop_all_cookie_timers(stcb); /* * since we did not send a HB make sure we don't double @@ -1865,8 +1876,10 @@ sctp_process_cookie_existing(struct mbuf /* temp code */ if (how_indx < sizeof(asoc->cookie_how)) asoc->cookie_how[how_indx] = 12; - sctp_timer_stop(SCTP_TIMER_TYPE_INIT, inp, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_15); - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_16); + sctp_timer_stop(SCTP_TIMER_TYPE_INIT, inp, stcb, net, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_16); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_17); /* notify upper layer */ *notification = SCTP_NOTIFY_ASSOC_RESTART; @@ -2134,7 +2147,7 @@ sctp_process_cookie_new(struct mbuf *m, SCTP_TCB_LOCK(stcb); #endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, - SCTP_FROM_SCTP_INPUT + SCTP_LOC_16); + SCTP_FROM_SCTP_INPUT + SCTP_LOC_18); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -2165,7 +2178,8 @@ sctp_process_cookie_new(struct mbuf *m, SCTP_SOCKET_LOCK(so, 1); SCTP_TCB_LOCK(stcb); #endif - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_16); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_19); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -2182,7 +2196,8 @@ sctp_process_cookie_new(struct mbuf *m, SCTP_SOCKET_LOCK(so, 1); SCTP_TCB_LOCK(stcb); #endif - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_17); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_20); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -2211,7 +2226,8 @@ sctp_process_cookie_new(struct mbuf *m, SCTP_SOCKET_LOCK(so, 1); SCTP_TCB_LOCK(stcb); #endif - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_18); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_21); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -2271,7 +2287,8 @@ sctp_process_cookie_new(struct mbuf *m, SCTP_SOCKET_LOCK(so, 1); SCTP_TCB_LOCK(stcb); #endif - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_19); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_22); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -2741,7 +2758,8 @@ sctp_handle_cookie_echo(struct mbuf *m, SCTP_TCB_LOCK((*stcb)); atomic_subtract_int(&(*stcb)->asoc.refcnt, 1); #endif - (void)sctp_free_assoc(*inp_p, *stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_20); + (void)sctp_free_assoc(*inp_p, *stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_23); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(pcb_so, 1); #endif @@ -3173,7 +3191,8 @@ sctp_handle_shutdown_complete(struct sct } #endif /* stop the timer */ - sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWNACK, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_22); + sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWNACK, stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_24); SCTP_STAT_INCR_COUNTER32(sctps_shutdown); /* free the TCB */ SCTPDBG(SCTP_DEBUG_INPUT2, @@ -3186,7 +3205,8 @@ sctp_handle_shutdown_complete(struct sct SCTP_TCB_LOCK(stcb); atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif - (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_23); + (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_25); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -3294,7 +3314,8 @@ process_chunk_drop(struct sctp_tcb *stcb /* restart the timer */ sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, - stcb, tp1->whoTo, SCTP_FROM_SCTP_INPUT + SCTP_LOC_24); + stcb, tp1->whoTo, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_26); sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, tp1->whoTo); @@ -3362,7 +3383,8 @@ process_chunk_drop(struct sctp_tcb *stcb * this, otherwise we let the timer fire. */ sctp_timer_stop(SCTP_TIMER_TYPE_INIT, stcb->sctp_ep, - stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_25); + stcb, net, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_27); sctp_send_initiate(stcb->sctp_ep, stcb, SCTP_SO_NOT_LOCKED); } break; @@ -3539,7 +3561,8 @@ sctp_clean_up_stream_reset(struct sctp_t } asoc = &stcb->asoc; - sctp_timer_stop(SCTP_TIMER_TYPE_STRRESET, stcb->sctp_ep, stcb, chk->whoTo, SCTP_FROM_SCTP_INPUT + SCTP_LOC_26); + sctp_timer_stop(SCTP_TIMER_TYPE_STRRESET, stcb->sctp_ep, stcb, + chk->whoTo, SCTP_FROM_SCTP_INPUT + SCTP_LOC_28); TAILQ_REMOVE(&asoc->control_send_queue, chk, sctp_next); @@ -4783,7 +4806,8 @@ process_control_chunks: SCTP_TCB_LOCK(stcb); atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_27); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_29); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -5203,7 +5227,8 @@ process_control_chunks: SCTP_TCB_LOCK(stcb); atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_27); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_30); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -5381,7 +5406,8 @@ process_control_chunks: SCTP_TCB_LOCK(stcb); atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_29); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_INPUT + SCTP_LOC_31); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Sun May 31 12:42:34 2015 (r283821) +++ stable/10/sys/netinet/sctp_output.c Sun May 31 12:46:40 2015 (r283822) @@ -8343,7 +8343,8 @@ again_one_more_time: /* turn off the timer */ if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { sctp_timer_stop(SCTP_TIMER_TYPE_RECV, - inp, stcb, net, SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_1); + inp, stcb, net, + SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_1); } } ctl_cnt++; @@ -9796,7 +9797,7 @@ one_chunk_around: * t3-expiring. */ sctp_timer_stop(SCTP_TIMER_TYPE_SEND, inp, stcb, net, - SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_4); + SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_2); sctp_timer_start(SCTP_TIMER_TYPE_SEND, inp, stcb, net); } } @@ -10403,7 +10404,8 @@ sctp_send_sack(struct sctp_tcb *stcb, in /* No memory so we drop the idea, and set a timer */ if (stcb->asoc.delayed_ack) { sctp_timer_stop(SCTP_TIMER_TYPE_RECV, - stcb->sctp_ep, stcb, NULL, SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_5); + stcb->sctp_ep, stcb, NULL, + SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_3); sctp_timer_start(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL); } else { @@ -10471,7 +10473,8 @@ sctp_send_sack(struct sctp_tcb *stcb, in /* sa_ignore NO_NULL_CHK */ if (stcb->asoc.delayed_ack) { sctp_timer_stop(SCTP_TIMER_TYPE_RECV, - stcb->sctp_ep, stcb, NULL, SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_6); + stcb->sctp_ep, stcb, NULL, + SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_4); sctp_timer_start(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL); } else { @@ -12440,7 +12443,8 @@ sctp_lower_sosend(struct socket *so, if (control) { if (sctp_process_cmsgs_for_init(stcb, control, &error)) { - sctp_free_assoc(inp, stcb, SCTP_PCBFREE_FORCE, SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_7); + sctp_free_assoc(inp, stcb, SCTP_PCBFREE_FORCE, + SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_5); hold_tcblock = 0; stcb = NULL; goto out_unlocked; Modified: stable/10/sys/netinet/sctp_pcb.c ============================================================================== --- stable/10/sys/netinet/sctp_pcb.c Sun May 31 12:42:34 2015 (r283821) +++ stable/10/sys/netinet/sctp_pcb.c Sun May 31 12:46:40 2015 (r283822) @@ -3548,7 +3548,8 @@ sctp_inpcb_free(struct sctp_inpcb *inp, (SCTP_GET_STATE(&asoc->asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) { SCTP_STAT_DECR_GAUGE32(sctps_currestab); } - if (sctp_free_assoc(inp, asoc, SCTP_PCBFREE_FORCE, SCTP_FROM_SCTP_PCB + SCTP_LOC_8) == 0) { + if (sctp_free_assoc(inp, asoc, SCTP_PCBFREE_FORCE, + SCTP_FROM_SCTP_PCB + SCTP_LOC_8) == 0) { cnt++; } } Modified: stable/10/sys/netinet/sctp_timer.c ============================================================================== --- stable/10/sys/netinet/sctp_timer.c Sun May 31 12:42:34 2015 (r283821) +++ stable/10/sys/netinet/sctp_timer.c Sun May 31 12:46:40 2015 (r283822) @@ -110,7 +110,9 @@ sctp_threshold_management(struct sctp_in net->dest_state |= SCTP_ADDR_PF; net->last_active = sctp_get_tick_count(); sctp_send_hb(stcb, net, SCTP_SO_NOT_LOCKED); - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_TIMER + SCTP_LOC_3); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, + stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_TIMER + SCTP_LOC_1); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net); } } @@ -153,7 +155,7 @@ sctp_threshold_management(struct sctp_in op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, "Association error counter exceeded"); - inp->last_abort_code = SCTP_FROM_SCTP_TIMER + SCTP_LOC_1; + inp->last_abort_code = SCTP_FROM_SCTP_TIMER + SCTP_LOC_2; sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); return (1); } @@ -1046,7 +1048,7 @@ sctp_cookie_timer(struct sctp_inpcb *inp op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, "Cookie timer expired, but no cookie"); - inp->last_abort_code = SCTP_FROM_SCTP_TIMER + SCTP_LOC_4; + inp->last_abort_code = SCTP_FROM_SCTP_TIMER + SCTP_LOC_3; sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); } else { #ifdef INVARIANTS Modified: stable/10/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/10/sys/netinet/sctp_usrreq.c Sun May 31 12:42:34 2015 (r283821) +++ stable/10/sys/netinet/sctp_usrreq.c Sun May 31 12:46:40 2015 (r283822) @@ -288,7 +288,8 @@ sctp_notify(struct sctp_inpcb *inp, SCTP_TCB_LOCK(stcb); atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_2); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_2); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); /* SCTP_TCB_UNLOCK(stcb); MT: I think this is not needed. */ @@ -777,7 +778,8 @@ sctp_disconnect(struct socket *so) (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) { SCTP_STAT_DECR_GAUGE32(sctps_currestab); } - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_3); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_3); /* No unlock tcb assoc is gone */ return (0); } @@ -862,7 +864,8 @@ sctp_disconnect(struct socket *so) SCTP_STAT_DECR_GAUGE32(sctps_currestab); } SCTP_INP_RUNLOCK(inp); - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_5); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_5); return (0); } else { sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_CLOSING, SCTP_SO_LOCKED); @@ -1562,7 +1565,8 @@ sctp_do_connect_x(struct socket *so, str sctp_connectx_helper_add(stcb, sa, (totaddr - 1), &error); /* Fill in the return id */ if (error) { - (void)sctp_free_assoc(inp, stcb, SCTP_PCBFREE_FORCE, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_6); + (void)sctp_free_assoc(inp, stcb, SCTP_PCBFREE_FORCE, + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_7); goto out_now; } a_id = (sctp_assoc_t *) optval; @@ -4785,7 +4789,7 @@ sctp_setopt(struct socket *so, int optna (void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered); sctp_timer_stop(SCTP_TIMER_TYPE_INIT, inp, stcb, stcb->asoc.primary_destination, - SCTP_FROM_SCTP_USRREQ + SCTP_LOC_9); + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_8); sctp_send_initiate(inp, stcb, SCTP_SO_LOCKED); } else { /* @@ -5203,7 +5207,7 @@ sctp_setopt(struct socket *so, int optna if (!(net->dest_state & SCTP_ADDR_UNCONFIRMED) && !(net->dest_state & SCTP_ADDR_NOHB)) { sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, - SCTP_FROM_SCTP_USRREQ + SCTP_LOC_10); + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_9); } net->dest_state |= SCTP_ADDR_NOHB; } @@ -5227,7 +5231,7 @@ sctp_setopt(struct socket *so, int optna if ((paddrp->spp_flags & SPP_PMTUD_DISABLE) && (paddrp->spp_pathmtu >= SCTP_SMALLEST_PMTU)) { if (SCTP_OS_TIMER_PENDING(&net->pmtu_timer.timer)) { sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net, - SCTP_FROM_SCTP_USRREQ + SCTP_LOC_10); + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_11); } net->dest_state |= SCTP_ADDR_NO_PMTUD; net->mtu = paddrp->spp_pathmtu + ovh; @@ -5251,7 +5255,9 @@ sctp_setopt(struct socket *so, int optna (net->error_count > net->pf_threshold)) { net->dest_state |= SCTP_ADDR_PF; sctp_send_hb(stcb, net, SCTP_SO_LOCKED); - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_TIMER + SCTP_LOC_3); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, + stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_12); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net); } } @@ -5294,7 +5300,9 @@ sctp_setopt(struct socket *so, int optna (net->error_count > net->pf_threshold)) { net->dest_state |= SCTP_ADDR_PF; sctp_send_hb(stcb, net, SCTP_SO_LOCKED); - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_TIMER + SCTP_LOC_3); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, + stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_13); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net); } } @@ -5329,7 +5337,7 @@ sctp_setopt(struct socket *so, int optna net->dest_state &= ~SCTP_ADDR_NOHB; } sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, - SCTP_FROM_SCTP_USRREQ + SCTP_LOC_10); + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_14); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net); } sctp_stcb_feature_off(inp, stcb, SCTP_PCB_FLAGS_DONOT_HEARTBEAT); @@ -5339,7 +5347,9 @@ sctp_setopt(struct socket *so, int optna if (!(net->dest_state & SCTP_ADDR_NOHB)) { net->dest_state |= SCTP_ADDR_NOHB; if (!(net->dest_state & SCTP_ADDR_UNCONFIRMED)) { - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_10); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, + inp, stcb, net, + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_15); } } } @@ -5349,7 +5359,7 @@ sctp_setopt(struct socket *so, int optna TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { if (SCTP_OS_TIMER_PENDING(&net->pmtu_timer.timer)) { sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net, - SCTP_FROM_SCTP_USRREQ + SCTP_LOC_10); + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_16); } net->dest_state |= SCTP_ADDR_NO_PMTUD; net->mtu = paddrp->spp_pathmtu + ovh; @@ -6199,7 +6209,9 @@ sctp_setopt(struct socket *so, int optna (net->error_count <= net->failure_threshold)) { net->dest_state |= SCTP_ADDR_PF; sctp_send_hb(stcb, net, SCTP_SO_LOCKED); - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_TIMER + SCTP_LOC_3); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, + stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_17); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net); } } @@ -6228,7 +6240,9 @@ sctp_setopt(struct socket *so, int optna (net->error_count <= net->failure_threshold)) { net->dest_state |= SCTP_ADDR_PF; sctp_send_hb(stcb, net, SCTP_SO_LOCKED); - sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_TIMER + SCTP_LOC_3); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, + stcb->sctp_ep, stcb, net, + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_18); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net); } } @@ -7127,7 +7141,8 @@ sctp_accept(struct socket *so, struct so } if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) { SCTP_TCB_LOCK(stcb); - sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_7); + sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP_USRREQ + SCTP_LOC_19); } return (0); } Modified: stable/10/sys/netinet/sctputil.c ============================================================================== --- stable/10/sys/netinet/sctputil.c Sun May 31 12:42:34 2015 (r283821) +++ stable/10/sys/netinet/sctputil.c Sun May 31 12:46:40 2015 (r283822) @@ -6322,14 +6322,14 @@ sctp_connectx_helper_add(struct sctp_tcb (sin->sin_addr.s_addr == INADDR_BROADCAST) || IN_MULTICAST(ntohl(sin->sin_addr.s_addr))) { SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, EINVAL); - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_7); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_7); *error = EINVAL; goto out_now; } if (sctp_add_remote_addr(stcb, sa, NULL, SCTP_DONOT_SETSCOPE, SCTP_ADDR_IS_CONFIRMED)) { /* assoc gone no un-lock */ SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ENOBUFS); - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_7); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_8); *error = ENOBUFS; goto out_now; } @@ -6343,14 +6343,14 @@ sctp_connectx_helper_add(struct sctp_tcb if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr) || IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) { SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, EINVAL); - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_8); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_9); *error = EINVAL; goto out_now; } if (sctp_add_remote_addr(stcb, sa, NULL, SCTP_DONOT_SETSCOPE, SCTP_ADDR_IS_CONFIRMED)) { /* assoc gone no un-lock */ SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ENOBUFS); - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_8); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_10); *error = ENOBUFS; goto out_now; } Modified: stable/10/sys/netinet6/sctp6_usrreq.c ============================================================================== --- stable/10/sys/netinet6/sctp6_usrreq.c Sun May 31 12:42:34 2015 (r283821) +++ stable/10/sys/netinet6/sctp6_usrreq.c Sun May 31 12:46:40 2015 (r283822) @@ -215,7 +215,8 @@ sctp6_notify_mbuf(struct sctp_inpcb *inp */ nxtsz = ntohl(icmp6->icmp6_mtu); /* Stop any PMTU timer */ - sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, NULL, SCTP_FROM_SCTP6_USRREQ + SCTP_LOC_1); + sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, NULL, + SCTP_FROM_SCTP6_USRREQ + SCTP_LOC_1); /* Adjust destination size limit */ if (net->mtu > nxtsz) { @@ -337,7 +338,8 @@ sctp6_notify(struct sctp_inpcb *inp, SCTP_TCB_LOCK(stcb); atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_2); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTP6_USRREQ + SCTP_LOC_2); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); /* SCTP_TCB_UNLOCK(stcb); MT: I think this is not needed. */ From owner-svn-src-all@FreeBSD.ORG Sun May 31 12:50:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D09CABDB; Sun, 31 May 2015 12:50:11 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B246C130C; Sun, 31 May 2015 12:50:11 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VCoB1n021659; Sun, 31 May 2015 12:50:11 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VCoBef021658; Sun, 31 May 2015 12:50:11 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505311250.t4VCoBef021658@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 12:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283823 - stable/10/sys/netinet 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 12:50:11 -0000 Author: tuexen Date: Sun May 31 12:50:10 2015 New Revision: 283823 URL: https://svnweb.freebsd.org/changeset/base/283823 Log: MFC r283654: Some more debug info cleanup. Modified: stable/10/sys/netinet/sctputil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctputil.c ============================================================================== --- stable/10/sys/netinet/sctputil.c Sun May 31 12:46:40 2015 (r283822) +++ stable/10/sys/netinet/sctputil.c Sun May 31 12:50:10 2015 (r283823) @@ -1808,7 +1808,8 @@ sctp_timeout_handler(void *t) SCTP_STAT_INCR(sctps_timoassockill); /* Can we free it yet? */ SCTP_INP_DECR_REF(inp); - sctp_timer_stop(SCTP_TIMER_TYPE_ASOCKILL, inp, stcb, NULL, SCTP_FROM_SCTPUTIL + SCTP_LOC_1); + sctp_timer_stop(SCTP_TIMER_TYPE_ASOCKILL, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_1); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); atomic_add_int(&stcb->asoc.refcnt, 1); @@ -1817,7 +1818,8 @@ sctp_timeout_handler(void *t) SCTP_TCB_LOCK(stcb); atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_2); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTPUTIL + SCTP_LOC_2); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -1837,7 +1839,8 @@ sctp_timeout_handler(void *t) * killer */ SCTP_INP_DECR_REF(inp); - sctp_timer_stop(SCTP_TIMER_TYPE_INPKILL, inp, NULL, NULL, SCTP_FROM_SCTPUTIL + SCTP_LOC_3); + sctp_timer_stop(SCTP_TIMER_TYPE_INPKILL, inp, NULL, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_3); sctp_inpcb_free(inp, SCTP_FREE_SHOULD_USE_ABORT, SCTP_CALLED_FROM_INPKILL_TIMER); inp = NULL; @@ -3909,7 +3912,8 @@ sctp_abort_association(struct sctp_inpcb (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) { SCTP_STAT_DECR_GAUGE32(sctps_currestab); } - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_4); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTPUTIL + SCTP_LOC_4); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif @@ -4033,7 +4037,8 @@ sctp_abort_an_association(struct sctp_in atomic_subtract_int(&stcb->asoc.refcnt, 1); } #endif - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_5); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTPUTIL + SCTP_LOC_5); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) if (!so_locked) { SCTP_SOCKET_UNLOCK(so, 1); @@ -5164,7 +5169,8 @@ sctp_user_rcvd(struct sctp_tcb *stcb, ui sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_USR_RCVD, SCTP_SO_LOCKED); /* make sure no timer is running */ - sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL, SCTP_FROM_SCTPUTIL + SCTP_LOC_6); + sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_6); SCTP_TCB_UNLOCK(stcb); } else { /* Update how much we have pending */ @@ -6322,14 +6328,16 @@ sctp_connectx_helper_add(struct sctp_tcb (sin->sin_addr.s_addr == INADDR_BROADCAST) || IN_MULTICAST(ntohl(sin->sin_addr.s_addr))) { SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, EINVAL); - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_7); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTPUTIL + SCTP_LOC_7); *error = EINVAL; goto out_now; } if (sctp_add_remote_addr(stcb, sa, NULL, SCTP_DONOT_SETSCOPE, SCTP_ADDR_IS_CONFIRMED)) { /* assoc gone no un-lock */ SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ENOBUFS); - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_8); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTPUTIL + SCTP_LOC_8); *error = ENOBUFS; goto out_now; } @@ -6343,14 +6351,16 @@ sctp_connectx_helper_add(struct sctp_tcb if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr) || IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) { SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, EINVAL); - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_9); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTPUTIL + SCTP_LOC_9); *error = EINVAL; goto out_now; } if (sctp_add_remote_addr(stcb, sa, NULL, SCTP_DONOT_SETSCOPE, SCTP_ADDR_IS_CONFIRMED)) { /* assoc gone no un-lock */ SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ENOBUFS); - (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_10); + (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, + SCTP_FROM_SCTPUTIL + SCTP_LOC_10); *error = ENOBUFS; goto out_now; } From owner-svn-src-all@FreeBSD.ORG Sun May 31 12:53:11 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD444E12; Sun, 31 May 2015 12:53:11 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAB57153B; Sun, 31 May 2015 12:53:11 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VCrBQS026173; Sun, 31 May 2015 12:53:11 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VCrBG1026166; Sun, 31 May 2015 12:53:11 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505311253.t4VCrBG1026166@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 31 May 2015 12:53:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283824 - in head/lib/libc/arm: . gen 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 12:53:12 -0000 Author: andrew Date: Sun May 31 12:53:10 2015 New Revision: 283824 URL: https://svnweb.freebsd.org/changeset/base/283824 Log: Remove __ARM_EABI__ from more places in libc as this is the only ARM ABI we support. Modified: head/lib/libc/arm/SYS.h head/lib/libc/arm/gen/_setjmp.S head/lib/libc/arm/gen/setjmp.S Modified: head/lib/libc/arm/SYS.h ============================================================================== --- head/lib/libc/arm/SYS.h Sun May 31 12:50:10 2015 (r283823) +++ head/lib/libc/arm/SYS.h Sun May 31 12:53:10 2015 (r283824) @@ -39,15 +39,11 @@ #include #include -#ifdef __ARM_EABI__ #define SYSTRAP(x) \ mov ip, r7; \ ldr r7, =SYS_ ## x; \ swi 0; \ mov r7, ip -#else -#define SYSTRAP(x) swi 0 | SYS_ ## x -#endif #define CERROR _C_LABEL(cerror) #define CURBRK _C_LABEL(curbrk) Modified: head/lib/libc/arm/gen/_setjmp.S ============================================================================== --- head/lib/libc/arm/gen/_setjmp.S Sun May 31 12:50:10 2015 (r283823) +++ head/lib/libc/arm/gen/_setjmp.S Sun May 31 12:53:10 2015 (r283824) @@ -36,7 +36,7 @@ #error FPA is not supported anymore #endif -#if defined(__ARM_EABI__) && !defined(_STANDALONE) +#if !defined(_STANDALONE) .fpu vfp #endif @@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$"); ENTRY(_setjmp) ldr r1, .L_setjmp_magic -#if defined(__ARM_EABI__) && !defined(_STANDALONE) +#if !defined(_STANDALONE) ldr r2, .Lfpu_present #ifdef PIC GOT_INIT(r3, .L_setjmp_got, .L_setjmp_gotinit) @@ -79,7 +79,7 @@ ENTRY(_setjmp) vmrs r2, fpscr str r2, [r0, #(_JB_REG_FPSCR * 4)] 1: -#endif /* __ARM_EABI__ */ +#endif /* !_STANDALONE */ str r1, [r0] @@ -99,11 +99,11 @@ END(_setjmp) .L_setjmp_magic: .word _JB_MAGIC__SETJMP -#if defined(__ARM_EABI__) && !defined(_STANDALONE) +#if !defined(_STANDALONE) GOT_INITSYM(.L_setjmp_got, .L_setjmp_gotinit) .Lfpu_present: .word PIC_SYM(_libc_arm_fpu_present, GOTOFF) -#endif /* __ARM_EABI__ */ +#endif /* !_STANDALONE */ WEAK_ALIAS(___longjmp, _longjmp) ENTRY(_longjmp) @@ -114,7 +114,7 @@ ENTRY(_longjmp) teq ip, r3 /* magic correct? */ bne botch /* no, botch */ -#if defined(__ARM_EABI__) && !defined(_STANDALONE) +#if !defined(_STANDALONE) teq r3, r2 /* did magic change? */ beq 1f /* no, don't restore VFP */ add ip, r0, #(_JB_REG_D8 * 4) @@ -122,7 +122,7 @@ ENTRY(_longjmp) ldr ip, [r0, #(_JB_REG_FPSCR * 4)] vmsr fpscr, ip 1: -#endif /* __ARM_EABI__ */ +#endif /* !_STANDALONE */ add r0, r0, #(_JB_REG_R4 * 4) /* Restore integer registers */ Modified: head/lib/libc/arm/gen/setjmp.S ============================================================================== --- head/lib/libc/arm/gen/setjmp.S Sun May 31 12:50:10 2015 (r283823) +++ head/lib/libc/arm/gen/setjmp.S Sun May 31 12:53:10 2015 (r283824) @@ -36,9 +36,7 @@ #error FPA is not supported anymore #endif -#ifdef __ARM_EABI__ .fpu vfp -#endif #include #include @@ -66,7 +64,6 @@ ENTRY(setjmp) ldr r1, .Lsetjmp_magic -#ifdef __ARM_EABI__ ldr r2, .Lfpu_present #ifdef PIC GOT_INIT(r3, .Lsetjmp_got, .Lsetjmp_gotinit) @@ -84,7 +81,6 @@ ENTRY(setjmp) vmrs r2, fpscr str r2, [r0, #(_JB_REG_FPSCR * 4)] 1: -#endif /* __ARM_EABI__ */ str r1, [r0] /* store magic */ @@ -102,11 +98,9 @@ ENTRY(setjmp) .Lsetjmp_magic: .word _JB_MAGIC_SETJMP -#ifdef __ARM_EABI__ GOT_INITSYM(.Lsetjmp_got, .Lsetjmp_gotinit) .Lfpu_present: .word PIC_SYM(_libc_arm_fpu_present, GOTOFF) -#endif /* __ARM_EABI__ */ END(setjmp) .weak _C_LABEL(longjmp) @@ -126,7 +120,6 @@ ENTRY(__longjmp) bl PIC_SYM(_C_LABEL(sigprocmask), PLT) ldmfd sp!, {r0-r2, r14} -#ifdef __ARM_EABI__ tst r2, #(_JB_MAGIC_SETJMP ^ _JB_MAGIC_SETJMP_VFP) /* is this a VFP magic? */ beq 1f /* no, don't restore VFP */ @@ -135,7 +128,6 @@ ENTRY(__longjmp) ldr ip, [r0, #(_JB_REG_FPSCR * 4)] vmsr fpscr, ip 1: -#endif /* __ARM_EABI__ */ add r0, r0, #(_JB_REG_R4 * 4) /* Restore integer registers */ From owner-svn-src-all@FreeBSD.ORG Sun May 31 12:53:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94100F4D; Sun, 31 May 2015 12:53:17 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82293153F; Sun, 31 May 2015 12:53:17 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VCrHZN026224; Sun, 31 May 2015 12:53:17 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VCrH43026223; Sun, 31 May 2015 12:53:17 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505311253.t4VCrH43026223@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 12:53: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: r283825 - stable/10/sys/netinet 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 12:53:17 -0000 Author: tuexen Date: Sun May 31 12:53:16 2015 New Revision: 283825 URL: https://svnweb.freebsd.org/changeset/base/283825 Log: MFC r283658: Use macros for overhead in a consistent way. No functional change. Thanks to Irene Ruengeler for suggesting the change. Modified: stable/10/sys/netinet/sctp_output.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Sun May 31 12:53:10 2015 (r283824) +++ stable/10/sys/netinet/sctp_output.c Sun May 31 12:53:16 2015 (r283825) @@ -4063,7 +4063,7 @@ sctp_lowlevel_chunk_output(struct sctp_i sctp_route_t iproute; int len; - len = sizeof(struct ip) + sizeof(struct sctphdr); + len = SCTP_MIN_V4_OVERHEAD; if (port) { len += sizeof(struct udphdr); } @@ -4345,7 +4345,7 @@ sctp_lowlevel_chunk_output(struct sctp_i flowlabel = ntohl(((struct in6pcb *)inp)->in6p_flowinfo); } flowlabel &= 0x000fffff; - len = sizeof(struct ip6_hdr) + sizeof(struct sctphdr); + len = SCTP_MIN_OVERHEAD; if (port) { len += sizeof(struct udphdr); } @@ -5107,10 +5107,11 @@ sctp_arethere_unrecognized_parameters(st if (op_err == NULL) { /* Ok need to try to get a mbuf */ #ifdef INET6 - l_len = sizeof(struct ip6_hdr) + sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr); + l_len = SCTP_MIN_OVERHEAD; #else - l_len = sizeof(struct ip) + sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr); + l_len = SCTP_MIN_V4_OVERHEAD; #endif + l_len += sizeof(struct sctp_chunkhdr); l_len += plen; l_len += sizeof(struct sctp_paramhdr); op_err = sctp_get_mbuf_for_msg(l_len, 0, M_NOWAIT, 1, MT_DATA); @@ -5176,10 +5177,11 @@ sctp_arethere_unrecognized_parameters(st /* Ok need to try to get an mbuf */ #ifdef INET6 - l_len = sizeof(struct ip6_hdr) + sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr); + l_len = SCTP_MIN_OVERHEAD; #else - l_len = sizeof(struct ip) + sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr); + l_len = SCTP_MIN_V4_OVERHEAD; #endif + l_len += sizeof(struct sctp_chunkhdr); l_len += plen; l_len += sizeof(struct sctp_paramhdr); op_err = sctp_get_mbuf_for_msg(l_len, 0, M_NOWAIT, 1, MT_DATA); @@ -5251,10 +5253,11 @@ invalid_size: int l_len; #ifdef INET6 - l_len = sizeof(struct ip6_hdr) + sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr); + l_len = SCTP_MIN_OVERHEAD; #else - l_len = sizeof(struct ip) + sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr); + l_len = SCTP_MIN_V4_OVERHEAD; #endif + l_len += sizeof(struct sctp_chunkhdr); l_len += (2 * sizeof(struct sctp_paramhdr)); op_err = sctp_get_mbuf_for_msg(l_len, 0, M_NOWAIT, 1, MT_DATA); if (op_err) { @@ -7977,12 +7980,12 @@ again_one_more_time: switch (((struct sockaddr *)&net->ro._l_addr)->sa_family) { #ifdef INET case AF_INET: - mtu = net->mtu - (sizeof(struct ip) + sizeof(struct sctphdr)); + mtu = net->mtu - SCTP_MIN_V4_OVERHEAD; break; #endif #ifdef INET6 case AF_INET6: - mtu = net->mtu - (sizeof(struct ip6_hdr) + sizeof(struct sctphdr)); + mtu = net->mtu - SCTP_MIN_OVERHEAD; break; #endif default: @@ -8529,16 +8532,16 @@ again_one_more_time: switch (((struct sockaddr *)&net->ro._l_addr)->sa_family) { #ifdef INET case AF_INET: - if (net->mtu > (sizeof(struct ip) + sizeof(struct sctphdr))) - omtu = net->mtu - (sizeof(struct ip) + sizeof(struct sctphdr)); + if (net->mtu > SCTP_MIN_V4_OVERHEAD) + omtu = net->mtu - SCTP_MIN_V4_OVERHEAD; else omtu = 0; break; #endif #ifdef INET6 case AF_INET6: - if (net->mtu > (sizeof(struct ip6_hdr) + sizeof(struct sctphdr))) - omtu = net->mtu - (sizeof(struct ip6_hdr) + sizeof(struct sctphdr)); + if (net->mtu > SCTP_MIN_OVERHEAD) + omtu = net->mtu - SCTP_MIN_OVERHEAD; else omtu = 0; break; From owner-svn-src-all@FreeBSD.ORG Sun May 31 12:56:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C502123; Sun, 31 May 2015 12:56:23 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49F9D1568; Sun, 31 May 2015 12:56:23 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VCuNI0026768; Sun, 31 May 2015 12:56:23 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VCuMnH026764; Sun, 31 May 2015 12:56:22 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505311256.t4VCuMnH026764@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 12:56:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283826 - stable/10/sys/netinet 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 12:56:23 -0000 Author: tuexen Date: Sun May 31 12:56:22 2015 New Revision: 283826 URL: https://svnweb.freebsd.org/changeset/base/283826 Log: MFC r283662: Fix a bug where messages would not be sent in SHUTDOWN_RECEIVED state. This problem was reported by Mark Bonnekessel and Markus Boese. Thanks to Irene Ruengeler for helping me to fix the cause of the problem. It can be tested with the following packetdrill script: +0.0 socket(..., SOCK_STREAM, IPPROTO_SCTP) = 3 +0.0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR) +0.0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 // Check the handshake with an empty(!) cookie +0.1 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress) +0.0 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=0, ...] +0.1 < sctp: INIT_ACK[flgs=0, tag=2, a_rwnd=10000, os=1, is=1, tsn=0, STATE_COOKIE[len=4, val=...]] +0.0 > sctp: COOKIE_ECHO[flgs=0, len=4, val=...] +0.1 < sctp: COOKIE_ACK[flgs=0] +0.0 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 +0.0 write(3, ..., 1024) = 1024 +0.0 > sctp: DATA[flgs=BE, len=1040, tsn=0, sid=0, ssn=0, ppid=0] +0.0 write(3, ..., 1024) = 1024 // Pending due to Nagle +0.0 < sctp: SHUTDOWN[flgs=0, cum_tsn=0] +0.0 > sctp: DATA[flgs=BE, len=1040, tsn=1, sid=0, ssn=1, ppid=0] +0.0 < sctp: SACK[flgs=0, cum_tsn=1, a_rwnd=10000, gaps=[], dups=[]] // Do we need another SHUTDOWN here? +0.0 > sctp: SHUTDOWN_ACK[flgs=0] +0.0 < sctp: SHUTDOWN_COMPLETE[flgs=0] +0.0 close(3) = 0 Modified: stable/10/sys/netinet/sctp_asconf.c stable/10/sys/netinet/sctp_output.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_asconf.c ============================================================================== --- stable/10/sys/netinet/sctp_asconf.c Sun May 31 12:53:16 2015 (r283825) +++ stable/10/sys/netinet/sctp_asconf.c Sun May 31 12:56:22 2015 (r283826) @@ -1977,7 +1977,8 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb * * sent when the state goes open. */ if (status == 0 && - SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) { + ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) || + (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_SHUTDOWN_RECEIVED))) { #ifdef SCTP_TIMER_BASED_ASCONF sctp_timer_start(SCTP_TIMER_TYPE_ASCONF, inp, stcb, stcb->asoc.primary_destination); @@ -2225,7 +2226,8 @@ sctp_asconf_iterator_stcb(struct sctp_in * count of queued params. If in the non-open * state, these get sent when the assoc goes open. */ - if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) { + if ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) || + (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) { if (status >= 0) { num_queued++; } @@ -2285,7 +2287,8 @@ sctp_set_primary_ip_address_sa(struct sc "set_primary_ip_address_sa: queued on tcb=%p, ", (void *)stcb); SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, sa); - if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) { + if ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) || + (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) { #ifdef SCTP_TIMER_BASED_ASCONF sctp_timer_start(SCTP_TIMER_TYPE_ASCONF, stcb->sctp_ep, stcb, @@ -2321,7 +2324,8 @@ sctp_set_primary_ip_address(struct sctp_ SCTPDBG(SCTP_DEBUG_ASCONF1, "set_primary_ip_address: queued on stcb=%p, ", (void *)stcb); SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, &ifa->address.sa); - if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) { + if ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) || + (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) { #ifdef SCTP_TIMER_BASED_ASCONF sctp_timer_start(SCTP_TIMER_TYPE_ASCONF, stcb->sctp_ep, stcb, Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Sun May 31 12:53:16 2015 (r283825) +++ stable/10/sys/netinet/sctp_output.c Sun May 31 12:56:22 2015 (r283826) @@ -8551,7 +8551,8 @@ again_one_more_time: omtu = 0; break; } - if ((((asoc->state & SCTP_STATE_OPEN) == SCTP_STATE_OPEN) && + if ((((SCTP_GET_STATE(asoc) == SCTP_STATE_OPEN) || + (SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) && (skip_data_for_this_net == 0)) || (cookie)) { TAILQ_FOREACH_SAFE(chk, &asoc->send_queue, sctp_next, nchk) { From owner-svn-src-all@FreeBSD.ORG Sun May 31 12:59:24 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29D6126F; Sun, 31 May 2015 12:59:24 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F20D5157F; Sun, 31 May 2015 12:59:23 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VCxNOY027207; Sun, 31 May 2015 12:59:23 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VCxNEv027204; Sun, 31 May 2015 12:59:23 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505311259.t4VCxNEv027204@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 12:59: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: r283827 - stable/10/sys/netinet 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 12:59:24 -0000 Author: tuexen Date: Sun May 31 12:59:22 2015 New Revision: 283827 URL: https://svnweb.freebsd.org/changeset/base/283827 Log: MFC r283664: Retire SCTP_DONT_DO_PRIVADDR_SCOPE which was never defined. Modified: stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctp_pcb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Sun May 31 12:56:22 2015 (r283826) +++ stable/10/sys/netinet/sctp_output.c Sun May 31 12:59:22 2015 (r283827) @@ -5591,11 +5591,7 @@ do_a_abort: stc.ipv6_addr_legal = 0; stc.ipv4_addr_legal = 1; } -#ifdef SCTP_DONT_DO_PRIVADDR_SCOPE - stc.ipv4_scope = 1; -#else stc.ipv4_scope = 0; -#endif if (net == NULL) { to = src; switch (dst->sa_family) { @@ -5616,13 +5612,9 @@ do_a_abort: stc.laddr_type = SCTP_IPV4_ADDRESS; /* scope_id is only for v6 */ stc.scope_id = 0; -#ifndef SCTP_DONT_DO_PRIVADDR_SCOPE if (IN4_ISPRIVATE_ADDRESS(&src4->sin_addr)) { stc.ipv4_scope = 1; } -#else - stc.ipv4_scope = 1; -#endif /* SCTP_DONT_DO_PRIVADDR_SCOPE */ /* Must use the address in this case */ if (sctp_is_address_on_local_host(src, vrf_id)) { stc.loopback_scope = 1; Modified: stable/10/sys/netinet/sctp_pcb.c ============================================================================== --- stable/10/sys/netinet/sctp_pcb.c Sun May 31 12:56:22 2015 (r283826) +++ stable/10/sys/netinet/sctp_pcb.c Sun May 31 12:59:22 2015 (r283827) @@ -3796,13 +3796,9 @@ sctp_add_remote_addr(struct sctp_tcb *st /* assure len is set */ sin->sin_len = sizeof(struct sockaddr_in); if (set_scope) { -#ifdef SCTP_DONT_DO_PRIVADDR_SCOPE - stcb->asoc.scope.ipv4_local_scope = 1; -#else if (IN4_ISPRIVATE_ADDRESS(&sin->sin_addr)) { stcb->asoc.scope.ipv4_local_scope = 1; } -#endif /* SCTP_DONT_DO_PRIVADDR_SCOPE */ } else { /* Validate the address is in scope */ if ((IN4_ISPRIVATE_ADDRESS(&sin->sin_addr)) && From owner-svn-src-all@FreeBSD.ORG Sun May 31 13:01:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A8083CC; Sun, 31 May 2015 13:01:59 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 403451750; Sun, 31 May 2015 13:01:59 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VD1x6m031306; Sun, 31 May 2015 13:01:59 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VD1x7M031305; Sun, 31 May 2015 13:01:59 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505311301.t4VD1x7M031305@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 13:01: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: r283828 - stable/10/sys/netinet 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 13:01:59 -0000 Author: tuexen Date: Sun May 31 13:01:58 2015 New Revision: 283828 URL: https://svnweb.freebsd.org/changeset/base/283828 Log: MFC r283665: Take source and destination address into account when determining the scope. This fixes a problem when a client with a global address connects to a server with a private address. Thanks to Irene Ruengeler in helping me to find the issue. Modified: stable/10/sys/netinet/sctp_output.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Sun May 31 12:59:22 2015 (r283827) +++ stable/10/sys/netinet/sctp_output.c Sun May 31 13:01:58 2015 (r283828) @@ -5612,7 +5612,8 @@ do_a_abort: stc.laddr_type = SCTP_IPV4_ADDRESS; /* scope_id is only for v6 */ stc.scope_id = 0; - if (IN4_ISPRIVATE_ADDRESS(&src4->sin_addr)) { + if ((IN4_ISPRIVATE_ADDRESS(&src4->sin_addr)) || + (IN4_ISPRIVATE_ADDRESS(&dst4->sin_addr))) { stc.ipv4_scope = 1; } /* Must use the address in this case */ @@ -5636,16 +5637,18 @@ do_a_abort: stc.local_scope = 0; stc.site_scope = 1; stc.ipv4_scope = 1; - } else if (IN6_IS_ADDR_LINKLOCAL(&src6->sin6_addr)) { + } else if (IN6_IS_ADDR_LINKLOCAL(&src6->sin6_addr) || + IN6_IS_ADDR_LINKLOCAL(&dst6->sin6_addr)) { /* - * If the new destination is a - * LINK_LOCAL we must have common - * both site and local scope. Don't - * set local scope though since we - * must depend on the source to be - * added implicitly. We cannot - * assure just because we share one - * link that all links are common. + * If the new destination or source + * is a LINK_LOCAL we must have + * common both site and local scope. + * Don't set local scope though + * since we must depend on the + * source to be added implicitly. We + * cannot assure just because we + * share one link that all links are + * common. */ stc.local_scope = 0; stc.site_scope = 1; @@ -5661,11 +5664,12 @@ do_a_abort: * pull out the scope_id from * incoming pkt */ - } else if (IN6_IS_ADDR_SITELOCAL(&src6->sin6_addr)) { + } else if (IN6_IS_ADDR_SITELOCAL(&src6->sin6_addr) || + IN6_IS_ADDR_SITELOCAL(&dst6->sin6_addr)) { /* - * If the new destination is - * SITE_LOCAL then we must have site - * scope in common. + * If the new destination or source + * is SITE_LOCAL then we must have + * site scope in common. */ stc.site_scope = 1; } From owner-svn-src-all@FreeBSD.ORG Sun May 31 13:04:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4DEE1520; Sun, 31 May 2015 13:04:39 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F858176F; Sun, 31 May 2015 13:04:39 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VD4dSo031721; Sun, 31 May 2015 13:04:39 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VD4dcu031720; Sun, 31 May 2015 13:04:39 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505311304.t4VD4dcu031720@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 13:04:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283829 - stable/10/sys/netinet 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 13:04:39 -0000 Author: tuexen Date: Sun May 31 13:04:38 2015 New Revision: 283829 URL: https://svnweb.freebsd.org/changeset/base/283829 Log: MFC r283666: Report the MTU consistently as specified in https://tools.ietf.org/html/rfc6458 Thanks to Irene Ruengeler for helping me to fix this bug. Modified: stable/10/sys/netinet/sctp_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/10/sys/netinet/sctp_usrreq.c Sun May 31 13:01:58 2015 (r283828) +++ stable/10/sys/netinet/sctp_usrreq.c Sun May 31 13:04:38 2015 (r283829) @@ -2439,17 +2439,23 @@ flags_out: /* Applies to the specific association */ paddrp->spp_flags = 0; if (net != NULL) { - int ovh; - - if (inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) { - ovh = SCTP_MED_OVERHEAD; - } else { - ovh = SCTP_MED_V4_OVERHEAD; - } - paddrp->spp_hbinterval = net->heart_beat_delay; paddrp->spp_pathmaxrxt = net->failure_threshold; - paddrp->spp_pathmtu = net->mtu - ovh; + paddrp->spp_pathmtu = net->mtu; + switch (net->ro._l_addr.sa.sa_family) { +#ifdef INET + case AF_INET: + paddrp->spp_pathmtu -= SCTP_MIN_V4_OVERHEAD; + break; +#endif +#ifdef INET6 + case AF_INET6: + paddrp->spp_pathmtu -= SCTP_MIN_V4_OVERHEAD; + break; +#endif + default: + break; + } /* get flags for HB */ if (net->dest_state & SCTP_ADDR_NOHB) { paddrp->spp_flags |= SPP_HB_DISABLE; @@ -2479,7 +2485,7 @@ flags_out: * value */ paddrp->spp_pathmaxrxt = stcb->asoc.def_net_failure; - paddrp->spp_pathmtu = sctp_get_frag_point(stcb, &stcb->asoc); + paddrp->spp_pathmtu = 0; if (stcb->asoc.default_dscp & 0x01) { paddrp->spp_dscp = stcb->asoc.default_dscp & 0xfc; paddrp->spp_flags |= SPP_DSCP; @@ -2615,6 +2621,20 @@ flags_out: paddri->spinfo_rto = net->RTO; paddri->spinfo_assoc_id = sctp_get_associd(stcb); paddri->spinfo_mtu = net->mtu; + switch (addr->sa_family) { +#if defined(INET) + case AF_INET: + paddri->spinfo_mtu -= SCTP_MIN_V4_OVERHEAD; + break; +#endif +#if defined(INET6) + case AF_INET6: + paddri->spinfo_mtu -= SCTP_MIN_OVERHEAD; + break; +#endif + default: + break; + } SCTP_TCB_UNLOCK(stcb); *optsize = sizeof(struct sctp_paddrinfo); } else { @@ -2691,6 +2711,20 @@ flags_out: sstat->sstat_primary.spinfo_srtt = net->lastsa >> SCTP_RTT_SHIFT; sstat->sstat_primary.spinfo_rto = net->RTO; sstat->sstat_primary.spinfo_mtu = net->mtu; + switch (stcb->asoc.primary_destination->ro._l_addr.sa.sa_family) { +#if defined(INET) + case AF_INET: + sstat->sstat_primary.spinfo_mtu -= SCTP_MIN_V4_OVERHEAD; + break; +#endif +#if defined(INET6) + case AF_INET6: + sstat->sstat_primary.spinfo_mtu -= SCTP_MIN_OVERHEAD; + break; +#endif + default: + break; + } sstat->sstat_primary.spinfo_assoc_id = sctp_get_associd(stcb); SCTP_TCB_UNLOCK(stcb); *optsize = sizeof(struct sctp_status); @@ -5188,19 +5222,6 @@ sctp_setopt(struct socket *so, int optna } if (stcb != NULL) { /************************TCB SPECIFIC SET ******************/ - /* - * do we change the timer for HB, we run - * only one? - */ - int ovh = 0; - - if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) { - ovh = SCTP_MED_OVERHEAD; - } else { - ovh = SCTP_MED_V4_OVERHEAD; - } - - /* network sets ? */ if (net != NULL) { /************************NET SPECIFIC SET ******************/ if (paddrp->spp_flags & SPP_HB_DISABLE) { @@ -5234,7 +5255,21 @@ sctp_setopt(struct socket *so, int optna SCTP_FROM_SCTP_USRREQ + SCTP_LOC_11); } net->dest_state |= SCTP_ADDR_NO_PMTUD; - net->mtu = paddrp->spp_pathmtu + ovh; + net->mtu = paddrp->spp_pathmtu; + switch (net->ro._l_addr.sa.sa_family) { +#ifdef INET + case AF_INET: + net->mtu += SCTP_MIN_V4_OVERHEAD; + break; +#endif +#ifdef INET6 + case AF_INET6: + net->mtu += SCTP_MIN_OVERHEAD; + break; +#endif + default: + break; + } if (net->mtu < stcb->asoc.smallest_mtu) { sctp_pathmtu_adjustment(stcb, net->mtu); } @@ -5362,7 +5397,21 @@ sctp_setopt(struct socket *so, int optna SCTP_FROM_SCTP_USRREQ + SCTP_LOC_16); } net->dest_state |= SCTP_ADDR_NO_PMTUD; - net->mtu = paddrp->spp_pathmtu + ovh; + net->mtu = paddrp->spp_pathmtu; + switch (net->ro._l_addr.sa.sa_family) { +#ifdef INET + case AF_INET: + net->mtu += SCTP_MIN_V4_OVERHEAD; + break; +#endif +#ifdef INET6 + case AF_INET6: + net->mtu += SCTP_MIN_OVERHEAD; + break; +#endif + default: + break; + } if (net->mtu < stcb->asoc.smallest_mtu) { sctp_pathmtu_adjustment(stcb, net->mtu); } From owner-svn-src-all@FreeBSD.ORG Sun May 31 13:07:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D693068A; Sun, 31 May 2015 13:07:22 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C50A91790; Sun, 31 May 2015 13:07:22 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VD7MH9032147; Sun, 31 May 2015 13:07:22 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VD7Mou032146; Sun, 31 May 2015 13:07:22 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505311307.t4VD7Mou032146@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 13:07:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283830 - stable/10/sys/netinet 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 13:07:23 -0000 Author: tuexen Date: Sun May 31 13:07:22 2015 New Revision: 283830 URL: https://svnweb.freebsd.org/changeset/base/283830 Log: MFC r283691: Remove printf() noise... Modified: stable/10/sys/netinet/sctp_output.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Sun May 31 13:04:38 2015 (r283829) +++ stable/10/sys/netinet/sctp_output.c Sun May 31 13:07:22 2015 (r283830) @@ -3160,8 +3160,6 @@ again_with_private_addresses_allowed: sifa = NULL; continue; } - } else { - SCTP_PRINTF("Stcb is null - no print\n"); } atomic_add_int(&sifa->refcount, 1); goto out; From owner-svn-src-all@FreeBSD.ORG Sun May 31 14:04:13 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78554FD0; Sun, 31 May 2015 14:04:13 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6607015C2; Sun, 31 May 2015 14:04:13 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VE4DJn065689; Sun, 31 May 2015 14:04:13 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VE4BAF065678; Sun, 31 May 2015 14:04:11 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505311404.t4VE4BAF065678@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 31 May 2015 14:04:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283831 - head/lib/libc/arm/string 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 14:04:13 -0000 Author: andrew Date: Sun May 31 14:04:11 2015 New Revision: 283831 URL: https://svnweb.freebsd.org/changeset/base/283831 Log: Add the needed if-then instructions to build as Thumb-2. Modified: head/lib/libc/arm/string/ffs.S head/lib/libc/arm/string/memmove.S head/lib/libc/arm/string/memset.S head/lib/libc/arm/string/strcmp.S head/lib/libc/arm/string/strlen.S head/lib/libc/arm/string/strncmp.S Modified: head/lib/libc/arm/string/ffs.S ============================================================================== --- head/lib/libc/arm/string/ffs.S Sun May 31 13:07:22 2015 (r283830) +++ head/lib/libc/arm/string/ffs.S Sun May 31 14:04:11 2015 (r283831) @@ -78,6 +78,7 @@ ENTRY(ffs) .byte 31, 0, 0, 0, 0, 24, 0, 20 /* 48-55 */ .byte 30, 0, 23, 19, 29, 18, 17, 0 /* 56-63 */ #else + itt ne clzne r0, r0 rsbne r0, r0, #32 RET Modified: head/lib/libc/arm/string/memmove.S ============================================================================== --- head/lib/libc/arm/string/memmove.S Sun May 31 13:07:22 2015 (r283830) +++ head/lib/libc/arm/string/memmove.S Sun May 31 14:04:11 2015 (r283831) @@ -48,7 +48,9 @@ ENTRY(bcopy) #endif /* Do the buffers overlap? */ cmp r0, r1 + it eq RETeq /* Bail now if src/dst are the same */ + ite cc subcc r3, r0, r1 /* if (dst > src) r3 = dst - src */ subcs r3, r1, r0 /* if (src > dsr) r3 = src - dst */ cmp r3, r2 /* if (r3 < len) we have an overlap */ @@ -56,8 +58,10 @@ ENTRY(bcopy) /* Determine copy direction */ cmp r1, r0 + it cc bcc .Lmemmove_backwards + itt eq moveq r0, #0 /* Quick abort for len=0 */ RETeq @@ -88,6 +92,7 @@ ENTRY(bcopy) bge .Lmemmove_floop32 cmn r2, #0x10 + ittt ge ldmiage r1!, {r3, r4, r12, lr} /* blat a remaining 16 bytes */ stmiage r0!, {r3, r4, r12, lr} subge r2, r2, #0x10 @@ -98,6 +103,7 @@ ENTRY(bcopy) /* blat 12 bytes at a time */ .Lmemmove_floop12: + ittt ge ldmiage r1!, {r3, r12, lr} stmiage r0!, {r3, r12, lr} subsge r2, r2, #0x0c @@ -108,8 +114,10 @@ ENTRY(bcopy) blt .Lmemmove_fl4 subs r2, r2, #4 + itt lt ldrlt r3, [r1], #4 strlt r3, [r0], #4 + ittt ge ldmiage r1!, {r3, r12} stmiage r0!, {r3, r12} subge r2, r2, #4 @@ -117,14 +125,17 @@ ENTRY(bcopy) .Lmemmove_fl4: /* less than 4 bytes to go */ adds r2, r2, #4 + it eq ldmiaeq sp!, {r0, pc} /* done */ /* copy the crud byte at a time */ cmp r2, #2 ldrb r3, [r1], #1 strb r3, [r0], #1 + itt ge ldrbge r3, [r1], #1 strbge r3, [r0], #1 + itt gt ldrbgt r3, [r1], #1 strbgt r3, [r0], #1 ldmia sp!, {r0, pc} @@ -137,8 +148,10 @@ ENTRY(bcopy) /* align destination with byte copies */ ldrb r3, [r1], #1 strb r3, [r0], #1 + itt ge ldrbge r3, [r1], #1 strbge r3, [r0], #1 + itt gt ldrbgt r3, [r1], #1 strbgt r3, [r0], #1 subs r2, r2, r12 @@ -355,10 +368,12 @@ ENTRY(bcopy) .Lmemmove_bl32: cmn r2, #0x10 + ittt ge ldmdbge r1!, {r3, r4, r12, lr} /* blat a remaining 16 bytes */ stmdbge r0!, {r3, r4, r12, lr} subge r2, r2, #0x10 adds r2, r2, #0x14 + ittt ge ldmdbge r1!, {r3, r12, lr} /* blat a remaining 12 bytes */ stmdbge r0!, {r3, r12, lr} subge r2, r2, #0x0c @@ -368,8 +383,10 @@ ENTRY(bcopy) adds r2, r2, #8 blt .Lmemmove_bl4 subs r2, r2, #4 + itt lt ldrlt r3, [r1, #-4]! strlt r3, [r0, #-4]! + ittt ge ldmdbge r1!, {r3, r12} stmdbge r0!, {r3, r12} subge r2, r2, #4 @@ -377,14 +394,17 @@ ENTRY(bcopy) .Lmemmove_bl4: /* less than 4 bytes to go */ adds r2, r2, #4 + it eq RETeq /* done */ /* copy the crud byte at a time */ cmp r2, #2 ldrb r3, [r1, #-1]! strb r3, [r0, #-1]! + itt ge ldrbge r3, [r1, #-1]! strbge r3, [r0, #-1]! + itt gt ldrbgt r3, [r1, #-1]! strbgt r3, [r0, #-1]! RET @@ -396,8 +416,10 @@ ENTRY(bcopy) /* align destination with byte copies */ ldrb r3, [r1, #-1]! strb r3, [r0, #-1]! + itt ge ldrbge r3, [r1, #-1]! strbge r3, [r0, #-1]! + itt gt ldrbgt r3, [r1, #-1]! strbgt r3, [r0, #-1]! subs r2, r2, r12 Modified: head/lib/libc/arm/string/memset.S ============================================================================== --- head/lib/libc/arm/string/memset.S Sun May 31 13:07:22 2015 (r283830) +++ head/lib/libc/arm/string/memset.S Sun May 31 14:04:11 2015 (r283831) @@ -114,6 +114,7 @@ ENTRY(memset) orr r3, r3, r3, lsl #16 /* Extend value to 32-bits */ #endif #ifdef _ARM_ARCH_5E + itt ne subne r1, r1, #0x04 /* Quad-align if necessary */ strne r3, [ip], #0x04 cmp r1, #0x10 @@ -127,18 +128,22 @@ ENTRY(memset) .Lmemset_loop128: subs r1, r1, #0x80 #ifdef _ARM_ARCH_5E + itttt ge strdge r2, [ip], #0x08 strdge r2, [ip], #0x08 strdge r2, [ip], #0x08 strdge r2, [ip], #0x08 + itttt ge strdge r2, [ip], #0x08 strdge r2, [ip], #0x08 strdge r2, [ip], #0x08 strdge r2, [ip], #0x08 + itttt ge strdge r2, [ip], #0x08 strdge r2, [ip], #0x08 strdge r2, [ip], #0x08 strdge r2, [ip], #0x08 + itttt ge strdge r2, [ip], #0x08 strdge r2, [ip], #0x08 strdge r2, [ip], #0x08 @@ -162,6 +167,7 @@ ENTRY(memset) stmiage ip!, {r2-r3} #endif bgt .Lmemset_loop128 + it eq RETeq /* Zero length so just exit */ add r1, r1, #0x80 /* Adjust for extra sub */ @@ -169,6 +175,7 @@ ENTRY(memset) /* Do 32 bytes at a time */ .Lmemset_loop32: subs r1, r1, #0x20 + itttt ge #ifdef _ARM_ARCH_5E strdge r2, [ip], #0x08 strdge r2, [ip], #0x08 @@ -181,11 +188,13 @@ ENTRY(memset) stmiage ip!, {r2-r3} #endif bgt .Lmemset_loop32 + it eq RETeq /* Zero length so just exit */ adds r1, r1, #0x10 /* Partially adjust for extra sub */ /* Deal with 16 bytes or more */ + itt ge #ifdef _ARM_ARCH_5E strdge r2, [ip], #0x08 strdge r2, [ip], #0x08 @@ -193,20 +202,25 @@ ENTRY(memset) stmiage ip!, {r2-r3} stmiage ip!, {r2-r3} #endif + it eq RETeq /* Zero length so just exit */ + it lt addlt r1, r1, #0x10 /* Possibly adjust for extra sub */ /* We have at least 4 bytes so copy as words */ .Lmemset_loop4: subs r1, r1, #0x04 + it ge strge r3, [ip], #0x04 bgt .Lmemset_loop4 + it eq RETeq /* Zero length so just exit */ #ifdef _ARM_ARCH_5E /* Compensate for 64-bit alignment check */ adds r1, r1, #0x04 + it eq RETeq cmp r1, #2 #else @@ -214,7 +228,9 @@ ENTRY(memset) #endif strb r3, [ip], #0x01 /* Set 1 byte */ + it ge strbge r3, [ip], #0x01 /* Set another byte */ + it gt strbgt r3, [ip] /* and a third */ RET /* Exit */ @@ -222,18 +238,24 @@ ENTRY(memset) rsb r2, r2, #0x004 strb r3, [ip], #0x01 /* Set 1 byte */ cmp r2, #0x02 + it ge strbge r3, [ip], #0x01 /* Set another byte */ sub r1, r1, r2 + it gt strbgt r3, [ip], #0x01 /* and a third */ cmp r1, #0x04 /* More than 4 bytes left? */ + it ge bge .Lmemset_wordaligned /* Yup */ .Lmemset_lessthanfour: cmp r1, #0x00 + it eq RETeq /* Zero length so exit */ strb r3, [ip], #0x01 /* Set 1 byte */ cmp r1, #0x02 + it ge strbge r3, [ip], #0x01 /* Set another byte */ + it gt strbgt r3, [ip] /* and a third */ RET /* Exit */ #ifdef _BZERO Modified: head/lib/libc/arm/string/strcmp.S ============================================================================== --- head/lib/libc/arm/string/strcmp.S Sun May 31 13:07:22 2015 (r283830) +++ head/lib/libc/arm/string/strcmp.S Sun May 31 14:04:11 2015 (r283831) @@ -37,6 +37,7 @@ ENTRY(strcmp) ldrb r2, [r0], #1 ldrb r3, [r1], #1 cmp r2, #1 + it cs cmpcs r2, r3 beq 1b sub r0, r2, r3 Modified: head/lib/libc/arm/string/strlen.S ============================================================================== --- head/lib/libc/arm/string/strlen.S Sun May 31 13:07:22 2015 (r283830) +++ head/lib/libc/arm/string/strlen.S Sun May 31 14:04:11 2015 (r283831) @@ -52,8 +52,10 @@ ENTRY(strlen) #else ands r3, r2, #0xff000000 #endif + it ne addne r1, r1, #1 .Ldo_3: + itt ne #ifndef __ARMEB__ andsne r3, r2, #0x0000ff00 #else @@ -61,6 +63,7 @@ ENTRY(strlen) #endif addne r1, r1, #1 .Ldo_2: + itt ne #ifndef __ARMEB__ andsne r3, r2, #0x00ff0000 #else @@ -68,6 +71,7 @@ ENTRY(strlen) #endif addne r1, r1, #1 .Ldo_1: + ittt ne #ifndef __ARMEB__ andsne r3, r2, #0xff000000 #else Modified: head/lib/libc/arm/string/strncmp.S ============================================================================== --- head/lib/libc/arm/string/strncmp.S Sun May 31 13:07:22 2015 (r283830) +++ head/lib/libc/arm/string/strncmp.S Sun May 31 14:04:11 2015 (r283831) @@ -35,18 +35,21 @@ __FBSDID("$FreeBSD$"); ENTRY(strncmp) /* if (len == 0) return 0 */ cmp r2, #0 + itt eq moveq r0, #0 moveq pc, lr /* ip == last src address to compare */ adds ip, r0, r2 /* Use last possible address on overflow. */ + it cs movcs ip, #0 sub ip, ip, #1 1: ldrb r2, [r0], #1 ldrb r3, [r1], #1 cmp ip, r0 + itt cs cmpcs r2, #1 cmpcs r2, r3 beq 1b From owner-svn-src-all@FreeBSD.ORG Sun May 31 15:50:55 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CE01E47; Sun, 31 May 2015 15:50:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BCB31CAC; Sun, 31 May 2015 15:50:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VFosRr020152; Sun, 31 May 2015 15:50:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VFos0w020151; Sun, 31 May 2015 15:50:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201505311550.t4VFos0w020151@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 31 May 2015 15:50:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283832 - head/sys/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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 15:50:55 -0000 Author: kib Date: Sun May 31 15:50:54 2015 New Revision: 283832 URL: https://svnweb.freebsd.org/changeset/base/283832 Log: Remove unused variable. When deallocate_dependencies() is performed, softdep_journal_freeblocks() already called cancel_allocdirect() which should have eliminated direct dependencies for all truncated full blocks. The indirect dependencies are allowed above, since second- and third-level dependencies are only dealt with by the code which frees indirect block, which happens after the inode write. Discussed with: mckusick, jeff Reviewed by: jeff Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Sun May 31 14:04:11 2015 (r283831) +++ head/sys/ufs/ffs/ffs_softdep.c Sun May 31 15:50:54 2015 (r283832) @@ -7208,7 +7208,6 @@ deallocate_dependencies(bp, freeblks, of { struct indirdep *indirdep; struct pagedep *pagedep; - struct allocdirect *adp; struct worklist *wk, *wkn; struct ufsmount *ump; @@ -7255,7 +7254,6 @@ deallocate_dependencies(bp, freeblks, of break; case D_ALLOCDIRECT: - adp = WK_ALLOCDIRECT(wk); if (off != 0) continue; /* FALLTHROUGH */ From owner-svn-src-all@FreeBSD.ORG Sun May 31 18:09:01 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFDE6563; Sun, 31 May 2015 18:09:00 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC5BA1BBB; Sun, 31 May 2015 18:09:00 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VI90jo089137; Sun, 31 May 2015 18:09:00 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VI8wFp089119; Sun, 31 May 2015 18:08:58 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201505311808.t4VI8wFp089119@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Sun, 31 May 2015 18:08:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283833 - head/lib/libc/xdr 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 18:09:01 -0000 Author: rodrigc Date: Sun May 31 18:08:58 2015 New Revision: 283833 URL: https://svnweb.freebsd.org/changeset/base/283833 Log: Use ANSI C prototypes. Modified: head/lib/libc/xdr/xdr.c head/lib/libc/xdr/xdr_array.c head/lib/libc/xdr/xdr_float.c head/lib/libc/xdr/xdr_mem.c head/lib/libc/xdr/xdr_rec.c head/lib/libc/xdr/xdr_reference.c head/lib/libc/xdr/xdr_sizeof.c head/lib/libc/xdr/xdr_stdio.c Modified: head/lib/libc/xdr/xdr.c ============================================================================== --- head/lib/libc/xdr/xdr.c Sun May 31 15:50:54 2015 (r283832) +++ head/lib/libc/xdr/xdr.c Sun May 31 18:08:58 2015 (r283833) @@ -76,9 +76,7 @@ static const char xdr_zero[BYTES_PER_XDR * Not a filter, but a convenient utility nonetheless */ void -xdr_free(proc, objp) - xdrproc_t proc; - void *objp; +xdr_free(xdrproc_t proc, void *objp) { XDR x; @@ -101,9 +99,7 @@ xdr_void(void) * XDR integers */ bool_t -xdr_int(xdrs, ip) - XDR *xdrs; - int *ip; +xdr_int(XDR *xdrs, int *ip) { long l; @@ -131,9 +127,7 @@ xdr_int(xdrs, ip) * XDR unsigned integers */ bool_t -xdr_u_int(xdrs, up) - XDR *xdrs; - u_int *up; +xdr_u_int(XDR *xdrs, u_int *up) { u_long l; @@ -163,9 +157,7 @@ xdr_u_int(xdrs, up) * same as xdr_u_long - open coded to save a proc call! */ bool_t -xdr_long(xdrs, lp) - XDR *xdrs; - long *lp; +xdr_long(XDR *xdrs, long *lp) { switch (xdrs->x_op) { case XDR_ENCODE: @@ -184,9 +176,7 @@ xdr_long(xdrs, lp) * same as xdr_long - open coded to save a proc call! */ bool_t -xdr_u_long(xdrs, ulp) - XDR *xdrs; - u_long *ulp; +xdr_u_long(XDR *xdrs, u_long *ulp) { switch (xdrs->x_op) { case XDR_ENCODE: @@ -206,9 +196,7 @@ xdr_u_long(xdrs, ulp) * same as xdr_u_int32_t - open coded to save a proc call! */ bool_t -xdr_int32_t(xdrs, int32_p) - XDR *xdrs; - int32_t *int32_p; +xdr_int32_t(XDR *xdrs, int32_t *int32_p) { long l; @@ -237,9 +225,7 @@ xdr_int32_t(xdrs, int32_p) * same as xdr_int32_t - open coded to save a proc call! */ bool_t -xdr_u_int32_t(xdrs, u_int32_p) - XDR *xdrs; - u_int32_t *u_int32_p; +xdr_u_int32_t(XDR *xdrs, u_int32_t *u_int32_p) { u_long l; @@ -268,9 +254,7 @@ xdr_u_int32_t(xdrs, u_int32_p) * same as xdr_int32_t - open coded to save a proc call! */ bool_t -xdr_uint32_t(xdrs, u_int32_p) - XDR *xdrs; - uint32_t *u_int32_p; +xdr_uint32_t(XDR *xdrs, uint32_t *u_int32_p) { u_long l; @@ -298,9 +282,7 @@ xdr_uint32_t(xdrs, u_int32_p) * XDR short integers */ bool_t -xdr_short(xdrs, sp) - XDR *xdrs; - short *sp; +xdr_short(XDR *xdrs, short *sp) { long l; @@ -328,9 +310,7 @@ xdr_short(xdrs, sp) * XDR unsigned short integers */ bool_t -xdr_u_short(xdrs, usp) - XDR *xdrs; - u_short *usp; +xdr_u_short(XDR *xdrs, u_short *usp) { u_long l; @@ -359,9 +339,7 @@ xdr_u_short(xdrs, usp) * XDR 16-bit integers */ bool_t -xdr_int16_t(xdrs, int16_p) - XDR *xdrs; - int16_t *int16_p; +xdr_int16_t(XDR *xdrs, int16_t *int16_p) { long l; @@ -389,9 +367,7 @@ xdr_int16_t(xdrs, int16_p) * XDR unsigned 16-bit integers */ bool_t -xdr_u_int16_t(xdrs, u_int16_p) - XDR *xdrs; - u_int16_t *u_int16_p; +xdr_u_int16_t(XDR *xdrs, u_int16_t *u_int16_p) { u_long l; @@ -419,9 +395,7 @@ xdr_u_int16_t(xdrs, u_int16_p) * XDR unsigned 16-bit integers */ bool_t -xdr_uint16_t(xdrs, u_int16_p) - XDR *xdrs; - uint16_t *u_int16_p; +xdr_uint16_t(XDR *xdrs, uint16_t *u_int16_p) { u_long l; @@ -450,9 +424,7 @@ xdr_uint16_t(xdrs, u_int16_p) * XDR a char */ bool_t -xdr_char(xdrs, cp) - XDR *xdrs; - char *cp; +xdr_char(XDR *xdrs, char *cp) { int i; @@ -468,9 +440,7 @@ xdr_char(xdrs, cp) * XDR an unsigned char */ bool_t -xdr_u_char(xdrs, cp) - XDR *xdrs; - u_char *cp; +xdr_u_char(XDR *xdrs, u_char *cp) { u_int u; @@ -486,9 +456,7 @@ xdr_u_char(xdrs, cp) * XDR booleans */ bool_t -xdr_bool(xdrs, bp) - XDR *xdrs; - bool_t *bp; +xdr_bool(XDR *xdrs, bool_t *bp) { long lb; @@ -516,9 +484,7 @@ xdr_bool(xdrs, bp) * XDR enumerations */ bool_t -xdr_enum(xdrs, ep) - XDR *xdrs; - enum_t *ep; +xdr_enum(XDR *xdrs, enum_t *ep) { enum sizecheck { SIZEVAL }; /* used to find the size of an enum */ @@ -542,10 +508,7 @@ xdr_enum(xdrs, ep) * cp points to the opaque object and cnt gives the byte length. */ bool_t -xdr_opaque(xdrs, cp, cnt) - XDR *xdrs; - caddr_t cp; - u_int cnt; +xdr_opaque(XDR *xdrs, caddr_t cp, u_int cnt) { u_int rndup; static int crud[BYTES_PER_XDR_UNIT]; @@ -594,11 +557,7 @@ xdr_opaque(xdrs, cp, cnt) * If *cpp is NULL maxsize bytes are allocated */ bool_t -xdr_bytes(xdrs, cpp, sizep, maxsize) - XDR *xdrs; - char **cpp; - u_int *sizep; - u_int maxsize; +xdr_bytes(XDR *xdrs, char **cpp, u_int *sizep, u_int maxsize) { char *sp = *cpp; /* sp is the actual string pointer */ u_int nodesize; @@ -650,9 +609,7 @@ xdr_bytes(xdrs, cpp, sizep, maxsize) * Implemented here due to commonality of the object. */ bool_t -xdr_netobj(xdrs, np) - XDR *xdrs; - struct netobj *np; +xdr_netobj(XDR *xdrs, struct netobj *np) { return (xdr_bytes(xdrs, &np->n_bytes, &np->n_len, MAX_NETOBJ_SZ)); @@ -670,12 +627,14 @@ xdr_netobj(xdrs, np) * If there is no specific or default routine an error is returned. */ bool_t -xdr_union(xdrs, dscmp, unp, choices, dfault) - XDR *xdrs; - enum_t *dscmp; /* enum to decide which arm to work on */ - char *unp; /* the union itself */ - const struct xdr_discrim *choices; /* [value, xdr proc] for each arm */ - xdrproc_t dfault; /* default xdr routine */ +xdr_union(XDR *xdrs, enum_t *dscmp, char *unp, const struct xdr_discrim *choices, xdrproc_t dfault) +/* + * XDR *xdrs; + * enum_t *dscmp; // enum to decide which arm to work on + * char *unp; // the union itself + * const struct xdr_discrim *choices; // [value, xdr proc] for each arm + * xdrproc_t dfault; // default xdr routine + */ { enum_t dscm; @@ -719,10 +678,7 @@ xdr_union(xdrs, dscmp, unp, choices, dfa * of the string as specified by a protocol. */ bool_t -xdr_string(xdrs, cpp, maxsize) - XDR *xdrs; - char **cpp; - u_int maxsize; +xdr_string(XDR *xdrs, char **cpp, u_int maxsize) { char *sp = *cpp; /* sp is the actual string pointer */ u_int size; @@ -786,9 +742,7 @@ xdr_string(xdrs, cpp, maxsize) * routines like clnt_call */ bool_t -xdr_wrapstring(xdrs, cpp) - XDR *xdrs; - char **cpp; +xdr_wrapstring(XDR *xdrs, char **cpp) { return xdr_string(xdrs, cpp, LASTUNSIGNED); } @@ -805,9 +759,7 @@ xdr_wrapstring(xdrs, cpp) * XDR 64-bit integers */ bool_t -xdr_int64_t(xdrs, llp) - XDR *xdrs; - int64_t *llp; +xdr_int64_t(XDR *xdrs, int64_t *llp) { u_long ul[2]; @@ -838,9 +790,7 @@ xdr_int64_t(xdrs, llp) * XDR unsigned 64-bit integers */ bool_t -xdr_u_int64_t(xdrs, ullp) - XDR *xdrs; - u_int64_t *ullp; +xdr_u_int64_t(XDR *xdrs, u_int64_t *ullp) { u_long ul[2]; @@ -870,9 +820,7 @@ xdr_u_int64_t(xdrs, ullp) * XDR unsigned 64-bit integers */ bool_t -xdr_uint64_t(xdrs, ullp) - XDR *xdrs; - uint64_t *ullp; +xdr_uint64_t(XDR *xdrs, uint64_t *ullp) { u_long ul[2]; @@ -903,9 +851,7 @@ xdr_uint64_t(xdrs, ullp) * XDR hypers */ bool_t -xdr_hyper(xdrs, llp) - XDR *xdrs; - longlong_t *llp; +xdr_hyper(XDR *xdrs, longlong_t *llp) { /* @@ -920,9 +866,7 @@ xdr_hyper(xdrs, llp) * XDR unsigned hypers */ bool_t -xdr_u_hyper(xdrs, ullp) - XDR *xdrs; - u_longlong_t *ullp; +xdr_u_hyper(XDR *xdrs, u_longlong_t *ullp) { /* @@ -937,9 +881,7 @@ xdr_u_hyper(xdrs, ullp) * XDR longlong_t's */ bool_t -xdr_longlong_t(xdrs, llp) - XDR *xdrs; - longlong_t *llp; +xdr_longlong_t(XDR *xdrs, longlong_t *llp) { /* @@ -954,9 +896,7 @@ xdr_longlong_t(xdrs, llp) * XDR u_longlong_t's */ bool_t -xdr_u_longlong_t(xdrs, ullp) - XDR *xdrs; - u_longlong_t *ullp; +xdr_u_longlong_t(XDR *xdrs, u_longlong_t *ullp) { /* Modified: head/lib/libc/xdr/xdr_array.c ============================================================================== --- head/lib/libc/xdr/xdr_array.c Sun May 31 15:50:54 2015 (r283832) +++ head/lib/libc/xdr/xdr_array.c Sun May 31 18:08:58 2015 (r283833) @@ -64,13 +64,15 @@ __FBSDID("$FreeBSD$"); * xdr procedure to call to handle each element of the array. */ bool_t -xdr_array(xdrs, addrp, sizep, maxsize, elsize, elproc) - XDR *xdrs; - caddr_t *addrp; /* array pointer */ - u_int *sizep; /* number of elements */ - u_int maxsize; /* max numberof elements */ - u_int elsize; /* size in bytes of each element */ - xdrproc_t elproc; /* xdr routine to handle each element */ +xdr_array(XDR *xdrs, caddr_t *addrp, u_int *sizep, u_int maxsize, u_int elsize, xdrproc_t elproc) +/* + * XDR *xdrs; + * caddr_t *addrp; // array pointer + * u_int *sizep; // number of elements + * u_int maxsize; // max numberof elements + * u_int elsize; // size in bytes of each element + * xdrproc_t elproc; // xdr routine to handle each element + */ { u_int i; caddr_t target = *addrp; @@ -142,12 +144,7 @@ xdr_array(xdrs, addrp, sizep, maxsize, e * > xdr_elem: routine to XDR each element */ bool_t -xdr_vector(xdrs, basep, nelem, elemsize, xdr_elem) - XDR *xdrs; - char *basep; - u_int nelem; - u_int elemsize; - xdrproc_t xdr_elem; +xdr_vector(XDR *xdrs, char *basep, u_int nelem, u_int elemsize, xdrproc_t xdr_elem) { u_int i; char *elptr; Modified: head/lib/libc/xdr/xdr_float.c ============================================================================== --- head/lib/libc/xdr/xdr_float.c Sun May 31 15:50:54 2015 (r283832) +++ head/lib/libc/xdr/xdr_float.c Sun May 31 18:08:58 2015 (r283833) @@ -204,9 +204,7 @@ static struct dbl_limits { bool_t -xdr_double(xdrs, dp) - XDR *xdrs; - double *dp; +xdr_double(XDR *xdrs, double *dp) { #ifdef IEEEFP int32_t *i32p; Modified: head/lib/libc/xdr/xdr_mem.c ============================================================================== --- head/lib/libc/xdr/xdr_mem.c Sun May 31 15:50:54 2015 (r283832) +++ head/lib/libc/xdr/xdr_mem.c Sun May 31 18:08:58 2015 (r283833) @@ -98,11 +98,7 @@ static const struct xdr_ops xdrmem_ops_u * memory buffer. */ void -xdrmem_create(xdrs, addr, size, op) - XDR *xdrs; - char *addr; - u_int size; - enum xdr_op op; +xdrmem_create(XDR *xdrs, char *addr, u_int size, enum xdr_op op) { xdrs->x_op = op; @@ -114,16 +110,13 @@ xdrmem_create(xdrs, addr, size, op) /*ARGSUSED*/ static void -xdrmem_destroy(xdrs) - XDR *xdrs; +xdrmem_destroy(XDR *xdrs) { } static bool_t -xdrmem_getlong_aligned(xdrs, lp) - XDR *xdrs; - long *lp; +xdrmem_getlong_aligned(XDR *xdrs, long *lp) { if (xdrs->x_handy < sizeof(int32_t)) @@ -135,9 +128,7 @@ xdrmem_getlong_aligned(xdrs, lp) } static bool_t -xdrmem_putlong_aligned(xdrs, lp) - XDR *xdrs; - const long *lp; +xdrmem_putlong_aligned(XDR *xdrs, const long *lp) { if (xdrs->x_handy < sizeof(int32_t)) @@ -149,9 +140,7 @@ xdrmem_putlong_aligned(xdrs, lp) } static bool_t -xdrmem_getlong_unaligned(xdrs, lp) - XDR *xdrs; - long *lp; +xdrmem_getlong_unaligned(XDR *xdrs, long *lp) { u_int32_t l; @@ -165,9 +154,7 @@ xdrmem_getlong_unaligned(xdrs, lp) } static bool_t -xdrmem_putlong_unaligned(xdrs, lp) - XDR *xdrs; - const long *lp; +xdrmem_putlong_unaligned(XDR *xdrs, const long *lp) { u_int32_t l; @@ -181,10 +168,7 @@ xdrmem_putlong_unaligned(xdrs, lp) } static bool_t -xdrmem_getbytes(xdrs, addr, len) - XDR *xdrs; - char *addr; - u_int len; +xdrmem_getbytes(XDR *xdrs, char *addr, u_int len) { if (xdrs->x_handy < len) @@ -196,10 +180,7 @@ xdrmem_getbytes(xdrs, addr, len) } static bool_t -xdrmem_putbytes(xdrs, addr, len) - XDR *xdrs; - const char *addr; - u_int len; +xdrmem_putbytes(XDR *xdrs, const char *addr, u_int len) { if (xdrs->x_handy < len) @@ -211,8 +192,7 @@ xdrmem_putbytes(xdrs, addr, len) } static u_int -xdrmem_getpos(xdrs) - XDR *xdrs; +xdrmem_getpos(XDR *xdrs) { /* XXX w/64-bit pointers, u_int not enough! */ @@ -220,9 +200,7 @@ xdrmem_getpos(xdrs) } static bool_t -xdrmem_setpos(xdrs, pos) - XDR *xdrs; - u_int pos; +xdrmem_setpos(XDR *xdrs, u_int pos) { char *newaddr = xdrs->x_base + pos; char *lastaddr = (char *)xdrs->x_private + xdrs->x_handy; @@ -235,9 +213,7 @@ xdrmem_setpos(xdrs, pos) } static int32_t * -xdrmem_inline_aligned(xdrs, len) - XDR *xdrs; - u_int len; +xdrmem_inline_aligned(XDR *xdrs, u_int len) { int32_t *buf = 0; @@ -251,9 +227,7 @@ xdrmem_inline_aligned(xdrs, len) /* ARGSUSED */ static int32_t * -xdrmem_inline_unaligned(xdrs, len) - XDR *xdrs; - u_int len; +xdrmem_inline_unaligned(XDR *xdrs, u_int len) { return (0); Modified: head/lib/libc/xdr/xdr_rec.c ============================================================================== --- head/lib/libc/xdr/xdr_rec.c Sun May 31 15:50:54 2015 (r283832) +++ head/lib/libc/xdr/xdr_rec.c Sun May 31 18:08:58 2015 (r283833) @@ -161,15 +161,18 @@ static bool_t realloc_stream(RECSTREAM * * calls expect that they take an opaque handle rather than an fd. */ void -xdrrec_create(xdrs, sendsize, recvsize, tcp_handle, readit, writeit) - XDR *xdrs; - u_int sendsize; - u_int recvsize; - void *tcp_handle; - /* like read, but pass it a tcp_handle, not sock */ - int (*readit)(void *, void *, int); - /* like write, but pass it a tcp_handle, not sock */ - int (*writeit)(void *, void *, int); +xdrrec_create(XDR *xdrs, u_int sendsize, u_int recvsize, void *tcp_handle, + int (*readit)(void *, void *, int), int (*writeit)(void *, void *, int)) +/* + * XDR *xdrs; + * u_int sendsize; + * u_int recvsize; + * void *tcp_handle; + * // like read, but pass it a tcp_handle, not sock + * int (*readit)(void *, void *, int); + * // like write, but pass it a tcp_handle, not sock + * int (*writeit)(void *, void *, int); + */ { RECSTREAM *rstrm = mem_alloc(sizeof(RECSTREAM)); @@ -229,9 +232,7 @@ xdrrec_create(xdrs, sendsize, recvsize, */ static bool_t -xdrrec_getlong(xdrs, lp) - XDR *xdrs; - long *lp; +xdrrec_getlong(XDR *xdrs, long *lp) { RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private); int32_t *buflp = (int32_t *)(void *)(rstrm->in_finger); @@ -253,9 +254,7 @@ xdrrec_getlong(xdrs, lp) } static bool_t -xdrrec_putlong(xdrs, lp) - XDR *xdrs; - const long *lp; +xdrrec_putlong(XDR *xdrs, const long *lp) { RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private); int32_t *dest_lp = ((int32_t *)(void *)(rstrm->out_finger)); @@ -277,10 +276,7 @@ xdrrec_putlong(xdrs, lp) } static bool_t /* must manage buffers, fragments, and records */ -xdrrec_getbytes(xdrs, addr, len) - XDR *xdrs; - char *addr; - u_int len; +xdrrec_getbytes(XDR *xdrs, char *addr, u_int len) { RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private); int current; @@ -305,10 +301,7 @@ xdrrec_getbytes(xdrs, addr, len) } static bool_t -xdrrec_putbytes(xdrs, addr, len) - XDR *xdrs; - const char *addr; - u_int len; +xdrrec_putbytes(XDR *xdrs, const char *addr, u_int len) { RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private); size_t current; @@ -331,8 +324,7 @@ xdrrec_putbytes(xdrs, addr, len) } static u_int -xdrrec_getpos(xdrs) - XDR *xdrs; +xdrrec_getpos(XDR *xdrs) { RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private; off_t pos; @@ -358,9 +350,7 @@ xdrrec_getpos(xdrs) } static bool_t -xdrrec_setpos(xdrs, pos) - XDR *xdrs; - u_int pos; +xdrrec_setpos(XDR *xdrs, u_int pos) { RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private; u_int currpos = xdrrec_getpos(xdrs); @@ -397,9 +387,7 @@ xdrrec_setpos(xdrs, pos) } static int32_t * -xdrrec_inline(xdrs, len) - XDR *xdrs; - u_int len; +xdrrec_inline(XDR *xdrs, u_int len) { RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private; int32_t *buf = NULL; @@ -429,8 +417,7 @@ xdrrec_inline(xdrs, len) } static void -xdrrec_destroy(xdrs) - XDR *xdrs; +xdrrec_destroy(XDR *xdrs) { RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private; @@ -449,8 +436,7 @@ xdrrec_destroy(xdrs) * this procedure to guarantee proper record alignment. */ bool_t -xdrrec_skiprecord(xdrs) - XDR *xdrs; +xdrrec_skiprecord(XDR *xdrs) { RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private); enum xprt_stat xstat; @@ -485,8 +471,7 @@ xdrrec_skiprecord(xdrs) * after consuming the rest of the current record. */ bool_t -xdrrec_eof(xdrs) - XDR *xdrs; +xdrrec_eof(XDR *xdrs) { RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private); @@ -509,9 +494,7 @@ xdrrec_eof(xdrs) * pipelined procedure calls.) TRUE => immmediate flush to tcp connection. */ bool_t -xdrrec_endofrecord(xdrs, sendnow) - XDR *xdrs; - bool_t sendnow; +xdrrec_endofrecord(XDR *xdrs, bool_t sendnow) { RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private); u_long len; /* fragment length */ @@ -535,10 +518,7 @@ xdrrec_endofrecord(xdrs, sendnow) * Return true if a record is available in the buffer, false if not. */ bool_t -__xdrrec_getrec(xdrs, statp, expectdata) - XDR *xdrs; - enum xprt_stat *statp; - bool_t expectdata; +__xdrrec_getrec(XDR *xdrs, enum xprt_stat *statp, bool_t expectdata) { RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private); ssize_t n; @@ -618,9 +598,7 @@ __xdrrec_getrec(xdrs, statp, expectdata) } bool_t -__xdrrec_setnonblock(xdrs, maxrec) - XDR *xdrs; - int maxrec; +__xdrrec_setnonblock(XDR *xdrs, int maxrec) { RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private); @@ -635,9 +613,7 @@ __xdrrec_setnonblock(xdrs, maxrec) * Internal useful routines */ static bool_t -flush_out(rstrm, eor) - RECSTREAM *rstrm; - bool_t eor; +flush_out(RECSTREAM *rstrm, bool_t eor) { u_int32_t eormask = (eor == TRUE) ? LAST_FRAG : 0; u_int32_t len = (u_int32_t)((u_long)(rstrm->out_finger) - @@ -655,8 +631,7 @@ flush_out(rstrm, eor) } static bool_t /* knows nothing about records! Only about input buffers */ -fill_input_buf(rstrm) - RECSTREAM *rstrm; +fill_input_buf(RECSTREAM *rstrm) { char *where; u_int32_t i; @@ -678,10 +653,7 @@ fill_input_buf(rstrm) } static bool_t /* knows nothing about records! Only about input buffers */ -get_input_bytes(rstrm, addr, len) - RECSTREAM *rstrm; - char *addr; - int len; +get_input_bytes(RECSTREAM *rstrm, char *addr, int len) { size_t current; @@ -711,8 +683,7 @@ get_input_bytes(rstrm, addr, len) } static bool_t /* next two bytes of the input stream are treated as a header */ -set_input_fragment(rstrm) - RECSTREAM *rstrm; +set_input_fragment(RECSTREAM *rstrm) { u_int32_t header; @@ -737,9 +708,7 @@ set_input_fragment(rstrm) } static bool_t /* consumes input bytes; knows nothing about records! */ -skip_input_bytes(rstrm, cnt) - RECSTREAM *rstrm; - long cnt; +skip_input_bytes(RECSTREAM *rstrm, long cnt) { u_int32_t current; @@ -759,8 +728,7 @@ skip_input_bytes(rstrm, cnt) } static u_int -fix_buf_size(s) - u_int s; +fix_buf_size(u_int s) { if (s < 100) @@ -772,9 +740,7 @@ fix_buf_size(s) * Reallocate the input buffer for a non-block stream. */ static bool_t -realloc_stream(rstrm, size) - RECSTREAM *rstrm; - int size; +realloc_stream(RECSTREAM *rstrm, int size) { ptrdiff_t diff; char *buf; Modified: head/lib/libc/xdr/xdr_reference.c ============================================================================== --- head/lib/libc/xdr/xdr_reference.c Sun May 31 15:50:54 2015 (r283832) +++ head/lib/libc/xdr/xdr_reference.c Sun May 31 18:08:58 2015 (r283833) @@ -65,11 +65,13 @@ __FBSDID("$FreeBSD$"); * proc is the routine to handle the referenced structure. */ bool_t -xdr_reference(xdrs, pp, size, proc) - XDR *xdrs; - caddr_t *pp; /* the pointer to work on */ - u_int size; /* size of the object pointed to */ - xdrproc_t proc; /* xdr routine to handle the object */ +xdr_reference(XDR *xdrs, caddr_t *pp, u_int size, xdrproc_t proc) +/* + * XDR *xdrs; + * caddr_t *pp; // the pointer to work on + * u_int size; // size of the object pointed to + * xdrproc_t proc; // xdr routine to handle the object + */ { caddr_t loc = *pp; bool_t stat; @@ -122,11 +124,7 @@ xdr_reference(xdrs, pp, size, proc) * */ bool_t -xdr_pointer(xdrs,objpp,obj_size,xdr_obj) - XDR *xdrs; - char **objpp; - u_int obj_size; - xdrproc_t xdr_obj; +xdr_pointer(XDR *xdrs, char **objpp, u_int obj_size, xdrproc_t xdr_obj) { bool_t more_data; Modified: head/lib/libc/xdr/xdr_sizeof.c ============================================================================== --- head/lib/libc/xdr/xdr_sizeof.c Sun May 31 15:50:54 2015 (r283832) +++ head/lib/libc/xdr/xdr_sizeof.c Sun May 31 18:08:58 2015 (r283833) @@ -47,9 +47,7 @@ __FBSDID("$FreeBSD$"); /* ARGSUSED */ static bool_t -x_putlong(xdrs, longp) - XDR *xdrs; - long *longp; +x_putlong(XDR *xdrs, long *longp) { xdrs->x_handy += BYTES_PER_XDR_UNIT; return (TRUE); @@ -57,36 +55,28 @@ x_putlong(xdrs, longp) /* ARGSUSED */ static bool_t -x_putbytes(xdrs, bp, len) - XDR *xdrs; - char *bp; - u_int len; +x_putbytes(XDR *xdrs, char *bp, u_int len) { xdrs->x_handy += len; return (TRUE); } static u_int -x_getpostn(xdrs) - XDR *xdrs; +x_getpostn(XDR *xdrs) { return (xdrs->x_handy); } /* ARGSUSED */ static bool_t -x_setpostn(xdrs, pos) - XDR *xdrs; - u_int pos; +x_setpostn(XDR *xdrs, u_int pos) { /* This is not allowed */ return (FALSE); } static int32_t * -x_inline(xdrs, len) - XDR *xdrs; - u_int len; +x_inline(XDR *xdrs, u_int len) { if (len == 0) { return (NULL); @@ -120,8 +110,7 @@ harmless() } static void -x_destroy(xdrs) - XDR *xdrs; +x_destroy(XDR *xdrs) { xdrs->x_handy = 0; xdrs->x_base = 0; @@ -133,9 +122,7 @@ x_destroy(xdrs) } unsigned long -xdr_sizeof(func, data) - xdrproc_t func; - void *data; +xdr_sizeof(xdrproc_t func, void *data) { XDR x; struct xdr_ops ops; Modified: head/lib/libc/xdr/xdr_stdio.c ============================================================================== --- head/lib/libc/xdr/xdr_stdio.c Sun May 31 15:50:54 2015 (r283832) +++ head/lib/libc/xdr/xdr_stdio.c Sun May 31 18:08:58 2015 (r283833) @@ -83,10 +83,7 @@ static const struct xdr_ops xdrstdio_ops * Operation flag is set to op. */ void -xdrstdio_create(xdrs, file, op) - XDR *xdrs; - FILE *file; - enum xdr_op op; +xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op) { xdrs->x_op = op; @@ -101,17 +98,14 @@ xdrstdio_create(xdrs, file, op) * Cleans up the xdr stream handle xdrs previously set up by xdrstdio_create. */ static void -xdrstdio_destroy(xdrs) - XDR *xdrs; +xdrstdio_destroy(XDR *xdrs) { (void)fflush((FILE *)xdrs->x_private); /* XXX: should we close the file ?? */ } static bool_t -xdrstdio_getlong(xdrs, lp) - XDR *xdrs; - long *lp; +xdrstdio_getlong(XDR *xdrs, long *lp) { u_int32_t temp; @@ -122,9 +116,7 @@ xdrstdio_getlong(xdrs, lp) } static bool_t -xdrstdio_putlong(xdrs, lp) - XDR *xdrs; - const long *lp; +xdrstdio_putlong(XDR *xdrs, const long *lp) { int32_t mycopy = htonl((u_int32_t)*lp); @@ -134,10 +126,7 @@ xdrstdio_putlong(xdrs, lp) } static bool_t -xdrstdio_getbytes(xdrs, addr, len) - XDR *xdrs; - char *addr; - u_int len; +xdrstdio_getbytes(XDR *xdrs, char *addr, u_int len) { if ((len != 0) && (fread(addr, (size_t)len, 1, (FILE *)xdrs->x_private) != 1)) @@ -146,10 +135,7 @@ xdrstdio_getbytes(xdrs, addr, len) } static bool_t -xdrstdio_putbytes(xdrs, addr, len) - XDR *xdrs; - const char *addr; - u_int len; +xdrstdio_putbytes(XDR *xdrs, const char *addr, u_int len) { if ((len != 0) && (fwrite(addr, (size_t)len, 1, @@ -159,17 +145,14 @@ xdrstdio_putbytes(xdrs, addr, len) } static u_int -xdrstdio_getpos(xdrs) - XDR *xdrs; +xdrstdio_getpos(XDR *xdrs) { return ((u_int) ftell((FILE *)xdrs->x_private)); } static bool_t -xdrstdio_setpos(xdrs, pos) - XDR *xdrs; - u_int pos; +xdrstdio_setpos(XDR *xdrs, u_int pos) { return ((fseek((FILE *)xdrs->x_private, (long)pos, 0) < 0) ? @@ -178,9 +161,7 @@ xdrstdio_setpos(xdrs, pos) /* ARGSUSED */ static int32_t * -xdrstdio_inline(xdrs, len) - XDR *xdrs; - u_int len; +xdrstdio_inline(XDR *xdrs, u_int len) { /* From owner-svn-src-all@FreeBSD.ORG Sun May 31 18:11:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C03B771F; Sun, 31 May 2015 18:11:21 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE4751CB6; Sun, 31 May 2015 18:11:21 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VIBL1l091990; Sun, 31 May 2015 18:11:21 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VIBLDK091988; Sun, 31 May 2015 18:11:21 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201505311811.t4VIBLDK091988@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Sun, 31 May 2015 18:11:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283834 - head/lib/libc/xdr 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 18:11:21 -0000 Author: rodrigc Date: Sun May 31 18:11:20 2015 New Revision: 283834 URL: https://svnweb.freebsd.org/changeset/base/283834 Log: Make x_putlong() and x_putbytes() prototypes match the prototypes in Modified: head/lib/libc/xdr/xdr_sizeof.c Modified: head/lib/libc/xdr/xdr_sizeof.c ============================================================================== --- head/lib/libc/xdr/xdr_sizeof.c Sun May 31 18:08:58 2015 (r283833) +++ head/lib/libc/xdr/xdr_sizeof.c Sun May 31 18:11:20 2015 (r283834) @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); /* ARGSUSED */ static bool_t -x_putlong(XDR *xdrs, long *longp) +x_putlong(XDR *xdrs, const long *longp) { xdrs->x_handy += BYTES_PER_XDR_UNIT; return (TRUE); @@ -55,7 +55,7 @@ x_putlong(XDR *xdrs, long *longp) /* ARGSUSED */ static bool_t -x_putbytes(XDR *xdrs, char *bp, u_int len) +x_putbytes(XDR *xdrs, const char *bp, u_int len) { xdrs->x_handy += len; return (TRUE); From owner-svn-src-all@FreeBSD.ORG Sun May 31 18:59:00 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E2A5E4D; Sun, 31 May 2015 18:59:00 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07F9E177D; Sun, 31 May 2015 18:58:59 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id 14CC9110C92; Sun, 31 May 2015 11:58:53 -0700 (PDT) Date: Sun, 31 May 2015 11:58:52 -0700 From: hiren panchasara To: Michael Tuexen Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283806 - head/contrib/traceroute Message-ID: <20150531185852.GA20409@strugglingcoder.info> References: <201505310810.t4V8AZWR074647@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DocE+STaALJfprDB" Content-Disposition: inline In-Reply-To: <201505310810.t4V8AZWR074647@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 18:59:00 -0000 --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 05/31/15 at 08:10P, Michael Tuexen wrote: > Author: tuexen > Date: Sun May 31 08:10:35 2015 > New Revision: 283806 > URL: https://svnweb.freebsd.org/changeset/base/283806 >=20 > Log: > When the packet verification fails in verbose mode, print the correct > number of words in host byte order. Also remove a stray 'x'. > =20 > MFC after: 3 days >=20 > Modified: > head/contrib/traceroute/traceroute.c Picking up a random traceroute commit here. I am not sure of the history but don't we try to upstream the fixes for contrib/* things, in general?=20 I am just curious. Thanks for the fixes, btw. Cheers, Hiren --DocE+STaALJfprDB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJVa1nsXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/l8+AH/Rf9qHWn3yehoESinqVp3pbr 7Kurk4nW439wyesMaBtNFD2y1zpMFxt5xt+bmCrT2W5jJH4asgKHp8GGFwk8vuM7 D9Iwq5y8jbhANybnk7sRKfbb20NXDaHw6pdJIz8V9YbJqX1VL3pa9TpDV8kxfJzZ 2+IR3KtBW4m4ea9SfW+MWezt8E4uZ0J2dxOBcbJsi+NgvGFrq40mnC+6+5PcptCL kHVe438ljr3eQyA97GMNpFDUgD77zY6FQZvNy2FDmgoLO8v8VPHm4rbwlPt/ia7Y wCQt8cudu/3L9rFMqyp5gehbga/T8NS4kbWAB3c7QVMG5AULd7I6h79QVBqYxIk= =E7uE -----END PGP SIGNATURE----- --DocE+STaALJfprDB-- From owner-svn-src-all@FreeBSD.ORG Sun May 31 19:09:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49C5738D; Sun, 31 May 2015 19:09:25 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3738D19D5; Sun, 31 May 2015 19:09:25 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VJ9PRL019409; Sun, 31 May 2015 19:09:25 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VJ9Pi0019408; Sun, 31 May 2015 19:09:25 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201505311909.t4VJ9Pi0019408@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Sun, 31 May 2015 19:09:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283835 - head/lib/libc/xdr 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 19:09:25 -0000 Author: rodrigc Date: Sun May 31 19:09:24 2015 New Revision: 283835 URL: https://svnweb.freebsd.org/changeset/base/283835 Log: Use proper prototype for harmless(). Modified: head/lib/libc/xdr/xdr_sizeof.c Modified: head/lib/libc/xdr/xdr_sizeof.c ============================================================================== --- head/lib/libc/xdr/xdr_sizeof.c Sun May 31 18:11:20 2015 (r283834) +++ head/lib/libc/xdr/xdr_sizeof.c Sun May 31 19:09:24 2015 (r283835) @@ -103,7 +103,7 @@ x_inline(XDR *xdrs, u_int len) } static int -harmless() +harmless(void) { /* Always return FALSE/NULL, as the case may be */ return (0); From owner-svn-src-all@FreeBSD.ORG Sun May 31 19:43:36 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B480818F; Sun, 31 May 2015 19:43:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A20DA12B9; Sun, 31 May 2015 19:43:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VJhaDA041979; Sun, 31 May 2015 19:43:36 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VJhand041978; Sun, 31 May 2015 19:43:36 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201505311943.t4VJhand041978@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sun, 31 May 2015 19:43:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283836 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 19:43:36 -0000 Author: jhb Date: Sun May 31 19:43:35 2015 New Revision: 283836 URL: https://svnweb.freebsd.org/changeset/base/283836 Log: Consistently only use one end of the pipe in the parent and debugger processes and do not rely on EOF due to a close() in the debugger. PR: 200489 Differential Revision: https://reviews.freebsd.org/D2674 Reviewed by: kib, ngie, rodrigc Modified: head/tests/sys/kern/ptrace_test.c Modified: head/tests/sys/kern/ptrace_test.c ============================================================================== --- head/tests/sys/kern/ptrace_test.c Sun May 31 19:09:24 2015 (r283835) +++ head/tests/sys/kern/ptrace_test.c Sun May 31 19:43:35 2015 (r283836) @@ -304,7 +304,7 @@ ATF_TC_BODY(ptrace__parent_sees_exit_aft ATF_REQUIRE(write(dpipe[1], &c, sizeof(c)) == sizeof(c)); /* Wait for parent's failed wait. */ - ATF_REQUIRE(read(dpipe[1], &c, sizeof(c)) == 0); + ATF_REQUIRE(read(dpipe[1], &c, sizeof(c)) == sizeof(c)); wpid = waitpid(child, &status, 0); ATF_REQUIRE(wpid == child); @@ -313,6 +313,7 @@ ATF_TC_BODY(ptrace__parent_sees_exit_aft exit(0); } + close(dpipe[1]); /* Parent process. */ @@ -365,10 +366,11 @@ ATF_TC_BODY(ptrace__parent_sees_exit_aft ATF_REQUIRE(wpid == 0); /* Signal the debugger to wait for the child. */ - close(dpipe[0]); + ATF_REQUIRE(write(dpipe[0], &c, sizeof(c)) == sizeof(c)); /* Wait for the debugger. */ - ATF_REQUIRE(read(dpipe[1], &c, sizeof(c)) == 0); + ATF_REQUIRE(read(dpipe[0], &c, sizeof(c)) == 0); + close(dpipe[0]); /* The child process should now be ready. */ wpid = waitpid(child, &status, WNOHANG); From owner-svn-src-all@FreeBSD.ORG Sun May 31 19:45:44 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 185B92FE; Sun, 31 May 2015 19:45:44 +0000 (UTC) (envelope-from tuexen@freebsd.org) 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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CFA2512D4; Sun, 31 May 2015 19:45:43 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from [192.168.1.200] (p508F0B72.dip0.t-ipconnect.de [80.143.11.114]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id BD9F01C104347; Sun, 31 May 2015 21:45:39 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r283806 - head/contrib/traceroute From: Michael Tuexen In-Reply-To: <20150531185852.GA20409@strugglingcoder.info> Date: Sun, 31 May 2015 21:45:38 +0200 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <4E05B479-A012-4219-822A-68DF72CCAACF@freebsd.org> References: <201505310810.t4V8AZWR074647@svn.freebsd.org> <20150531185852.GA20409@strugglingcoder.info> To: hiren panchasara X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 19:45:44 -0000 > On 31 May 2015, at 20:58, hiren panchasara = wrote: >=20 > On 05/31/15 at 08:10P, Michael Tuexen wrote: >> Author: tuexen >> Date: Sun May 31 08:10:35 2015 >> New Revision: 283806 >> URL: https://svnweb.freebsd.org/changeset/base/283806 >>=20 >> Log: >> When the packet verification fails in verbose mode, print the = correct >> number of words in host byte order. Also remove a stray 'x'. >>=20 >> MFC after: 3 days >>=20 >> Modified: >> head/contrib/traceroute/traceroute.c >=20 > Picking up a random traceroute commit here. I am not sure of the = history > but don't we try to upstream the fixes for contrib/* things, in = general?=20 The last version was release 12 years ago. They where integrated in https://svnweb.freebsd.org/base?view=3Drevision&revision=3D100787 I can submit the patches also to traceroute@ee.lbl.gov as indicated in = https://svnweb.freebsd.org/base/head/contrib/traceroute/FREEBSD-upgrade?vi= ew=3Dmarkup Thanks for making me aware of it. Best regards Michael >=20 > I am just curious. Thanks for the fixes, btw. >=20 > Cheers, > Hiren From owner-svn-src-all@FreeBSD.ORG Sun May 31 20:20:25 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 494BFCF8; Sun, 31 May 2015 20:20:25 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CA7B1AC5; Sun, 31 May 2015 20:20:25 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VKKOOt059127; Sun, 31 May 2015 20:20:24 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VKKOrE059125; Sun, 31 May 2015 20:20:24 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201505312020.t4VKKOrE059125@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Sun, 31 May 2015 20:20:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283837 - head/usr.sbin/yppoll 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 20:20:25 -0000 Author: rodrigc Date: Sun May 31 20:20:24 2015 New Revision: 283837 URL: https://svnweb.freebsd.org/changeset/base/283837 Log: yppoll(8): Comment out -h option. The implementation of it is missing (see e.g. NetBSD or OpenBSD). Until someone works on it, comment out the existing code to silence a warning about 'hostname' being set but unused. Found-by: gcc47 Submitted by: Sascha Wildner Obtained from: DragonFlyBSD (commit e455855db) Modified: head/usr.sbin/yppoll/yppoll.8 head/usr.sbin/yppoll/yppoll.c Modified: head/usr.sbin/yppoll/yppoll.8 ============================================================================== --- head/usr.sbin/yppoll/yppoll.8 Sun May 31 19:43:35 2015 (r283836) +++ head/usr.sbin/yppoll/yppoll.8 Sun May 31 20:20:24 2015 (r283837) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 25, 1994 +.Dd May 31, 2015 .Dt YPPOLL 8 .Os .Sh NAME @@ -35,7 +35,7 @@ .Nd ask version of YP map from YP server .Sh SYNOPSIS .Nm -.Op Fl h Ar host +.\".Op Fl h Ar host .Op Fl d Ar domain .Ar mapname .Sh DESCRIPTION @@ -48,15 +48,15 @@ server for .Pp The options are as follows: .Bl -tag -width indent -.It Fl h Ar host -Ask the YP server process running on -.Ar host -for information about -.Ar mapname . -If -.Ar host -is not specified, the server polled is the default server returned by -.Xr ypwhich 1 . +.\".It Fl h Ar host +.\"Ask the YP server process running on +.\".Ar host +.\"for information about +.\".Ar mapname . +.\"If +.\".Ar host +.\"is not specified, the server polled is the default server returned by +.\".Xr ypwhich 1 . .It Fl d Ar domain Use the YP domain .Ar domain Modified: head/usr.sbin/yppoll/yppoll.c ============================================================================== --- head/usr.sbin/yppoll/yppoll.c Sun May 31 19:43:35 2015 (r283836) +++ head/usr.sbin/yppoll/yppoll.c Sun May 31 20:20:24 2015 (r283837) @@ -49,7 +49,11 @@ __FBSDID("$FreeBSD$"); static void usage(void) { +#if 0 fprintf(stderr, "usage: yppoll [-h host] [-d domainname] mapname\n"); +#else + fprintf(stderr, "usage: yppoll [-d domainname] mapname\n"); +#endif exit(1); } @@ -57,7 +61,9 @@ int main(int argc, char *argv[]) { char *domainname; +#if 0 char *hostname = "localhost"; +#endif char *inmap, *master; int order; int c, r; @@ -71,7 +77,11 @@ main(int argc, char *argv[]) domainname = optarg; break; case 'h': +#if 0 hostname = optarg; +#else + /* does nothing */ +#endif break; case '?': usage(); From owner-svn-src-all@FreeBSD.ORG Sun May 31 20:45:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D9667C; Sun, 31 May 2015 20:45:36 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2B4104B; Sun, 31 May 2015 20:45:36 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VKja42072709; Sun, 31 May 2015 20:45:36 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VKjaIw072707; Sun, 31 May 2015 20:45:36 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201505312045.t4VKjaIw072707@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Sun, 31 May 2015 20:45:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283838 - head/usr.sbin/yppush 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 20:45:36 -0000 Author: rodrigc Date: Sun May 31 20:45:35 2015 New Revision: 283838 URL: https://svnweb.freebsd.org/changeset/base/283838 Log: Fix some gcc compiler warnings. Submitted by: Sascha Wildner Obtained from: DragonFlyBSD (commit 51798e10f3dd) Modified: head/usr.sbin/yppush/yppush_main.c Modified: head/usr.sbin/yppush/yppush_main.c ============================================================================== --- head/usr.sbin/yppush/yppush_main.c Sun May 31 20:20:24 2015 (r283837) +++ head/usr.sbin/yppush/yppush_main.c Sun May 31 20:45:35 2015 (r283838) @@ -137,11 +137,11 @@ yppush_show_status(ypxfrstat status, uns job->tid); } - if (status != YPPUSH_SUCC || verbose) { + if (status != YPXFR_SUCC || verbose) { yp_error("transfer of map %s to server %s %s", - job->map, job->server, status == YPPUSH_SUCC ? + job->map, job->server, status == YPXFR_SUCC ? "succeeded" : "failed"); - yp_error("status returned by ypxfr: %s", status > YPPUSH_AGE ? + yp_error("status returned by ypxfr: %s", status > YPXFR_AGE ? yppusherr_string(status) : ypxfrerr_string(status)); } @@ -365,7 +365,7 @@ create udp handle to NIS server")); * request to the internal list, send the YPPROC_XFR request to ypserv * do other magic things. */ -int +static int yp_push(char *server, char *map, unsigned long tid) { unsigned long prognum; @@ -433,7 +433,7 @@ yp_push(char *server, char *map, unsigne * Called for each entry in the ypservers map from yp_get_map(), which * is our private yp_all() routine. */ -int +static int yppush_foreach(int status, char *key, int keylen, char *val, int vallen, char *data) { From owner-svn-src-all@FreeBSD.ORG Sun May 31 21:03:07 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33FAA76E; Sun, 31 May 2015 21:03:07 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2182115DF; Sun, 31 May 2015 21:03:07 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VL36Zf082937; Sun, 31 May 2015 21:03:07 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VL36rf082936; Sun, 31 May 2015 21:03:06 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505312103.t4VL36rf082936@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 31 May 2015 21:03:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283839 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 21:03:07 -0000 Author: andrew Date: Sun May 31 21:03:06 2015 New Revision: 283839 URL: https://svnweb.freebsd.org/changeset/base/283839 Log: Set the return value correctly on copy failure in copystr. MFC after: 1 week Modified: head/sys/arm/arm/copystr.S Modified: head/sys/arm/arm/copystr.S ============================================================================== --- head/sys/arm/arm/copystr.S Sun May 31 20:45:35 2015 (r283838) +++ head/sys/arm/arm/copystr.S Sun May 31 21:03:06 2015 (r283839) @@ -194,6 +194,7 @@ END(copyoutstr) /* A fault occurred during the copy */ .Lcopystrfault: + mov r0, #EFAULT mov r1, #0x00000000 str r1, [r4, #PCB_ONFAULT] RESTORE_REGS From owner-svn-src-all@FreeBSD.ORG Sun May 31 21:39:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACD29EE9; Sun, 31 May 2015 21:39:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81FF01C7B; Sun, 31 May 2015 21:39:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VLd9cZ098925; Sun, 31 May 2015 21:39:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VLd9VL098924; Sun, 31 May 2015 21:39:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505312139.t4VLd9VL098924@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 31 May 2015 21:39:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283840 - head/etc/tests 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 21:39:09 -0000 Author: ngie Date: Sun May 31 21:39:08 2015 New Revision: 283840 URL: https://svnweb.freebsd.org/changeset/base/283840 Log: Remove empty tests directory X-MFC with: r282059, r283056 Deleted: head/etc/tests/ From owner-svn-src-all@FreeBSD.ORG Sun May 31 21:44:11 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 481AAB65; Sun, 31 May 2015 21:44:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B6101E84; Sun, 31 May 2015 21:44:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VLiAnC005061; Sun, 31 May 2015 21:44:10 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VLiAM2005055; Sun, 31 May 2015 21:44:10 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505312144.t4VLiAM2005055@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 31 May 2015 21:44:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283841 - head/usr.sbin/pw 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 21:44:11 -0000 Author: bapt Date: Sun May 31 21:44:09 2015 New Revision: 283841 URL: https://svnweb.freebsd.org/changeset/base/283841 Log: Cast -1 to uid_t and bump WARNING level to 3 Modified: head/usr.sbin/pw/Makefile head/usr.sbin/pw/pw_group.c head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/Makefile ============================================================================== --- head/usr.sbin/pw/Makefile Sun May 31 21:39:08 2015 (r283840) +++ head/usr.sbin/pw/Makefile Sun May 31 21:44:09 2015 (r283841) @@ -6,7 +6,7 @@ SRCS= pw.c pw_conf.c pw_user.c pw_group. grupd.c pwupd.c fileupd.c psdate.c \ bitmap.c cpdir.c rm_r.c -WARNS?= 2 +WARNS?= 3 LIBADD= crypt util sbuf Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Sun May 31 21:39:08 2015 (r283840) +++ head/usr.sbin/pw/pw_group.c Sun May 31 21:44:09 2015 (r283841) @@ -116,7 +116,7 @@ pw_group(struct userconf * cnf, int mode char *fmems[1]; fmems[0] = NULL; fakegroup.gr_name = a_name ? a_name->val : "nogroup"; - fakegroup.gr_gid = a_gid ? (gid_t) atol(a_gid->val) : -1; + fakegroup.gr_gid = a_gid ? (gid_t) atol(a_gid->val) : (uid_t)-1; fakegroup.gr_mem = fmems; return print_group(&fakegroup, getarg(args, 'P') != NULL); } Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sun May 31 21:39:08 2015 (r283840) +++ head/usr.sbin/pw/pw_user.c Sun May 31 21:44:09 2015 (r283841) @@ -335,7 +335,7 @@ pw_user(struct userconf * cnf, int mode, if (pwd == NULL) { if (mode == M_PRINT && getarg(args, 'F')) { fakeuser.pw_name = a_name ? a_name->val : "nouser"; - fakeuser.pw_uid = a_uid ? (uid_t) atol(a_uid->val) : -1; + fakeuser.pw_uid = a_uid ? (uid_t) atol(a_uid->val) : (uid_t) -1; return print_user(&fakeuser, getarg(args, 'P') != NULL, getarg(args, '7') != NULL); @@ -791,7 +791,7 @@ pw_user(struct userconf * cnf, int mode, grp = GETGRGID(pwd->pw_gid); pw_log(cnf, mode, W_USER, "%s(%ld):%s(%ld):%s:%s:%s", pwd->pw_name, (long) pwd->pw_uid, - grp ? grp->gr_name : "unknown", (long) (grp ? grp->gr_gid : -1), + grp ? grp->gr_name : "unknown", (long) (grp ? grp->gr_gid : (uid_t)-1), pwd->pw_gecos, pwd->pw_dir, pwd->pw_shell); /* From owner-svn-src-all@FreeBSD.ORG Sun May 31 22:07:04 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A06D3E67; Sun, 31 May 2015 22:07:04 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DC32130F; Sun, 31 May 2015 22:07:04 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VM74d6015388; Sun, 31 May 2015 22:07:04 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VM73Vh015383; Sun, 31 May 2015 22:07:03 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505312207.t4VM73Vh015383@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 31 May 2015 22:07:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283842 - head/usr.sbin/pw 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 22:07:04 -0000 Author: bapt Date: Sun May 31 22:07:03 2015 New Revision: 283842 URL: https://svnweb.freebsd.org/changeset/base/283842 Log: Remove useless cast in printf and printf-like functions: use %u for uid_t and gid_t Modified: head/usr.sbin/pw/pw_conf.c head/usr.sbin/pw/pw_group.c head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_conf.c ============================================================================== --- head/usr.sbin/pw/pw_conf.c Sun May 31 21:44:09 2015 (r283841) +++ head/usr.sbin/pw/pw_conf.c Sun May 31 22:07:03 2015 (r283842) @@ -453,19 +453,19 @@ write_userconfig(char const * file) config.default_class : ""); break; case _UC_MINUID: - sbuf_printf(buf, "%lu", (unsigned long) config.min_uid); + sbuf_printf(buf, "%u", config.min_uid); quote = 0; break; case _UC_MAXUID: - sbuf_printf(buf, "%lu", (unsigned long) config.max_uid); + sbuf_printf(buf, "%u", config.max_uid); quote = 0; break; case _UC_MINGID: - sbuf_printf(buf, "%lu", (unsigned long) config.min_gid); + sbuf_printf(buf, "%u", config.min_gid); quote = 0; break; case _UC_MAXGID: - sbuf_printf(buf, "%lu", (unsigned long) config.max_gid); + sbuf_printf(buf, "%u", config.max_gid); quote = 0; break; case _UC_EXPIRE: Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Sun May 31 21:44:09 2015 (r283841) +++ head/usr.sbin/pw/pw_group.c Sun May 31 22:07:03 2015 (r283842) @@ -83,7 +83,7 @@ pw_group(struct userconf * cnf, int mode gid_t next = gr_gidpolicy(cnf, args); if (getarg(args, 'q')) return next; - printf("%ld\n", (long)next); + printf("%u\n", next); return EXIT_SUCCESS; } @@ -137,7 +137,7 @@ pw_group(struct userconf * cnf, int mode else if (rc != 0) { err(EX_IOERR, "group update"); } - pw_log(cnf, mode, W_GROUP, "%s(%ld) removed", a_name->val, (long) gid); + pw_log(cnf, mode, W_GROUP, "%s(%u) removed", a_name->val, gid); return EXIT_SUCCESS; } else if (mode == M_PRINT) return print_group(grp, getarg(args, 'P') != NULL); @@ -279,7 +279,7 @@ pw_group(struct userconf * cnf, int mode if ((grp = GETGRNAM(arg->val)) == NULL) errx(EX_SOFTWARE, "group disappeared during update"); - pw_log(cnf, mode, W_GROUP, "%s(%ld)", grp->gr_name, (long) grp->gr_gid); + pw_log(cnf, mode, W_GROUP, "%s(%u)", grp->gr_name, grp->gr_gid); free(members); @@ -361,7 +361,7 @@ gr_gidpolicy(struct userconf * cnf, stru gid = (gid_t) atol(a_gid->val); if ((grp = GETGRGID(gid)) != NULL && getarg(args, 'o') == NULL) - errx(EX_DATAERR, "gid `%ld' has already been allocated", (long) grp->gr_gid); + errx(EX_DATAERR, "gid `%u' has already been allocated", grp->gr_gid); } else { struct bitmap bm; Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sun May 31 21:44:09 2015 (r283841) +++ head/usr.sbin/pw/pw_user.c Sun May 31 22:07:03 2015 (r283842) @@ -139,7 +139,7 @@ pw_user(struct userconf * cnf, int mode, uid_t next = pw_uidpolicy(cnf, args); if (getarg(args, 'q')) return next; - printf("%ld:", (long)next); + printf("%u:", next); pw_group(cnf, mode, args); return EXIT_SUCCESS; } @@ -449,7 +449,7 @@ pw_user(struct userconf * cnf, int mode, } ENDGRENT(); - pw_log(cnf, mode, W_USER, "%s(%ld) account removed", a_name->val, (long) uid); + pw_log(cnf, mode, W_USER, "%s(%u) account removed", a_name->val, uid); if (!PWALTDIR()) { /* @@ -469,8 +469,8 @@ pw_user(struct userconf * cnf, int mode, if (getarg(args, 'r') != NULL && *home == '/' && getpwuid(uid) == NULL) { if (stat(home, &st) != -1) { rm_r(home, uid); - pw_log(cnf, mode, W_USER, "%s(%ld) home '%s' %sremoved", - a_name->val, (long) uid, home, + pw_log(cnf, mode, W_USER, "%s(%u) home '%s' %sremoved", + a_name->val, uid, home, stat(home, &st) == -1 ? "" : "not completely "); } } @@ -789,9 +789,9 @@ pw_user(struct userconf * cnf, int mode, errx(EX_NOUSER, "user '%s' disappeared during update", a_name->val); grp = GETGRGID(pwd->pw_gid); - pw_log(cnf, mode, W_USER, "%s(%ld):%s(%ld):%s:%s:%s", - pwd->pw_name, (long) pwd->pw_uid, - grp ? grp->gr_name : "unknown", (long) (grp ? grp->gr_gid : (uid_t)-1), + pw_log(cnf, mode, W_USER, "%s(%u):%s(%u):%s:%s:%s", + pwd->pw_name, pwd->pw_uid, + grp ? grp->gr_name : "unknown", (grp ? grp->gr_gid : (uid_t)-1), pwd->pw_gecos, pwd->pw_dir, pwd->pw_shell); /* @@ -815,8 +815,8 @@ pw_user(struct userconf * cnf, int mode, */ if (!PWALTDIR() && getarg(args, 'm') != NULL && pwd->pw_dir && *pwd->pw_dir == '/' && pwd->pw_dir[1]) { copymkdir(pwd->pw_dir, cnf->dotdir, cnf->homemode, pwd->pw_uid, pwd->pw_gid); - pw_log(cnf, mode, W_USER, "%s(%ld) home %s made", - pwd->pw_name, (long) pwd->pw_uid, pwd->pw_dir); + pw_log(cnf, mode, W_USER, "%s(%u) home %s made", + pwd->pw_name, pwd->pw_uid, pwd->pw_dir); } @@ -835,8 +835,8 @@ pw_user(struct userconf * cnf, int mode, fputs(line, pfp); } pclose(pfp); - pw_log(cnf, mode, W_USER, "%s(%ld) new user mail sent", - pwd->pw_name, (long) pwd->pw_uid); + pw_log(cnf, mode, W_USER, "%s(%u) new user mail sent", + pwd->pw_name, pwd->pw_uid); } fclose(fp); } @@ -859,7 +859,7 @@ pw_uidpolicy(struct userconf * cnf, stru uid = (uid_t) atol(a_uid->val); if ((pwd = GETPWUID(uid)) != NULL && getarg(args, 'o') == NULL) - errx(EX_DATAERR, "uid `%ld' has already been allocated", (long) pwd->pw_uid); + errx(EX_DATAERR, "uid `%u' has already been allocated", pwd->pw_uid); } else { struct bitmap bm; @@ -1183,14 +1183,14 @@ print_user(struct passwd * pwd, int pret strftime(acexpire, sizeof acexpire, "%c", tptr); if (pwd->pw_change > (time_t)0 && (tptr = localtime(&pwd->pw_change)) != NULL) strftime(pwexpire, sizeof pwexpire, "%c", tptr); - printf("Login Name: %-15s #%-12ld Group: %-15s #%ld\n" + printf("Login Name: %-15s #%-12u Group: %-15s #%u\n" " Full Name: %s\n" " Home: %-26.26s Class: %s\n" " Shell: %-26.26s Office: %s\n" "Work Phone: %-26.26s Home Phone: %s\n" "Acc Expire: %-26.26s Pwd Expire: %s\n", - pwd->pw_name, (long) pwd->pw_uid, - grp ? grp->gr_name : "(invalid)", (long) pwd->pw_gid, + pwd->pw_name, pwd->pw_uid, + grp ? grp->gr_name : "(invalid)", pwd->pw_gid, uname, pwd->pw_dir, pwd->pw_class, pwd->pw_shell, office, wphone, hphone, acexpire, pwexpire); From owner-svn-src-all@FreeBSD.ORG Sun May 31 22:12:32 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD4DA6E; Sun, 31 May 2015 22:12:32 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB2CC157A; Sun, 31 May 2015 22:12:32 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VMCWGv019767; Sun, 31 May 2015 22:12:32 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VMCW8B019766; Sun, 31 May 2015 22:12:32 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505312212.t4VMCW8B019766@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 31 May 2015 22:12:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283843 - head/usr.sbin/pw 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 22:12:32 -0000 Author: bapt Date: Sun May 31 22:12:31 2015 New Revision: 283843 URL: https://svnweb.freebsd.org/changeset/base/283843 Log: Cast to gid_t for groups not uid_t Modified: head/usr.sbin/pw/pw_group.c Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Sun May 31 22:07:03 2015 (r283842) +++ head/usr.sbin/pw/pw_group.c Sun May 31 22:12:31 2015 (r283843) @@ -116,7 +116,7 @@ pw_group(struct userconf * cnf, int mode char *fmems[1]; fmems[0] = NULL; fakegroup.gr_name = a_name ? a_name->val : "nogroup"; - fakegroup.gr_gid = a_gid ? (gid_t) atol(a_gid->val) : (uid_t)-1; + fakegroup.gr_gid = a_gid ? (gid_t) atol(a_gid->val) : (gid_t)-1; fakegroup.gr_mem = fmems; return print_group(&fakegroup, getarg(args, 'P') != NULL); } From owner-svn-src-all@FreeBSD.ORG Sun May 31 22:20:37 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A590239; Sun, 31 May 2015 22:20:37 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0839B16B9; Sun, 31 May 2015 22:20:37 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VMKaXG021097; Sun, 31 May 2015 22:20:36 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VMKaaB021096; Sun, 31 May 2015 22:20:36 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201505312220.t4VMKaaB021096@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Sun, 31 May 2015 22:20:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283844 - head/libexec/ypxfr 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 22:20:37 -0000 Author: rodrigc Date: Sun May 31 22:20:36 2015 New Revision: 283844 URL: https://svnweb.freebsd.org/changeset/base/283844 Log: ypxfr(8): Use the correct enum member for checking yp_errno. Found-by: gcc47 Submitted by: Sascha Wildner Obtained from: DragonFlyBSD (commit d0b3a17c3c6) Modified: head/libexec/ypxfr/ypxfr_main.c Modified: head/libexec/ypxfr/ypxfr_main.c ============================================================================== --- head/libexec/ypxfr/ypxfr_main.c Sun May 31 22:12:31 2015 (r283843) +++ head/libexec/ypxfr/ypxfr_main.c Sun May 31 22:20:36 2015 (r283844) @@ -357,7 +357,7 @@ the local domain name isn't set"); ypxfr_mapname, ypxfr_master, 0)) == 0) { yp_error("failed to get order number of %s: %s", - ypxfr_mapname, yp_errno == YPXFR_SUCC ? + ypxfr_mapname, yp_errno == YP_TRUE ? "map has order 0" : ypxfrerr_string((ypxfrstat)yp_errno)); ypxfr_exit(YPXFR_YPERR,NULL); @@ -533,7 +533,7 @@ leave: ypxfr_mapname, ypxfr_master, 0)) == 0) { yp_error("failed to get order number of %s: %s", - ypxfr_mapname, yp_errno == YPXFR_SUCC ? + ypxfr_mapname, yp_errno == YP_TRUE ? "map has order 0" : ypxfrerr_string((ypxfrstat)yp_errno)); ypxfr_exit(YPXFR_YPERR,ypxfr_temp_map); From owner-svn-src-all@FreeBSD.ORG Sun May 31 22:24:30 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6788D39D; Sun, 31 May 2015 22:24:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55F7017AB; Sun, 31 May 2015 22:24:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VMOUqc025263; Sun, 31 May 2015 22:24:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VMOU5g025262; Sun, 31 May 2015 22:24:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505312224.t4VMOU5g025262@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 31 May 2015 22:24:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283845 - head/tests 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 22:24:30 -0000 Author: ngie Date: Sun May 31 22:24:29 2015 New Revision: 283845 URL: https://svnweb.freebsd.org/changeset/base/283845 Log: Append to SUBDIR, not set it Pointyhat to: ngie Modified: head/tests/Makefile Modified: head/tests/Makefile ============================================================================== --- head/tests/Makefile Sun May 31 22:20:36 2015 (r283844) +++ head/tests/Makefile Sun May 31 22:24:29 2015 (r283845) @@ -2,8 +2,8 @@ .include -SUBDIR= etc -SUBDIR= sys +SUBDIR+= etc +SUBDIR+= sys TESTSDIR= ${TESTSBASE} KYUAFILE= yes From owner-svn-src-all@FreeBSD.ORG Sun May 31 22:39:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 82195632; Sun, 31 May 2015 22:39:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5511E1A2E; Sun, 31 May 2015 22:39:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VMdnff030926; Sun, 31 May 2015 22:39:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VMdmvj030917; Sun, 31 May 2015 22:39:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505312239.t4VMdmvj030917@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 31 May 2015 22:39: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: r283846 - in stable/10: etc etc/mtree etc/tests tests tests/etc 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 22:39:49 -0000 Author: ngie Date: Sun May 31 22:39:48 2015 New Revision: 283846 URL: https://svnweb.freebsd.org/changeset/base/283846 Log: MFC r277627,r277650,r282059,r283056,r283840,r283845: r277627 (by will): Add routing_test:static_ipv6_loopback_route_for_each_fib. It tests that all FIBs get a static IPv6 loopback route. Submitted by: asomers Sponsored by: Spectra Logic MFSpectraBSD: 1048456 on 2014/03/13 1114523 on 2015/01/23 r277650 (by will): Add tests/etc/rc.d to mtree. Submitted by: stefanf MFC with: 277627 r282059: Move etc/tests/rc.d to etc/rc.d/tests to match the directory layout jmmv@ documented and implemented in other areas of the FreeBSD tree r283056: Move all test integration pieces for etc/ from etc/ to tests/ This is being done to fix breakage with make distribution with read-only source trees as make distribution doesn't use make obj like building tests/ does in all cases Reported by: Wolfgang Zenker Suggested by: jhb r283840: Remove empty tests directory r283845: Append to SUBDIR, not set it Pointyhat to: ngie Added: stable/10/tests/etc/ - copied from r283056, head/tests/etc/ Deleted: stable/10/etc/tests/ Modified: stable/10/etc/Makefile stable/10/etc/mtree/BSD.tests.dist stable/10/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Sun May 31 22:24:29 2015 (r283845) +++ stable/10/etc/Makefile Sun May 31 22:39:48 2015 (r283846) @@ -10,10 +10,6 @@ SUBDIR= \ SUBDIR+=sendmail .endif -.if ${MK_TESTS} != "no" -SUBDIR+=tests -.endif - BIN1= crontab \ devd.conf \ devfs.conf \ Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Sun May 31 22:24:29 2015 (r283845) +++ stable/10/etc/mtree/BSD.tests.dist Sun May 31 22:39:48 2015 (r283846) @@ -50,6 +50,8 @@ .. .. etc + rc.d + .. .. games .. Modified: stable/10/tests/Makefile ============================================================================== --- stable/10/tests/Makefile Sun May 31 22:24:29 2015 (r283845) +++ stable/10/tests/Makefile Sun May 31 22:39:48 2015 (r283846) @@ -2,7 +2,8 @@ .include -SUBDIR= sys +SUBDIR+= etc +SUBDIR+= sys TESTSDIR= ${TESTSBASE} KYUAFILE= yes From owner-svn-src-all@FreeBSD.ORG Sun May 31 22:41:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5045776; Sun, 31 May 2015 22:41:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2BC51BBE; Sun, 31 May 2015 22:41:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VMfMSt032477; Sun, 31 May 2015 22:41:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VMfM3B032476; Sun, 31 May 2015 22:41:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505312241.t4VMfM3B032476@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 31 May 2015 22:41:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283847 - stable/10/lib 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 22:41:23 -0000 Author: ngie Date: Sun May 31 22:41:22 2015 New Revision: 283847 URL: https://svnweb.freebsd.org/changeset/base/283847 Log: MFC r283502: Remove SUBDIR_DEPEND for non-existent libreadline directory libreadline lives under gnu/lib Modified: stable/10/lib/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/Makefile ============================================================================== --- stable/10/lib/Makefile Sun May 31 22:39:48 2015 (r283846) +++ stable/10/lib/Makefile Sun May 31 22:41:22 2015 (r283847) @@ -136,7 +136,6 @@ SUBDIR_DEPEND_libpam= libcrypt libopie $ SUBDIR_DEPEND_libpjdlog= libutil SUBDIR_DEPEND_libprocstat= libkvm libutil SUBDIR_DEPEND_libradius= libmd -SUBDIR_DEPEND_libreadline= ncurses SUBDIR_DEPEND_libsmb= libkiconv SUBDIR_DEPEND_libstdc++= msun SUBDIR_DEPEND_libtacplus= libmd From owner-svn-src-all@FreeBSD.ORG Sun May 31 22:44:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BDCD8F8; Sun, 31 May 2015 22:44:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 695751C3B; Sun, 31 May 2015 22:44:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VMiFIp035334; Sun, 31 May 2015 22:44:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VMiFO8035331; Sun, 31 May 2015 22:44:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505312244.t4VMiFO8035331@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 31 May 2015 22:44: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: r283848 - stable/10/contrib/atf/atf-sh 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 22:44:15 -0000 Author: ngie Date: Sun May 31 22:44:14 2015 New Revision: 283848 URL: https://svnweb.freebsd.org/changeset/base/283848 Log: MFC r283170: Import proposed fix from upstream for atf-sh/atf_check_test:flush_stdout_on_timeout Many thanks for jmmv for the fix! PR: 197060 Original commit message: From 0e546407567ea858e261e72f75c5ed61e07d0ddf Mon Sep 17 00:00:00 2001 From: Julio Merino Date: Tue, 17 Feb 2015 18:10:11 -0500 Subject: [PATCH] Fix atf-sh/atf_check_test:flush_stdout_on_death The test atf-sh/atf_check_test:flush_stdout_on_timeout was flaky as it was playing solely with time. Fix this by making the test more robust and rename it while we are at it: there is nothing left about "timeouts" in this test, considering that ATF itself does not enforce deadlines any longer. Fixes FreeBSD PR 197060. Modified: stable/10/contrib/atf/atf-sh/atf_check_test.sh stable/10/contrib/atf/atf-sh/misc_helpers.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/atf/atf-sh/atf_check_test.sh ============================================================================== --- stable/10/contrib/atf/atf-sh/atf_check_test.sh Sun May 31 22:41:22 2015 (r283847) +++ stable/10/contrib/atf/atf-sh/atf_check_test.sh Sun May 31 22:44:14 2015 (r283848) @@ -164,18 +164,22 @@ equal_body() grep '^failed: \${x} != \${y} (a != b)$' resfile } -atf_test_case flush_stdout_on_timeout -flush_stdout_on_timeout_body() +atf_test_case flush_stdout_on_death +flush_stdout_on_death_body() { - "$(atf_get_srcdir)/misc_helpers" -s "$(atf_get_srcdir)" atf_check_timeout \ - >out 2>err & + CONTROL_FILE="$(pwd)/done" "$(atf_get_srcdir)/misc_helpers" \ + -s "$(atf_get_srcdir)" atf_check_flush_stdout >out 2>err & pid="${!}" - sleep 1 - kill "${pid}" + while [ ! -f ./done ]; do + echo "Still waiting for helper to create control file" + ls + sleep 1 + done + kill -9 "${pid}" grep 'Executing command.*true' out \ || atf_fail 'First command not in output' - grep 'Executing command.*sleep 42' out \ + grep 'Executing command.*false' out \ || atf_fail 'Second command not in output' } @@ -187,7 +191,7 @@ atf_init_test_cases() atf_add_test_case null_stdout atf_add_test_case null_stderr atf_add_test_case equal - atf_add_test_case flush_stdout_on_timeout + atf_add_test_case flush_stdout_on_death } # vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 Modified: stable/10/contrib/atf/atf-sh/misc_helpers.sh ============================================================================== --- stable/10/contrib/atf/atf-sh/misc_helpers.sh Sun May 31 22:41:22 2015 (r283847) +++ stable/10/contrib/atf/atf-sh/misc_helpers.sh Sun May 31 22:44:14 2015 (r283848) @@ -139,16 +139,20 @@ atf_check_equal_eval_fail_body() atf_check_equal '${x}' '${y}' } -atf_test_case atf_check_timeout -atf_check_timeout_head() +atf_test_case atf_check_flush_stdout +atf_check_flush_stdout_head() { atf_set "descr" "Helper test case for the t_atf_check test program" - atf_set "timeout" 1 + atf_set "timeout" "30" } -atf_check_timeout_body() +atf_check_flush_stdout_body() { atf_check true - atf_check sleep 42 + atf_check -s exit:1 false + touch "${CONTROL_FILE:-done}" + while :; do + sleep 1 + done } # ------------------------------------------------------------------------- @@ -281,7 +285,7 @@ atf_init_test_cases() atf_add_test_case atf_check_equal_fail atf_add_test_case atf_check_equal_eval_ok atf_add_test_case atf_check_equal_eval_fail - atf_add_test_case atf_check_timeout + atf_add_test_case atf_check_flush_stdout # Add helper tests for t_config. atf_add_test_case config_get From owner-svn-src-all@FreeBSD.ORG Sun May 31 22:49:33 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53060A83; Sun, 31 May 2015 22:49:33 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40B1D1C62; Sun, 31 May 2015 22:49:33 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VMnX65036141; Sun, 31 May 2015 22:49:33 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VMnX4x036140; Sun, 31 May 2015 22:49:33 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505312249.t4VMnX4x036140@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 31 May 2015 22:49: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: r283849 - stable/10/sys/netipsec 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 22:49:33 -0000 Author: ae Date: Sun May 31 22:49:32 2015 New Revision: 283849 URL: https://svnweb.freebsd.org/changeset/base/283849 Log: MFC r283117: Remove unneded mbuf length adjustment, M_PREPEND() already did that. PR: 139387 Modified: stable/10/sys/netipsec/keysock.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netipsec/keysock.c ============================================================================== --- stable/10/sys/netipsec/keysock.c Sun May 31 22:44:14 2015 (r283848) +++ stable/10/sys/netipsec/keysock.c Sun May 31 22:49:32 2015 (r283849) @@ -153,8 +153,6 @@ key_sendup0(rp, m, promisc) PFKEYSTAT_INC(in_nomem); return (ENOBUFS); } - m->m_pkthdr.len += sizeof(*pmsg); /* XXX: is this correct? */ - pmsg = mtod(m, struct sadb_msg *); bzero(pmsg, sizeof(*pmsg)); pmsg->sadb_msg_version = PF_KEY_V2; From owner-svn-src-all@FreeBSD.ORG Sun May 31 22:51:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0CD1BDC; Sun, 31 May 2015 22:51:17 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEA891DCB; Sun, 31 May 2015 22:51:17 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VMpHbe039084; Sun, 31 May 2015 22:51:17 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VMpHjv039083; Sun, 31 May 2015 22:51:17 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505312251.t4VMpHjv039083@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 31 May 2015 22:51:17 +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: r283850 - stable/9/sys/netipsec 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 22:51:17 -0000 Author: ae Date: Sun May 31 22:51:16 2015 New Revision: 283850 URL: https://svnweb.freebsd.org/changeset/base/283850 Log: MFC r283117: Remove unneded mbuf length adjustment, M_PREPEND() already did that. PR: 139387 Modified: stable/9/sys/netipsec/keysock.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netipsec/keysock.c ============================================================================== --- stable/9/sys/netipsec/keysock.c Sun May 31 22:49:32 2015 (r283849) +++ stable/9/sys/netipsec/keysock.c Sun May 31 22:51:16 2015 (r283850) @@ -148,8 +148,6 @@ key_sendup0(rp, m, promisc) PFKEYSTAT_INC(in_nomem); return (ENOBUFS); } - m->m_pkthdr.len += sizeof(*pmsg); /* XXX: is this correct? */ - pmsg = mtod(m, struct sadb_msg *); bzero(pmsg, sizeof(*pmsg)); pmsg->sadb_msg_version = PF_KEY_V2; From owner-svn-src-all@FreeBSD.ORG Sun May 31 22:56:03 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C76BBD57; Sun, 31 May 2015 22:56:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AA341E65; Sun, 31 May 2015 22:56:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VMu3JB040996; Sun, 31 May 2015 22:56:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VMu3st040995; Sun, 31 May 2015 22:56:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505312256.t4VMu3st040995@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 31 May 2015 22:56:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283851 - stable/10/tools/regression/file 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 22:56:03 -0000 Author: ngie Date: Sun May 31 22:56:03 2015 New Revision: 283851 URL: https://svnweb.freebsd.org/changeset/base/283851 Log: MFC r283357: Remove directory for test that has been integrated in under tests/sys/... Deleted: stable/10/tools/regression/file/ Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-all@FreeBSD.ORG Sun May 31 22:58:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF3F1F96; Sun, 31 May 2015 22:58:43 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D00561E90; Sun, 31 May 2015 22:58:43 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VMwhN5041561; Sun, 31 May 2015 22:58:43 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VMwggt041556; Sun, 31 May 2015 22:58:42 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505312258.t4VMwggt041556@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 31 May 2015 22:58:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283852 - in stable/10: sbin/ifconfig sys/net sys/netinet 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 22:58:44 -0000 Author: ae Date: Sun May 31 22:58:41 2015 New Revision: 283852 URL: https://svnweb.freebsd.org/changeset/base/283852 Log: MFC r282965: Add an ability accept encapsulated packets from different sources by one gif(4) interface. Add new option "ignore_source" for gif(4) interface. When it is enabled, gif's encapcheck function requires match only for packet's destination address. Differential Revision: https://reviews.freebsd.org/D2004 Sponsored by: Yandex LLC Modified: stable/10/sbin/ifconfig/ifconfig.8 stable/10/sbin/ifconfig/ifgif.c stable/10/sys/net/if_gif.h stable/10/sys/netinet/in_gif.c stable/10/sys/netinet6/in6_gif.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/10/sbin/ifconfig/ifconfig.8 Sun May 31 22:56:03 2015 (r283851) +++ stable/10/sbin/ifconfig/ifconfig.8 Sun May 31 22:58:41 2015 (r283852) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd March 6, 2015 +.Dd May 15, 2015 .Dt IFCONFIG 8 .Os .Sh NAME @@ -2444,6 +2444,14 @@ This is for backward compatibility with .It Cm -accept_rev_ethip_ver Clear a flag .Cm accept_rev_ethip_ver . +.It Cm ignore_source +Set a flag to accept encapsulated packets destined to this host +independently from source address. +This may be useful for hosts, that receive encapsulated packets +from the load balancers. +.It Cm -ignore_source +Clear a flag +.Cm ignore_source . .It Cm send_rev_ethip_ver Set a flag to send EtherIP packets with reversed version field intentionally. Modified: stable/10/sbin/ifconfig/ifgif.c ============================================================================== --- stable/10/sbin/ifconfig/ifgif.c Sun May 31 22:56:03 2015 (r283851) +++ stable/10/sbin/ifconfig/ifgif.c Sun May 31 22:58:41 2015 (r283852) @@ -51,7 +51,7 @@ static const char rcsid[] = #include "ifconfig.h" -#define GIFBITS "\020\1ACCEPT_REV_ETHIP_VER\5SEND_REV_ETHIP_VER" +#define GIFBITS "\020\1ACCEPT_REV_ETHIP_VER\2IGNORE_SOURCE\5SEND_REV_ETHIP_VER" static void gif_status(int); @@ -95,6 +95,8 @@ setgifopts(const char *val, static struct cmd gif_cmds[] = { DEF_CMD("accept_rev_ethip_ver", GIF_ACCEPT_REVETHIP, setgifopts), DEF_CMD("-accept_rev_ethip_ver",-GIF_ACCEPT_REVETHIP, setgifopts), + DEF_CMD("ignore_source", GIF_IGNORE_SOURCE, setgifopts), + DEF_CMD("-ignore_source", -GIF_IGNORE_SOURCE, setgifopts), DEF_CMD("send_rev_ethip_ver", GIF_SEND_REVETHIP, setgifopts), DEF_CMD("-send_rev_ethip_ver", -GIF_SEND_REVETHIP, setgifopts), }; Modified: stable/10/sys/net/if_gif.h ============================================================================== --- stable/10/sys/net/if_gif.h Sun May 31 22:56:03 2015 (r283851) +++ stable/10/sys/net/if_gif.h Sun May 31 22:58:41 2015 (r283852) @@ -117,7 +117,9 @@ int gif_encapcheck(const struct mbuf *, #define GIFSOPTS _IOW('i', 151, struct ifreq) #define GIF_ACCEPT_REVETHIP 0x0001 +#define GIF_IGNORE_SOURCE 0x0002 #define GIF_SEND_REVETHIP 0x0010 -#define GIF_OPTMASK (GIF_ACCEPT_REVETHIP|GIF_SEND_REVETHIP) +#define GIF_OPTMASK (GIF_ACCEPT_REVETHIP|GIF_SEND_REVETHIP| \ + GIF_IGNORE_SOURCE) #endif /* _NET_IF_GIF_H_ */ Modified: stable/10/sys/netinet/in_gif.c ============================================================================== --- stable/10/sys/netinet/in_gif.c Sun May 31 22:56:03 2015 (r283851) +++ stable/10/sys/netinet/in_gif.c Sun May 31 22:58:41 2015 (r283852) @@ -177,13 +177,19 @@ in_gif_input(struct mbuf **mp, int *offp static int gif_validate4(const struct ip *ip, struct gif_softc *sc, struct ifnet *ifp) { + int ret; GIF_RLOCK_ASSERT(sc); /* check for address match */ - if (sc->gif_iphdr->ip_src.s_addr != ip->ip_dst.s_addr || - sc->gif_iphdr->ip_dst.s_addr != ip->ip_src.s_addr) + if (sc->gif_iphdr->ip_src.s_addr != ip->ip_dst.s_addr) return (0); + ret = 32; + if (sc->gif_iphdr->ip_dst.s_addr != ip->ip_src.s_addr) { + if ((sc->gif_options & GIF_IGNORE_SOURCE) == 0) + return (0); + } else + ret += 32; /* martian filters on outer source - NOT done in ip_input! */ if (IN_MULTICAST(ntohl(ip->ip_src.s_addr))) @@ -214,7 +220,7 @@ gif_validate4(const struct ip *ip, struc } RTFREE_LOCKED(rt); } - return (32 * 2); + return (ret); } /* Modified: stable/10/sys/netinet6/in6_gif.c ============================================================================== --- stable/10/sys/netinet6/in6_gif.c Sun May 31 22:56:03 2015 (r283851) +++ stable/10/sys/netinet6/in6_gif.c Sun May 31 22:58:41 2015 (r283852) @@ -180,6 +180,7 @@ static int gif_validate6(const struct ip6_hdr *ip6, struct gif_softc *sc, struct ifnet *ifp) { + int ret; GIF_RLOCK_ASSERT(sc); /* @@ -187,9 +188,14 @@ gif_validate6(const struct ip6_hdr *ip6, * packet. We should compare the *source* address in our configuration * and the *destination* address of the packet, and vice versa. */ - if (!IN6_ARE_ADDR_EQUAL(&sc->gif_ip6hdr->ip6_src, &ip6->ip6_dst) || - !IN6_ARE_ADDR_EQUAL(&sc->gif_ip6hdr->ip6_dst, &ip6->ip6_src)) + if (!IN6_ARE_ADDR_EQUAL(&sc->gif_ip6hdr->ip6_src, &ip6->ip6_dst)) return (0); + ret = 128; + if (!IN6_ARE_ADDR_EQUAL(&sc->gif_ip6hdr->ip6_dst, &ip6->ip6_src)) { + if ((sc->gif_options & GIF_IGNORE_SOURCE) == 0) + return (0); + } else + ret += 128; /* martian filters on outer source - done in ip6_input */ @@ -214,7 +220,7 @@ gif_validate6(const struct ip6_hdr *ip6, RTFREE_LOCKED(rt); } - return (128 * 2); + return (ret); } /* From owner-svn-src-all@FreeBSD.ORG Sun May 31 23:00:36 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E76D4147; Sun, 31 May 2015 23:00:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4F041F03; Sun, 31 May 2015 23:00:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VN0aUs042116; Sun, 31 May 2015 23:00:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VN0amx042112; Sun, 31 May 2015 23:00:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505312300.t4VN0amx042112@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 31 May 2015 23:00: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: r283853 - in stable/10/cddl: sbin usr.bin usr.sbin 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 23:00:37 -0000 Author: ngie Date: Sun May 31 23:00:35 2015 New Revision: 283853 URL: https://svnweb.freebsd.org/changeset/base/283853 Log: MFC r283147: Build cddl/{sbin,usr.bin,usr.sbin} in parallel as all of the applications are freestanding (they require libraries build via make libraries in buildworld) Sponsored by: EMC / Isilon Storage Division Modified: stable/10/cddl/sbin/Makefile stable/10/cddl/usr.bin/Makefile stable/10/cddl/usr.sbin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/sbin/Makefile ============================================================================== --- stable/10/cddl/sbin/Makefile Sun May 31 22:58:41 2015 (r283852) +++ stable/10/cddl/sbin/Makefile Sun May 31 23:00:35 2015 (r283853) @@ -13,4 +13,6 @@ _zfs= zfs _zpool= zpool .endif +SUBDIR_PARALLEL= + .include Modified: stable/10/cddl/usr.bin/Makefile ============================================================================== --- stable/10/cddl/usr.bin/Makefile Sun May 31 22:58:41 2015 (r283852) +++ stable/10/cddl/usr.bin/Makefile Sun May 31 23:00:35 2015 (r283853) @@ -26,4 +26,6 @@ _zstreamdump = zstreamdump .endif .endif +SUBDIR_PARALLEL= + .include Modified: stable/10/cddl/usr.sbin/Makefile ============================================================================== --- stable/10/cddl/usr.sbin/Makefile Sun May 31 22:58:41 2015 (r283852) +++ stable/10/cddl/usr.sbin/Makefile Sun May 31 23:00:35 2015 (r283853) @@ -36,4 +36,6 @@ _dtruss= dtruss _lockstat= lockstat .endif +SUBDIR_PARALLEL= + .include From owner-svn-src-all@FreeBSD.ORG Sun May 31 23:11:27 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16BC1314; Sun, 31 May 2015 23:11:27 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 035E6125F; Sun, 31 May 2015 23:11:27 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VNBQOw047731; Sun, 31 May 2015 23:11:26 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VNBPrx047719; Sun, 31 May 2015 23:11:25 GMT (envelope-from np@FreeBSD.org) Message-Id: <201505312311.t4VNBPrx047719@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sun, 31 May 2015 23:11:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283854 - in stable/10/sys/dev/cxgbe: common tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 23:11:27 -0000 Author: np Date: Sun May 31 23:11:25 2015 New Revision: 283854 URL: https://svnweb.freebsd.org/changeset/base/283854 Log: MFC r272719: cxgbe/tom: don't leak resources tied to an active open request that cannot be sent to the chip because a prerequisite L2 resolution failed. Modified: stable/10/sys/dev/cxgbe/common/t4_msg.h stable/10/sys/dev/cxgbe/tom/t4_connect.c stable/10/sys/dev/cxgbe/tom/t4_tom.c stable/10/sys/dev/cxgbe/tom/t4_tom.h stable/10/sys/dev/cxgbe/tom/t4_tom_l2t.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/common/t4_msg.h ============================================================================== --- stable/10/sys/dev/cxgbe/common/t4_msg.h Sun May 31 23:00:35 2015 (r283853) +++ stable/10/sys/dev/cxgbe/common/t4_msg.h Sun May 31 23:11:25 2015 (r283854) @@ -273,6 +273,7 @@ union opcode_tid { /* extract the TID from a CPL command */ #define GET_TID(cmd) (G_TID(ntohl(OPCODE_TID(cmd)))) +#define GET_OPCODE(cmd) ((cmd)->ot.opcode) /* partitioning of TID fields that also carry a queue id */ #define S_TID_TID 0 Modified: stable/10/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_connect.c Sun May 31 23:00:35 2015 (r283853) +++ stable/10/sys/dev/cxgbe/tom/t4_connect.c Sun May 31 23:11:25 2015 (r283854) @@ -115,8 +115,8 @@ do_act_establish(struct sge_iq *iq, cons { struct adapter *sc = iq->adapter; const struct cpl_act_establish *cpl = (const void *)(rss + 1); - unsigned int tid = GET_TID(cpl); - unsigned int atid = G_TID_TID(ntohl(cpl->tos_atid)); + u_int tid = GET_TID(cpl); + u_int atid = G_TID_TID(ntohl(cpl->tos_atid)); struct toepcb *toep = lookup_atid(sc, atid); struct inpcb *inp = toep->inp; @@ -178,17 +178,34 @@ act_open_rpl_status_to_errno(int status) } } +void +act_open_failure_cleanup(struct adapter *sc, u_int atid, u_int status) +{ + struct toepcb *toep = lookup_atid(sc, atid); + struct inpcb *inp = toep->inp; + struct toedev *tod = &toep->td->tod; + + free_atid(sc, atid); + toep->tid = -1; + + if (status != EAGAIN) + INP_INFO_WLOCK(&V_tcbinfo); + INP_WLOCK(inp); + toe_connect_failed(tod, inp, status); + final_cpl_received(toep); /* unlocks inp */ + if (status != EAGAIN) + INP_INFO_WUNLOCK(&V_tcbinfo); +} + static int do_act_open_rpl(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) { struct adapter *sc = iq->adapter; const struct cpl_act_open_rpl *cpl = (const void *)(rss + 1); - unsigned int atid = G_TID_TID(G_AOPEN_ATID(be32toh(cpl->atid_status))); - unsigned int status = G_AOPEN_STATUS(be32toh(cpl->atid_status)); + u_int atid = G_TID_TID(G_AOPEN_ATID(be32toh(cpl->atid_status))); + u_int status = G_AOPEN_STATUS(be32toh(cpl->atid_status)); struct toepcb *toep = lookup_atid(sc, atid); - struct inpcb *inp = toep->inp; - struct toedev *tod = &toep->td->tod; int rc; KASSERT(m == NULL, ("%s: wasn't expecting payload", __func__)); @@ -200,20 +217,11 @@ do_act_open_rpl(struct sge_iq *iq, const if (negative_advice(status)) return (0); - free_atid(sc, atid); - toep->tid = -1; - if (status && act_open_has_tid(status)) release_tid(sc, GET_TID(cpl), toep->ctrlq); rc = act_open_rpl_status_to_errno(status); - if (rc != EAGAIN) - INP_INFO_WLOCK(&V_tcbinfo); - INP_WLOCK(inp); - toe_connect_failed(tod, inp, rc); - final_cpl_received(toep); /* unlocks inp */ - if (rc != EAGAIN) - INP_INFO_WUNLOCK(&V_tcbinfo); + act_open_failure_cleanup(sc, atid, rc); return (0); } Modified: stable/10/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_tom.c Sun May 31 23:00:35 2015 (r283853) +++ stable/10/sys/dev/cxgbe/tom/t4_tom.c Sun May 31 23:11:25 2015 (r283854) @@ -97,6 +97,7 @@ static void t4_clip_task(void *, int); static void update_clip_table(struct adapter *, struct tom_data *); static void destroy_clip_table(struct adapter *, struct tom_data *); static void free_tom_data(struct adapter *, struct tom_data *); +static void reclaim_wr_resources(void *, int); static int in6_ifaddr_gen; static eventhandler_tag ifaddr_evhandler; @@ -902,6 +903,8 @@ free_tom_data(struct adapter *sc, struct if (td->listen_mask != 0) hashdestroy(td->listen_hash, M_CXGBE, td->listen_mask); + if (mtx_initialized(&td->unsent_wr_lock)) + mtx_destroy(&td->unsent_wr_lock); if (mtx_initialized(&td->lctx_hash_lock)) mtx_destroy(&td->lctx_hash_lock); if (mtx_initialized(&td->toep_list_lock)) @@ -911,6 +914,44 @@ free_tom_data(struct adapter *sc, struct free(td, M_CXGBE); } +static void +reclaim_wr_resources(void *arg, int count) +{ + struct tom_data *td = arg; + STAILQ_HEAD(, wrqe) twr_list = STAILQ_HEAD_INITIALIZER(twr_list); + struct cpl_act_open_req *cpl; + u_int opcode, atid; + struct wrqe *wr; + struct adapter *sc; + + mtx_lock(&td->unsent_wr_lock); + STAILQ_SWAP(&td->unsent_wr_list, &twr_list, wrqe); + mtx_unlock(&td->unsent_wr_lock); + + while ((wr = STAILQ_FIRST(&twr_list)) != NULL) { + STAILQ_REMOVE_HEAD(&twr_list, link); + + cpl = wrtod(wr); + opcode = GET_OPCODE(cpl); + + switch (opcode) { + case CPL_ACT_OPEN_REQ: + case CPL_ACT_OPEN_REQ6: + atid = G_TID_TID(be32toh(OPCODE_TID(cpl))); + sc = td_adapter(td); + + CTR2(KTR_CXGBE, "%s: atid %u ", __func__, atid); + act_open_failure_cleanup(sc, atid, EHOSTUNREACH); + free(wr, M_CXGBE); + break; + default: + log(LOG_ERR, "%s: leaked work request %p, wr_len %d, " + "opcode %x\n", __func__, wr, wr->wr_len, opcode); + /* WR not freed here; go look at it with a debugger. */ + } + } +} + /* * Ground control to Major TOM * Commencing countdown, engines on @@ -938,6 +979,11 @@ t4_tom_activate(struct adapter *sc) td->listen_hash = hashinit_flags(LISTEN_HASH_SIZE, M_CXGBE, &td->listen_mask, HASH_NOWAIT); + /* List of WRs for which L2 resolution failed */ + mtx_init(&td->unsent_wr_lock, "Unsent WR list lock", NULL, MTX_DEF); + STAILQ_INIT(&td->unsent_wr_list); + TASK_INIT(&td->reclaim_wr_resources, 0, reclaim_wr_resources, td); + /* TID tables */ rc = alloc_tid_tabs(&sc->tids); if (rc != 0) @@ -1011,6 +1057,12 @@ t4_tom_deactivate(struct adapter *sc) rc = EBUSY; mtx_unlock(&td->lctx_hash_lock); + taskqueue_drain(taskqueue_thread, &td->reclaim_wr_resources); + mtx_lock(&td->unsent_wr_lock); + if (!STAILQ_EMPTY(&td->unsent_wr_list)) + rc = EBUSY; + mtx_unlock(&td->unsent_wr_lock); + if (rc == 0) { unregister_toedev(sc->tom_softc); free_tom_data(sc, td); Modified: stable/10/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_tom.h Sun May 31 23:00:35 2015 (r283853) +++ stable/10/sys/dev/cxgbe/tom/t4_tom.h Sun May 31 23:11:25 2015 (r283854) @@ -199,6 +199,11 @@ struct tom_data { struct mtx clip_table_lock; struct clip_head clip_table; int clip_gen; + + /* WRs that will not be sent to the chip because L2 resolution failed */ + struct mtx unsent_wr_lock; + STAILQ_HEAD(, wrqe) unsent_wr_list; + struct task reclaim_wr_resources; }; static inline struct tom_data * @@ -241,6 +246,7 @@ void release_lip(struct tom_data *, stru void t4_init_connect_cpl_handlers(struct adapter *); int t4_connect(struct toedev *, struct socket *, struct rtentry *, struct sockaddr *); +void act_open_failure_cleanup(struct adapter *, u_int, u_int); /* t4_listen.c */ void t4_init_listen_cpl_handlers(struct adapter *); Modified: stable/10/sys/dev/cxgbe/tom/t4_tom_l2t.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_tom_l2t.c Sun May 31 23:00:35 2015 (r283853) +++ stable/10/sys/dev/cxgbe/tom/t4_tom_l2t.c Sun May 31 23:11:25 2015 (r283854) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -161,25 +162,17 @@ send_pending(struct adapter *sc, struct } static void -resolution_failed_for_wr(struct wrqe *wr) +resolution_failed(struct adapter *sc, struct l2t_entry *e) { - log(LOG_ERR, "%s: leaked work request %p, wr_len %d\n", __func__, wr, - wr->wr_len); - - /* free(wr, M_CXGBE); */ -} - -static void -resolution_failed(struct l2t_entry *e) -{ - struct wrqe *wr; + struct tom_data *td = sc->tom_softc; mtx_assert(&e->lock, MA_OWNED); - while ((wr = STAILQ_FIRST(&e->wr_list)) != NULL) { - STAILQ_REMOVE_HEAD(&e->wr_list, link); - resolution_failed_for_wr(wr); - } + mtx_lock(&td->unsent_wr_lock); + STAILQ_CONCAT(&td->unsent_wr_list, &e->wr_list); + mtx_unlock(&td->unsent_wr_lock); + + taskqueue_enqueue(taskqueue_thread, &td->reclaim_wr_resources); } static void @@ -203,7 +196,7 @@ update_entry(struct adapter *sc, struct * need to wlock the table). */ e->state = L2T_STATE_FAILED; - resolution_failed(e); + resolution_failed(sc, e); return; } else if (lladdr == NULL) { @@ -305,12 +298,11 @@ again: if (e->state == L2T_STATE_VALID && !STAILQ_EMPTY(&e->wr_list)) send_pending(sc, e); if (e->state == L2T_STATE_FAILED) - resolution_failed(e); + resolution_failed(sc, e); mtx_unlock(&e->lock); break; case L2T_STATE_FAILED: - resolution_failed_for_wr(wr); return (EHOSTUNREACH); } From owner-svn-src-all@FreeBSD.ORG Sun May 31 23:29:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84A7280C; Sun, 31 May 2015 23:29:05 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 723E8158F; Sun, 31 May 2015 23:29:05 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VNT5JX056650; Sun, 31 May 2015 23:29:05 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VNT5eP056647; Sun, 31 May 2015 23:29:05 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505312329.t4VNT5eP056647@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 31 May 2015 23:29:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283855 - stable/10/sys/net80211 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.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 23:29:05 -0000 Author: ae Date: Sun May 31 23:29:04 2015 New Revision: 283855 URL: https://svnweb.freebsd.org/changeset/base/283855 Log: MFC r283313: Properly update TX statistics for wlan(4). ieee80211_pwrsave() can fail due to queue overflow, check its return code and increment oerrors counter when it fails. Also handle more error cases and update oerrors counter when we don't send mbuf due to some errors. Return ENETDOWN when parent interface isn't ready. Update obytes and omcasts counters in corresponding places. PR: 184626 Differential Revision: https://reviews.freebsd.org/D2621 Modified: stable/10/sys/net80211/ieee80211_output.c stable/10/sys/net80211/ieee80211_wds.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net80211/ieee80211_output.c ============================================================================== --- stable/10/sys/net80211/ieee80211_output.c Sun May 31 23:11:25 2015 (r283854) +++ stable/10/sys/net80211/ieee80211_output.c Sun May 31 23:29:04 2015 (r283855) @@ -131,7 +131,7 @@ ieee80211_vap_pkt_send_dest(struct ieee8 { struct ieee80211com *ic = vap->iv_ic; struct ifnet *ifp = vap->iv_ifp; - int error; + int error, len, mcast; if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) && (m->m_flags & M_PWR_SAV) == 0) { @@ -141,7 +141,8 @@ ieee80211_vap_pkt_send_dest(struct ieee8 * the frame back when the time is right. * XXX lose WDS vap linkage? */ - (void) ieee80211_pwrsave(ni, m); + if (ieee80211_pwrsave(ni, m) != 0) + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); ieee80211_free_node(ni); /* @@ -170,6 +171,8 @@ ieee80211_vap_pkt_send_dest(struct ieee8 * interface it (might have been) received on. */ m->m_pkthdr.rcvif = (void *)ni; + mcast = (m->m_flags & (M_MCAST | M_BCAST)) ? 1: 0; + len = m->m_pkthdr.len; BPF_MTAP(ifp, m); /* 802.3 tx */ @@ -235,7 +238,7 @@ ieee80211_vap_pkt_send_dest(struct ieee8 /* NB: stat+msg handled in ieee80211_encap */ IEEE80211_TX_UNLOCK(ic); ieee80211_free_node(ni); - /* XXX better status? */ + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); return (ENOBUFS); } } @@ -249,8 +252,11 @@ ieee80211_vap_pkt_send_dest(struct ieee8 if (error != 0) { /* NB: IFQ_HANDOFF reclaims mbuf */ ieee80211_free_node(ni); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); } else { ifp->if_opackets++; + if_inc_counter(ifp, IFCOUNTER_OMCASTS, mcast); + if_inc_counter(ifp, IFCOUNTER_OBYTES, len); } ic->ic_lastdata = ticks; @@ -314,6 +320,7 @@ ieee80211_start_pkt(struct ieee80211vap eh->ether_dhost, "mcast", "%s", "on DWDS"); vap->iv_stats.is_dwds_mcast++; m_freem(m); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); /* XXX better status? */ return (ENOBUFS); } @@ -415,9 +422,9 @@ ieee80211_vap_transmit(struct ifnet *ifp IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT, "%s: ignore queue, parent %s not up+running\n", __func__, parent->if_xname); - /* XXX stat */ m_freem(m); - return (EINVAL); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + return (ENETDOWN); } if (vap->iv_state == IEEE80211_S_SLEEP) { /* @@ -444,7 +451,8 @@ ieee80211_vap_transmit(struct ifnet *ifp IEEE80211_UNLOCK(ic); ifp->if_drv_flags |= IFF_DRV_OACTIVE; m_freem(m); - return (EINVAL); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + return (ENETDOWN); } IEEE80211_UNLOCK(ic); } Modified: stable/10/sys/net80211/ieee80211_wds.c ============================================================================== --- stable/10/sys/net80211/ieee80211_wds.c Sun May 31 23:11:25 2015 (r283854) +++ stable/10/sys/net80211/ieee80211_wds.c Sun May 31 23:29:04 2015 (r283855) @@ -300,8 +300,12 @@ ieee80211_dwds_mcast(struct ieee80211vap /* NB: IFQ_HANDOFF reclaims mbuf */ ifp->if_oerrors++; ieee80211_free_node(ni); - } else + } else { ifp->if_opackets++; + if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); + if_inc_counter(ifp, IFCOUNTER_OBYTES, + m->m_pkthdr.len); + } } } From owner-svn-src-all@FreeBSD.ORG Sun May 31 23:47:10 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5956EBF8; Sun, 31 May 2015 23:47:10 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B8DF19C0; Sun, 31 May 2015 23:47:10 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4VNlAcX066263; Sun, 31 May 2015 23:47:10 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4VNl9Hm066259; Sun, 31 May 2015 23:47:09 GMT (envelope-from np@FreeBSD.org) Message-Id: <201505312347.t4VNl9Hm066259@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sun, 31 May 2015 23:47:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283856 - in stable/10/sys/dev/cxgbe: iw_cxgbe tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 31 May 2015 23:47:10 -0000 Author: np Date: Sun May 31 23:47:08 2015 New Revision: 283856 URL: https://svnweb.freebsd.org/changeset/base/283856 Log: MFC r273480, r273750, r273753, r273797, and r274461. r273480: cxgbe/iw_cxgbe: wake up waiters after flushing the qp. r273750: Some cxgbe/iw_cxgbe fixes: - Free rt in c4iw_connect only if it is allocated. - Call soclose instead of so_shutdown if there is an abort from the peer. - Close socket and return failure if TOE is not enabled. r273753: iwcm_event status needs to be populated for close_complete_upcall r273797: Always request a completion for every work request for iWARP. The initial MPA exchange must be tracked this way so that t4_tom's state for the tid is all clean at the time the tid transitions to RDMA mode. Once it does, t4_tom is out of the way and iw_cxgbe uses the qp endpoints directly. r274461: iw_cxgbe: don't forget to close the socket in c4iw_connect if soconnect fails. Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c Sun May 31 23:29:04 2015 (r283855) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c Sun May 31 23:47:08 2015 (r283856) @@ -94,7 +94,7 @@ static void abort_socket(struct c4iw_ep static void send_mpa_req(struct c4iw_ep *ep); static int send_mpa_reject(struct c4iw_ep *ep, const void *pdata, u8 plen); static int send_mpa_reply(struct c4iw_ep *ep, const void *pdata, u8 plen); -static void close_complete_upcall(struct c4iw_ep *ep); +static void close_complete_upcall(struct c4iw_ep *ep, int status); static int abort_connection(struct c4iw_ep *ep); static void peer_close_upcall(struct c4iw_ep *ep); static void peer_abort_upcall(struct c4iw_ep *ep); @@ -366,7 +366,7 @@ process_peer_close(struct c4iw_ep *ep) C4IW_QP_ATTR_NEXT_STATE, &attrs, 1); } close_socket(&ep->com, 0); - close_complete_upcall(ep); + close_complete_upcall(ep, 0); __state_set(&ep->com, DEAD); release = 1; disconnect = 0; @@ -474,7 +474,7 @@ process_conn_error(struct c4iw_ep *ep) if (state != ABORTING) { CTR2(KTR_IW_CXGBE, "%s:pce1 %p", __func__, ep); - close_socket(&ep->com, 0); + close_socket(&ep->com, 1); state_set(&ep->com, DEAD); c4iw_put_ep(&ep->com); } @@ -528,7 +528,7 @@ process_close_complete(struct c4iw_ep *e CTR2(KTR_IW_CXGBE, "%s:pcc4 %p", __func__, ep); close_socket(&ep->com, 0); } - close_complete_upcall(ep); + close_complete_upcall(ep, 0); __state_set(&ep->com, DEAD); release = 1; break; @@ -1206,13 +1206,14 @@ static int send_mpa_reply(struct c4iw_ep -static void close_complete_upcall(struct c4iw_ep *ep) +static void close_complete_upcall(struct c4iw_ep *ep, int status) { struct iw_cm_event event; CTR2(KTR_IW_CXGBE, "%s:ccuB %p", __func__, ep); memset(&event, 0, sizeof(event)); event.event = IW_CM_EVENT_CLOSE; + event.status = status; if (ep->com.cm_id) { @@ -1231,7 +1232,7 @@ static int abort_connection(struct c4iw_ int err; CTR2(KTR_IW_CXGBE, "%s:abB %p", __func__, ep); - close_complete_upcall(ep); + close_complete_upcall(ep, -ECONNRESET); state_set(&ep->com, ABORTING); abort_socket(ep); err = close_socket(&ep->com, 0); @@ -2098,14 +2099,15 @@ int c4iw_connect(struct iw_cm_id *cm_id, CTR2(KTR_IW_CXGBE, "%s:cc7 %p", __func__, ep); printk(KERN_ERR MOD "%s - cannot find route.\n", __func__); err = -EHOSTUNREACH; - goto fail3; + goto fail2; } - - if (!(rt->rt_ifp->if_flags & IFCAP_TOE)) { + if (!(rt->rt_ifp->if_capenable & IFCAP_TOE)) { CTR2(KTR_IW_CXGBE, "%s:cc8 %p", __func__, ep); printf("%s - interface not TOE capable.\n", __func__); + close_socket(&ep->com, 0); + err = -ENOPROTOOPT; goto fail3; } tdev = TOEDEV(rt->rt_ifp); @@ -2126,9 +2128,11 @@ int c4iw_connect(struct iw_cm_id *cm_id, ep->com.thread); if (!err) { - CTR2(KTR_IW_CXGBE, "%s:cca %p", __func__, ep); goto out; + } else { + close_socket(&ep->com, 0); + goto fail2; } fail3: @@ -2225,7 +2229,7 @@ int c4iw_ep_disconnect(struct c4iw_ep *e CTR2(KTR_IW_CXGBE, "%s:ced1 %p", __func__, ep); fatal = 1; - close_complete_upcall(ep); + close_complete_upcall(ep, -EIO); ep->com.state = DEAD; } CTR3(KTR_IW_CXGBE, "%s:ced2 %p %s", __func__, ep, Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c Sun May 31 23:29:04 2015 (r283855) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c Sun May 31 23:47:08 2015 (r283856) @@ -1359,9 +1359,9 @@ err: qhp->ep = NULL; set_state(qhp, C4IW_QP_STATE_ERROR); free = 1; - wake_up(&qhp->wait); BUG_ON(!ep); flush_qp(qhp); + wake_up(&qhp->wait); out: mutex_unlock(&qhp->mutex); Modified: stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Sun May 31 23:29:04 2015 (r283855) +++ stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Sun May 31 23:47:08 2015 (r283856) @@ -769,7 +769,7 @@ t4_push_frames(struct adapter *sc, struc toep->tx_nocompl >= toep->tx_total / 4) compl = 1; - if (compl) { + if (compl || toep->ulp_mode == ULP_MODE_RDMA) { txwr->op_to_immdlen |= htobe32(F_FW_WR_COMPL); toep->tx_nocompl = 0; toep->plen_nocompl = 0; From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 00:09:22 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A8F693; Mon, 1 Jun 2015 00:09:22 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07D9E1E04; Mon, 1 Jun 2015 00:09:22 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5109Lf1077561; Mon, 1 Jun 2015 00:09:21 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5109LIG077560; Mon, 1 Jun 2015 00:09:21 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201506010009.t5109LIG077560@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 1 Jun 2015 00:09: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: r283857 - stable/10/usr.sbin/bsdconfig/share 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 00:09:22 -0000 Author: dteske Date: Mon Jun 1 00:09:21 2015 New Revision: 283857 URL: https://svnweb.freebsd.org/changeset/base/283857 Log: MFC r280921: Fix typo in a comment. Modified: stable/10/usr.sbin/bsdconfig/share/geom.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/share/geom.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/geom.subr Sun May 31 23:47:08 2015 (r283856) +++ stable/10/usr.sbin/bsdconfig/share/geom.subr Mon Jun 1 00:09:21 2015 (r283857) @@ -409,7 +409,7 @@ f_geom_parent() ############################################################ MAIN # -# Parse GEOM configuration unless requeted otherwise +# Parse GEOM configuration unless requested otherwise # f_dprintf "%s: GEOM_SELF_SCAN_ALL=[%s]" geom.subr "$GEOM_SELF_SCAN_ALL" case "$GEOM_SELF_SCAN_ALL" in From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 00:55:16 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 685984B7; Mon, 1 Jun 2015 00:55:16 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5679218C6; Mon, 1 Jun 2015 00:55:16 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t510tGmQ001804; Mon, 1 Jun 2015 00:55:16 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t510tG6K001803; Mon, 1 Jun 2015 00:55:16 GMT (envelope-from np@FreeBSD.org) Message-Id: <201506010055.t510tG6K001803@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 1 Jun 2015 00:55:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283858 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 00:55:16 -0000 Author: np Date: Mon Jun 1 00:55:15 2015 New Revision: 283858 URL: https://svnweb.freebsd.org/changeset/base/283858 Log: cxgbe: set minimum burst size when fetching freelist buffers to 128B. MFC after: 3 days Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Mon Jun 1 00:09:21 2015 (r283857) +++ head/sys/dev/cxgbe/t4_sge.c Mon Jun 1 00:55:15 2015 (r283858) @@ -2665,7 +2665,7 @@ alloc_iq_fl(struct port_info *pi, struct F_FW_IQ_CMD_FL0CONGEN); } c.fl0dcaen_to_fl0cidxfthresh = - htobe16(V_FW_IQ_CMD_FL0FBMIN(X_FETCHBURSTMIN_64B) | + htobe16(V_FW_IQ_CMD_FL0FBMIN(X_FETCHBURSTMIN_128B) | V_FW_IQ_CMD_FL0FBMAX(X_FETCHBURSTMAX_512B)); c.fl0size = htobe16(fl->qsize); c.fl0addr = htobe64(fl->ba); From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 01:06:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1AE96AE; Mon, 1 Jun 2015 01:06:34 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9DEA41ADA; Mon, 1 Jun 2015 01:06:34 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5116YkR006997; Mon, 1 Jun 2015 01:06:34 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5116Ypt006992; Mon, 1 Jun 2015 01:06:34 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201506010106.t5116Ypt006992@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 1 Jun 2015 01:06: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: r283859 - in stable/10/usr.sbin/bsdinstall: distextract distfetch 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 01:06:34 -0000 Author: dteske Date: Mon Jun 1 01:06:33 2015 New Revision: 283859 URL: https://svnweb.freebsd.org/changeset/base/283859 Log: MFC SVN revisions 272278,272379,275874: r272278: Prevent buffer overflow(s) + style(9) nits r272379: Optimize program performance + style(9) nits r275874: Improve feedback to user by using dpv(3) Modified: stable/10/usr.sbin/bsdinstall/distextract/Makefile stable/10/usr.sbin/bsdinstall/distextract/distextract.c stable/10/usr.sbin/bsdinstall/distfetch/distfetch.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/distextract/Makefile ============================================================================== --- stable/10/usr.sbin/bsdinstall/distextract/Makefile Mon Jun 1 00:55:15 2015 (r283858) +++ stable/10/usr.sbin/bsdinstall/distextract/Makefile Mon Jun 1 01:06:33 2015 (r283859) @@ -2,8 +2,8 @@ BINDIR= /usr/libexec/bsdinstall PROG= distextract -DPADD= ${LIBARCHIVE} ${LIBDIALOG} ${LIBM} -LDADD= -larchive -ldialog -lm +DPADD= ${LIBARCHIVE} ${LIBDPV} ${LIBFIGPAR} ${LIBDIALOG} ${LIBM} +LDADD= -larchive -ldpv -lfigpar -ldialog -lm WARNS?= 6 MAN= Modified: stable/10/usr.sbin/bsdinstall/distextract/distextract.c ============================================================================== --- stable/10/usr.sbin/bsdinstall/distextract/distextract.c Mon Jun 1 00:55:15 2015 (r283858) +++ stable/10/usr.sbin/bsdinstall/distextract/distextract.c Mon Jun 1 01:06:33 2015 (r283859) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2011 Nathan Whitehorn + * Copyright (c) 2014 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -22,118 +23,231 @@ * 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 +__FBSDID("$FreeBSD$"); + #include -#include -#include -#include #include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include + +/* Data to process */ +static char *distdir = NULL; +static struct archive *archive = NULL; +static struct dpv_file_node *dists = NULL; + +/* Function prototypes */ +static void sig_int(int sig); +static int count_files(const char *file); +static int extract_files(struct dpv_file_node *file, int out); + +#if __FreeBSD_version <= 1000008 /* r232154: bump for libarchive update */ +#define archive_read_support_filter_all(x) \ + archive_read_support_compression_all(x) +#endif -static int extract_files(int nfiles, const char **files); +#define _errx(...) (end_dialog(), errx(__VA_ARGS__)) int main(void) { - char *diststring; - const char **dists; - int i, retval, ndists = 0; - - if (getenv("DISTRIBUTIONS") == NULL) { - fprintf(stderr, "DISTRIBUTIONS variable is not set\n"); - return (1); - } - - diststring = strdup(getenv("DISTRIBUTIONS")); - for (i = 0; diststring[i] != 0; i++) - if (isspace(diststring[i]) && !isspace(diststring[i+1])) - ndists++; - ndists++; /* Last one */ - - dists = calloc(ndists, sizeof(const char *)); - if (dists == NULL) { - fprintf(stderr, "Out of memory!\n"); - free(diststring); - return (1); - } - - for (i = 0; i < ndists; i++) - dists[i] = strsep(&diststring, " \t"); + char *chrootdir; + char *distributions; + int retval; + size_t config_size = sizeof(struct dpv_config); + size_t file_node_size = sizeof(struct dpv_file_node); + size_t span; + struct dpv_config *config; + struct dpv_file_node *dist = dists; + static char backtitle[] = "FreeBSD Installer"; + static char title[] = "Archive Extraction"; + static char aprompt[] = "\n Overall Progress:"; + static char pprompt[] = "Extracting distribution files...\n"; + struct sigaction act; + char error[PATH_MAX + 512]; + + if ((distributions = getenv("DISTRIBUTIONS")) == NULL) + errx(EXIT_FAILURE, "DISTRIBUTIONS variable is not set"); + if ((distdir = getenv("BSDINSTALL_DISTDIR")) == NULL) + distdir = __DECONST(char *, ""); + /* Initialize dialog(3) */ init_dialog(stdin, stdout); - dialog_vars.backtitle = __DECONST(char *, "FreeBSD Installer"); + dialog_vars.backtitle = backtitle; dlg_put_backtitle(); - if (chdir(getenv("BSDINSTALL_CHROOT")) != 0) { - char error[512]; - sprintf(error, "Could could change to directory %s: %s\n", - getenv("BSDINSTALL_DISTDIR"), strerror(errno)); + dialog_msgbox("", + "Checking distribution archives.\nPlease wait...", 4, 35, FALSE); + + /* + * Parse $DISTRIBUTIONS into dpv(3) linked-list + */ + while (*distributions != '\0') { + span = strcspn(distributions, "\t\n\v\f\r "); + if (span < 1) { /* currently on whitespace */ + distributions++; + continue; + } + + /* Allocate a new struct for the distribution */ + if (dist == NULL) { + if ((dist = calloc(1, file_node_size)) == NULL) + _errx(EXIT_FAILURE, "Out of memory!"); + dists = dist; + } else { + dist->next = calloc(1, file_node_size); + if (dist->next == NULL) + _errx(EXIT_FAILURE, "Out of memory!"); + dist = dist->next; + } + + /* Set path */ + if ((dist->path = malloc(span + 1)) == NULL) + _errx(EXIT_FAILURE, "Out of memory!"); + snprintf(dist->path, span + 1, "%s", distributions); + dist->path[span] = '\0'; + + /* Set display name */ + dist->name = strrchr(dist->path, '/'); + if (dist->name == NULL) + dist->name = dist->path; + + /* Set initial length in files (-1 == error) */ + dist->length = count_files(dist->path); + if (dist->length < 0) { + end_dialog(); + return (EXIT_FAILURE); + } + + distributions += span; + } + + /* Optionally chdir(2) into $BSDINSTALL_CHROOT */ + chrootdir = getenv("BSDINSTALL_CHROOT"); + if (chrootdir != NULL && chdir(chrootdir) != 0) { + snprintf(error, sizeof(error), + "Could not change to directory %s: %s\n", + chrootdir, strerror(errno)); dialog_msgbox("Error", error, 0, 0, TRUE); end_dialog(); - return (1); + return (EXIT_FAILURE); } - retval = extract_files(ndists, dists); - + /* Set cleanup routine for Ctrl-C action */ + act.sa_handler = sig_int; + sigaction(SIGINT, &act, 0); + + /* + * Hand off to dpv(3) + */ + if ((config = calloc(1, config_size)) == NULL) + _errx(EXIT_FAILURE, "Out of memory!"); + config->backtitle = backtitle; + config->title = title; + config->pprompt = pprompt; + config->aprompt = aprompt; + config->options |= DPV_WIDE_MODE; + config->label_size = -1; + config->action = extract_files; + config->status_solo = + "%10lli files read @ %'9.1f files/sec."; + config->status_many = + "%10lli files read @ %'9.1f files/sec. [%i/%i busy/wait]"; end_dialog(); + retval = dpv(config, dists); - free(diststring); - free(dists); + dpv_free(); + while ((dist = dists) != NULL) { + dists = dist->next; + if (dist->path != NULL) + free(dist->path); + free(dist); + } return (retval); } +static void +sig_int(int sig __unused) +{ + dpv_interrupt = TRUE; +} + +/* + * Returns number of files in archive file. Parses $BSDINSTALL_DISTDIR/MANIFEST + * if it exists, otherwise uses archive(3) to read the archive file. + */ static int count_files(const char *file) { - struct archive *archive; - struct archive_entry *entry; static FILE *manifest = NULL; - char path[MAXPATHLEN]; - char errormsg[512]; - int file_count, err; + char *p; + int file_count; + int retval; + size_t span; + struct archive_entry *entry; + char line[512]; + char path[PATH_MAX]; + char errormsg[PATH_MAX + 512]; if (manifest == NULL) { - sprintf(path, "%s/MANIFEST", getenv("BSDINSTALL_DISTDIR")); + snprintf(path, sizeof(path), "%s/MANIFEST", distdir); manifest = fopen(path, "r"); } if (manifest != NULL) { - char line[512]; - char *tok1, *tok2; - rewind(manifest); while (fgets(line, sizeof(line), manifest) != NULL) { - tok2 = line; - tok1 = strsep(&tok2, "\t"); - if (tok1 == NULL || strcmp(tok1, file) != 0) + p = &line[0]; + span = strcspn(p, "\t") ; + if (span < 1 || strncmp(p, file, span) != 0) continue; /* * We're at the right manifest line. The file count is * in the third element */ - tok1 = strsep(&tok2, "\t"); - tok1 = strsep(&tok2, "\t"); - if (tok1 != NULL) - return atoi(tok1); + span = strcspn(p += span + (*p != '\0' ? 1 : 0), "\t"); + span = strcspn(p += span + (*p != '\0' ? 1 : 0), "\t"); + if (span > 0) { + file_count = (int)strtol(p, (char **)NULL, 10); + if (file_count == 0 && errno == EINVAL) + continue; + return (file_count); + } } } - /* Either we didn't have a manifest, or this archive wasn't there */ - archive = archive_read_new(); + /* + * Either no manifest, or manifest didn't mention this archive. + * Use archive(3) to read the archive, counting files within. + */ + if ((archive = archive_read_new()) == NULL) { + snprintf(errormsg, sizeof(errormsg), + "Error: %s\n", archive_error_string(NULL)); + dialog_msgbox("Extract Error", errormsg, 0, 0, TRUE); + return (-1); + } archive_read_support_format_all(archive); archive_read_support_filter_all(archive); - sprintf(path, "%s/%s", getenv("BSDINSTALL_DISTDIR"), file); - err = archive_read_open_filename(archive, path, 4096); - if (err != ARCHIVE_OK) { + snprintf(path, sizeof(path), "%s/%s", distdir, file); + retval = archive_read_open_filename(archive, path, 4096); + if (retval != ARCHIVE_OK) { snprintf(errormsg, sizeof(errormsg), "Error while extracting %s: %s\n", file, archive_error_string(archive)); dialog_msgbox("Extract Error", errormsg, 0, 0, TRUE); + archive = NULL; return (-1); } @@ -141,101 +255,75 @@ count_files(const char *file) while (archive_read_next_header(archive, &entry) == ARCHIVE_OK) file_count++; archive_read_free(archive); + archive = NULL; return (file_count); } static int -extract_files(int nfiles, const char **files) +extract_files(struct dpv_file_node *file, int out __unused) { - const char *items[nfiles*2]; - char path[PATH_MAX]; - int archive_files[nfiles]; - int total_files, current_files, archive_file; - struct archive *archive; + int retval; struct archive_entry *entry; - char errormsg[512]; - char status[8]; - int i, err, progress, last_progress; - - err = 0; - progress = 0; - - /* Make the transfer list for dialog */ - for (i = 0; i < nfiles; i++) { - items[i*2] = strrchr(files[i], '/'); - if (items[i*2] != NULL) - items[i*2]++; - else - items[i*2] = files[i]; - items[i*2 + 1] = "Pending"; - } - - dialog_msgbox("", - "Checking distribution archives.\nPlease wait...", 0, 0, FALSE); + char path[PATH_MAX]; + char errormsg[PATH_MAX + 512]; - /* Count all the files */ - total_files = 0; - for (i = 0; i < nfiles; i++) { - archive_files[i] = count_files(files[i]); - if (archive_files[i] < 0) + /* Open the archive if necessary */ + if (archive == NULL) { + if ((archive = archive_read_new()) == NULL) { + snprintf(errormsg, sizeof(errormsg), + "Error: %s\n", archive_error_string(NULL)); + dialog_msgbox("Extract Error", errormsg, 0, 0, TRUE); + dpv_abort = 1; return (-1); - total_files += archive_files[i]; - } - - current_files = 0; - - for (i = 0; i < nfiles; i++) { - archive = archive_read_new(); + } archive_read_support_format_all(archive); archive_read_support_filter_all(archive); - sprintf(path, "%s/%s", getenv("BSDINSTALL_DISTDIR"), files[i]); - err = archive_read_open_filename(archive, path, 4096); - - items[i*2 + 1] = "In Progress"; - archive_file = 0; - - while ((err = archive_read_next_header(archive, &entry)) == - ARCHIVE_OK) { - last_progress = progress; - progress = (current_files*100)/total_files; - - sprintf(status, "-%d", - (archive_file*100)/archive_files[i]); - items[i*2 + 1] = status; - - if (progress > last_progress) - dialog_mixedgauge("Archive Extraction", - "Extracting distribution files...", 0, 0, - progress, nfiles, - __DECONST(char **, items)); - - err = archive_read_extract(archive, entry, - ARCHIVE_EXTRACT_TIME | ARCHIVE_EXTRACT_OWNER | - ARCHIVE_EXTRACT_PERM | ARCHIVE_EXTRACT_ACL | - ARCHIVE_EXTRACT_XATTR | ARCHIVE_EXTRACT_FFLAGS); - - if (err != ARCHIVE_OK) - break; - - archive_file++; - current_files++; - } - - items[i*2 + 1] = "Done"; - - if (err != ARCHIVE_EOF) { + snprintf(path, sizeof(path), "%s/%s", distdir, file->path); + retval = archive_read_open_filename(archive, path, 4096); + if (retval != 0) { snprintf(errormsg, sizeof(errormsg), - "Error while extracting %s: %s\n", items[i*2], + "Error opening %s: %s\n", file->name, archive_error_string(archive)); - items[i*2 + 1] = "Failed"; - dialog_msgbox("Extract Error", errormsg, 0, 0, - TRUE); - return (err); + dialog_msgbox("Extract Error", errormsg, 0, 0, TRUE); + file->status = DPV_STATUS_FAILED; + dpv_abort = 1; + return (-1); } + } + /* Read the next archive header */ + retval = archive_read_next_header(archive, &entry); + + /* If that went well, perform the extraction */ + if (retval == ARCHIVE_OK) + retval = archive_read_extract(archive, entry, + ARCHIVE_EXTRACT_TIME | ARCHIVE_EXTRACT_OWNER | + ARCHIVE_EXTRACT_PERM | ARCHIVE_EXTRACT_ACL | + ARCHIVE_EXTRACT_XATTR | ARCHIVE_EXTRACT_FFLAGS); + + /* Test for either EOF or error */ + if (retval == ARCHIVE_EOF) { archive_read_free(archive); + archive = NULL; + file->status = DPV_STATUS_DONE; + return (100); + } else if (retval != ARCHIVE_OK) { + snprintf(errormsg, sizeof(errormsg), + "Error while extracting %s: %s\n", file->name, + archive_error_string(archive)); + dialog_msgbox("Extract Error", errormsg, 0, 0, TRUE); + file->status = DPV_STATUS_FAILED; + dpv_abort = 1; + return (-1); } - return (0); + dpv_overall_read++; + file->read++; + + /* Calculate [overall] percentage of completion (if possible) */ + if (file->length >= 0) + return (file->read * 100 / file->length); + else + return (-1); } Modified: stable/10/usr.sbin/bsdinstall/distfetch/distfetch.c ============================================================================== --- stable/10/usr.sbin/bsdinstall/distfetch/distfetch.c Mon Jun 1 00:55:15 2015 (r283858) +++ stable/10/usr.sbin/bsdinstall/distfetch/distfetch.c Mon Jun 1 01:06:33 2015 (r283859) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2011 Nathan Whitehorn + * Copyright (c) 2014 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -22,15 +23,21 @@ * 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 +__FBSDID("$FreeBSD$"); + #include -#include +#include +#include +#include #include #include -#include +#include +#include +#include +#include static int fetch_files(int nfiles, char **urls); @@ -39,12 +46,13 @@ main(void) { char *diststring; char **urls; - int i, nfetched, ndists = 0; + int i; + int ndists = 0; + int nfetched; + char error[PATH_MAX + 512]; - if (getenv("DISTRIBUTIONS") == NULL) { - fprintf(stderr, "DISTRIBUTIONS variable is not set\n"); - return (1); - } + if (getenv("DISTRIBUTIONS") == NULL) + errx(EXIT_FAILURE, "DISTRIBUTIONS variable is not set"); diststring = strdup(getenv("DISTRIBUTIONS")); for (i = 0; diststring[i] != 0; i++) @@ -54,9 +62,8 @@ main(void) urls = calloc(ndists, sizeof(const char *)); if (urls == NULL) { - fprintf(stderr, "Out of memory!\n"); free(diststring); - return (1); + errx(EXIT_FAILURE, "Out of memory!"); } init_dialog(stdin, stdout); @@ -65,17 +72,17 @@ main(void) for (i = 0; i < ndists; i++) { urls[i] = malloc(PATH_MAX); - sprintf(urls[i], "%s/%s", getenv("BSDINSTALL_DISTSITE"), - strsep(&diststring, " \t")); + snprintf(urls[i], PATH_MAX, "%s/%s", + getenv("BSDINSTALL_DISTSITE"), strsep(&diststring, " \t")); } if (chdir(getenv("BSDINSTALL_DISTDIR")) != 0) { - char error[512]; - sprintf(error, "Could could change to directory %s: %s\n", + snprintf(error, sizeof(error), + "Could could change to directory %s: %s\n", getenv("BSDINSTALL_DISTDIR"), strerror(errno)); dialog_msgbox("Error", error, 0, 0, TRUE); end_dialog(); - return (1); + return (EXIT_FAILURE); } nfetched = fetch_files(ndists, urls); @@ -87,31 +94,32 @@ main(void) free(urls[i]); free(urls); - return ((nfetched == ndists) ? 0 : 1); + return ((nfetched == ndists) ? EXIT_SUCCESS : EXIT_FAILURE); } static int fetch_files(int nfiles, char **urls) { + FILE *fetch_out; + FILE *file_out; const char **items; - FILE *fetch_out, *file_out; - struct url_stat ustat; - off_t total_bytes, current_bytes, fsize; + int i; + int last_progress; + int nsuccess = 0; /* Number of files successfully downloaded */ + int progress = 0; + size_t chunk; + off_t current_bytes; + off_t fsize; + off_t total_bytes; char status[8]; - char errormsg[512]; + struct url_stat ustat; + char errormsg[PATH_MAX + 512]; uint8_t block[4096]; - size_t chunk; - int i, progress, last_progress; - int nsuccess = 0; /* Number of files successfully downloaded */ - progress = 0; - /* Make the transfer list for dialog */ items = calloc(sizeof(char *), nfiles * 2); - if (items == NULL) { - fprintf(stderr, "Out of memory!\n"); - return (-1); - } + if (items == NULL) + errx(EXIT_FAILURE, "Out of memory!"); for (i = 0; i < nfiles; i++) { items[i*2] = strrchr(urls[i], '/'); @@ -177,7 +185,8 @@ fetch_files(int nfiles, char **urls) } if (ustat.size > 0) { - sprintf(status, "-%jd", (fsize*100)/ustat.size); + snprintf(status, sizeof(status), "-%jd", + (fsize*100)/ustat.size); items[i*2 + 1] = status; } @@ -212,4 +221,3 @@ fetch_files(int nfiles, char **urls) free(items); return (nsuccess); } - From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 01:31:51 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 358E94CE; Mon, 1 Jun 2015 01:31:51 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 230CF105C; Mon, 1 Jun 2015 01:31:51 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t511VpXO022506; Mon, 1 Jun 2015 01:31:51 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t511VoXL022505; Mon, 1 Jun 2015 01:31:51 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201506010131.t511VoXL022505@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 1 Jun 2015 01:31: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: r283860 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 01:31:51 -0000 Author: dteske Date: Mon Jun 1 01:31:50 2015 New Revision: 283860 URL: https://svnweb.freebsd.org/changeset/base/283860 Log: MFC SVN revisions 280234-280235: r280234: Fix the handbook install option in bsdinstall (allanjude) r280235: Fixup to previous (allanjude) Modified: stable/10/usr.sbin/bsdinstall/scripts/docsinstall Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/docsinstall ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/docsinstall Mon Jun 1 01:06:33 2015 (r283859) +++ stable/10/usr.sbin/bsdinstall/scripts/docsinstall Mon Jun 1 01:31:50 2015 (r283860) @@ -154,10 +154,13 @@ f_quietly cp -f $BSDINSTALL_TMPETC/resol # # Install each of the selected packages # +docsets="" for lang in $selected; do - f_package_add $lang-freebsd-doc || return $FAILURE + docsets="$docsets $lang-freebsd-doc" done +ASSUME_ALWAYS_YES=YES chroot $BSDINSTALL_CHROOT pkg install $docsets || return $FAILURE + ################################################################################ # END ################################################################################ From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 01:50:10 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B0C7A2E; Mon, 1 Jun 2015 01:50:10 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CE6213B2; Mon, 1 Jun 2015 01:50:10 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t511oA6P029015; Mon, 1 Jun 2015 01:50:10 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t511oAFd029014; Mon, 1 Jun 2015 01:50:10 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201506010150.t511oAFd029014@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 1 Jun 2015 01:50: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: r283861 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 01:50:10 -0000 Author: dteske Date: Mon Jun 1 01:50:09 2015 New Revision: 283861 URL: https://svnweb.freebsd.org/changeset/base/283861 Log: MFC SVN revisions 280310-280311,281160,281167,282443,283023,283288: r280310: Whitespace cleanup(s) r280311: Update copyright(s) r281160: [mergeinfo only] Fix root encryption key permissions (see r281230) r281167: [mergeinfo only] Unbreak ZFS+GELI install option (see r281230) r282443: Add swap size sanity check (allanjude) r283023: Skip adding swap to fstab(5) if unused (allanjude) r283288: Fix a syntax error (allanjude) Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/zfsboot Mon Jun 1 01:31:50 2015 (r283860) +++ stable/10/usr.sbin/bsdinstall/scripts/zfsboot Mon Jun 1 01:50:09 2015 (r283861) @@ -1,7 +1,7 @@ #!/bin/sh #- -# Copyright (c) 2013 Allan Jude -# Copyright (c) 2013 Devin Teske +# Copyright (c) 2013-2014 Allan Jude +# Copyright (c) 2013-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -287,10 +287,12 @@ msg_stripe_desc="Stripe - No Redundancy" msg_stripe_help="[1+ Disks] Striping provides maximum storage but no redundancy" msg_swap_encrypt="Encrypt Swap?" msg_swap_encrypt_help="Encrypt swap partitions with temporary keys, discarded on reboot" +msg_swap_invalid="The selected swap size (%s) is invalid. Enter a number optionally followed by units. Example: 2G" msg_swap_mirror="Mirror Swap?" msg_swap_mirror_help="Mirror swap partitions for redundancy, breaks crash dumps" msg_swap_size="Swap Size" msg_swap_size_help="Customize how much swap space is allocated to each selected disk" +msg_swap_toosmall="The selected swap size (%s) is to small. Please enter a value greater than 100MB or enter 0 for no swap" msg_these_disks_are_too_small="These disks are too small given the amount of requested\nswap (%s) and/or geli(8) (%s) partitions, which would\ntake 50%% or more of each of the following selected disk\ndevices (not recommended):\n\n %s\n\nRecommend changing partition size(s) and/or selecting a\ndifferent set of devices." msg_uefi_not_supported="The FreeBSD UEFI loader does not currently support booting root-on-ZFS. Your system will need to boot in legacy (CSM) mode.\nDo you want to continue?" msg_unable_to_get_disk_capacity="Unable to get disk capacity of \`%s'" @@ -320,31 +322,34 @@ dialog_menu_main() [ "$ZFSBOOT_SWAP_MIRROR" ] && swapmirror="$msg_yes" local disks n disks_grammar f_count n $ZFSBOOT_DISKS - { [ $n -eq 1 ] && disks_grammar=$msg_disk_singular; } || + { [ $n -eq 1 ] && disks_grammar=$msg_disk_singular; } || disks_grammar=$msg_disk_plural # grammar local menu_list=" - '>>> $msg_install' '$msg_install_desc' - '$msg_install_help' - 'T $msg_pool_type_disks' '$ZFSBOOT_VDEV_TYPE: $n $disks_grammar' - '$msg_pool_type_disks_help' - '- $msg_rescan_devices' '*' - '$msg_rescan_devices_help' - '- $msg_disk_info' '*' - '$msg_disk_info_help' - 'N $msg_pool_name' '$ZFSBOOT_POOL_NAME' - '$msg_pool_name_help' - '4 $msg_force_4k_sectors' '$force4k' - '$msg_force_4k_sectors_help' - 'E $msg_encrypt_disks' '$usegeli' - '$msg_encrypt_disks_help' - 'P $msg_partition_scheme' '$ZFSBOOT_PARTITION_SCHEME' - '$msg_partition_scheme_help' - 'S $msg_swap_size' '$ZFSBOOT_SWAP_SIZE' - '$msg_swap_size_help' - 'M $msg_swap_mirror' '$swapmirror' - '$msg_swap_mirror_help' - 'W $msg_swap_encrypt' '$swapgeli' - '$msg_swap_encrypt_help' + '>>> $msg_install' '$msg_install_desc' + '$msg_install_help' + 'T $msg_pool_type_disks' + '$ZFSBOOT_VDEV_TYPE: $n $disks_grammar' + '$msg_pool_type_disks_help' + '- $msg_rescan_devices' '*' + '$msg_rescan_devices_help' + '- $msg_disk_info' '*' + '$msg_disk_info_help' + 'N $msg_pool_name' '$ZFSBOOT_POOL_NAME' + '$msg_pool_name_help' + '4 $msg_force_4k_sectors' + '$force4k' + '$msg_force_4k_sectors_help' + 'E $msg_encrypt_disks' '$usegeli' + '$msg_encrypt_disks_help' + 'P $msg_partition_scheme' + '$ZFSBOOT_PARTITION_SCHEME' + '$msg_partition_scheme_help' + 'S $msg_swap_size' '$ZFSBOOT_SWAP_SIZE' + '$msg_swap_size_help' + 'M $msg_swap_mirror' '$swapmirror' + '$msg_swap_mirror_help' + 'W $msg_swap_encrypt' '$swapgeli' + '$msg_swap_encrypt_help' " # END-QUOTE local defaultitem= # Calculated below local hline="$hline_alnum_arrows_punc_tab_enter" @@ -937,17 +942,19 @@ zfs_create_diskpart() # 5. Add freebsd-zfs partition for zroot # f_eval_catch $funcname gpart "$GPART_ADD_INDEX" \ - $mbrindex freebsd-zfs ${disk}s1 || return $FAILURE + $mbrindex freebsd-zfs ${disk}s1 || return $FAILURE f_eval_catch -d $funcname zpool "$ZPOOL_LABELCLEAR_F" \ - /dev/$disk$targetpart # Pedantic + /dev/$disk$targetpart # Pedantic f_eval_catch $funcname dd "$DD_WITH_OPTIONS" \ - /boot/zfsboot /dev/${disk}s1 count=1 || - return $FAILURE + /boot/zfsboot /dev/${disk}s1 count=1 || + return $FAILURE ;; esac # $ZFSBOOT_PARTITION_SCHEME # Update fstab(5) + local swapsize + f_expand_number "$ZFSBOOT_SWAP_SIZE" swapsize if [ "$isswapmirror" ]; then # This is not the first disk in the mirror, do nothing elif [ "$ZFSBOOT_SWAP_ENCRYPTION" -a "$ZFSBOOT_SWAP_MIRROR" ]; then @@ -967,6 +974,8 @@ zfs_create_diskpart() /dev/$disk${swappart}.eli none swap sw 0 0 \ $BSDINSTALL_TMPETC/fstab || return $FAILURE + elif [ ${swapsize:-0} -eq 0 ]; then + # If swap is 0 sized, don't add it to fstab else f_eval_catch $funcname printf "$PRINTF_FSTAB" \ /dev/$disk$swappart none swap sw 0 0 \ @@ -1123,7 +1132,7 @@ zfs_create_boot() if [ "$ZFSBOOT_GELI_ENCRYPTION" ]; then # Generate an encryption key using random(4) f_eval_catch $funcname dd "$DD_WITH_OPTIONS" \ - /dev/random "$bootpool/$zroot_key" \ + /dev/random "$bootpool/$zroot_key" \ "bs=4096 count=1" || return $FAILURE f_eval_catch $funcname chmod "$CHMOD_MODE" \ go-wrx "$bootpool/$zroot_key" || @@ -1180,6 +1189,7 @@ zfs_create_boot() return $FAILURE f_eval_catch -d $funcname umount "$UMOUNT" /mnt # tmpfs fi + # # Create the gmirror(8) GEOMS for swap # @@ -1260,7 +1270,7 @@ zfs_create_boot() # MBR boot loader touch-up if [ "$ZFSBOOT_PARTITION_SCHEME" = "MBR" ]; then f_dprintf "$funcname: Updating MBR boot loader on disks..." - # Stick the ZFS boot loader in the "convienient hole" after + # Stick the ZFS boot loader in the "convienient hole" after # the ZFS internal metadata for disk in $disks; do f_eval_catch $funcname dd "$DD_WITH_OPTIONS" \ @@ -1299,8 +1309,10 @@ zfs_create_boot() $BSDINSTALL_TMPBOOT/loader.conf.zfs || return $FAILURE if [ "$ZFSBOOT_SWAP_MIRROR" ]; then - f_eval_catch $funcname echo "$ECHO_APPEND" 'geom_mirror_load=\"YES\"' \ - $BSDINSTALL_TMPBOOT/loader.conf.gmirror || return $FAILURE + f_eval_catch $funcname echo "$ECHO_APPEND" \ + 'geom_mirror_load=\"YES\"' \ + $BSDINSTALL_TMPBOOT/loader.conf.gmirror || + return $FAILURE fi # We're all done unless we should go on for boot pool @@ -1323,8 +1335,8 @@ zfs_create_boot() return $FAILURE done f_eval_catch $funcname printf "$PRINTF_CONF" vfs.root.mountfrom \ - "\"zfs:$zroot_name/$zroot_bootfs\"" \ - $BSDINSTALL_TMPBOOT/loader.conf.root || return $FAILURE + "\"zfs:$zroot_name/$zroot_bootfs\"" \ + $BSDINSTALL_TMPBOOT/loader.conf.root || return $FAILURE # We're all done unless we should go on to do encryption [ "$ZFSBOOT_GELI_ENCRYPTION" ] || return $SUCCESS @@ -1334,9 +1346,9 @@ zfs_create_boot() # f_dprintf "$funcname: Configuring disk encryption..." f_eval_catch $funcname echo "$ECHO_APPEND" 'aesni_load=\"YES\"' \ - $BSDINSTALL_TMPBOOT/loader.conf.aesni || return $FAILURE + $BSDINSTALL_TMPBOOT/loader.conf.aesni || return $FAILURE f_eval_catch $funcname echo "$ECHO_APPEND" 'geom_eli_load=\"YES\"' \ - $BSDINSTALL_TMPBOOT/loader.conf.geli || return $FAILURE + $BSDINSTALL_TMPBOOT/loader.conf.geli || return $FAILURE f_eval_catch $funcname echo "$ECHO_APPEND" \ 'geom_eli_passphrase_prompt=\"YES\"' \ $BSDINSTALL_TMPBOOT/loader.conf.geli || return $FAILURE @@ -1410,14 +1422,14 @@ f_dprintf "FSTAB_FMT=[%s]" "$FSTAB_FMT" # ZFS with UEFI yet # if f_interactive; then - bootmethod=$(sysctl -n machdep.bootmethod) - f_dprintf "machdep.bootmethod=[%s]" "$bootmethod" - if [ "$bootmethod" != "BIOS" ]; then - dialog_uefi_prompt - retval=$? - f_dprintf "uefi_prompt=[%s]" "$retval" - [ $retval -eq $DIALOG_OK ] || f_die - fi + bootmethod=$( sysctl -n machdep.bootmethod ) + f_dprintf "machdep.bootmethod=[%s]" "$bootmethod" + if [ "$bootmethod" != "BIOS" ]; then + dialog_uefi_prompt + retval=$? + f_dprintf "uefi_prompt=[%s]" "$retval" + [ $retval -eq $DIALOG_OK ] || f_die + fi fi # @@ -1548,10 +1560,26 @@ while :; do ;; ?" $msg_swap_size") # Prompt the user to input/change the swap size for each disk - f_dialog_input input \ - "$msg_please_enter_amount_of_swap_space" \ - "$ZFSBOOT_SWAP_SIZE" && - ZFSBOOT_SWAP_SIZE="${input:-0}" + while :; do + f_dialog_input input \ + "$msg_please_enter_amount_of_swap_space" \ + "$ZFSBOOT_SWAP_SIZE" && + ZFSBOOT_SWAP_SIZE="${input:-0}" + if f_expand_number "$ZFSBOOT_SWAP_SIZE" swapsize + then + if [ $swapsize -ne 0 -a $swapsize -lt 104857600 ]; then + f_show_err "$msg_swap_toosmall" \ + "$ZFSBOOT_SWAP_SIZE" + continue; + else + break; + fi + else + f_show_err "$msg_swap_invalid" \ + "$ZFSBOOT_SWAP_SIZE" + continue; + fi + done ;; ?" $msg_swap_mirror") # Toggle the variable referenced both by the menu and later From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 01:54:22 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 456AAB9B; Mon, 1 Jun 2015 01:54:22 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19DBC1619; Mon, 1 Jun 2015 01:54:22 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t511sL9p033141; Mon, 1 Jun 2015 01:54:21 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t511sLmq033140; Mon, 1 Jun 2015 01:54:21 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201506010154.t511sLmq033140@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 1 Jun 2015 01:54: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: r283862 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 01:54:22 -0000 Author: dteske Date: Mon Jun 1 01:54:21 2015 New Revision: 283862 URL: https://svnweb.freebsd.org/changeset/base/283862 Log: MFC SVN mergeinfo for revisions 263638,263768 (reduce eligible merges): r263638: Create a root dataset (bdrewery) r263768: Revert the above (bdrewery) Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 02:06:58 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60640D74; Mon, 1 Jun 2015 02:06:58 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F2EA1843; Mon, 1 Jun 2015 02:06:58 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5126win038642; Mon, 1 Jun 2015 02:06:58 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5126w7m038641; Mon, 1 Jun 2015 02:06:58 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201506010206.t5126w7m038641@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 1 Jun 2015 02:06:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283863 - head/lib/libdpv 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 02:06:58 -0000 Author: dteske Date: Mon Jun 1 02:06:57 2015 New Revision: 283863 URL: https://svnweb.freebsd.org/changeset/base/283863 Log: Fix a debug statement. Only the callback function (performing the incrementing of dpv_overall_oread) knows what its purpose is (and often times it was bytes, not lines). MFC after: 3 days X-MFC-to: stable/10 Modified: head/lib/libdpv/dpv.c Modified: head/lib/libdpv/dpv.c ============================================================================== --- head/lib/libdpv/dpv.c Mon Jun 1 01:54:21 2015 (r283862) +++ head/lib/libdpv/dpv.c Mon Jun 1 02:06:57 2015 (r283863) @@ -692,7 +692,7 @@ dpv(struct dpv_config *config, struct dp if (!dpv_interrupt) printf("\n"); } else - warnx("%s: %lli lines read", __func__, dpv_overall_read); + warnx("%s: %lli overall read", __func__, dpv_overall_read); if (dpv_interrupt || dpv_abort) return (-1); From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 03:24:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ADBC06EF; Mon, 1 Jun 2015 03:24:40 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CA2A1B05; Mon, 1 Jun 2015 03:24:40 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t513Oelj078373; Mon, 1 Jun 2015 03:24:40 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t513OePZ078372; Mon, 1 Jun 2015 03:24:40 GMT (envelope-from np@FreeBSD.org) Message-Id: <201506010324.t513OePZ078372@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 1 Jun 2015 03:24:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283864 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 03:24:40 -0000 Author: np Date: Mon Jun 1 03:24:39 2015 New Revision: 283864 URL: https://svnweb.freebsd.org/changeset/base/283864 Log: cxgbe: no need to display the per-lane GT/s rating of the pcie link. MFC after: 1 week Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Mon Jun 1 02:06:57 2015 (r283863) +++ head/sys/dev/cxgbe/t4_main.c Mon Jun 1 03:24:39 2015 (r283864) @@ -582,7 +582,6 @@ t4_attach(device_t dev) #ifdef DEV_NETMAP int nm_rqidx, nm_tqidx; #endif - const char *pcie_ts; sc = device_get_softc(dev); sc->dev = dev; @@ -905,25 +904,10 @@ t4_attach(device_t dev) goto done; } - switch (sc->params.pci.speed) { - case 0x1: - pcie_ts = "2.5"; - break; - case 0x2: - pcie_ts = "5.0"; - break; - case 0x3: - pcie_ts = "8.0"; - break; - default: - pcie_ts = "??"; - break; - } device_printf(dev, - "PCIe x%d (%s GTS/s) (%d), %d ports, %d %s interrupt%s, %d eq, %d iq\n", - sc->params.pci.width, pcie_ts, sc->params.pci.speed, - sc->params.nports, sc->intr_count, - sc->intr_type == INTR_MSIX ? "MSI-X" : + "PCIe gen%d x%d, %d ports, %d %s interrupt%s, %d eq, %d iq\n", + sc->params.pci.speed, sc->params.pci.width, sc->params.nports, + sc->intr_count, sc->intr_type == INTR_MSIX ? "MSI-X" : (sc->intr_type == INTR_MSI ? "MSI" : "INTx"), sc->intr_count > 1 ? "s" : "", sc->sge.neq, sc->sge.niq); From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 06:00:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A78D5D05; Mon, 1 Jun 2015 06:00:05 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95BF515BC; Mon, 1 Jun 2015 06:00:05 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t516056K053798; Mon, 1 Jun 2015 06:00:05 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51605uF053797; Mon, 1 Jun 2015 06:00:05 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201506010600.t51605uF053797@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Mon, 1 Jun 2015 06:00:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283867 - head/bin/ps 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 06:00:05 -0000 Author: araujo (ports committer) Date: Mon Jun 1 06:00:04 2015 New Revision: 283867 URL: https://svnweb.freebsd.org/changeset/base/283867 Log: Remove unused variable, this variable fmtstr was introduced at revision r225868 and it is not used anymore after the convertion to use libxo at revision r283304. Differential Revision: D2678 Reviewed by: marcel Modified: head/bin/ps/ps.c Modified: head/bin/ps/ps.c ============================================================================== --- head/bin/ps/ps.c Mon Jun 1 05:56:43 2015 (r283866) +++ head/bin/ps/ps.c Mon Jun 1 06:00:04 2015 (r283867) @@ -180,7 +180,7 @@ main(int argc, char *argv[]) KINFO_STR *ks; struct varent *vent; struct winsize ws = { .ws_row = 0 }; - const char *nlistf, *memf, *fmtstr, *str; + const char *nlistf, *memf, *str; char *cols; int all, ch, elem, flag, _fmt, i, lineno, linelen, left; int descendancy, nentries, nkept, nselectors; @@ -649,11 +649,6 @@ main(int argc, char *argv[]) linelen = 0; xo_open_instance("process"); STAILQ_FOREACH(vent, &varlist, next_ve) { - if (vent->var->flag & LJUST) - fmtstr = "%-*s"; - else - fmtstr = "%*s"; - ks = STAILQ_FIRST(&kinfo[i].ki_ks); STAILQ_REMOVE_HEAD(&kinfo[i].ki_ks, ks_next); /* Truncate rightmost column if necessary. */ From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 05:37:04 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DB2F6BB; Mon, 1 Jun 2015 05:37:04 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 765FF1015; Mon, 1 Jun 2015 05:37:03 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 93B3142157E; Mon, 1 Jun 2015 15:36:59 +1000 (AEST) Date: Mon, 1 Jun 2015 15:36:58 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Baptiste Daroussin cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283842 - head/usr.sbin/pw In-Reply-To: <201505312207.t4VM73Vh015383@svn.freebsd.org> Message-ID: <20150601143951.J863@besplex.bde.org> References: <201505312207.t4VM73Vh015383@svn.freebsd.org> 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=QeFf4Krv c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=xqHopV17G1f5rAXcRQkA:9 a=fZT5EF8Kno1c1QlV:21 a=XF-A_rSnECe766qY:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 05:37:04 -0000 On Sun, 31 May 2015, Baptiste Daroussin wrote: > Log: > Remove useless cast in printf and printf-like functions: > use %u for uid_t and gid_t The cast was not useless. It was to avoid the assumption that the default promotion of uid_t and gid_t is anything in particular. Now it is assumed that the default promotion is unsigned (int works too, but this is subtler). uids and gids are only guaranteed to have non-negative values. In POSIX before about 2001, uid_t and gid_t can be any type that can represent all the values taken on, so can be floating point. Floating point was rarely used for POSIX types, and most programs make too many assumptions about types, so POSIX now requires uid_t and gid_t to be integer types. Then can still be signed integer types IIRC. Nornally it is a bug to print signed integer types with unsigned integer formats, but since uids and gids are guaranteed to be non-negative both formats work. (pids require different handling since they are overloaded to hold process group ids as negative values, so pid_t is signed and %u format is very broken for printing general pids.) The program assumed that uids and gids are not too large to be represented by unsigned long. This was the only way to print them in C90 and before. C99 broke this by breaking the promise that unsigned long is the largest unsigned integer type. This broke all code that does careful casts to unsigned long. However, unsigned long is usually large enough in practice. Careful code now has to cast to uintmax_t, but that is usually excessive (but doesn't actually work for __uint128_t). Even plain unsigned usually works on vaxes. > Modified: > head/usr.sbin/pw/pw_conf.c > head/usr.sbin/pw/pw_group.c > head/usr.sbin/pw/pw_user.c > > Modified: head/usr.sbin/pw/pw_conf.c > ============================================================================== > --- head/usr.sbin/pw/pw_conf.c Sun May 31 21:44:09 2015 (r283841) > +++ head/usr.sbin/pw/pw_conf.c Sun May 31 22:07:03 2015 (r283842) > @@ -453,19 +453,19 @@ write_userconfig(char const * file) > config.default_class : ""); > break; > case _UC_MINUID: > - sbuf_printf(buf, "%lu", (unsigned long) config.min_uid); > + sbuf_printf(buf, "%u", config.min_uid); This works accidentally even on some non-vaxes. All supported arches in FreeBSD have 32-bit unsigned's, and POSIX was broken in about 2007 to disallow 16-bit unsigned's. uid_t is uint32_t in FreeBSD. However, it is planned to change ino_t and some other types to 64 bits. I forget if the plans include uid_t. Even 64-bit ino_t is too large for me. The version with the cast to unsigned long is not really better. Suppose uid_t is expanded to 16 bits. Then without the cast, the size mismatch is detected. With it, everything still works if unsigned long is 64 bits, but if unsigned long is 32 bits then the cast just breaks detection of the mismatch and gives wrong results for values that actually need 64 bits. > Modified: head/usr.sbin/pw/pw_group.c > ============================================================================== > --- head/usr.sbin/pw/pw_group.c Sun May 31 21:44:09 2015 (r283841) > +++ head/usr.sbin/pw/pw_group.c Sun May 31 22:07:03 2015 (r283842) > @@ -83,7 +83,7 @@ pw_group(struct userconf * cnf, int mode > gid_t next = gr_gidpolicy(cnf, args); > if (getarg(args, 'q')) > return next; > - printf("%ld\n", (long)next); > + printf("%u\n", next); > return EXIT_SUCCESS; > } > This also has sign changes. gids are supposed to be non-negative, so using signed long was probably a bug. However, the program is elsewhere clueless about types, and I think you did't change the parts where it uses atol() to misparse input. atol() can't even handle 32-bit uids on 32-bit arches. It truncates large positive ones to LONG_MAX. It returns negative values (truncated to LONG_MIN if necessary). The misparsing then doesn't detect the error of negative ids, but blindly casts to uid_t or gid_t, of course using lexical style bugs in the casts. The magic ids -1 and -2 are sometimes needed (perhaps not as input in pw, but -1 is used as an error value and this value can be input). These values don't really exist as ids. They must be cast before use. The actual values just cannot be entered, since atol() misparses them (it truncates large values, and also doesn't support hex, so (uid_t)-2 must be written as a long decimal number to input it for misparsing. > @@ -137,7 +137,7 @@ pw_group(struct userconf * cnf, int mode > else if (rc != 0) { > err(EX_IOERR, "group update"); > } > - pw_log(cnf, mode, W_GROUP, "%s(%ld) removed", a_name->val, (long) gid); > + pw_log(cnf, mode, W_GROUP, "%s(%u) removed", a_name->val, gid); > return EXIT_SUCCESS; > } else if (mode == M_PRINT) > return print_group(grp, getarg(args, 'P') != NULL); If the error gid (gid_t)-1 is ever printed, now %u format prints it as a cryptic decimal number where %ld format printed it as -1. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 06:05:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC12DF48; Mon, 1 Jun 2015 06:05:53 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA2F117A1; Mon, 1 Jun 2015 06:05:53 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5165rhJ057841; Mon, 1 Jun 2015 06:05:53 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5165rio057840; Mon, 1 Jun 2015 06:05:53 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201506010605.t5165rio057840@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Mon, 1 Jun 2015 06:05:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283868 - head/lib/libprocstat 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 06:05:54 -0000 Author: araujo (ports committer) Date: Mon Jun 1 06:05:53 2015 New Revision: 283868 URL: https://svnweb.freebsd.org/changeset/base/283868 Log: Remove unused variable spotted by clang. Differential Revision: D2685 Reviewed by: rodrigc, stas Modified: head/lib/libprocstat/libprocstat.c Modified: head/lib/libprocstat/libprocstat.c ============================================================================== --- head/lib/libprocstat/libprocstat.c Mon Jun 1 06:00:04 2015 (r283867) +++ head/lib/libprocstat/libprocstat.c Mon Jun 1 06:05:53 2015 (r283868) @@ -1235,7 +1235,7 @@ procstat_get_vnode_info_kvm(kvm_t *kd, s struct vnode vnode; char tagstr[12]; void *vp; - int error, found; + int error; unsigned int i; assert(kd); @@ -1264,7 +1264,7 @@ procstat_get_vnode_info_kvm(kvm_t *kd, s /* * Find appropriate handler. */ - for (i = 0, found = 0; i < NTYPES; i++) + for (i = 0; i < NTYPES; i++) if (!strcmp(fstypes[i].tag, tagstr)) { if (fstypes[i].handler(kd, &vnode, vn) != 0) { goto fail; From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 06:14:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CF28209; Mon, 1 Jun 2015 06:14:18 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF35619CC; Mon, 1 Jun 2015 06:14:17 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t516EHwf062794; Mon, 1 Jun 2015 06:14:17 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t516EHBC062793; Mon, 1 Jun 2015 06:14:17 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201506010614.t516EHBC062793@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Mon, 1 Jun 2015 06:14:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283869 - head/contrib/diff/src 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 06:14:18 -0000 Author: araujo (ports committer) Date: Mon Jun 1 06:14:17 2015 New Revision: 283869 URL: https://svnweb.freebsd.org/changeset/base/283869 Log: Fix the wrong format, format specifies type 'int' but the argument has type 'long', it was spotted by clang. Differential Revision: D2663 Reviewed by: imp, rodrigc Modified: head/contrib/diff/src/context.c Modified: head/contrib/diff/src/context.c ============================================================================== --- head/contrib/diff/src/context.c Mon Jun 1 06:05:53 2015 (r283868) +++ head/contrib/diff/src/context.c Mon Jun 1 06:14:17 2015 (r283869) @@ -62,7 +62,7 @@ print_context_label (char const *mark, { time_t sec = inf->stat.st_mtime; verify (info_preserved, sizeof inf->stat.st_mtime <= sizeof sec); - sprintf (buf, "%jd.%.9d", (intmax_t)sec, nsec); + sprintf (buf, "%jd.%.9ld", (intmax_t)sec, nsec); } fprintf (outfile, "%s %s\t%s\n", mark, inf->name, buf); } From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 06:56:50 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2CABC67; Mon, 1 Jun 2015 06:56:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A00F11333; Mon, 1 Jun 2015 06:56:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t516uoxe082417; Mon, 1 Jun 2015 06:56:50 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t516uovT082416; Mon, 1 Jun 2015 06:56:50 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201506010656.t516uovT082416@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 1 Jun 2015 06:56: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: r283872 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 06:56:50 -0000 Author: kib Date: Mon Jun 1 06:56:49 2015 New Revision: 283872 URL: https://svnweb.freebsd.org/changeset/base/283872 Log: MFC r283515: Remove excess Giant acquisition around the dounmount() call. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Jun 1 06:54:21 2015 (r283871) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Jun 1 06:56:49 2015 (r283872) @@ -3481,9 +3481,7 @@ zfs_unmount_snap(const char *snapname) #ifdef illumos (void) dounmount(vfsp, MS_FORCE, kcred); #else - mtx_lock(&Giant); /* dounmount() */ (void) dounmount(vfsp, MS_FORCE, curthread); - mtx_unlock(&Giant); /* dounmount() */ #endif return (0); } From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 06:50:40 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A29D77CD; Mon, 1 Jun 2015 06:50:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90DC3119C; Mon, 1 Jun 2015 06:50:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t516oeNg080403; Mon, 1 Jun 2015 06:50:40 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t516oeNY080402; Mon, 1 Jun 2015 06:50:40 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201506010650.t516oeNY080402@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 1 Jun 2015 06:50:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283870 - head/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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 06:50:40 -0000 Author: dim Date: Mon Jun 1 06:50:39 2015 New Revision: 283870 URL: https://svnweb.freebsd.org/changeset/base/283870 Log: Remove unneeded NULL checks in amd64's trap_fatal(). Since td_name is an array member of struct thread, it can never be NULL, so the check can be removed. In addition, curproc can never be NULL, so remove the if statement, and splice the two printfs() together. While here, remove the u_long cast, and use the correct printf format specifier curproc->p_pid. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D2695 Modified: head/sys/amd64/amd64/trap.c Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Mon Jun 1 06:14:17 2015 (r283869) +++ head/sys/amd64/amd64/trap.c Mon Jun 1 06:50:39 2015 (r283870) @@ -840,14 +840,8 @@ trap_fatal(frame, eva) if (frame->tf_rflags & PSL_RF) printf("resume, "); printf("IOPL = %ld\n", (frame->tf_rflags & PSL_IOPL) >> 12); - printf("current process = "); - if (curproc) { - printf("%lu (%s)\n", - (u_long)curproc->p_pid, curthread->td_name ? - curthread->td_name : ""); - } else { - printf("Idle\n"); - } + printf("current process = %d (%s)\n", + curproc->p_pid, curthread->td_name); #ifdef KDB if (debugger_on_panic || kdb_active) From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 07:59:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F13EB910; Mon, 1 Jun 2015 07:59:16 +0000 (UTC) (envelope-from slw@zxy.spb.ru) 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 ABC931305; Mon, 1 Jun 2015 07:59:16 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YzKcr-000MNA-FB; Mon, 01 Jun 2015 10:59:13 +0300 Date: Mon, 1 Jun 2015 10:59:13 +0300 From: Slawa Olhovchenkov To: Bruce Evans Cc: Baptiste Daroussin , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r283842 - head/usr.sbin/pw Message-ID: <20150601075913.GA58397@zxy.spb.ru> References: <201505312207.t4VM73Vh015383@svn.freebsd.org> <20150601143951.J863@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150601143951.J863@besplex.bde.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-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 07:59:17 -0000 On Mon, Jun 01, 2015 at 03:36:58PM +1000, Bruce Evans wrote: > On Sun, 31 May 2015, Baptiste Daroussin wrote: > > > Log: > > Remove useless cast in printf and printf-like functions: > > use %u for uid_t and gid_t > > The cast was not useless. It was to avoid the assumption that the default > promotion of uid_t and gid_t is anything in particular. Now it is assumed > that the default promotion is unsigned (int works too, but this is subtler). > > uids and gids are only guaranteed to have non-negative values. In > POSIX before about 2001, uid_t and gid_t can be any type that can > represent all the values taken on, so can be floating point. Floating > point was rarely used for POSIX types, and most programs make too many > assumptions about types, so POSIX now requires uid_t and gid_t to be > integer types. Then can still be signed integer types IIRC. Nornally > it is a bug to print signed integer types with unsigned integer formats, > but since uids and gids are guaranteed to be non-negative both formats > work. (pids require different handling since they are overloaded to > hold process group ids as negative values, so pid_t is signed and %u > format is very broken for printing general pids.) > > The program assumed that uids and gids are not too large to be represented > by unsigned long. This was the only way to print them in C90 and before. > C99 broke this by breaking the promise that unsigned long is the largest > unsigned integer type. This broke all code that does careful casts to > unsigned long. However, unsigned long is usually large enough in practice. > Careful code now has to cast to uintmax_t, but that is usually excessive > (but doesn't actually work for __uint128_t). Even plain unsigned usually > works on vaxes. And I again remind about negative uids in some system parts https://lists.freebsd.org/pipermail/svn-src-all/2015-January/098144.html From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 08:49:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97688420; Mon, 1 Jun 2015 08:49:25 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 5BF3C1F6A; Mon, 1 Jun 2015 08:49:24 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 4E26E42635E; Mon, 1 Jun 2015 18:49:22 +1000 (AEST) Date: Mon, 1 Jun 2015 18:49:21 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Marcelo Araujo cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283869 - head/contrib/diff/src In-Reply-To: <201506010614.t516EHBC062793@svn.freebsd.org> Message-ID: <20150601183442.O1517@besplex.bde.org> References: <201506010614.t516EHBC062793@svn.freebsd.org> 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=F6tuKMRN c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=GoYidzk2Mr_8KV2Xt_AA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 08:49:25 -0000 On Mon, 1 Jun 2015, Marcelo Araujo wrote: > Log: > Fix the wrong format, format specifies type 'int' but the argument has type > 'long', it was spotted by clang. > ... > Modified: head/contrib/diff/src/context.c > ============================================================================== > --- head/contrib/diff/src/context.c Mon Jun 1 06:05:53 2015 (r283868) > +++ head/contrib/diff/src/context.c Mon Jun 1 06:14:17 2015 (r283869) > @@ -62,7 +62,7 @@ print_context_label (char const *mark, > { > time_t sec = inf->stat.st_mtime; > verify (info_preserved, sizeof inf->stat.st_mtime <= sizeof sec); > - sprintf (buf, "%jd.%.9d", (intmax_t)sec, nsec); > + sprintf (buf, "%jd.%.9ld", (intmax_t)sec, nsec); It is still a garbage format. It doesn't even misprint 1 second + 3 nanoseconds as 1.3, which looks like 1 second + 300 million nanoseconds. It pads the nanoseconds field with leading spaces, so it misprints 1 second + 3 nanoseconds as "1. 3", which is unparsable. Nanoseconds resolution is too precise for human-readable times, but the times here are unsuitable for human readingfor other reasons. They are apparently for machine reading, but never read. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 09:05:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59BE689F; Mon, 1 Jun 2015 09:05:00 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 458231453; Mon, 1 Jun 2015 09:05:00 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51950As047321; Mon, 1 Jun 2015 09:05:00 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5194wLM047286; Mon, 1 Jun 2015 09:04:58 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201506010904.t5194wLM047286@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Mon, 1 Jun 2015 09:04: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: r283875 - in stable/10: . bin/chflags bin/chmod usr.sbin/chown 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 09:05:00 -0000 Author: smh Date: Mon Jun 1 09:04:57 2015 New Revision: 283875 URL: https://svnweb.freebsd.org/changeset/base/283875 Log: MFC r282208: Standardise chmod, chflags, chown and chgrp recursive symlink processing Relnotes: Yes Sponsored by: Multiplay Modified: stable/10/UPDATING stable/10/bin/chflags/chflags.1 stable/10/bin/chflags/chflags.c stable/10/bin/chmod/chmod.1 stable/10/bin/chmod/chmod.c stable/10/usr.sbin/chown/chgrp.1 stable/10/usr.sbin/chown/chown.8 stable/10/usr.sbin/chown/chown.c Directory Properties: stable/10/ (props changed) Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Mon Jun 1 08:52:11 2015 (r283874) +++ stable/10/UPDATING Mon Jun 1 09:04:57 2015 (r283875) @@ -16,6 +16,10 @@ 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. +20150601: + chmod, chflags, chown and chgrp now affect symlinks in -R mode as + defined in symlink(7); previously symlinks were silently ignored. + 20150430: The const qualifier has been removed from iconv(3) to comply with POSIX. The ports tree is aware of this from r384038 onwards. Modified: stable/10/bin/chflags/chflags.1 ============================================================================== --- stable/10/bin/chflags/chflags.1 Mon Jun 1 08:52:11 2015 (r283874) +++ stable/10/bin/chflags/chflags.1 Mon Jun 1 09:04:57 2015 (r283875) @@ -32,7 +32,7 @@ .\" @(#)chflags.1 8.4 (Berkeley) 5/2/95 .\" $FreeBSD$ .\" -.Dd April 8, 2013 +.Dd April 20, 2015 .Dt CHFLAGS 1 .Os .Sh NAME @@ -66,8 +66,9 @@ nor modify the exit status to reflect su .It Fl H If the .Fl R -option is specified, symbolic links on the command line are followed. -(Symbolic links encountered in the tree traversal are not followed.) +option is specified, symbolic links on the command line are followed +and hence unaffected by the command. +(Symbolic links encountered during traversal are not followed.) .It Fl h If the .Ar file @@ -83,8 +84,12 @@ If the option is specified, no symbolic links are followed. This is the default. .It Fl R -Change the file flags for the file hierarchies rooted -in the files instead of just the files themselves. +Change the file flags of the file hierarchies rooted in the files, +instead of just the files themselves. +Beware of unintentionally matching the +.Dq Pa ".." +hard link to the parent directory when using wildcards like +.Dq Li ".*" . .It Fl v Cause .Nm Modified: stable/10/bin/chflags/chflags.c ============================================================================== --- stable/10/bin/chflags/chflags.c Mon Jun 1 08:52:11 2015 (r283874) +++ stable/10/bin/chflags/chflags.c Mon Jun 1 09:04:57 2015 (r283875) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -65,7 +66,6 @@ main(int argc, char *argv[]) int Hflag, Lflag, Rflag, fflag, hflag, vflag; int ch, fts_options, oct, rval; char *flags, *ep; - int (*change_flags)(const char *, unsigned long); Hflag = Lflag = Rflag = fflag = hflag = vflag = 0; while ((ch = getopt(argc, argv, "HLPRfhv")) != -1) @@ -104,20 +104,23 @@ main(int argc, char *argv[]) usage(); if (Rflag) { - fts_options = FTS_PHYSICAL; if (hflag) - errx(1, "the -R and -h options " - "may not be specified together"); - if (Hflag) - fts_options |= FTS_COMFOLLOW; + errx(1, "the -R and -h options may not be " + "specified together."); if (Lflag) { - fts_options &= ~FTS_PHYSICAL; - fts_options |= FTS_LOGICAL; + fts_options = FTS_LOGICAL; + } else { + fts_options = FTS_PHYSICAL; + + if (Hflag) { + fts_options |= FTS_COMFOLLOW; + } } - } else - fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL; - - change_flags = hflag ? lchflags : chflags; + } else if (hflag) { + fts_options = FTS_PHYSICAL; + } else { + fts_options = FTS_LOGICAL; + } flags = *argv; if (*flags >= '0' && *flags <= '7') { @@ -142,12 +145,21 @@ main(int argc, char *argv[]) err(1, NULL); for (rval = 0; (p = fts_read(ftsp)) != NULL;) { + int atflag; + + if ((fts_options & FTS_LOGICAL) || + ((fts_options & FTS_COMFOLLOW) && + p->fts_level == FTS_ROOTLEVEL)) + atflag = 0; + else + atflag = AT_SYMLINK_NOFOLLOW; + switch (p->fts_info) { case FTS_D: /* Change it at FTS_DP if we're recursive. */ if (!Rflag) fts_set(ftsp, p, FTS_SKIP); continue; - case FTS_DNR: /* Warn, chflag, continue. */ + case FTS_DNR: /* Warn, chflags. */ warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); rval = 1; break; @@ -156,16 +168,6 @@ main(int argc, char *argv[]) warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); rval = 1; continue; - case FTS_SL: /* Ignore. */ - case FTS_SLNONE: - /* - * The only symlinks that end up here are ones that - * don't point to anything and ones that we found - * doing a physical walk. - */ - if (!hflag) - continue; - /* FALLTHROUGH */ default: break; } @@ -175,7 +177,8 @@ main(int argc, char *argv[]) newflags = (p->fts_statp->st_flags | set) & clear; if (newflags == p->fts_statp->st_flags) continue; - if ((*change_flags)(p->fts_accpath, newflags) && !fflag) { + if (chflagsat(AT_FDCWD, p->fts_accpath, newflags, + atflag) == -1 && !fflag) { warn("%s", p->fts_path); rval = 1; } else if (vflag) { Modified: stable/10/bin/chmod/chmod.1 ============================================================================== --- stable/10/bin/chmod/chmod.1 Mon Jun 1 08:52:11 2015 (r283874) +++ stable/10/bin/chmod/chmod.1 Mon Jun 1 09:04:57 2015 (r283875) @@ -32,7 +32,7 @@ .\" @(#)chmod.1 8.4 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd January 26, 2009 +.Dd April 20, 2015 .Dt CHMOD 1 .Os .Sh NAME @@ -63,9 +63,9 @@ nor modify the exit status to reflect su .It Fl H If the .Fl R -option is specified, symbolic links on the command line are followed. -(Symbolic links encountered in the tree traversal are not followed by -default.) +option is specified, symbolic links on the command line are followed +and hence unaffected by the command. +(Symbolic links encountered during tree traversal are not followed.) .It Fl h If the file is a symbolic link, change the mode of the link itself rather than the file that the link points to. @@ -79,8 +79,12 @@ If the option is specified, no symbolic links are followed. This is the default. .It Fl R -Change the modes of the file hierarchies rooted in the files +Change the modes of the file hierarchies rooted in the files, instead of just the files themselves. +Beware of unintentionally matching the +.Dq Pa ".." +hard link to the parent directory when using wildcards like +.Dq Li ".*" . .It Fl v Cause .Nm Modified: stable/10/bin/chmod/chmod.c ============================================================================== --- stable/10/bin/chmod/chmod.c Mon Jun 1 08:52:11 2015 (r283874) +++ stable/10/bin/chmod/chmod.c Mon Jun 1 09:04:57 2015 (r283875) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -62,7 +63,7 @@ main(int argc, char *argv[]) FTS *ftsp; FTSENT *p; mode_t *set; - int Hflag, Lflag, Rflag, ch, error, fflag, fts_options, hflag, rval; + int Hflag, Lflag, Rflag, ch, fflag, fts_options, hflag, rval; int vflag; char *mode; mode_t newmode; @@ -126,18 +127,23 @@ done: argv += optind; usage(); if (Rflag) { - fts_options = FTS_PHYSICAL; if (hflag) - errx(1, - "the -R and -h options may not be specified together."); - if (Hflag) - fts_options |= FTS_COMFOLLOW; + errx(1, "the -R and -h options may not be " + "specified together."); if (Lflag) { - fts_options &= ~FTS_PHYSICAL; - fts_options |= FTS_LOGICAL; + fts_options = FTS_LOGICAL; + } else { + fts_options = FTS_PHYSICAL; + + if (Hflag) { + fts_options |= FTS_COMFOLLOW; + } } - } else - fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL; + } else if (hflag) { + fts_options = FTS_PHYSICAL; + } else { + fts_options = FTS_LOGICAL; + } mode = *argv; if ((set = setmode(mode)) == NULL) @@ -146,12 +152,21 @@ done: argv += optind; if ((ftsp = fts_open(++argv, fts_options, 0)) == NULL) err(1, "fts_open"); for (rval = 0; (p = fts_read(ftsp)) != NULL;) { + int atflag; + + if ((fts_options & FTS_LOGICAL) || + ((fts_options & FTS_COMFOLLOW) && + p->fts_level == FTS_ROOTLEVEL)) + atflag = 0; + else + atflag = AT_SYMLINK_NOFOLLOW; + switch (p->fts_info) { case FTS_D: /* Change it at FTS_DP. */ if (!Rflag) fts_set(ftsp, p, FTS_SKIP); continue; - case FTS_DNR: /* Warn, chmod, continue. */ + case FTS_DNR: /* Warn, chmod. */ warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); rval = 1; break; @@ -160,16 +175,6 @@ done: argv += optind; warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); rval = 1; continue; - case FTS_SL: /* Ignore. */ - case FTS_SLNONE: - /* - * The only symlinks that end up here are ones that - * don't point to anything and ones that we found - * doing a physical walk. - */ - if (!hflag) - continue; - /* FALLTHROUGH */ default: break; } @@ -182,32 +187,25 @@ done: argv += optind; if (may_have_nfs4acl(p, hflag) == 0 && (newmode & ALLPERMS) == (p->fts_statp->st_mode & ALLPERMS)) continue; - if (hflag) - error = lchmod(p->fts_accpath, newmode); - else - error = chmod(p->fts_accpath, newmode); - if (error) { - if (!fflag) { - warn("%s", p->fts_path); - rval = 1; - } - } else { - if (vflag) { - (void)printf("%s", p->fts_path); + if (fchmodat(AT_FDCWD, p->fts_accpath, newmode, atflag) == -1 + && !fflag) { + warn("%s", p->fts_path); + rval = 1; + } else if (vflag) { + (void)printf("%s", p->fts_path); - if (vflag > 1) { - char m1[12], m2[12]; + if (vflag > 1) { + char m1[12], m2[12]; - strmode(p->fts_statp->st_mode, m1); - strmode((p->fts_statp->st_mode & - S_IFMT) | newmode, m2); - (void)printf(": 0%o [%s] -> 0%o [%s]", - p->fts_statp->st_mode, m1, - (p->fts_statp->st_mode & S_IFMT) | - newmode, m2); - } - (void)printf("\n"); + strmode(p->fts_statp->st_mode, m1); + strmode((p->fts_statp->st_mode & + S_IFMT) | newmode, m2); + (void)printf(": 0%o [%s] -> 0%o [%s]", + p->fts_statp->st_mode, m1, + (p->fts_statp->st_mode & S_IFMT) | + newmode, m2); } + (void)printf("\n"); } } if (errno) Modified: stable/10/usr.sbin/chown/chgrp.1 ============================================================================== --- stable/10/usr.sbin/chown/chgrp.1 Mon Jun 1 08:52:11 2015 (r283874) +++ stable/10/usr.sbin/chown/chgrp.1 Mon Jun 1 09:04:57 2015 (r283875) @@ -31,7 +31,7 @@ .\" @(#)chgrp.1 8.3 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd February 21, 2010 +.Dd April 20, 2015 .Dt CHGRP 1 .Os .Sh NAME @@ -60,8 +60,9 @@ The following options are available: .It Fl H If the .Fl R -option is specified, symbolic links on the command line are followed. -(Symbolic links encountered in the tree traversal are not followed.) +option is specified, symbolic links on the command line are followed +and hence unaffected by the command. +(Symbolic links encountered during traversal are not followed.) .It Fl L If the .Fl R @@ -72,8 +73,12 @@ If the option is specified, no symbolic links are followed. This is the default. .It Fl R -Change the group ID for the file hierarchies rooted -in the files instead of just the files themselves. +Change the group ID of the file hierarchies rooted in the files, +instead of just the files themselves. +Beware of unintentionally matching the +.Dq Pa ".." +hard link to the parent directory when using wildcards like +.Dq Li ".*" . .It Fl f The force option ignores errors, except for usage errors and does not query about strange modes (unless the user does not have proper permissions). Modified: stable/10/usr.sbin/chown/chown.8 ============================================================================== --- stable/10/usr.sbin/chown/chown.8 Mon Jun 1 08:52:11 2015 (r283874) +++ stable/10/usr.sbin/chown/chown.8 Mon Jun 1 09:04:57 2015 (r283875) @@ -28,7 +28,7 @@ .\" @(#)chown.8 8.3 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd February 21, 2010 +.Dd April 20, 2015 .Dt CHOWN 8 .Os .Sh NAME @@ -64,8 +64,9 @@ The options are as follows: .It Fl H If the .Fl R -option is specified, symbolic links on the command line are followed. -(Symbolic links encountered in the tree traversal are not followed.) +option is specified, symbolic links on the command line are followed +and hence unaffected by the command. +(Symbolic links encountered during traversal are not followed.) .It Fl L If the .Fl R @@ -76,8 +77,8 @@ If the option is specified, no symbolic links are followed. This is the default. .It Fl R -Change the user ID and/or the group ID of the specified directory trees -(recursively, including their contents) and files. +Change the user ID and/or the group ID of the file hierarchies rooted +in the files, instead of just the files themselves. Beware of unintentionally matching the .Dq Pa ".." hard link to the parent directory when using wildcards like Modified: stable/10/usr.sbin/chown/chown.c ============================================================================== --- stable/10/usr.sbin/chown/chown.c Mon Jun 1 08:52:11 2015 (r283874) +++ stable/10/usr.sbin/chown/chown.c Mon Jun 1 09:04:57 2015 (r283875) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -119,18 +120,24 @@ main(int argc, char **argv) usage(); if (Rflag) { - fts_options = FTS_PHYSICAL; if (hflag && (Hflag || Lflag)) errx(1, "the -R%c and -h options may not be " "specified together", Hflag ? 'H' : 'L'); - if (Hflag) - fts_options |= FTS_COMFOLLOW; - else if (Lflag) { - fts_options &= ~FTS_PHYSICAL; - fts_options |= FTS_LOGICAL; + if (Lflag) { + fts_options = FTS_LOGICAL; + } else { + fts_options = FTS_PHYSICAL; + + if (Hflag) { + fts_options |= FTS_COMFOLLOW; + } } - } else - fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL; + } else if (hflag) { + fts_options = FTS_PHYSICAL; + } else { + fts_options = FTS_LOGICAL; + } + if (xflag) fts_options |= FTS_XDEV; @@ -156,6 +163,15 @@ main(int argc, char **argv) err(1, NULL); for (rval = 0; (p = fts_read(ftsp)) != NULL;) { + int atflag; + + if ((fts_options & FTS_LOGICAL) || + ((fts_options & FTS_COMFOLLOW) && + p->fts_level == FTS_ROOTLEVEL)) + atflag = 0; + else + atflag = AT_SYMLINK_NOFOLLOW; + switch (p->fts_info) { case FTS_D: /* Change it at FTS_DP. */ if (!Rflag) @@ -170,58 +186,44 @@ main(int argc, char **argv) warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); rval = 1; continue; - case FTS_SL: - case FTS_SLNONE: - /* - * The only symlinks that end up here are ones that - * don't point to anything and ones that we found - * doing a physical walk. - */ - if (hflag) - break; - else - continue; default: break; } if ((uid == (uid_t)-1 || uid == p->fts_statp->st_uid) && (gid == (gid_t)-1 || gid == p->fts_statp->st_gid)) continue; - if ((hflag ? lchown : chown)(p->fts_accpath, uid, gid) == -1) { - if (!fflag) { - chownerr(p->fts_path); - rval = 1; - } - } else { - if (vflag) { - printf("%s", p->fts_path); - if (vflag > 1) { - if (ischown) { - printf(": %ju:%ju -> %ju:%ju", - (uintmax_t) - p->fts_statp->st_uid, - (uintmax_t) - p->fts_statp->st_gid, - (uid == (uid_t)-1) ? - (uintmax_t) - p->fts_statp->st_uid : - (uintmax_t)uid, - (gid == (gid_t)-1) ? - (uintmax_t) - p->fts_statp->st_gid : - (uintmax_t)gid); - } else { - printf(": %ju -> %ju", - (uintmax_t) - p->fts_statp->st_gid, - (gid == (gid_t)-1) ? - (uintmax_t) - p->fts_statp->st_gid : - (uintmax_t)gid); - } + if (fchownat(AT_FDCWD, p->fts_accpath, uid, gid, atflag) + == -1 && !fflag) { + chownerr(p->fts_path); + rval = 1; + } else if (vflag) { + printf("%s", p->fts_path); + if (vflag > 1) { + if (ischown) { + printf(": %ju:%ju -> %ju:%ju", + (uintmax_t) + p->fts_statp->st_uid, + (uintmax_t) + p->fts_statp->st_gid, + (uid == (uid_t)-1) ? + (uintmax_t) + p->fts_statp->st_uid : + (uintmax_t)uid, + (gid == (gid_t)-1) ? + (uintmax_t) + p->fts_statp->st_gid : + (uintmax_t)gid); + } else { + printf(": %ju -> %ju", + (uintmax_t) + p->fts_statp->st_gid, + (gid == (gid_t)-1) ? + (uintmax_t) + p->fts_statp->st_gid : + (uintmax_t)gid); } - printf("\n"); } + printf("\n"); } } if (errno) From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 09:48:56 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A2143AE; Mon, 1 Jun 2015 09:48:56 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 3EA111E2A; Mon, 1 Jun 2015 09:48:55 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 74EF61046CAC; Mon, 1 Jun 2015 19:48:46 +1000 (AEST) Date: Mon, 1 Jun 2015 19:48:45 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283870 - head/sys/amd64/amd64 In-Reply-To: <201506010650.t516oeNY080402@svn.freebsd.org> Message-ID: <20150601185112.V1517@besplex.bde.org> References: <201506010650.t516oeNY080402@svn.freebsd.org> 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=F6tuKMRN c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=rJR28oaXwkWIq0TRBBkA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 09:48:56 -0000 On Mon, 1 Jun 2015, Dimitry Andric wrote: > Log: > Remove unneeded NULL checks in amd64's trap_fatal(). > > Since td_name is an array member of struct thread, it can never be NULL, > so the check can be removed. In addition, curproc can never be NULL, > so remove the if statement, and splice the two printfs() together. I fixed the first part of this in my version (for p_comm) for i386 long ago. > While here, remove the u_long cast, and use the correct printf format > specifier curproc->p_pid. This was correct, modulo a harmless sign error. Now it assumes that pid_t is int. Careful code elsewhere, and in my i386 version here, casts pid_t to signed long for printing. More careful code would cast pid_t to intmax_t, but that would be excessive. The less careful code here was copied from i386. amd64 and i386 are MD, so can hard-code assumptions about type sizes, but this is still fragile. In FreeBSD-1 (and presumably Net/2), pid_t was signed short and PID_MAX was 30000. Signed short is just barely enough to hold 30000, and 30000 is just small enough to fit in signed short. In 4.4BSD-Lite1, pid_t was expanded to signed long, although PID_MAX was not expanded. pid_t was apparently expanded for portability. If PID_MAX is expanded above 32767 then it is too large for a portable signed short, and also too large for a portable signed int, so before existed, then only portable type for pid_t was signed long and 4.4BSD used this. But in practice, signed long is the most unportable type, since is usually actually longer than int on 64-bit systems, so using it mainly gives binary compatibility problems. These problem for pid_t and most of the other long types were fixed in NetBSD and merged into 4.4BSD-Lite2, or vice versa, and merged into FreeBSD a few years later (1997). So pid_t now has type int32_t in FreeBSD. Code that was careful about printing pid_t's always cast to long for printing and never noticed the 2 previous type changes and wouldn't notice any further ones, except C99 broke the promise that long is the longest signed integer type, so the careful code might be broken by future expansion of pid_t. > Modified: head/sys/amd64/amd64/trap.c > ============================================================================== > --- head/sys/amd64/amd64/trap.c Mon Jun 1 06:14:17 2015 (r283869) > +++ head/sys/amd64/amd64/trap.c Mon Jun 1 06:50:39 2015 (r283870) > @@ -840,14 +840,8 @@ trap_fatal(frame, eva) > if (frame->tf_rflags & PSL_RF) > printf("resume, "); > printf("IOPL = %ld\n", (frame->tf_rflags & PSL_IOPL) >> 12); > - printf("current process = "); > - if (curproc) { > - printf("%lu (%s)\n", > - (u_long)curproc->p_pid, curthread->td_name ? > - curthread->td_name : ""); > - } else { > - printf("Idle\n"); > - } > + printf("current process = %d (%s)\n", > + curproc->p_pid, curthread->td_name); Technically, it is still an error to print int32_t's using %d format. This assumes that ints are at least 32 bits. The amd64 and i386 can safely assume this. Also, POSIX started requiring at least 32-bit ints in about 2007. But it is easier not to assume this. In FreeBSD-1, the i386 code correspoding to the above was: X if (curproc) { X printf("%d (%s)\n", X curproc->p_pid, curproc->p_comm ? X curproc->p_comm : ""); X } else { X printf("Idle\n"); X } In this, the curproc check was correct (curproc was sometimes NULL), the %d format was correct (pid_t was signed short), and the p_comm check was garbage as now (p_comm was an array, and even if it was a null pointer it is feature to let printf() print it as "(null)" since it is unexpected for it to be either empty or null). The %d format broke in FreeBSD-2 when FreeBSD was forced to merge with 4.4BSD-Lite-1, and the (wrong but adequate) fix for this was to cast to unsigned long and change the format to %lu. The sign mismatches from this are harmless, but it is easier to not have any mismatches than to verify that mismatches are harmless. Casting to int and keeping the %d format would also have worked, but again it was easier to not change the type, or to upcast the type (casting to long would have become an upcast when pid_t was reduced to int32_t a few years later). C99's breakage of long, and impending problems with intmax_t, made it not so clear that upcasting is right or what the upcast should be to. Upcasting to intmax_t is now only to 64 bits, but even that is excessive for pid_t on 32-bit arches. 128-bit integers will require intmax_t to be 128 bits, and that will be excessive for pid_t on on 64 bit arches. C99 also has the PRI* formats, but those are worse than what they fix. They are harder to use than upcasts, and just fix runtime space+time bloat from larger than necessary types. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 10:40:05 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5FC906D9; Mon, 1 Jun 2015 10:40:05 +0000 (UTC) (envelope-from jhb@freebsd.org) 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 3B4DC1A99; Mon, 1 Jun 2015 10:40:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 38182B953; Mon, 1 Jun 2015 06:40:03 -0400 (EDT) From: John Baldwin To: Dimitry Andric Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283870 - head/sys/amd64/amd64 Date: Mon, 01 Jun 2015 06:28:53 -0400 Message-ID: <14276941.3c2kAXm4xn@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.1-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201506010650.t516oeNY080402@svn.freebsd.org> References: <201506010650.t516oeNY080402@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); Mon, 01 Jun 2015 06:40:03 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 10:40:05 -0000 On Monday, June 01, 2015 06:50:40 AM Dimitry Andric wrote: > Author: dim > Date: Mon Jun 1 06:50:39 2015 > New Revision: 283870 > URL: https://svnweb.freebsd.org/changeset/base/283870 > > Log: > Remove unneeded NULL checks in amd64's trap_fatal(). > > Since td_name is an array member of struct thread, it can never be NULL, > so the check can be removed. In addition, curproc can never be NULL, > so remove the if statement, and splice the two printfs() together. > > While here, remove the u_long cast, and use the correct printf format > specifier curproc->p_pid. > > Reviewed by: kib > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D2695 i386 has the curproc check and pid cast (it dates from < 5 when curproc was NULL when a CPU was idle (we didn't have idle threads)). Can you fix it as well? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 11:24:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A25EF108; Mon, 1 Jun 2015 11:24:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E9E316D6; Mon, 1 Jun 2015 11:24:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51BOaCI018167; Mon, 1 Jun 2015 11:24:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51BOYVP018161; Mon, 1 Jun 2015 11:24:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201506011124.t51BOYVP018161@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 1 Jun 2015 11:24:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283879 - in head/sys: conf dev/usb dev/usb/template modules/usb/template 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 11:24:36 -0000 Author: hselasky Date: Mon Jun 1 11:24:34 2015 New Revision: 283879 URL: https://svnweb.freebsd.org/changeset/base/283879 Log: Add USB MIDI template for USB device side mode. Added: head/sys/dev/usb/template/usb_template_midi.c (contents, props changed) Modified: head/sys/conf/files head/sys/dev/usb/template/usb_template.c head/sys/dev/usb/template/usb_template.h head/sys/dev/usb/usb_ioctl.h head/sys/modules/usb/template/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Jun 1 10:29:50 2015 (r283878) +++ head/sys/conf/files Mon Jun 1 11:24:34 2015 (r283879) @@ -2561,6 +2561,7 @@ dev/usb/template/usb_template_msc.c opti dev/usb/template/usb_template_mtp.c optional usb_template dev/usb/template/usb_template_phone.c optional usb_template dev/usb/template/usb_template_serialnet.c optional usb_template +dev/usb/template/usb_template_midi.c optional usb_template # # USB video drivers # Modified: head/sys/dev/usb/template/usb_template.c ============================================================================== --- head/sys/dev/usb/template/usb_template.c Mon Jun 1 10:29:50 2015 (r283878) +++ head/sys/dev/usb/template/usb_template.c Mon Jun 1 11:24:34 2015 (r283879) @@ -1374,6 +1374,9 @@ usb_temp_setup_by_index(struct usb_devic case USB_TEMP_SERIALNET: err = usb_temp_setup(udev, &usb_template_serialnet); break; + case USB_TEMP_MIDI: + err = usb_temp_setup(udev, &usb_template_midi); + break; default: return (USB_ERR_INVAL); } Modified: head/sys/dev/usb/template/usb_template.h ============================================================================== --- head/sys/dev/usb/template/usb_template.h Mon Jun 1 10:29:50 2015 (r283878) +++ head/sys/dev/usb/template/usb_template.h Mon Jun 1 11:24:34 2015 (r283879) @@ -107,6 +107,7 @@ extern const struct usb_temp_device_desc extern const struct usb_temp_device_desc usb_template_mtp; extern const struct usb_temp_device_desc usb_template_phone; extern const struct usb_temp_device_desc usb_template_serialnet; +extern const struct usb_temp_device_desc usb_template_midi; usb_error_t usb_temp_setup(struct usb_device *, const struct usb_temp_device_desc *); Added: head/sys/dev/usb/template/usb_template_midi.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/usb/template/usb_template_midi.c Mon Jun 1 11:24:34 2015 (r283879) @@ -0,0 +1,240 @@ +/* $FreeBSD$ */ +/*- + * Copyright (c) 2015 Hans Petter Selasky. 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. + */ + +/* + * This file contains the USB template for an USB MIDI Device. + */ + +#ifdef USB_GLOBAL_INCLUDE_FILE +#include USB_GLOBAL_INCLUDE_FILE +#else +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#endif /* USB_GLOBAL_INCLUDE_FILE */ + +enum { + INDEX_MIDI_LANG, + INDEX_MIDI_IF, + INDEX_MIDI_PRODUCT, + INDEX_MIDI_MAX, +}; + +#define STRING_MIDI_PRODUCT \ + "M\0I\0D\0I\0 \0T\0e\0s\0t\0 \0D\0e\0v\0i\0c\0e" + +#define STRING_MIDI_IF \ + "M\0I\0D\0I\0 \0i\0n\0t\0e\0r\0f\0a\0c\0e" + +/* make the real string descriptors */ + +USB_MAKE_STRING_DESC(STRING_MIDI_IF, string_midi_if); +USB_MAKE_STRING_DESC(STRING_MIDI_PRODUCT, string_midi_product); + +/* prototypes */ + +static const uint8_t midi_desc_raw_0[9] = { + 0x09, 0x24, 0x01, 0x00, 0x01, 0x09, 0x00, 0x01, 0x01 +}; + +static const void *midi_descs_0[] = { + &midi_desc_raw_0, + NULL +}; + +static const struct usb_temp_interface_desc midi_iface_0 = { + .ppEndpoints = NULL, /* no endpoints */ + .ppRawDesc = midi_descs_0, + .bInterfaceClass = 1, + .bInterfaceSubClass = 1, + .bInterfaceProtocol = 0, + .iInterface = INDEX_MIDI_IF, +}; + +static const struct usb_temp_packet_size midi_mps = { + .mps[USB_SPEED_LOW] = 8, + .mps[USB_SPEED_FULL] = 64, + .mps[USB_SPEED_HIGH] = 512, +}; + +static const uint8_t midi_desc_raw_7[5] = { + 0x05, 0x25, 0x01, 0x01, 0x01 +}; + +static const void *midi_descs_2[] = { + &midi_desc_raw_7, + NULL +}; + +static const struct usb_temp_endpoint_desc midi_bulk_out_ep = { + .ppRawDesc = midi_descs_2, + .pPacketSize = &midi_mps, + .bEndpointAddress = UE_DIR_OUT, + .bmAttributes = UE_BULK, +}; + +static const uint8_t midi_desc_raw_6[5] = { + 0x05, 0x25, 0x01, 0x01, 0x03, +}; + +static const void *midi_descs_3[] = { + &midi_desc_raw_6, + NULL +}; + +static const struct usb_temp_endpoint_desc midi_bulk_in_ep = { + .ppRawDesc = midi_descs_3, + .pPacketSize = &midi_mps, + .bEndpointAddress = UE_DIR_IN, + .bmAttributes = UE_BULK, +}; + +static const struct usb_temp_endpoint_desc *midi_iface_1_ep[] = { + &midi_bulk_out_ep, + &midi_bulk_in_ep, + NULL, +}; + +static const uint8_t midi_desc_raw_1[7] = { + 0x07, 0x24, 0x01, 0x00, 0x01, /* wTotalLength: */ 0x41, 0x00 +}; + +static const uint8_t midi_desc_raw_2[6] = { + 0x06, 0x24, 0x02, 0x01, 0x01, 0x00 +}; + +static const uint8_t midi_desc_raw_3[6] = { + 0x06, 0x24, 0x02, 0x02, 0x02, 0x00 +}; + +static const uint8_t midi_desc_raw_4[9] = { + 0x09, 0x24, 0x03, 0x01, 0x03, 0x01, 0x02, 0x01, 0x00 +}; + +static const uint8_t midi_desc_raw_5[9] = { + 0x09, 0x24, 0x03, 0x02, 0x04, 0x01, 0x01, 0x01, 0x00 +}; + +static const void *midi_descs_1[] = { + &midi_desc_raw_1, + &midi_desc_raw_2, + &midi_desc_raw_3, + &midi_desc_raw_4, + &midi_desc_raw_5, + NULL +}; + +static const struct usb_temp_interface_desc midi_iface_1 = { + .ppRawDesc = midi_descs_1, + .ppEndpoints = midi_iface_1_ep, + .bInterfaceClass = 0x01, /* Midi */ + .bInterfaceSubClass = 3, /* MIDI streaming */ + .bInterfaceProtocol = 0, + .iInterface = INDEX_MIDI_IF, +}; + +static const struct usb_temp_interface_desc *midi_interfaces[] = { + &midi_iface_0, + &midi_iface_1, + NULL, +}; + +static const struct usb_temp_config_desc midi_config_desc = { + .ppIfaceDesc = midi_interfaces, + .bmAttributes = UC_BUS_POWERED, + .bMaxPower = 25, /* 50 mA */ + .iConfiguration = INDEX_MIDI_PRODUCT, +}; + +static const struct usb_temp_config_desc *midi_configs[] = { + &midi_config_desc, + NULL, +}; + +static usb_temp_get_string_desc_t midi_get_string_desc; + +const struct usb_temp_device_desc usb_template_midi = { + .getStringDesc = &midi_get_string_desc, + .ppConfigDesc = midi_configs, + .idVendor = USB_TEMPLATE_VENDOR, + .idProduct = 0x00BB, + .bcdDevice = 0x0100, + .bDeviceClass = 0, + .bDeviceSubClass = 0, + .bDeviceProtocol = 0, + .iManufacturer = 0, + .iProduct = INDEX_MIDI_PRODUCT, + .iSerialNumber = 0, +}; + +/*------------------------------------------------------------------------* + * midi_get_string_desc + * + * Return values: + * NULL: Failure. No such string. + * Else: Success. Pointer to string descriptor is returned. + *------------------------------------------------------------------------*/ +static const void * +midi_get_string_desc(uint16_t lang_id, uint8_t string_index) +{ + static const void *ptr[INDEX_MIDI_MAX] = { + [INDEX_MIDI_LANG] = &usb_string_lang_en, + [INDEX_MIDI_IF] = &string_midi_if, + [INDEX_MIDI_PRODUCT] = &string_midi_product, + }; + + if (string_index == 0) { + return (&usb_string_lang_en); + } + if (lang_id != 0x0409) { + return (NULL); + } + if (string_index < INDEX_MIDI_MAX) { + return (ptr[string_index]); + } + return (NULL); +} Modified: head/sys/dev/usb/usb_ioctl.h ============================================================================== --- head/sys/dev/usb/usb_ioctl.h Mon Jun 1 10:29:50 2015 (r283878) +++ head/sys/dev/usb/usb_ioctl.h Mon Jun 1 11:24:34 2015 (r283879) @@ -66,6 +66,7 @@ enum { USB_TEMP_MOUSE, /* USB Mouse */ USB_TEMP_PHONE, /* USB Phone */ USB_TEMP_SERIALNET, /* USB CDC Ethernet and Modem */ + USB_TEMP_MIDI, /* USB MIDI */ USB_TEMP_MAX, }; Modified: head/sys/modules/usb/template/Makefile ============================================================================== --- head/sys/modules/usb/template/Makefile Mon Jun 1 10:29:50 2015 (r283878) +++ head/sys/modules/usb/template/Makefile Mon Jun 1 11:24:34 2015 (r283879) @@ -40,6 +40,7 @@ SRCS= opt_bus.h opt_usb.h device_if.h bu usb_template_msc.c \ usb_template_mtp.c \ usb_template_phone.c \ - usb_template_serialnet.c + usb_template_serialnet.c \ + usb_template_midi.c .include From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 16:46:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40904B2B; Mon, 1 Jun 2015 16:46:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14D051721; Mon, 1 Jun 2015 16:46:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51GkqoA079501; Mon, 1 Jun 2015 16:46:52 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51GkqpZ079498; Mon, 1 Jun 2015 16:46:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201506011646.t51GkqpZ079498@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 1 Jun 2015 16:46: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: r283880 - stable/10/release/arm 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 16:46:53 -0000 Author: gjb Date: Mon Jun 1 16:46:51 2015 New Revision: 283880 URL: https://svnweb.freebsd.org/changeset/base/283880 Log: MFC r283673, r283674: r283673: Sort configuration options for consistency with other boards. r283674: Export 'BOARDNAME' when differs from the KERNCONF. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/arm/PANDABOARD.conf stable/10/release/arm/RPI2.conf stable/10/release/arm/WANDBOARD.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/release/arm/PANDABOARD.conf ============================================================================== --- stable/10/release/arm/PANDABOARD.conf Mon Jun 1 11:24:34 2015 (r283879) +++ stable/10/release/arm/PANDABOARD.conf Mon Jun 1 16:46:51 2015 (r283880) @@ -8,13 +8,13 @@ EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-pandaboard" KERNEL="PANDABOARD" -NODOC=1 WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x88000000" IMAGE_SIZE="1G" PART_SCHEME="MBR" FAT_SIZE="2m" FAT_TYPE="12" MD_ARGS="-x 63 -y 255" +NODOC=1 arm_install_uboot() { UBOOT_DIR="/usr/local/share/u-boot/u-boot-pandaboard" Modified: stable/10/release/arm/RPI2.conf ============================================================================== --- stable/10/release/arm/RPI2.conf Mon Jun 1 11:24:34 2015 (r283879) +++ stable/10/release/arm/RPI2.conf Mon Jun 1 16:46:51 2015 (r283880) @@ -9,13 +9,13 @@ EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-rpi2" KERNEL="RPI2" -NODOC=1 WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x2000000" IMAGE_SIZE="1G" PART_SCHEME="MBR" FAT_SIZE="50m" FAT_TYPE="16" MD_ARGS="-x 63 -y 255" +NODOC=1 arm_install_uboot() { UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi2" Modified: stable/10/release/arm/WANDBOARD.conf ============================================================================== --- stable/10/release/arm/WANDBOARD.conf Mon Jun 1 11:24:34 2015 (r283879) +++ stable/10/release/arm/WANDBOARD.conf Mon Jun 1 16:46:51 2015 (r283880) @@ -16,6 +16,7 @@ FAT_SIZE="50m -b 16384" FAT_TYPE="16" MD_ARGS="-x 63 -y 255" NODOC=1 +export BOARDNAME="WANDBOARD" arm_install_uboot() { UBOOT_DIR="/usr/local/share/u-boot/u-boot-wandboard" From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 17:15:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF50058F; Mon, 1 Jun 2015 17:15:25 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC8B91E67; Mon, 1 Jun 2015 17:15:25 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51HFPeY094576; Mon, 1 Jun 2015 17:15:25 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51HFPCZ094574; Mon, 1 Jun 2015 17:15:25 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201506011715.t51HFPCZ094574@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Mon, 1 Jun 2015 17:15:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283881 - in head: head head/sys head/sys/dev head/sys/dev/ixgbe head/sys/modules head/sys/modules/ixv sys/dev/ixgbe sys/modules/ixv 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 17:15:25 -0000 Author: jfv Date: Mon Jun 1 17:15:25 2015 New Revision: 283881 URL: https://svnweb.freebsd.org/changeset/base/283881 Log: Delta D2489 - Add SRIOV support to the Intel 10G driver. NOTE: This is a technology preview, while it has undergone development tests, Intel has not yet completed full validation of the feature. It is being integrated for early access and customer testing. Added: head/head/ head/head/sys/ head/head/sys/dev/ head/head/sys/dev/ixgbe/ head/head/sys/modules/ head/head/sys/modules/ixv/ Modified: head/sys/dev/ixgbe/if_ix.c head/sys/dev/ixgbe/if_ixv.c head/sys/dev/ixgbe/ix_txrx.c head/sys/dev/ixgbe/ixgbe.h head/sys/dev/ixgbe/ixgbe_mbx.h head/sys/dev/ixgbe/ixgbe_vf.c head/sys/modules/ixv/Makefile Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Mon Jun 1 16:46:51 2015 (r283880) +++ head/sys/dev/ixgbe/if_ix.c Mon Jun 1 17:15:25 2015 (r283881) @@ -54,7 +54,7 @@ int ixgbe_display_debug_stat /********************************************************************* * Driver version *********************************************************************/ -char ixgbe_driver_version[] = "2.8.3"; +char ixgbe_driver_version[] = "3.1.0"; /********************************************************************* * PCI Device ID Table @@ -138,6 +138,7 @@ static int ixgbe_setup_msix(struct adapt static void ixgbe_free_pci_resources(struct adapter *); static void ixgbe_local_timer(void *); static int ixgbe_setup_interface(device_t, struct adapter *); +static void ixgbe_config_gpie(struct adapter *); static void ixgbe_config_dmac(struct adapter *); static void ixgbe_config_delay_values(struct adapter *); static void ixgbe_config_link(struct adapter *); @@ -204,6 +205,18 @@ static void ixgbe_handle_phy(void *, int static void ixgbe_reinit_fdir(void *, int); #endif +#ifdef PCI_IOV +static void ixgbe_ping_all_vfs(struct adapter *); +static void ixgbe_handle_mbx(void *, int); +static int ixgbe_init_iov(device_t, u16, const nvlist_t *); +static void ixgbe_uninit_iov(device_t); +static int ixgbe_add_vf(device_t, u16, const nvlist_t *); +static void ixgbe_initialize_iov(struct adapter *); +static void ixgbe_recalculate_max_frame(struct adapter *); +static void ixgbe_init_vf(struct adapter *, struct ixgbe_vf *); +#endif /* PCI_IOV */ + + /********************************************************************* * FreeBSD Device Interface Entry Points *********************************************************************/ @@ -216,6 +229,11 @@ static device_method_t ix_methods[] = { DEVMETHOD(device_shutdown, ixgbe_shutdown), DEVMETHOD(device_suspend, ixgbe_suspend), DEVMETHOD(device_resume, ixgbe_resume), +#ifdef PCI_IOV + DEVMETHOD(pci_init_iov, ixgbe_init_iov), + DEVMETHOD(pci_uninit_iov, ixgbe_uninit_iov), + DEVMETHOD(pci_add_vf, ixgbe_add_vf), +#endif /* PCI_IOV */ DEVMETHOD_END }; @@ -341,6 +359,8 @@ static int fdir_pballoc = 1; #include #endif /* DEV_NETMAP */ +static MALLOC_DEFINE(M_IXGBE, "ix", "ix driver allocations"); + /********************************************************************* * Device identification routine * @@ -472,7 +492,7 @@ ixgbe_attach(device_t dev) } /* Allocate multicast array memory. */ - adapter->mta = malloc(sizeof(u8) * IXGBE_ETH_LENGTH_OF_ADDRESS * + adapter->mta = malloc(sizeof(*adapter->mta) * MAX_NUM_MULTICAST_ADDRESSES, M_DEVBUF, M_NOWAIT); if (adapter->mta == NULL) { device_printf(dev, "Can not allocate multicast setup array\n"); @@ -558,6 +578,28 @@ ixgbe_attach(device_t dev) /* Set an initial default flow control value */ adapter->fc = ixgbe_fc_full; +#ifdef PCI_IOV + if ((hw->mac.type != ixgbe_mac_82598EB) && (adapter->msix > 1)) { + nvlist_t *pf_schema, *vf_schema; + + hw->mbx.ops.init_params(hw); + pf_schema = pci_iov_schema_alloc_node(); + vf_schema = pci_iov_schema_alloc_node(); + pci_iov_schema_add_unicast_mac(vf_schema, "mac-addr", 0, NULL); + pci_iov_schema_add_bool(vf_schema, "mac-anti-spoof", + IOV_SCHEMA_HASDEFAULT, TRUE); + pci_iov_schema_add_bool(vf_schema, "allow-set-mac", + IOV_SCHEMA_HASDEFAULT, FALSE); + pci_iov_schema_add_bool(vf_schema, "allow-promisc", + IOV_SCHEMA_HASDEFAULT, FALSE); + error = pci_iov_attach(dev, pf_schema, vf_schema); + if (error != 0) { + device_printf(dev, + "Error %d setting up SR-IOV\n", error); + } + } +#endif /* PCI_IOV */ + /* Check for certain supported features */ ixgbe_check_wol_support(adapter); ixgbe_check_eee_support(adapter); @@ -614,6 +656,13 @@ ixgbe_detach(device_t dev) return (EBUSY); } +#ifdef PCI_IOV + if (pci_iov_detach(dev) != 0) { + device_printf(dev, "SR-IOV in use; detach first.\n"); + return (EBUSY); + } +#endif /* PCI_IOV */ + /* Stop the adapter */ IXGBE_CORE_LOCK(adapter); ixgbe_setup_low_power_mode(adapter); @@ -634,6 +683,9 @@ ixgbe_detach(device_t dev) taskqueue_drain(adapter->tq, &adapter->link_task); taskqueue_drain(adapter->tq, &adapter->mod_task); taskqueue_drain(adapter->tq, &adapter->msf_task); +#ifdef PCI_IOV + taskqueue_drain(adapter->tq, &adapter->mbx_task); +#endif taskqueue_drain(adapter->tq, &adapter->phy_task); #ifdef IXGBE_FDIR taskqueue_drain(adapter->tq, &adapter->fdir_task); @@ -810,6 +862,9 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c adapter->max_frame_size = ifp->if_mtu + IXGBE_MTU_HDR; ixgbe_init_locked(adapter); +#ifdef PCI_IOV + ixgbe_recalculate_max_frame(adapter); +#endif IXGBE_CORE_UNLOCK(adapter); } break; @@ -925,22 +980,36 @@ ixgbe_init_locked(struct adapter *adapte struct ifnet *ifp = adapter->ifp; device_t dev = adapter->dev; struct ixgbe_hw *hw = &adapter->hw; - u32 k, txdctl, mhadd, gpie; + struct tx_ring *txr; + struct rx_ring *rxr; + u32 txdctl, mhadd; u32 rxdctl, rxctrl; +#ifdef PCI_IOV + enum ixgbe_iov_mode mode; +#endif mtx_assert(&adapter->core_mtx, MA_OWNED); INIT_DEBUGOUT("ixgbe_init_locked: begin"); + hw->adapter_stopped = FALSE; ixgbe_stop_adapter(hw); callout_stop(&adapter->timer); +#ifdef PCI_IOV + mode = ixgbe_get_iov_mode(adapter); + adapter->pool = ixgbe_max_vfs(mode); + /* Queue indices may change with IOV mode */ + for (int i = 0; i < adapter->num_queues; i++) { + adapter->rx_rings[i].me = ixgbe_pf_que_index(mode, i); + adapter->tx_rings[i].me = ixgbe_pf_que_index(mode, i); + } +#endif /* reprogram the RAR[0] in case user changed it. */ - ixgbe_set_rar(hw, 0, adapter->hw.mac.addr, 0, IXGBE_RAH_AV); + ixgbe_set_rar(hw, 0, hw->mac.addr, adapter->pool, IXGBE_RAH_AV); /* Get the latest mac address, User can use a LAA */ - bcopy(IF_LLADDR(adapter->ifp), hw->mac.addr, - IXGBE_ETH_LENGTH_OF_ADDRESS); - ixgbe_set_rar(hw, 0, hw->mac.addr, 0, 1); + bcopy(IF_LLADDR(ifp), hw->mac.addr, IXGBE_ETH_LENGTH_OF_ADDRESS); + ixgbe_set_rar(hw, 0, hw->mac.addr, adapter->pool, 1); hw->addr_ctrl.rar_used_count = 1; /* Set the various hardware offload abilities */ @@ -963,6 +1032,9 @@ ixgbe_init_locked(struct adapter *adapte } ixgbe_init_hw(hw); +#ifdef PCI_IOV + ixgbe_initialize_iov(adapter); +#endif ixgbe_initialize_transmit_units(adapter); /* Setup Multicast table */ @@ -972,14 +1044,10 @@ ixgbe_init_locked(struct adapter *adapte ** Determine the correct mbuf pool ** for doing jumbo frames */ - if (adapter->max_frame_size <= 2048) + if (adapter->max_frame_size <= MCLBYTES) adapter->rx_mbuf_sz = MCLBYTES; - else if (adapter->max_frame_size <= 4096) - adapter->rx_mbuf_sz = MJUMPAGESIZE; - else if (adapter->max_frame_size <= 9216) - adapter->rx_mbuf_sz = MJUM9BYTES; else - adapter->rx_mbuf_sz = MJUM16BYTES; + adapter->rx_mbuf_sz = MJUMPAGESIZE; /* Prepare receive descriptors and buffers */ if (ixgbe_setup_receive_structures(adapter)) { @@ -991,31 +1059,8 @@ ixgbe_init_locked(struct adapter *adapte /* Configure RX settings */ ixgbe_initialize_receive_units(adapter); - gpie = IXGBE_READ_REG(&adapter->hw, IXGBE_GPIE); - - /* Enable Fan Failure Interrupt */ - gpie |= IXGBE_SDP1_GPIEN_BY_MAC(hw); - - /* Add for Module detection */ - if (hw->mac.type == ixgbe_mac_82599EB) - gpie |= IXGBE_SDP2_GPIEN; - - /* - * Thermal Failure Detection (X540) - * Link Detection (X552) - */ - if (hw->mac.type == ixgbe_mac_X540 || - hw->device_id == IXGBE_DEV_ID_X550EM_X_SFP || - hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T) - gpie |= IXGBE_SDP0_GPIEN_X540; - - if (adapter->msix > 1) { - /* Enable Enhanced MSIX mode */ - gpie |= IXGBE_GPIE_MSIX_MODE; - gpie |= IXGBE_GPIE_EIAME | IXGBE_GPIE_PBA_SUPPORT | - IXGBE_GPIE_OCD; - } - IXGBE_WRITE_REG(hw, IXGBE_GPIE, gpie); + /* Enable SDP & MSIX interrupts based on adapter */ + ixgbe_config_gpie(adapter); /* Set MTU size */ if (ifp->if_mtu > ETHERMTU) { @@ -1028,7 +1073,8 @@ ixgbe_init_locked(struct adapter *adapte /* Now enable all the queues */ for (int i = 0; i < adapter->num_queues; i++) { - txdctl = IXGBE_READ_REG(hw, IXGBE_TXDCTL(i)); + txr = &adapter->tx_rings[i]; + txdctl = IXGBE_READ_REG(hw, IXGBE_TXDCTL(txr->me)); txdctl |= IXGBE_TXDCTL_ENABLE; /* Set WTHRESH to 8, burst writeback */ txdctl |= (8 << 16); @@ -1040,11 +1086,12 @@ ixgbe_init_locked(struct adapter *adapte * Prefetching enables tx line rate even with 1 queue. */ txdctl |= (32 << 0) | (1 << 8); - IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(i), txdctl); + IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(txr->me), txdctl); } - for (int i = 0; i < adapter->num_queues; i++) { - rxdctl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i)); + for (int i = 0, j = 0; i < adapter->num_queues; i++) { + rxr = &adapter->rx_rings[i]; + rxdctl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(rxr->me)); if (hw->mac.type == ixgbe_mac_82598EB) { /* ** PTHRESH = 21 @@ -1055,9 +1102,9 @@ ixgbe_init_locked(struct adapter *adapte rxdctl |= 0x080420; } rxdctl |= IXGBE_RXDCTL_ENABLE; - IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(i), rxdctl); - for (k = 0; k < 10; k++) { - if (IXGBE_READ_REG(hw, IXGBE_RXDCTL(i)) & + IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(rxr->me), rxdctl); + for (; j < 10; j++) { + if (IXGBE_READ_REG(hw, IXGBE_RXDCTL(rxr->me)) & IXGBE_RXDCTL_ENABLE) break; else @@ -1086,10 +1133,10 @@ ixgbe_init_locked(struct adapter *adapte struct netmap_kring *kring = &na->rx_rings[i]; int t = na->num_rx_desc - 1 - nm_kr_rxspace(kring); - IXGBE_WRITE_REG(hw, IXGBE_RDT(i), t); + IXGBE_WRITE_REG(hw, IXGBE_RDT(rxr->me), t); } else #endif /* DEV_NETMAP */ - IXGBE_WRITE_REG(hw, IXGBE_RDT(i), adapter->num_rx_desc - 1); + IXGBE_WRITE_REG(hw, IXGBE_RDT(rxr->me), adapter->num_rx_desc - 1); } /* Enable Receive engine */ @@ -1128,9 +1175,9 @@ ixgbe_init_locked(struct adapter *adapte #endif /* - ** Check on any SFP devices that - ** need to be kick-started - */ + * Check on any SFP devices that + * need to be kick-started + */ if (hw->phy.type == ixgbe_phy_none) { int err = hw->phy.ops.identify(hw); if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { @@ -1144,8 +1191,7 @@ ixgbe_init_locked(struct adapter *adapte IXGBE_WRITE_REG(hw, IXGBE_EITR(adapter->vector), IXGBE_LINK_ITR); /* Configure Energy Efficient Ethernet for supported devices */ - if (adapter->eee_support) - ixgbe_setup_eee(hw, adapter->eee_enabled); + ixgbe_setup_eee(hw, adapter->eee_enabled); /* Config/Enable Link */ ixgbe_config_link(adapter); @@ -1165,6 +1211,15 @@ ixgbe_init_locked(struct adapter *adapte /* And now turn on interrupts */ ixgbe_enable_intr(adapter); +#ifdef PCI_IOV + /* Enable the use of the MBX by the VF's */ + { + u32 reg = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT); + reg |= IXGBE_CTRL_EXT_PFRSTD; + IXGBE_WRITE_REG(hw, IXGBE_CTRL_EXT, reg); + } +#endif + /* Now inform the stack we're ready */ ifp->if_drv_flags |= IFF_DRV_RUNNING; @@ -1183,6 +1238,51 @@ ixgbe_init(void *arg) } static void +ixgbe_config_gpie(struct adapter *adapter) +{ + struct ixgbe_hw *hw = &adapter->hw; + u32 gpie; + + gpie = IXGBE_READ_REG(hw, IXGBE_GPIE); + + /* Fan Failure Interrupt */ + if (hw->device_id == IXGBE_DEV_ID_82598AT) + gpie |= IXGBE_SDP1_GPIEN; + + /* + * Module detection (SDP2) + * Media ready (SDP1) + */ + if (hw->mac.type == ixgbe_mac_82599EB) { + gpie |= IXGBE_SDP2_GPIEN; + if (hw->device_id != IXGBE_DEV_ID_82599_QSFP_SF_QP) + gpie |= IXGBE_SDP1_GPIEN; + } + + /* + * Thermal Failure Detection (X540) + * Link Detection (X557) + */ + if (hw->mac.type == ixgbe_mac_X540 || + hw->device_id == IXGBE_DEV_ID_X550EM_X_SFP || + hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T) + gpie |= IXGBE_SDP0_GPIEN_X540; + + if (adapter->msix > 1) { + /* Enable Enhanced MSIX mode */ + gpie |= IXGBE_GPIE_MSIX_MODE; + gpie |= IXGBE_GPIE_EIAME | IXGBE_GPIE_PBA_SUPPORT | + IXGBE_GPIE_OCD; + } + + IXGBE_WRITE_REG(hw, IXGBE_GPIE, gpie); + return; +} + +/* + * Requires adapter->max_frame_size to be set. + */ +static void ixgbe_config_delay_values(struct adapter *adapter) { struct ixgbe_hw *hw = &adapter->hw; @@ -1276,10 +1376,9 @@ ixgbe_handle_que(void *context, int pend struct adapter *adapter = que->adapter; struct tx_ring *txr = que->txr; struct ifnet *ifp = adapter->ifp; - bool more; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - more = ixgbe_rxeof(que); + ixgbe_rxeof(que); IXGBE_TX_LOCK(txr); ixgbe_txeof(txr); #ifndef IXGBE_LEGACY_TX @@ -1341,8 +1440,8 @@ ixgbe_legacy_irq(void *arg) IXGBE_TX_UNLOCK(txr); /* Check for fan failure */ - if ((hw->phy.media_type == ixgbe_media_type_copper) && - (reg_eicr & IXGBE_EICR_GPI_SDP1_BY_MAC(hw))) { + if ((hw->device_id == IXGBE_DEV_ID_82598AT) && + (reg_eicr & IXGBE_EICR_GPI_SDP1)) { device_printf(adapter->dev, "\nCRITICAL: FAN FAILURE!! " "REPLACE IMMEDIATELY!!\n"); IXGBE_WRITE_REG(hw, IXGBE_EIMS, IXGBE_EICR_GPI_SDP1_BY_MAC(hw)); @@ -1381,6 +1480,7 @@ ixgbe_msix_que(void *arg) bool more; u32 newitr = 0; + /* Protect against spurious interrupts */ if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; @@ -1504,6 +1604,10 @@ ixgbe_msix_link(void *arg) device_printf(adapter->dev, "System shutdown required!\n"); IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_TS); } +#ifdef PCI_IOV + if (reg_eicr & IXGBE_EICR_MAILBOX) + taskqueue_enqueue(adapter->tq, &adapter->mbx_task); +#endif } /* Pluggable optics-related interrupt */ @@ -1569,7 +1673,7 @@ ixgbe_media_status(struct ifnet * ifp, s } ifmr->ifm_status |= IFM_ACTIVE; - layer = ixgbe_get_supported_physical_layer(hw); + layer = adapter->phy_layer; if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_T || layer & IXGBE_PHYSICAL_LAYER_1000BASE_T || @@ -1802,18 +1906,17 @@ ixgbe_set_promisc(struct adapter *adapte static void ixgbe_set_multi(struct adapter *adapter) { - u32 fctrl; - u8 *mta; - u8 *update_ptr; - struct ifmultiaddr *ifma; - int mcnt = 0; - struct ifnet *ifp = adapter->ifp; + u32 fctrl; + u8 *update_ptr; + struct ifmultiaddr *ifma; + struct ixgbe_mc_addr *mta; + int mcnt = 0; + struct ifnet *ifp = adapter->ifp; IOCTL_DEBUGOUT("ixgbe_set_multi: begin"); mta = adapter->mta; - bzero(mta, sizeof(u8) * IXGBE_ETH_LENGTH_OF_ADDRESS * - MAX_NUM_MULTICAST_ADDRESSES); + bzero(mta, sizeof(*mta) * MAX_NUM_MULTICAST_ADDRESSES); #if __FreeBSD_version < 800000 IF_ADDR_LOCK(ifp); @@ -1826,8 +1929,8 @@ ixgbe_set_multi(struct adapter *adapter) if (mcnt == MAX_NUM_MULTICAST_ADDRESSES) break; bcopy(LLADDR((struct sockaddr_dl *) ifma->ifma_addr), - &mta[mcnt * IXGBE_ETH_LENGTH_OF_ADDRESS], - IXGBE_ETH_LENGTH_OF_ADDRESS); + mta[mcnt].addr, IXGBE_ETH_LENGTH_OF_ADDRESS); + mta[mcnt].vmdq = adapter->pool; mcnt++; } #if __FreeBSD_version < 800000 @@ -1850,7 +1953,7 @@ ixgbe_set_multi(struct adapter *adapter) IXGBE_WRITE_REG(&adapter->hw, IXGBE_FCTRL, fctrl); if (mcnt < MAX_NUM_MULTICAST_ADDRESSES) { - update_ptr = mta; + update_ptr = (u8 *)mta; ixgbe_update_mc_addr_list(&adapter->hw, update_ptr, mcnt, ixgbe_mc_array_itr, TRUE); } @@ -1866,13 +1969,13 @@ ixgbe_set_multi(struct adapter *adapter) static u8 * ixgbe_mc_array_itr(struct ixgbe_hw *hw, u8 **update_ptr, u32 *vmdq) { - u8 *addr = *update_ptr; - u8 *newptr; - *vmdq = 0; - - newptr = addr + IXGBE_ETH_LENGTH_OF_ADDRESS; - *update_ptr = newptr; - return addr; + struct ixgbe_mc_addr *mta; + + mta = (struct ixgbe_mc_addr *)*update_ptr; + *vmdq = mta->vmdq; + + *update_ptr = (u8*)(mta + 1);; + return (mta->addr); } @@ -1954,6 +2057,7 @@ watchdog: ixgbe_init_locked(adapter); } + /* ** Note: this routine updates the OS on the link state ** the real check of the hardware only happens with @@ -1977,6 +2081,9 @@ ixgbe_update_link_status(struct adapter /* Update DMA coalescing config */ ixgbe_config_dmac(adapter); if_link_state_change(ifp, LINK_STATE_UP); +#ifdef PCI_IOV + ixgbe_ping_all_vfs(adapter); +#endif } } else { /* Link down */ if (adapter->link_active == TRUE) { @@ -1984,6 +2091,9 @@ ixgbe_update_link_status(struct adapter device_printf(dev,"Link is Down\n"); if_link_state_change(ifp, LINK_STATE_DOWN); adapter->link_active = FALSE; +#ifdef PCI_IOV + ixgbe_ping_all_vfs(adapter); +#endif } } @@ -2083,7 +2193,7 @@ ixgbe_setup_optics(struct adapter *adapt struct ixgbe_hw *hw = &adapter->hw; int layer; - layer = ixgbe_get_supported_physical_layer(hw); + layer = adapter->phy_layer = ixgbe_get_supported_physical_layer(hw); if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_T) { adapter->optics = IFM_10G_T; @@ -2281,17 +2391,19 @@ ixgbe_allocate_msix(struct adapter *adap #endif if (adapter->num_queues > 1) bus_bind_intr(dev, que->res, cpu_id); - +#ifdef IXGBE_DEBUG #ifdef RSS device_printf(dev, "Bound RSS bucket %d to CPU %d\n", i, cpu_id); #else - if (bootverbose) - device_printf(dev, - "Bound queue %d to cpu %d\n", - i, cpu_id); + device_printf(dev, + "Bound queue %d to cpu %d\n", + i, cpu_id); #endif +#endif /* IXGBE_DEBUG */ + + #ifndef IXGBE_LEGACY_TX TASK_INIT(&txr->txq_task, 0, ixgbe_deferred_mq_start, txr); #endif @@ -2337,6 +2449,9 @@ ixgbe_allocate_msix(struct adapter *adap TASK_INIT(&adapter->link_task, 0, ixgbe_handle_link, adapter); TASK_INIT(&adapter->mod_task, 0, ixgbe_handle_mod, adapter); TASK_INIT(&adapter->msf_task, 0, ixgbe_handle_msf, adapter); +#ifdef PCI_IOV + TASK_INIT(&adapter->mbx_task, 0, ixgbe_handle_mbx, adapter); +#endif TASK_INIT(&adapter->phy_task, 0, ixgbe_handle_phy, adapter); #ifdef IXGBE_FDIR TASK_INIT(&adapter->fdir_task, 0, ixgbe_reinit_fdir, adapter); @@ -2630,7 +2745,7 @@ ixgbe_add_media_types(struct adapter *ad device_t dev = adapter->dev; int layer; - layer = ixgbe_get_supported_physical_layer(hw); + layer = adapter->phy_layer = ixgbe_get_supported_physical_layer(hw); /* Media types with matching FreeBSD media defines */ if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_T) @@ -2741,19 +2856,20 @@ ixgbe_initialize_transmit_units(struct a for (int i = 0; i < adapter->num_queues; i++, txr++) { u64 tdba = txr->txdma.dma_paddr; u32 txctrl = 0; + int j = txr->me; - IXGBE_WRITE_REG(hw, IXGBE_TDBAL(i), + IXGBE_WRITE_REG(hw, IXGBE_TDBAL(j), (tdba & 0x00000000ffffffffULL)); - IXGBE_WRITE_REG(hw, IXGBE_TDBAH(i), (tdba >> 32)); - IXGBE_WRITE_REG(hw, IXGBE_TDLEN(i), + IXGBE_WRITE_REG(hw, IXGBE_TDBAH(j), (tdba >> 32)); + IXGBE_WRITE_REG(hw, IXGBE_TDLEN(j), adapter->num_tx_desc * sizeof(union ixgbe_adv_tx_desc)); /* Setup the HW Tx Head and Tail descriptor pointers */ - IXGBE_WRITE_REG(hw, IXGBE_TDH(i), 0); - IXGBE_WRITE_REG(hw, IXGBE_TDT(i), 0); + IXGBE_WRITE_REG(hw, IXGBE_TDH(j), 0); + IXGBE_WRITE_REG(hw, IXGBE_TDT(j), 0); /* Cache the tail address */ - txr->tail = IXGBE_TDT(txr->me); + txr->tail = IXGBE_TDT(j); /* Set the processing limit */ txr->process_limit = ixgbe_tx_process_limit; @@ -2761,23 +2877,23 @@ ixgbe_initialize_transmit_units(struct a /* Disable Head Writeback */ switch (hw->mac.type) { case ixgbe_mac_82598EB: - txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(i)); + txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(j)); break; case ixgbe_mac_82599EB: case ixgbe_mac_X540: default: - txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(i)); + txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(j)); break; } txctrl &= ~IXGBE_DCA_TXCTRL_DESC_WRO_EN; switch (hw->mac.type) { case ixgbe_mac_82598EB: - IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(i), txctrl); + IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(j), txctrl); break; case ixgbe_mac_82599EB: case ixgbe_mac_X540: default: - IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(i), txctrl); + IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(j), txctrl); break; } @@ -2785,6 +2901,9 @@ ixgbe_initialize_transmit_units(struct a if (hw->mac.type != ixgbe_mac_82598EB) { u32 dmatxctl, rttdcs; +#ifdef PCI_IOV + enum ixgbe_iov_mode mode = ixgbe_get_iov_mode(adapter); +#endif dmatxctl = IXGBE_READ_REG(hw, IXGBE_DMATXCTL); dmatxctl |= IXGBE_DMATXCTL_TE; IXGBE_WRITE_REG(hw, IXGBE_DMATXCTL, dmatxctl); @@ -2792,7 +2911,11 @@ ixgbe_initialize_transmit_units(struct a rttdcs = IXGBE_READ_REG(hw, IXGBE_RTTDCS); rttdcs |= IXGBE_RTTDCS_ARBDIS; IXGBE_WRITE_REG(hw, IXGBE_RTTDCS, rttdcs); +#ifdef PCI_IOV + IXGBE_WRITE_REG(hw, IXGBE_MTQC, ixgbe_get_mtqc(mode)); +#else IXGBE_WRITE_REG(hw, IXGBE_MTQC, IXGBE_MTQC_64Q_1PB); +#endif rttdcs &= ~IXGBE_RTTDCS_ARBDIS; IXGBE_WRITE_REG(hw, IXGBE_RTTDCS, rttdcs); } @@ -2804,17 +2927,14 @@ static void ixgbe_initialise_rss_mapping(struct adapter *adapter) { struct ixgbe_hw *hw = &adapter->hw; - uint32_t reta; - int i, j, queue_id, table_size; - int index_mult; - uint32_t rss_key[10]; - uint32_t mrqc; + u32 reta = 0, mrqc, rss_key[10]; + int queue_id, table_size, index_mult; #ifdef RSS - uint32_t rss_hash_config; + u32 rss_hash_config; +#endif +#ifdef PCI_IOV + enum ixgbe_iov_mode mode; #endif - - /* Setup RSS */ - reta = 0; #ifdef RSS /* Fetch the configured RSS key */ @@ -2840,7 +2960,7 @@ ixgbe_initialise_rss_mapping(struct adap } /* Set up the redirection table */ - for (i = 0, j = 0; i < table_size; i++, j++) { + for (int i = 0, j = 0; i < table_size; i++, j++) { if (j == adapter->num_queues) j = 0; #ifdef RSS /* @@ -2907,19 +3027,16 @@ ixgbe_initialise_rss_mapping(struct adap mrqc = IXGBE_MRQC_RSSEN | IXGBE_MRQC_RSS_FIELD_IPV4 | IXGBE_MRQC_RSS_FIELD_IPV4_TCP -#if 0 - | IXGBE_MRQC_RSS_FIELD_IPV4_UDP -#endif | IXGBE_MRQC_RSS_FIELD_IPV6_EX_TCP | IXGBE_MRQC_RSS_FIELD_IPV6_EX | IXGBE_MRQC_RSS_FIELD_IPV6 | IXGBE_MRQC_RSS_FIELD_IPV6_TCP -#if 0 - | IXGBE_MRQC_RSS_FIELD_IPV6_UDP - | IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP -#endif ; #endif /* RSS */ +#ifdef PCI_IOV + mode = ixgbe_get_iov_mode(adapter); + mrqc |= ixgbe_get_mrqc(mode); +#endif IXGBE_WRITE_REG(hw, IXGBE_MRQC, mrqc); } @@ -2978,16 +3095,17 @@ ixgbe_initialize_receive_units(struct ad for (int i = 0; i < adapter->num_queues; i++, rxr++) { u64 rdba = rxr->rxdma.dma_paddr; + int j = rxr->me; /* Setup the Base and Length of the Rx Descriptor Ring */ - IXGBE_WRITE_REG(hw, IXGBE_RDBAL(i), + IXGBE_WRITE_REG(hw, IXGBE_RDBAL(j), (rdba & 0x00000000ffffffffULL)); - IXGBE_WRITE_REG(hw, IXGBE_RDBAH(i), (rdba >> 32)); - IXGBE_WRITE_REG(hw, IXGBE_RDLEN(i), + IXGBE_WRITE_REG(hw, IXGBE_RDBAH(j), (rdba >> 32)); + IXGBE_WRITE_REG(hw, IXGBE_RDLEN(j), adapter->num_rx_desc * sizeof(union ixgbe_adv_rx_desc)); /* Set up the SRRCTL register */ - srrctl = IXGBE_READ_REG(hw, IXGBE_SRRCTL(i)); + srrctl = IXGBE_READ_REG(hw, IXGBE_SRRCTL(j)); srrctl &= ~IXGBE_SRRCTL_BSIZEHDR_MASK; srrctl &= ~IXGBE_SRRCTL_BSIZEPKT_MASK; srrctl |= bufsz; @@ -2999,18 +3117,16 @@ ixgbe_initialize_receive_units(struct ad * so we do not need to clear the bit, but do it just in case * this code is moved elsewhere. */ - if (adapter->num_queues > 1 && - adapter->hw.fc.requested_mode == ixgbe_fc_none) { + if (adapter->num_queues > 1 && adapter->fc == ixgbe_fc_none) srrctl |= IXGBE_SRRCTL_DROP_EN; - } else { + else srrctl &= ~IXGBE_SRRCTL_DROP_EN; - } - IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(i), srrctl); + IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(j), srrctl); /* Setup the HW Rx Head and Tail Descriptor Pointers */ - IXGBE_WRITE_REG(hw, IXGBE_RDH(i), 0); - IXGBE_WRITE_REG(hw, IXGBE_RDT(i), 0); + IXGBE_WRITE_REG(hw, IXGBE_RDH(j), 0); + IXGBE_WRITE_REG(hw, IXGBE_RDT(j), 0); /* Set the processing limit */ rxr->process_limit = ixgbe_rx_process_limit; @@ -3126,9 +3242,9 @@ ixgbe_setup_vlan_hw_support(struct adapt rxr = &adapter->rx_rings[i]; /* On 82599 the VLAN enable is per/queue in RXDCTL */ if (hw->mac.type != ixgbe_mac_82598EB) { - ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i)); + ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(rxr->me)); ctrl |= IXGBE_RXDCTL_VME; - IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(i), ctrl); + IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(rxr->me), ctrl); } rxr->vtag_strip = TRUE; } @@ -3178,6 +3294,9 @@ ixgbe_enable_intr(struct adapter *adapte #ifdef IXGBE_FDIR mask |= IXGBE_EIMS_FLOW_DIR; #endif +#ifdef PCI_IOV + mask |= IXGBE_EIMS_MAILBOX; +#endif break; case ixgbe_mac_X540: /* Detect if Thermal Sensor is enabled */ @@ -3201,6 +3320,9 @@ ixgbe_enable_intr(struct adapter *adapte #ifdef IXGBE_FDIR mask |= IXGBE_EIMS_FLOW_DIR; #endif +#ifdef PCI_IOV + mask |= IXGBE_EIMS_MAILBOX; +#endif /* falls through */ default: break; @@ -3214,6 +3336,9 @@ ixgbe_enable_intr(struct adapter *adapte /* Don't autoclear Link */ mask &= ~IXGBE_EIMS_OTHER; mask &= ~IXGBE_EIMS_LSC; +#ifdef PCI_IOV + mask &= ~IXGBE_EIMS_MAILBOX; +#endif IXGBE_WRITE_REG(hw, IXGBE_EIAC, mask); } @@ -3412,8 +3537,8 @@ ixgbe_set_ivar(struct adapter *adapter, static void ixgbe_configure_ivars(struct adapter *adapter) { - struct ix_queue *que = adapter->queues; - u32 newitr; + struct ix_queue *que = adapter->queues; + u32 newitr; if (ixgbe_max_interrupt_rate > 0) newitr = (4000000 / ixgbe_max_interrupt_rate) & 0x0FF8; @@ -3427,10 +3552,12 @@ ixgbe_configure_ivars(struct adapter *ad } for (int i = 0; i < adapter->num_queues; i++, que++) { + struct rx_ring *rxr = &adapter->rx_rings[i]; + struct tx_ring *txr = &adapter->tx_rings[i]; /* First the RX queue entry */ - ixgbe_set_ivar(adapter, i, que->msix, 0); + ixgbe_set_ivar(adapter, rxr->me, que->msix, 0); /* ... and the TX */ - ixgbe_set_ivar(adapter, i, que->msix, 1); + ixgbe_set_ivar(adapter, txr->me, que->msix, 1); /* Set an Initial EITR value */ IXGBE_WRITE_REG(&adapter->hw, IXGBE_EITR(que->msix), newitr); @@ -3444,7 +3571,8 @@ ixgbe_configure_ivars(struct adapter *ad ** ixgbe_sfp_probe - called in the local timer to ** determine if a port had optics inserted. */ -static bool ixgbe_sfp_probe(struct adapter *adapter) +static bool +ixgbe_sfp_probe(struct adapter *adapter) { struct ixgbe_hw *hw = &adapter->hw; device_t dev = adapter->dev; @@ -3504,6 +3632,7 @@ ixgbe_handle_mod(void *context, int pend "Unsupported SFP+ module type was detected.\n"); return; } + err = hw->mac.ops.setup_sfp(hw); if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { device_printf(dev, @@ -3626,9 +3755,7 @@ ixgbe_check_eee_support(struct adapter * { struct ixgbe_hw *hw = &adapter->hw; - adapter->eee_support = adapter->eee_enabled = - (hw->device_id == IXGBE_DEV_ID_X550T || - hw->device_id == IXGBE_DEV_ID_X550EM_X_KR); + adapter->eee_enabled = !!(hw->mac.ops.setup_eee); } /* @@ -4004,8 +4131,7 @@ ixgbe_add_device_sysctls(struct adapter ixgbe_sysctl_dmac, "I", "DMA Coalesce"); /* for X550T and X550EM backplane devices */ - if (hw->device_id == IXGBE_DEV_ID_X550T || - hw->device_id == IXGBE_DEV_ID_X550EM_X_KR) { + if (hw->mac.ops.setup_eee) { struct sysctl_oid *eee_node; struct sysctl_oid_list *eee_list; @@ -4625,6 +4751,7 @@ static int ixgbe_sysctl_eee_enable(SYSCTL_HANDLER_ARGS) { struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; struct ifnet *ifp = adapter->ifp; int new_eee_enabled, error = 0; @@ -4635,7 +4762,7 @@ ixgbe_sysctl_eee_enable(SYSCTL_HANDLER_A if (new_eee_enabled == adapter->eee_enabled) return (0); - if (new_eee_enabled > 0 && !adapter->eee_support) + if (new_eee_enabled > 0 && !hw->mac.ops.setup_eee) return (ENODEV); else adapter->eee_enabled = !!(new_eee_enabled); @@ -4751,10 +4878,19 @@ ixgbe_enable_rx_drop(struct adapter *ada struct ixgbe_hw *hw = &adapter->hw; for (int i = 0; i < adapter->num_queues; i++) { - u32 srrctl = IXGBE_READ_REG(hw, IXGBE_SRRCTL(i)); + struct rx_ring *rxr = &adapter->rx_rings[i]; + u32 srrctl = IXGBE_READ_REG(hw, IXGBE_SRRCTL(rxr->me)); srrctl |= IXGBE_SRRCTL_DROP_EN; - IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(i), srrctl); + IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(rxr->me), srrctl); + } +#ifdef PCI_IOV + /* enable drop for each vf */ + for (int i = 0; i < adapter->num_vfs; i++) { + IXGBE_WRITE_REG(hw, IXGBE_QDE, + (IXGBE_QDE_WRITE | (i << IXGBE_QDE_IDX_SHIFT) | + IXGBE_QDE_ENABLE)); } +#endif } static void @@ -4763,10 +4899,18 @@ ixgbe_disable_rx_drop(struct adapter *ad struct ixgbe_hw *hw = &adapter->hw; for (int i = 0; i < adapter->num_queues; i++) { - u32 srrctl = IXGBE_READ_REG(hw, IXGBE_SRRCTL(i)); + struct rx_ring *rxr = &adapter->rx_rings[i]; + u32 srrctl = IXGBE_READ_REG(hw, IXGBE_SRRCTL(rxr->me)); srrctl &= ~IXGBE_SRRCTL_DROP_EN; - IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(i), srrctl); + IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(rxr->me), srrctl); } +#ifdef PCI_IOV + /* disable drop for each vf */ + for (int i = 0; i < adapter->num_vfs; i++) { + IXGBE_WRITE_REG(hw, IXGBE_QDE, + (IXGBE_QDE_WRITE | (i << IXGBE_QDE_IDX_SHIFT))); + } +#endif } static void @@ -4793,4 +4937,722 @@ ixgbe_rearm_queues(struct adapter *adapt } } +#ifdef PCI_IOV + +/* +** Support functions for SRIOV/VF management +*/ + +static void +ixgbe_ping_all_vfs(struct adapter *adapter) +{ + struct ixgbe_vf *vf; + + for (int i = 0; i < adapter->num_vfs; i++) { + vf = &adapter->vfs[i]; + if (vf->flags & IXGBE_VF_ACTIVE) + ixgbe_send_vf_msg(adapter, vf, IXGBE_PF_CONTROL_MSG); + } +} + + +static void +ixgbe_vf_set_default_vlan(struct adapter *adapter, struct ixgbe_vf *vf, + uint16_t tag) +{ + struct ixgbe_hw *hw; + uint32_t vmolr, vmvir; + + hw = &adapter->hw; + + vf->vlan_tag = tag; + + vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf->pool)); + + /* Do not receive packets that pass inexact filters. */ + vmolr &= ~(IXGBE_VMOLR_ROMPE | IXGBE_VMOLR_ROPE); + + /* Disable Multicast Promicuous Mode. */ + vmolr &= ~IXGBE_VMOLR_MPE; + + /* Accept broadcasts. */ + vmolr |= IXGBE_VMOLR_BAM; + + if (tag == 0) { + /* Accept non-vlan tagged traffic. */ + //vmolr |= IXGBE_VMOLR_AUPE; + + /* Allow VM to tag outgoing traffic; no default tag. */ + vmvir = 0; + } else { + /* Require vlan-tagged traffic. */ + vmolr &= ~IXGBE_VMOLR_AUPE; + + /* Tag all traffic with provided vlan tag. */ + vmvir = (tag | IXGBE_VMVIR_VLANA_DEFAULT); + } + IXGBE_WRITE_REG(hw, IXGBE_VMOLR(vf->pool), vmolr); + IXGBE_WRITE_REG(hw, IXGBE_VMVIR(vf->pool), vmvir); +} + + +static boolean_t +ixgbe_vf_frame_size_compatible(struct adapter *adapter, struct ixgbe_vf *vf) +{ + + /* + * Frame size compatibility between PF and VF is only a problem on + * 82599-based cards. X540 and later support any combination of jumbo + * frames on PFs and VFs. + */ + if (adapter->hw.mac.type != ixgbe_mac_82599EB) + return (TRUE); + + switch (vf->api_ver) { + case IXGBE_API_VER_1_0: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 17:18:09 2015 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB90070E; Mon, 1 Jun 2015 17:18:08 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Mon, 1 Jun 2015 17:18:05 +0000 From: Glen Barber To: Jack F Vogel Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283881 - in head: head head/sys head/sys/dev head/sys/dev/ixgbe head/sys/modules head/sys/modules/ixv sys/dev/ixgbe sys/modules/ixv Message-ID: <20150601171805.GF1534@hub.FreeBSD.org> References: <201506011715.t51HFPCZ094574@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="NQTVMVnDVuULnIzU" Content-Disposition: inline In-Reply-To: <201506011715.t51HFPCZ094574@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 X-PEKBAC-Definition: Problem Exists, Keyboard Between Admin/Computer User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 17:18:09 -0000 --NQTVMVnDVuULnIzU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 01, 2015 at 05:15:25PM +0000, Jack F Vogel wrote: > Author: jfv > Date: Mon Jun 1 17:15:25 2015 > New Revision: 283881 > URL: https://svnweb.freebsd.org/changeset/base/283881 >=20 > Log: > Delta D2489 - Add SRIOV support to the Intel 10G driver. > =20 > NOTE: This is a technology preview, while it has undergone development > tests, Intel has not yet completed full validation of the feature. > It is being integrated for early access and customer testing. >=20 > Added: > head/head/ > head/head/sys/ > head/head/sys/dev/ > head/head/sys/dev/ixgbe/ > head/head/sys/modules/ > head/head/sys/modules/ixv/ This is wrong. Glen --NQTVMVnDVuULnIzU Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVbJPNAAoJEAMUWKVHj+KTLr8P/2QbOHznonfsv5c2PfMC3a7H J37S2zBK81eRmjk1HHpXws83dYPbFW24BGBCTxuWHjWZ1mwSIlBdbl02VlpT3wdc R3YZM8esz+JGlJH66kNmR7NHNBNb1e0np9WrHcGx76zC5QLPu5DK08tAkU1sQKMb 0O87uREcnMsVdAK/aet1GHE2GI2yVsr5FlpOPvyiRRLBLH8qW7hDE20EU26tj+qI U6p4kwRjntSo2Zv2GB+llDsfO+5x+7v/DaNNrzKBHfW7FkbtRBJMyOzFFpO6gb2T CAMcwDFeTpST9tqbeXnN0Cub2QIdDbMCP2CdIRTbitgPKN7BcDIxFYEPCmqD2YHR 4KyRFrJAREGPX+49ZWCIMAD8yO52mjTAP+uGW041Cb/Eig9JogUNssrz1T94SsTt xEefhGyORw0oPrOLTWozOKeSlnC5rXZ6LIj/AUk8a1XGtOQS3GjqGOiK9FuAi/Gq hdm/92/BcY9bybbTpcMtPwY5cgf+DsRzIEtduPWNEmO5nQA+YbC/gb28OYvxUw8Z hI4cZ8P3LnnykUA1CNJOvseF9khCN8p3aBPwoJfZ1iGwoRWANmDWpcnx4NDM5hJ7 P2adxeILtDRojDUuIuvclYJA4MPVL2r9J6Wmazra+Ad37z1owIcO5gzHRjKbSBVH zsRKFQscHC476OLgBP8a =pYFP -----END PGP SIGNATURE----- --NQTVMVnDVuULnIzU-- From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 17:35:30 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E878C11; Mon, 1 Jun 2015 17:35:30 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C7F4135D; Mon, 1 Jun 2015 17:35:30 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51HZU4g006707; Mon, 1 Jun 2015 17:35:30 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51HZURp006704; Mon, 1 Jun 2015 17:35:30 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201506011735.t51HZURp006704@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Mon, 1 Jun 2015 17:35:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283882 - in head: head sys/dev/ixgbe sys/modules/ixv 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 17:35:30 -0000 Author: jfv Date: Mon Jun 1 17:35:29 2015 New Revision: 283882 URL: https://svnweb.freebsd.org/changeset/base/283882 Log: Revert last commit, to remove added skeleton tree. Deleted: head/head/ Modified: head/sys/dev/ixgbe/if_ix.c head/sys/dev/ixgbe/if_ixv.c head/sys/dev/ixgbe/ix_txrx.c head/sys/dev/ixgbe/ixgbe.h head/sys/dev/ixgbe/ixgbe_mbx.h head/sys/dev/ixgbe/ixgbe_vf.c head/sys/modules/ixv/Makefile Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Mon Jun 1 17:15:25 2015 (r283881) +++ head/sys/dev/ixgbe/if_ix.c Mon Jun 1 17:35:29 2015 (r283882) @@ -54,7 +54,7 @@ int ixgbe_display_debug_stat /********************************************************************* * Driver version *********************************************************************/ -char ixgbe_driver_version[] = "3.1.0"; +char ixgbe_driver_version[] = "2.8.3"; /********************************************************************* * PCI Device ID Table @@ -138,7 +138,6 @@ static int ixgbe_setup_msix(struct adapt static void ixgbe_free_pci_resources(struct adapter *); static void ixgbe_local_timer(void *); static int ixgbe_setup_interface(device_t, struct adapter *); -static void ixgbe_config_gpie(struct adapter *); static void ixgbe_config_dmac(struct adapter *); static void ixgbe_config_delay_values(struct adapter *); static void ixgbe_config_link(struct adapter *); @@ -205,18 +204,6 @@ static void ixgbe_handle_phy(void *, int static void ixgbe_reinit_fdir(void *, int); #endif -#ifdef PCI_IOV -static void ixgbe_ping_all_vfs(struct adapter *); -static void ixgbe_handle_mbx(void *, int); -static int ixgbe_init_iov(device_t, u16, const nvlist_t *); -static void ixgbe_uninit_iov(device_t); -static int ixgbe_add_vf(device_t, u16, const nvlist_t *); -static void ixgbe_initialize_iov(struct adapter *); -static void ixgbe_recalculate_max_frame(struct adapter *); -static void ixgbe_init_vf(struct adapter *, struct ixgbe_vf *); -#endif /* PCI_IOV */ - - /********************************************************************* * FreeBSD Device Interface Entry Points *********************************************************************/ @@ -229,11 +216,6 @@ static device_method_t ix_methods[] = { DEVMETHOD(device_shutdown, ixgbe_shutdown), DEVMETHOD(device_suspend, ixgbe_suspend), DEVMETHOD(device_resume, ixgbe_resume), -#ifdef PCI_IOV - DEVMETHOD(pci_init_iov, ixgbe_init_iov), - DEVMETHOD(pci_uninit_iov, ixgbe_uninit_iov), - DEVMETHOD(pci_add_vf, ixgbe_add_vf), -#endif /* PCI_IOV */ DEVMETHOD_END }; @@ -359,8 +341,6 @@ static int fdir_pballoc = 1; #include #endif /* DEV_NETMAP */ -static MALLOC_DEFINE(M_IXGBE, "ix", "ix driver allocations"); - /********************************************************************* * Device identification routine * @@ -492,7 +472,7 @@ ixgbe_attach(device_t dev) } /* Allocate multicast array memory. */ - adapter->mta = malloc(sizeof(*adapter->mta) * + adapter->mta = malloc(sizeof(u8) * IXGBE_ETH_LENGTH_OF_ADDRESS * MAX_NUM_MULTICAST_ADDRESSES, M_DEVBUF, M_NOWAIT); if (adapter->mta == NULL) { device_printf(dev, "Can not allocate multicast setup array\n"); @@ -578,28 +558,6 @@ ixgbe_attach(device_t dev) /* Set an initial default flow control value */ adapter->fc = ixgbe_fc_full; -#ifdef PCI_IOV - if ((hw->mac.type != ixgbe_mac_82598EB) && (adapter->msix > 1)) { - nvlist_t *pf_schema, *vf_schema; - - hw->mbx.ops.init_params(hw); - pf_schema = pci_iov_schema_alloc_node(); - vf_schema = pci_iov_schema_alloc_node(); - pci_iov_schema_add_unicast_mac(vf_schema, "mac-addr", 0, NULL); - pci_iov_schema_add_bool(vf_schema, "mac-anti-spoof", - IOV_SCHEMA_HASDEFAULT, TRUE); - pci_iov_schema_add_bool(vf_schema, "allow-set-mac", - IOV_SCHEMA_HASDEFAULT, FALSE); - pci_iov_schema_add_bool(vf_schema, "allow-promisc", - IOV_SCHEMA_HASDEFAULT, FALSE); - error = pci_iov_attach(dev, pf_schema, vf_schema); - if (error != 0) { - device_printf(dev, - "Error %d setting up SR-IOV\n", error); - } - } -#endif /* PCI_IOV */ - /* Check for certain supported features */ ixgbe_check_wol_support(adapter); ixgbe_check_eee_support(adapter); @@ -656,13 +614,6 @@ ixgbe_detach(device_t dev) return (EBUSY); } -#ifdef PCI_IOV - if (pci_iov_detach(dev) != 0) { - device_printf(dev, "SR-IOV in use; detach first.\n"); - return (EBUSY); - } -#endif /* PCI_IOV */ - /* Stop the adapter */ IXGBE_CORE_LOCK(adapter); ixgbe_setup_low_power_mode(adapter); @@ -683,9 +634,6 @@ ixgbe_detach(device_t dev) taskqueue_drain(adapter->tq, &adapter->link_task); taskqueue_drain(adapter->tq, &adapter->mod_task); taskqueue_drain(adapter->tq, &adapter->msf_task); -#ifdef PCI_IOV - taskqueue_drain(adapter->tq, &adapter->mbx_task); -#endif taskqueue_drain(adapter->tq, &adapter->phy_task); #ifdef IXGBE_FDIR taskqueue_drain(adapter->tq, &adapter->fdir_task); @@ -862,9 +810,6 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c adapter->max_frame_size = ifp->if_mtu + IXGBE_MTU_HDR; ixgbe_init_locked(adapter); -#ifdef PCI_IOV - ixgbe_recalculate_max_frame(adapter); -#endif IXGBE_CORE_UNLOCK(adapter); } break; @@ -980,36 +925,22 @@ ixgbe_init_locked(struct adapter *adapte struct ifnet *ifp = adapter->ifp; device_t dev = adapter->dev; struct ixgbe_hw *hw = &adapter->hw; - struct tx_ring *txr; - struct rx_ring *rxr; - u32 txdctl, mhadd; + u32 k, txdctl, mhadd, gpie; u32 rxdctl, rxctrl; -#ifdef PCI_IOV - enum ixgbe_iov_mode mode; -#endif mtx_assert(&adapter->core_mtx, MA_OWNED); INIT_DEBUGOUT("ixgbe_init_locked: begin"); - hw->adapter_stopped = FALSE; ixgbe_stop_adapter(hw); callout_stop(&adapter->timer); -#ifdef PCI_IOV - mode = ixgbe_get_iov_mode(adapter); - adapter->pool = ixgbe_max_vfs(mode); - /* Queue indices may change with IOV mode */ - for (int i = 0; i < adapter->num_queues; i++) { - adapter->rx_rings[i].me = ixgbe_pf_que_index(mode, i); - adapter->tx_rings[i].me = ixgbe_pf_que_index(mode, i); - } -#endif /* reprogram the RAR[0] in case user changed it. */ - ixgbe_set_rar(hw, 0, hw->mac.addr, adapter->pool, IXGBE_RAH_AV); + ixgbe_set_rar(hw, 0, adapter->hw.mac.addr, 0, IXGBE_RAH_AV); /* Get the latest mac address, User can use a LAA */ - bcopy(IF_LLADDR(ifp), hw->mac.addr, IXGBE_ETH_LENGTH_OF_ADDRESS); - ixgbe_set_rar(hw, 0, hw->mac.addr, adapter->pool, 1); + bcopy(IF_LLADDR(adapter->ifp), hw->mac.addr, + IXGBE_ETH_LENGTH_OF_ADDRESS); + ixgbe_set_rar(hw, 0, hw->mac.addr, 0, 1); hw->addr_ctrl.rar_used_count = 1; /* Set the various hardware offload abilities */ @@ -1032,9 +963,6 @@ ixgbe_init_locked(struct adapter *adapte } ixgbe_init_hw(hw); -#ifdef PCI_IOV - ixgbe_initialize_iov(adapter); -#endif ixgbe_initialize_transmit_units(adapter); /* Setup Multicast table */ @@ -1044,10 +972,14 @@ ixgbe_init_locked(struct adapter *adapte ** Determine the correct mbuf pool ** for doing jumbo frames */ - if (adapter->max_frame_size <= MCLBYTES) + if (adapter->max_frame_size <= 2048) adapter->rx_mbuf_sz = MCLBYTES; - else + else if (adapter->max_frame_size <= 4096) adapter->rx_mbuf_sz = MJUMPAGESIZE; + else if (adapter->max_frame_size <= 9216) + adapter->rx_mbuf_sz = MJUM9BYTES; + else + adapter->rx_mbuf_sz = MJUM16BYTES; /* Prepare receive descriptors and buffers */ if (ixgbe_setup_receive_structures(adapter)) { @@ -1059,8 +991,31 @@ ixgbe_init_locked(struct adapter *adapte /* Configure RX settings */ ixgbe_initialize_receive_units(adapter); - /* Enable SDP & MSIX interrupts based on adapter */ - ixgbe_config_gpie(adapter); + gpie = IXGBE_READ_REG(&adapter->hw, IXGBE_GPIE); + + /* Enable Fan Failure Interrupt */ + gpie |= IXGBE_SDP1_GPIEN_BY_MAC(hw); + + /* Add for Module detection */ + if (hw->mac.type == ixgbe_mac_82599EB) + gpie |= IXGBE_SDP2_GPIEN; + + /* + * Thermal Failure Detection (X540) + * Link Detection (X552) + */ + if (hw->mac.type == ixgbe_mac_X540 || + hw->device_id == IXGBE_DEV_ID_X550EM_X_SFP || + hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T) + gpie |= IXGBE_SDP0_GPIEN_X540; + + if (adapter->msix > 1) { + /* Enable Enhanced MSIX mode */ + gpie |= IXGBE_GPIE_MSIX_MODE; + gpie |= IXGBE_GPIE_EIAME | IXGBE_GPIE_PBA_SUPPORT | + IXGBE_GPIE_OCD; + } + IXGBE_WRITE_REG(hw, IXGBE_GPIE, gpie); /* Set MTU size */ if (ifp->if_mtu > ETHERMTU) { @@ -1073,8 +1028,7 @@ ixgbe_init_locked(struct adapter *adapte /* Now enable all the queues */ for (int i = 0; i < adapter->num_queues; i++) { - txr = &adapter->tx_rings[i]; - txdctl = IXGBE_READ_REG(hw, IXGBE_TXDCTL(txr->me)); + txdctl = IXGBE_READ_REG(hw, IXGBE_TXDCTL(i)); txdctl |= IXGBE_TXDCTL_ENABLE; /* Set WTHRESH to 8, burst writeback */ txdctl |= (8 << 16); @@ -1086,12 +1040,11 @@ ixgbe_init_locked(struct adapter *adapte * Prefetching enables tx line rate even with 1 queue. */ txdctl |= (32 << 0) | (1 << 8); - IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(txr->me), txdctl); + IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(i), txdctl); } - for (int i = 0, j = 0; i < adapter->num_queues; i++) { - rxr = &adapter->rx_rings[i]; - rxdctl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(rxr->me)); + for (int i = 0; i < adapter->num_queues; i++) { + rxdctl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i)); if (hw->mac.type == ixgbe_mac_82598EB) { /* ** PTHRESH = 21 @@ -1102,9 +1055,9 @@ ixgbe_init_locked(struct adapter *adapte rxdctl |= 0x080420; } rxdctl |= IXGBE_RXDCTL_ENABLE; - IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(rxr->me), rxdctl); - for (; j < 10; j++) { - if (IXGBE_READ_REG(hw, IXGBE_RXDCTL(rxr->me)) & + IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(i), rxdctl); + for (k = 0; k < 10; k++) { + if (IXGBE_READ_REG(hw, IXGBE_RXDCTL(i)) & IXGBE_RXDCTL_ENABLE) break; else @@ -1133,10 +1086,10 @@ ixgbe_init_locked(struct adapter *adapte struct netmap_kring *kring = &na->rx_rings[i]; int t = na->num_rx_desc - 1 - nm_kr_rxspace(kring); - IXGBE_WRITE_REG(hw, IXGBE_RDT(rxr->me), t); + IXGBE_WRITE_REG(hw, IXGBE_RDT(i), t); } else #endif /* DEV_NETMAP */ - IXGBE_WRITE_REG(hw, IXGBE_RDT(rxr->me), adapter->num_rx_desc - 1); + IXGBE_WRITE_REG(hw, IXGBE_RDT(i), adapter->num_rx_desc - 1); } /* Enable Receive engine */ @@ -1175,9 +1128,9 @@ ixgbe_init_locked(struct adapter *adapte #endif /* - * Check on any SFP devices that - * need to be kick-started - */ + ** Check on any SFP devices that + ** need to be kick-started + */ if (hw->phy.type == ixgbe_phy_none) { int err = hw->phy.ops.identify(hw); if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { @@ -1191,7 +1144,8 @@ ixgbe_init_locked(struct adapter *adapte IXGBE_WRITE_REG(hw, IXGBE_EITR(adapter->vector), IXGBE_LINK_ITR); /* Configure Energy Efficient Ethernet for supported devices */ - ixgbe_setup_eee(hw, adapter->eee_enabled); + if (adapter->eee_support) + ixgbe_setup_eee(hw, adapter->eee_enabled); /* Config/Enable Link */ ixgbe_config_link(adapter); @@ -1211,15 +1165,6 @@ ixgbe_init_locked(struct adapter *adapte /* And now turn on interrupts */ ixgbe_enable_intr(adapter); -#ifdef PCI_IOV - /* Enable the use of the MBX by the VF's */ - { - u32 reg = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT); - reg |= IXGBE_CTRL_EXT_PFRSTD; - IXGBE_WRITE_REG(hw, IXGBE_CTRL_EXT, reg); - } -#endif - /* Now inform the stack we're ready */ ifp->if_drv_flags |= IFF_DRV_RUNNING; @@ -1238,51 +1183,6 @@ ixgbe_init(void *arg) } static void -ixgbe_config_gpie(struct adapter *adapter) -{ - struct ixgbe_hw *hw = &adapter->hw; - u32 gpie; - - gpie = IXGBE_READ_REG(hw, IXGBE_GPIE); - - /* Fan Failure Interrupt */ - if (hw->device_id == IXGBE_DEV_ID_82598AT) - gpie |= IXGBE_SDP1_GPIEN; - - /* - * Module detection (SDP2) - * Media ready (SDP1) - */ - if (hw->mac.type == ixgbe_mac_82599EB) { - gpie |= IXGBE_SDP2_GPIEN; - if (hw->device_id != IXGBE_DEV_ID_82599_QSFP_SF_QP) - gpie |= IXGBE_SDP1_GPIEN; - } - - /* - * Thermal Failure Detection (X540) - * Link Detection (X557) - */ - if (hw->mac.type == ixgbe_mac_X540 || - hw->device_id == IXGBE_DEV_ID_X550EM_X_SFP || - hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T) - gpie |= IXGBE_SDP0_GPIEN_X540; - - if (adapter->msix > 1) { - /* Enable Enhanced MSIX mode */ - gpie |= IXGBE_GPIE_MSIX_MODE; - gpie |= IXGBE_GPIE_EIAME | IXGBE_GPIE_PBA_SUPPORT | - IXGBE_GPIE_OCD; - } - - IXGBE_WRITE_REG(hw, IXGBE_GPIE, gpie); - return; -} - -/* - * Requires adapter->max_frame_size to be set. - */ -static void ixgbe_config_delay_values(struct adapter *adapter) { struct ixgbe_hw *hw = &adapter->hw; @@ -1376,9 +1276,10 @@ ixgbe_handle_que(void *context, int pend struct adapter *adapter = que->adapter; struct tx_ring *txr = que->txr; struct ifnet *ifp = adapter->ifp; + bool more; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - ixgbe_rxeof(que); + more = ixgbe_rxeof(que); IXGBE_TX_LOCK(txr); ixgbe_txeof(txr); #ifndef IXGBE_LEGACY_TX @@ -1440,8 +1341,8 @@ ixgbe_legacy_irq(void *arg) IXGBE_TX_UNLOCK(txr); /* Check for fan failure */ - if ((hw->device_id == IXGBE_DEV_ID_82598AT) && - (reg_eicr & IXGBE_EICR_GPI_SDP1)) { + if ((hw->phy.media_type == ixgbe_media_type_copper) && + (reg_eicr & IXGBE_EICR_GPI_SDP1_BY_MAC(hw))) { device_printf(adapter->dev, "\nCRITICAL: FAN FAILURE!! " "REPLACE IMMEDIATELY!!\n"); IXGBE_WRITE_REG(hw, IXGBE_EIMS, IXGBE_EICR_GPI_SDP1_BY_MAC(hw)); @@ -1480,7 +1381,6 @@ ixgbe_msix_que(void *arg) bool more; u32 newitr = 0; - /* Protect against spurious interrupts */ if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; @@ -1604,10 +1504,6 @@ ixgbe_msix_link(void *arg) device_printf(adapter->dev, "System shutdown required!\n"); IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_TS); } -#ifdef PCI_IOV - if (reg_eicr & IXGBE_EICR_MAILBOX) - taskqueue_enqueue(adapter->tq, &adapter->mbx_task); -#endif } /* Pluggable optics-related interrupt */ @@ -1673,7 +1569,7 @@ ixgbe_media_status(struct ifnet * ifp, s } ifmr->ifm_status |= IFM_ACTIVE; - layer = adapter->phy_layer; + layer = ixgbe_get_supported_physical_layer(hw); if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_T || layer & IXGBE_PHYSICAL_LAYER_1000BASE_T || @@ -1906,17 +1802,18 @@ ixgbe_set_promisc(struct adapter *adapte static void ixgbe_set_multi(struct adapter *adapter) { - u32 fctrl; - u8 *update_ptr; - struct ifmultiaddr *ifma; - struct ixgbe_mc_addr *mta; - int mcnt = 0; - struct ifnet *ifp = adapter->ifp; + u32 fctrl; + u8 *mta; + u8 *update_ptr; + struct ifmultiaddr *ifma; + int mcnt = 0; + struct ifnet *ifp = adapter->ifp; IOCTL_DEBUGOUT("ixgbe_set_multi: begin"); mta = adapter->mta; - bzero(mta, sizeof(*mta) * MAX_NUM_MULTICAST_ADDRESSES); + bzero(mta, sizeof(u8) * IXGBE_ETH_LENGTH_OF_ADDRESS * + MAX_NUM_MULTICAST_ADDRESSES); #if __FreeBSD_version < 800000 IF_ADDR_LOCK(ifp); @@ -1929,8 +1826,8 @@ ixgbe_set_multi(struct adapter *adapter) if (mcnt == MAX_NUM_MULTICAST_ADDRESSES) break; bcopy(LLADDR((struct sockaddr_dl *) ifma->ifma_addr), - mta[mcnt].addr, IXGBE_ETH_LENGTH_OF_ADDRESS); - mta[mcnt].vmdq = adapter->pool; + &mta[mcnt * IXGBE_ETH_LENGTH_OF_ADDRESS], + IXGBE_ETH_LENGTH_OF_ADDRESS); mcnt++; } #if __FreeBSD_version < 800000 @@ -1953,7 +1850,7 @@ ixgbe_set_multi(struct adapter *adapter) IXGBE_WRITE_REG(&adapter->hw, IXGBE_FCTRL, fctrl); if (mcnt < MAX_NUM_MULTICAST_ADDRESSES) { - update_ptr = (u8 *)mta; + update_ptr = mta; ixgbe_update_mc_addr_list(&adapter->hw, update_ptr, mcnt, ixgbe_mc_array_itr, TRUE); } @@ -1969,13 +1866,13 @@ ixgbe_set_multi(struct adapter *adapter) static u8 * ixgbe_mc_array_itr(struct ixgbe_hw *hw, u8 **update_ptr, u32 *vmdq) { - struct ixgbe_mc_addr *mta; - - mta = (struct ixgbe_mc_addr *)*update_ptr; - *vmdq = mta->vmdq; - - *update_ptr = (u8*)(mta + 1);; - return (mta->addr); + u8 *addr = *update_ptr; + u8 *newptr; + *vmdq = 0; + + newptr = addr + IXGBE_ETH_LENGTH_OF_ADDRESS; + *update_ptr = newptr; + return addr; } @@ -2057,7 +1954,6 @@ watchdog: ixgbe_init_locked(adapter); } - /* ** Note: this routine updates the OS on the link state ** the real check of the hardware only happens with @@ -2081,9 +1977,6 @@ ixgbe_update_link_status(struct adapter /* Update DMA coalescing config */ ixgbe_config_dmac(adapter); if_link_state_change(ifp, LINK_STATE_UP); -#ifdef PCI_IOV - ixgbe_ping_all_vfs(adapter); -#endif } } else { /* Link down */ if (adapter->link_active == TRUE) { @@ -2091,9 +1984,6 @@ ixgbe_update_link_status(struct adapter device_printf(dev,"Link is Down\n"); if_link_state_change(ifp, LINK_STATE_DOWN); adapter->link_active = FALSE; -#ifdef PCI_IOV - ixgbe_ping_all_vfs(adapter); -#endif } } @@ -2193,7 +2083,7 @@ ixgbe_setup_optics(struct adapter *adapt struct ixgbe_hw *hw = &adapter->hw; int layer; - layer = adapter->phy_layer = ixgbe_get_supported_physical_layer(hw); + layer = ixgbe_get_supported_physical_layer(hw); if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_T) { adapter->optics = IFM_10G_T; @@ -2391,19 +2281,17 @@ ixgbe_allocate_msix(struct adapter *adap #endif if (adapter->num_queues > 1) bus_bind_intr(dev, que->res, cpu_id); -#ifdef IXGBE_DEBUG + #ifdef RSS device_printf(dev, "Bound RSS bucket %d to CPU %d\n", i, cpu_id); #else - device_printf(dev, - "Bound queue %d to cpu %d\n", - i, cpu_id); + if (bootverbose) + device_printf(dev, + "Bound queue %d to cpu %d\n", + i, cpu_id); #endif -#endif /* IXGBE_DEBUG */ - - #ifndef IXGBE_LEGACY_TX TASK_INIT(&txr->txq_task, 0, ixgbe_deferred_mq_start, txr); #endif @@ -2449,9 +2337,6 @@ ixgbe_allocate_msix(struct adapter *adap TASK_INIT(&adapter->link_task, 0, ixgbe_handle_link, adapter); TASK_INIT(&adapter->mod_task, 0, ixgbe_handle_mod, adapter); TASK_INIT(&adapter->msf_task, 0, ixgbe_handle_msf, adapter); -#ifdef PCI_IOV - TASK_INIT(&adapter->mbx_task, 0, ixgbe_handle_mbx, adapter); -#endif TASK_INIT(&adapter->phy_task, 0, ixgbe_handle_phy, adapter); #ifdef IXGBE_FDIR TASK_INIT(&adapter->fdir_task, 0, ixgbe_reinit_fdir, adapter); @@ -2745,7 +2630,7 @@ ixgbe_add_media_types(struct adapter *ad device_t dev = adapter->dev; int layer; - layer = adapter->phy_layer = ixgbe_get_supported_physical_layer(hw); + layer = ixgbe_get_supported_physical_layer(hw); /* Media types with matching FreeBSD media defines */ if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_T) @@ -2856,20 +2741,19 @@ ixgbe_initialize_transmit_units(struct a for (int i = 0; i < adapter->num_queues; i++, txr++) { u64 tdba = txr->txdma.dma_paddr; u32 txctrl = 0; - int j = txr->me; - IXGBE_WRITE_REG(hw, IXGBE_TDBAL(j), + IXGBE_WRITE_REG(hw, IXGBE_TDBAL(i), (tdba & 0x00000000ffffffffULL)); - IXGBE_WRITE_REG(hw, IXGBE_TDBAH(j), (tdba >> 32)); - IXGBE_WRITE_REG(hw, IXGBE_TDLEN(j), + IXGBE_WRITE_REG(hw, IXGBE_TDBAH(i), (tdba >> 32)); + IXGBE_WRITE_REG(hw, IXGBE_TDLEN(i), adapter->num_tx_desc * sizeof(union ixgbe_adv_tx_desc)); /* Setup the HW Tx Head and Tail descriptor pointers */ - IXGBE_WRITE_REG(hw, IXGBE_TDH(j), 0); - IXGBE_WRITE_REG(hw, IXGBE_TDT(j), 0); + IXGBE_WRITE_REG(hw, IXGBE_TDH(i), 0); + IXGBE_WRITE_REG(hw, IXGBE_TDT(i), 0); /* Cache the tail address */ - txr->tail = IXGBE_TDT(j); + txr->tail = IXGBE_TDT(txr->me); /* Set the processing limit */ txr->process_limit = ixgbe_tx_process_limit; @@ -2877,23 +2761,23 @@ ixgbe_initialize_transmit_units(struct a /* Disable Head Writeback */ switch (hw->mac.type) { case ixgbe_mac_82598EB: - txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(j)); + txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(i)); break; case ixgbe_mac_82599EB: case ixgbe_mac_X540: default: - txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(j)); + txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(i)); break; } txctrl &= ~IXGBE_DCA_TXCTRL_DESC_WRO_EN; switch (hw->mac.type) { case ixgbe_mac_82598EB: - IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(j), txctrl); + IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(i), txctrl); break; case ixgbe_mac_82599EB: case ixgbe_mac_X540: default: - IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(j), txctrl); + IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(i), txctrl); break; } @@ -2901,9 +2785,6 @@ ixgbe_initialize_transmit_units(struct a if (hw->mac.type != ixgbe_mac_82598EB) { u32 dmatxctl, rttdcs; -#ifdef PCI_IOV - enum ixgbe_iov_mode mode = ixgbe_get_iov_mode(adapter); -#endif dmatxctl = IXGBE_READ_REG(hw, IXGBE_DMATXCTL); dmatxctl |= IXGBE_DMATXCTL_TE; IXGBE_WRITE_REG(hw, IXGBE_DMATXCTL, dmatxctl); @@ -2911,11 +2792,7 @@ ixgbe_initialize_transmit_units(struct a rttdcs = IXGBE_READ_REG(hw, IXGBE_RTTDCS); rttdcs |= IXGBE_RTTDCS_ARBDIS; IXGBE_WRITE_REG(hw, IXGBE_RTTDCS, rttdcs); -#ifdef PCI_IOV - IXGBE_WRITE_REG(hw, IXGBE_MTQC, ixgbe_get_mtqc(mode)); -#else IXGBE_WRITE_REG(hw, IXGBE_MTQC, IXGBE_MTQC_64Q_1PB); -#endif rttdcs &= ~IXGBE_RTTDCS_ARBDIS; IXGBE_WRITE_REG(hw, IXGBE_RTTDCS, rttdcs); } @@ -2927,15 +2804,18 @@ static void ixgbe_initialise_rss_mapping(struct adapter *adapter) { struct ixgbe_hw *hw = &adapter->hw; - u32 reta = 0, mrqc, rss_key[10]; - int queue_id, table_size, index_mult; + uint32_t reta; + int i, j, queue_id, table_size; + int index_mult; + uint32_t rss_key[10]; + uint32_t mrqc; #ifdef RSS - u32 rss_hash_config; -#endif -#ifdef PCI_IOV - enum ixgbe_iov_mode mode; + uint32_t rss_hash_config; #endif + /* Setup RSS */ + reta = 0; + #ifdef RSS /* Fetch the configured RSS key */ rss_getkey((uint8_t *) &rss_key); @@ -2960,7 +2840,7 @@ ixgbe_initialise_rss_mapping(struct adap } /* Set up the redirection table */ - for (int i = 0, j = 0; i < table_size; i++, j++) { + for (i = 0, j = 0; i < table_size; i++, j++) { if (j == adapter->num_queues) j = 0; #ifdef RSS /* @@ -3027,16 +2907,19 @@ ixgbe_initialise_rss_mapping(struct adap mrqc = IXGBE_MRQC_RSSEN | IXGBE_MRQC_RSS_FIELD_IPV4 | IXGBE_MRQC_RSS_FIELD_IPV4_TCP +#if 0 + | IXGBE_MRQC_RSS_FIELD_IPV4_UDP +#endif | IXGBE_MRQC_RSS_FIELD_IPV6_EX_TCP | IXGBE_MRQC_RSS_FIELD_IPV6_EX | IXGBE_MRQC_RSS_FIELD_IPV6 | IXGBE_MRQC_RSS_FIELD_IPV6_TCP +#if 0 + | IXGBE_MRQC_RSS_FIELD_IPV6_UDP + | IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP +#endif ; #endif /* RSS */ -#ifdef PCI_IOV - mode = ixgbe_get_iov_mode(adapter); - mrqc |= ixgbe_get_mrqc(mode); -#endif IXGBE_WRITE_REG(hw, IXGBE_MRQC, mrqc); } @@ -3095,17 +2978,16 @@ ixgbe_initialize_receive_units(struct ad for (int i = 0; i < adapter->num_queues; i++, rxr++) { u64 rdba = rxr->rxdma.dma_paddr; - int j = rxr->me; /* Setup the Base and Length of the Rx Descriptor Ring */ - IXGBE_WRITE_REG(hw, IXGBE_RDBAL(j), + IXGBE_WRITE_REG(hw, IXGBE_RDBAL(i), (rdba & 0x00000000ffffffffULL)); - IXGBE_WRITE_REG(hw, IXGBE_RDBAH(j), (rdba >> 32)); - IXGBE_WRITE_REG(hw, IXGBE_RDLEN(j), + IXGBE_WRITE_REG(hw, IXGBE_RDBAH(i), (rdba >> 32)); + IXGBE_WRITE_REG(hw, IXGBE_RDLEN(i), adapter->num_rx_desc * sizeof(union ixgbe_adv_rx_desc)); /* Set up the SRRCTL register */ - srrctl = IXGBE_READ_REG(hw, IXGBE_SRRCTL(j)); + srrctl = IXGBE_READ_REG(hw, IXGBE_SRRCTL(i)); srrctl &= ~IXGBE_SRRCTL_BSIZEHDR_MASK; srrctl &= ~IXGBE_SRRCTL_BSIZEPKT_MASK; srrctl |= bufsz; @@ -3117,16 +2999,18 @@ ixgbe_initialize_receive_units(struct ad * so we do not need to clear the bit, but do it just in case * this code is moved elsewhere. */ - if (adapter->num_queues > 1 && adapter->fc == ixgbe_fc_none) + if (adapter->num_queues > 1 && + adapter->hw.fc.requested_mode == ixgbe_fc_none) { srrctl |= IXGBE_SRRCTL_DROP_EN; - else + } else { srrctl &= ~IXGBE_SRRCTL_DROP_EN; + } - IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(j), srrctl); + IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(i), srrctl); /* Setup the HW Rx Head and Tail Descriptor Pointers */ - IXGBE_WRITE_REG(hw, IXGBE_RDH(j), 0); - IXGBE_WRITE_REG(hw, IXGBE_RDT(j), 0); + IXGBE_WRITE_REG(hw, IXGBE_RDH(i), 0); + IXGBE_WRITE_REG(hw, IXGBE_RDT(i), 0); /* Set the processing limit */ rxr->process_limit = ixgbe_rx_process_limit; @@ -3242,9 +3126,9 @@ ixgbe_setup_vlan_hw_support(struct adapt rxr = &adapter->rx_rings[i]; /* On 82599 the VLAN enable is per/queue in RXDCTL */ if (hw->mac.type != ixgbe_mac_82598EB) { - ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(rxr->me)); + ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i)); ctrl |= IXGBE_RXDCTL_VME; - IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(rxr->me), ctrl); + IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(i), ctrl); } rxr->vtag_strip = TRUE; } @@ -3294,9 +3178,6 @@ ixgbe_enable_intr(struct adapter *adapte #ifdef IXGBE_FDIR mask |= IXGBE_EIMS_FLOW_DIR; #endif -#ifdef PCI_IOV - mask |= IXGBE_EIMS_MAILBOX; -#endif break; case ixgbe_mac_X540: /* Detect if Thermal Sensor is enabled */ @@ -3320,9 +3201,6 @@ ixgbe_enable_intr(struct adapter *adapte #ifdef IXGBE_FDIR mask |= IXGBE_EIMS_FLOW_DIR; #endif -#ifdef PCI_IOV - mask |= IXGBE_EIMS_MAILBOX; -#endif /* falls through */ default: break; @@ -3336,9 +3214,6 @@ ixgbe_enable_intr(struct adapter *adapte /* Don't autoclear Link */ mask &= ~IXGBE_EIMS_OTHER; mask &= ~IXGBE_EIMS_LSC; -#ifdef PCI_IOV - mask &= ~IXGBE_EIMS_MAILBOX; -#endif IXGBE_WRITE_REG(hw, IXGBE_EIAC, mask); } @@ -3537,8 +3412,8 @@ ixgbe_set_ivar(struct adapter *adapter, static void ixgbe_configure_ivars(struct adapter *adapter) { - struct ix_queue *que = adapter->queues; - u32 newitr; + struct ix_queue *que = adapter->queues; + u32 newitr; if (ixgbe_max_interrupt_rate > 0) newitr = (4000000 / ixgbe_max_interrupt_rate) & 0x0FF8; @@ -3552,12 +3427,10 @@ ixgbe_configure_ivars(struct adapter *ad } for (int i = 0; i < adapter->num_queues; i++, que++) { - struct rx_ring *rxr = &adapter->rx_rings[i]; - struct tx_ring *txr = &adapter->tx_rings[i]; /* First the RX queue entry */ - ixgbe_set_ivar(adapter, rxr->me, que->msix, 0); + ixgbe_set_ivar(adapter, i, que->msix, 0); /* ... and the TX */ - ixgbe_set_ivar(adapter, txr->me, que->msix, 1); + ixgbe_set_ivar(adapter, i, que->msix, 1); /* Set an Initial EITR value */ IXGBE_WRITE_REG(&adapter->hw, IXGBE_EITR(que->msix), newitr); @@ -3571,8 +3444,7 @@ ixgbe_configure_ivars(struct adapter *ad ** ixgbe_sfp_probe - called in the local timer to ** determine if a port had optics inserted. */ -static bool -ixgbe_sfp_probe(struct adapter *adapter) +static bool ixgbe_sfp_probe(struct adapter *adapter) { struct ixgbe_hw *hw = &adapter->hw; device_t dev = adapter->dev; @@ -3632,7 +3504,6 @@ ixgbe_handle_mod(void *context, int pend "Unsupported SFP+ module type was detected.\n"); return; } - err = hw->mac.ops.setup_sfp(hw); if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { device_printf(dev, @@ -3755,7 +3626,9 @@ ixgbe_check_eee_support(struct adapter * { struct ixgbe_hw *hw = &adapter->hw; - adapter->eee_enabled = !!(hw->mac.ops.setup_eee); + adapter->eee_support = adapter->eee_enabled = + (hw->device_id == IXGBE_DEV_ID_X550T || + hw->device_id == IXGBE_DEV_ID_X550EM_X_KR); } /* @@ -4131,7 +4004,8 @@ ixgbe_add_device_sysctls(struct adapter ixgbe_sysctl_dmac, "I", "DMA Coalesce"); /* for X550T and X550EM backplane devices */ - if (hw->mac.ops.setup_eee) { + if (hw->device_id == IXGBE_DEV_ID_X550T || + hw->device_id == IXGBE_DEV_ID_X550EM_X_KR) { struct sysctl_oid *eee_node; struct sysctl_oid_list *eee_list; @@ -4751,7 +4625,6 @@ static int ixgbe_sysctl_eee_enable(SYSCTL_HANDLER_ARGS) { struct adapter *adapter = (struct adapter *) arg1; - struct ixgbe_hw *hw = &adapter->hw; struct ifnet *ifp = adapter->ifp; int new_eee_enabled, error = 0; @@ -4762,7 +4635,7 @@ ixgbe_sysctl_eee_enable(SYSCTL_HANDLER_A if (new_eee_enabled == adapter->eee_enabled) return (0); - if (new_eee_enabled > 0 && !hw->mac.ops.setup_eee) + if (new_eee_enabled > 0 && !adapter->eee_support) return (ENODEV); else adapter->eee_enabled = !!(new_eee_enabled); @@ -4878,19 +4751,10 @@ ixgbe_enable_rx_drop(struct adapter *ada struct ixgbe_hw *hw = &adapter->hw; for (int i = 0; i < adapter->num_queues; i++) { - struct rx_ring *rxr = &adapter->rx_rings[i]; - u32 srrctl = IXGBE_READ_REG(hw, IXGBE_SRRCTL(rxr->me)); + u32 srrctl = IXGBE_READ_REG(hw, IXGBE_SRRCTL(i)); srrctl |= IXGBE_SRRCTL_DROP_EN; - IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(rxr->me), srrctl); - } -#ifdef PCI_IOV - /* enable drop for each vf */ - for (int i = 0; i < adapter->num_vfs; i++) { - IXGBE_WRITE_REG(hw, IXGBE_QDE, - (IXGBE_QDE_WRITE | (i << IXGBE_QDE_IDX_SHIFT) | - IXGBE_QDE_ENABLE)); + IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(i), srrctl); } -#endif } static void @@ -4899,18 +4763,10 @@ ixgbe_disable_rx_drop(struct adapter *ad struct ixgbe_hw *hw = &adapter->hw; for (int i = 0; i < adapter->num_queues; i++) { - struct rx_ring *rxr = &adapter->rx_rings[i]; - u32 srrctl = IXGBE_READ_REG(hw, IXGBE_SRRCTL(rxr->me)); + u32 srrctl = IXGBE_READ_REG(hw, IXGBE_SRRCTL(i)); srrctl &= ~IXGBE_SRRCTL_DROP_EN; - IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(rxr->me), srrctl); + IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(i), srrctl); } -#ifdef PCI_IOV - /* disable drop for each vf */ - for (int i = 0; i < adapter->num_vfs; i++) { - IXGBE_WRITE_REG(hw, IXGBE_QDE, - (IXGBE_QDE_WRITE | (i << IXGBE_QDE_IDX_SHIFT))); - } -#endif } static void @@ -4937,722 +4793,4 @@ ixgbe_rearm_queues(struct adapter *adapt } } -#ifdef PCI_IOV - -/* -** Support functions for SRIOV/VF management -*/ - -static void -ixgbe_ping_all_vfs(struct adapter *adapter) -{ - struct ixgbe_vf *vf; - - for (int i = 0; i < adapter->num_vfs; i++) { - vf = &adapter->vfs[i]; - if (vf->flags & IXGBE_VF_ACTIVE) - ixgbe_send_vf_msg(adapter, vf, IXGBE_PF_CONTROL_MSG); - } -} - - -static void -ixgbe_vf_set_default_vlan(struct adapter *adapter, struct ixgbe_vf *vf, - uint16_t tag) -{ - struct ixgbe_hw *hw; - uint32_t vmolr, vmvir; - - hw = &adapter->hw; - - vf->vlan_tag = tag; - - vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf->pool)); - - /* Do not receive packets that pass inexact filters. */ - vmolr &= ~(IXGBE_VMOLR_ROMPE | IXGBE_VMOLR_ROPE); - - /* Disable Multicast Promicuous Mode. */ - vmolr &= ~IXGBE_VMOLR_MPE; - - /* Accept broadcasts. */ - vmolr |= IXGBE_VMOLR_BAM; - - if (tag == 0) { - /* Accept non-vlan tagged traffic. */ - //vmolr |= IXGBE_VMOLR_AUPE; - - /* Allow VM to tag outgoing traffic; no default tag. */ - vmvir = 0; - } else { - /* Require vlan-tagged traffic. */ - vmolr &= ~IXGBE_VMOLR_AUPE; - - /* Tag all traffic with provided vlan tag. */ - vmvir = (tag | IXGBE_VMVIR_VLANA_DEFAULT); - } - IXGBE_WRITE_REG(hw, IXGBE_VMOLR(vf->pool), vmolr); - IXGBE_WRITE_REG(hw, IXGBE_VMVIR(vf->pool), vmvir); -} - - -static boolean_t -ixgbe_vf_frame_size_compatible(struct adapter *adapter, struct ixgbe_vf *vf) -{ - - /* - * Frame size compatibility between PF and VF is only a problem on - * 82599-based cards. X540 and later support any combination of jumbo - * frames on PFs and VFs. - */ - if (adapter->hw.mac.type != ixgbe_mac_82599EB) - return (TRUE); - - switch (vf->api_ver) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 17:43:35 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A50BF5F; Mon, 1 Jun 2015 17:43:35 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8828F161E; Mon, 1 Jun 2015 17:43:35 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51HhZjn011381; Mon, 1 Jun 2015 17:43:35 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51HhZUP011379; Mon, 1 Jun 2015 17:43:35 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201506011743.t51HhZUP011379@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Mon, 1 Jun 2015 17:43:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283883 - in head/sys: dev/ixgbe modules/ixv 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 17:43:35 -0000 Author: jfv Date: Mon Jun 1 17:43:34 2015 New Revision: 283883 URL: https://svnweb.freebsd.org/changeset/base/283883 Log: Delta D2489 - Add SRIOV support to the Intel 10G driver. NOTE: This is a technology preview, while it has undergone development testing, Intel has not yet completed full validation of the feature. It is being integrated for early access and customer testing. Modified: head/sys/dev/ixgbe/if_ix.c head/sys/dev/ixgbe/if_ixv.c head/sys/dev/ixgbe/ix_txrx.c head/sys/dev/ixgbe/ixgbe.h head/sys/dev/ixgbe/ixgbe_mbx.h head/sys/dev/ixgbe/ixgbe_vf.c head/sys/modules/ixv/Makefile Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Mon Jun 1 17:35:29 2015 (r283882) +++ head/sys/dev/ixgbe/if_ix.c Mon Jun 1 17:43:34 2015 (r283883) @@ -54,7 +54,7 @@ int ixgbe_display_debug_stat /********************************************************************* * Driver version *********************************************************************/ -char ixgbe_driver_version[] = "2.8.3"; +char ixgbe_driver_version[] = "3.1.0"; /********************************************************************* * PCI Device ID Table @@ -138,6 +138,7 @@ static int ixgbe_setup_msix(struct adapt static void ixgbe_free_pci_resources(struct adapter *); static void ixgbe_local_timer(void *); static int ixgbe_setup_interface(device_t, struct adapter *); +static void ixgbe_config_gpie(struct adapter *); static void ixgbe_config_dmac(struct adapter *); static void ixgbe_config_delay_values(struct adapter *); static void ixgbe_config_link(struct adapter *); @@ -204,6 +205,18 @@ static void ixgbe_handle_phy(void *, int static void ixgbe_reinit_fdir(void *, int); #endif +#ifdef PCI_IOV +static void ixgbe_ping_all_vfs(struct adapter *); +static void ixgbe_handle_mbx(void *, int); +static int ixgbe_init_iov(device_t, u16, const nvlist_t *); +static void ixgbe_uninit_iov(device_t); +static int ixgbe_add_vf(device_t, u16, const nvlist_t *); +static void ixgbe_initialize_iov(struct adapter *); +static void ixgbe_recalculate_max_frame(struct adapter *); +static void ixgbe_init_vf(struct adapter *, struct ixgbe_vf *); +#endif /* PCI_IOV */ + + /********************************************************************* * FreeBSD Device Interface Entry Points *********************************************************************/ @@ -216,6 +229,11 @@ static device_method_t ix_methods[] = { DEVMETHOD(device_shutdown, ixgbe_shutdown), DEVMETHOD(device_suspend, ixgbe_suspend), DEVMETHOD(device_resume, ixgbe_resume), +#ifdef PCI_IOV + DEVMETHOD(pci_init_iov, ixgbe_init_iov), + DEVMETHOD(pci_uninit_iov, ixgbe_uninit_iov), + DEVMETHOD(pci_add_vf, ixgbe_add_vf), +#endif /* PCI_IOV */ DEVMETHOD_END }; @@ -341,6 +359,8 @@ static int fdir_pballoc = 1; #include #endif /* DEV_NETMAP */ +static MALLOC_DEFINE(M_IXGBE, "ix", "ix driver allocations"); + /********************************************************************* * Device identification routine * @@ -472,7 +492,7 @@ ixgbe_attach(device_t dev) } /* Allocate multicast array memory. */ - adapter->mta = malloc(sizeof(u8) * IXGBE_ETH_LENGTH_OF_ADDRESS * + adapter->mta = malloc(sizeof(*adapter->mta) * MAX_NUM_MULTICAST_ADDRESSES, M_DEVBUF, M_NOWAIT); if (adapter->mta == NULL) { device_printf(dev, "Can not allocate multicast setup array\n"); @@ -558,6 +578,28 @@ ixgbe_attach(device_t dev) /* Set an initial default flow control value */ adapter->fc = ixgbe_fc_full; +#ifdef PCI_IOV + if ((hw->mac.type != ixgbe_mac_82598EB) && (adapter->msix > 1)) { + nvlist_t *pf_schema, *vf_schema; + + hw->mbx.ops.init_params(hw); + pf_schema = pci_iov_schema_alloc_node(); + vf_schema = pci_iov_schema_alloc_node(); + pci_iov_schema_add_unicast_mac(vf_schema, "mac-addr", 0, NULL); + pci_iov_schema_add_bool(vf_schema, "mac-anti-spoof", + IOV_SCHEMA_HASDEFAULT, TRUE); + pci_iov_schema_add_bool(vf_schema, "allow-set-mac", + IOV_SCHEMA_HASDEFAULT, FALSE); + pci_iov_schema_add_bool(vf_schema, "allow-promisc", + IOV_SCHEMA_HASDEFAULT, FALSE); + error = pci_iov_attach(dev, pf_schema, vf_schema); + if (error != 0) { + device_printf(dev, + "Error %d setting up SR-IOV\n", error); + } + } +#endif /* PCI_IOV */ + /* Check for certain supported features */ ixgbe_check_wol_support(adapter); ixgbe_check_eee_support(adapter); @@ -614,6 +656,13 @@ ixgbe_detach(device_t dev) return (EBUSY); } +#ifdef PCI_IOV + if (pci_iov_detach(dev) != 0) { + device_printf(dev, "SR-IOV in use; detach first.\n"); + return (EBUSY); + } +#endif /* PCI_IOV */ + /* Stop the adapter */ IXGBE_CORE_LOCK(adapter); ixgbe_setup_low_power_mode(adapter); @@ -634,6 +683,9 @@ ixgbe_detach(device_t dev) taskqueue_drain(adapter->tq, &adapter->link_task); taskqueue_drain(adapter->tq, &adapter->mod_task); taskqueue_drain(adapter->tq, &adapter->msf_task); +#ifdef PCI_IOV + taskqueue_drain(adapter->tq, &adapter->mbx_task); +#endif taskqueue_drain(adapter->tq, &adapter->phy_task); #ifdef IXGBE_FDIR taskqueue_drain(adapter->tq, &adapter->fdir_task); @@ -810,6 +862,9 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c adapter->max_frame_size = ifp->if_mtu + IXGBE_MTU_HDR; ixgbe_init_locked(adapter); +#ifdef PCI_IOV + ixgbe_recalculate_max_frame(adapter); +#endif IXGBE_CORE_UNLOCK(adapter); } break; @@ -925,22 +980,36 @@ ixgbe_init_locked(struct adapter *adapte struct ifnet *ifp = adapter->ifp; device_t dev = adapter->dev; struct ixgbe_hw *hw = &adapter->hw; - u32 k, txdctl, mhadd, gpie; + struct tx_ring *txr; + struct rx_ring *rxr; + u32 txdctl, mhadd; u32 rxdctl, rxctrl; +#ifdef PCI_IOV + enum ixgbe_iov_mode mode; +#endif mtx_assert(&adapter->core_mtx, MA_OWNED); INIT_DEBUGOUT("ixgbe_init_locked: begin"); + hw->adapter_stopped = FALSE; ixgbe_stop_adapter(hw); callout_stop(&adapter->timer); +#ifdef PCI_IOV + mode = ixgbe_get_iov_mode(adapter); + adapter->pool = ixgbe_max_vfs(mode); + /* Queue indices may change with IOV mode */ + for (int i = 0; i < adapter->num_queues; i++) { + adapter->rx_rings[i].me = ixgbe_pf_que_index(mode, i); + adapter->tx_rings[i].me = ixgbe_pf_que_index(mode, i); + } +#endif /* reprogram the RAR[0] in case user changed it. */ - ixgbe_set_rar(hw, 0, adapter->hw.mac.addr, 0, IXGBE_RAH_AV); + ixgbe_set_rar(hw, 0, hw->mac.addr, adapter->pool, IXGBE_RAH_AV); /* Get the latest mac address, User can use a LAA */ - bcopy(IF_LLADDR(adapter->ifp), hw->mac.addr, - IXGBE_ETH_LENGTH_OF_ADDRESS); - ixgbe_set_rar(hw, 0, hw->mac.addr, 0, 1); + bcopy(IF_LLADDR(ifp), hw->mac.addr, IXGBE_ETH_LENGTH_OF_ADDRESS); + ixgbe_set_rar(hw, 0, hw->mac.addr, adapter->pool, 1); hw->addr_ctrl.rar_used_count = 1; /* Set the various hardware offload abilities */ @@ -963,6 +1032,9 @@ ixgbe_init_locked(struct adapter *adapte } ixgbe_init_hw(hw); +#ifdef PCI_IOV + ixgbe_initialize_iov(adapter); +#endif ixgbe_initialize_transmit_units(adapter); /* Setup Multicast table */ @@ -972,14 +1044,10 @@ ixgbe_init_locked(struct adapter *adapte ** Determine the correct mbuf pool ** for doing jumbo frames */ - if (adapter->max_frame_size <= 2048) + if (adapter->max_frame_size <= MCLBYTES) adapter->rx_mbuf_sz = MCLBYTES; - else if (adapter->max_frame_size <= 4096) - adapter->rx_mbuf_sz = MJUMPAGESIZE; - else if (adapter->max_frame_size <= 9216) - adapter->rx_mbuf_sz = MJUM9BYTES; else - adapter->rx_mbuf_sz = MJUM16BYTES; + adapter->rx_mbuf_sz = MJUMPAGESIZE; /* Prepare receive descriptors and buffers */ if (ixgbe_setup_receive_structures(adapter)) { @@ -991,31 +1059,8 @@ ixgbe_init_locked(struct adapter *adapte /* Configure RX settings */ ixgbe_initialize_receive_units(adapter); - gpie = IXGBE_READ_REG(&adapter->hw, IXGBE_GPIE); - - /* Enable Fan Failure Interrupt */ - gpie |= IXGBE_SDP1_GPIEN_BY_MAC(hw); - - /* Add for Module detection */ - if (hw->mac.type == ixgbe_mac_82599EB) - gpie |= IXGBE_SDP2_GPIEN; - - /* - * Thermal Failure Detection (X540) - * Link Detection (X552) - */ - if (hw->mac.type == ixgbe_mac_X540 || - hw->device_id == IXGBE_DEV_ID_X550EM_X_SFP || - hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T) - gpie |= IXGBE_SDP0_GPIEN_X540; - - if (adapter->msix > 1) { - /* Enable Enhanced MSIX mode */ - gpie |= IXGBE_GPIE_MSIX_MODE; - gpie |= IXGBE_GPIE_EIAME | IXGBE_GPIE_PBA_SUPPORT | - IXGBE_GPIE_OCD; - } - IXGBE_WRITE_REG(hw, IXGBE_GPIE, gpie); + /* Enable SDP & MSIX interrupts based on adapter */ + ixgbe_config_gpie(adapter); /* Set MTU size */ if (ifp->if_mtu > ETHERMTU) { @@ -1028,7 +1073,8 @@ ixgbe_init_locked(struct adapter *adapte /* Now enable all the queues */ for (int i = 0; i < adapter->num_queues; i++) { - txdctl = IXGBE_READ_REG(hw, IXGBE_TXDCTL(i)); + txr = &adapter->tx_rings[i]; + txdctl = IXGBE_READ_REG(hw, IXGBE_TXDCTL(txr->me)); txdctl |= IXGBE_TXDCTL_ENABLE; /* Set WTHRESH to 8, burst writeback */ txdctl |= (8 << 16); @@ -1040,11 +1086,12 @@ ixgbe_init_locked(struct adapter *adapte * Prefetching enables tx line rate even with 1 queue. */ txdctl |= (32 << 0) | (1 << 8); - IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(i), txdctl); + IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(txr->me), txdctl); } - for (int i = 0; i < adapter->num_queues; i++) { - rxdctl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i)); + for (int i = 0, j = 0; i < adapter->num_queues; i++) { + rxr = &adapter->rx_rings[i]; + rxdctl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(rxr->me)); if (hw->mac.type == ixgbe_mac_82598EB) { /* ** PTHRESH = 21 @@ -1055,9 +1102,9 @@ ixgbe_init_locked(struct adapter *adapte rxdctl |= 0x080420; } rxdctl |= IXGBE_RXDCTL_ENABLE; - IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(i), rxdctl); - for (k = 0; k < 10; k++) { - if (IXGBE_READ_REG(hw, IXGBE_RXDCTL(i)) & + IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(rxr->me), rxdctl); + for (; j < 10; j++) { + if (IXGBE_READ_REG(hw, IXGBE_RXDCTL(rxr->me)) & IXGBE_RXDCTL_ENABLE) break; else @@ -1086,10 +1133,10 @@ ixgbe_init_locked(struct adapter *adapte struct netmap_kring *kring = &na->rx_rings[i]; int t = na->num_rx_desc - 1 - nm_kr_rxspace(kring); - IXGBE_WRITE_REG(hw, IXGBE_RDT(i), t); + IXGBE_WRITE_REG(hw, IXGBE_RDT(rxr->me), t); } else #endif /* DEV_NETMAP */ - IXGBE_WRITE_REG(hw, IXGBE_RDT(i), adapter->num_rx_desc - 1); + IXGBE_WRITE_REG(hw, IXGBE_RDT(rxr->me), adapter->num_rx_desc - 1); } /* Enable Receive engine */ @@ -1128,9 +1175,9 @@ ixgbe_init_locked(struct adapter *adapte #endif /* - ** Check on any SFP devices that - ** need to be kick-started - */ + * Check on any SFP devices that + * need to be kick-started + */ if (hw->phy.type == ixgbe_phy_none) { int err = hw->phy.ops.identify(hw); if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { @@ -1144,8 +1191,7 @@ ixgbe_init_locked(struct adapter *adapte IXGBE_WRITE_REG(hw, IXGBE_EITR(adapter->vector), IXGBE_LINK_ITR); /* Configure Energy Efficient Ethernet for supported devices */ - if (adapter->eee_support) - ixgbe_setup_eee(hw, adapter->eee_enabled); + ixgbe_setup_eee(hw, adapter->eee_enabled); /* Config/Enable Link */ ixgbe_config_link(adapter); @@ -1165,6 +1211,15 @@ ixgbe_init_locked(struct adapter *adapte /* And now turn on interrupts */ ixgbe_enable_intr(adapter); +#ifdef PCI_IOV + /* Enable the use of the MBX by the VF's */ + { + u32 reg = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT); + reg |= IXGBE_CTRL_EXT_PFRSTD; + IXGBE_WRITE_REG(hw, IXGBE_CTRL_EXT, reg); + } +#endif + /* Now inform the stack we're ready */ ifp->if_drv_flags |= IFF_DRV_RUNNING; @@ -1183,6 +1238,51 @@ ixgbe_init(void *arg) } static void +ixgbe_config_gpie(struct adapter *adapter) +{ + struct ixgbe_hw *hw = &adapter->hw; + u32 gpie; + + gpie = IXGBE_READ_REG(hw, IXGBE_GPIE); + + /* Fan Failure Interrupt */ + if (hw->device_id == IXGBE_DEV_ID_82598AT) + gpie |= IXGBE_SDP1_GPIEN; + + /* + * Module detection (SDP2) + * Media ready (SDP1) + */ + if (hw->mac.type == ixgbe_mac_82599EB) { + gpie |= IXGBE_SDP2_GPIEN; + if (hw->device_id != IXGBE_DEV_ID_82599_QSFP_SF_QP) + gpie |= IXGBE_SDP1_GPIEN; + } + + /* + * Thermal Failure Detection (X540) + * Link Detection (X557) + */ + if (hw->mac.type == ixgbe_mac_X540 || + hw->device_id == IXGBE_DEV_ID_X550EM_X_SFP || + hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T) + gpie |= IXGBE_SDP0_GPIEN_X540; + + if (adapter->msix > 1) { + /* Enable Enhanced MSIX mode */ + gpie |= IXGBE_GPIE_MSIX_MODE; + gpie |= IXGBE_GPIE_EIAME | IXGBE_GPIE_PBA_SUPPORT | + IXGBE_GPIE_OCD; + } + + IXGBE_WRITE_REG(hw, IXGBE_GPIE, gpie); + return; +} + +/* + * Requires adapter->max_frame_size to be set. + */ +static void ixgbe_config_delay_values(struct adapter *adapter) { struct ixgbe_hw *hw = &adapter->hw; @@ -1276,10 +1376,9 @@ ixgbe_handle_que(void *context, int pend struct adapter *adapter = que->adapter; struct tx_ring *txr = que->txr; struct ifnet *ifp = adapter->ifp; - bool more; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - more = ixgbe_rxeof(que); + ixgbe_rxeof(que); IXGBE_TX_LOCK(txr); ixgbe_txeof(txr); #ifndef IXGBE_LEGACY_TX @@ -1341,8 +1440,8 @@ ixgbe_legacy_irq(void *arg) IXGBE_TX_UNLOCK(txr); /* Check for fan failure */ - if ((hw->phy.media_type == ixgbe_media_type_copper) && - (reg_eicr & IXGBE_EICR_GPI_SDP1_BY_MAC(hw))) { + if ((hw->device_id == IXGBE_DEV_ID_82598AT) && + (reg_eicr & IXGBE_EICR_GPI_SDP1)) { device_printf(adapter->dev, "\nCRITICAL: FAN FAILURE!! " "REPLACE IMMEDIATELY!!\n"); IXGBE_WRITE_REG(hw, IXGBE_EIMS, IXGBE_EICR_GPI_SDP1_BY_MAC(hw)); @@ -1381,6 +1480,7 @@ ixgbe_msix_que(void *arg) bool more; u32 newitr = 0; + /* Protect against spurious interrupts */ if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; @@ -1504,6 +1604,10 @@ ixgbe_msix_link(void *arg) device_printf(adapter->dev, "System shutdown required!\n"); IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_TS); } +#ifdef PCI_IOV + if (reg_eicr & IXGBE_EICR_MAILBOX) + taskqueue_enqueue(adapter->tq, &adapter->mbx_task); +#endif } /* Pluggable optics-related interrupt */ @@ -1569,7 +1673,7 @@ ixgbe_media_status(struct ifnet * ifp, s } ifmr->ifm_status |= IFM_ACTIVE; - layer = ixgbe_get_supported_physical_layer(hw); + layer = adapter->phy_layer; if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_T || layer & IXGBE_PHYSICAL_LAYER_1000BASE_T || @@ -1802,18 +1906,17 @@ ixgbe_set_promisc(struct adapter *adapte static void ixgbe_set_multi(struct adapter *adapter) { - u32 fctrl; - u8 *mta; - u8 *update_ptr; - struct ifmultiaddr *ifma; - int mcnt = 0; - struct ifnet *ifp = adapter->ifp; + u32 fctrl; + u8 *update_ptr; + struct ifmultiaddr *ifma; + struct ixgbe_mc_addr *mta; + int mcnt = 0; + struct ifnet *ifp = adapter->ifp; IOCTL_DEBUGOUT("ixgbe_set_multi: begin"); mta = adapter->mta; - bzero(mta, sizeof(u8) * IXGBE_ETH_LENGTH_OF_ADDRESS * - MAX_NUM_MULTICAST_ADDRESSES); + bzero(mta, sizeof(*mta) * MAX_NUM_MULTICAST_ADDRESSES); #if __FreeBSD_version < 800000 IF_ADDR_LOCK(ifp); @@ -1826,8 +1929,8 @@ ixgbe_set_multi(struct adapter *adapter) if (mcnt == MAX_NUM_MULTICAST_ADDRESSES) break; bcopy(LLADDR((struct sockaddr_dl *) ifma->ifma_addr), - &mta[mcnt * IXGBE_ETH_LENGTH_OF_ADDRESS], - IXGBE_ETH_LENGTH_OF_ADDRESS); + mta[mcnt].addr, IXGBE_ETH_LENGTH_OF_ADDRESS); + mta[mcnt].vmdq = adapter->pool; mcnt++; } #if __FreeBSD_version < 800000 @@ -1850,7 +1953,7 @@ ixgbe_set_multi(struct adapter *adapter) IXGBE_WRITE_REG(&adapter->hw, IXGBE_FCTRL, fctrl); if (mcnt < MAX_NUM_MULTICAST_ADDRESSES) { - update_ptr = mta; + update_ptr = (u8 *)mta; ixgbe_update_mc_addr_list(&adapter->hw, update_ptr, mcnt, ixgbe_mc_array_itr, TRUE); } @@ -1866,13 +1969,13 @@ ixgbe_set_multi(struct adapter *adapter) static u8 * ixgbe_mc_array_itr(struct ixgbe_hw *hw, u8 **update_ptr, u32 *vmdq) { - u8 *addr = *update_ptr; - u8 *newptr; - *vmdq = 0; - - newptr = addr + IXGBE_ETH_LENGTH_OF_ADDRESS; - *update_ptr = newptr; - return addr; + struct ixgbe_mc_addr *mta; + + mta = (struct ixgbe_mc_addr *)*update_ptr; + *vmdq = mta->vmdq; + + *update_ptr = (u8*)(mta + 1);; + return (mta->addr); } @@ -1954,6 +2057,7 @@ watchdog: ixgbe_init_locked(adapter); } + /* ** Note: this routine updates the OS on the link state ** the real check of the hardware only happens with @@ -1977,6 +2081,9 @@ ixgbe_update_link_status(struct adapter /* Update DMA coalescing config */ ixgbe_config_dmac(adapter); if_link_state_change(ifp, LINK_STATE_UP); +#ifdef PCI_IOV + ixgbe_ping_all_vfs(adapter); +#endif } } else { /* Link down */ if (adapter->link_active == TRUE) { @@ -1984,6 +2091,9 @@ ixgbe_update_link_status(struct adapter device_printf(dev,"Link is Down\n"); if_link_state_change(ifp, LINK_STATE_DOWN); adapter->link_active = FALSE; +#ifdef PCI_IOV + ixgbe_ping_all_vfs(adapter); +#endif } } @@ -2083,7 +2193,7 @@ ixgbe_setup_optics(struct adapter *adapt struct ixgbe_hw *hw = &adapter->hw; int layer; - layer = ixgbe_get_supported_physical_layer(hw); + layer = adapter->phy_layer = ixgbe_get_supported_physical_layer(hw); if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_T) { adapter->optics = IFM_10G_T; @@ -2281,17 +2391,19 @@ ixgbe_allocate_msix(struct adapter *adap #endif if (adapter->num_queues > 1) bus_bind_intr(dev, que->res, cpu_id); - +#ifdef IXGBE_DEBUG #ifdef RSS device_printf(dev, "Bound RSS bucket %d to CPU %d\n", i, cpu_id); #else - if (bootverbose) - device_printf(dev, - "Bound queue %d to cpu %d\n", - i, cpu_id); + device_printf(dev, + "Bound queue %d to cpu %d\n", + i, cpu_id); #endif +#endif /* IXGBE_DEBUG */ + + #ifndef IXGBE_LEGACY_TX TASK_INIT(&txr->txq_task, 0, ixgbe_deferred_mq_start, txr); #endif @@ -2337,6 +2449,9 @@ ixgbe_allocate_msix(struct adapter *adap TASK_INIT(&adapter->link_task, 0, ixgbe_handle_link, adapter); TASK_INIT(&adapter->mod_task, 0, ixgbe_handle_mod, adapter); TASK_INIT(&adapter->msf_task, 0, ixgbe_handle_msf, adapter); +#ifdef PCI_IOV + TASK_INIT(&adapter->mbx_task, 0, ixgbe_handle_mbx, adapter); +#endif TASK_INIT(&adapter->phy_task, 0, ixgbe_handle_phy, adapter); #ifdef IXGBE_FDIR TASK_INIT(&adapter->fdir_task, 0, ixgbe_reinit_fdir, adapter); @@ -2630,7 +2745,7 @@ ixgbe_add_media_types(struct adapter *ad device_t dev = adapter->dev; int layer; - layer = ixgbe_get_supported_physical_layer(hw); + layer = adapter->phy_layer = ixgbe_get_supported_physical_layer(hw); /* Media types with matching FreeBSD media defines */ if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_T) @@ -2741,19 +2856,20 @@ ixgbe_initialize_transmit_units(struct a for (int i = 0; i < adapter->num_queues; i++, txr++) { u64 tdba = txr->txdma.dma_paddr; u32 txctrl = 0; + int j = txr->me; - IXGBE_WRITE_REG(hw, IXGBE_TDBAL(i), + IXGBE_WRITE_REG(hw, IXGBE_TDBAL(j), (tdba & 0x00000000ffffffffULL)); - IXGBE_WRITE_REG(hw, IXGBE_TDBAH(i), (tdba >> 32)); - IXGBE_WRITE_REG(hw, IXGBE_TDLEN(i), + IXGBE_WRITE_REG(hw, IXGBE_TDBAH(j), (tdba >> 32)); + IXGBE_WRITE_REG(hw, IXGBE_TDLEN(j), adapter->num_tx_desc * sizeof(union ixgbe_adv_tx_desc)); /* Setup the HW Tx Head and Tail descriptor pointers */ - IXGBE_WRITE_REG(hw, IXGBE_TDH(i), 0); - IXGBE_WRITE_REG(hw, IXGBE_TDT(i), 0); + IXGBE_WRITE_REG(hw, IXGBE_TDH(j), 0); + IXGBE_WRITE_REG(hw, IXGBE_TDT(j), 0); /* Cache the tail address */ - txr->tail = IXGBE_TDT(txr->me); + txr->tail = IXGBE_TDT(j); /* Set the processing limit */ txr->process_limit = ixgbe_tx_process_limit; @@ -2761,23 +2877,23 @@ ixgbe_initialize_transmit_units(struct a /* Disable Head Writeback */ switch (hw->mac.type) { case ixgbe_mac_82598EB: - txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(i)); + txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(j)); break; case ixgbe_mac_82599EB: case ixgbe_mac_X540: default: - txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(i)); + txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(j)); break; } txctrl &= ~IXGBE_DCA_TXCTRL_DESC_WRO_EN; switch (hw->mac.type) { case ixgbe_mac_82598EB: - IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(i), txctrl); + IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(j), txctrl); break; case ixgbe_mac_82599EB: case ixgbe_mac_X540: default: - IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(i), txctrl); + IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(j), txctrl); break; } @@ -2785,6 +2901,9 @@ ixgbe_initialize_transmit_units(struct a if (hw->mac.type != ixgbe_mac_82598EB) { u32 dmatxctl, rttdcs; +#ifdef PCI_IOV + enum ixgbe_iov_mode mode = ixgbe_get_iov_mode(adapter); +#endif dmatxctl = IXGBE_READ_REG(hw, IXGBE_DMATXCTL); dmatxctl |= IXGBE_DMATXCTL_TE; IXGBE_WRITE_REG(hw, IXGBE_DMATXCTL, dmatxctl); @@ -2792,7 +2911,11 @@ ixgbe_initialize_transmit_units(struct a rttdcs = IXGBE_READ_REG(hw, IXGBE_RTTDCS); rttdcs |= IXGBE_RTTDCS_ARBDIS; IXGBE_WRITE_REG(hw, IXGBE_RTTDCS, rttdcs); +#ifdef PCI_IOV + IXGBE_WRITE_REG(hw, IXGBE_MTQC, ixgbe_get_mtqc(mode)); +#else IXGBE_WRITE_REG(hw, IXGBE_MTQC, IXGBE_MTQC_64Q_1PB); +#endif rttdcs &= ~IXGBE_RTTDCS_ARBDIS; IXGBE_WRITE_REG(hw, IXGBE_RTTDCS, rttdcs); } @@ -2804,17 +2927,14 @@ static void ixgbe_initialise_rss_mapping(struct adapter *adapter) { struct ixgbe_hw *hw = &adapter->hw; - uint32_t reta; - int i, j, queue_id, table_size; - int index_mult; - uint32_t rss_key[10]; - uint32_t mrqc; + u32 reta = 0, mrqc, rss_key[10]; + int queue_id, table_size, index_mult; #ifdef RSS - uint32_t rss_hash_config; + u32 rss_hash_config; +#endif +#ifdef PCI_IOV + enum ixgbe_iov_mode mode; #endif - - /* Setup RSS */ - reta = 0; #ifdef RSS /* Fetch the configured RSS key */ @@ -2840,7 +2960,7 @@ ixgbe_initialise_rss_mapping(struct adap } /* Set up the redirection table */ - for (i = 0, j = 0; i < table_size; i++, j++) { + for (int i = 0, j = 0; i < table_size; i++, j++) { if (j == adapter->num_queues) j = 0; #ifdef RSS /* @@ -2907,19 +3027,16 @@ ixgbe_initialise_rss_mapping(struct adap mrqc = IXGBE_MRQC_RSSEN | IXGBE_MRQC_RSS_FIELD_IPV4 | IXGBE_MRQC_RSS_FIELD_IPV4_TCP -#if 0 - | IXGBE_MRQC_RSS_FIELD_IPV4_UDP -#endif | IXGBE_MRQC_RSS_FIELD_IPV6_EX_TCP | IXGBE_MRQC_RSS_FIELD_IPV6_EX | IXGBE_MRQC_RSS_FIELD_IPV6 | IXGBE_MRQC_RSS_FIELD_IPV6_TCP -#if 0 - | IXGBE_MRQC_RSS_FIELD_IPV6_UDP - | IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP -#endif ; #endif /* RSS */ +#ifdef PCI_IOV + mode = ixgbe_get_iov_mode(adapter); + mrqc |= ixgbe_get_mrqc(mode); +#endif IXGBE_WRITE_REG(hw, IXGBE_MRQC, mrqc); } @@ -2978,16 +3095,17 @@ ixgbe_initialize_receive_units(struct ad for (int i = 0; i < adapter->num_queues; i++, rxr++) { u64 rdba = rxr->rxdma.dma_paddr; + int j = rxr->me; /* Setup the Base and Length of the Rx Descriptor Ring */ - IXGBE_WRITE_REG(hw, IXGBE_RDBAL(i), + IXGBE_WRITE_REG(hw, IXGBE_RDBAL(j), (rdba & 0x00000000ffffffffULL)); - IXGBE_WRITE_REG(hw, IXGBE_RDBAH(i), (rdba >> 32)); - IXGBE_WRITE_REG(hw, IXGBE_RDLEN(i), + IXGBE_WRITE_REG(hw, IXGBE_RDBAH(j), (rdba >> 32)); + IXGBE_WRITE_REG(hw, IXGBE_RDLEN(j), adapter->num_rx_desc * sizeof(union ixgbe_adv_rx_desc)); /* Set up the SRRCTL register */ - srrctl = IXGBE_READ_REG(hw, IXGBE_SRRCTL(i)); + srrctl = IXGBE_READ_REG(hw, IXGBE_SRRCTL(j)); srrctl &= ~IXGBE_SRRCTL_BSIZEHDR_MASK; srrctl &= ~IXGBE_SRRCTL_BSIZEPKT_MASK; srrctl |= bufsz; @@ -3006,11 +3124,11 @@ ixgbe_initialize_receive_units(struct ad srrctl &= ~IXGBE_SRRCTL_DROP_EN; } - IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(i), srrctl); + IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(j), srrctl); /* Setup the HW Rx Head and Tail Descriptor Pointers */ - IXGBE_WRITE_REG(hw, IXGBE_RDH(i), 0); - IXGBE_WRITE_REG(hw, IXGBE_RDT(i), 0); + IXGBE_WRITE_REG(hw, IXGBE_RDH(j), 0); + IXGBE_WRITE_REG(hw, IXGBE_RDT(j), 0); /* Set the processing limit */ rxr->process_limit = ixgbe_rx_process_limit; @@ -3126,9 +3244,9 @@ ixgbe_setup_vlan_hw_support(struct adapt rxr = &adapter->rx_rings[i]; /* On 82599 the VLAN enable is per/queue in RXDCTL */ if (hw->mac.type != ixgbe_mac_82598EB) { - ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i)); + ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(rxr->me)); ctrl |= IXGBE_RXDCTL_VME; - IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(i), ctrl); + IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(rxr->me), ctrl); } rxr->vtag_strip = TRUE; } @@ -3178,6 +3296,9 @@ ixgbe_enable_intr(struct adapter *adapte #ifdef IXGBE_FDIR mask |= IXGBE_EIMS_FLOW_DIR; #endif +#ifdef PCI_IOV + mask |= IXGBE_EIMS_MAILBOX; +#endif break; case ixgbe_mac_X540: /* Detect if Thermal Sensor is enabled */ @@ -3201,6 +3322,9 @@ ixgbe_enable_intr(struct adapter *adapte #ifdef IXGBE_FDIR mask |= IXGBE_EIMS_FLOW_DIR; #endif +#ifdef PCI_IOV + mask |= IXGBE_EIMS_MAILBOX; +#endif /* falls through */ default: break; @@ -3214,6 +3338,9 @@ ixgbe_enable_intr(struct adapter *adapte /* Don't autoclear Link */ mask &= ~IXGBE_EIMS_OTHER; mask &= ~IXGBE_EIMS_LSC; +#ifdef PCI_IOV + mask &= ~IXGBE_EIMS_MAILBOX; +#endif IXGBE_WRITE_REG(hw, IXGBE_EIAC, mask); } @@ -3412,8 +3539,8 @@ ixgbe_set_ivar(struct adapter *adapter, static void ixgbe_configure_ivars(struct adapter *adapter) { - struct ix_queue *que = adapter->queues; - u32 newitr; + struct ix_queue *que = adapter->queues; + u32 newitr; if (ixgbe_max_interrupt_rate > 0) newitr = (4000000 / ixgbe_max_interrupt_rate) & 0x0FF8; @@ -3427,10 +3554,12 @@ ixgbe_configure_ivars(struct adapter *ad } for (int i = 0; i < adapter->num_queues; i++, que++) { + struct rx_ring *rxr = &adapter->rx_rings[i]; + struct tx_ring *txr = &adapter->tx_rings[i]; /* First the RX queue entry */ - ixgbe_set_ivar(adapter, i, que->msix, 0); + ixgbe_set_ivar(adapter, rxr->me, que->msix, 0); /* ... and the TX */ - ixgbe_set_ivar(adapter, i, que->msix, 1); + ixgbe_set_ivar(adapter, txr->me, que->msix, 1); /* Set an Initial EITR value */ IXGBE_WRITE_REG(&adapter->hw, IXGBE_EITR(que->msix), newitr); @@ -3444,7 +3573,8 @@ ixgbe_configure_ivars(struct adapter *ad ** ixgbe_sfp_probe - called in the local timer to ** determine if a port had optics inserted. */ -static bool ixgbe_sfp_probe(struct adapter *adapter) +static bool +ixgbe_sfp_probe(struct adapter *adapter) { struct ixgbe_hw *hw = &adapter->hw; device_t dev = adapter->dev; @@ -3504,6 +3634,7 @@ ixgbe_handle_mod(void *context, int pend "Unsupported SFP+ module type was detected.\n"); return; } + err = hw->mac.ops.setup_sfp(hw); if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { device_printf(dev, @@ -3626,9 +3757,7 @@ ixgbe_check_eee_support(struct adapter * { struct ixgbe_hw *hw = &adapter->hw; - adapter->eee_support = adapter->eee_enabled = - (hw->device_id == IXGBE_DEV_ID_X550T || - hw->device_id == IXGBE_DEV_ID_X550EM_X_KR); + adapter->eee_enabled = !!(hw->mac.ops.setup_eee); } /* @@ -4004,8 +4133,7 @@ ixgbe_add_device_sysctls(struct adapter ixgbe_sysctl_dmac, "I", "DMA Coalesce"); /* for X550T and X550EM backplane devices */ - if (hw->device_id == IXGBE_DEV_ID_X550T || - hw->device_id == IXGBE_DEV_ID_X550EM_X_KR) { + if (hw->mac.ops.setup_eee) { struct sysctl_oid *eee_node; struct sysctl_oid_list *eee_list; @@ -4625,6 +4753,7 @@ static int ixgbe_sysctl_eee_enable(SYSCTL_HANDLER_ARGS) { struct adapter *adapter = (struct adapter *) arg1; + struct ixgbe_hw *hw = &adapter->hw; struct ifnet *ifp = adapter->ifp; int new_eee_enabled, error = 0; @@ -4635,7 +4764,7 @@ ixgbe_sysctl_eee_enable(SYSCTL_HANDLER_A if (new_eee_enabled == adapter->eee_enabled) return (0); - if (new_eee_enabled > 0 && !adapter->eee_support) + if (new_eee_enabled > 0 && !hw->mac.ops.setup_eee) return (ENODEV); else adapter->eee_enabled = !!(new_eee_enabled); @@ -4751,10 +4880,19 @@ ixgbe_enable_rx_drop(struct adapter *ada struct ixgbe_hw *hw = &adapter->hw; for (int i = 0; i < adapter->num_queues; i++) { - u32 srrctl = IXGBE_READ_REG(hw, IXGBE_SRRCTL(i)); + struct rx_ring *rxr = &adapter->rx_rings[i]; + u32 srrctl = IXGBE_READ_REG(hw, IXGBE_SRRCTL(rxr->me)); srrctl |= IXGBE_SRRCTL_DROP_EN; - IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(i), srrctl); + IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(rxr->me), srrctl); + } +#ifdef PCI_IOV + /* enable drop for each vf */ + for (int i = 0; i < adapter->num_vfs; i++) { + IXGBE_WRITE_REG(hw, IXGBE_QDE, + (IXGBE_QDE_WRITE | (i << IXGBE_QDE_IDX_SHIFT) | + IXGBE_QDE_ENABLE)); } +#endif } static void @@ -4763,10 +4901,18 @@ ixgbe_disable_rx_drop(struct adapter *ad struct ixgbe_hw *hw = &adapter->hw; for (int i = 0; i < adapter->num_queues; i++) { - u32 srrctl = IXGBE_READ_REG(hw, IXGBE_SRRCTL(i)); + struct rx_ring *rxr = &adapter->rx_rings[i]; + u32 srrctl = IXGBE_READ_REG(hw, IXGBE_SRRCTL(rxr->me)); srrctl &= ~IXGBE_SRRCTL_DROP_EN; - IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(i), srrctl); + IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(rxr->me), srrctl); + } +#ifdef PCI_IOV + /* disable drop for each vf */ + for (int i = 0; i < adapter->num_vfs; i++) { + IXGBE_WRITE_REG(hw, IXGBE_QDE, + (IXGBE_QDE_WRITE | (i << IXGBE_QDE_IDX_SHIFT))); } +#endif } static void @@ -4793,4 +4939,722 @@ ixgbe_rearm_queues(struct adapter *adapt } } +#ifdef PCI_IOV + +/* +** Support functions for SRIOV/VF management +*/ + +static void +ixgbe_ping_all_vfs(struct adapter *adapter) +{ + struct ixgbe_vf *vf; + + for (int i = 0; i < adapter->num_vfs; i++) { + vf = &adapter->vfs[i]; + if (vf->flags & IXGBE_VF_ACTIVE) + ixgbe_send_vf_msg(adapter, vf, IXGBE_PF_CONTROL_MSG); + } +} + + +static void +ixgbe_vf_set_default_vlan(struct adapter *adapter, struct ixgbe_vf *vf, + uint16_t tag) +{ + struct ixgbe_hw *hw; + uint32_t vmolr, vmvir; + + hw = &adapter->hw; + + vf->vlan_tag = tag; + + vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf->pool)); + + /* Do not receive packets that pass inexact filters. */ + vmolr &= ~(IXGBE_VMOLR_ROMPE | IXGBE_VMOLR_ROPE); + + /* Disable Multicast Promicuous Mode. */ + vmolr &= ~IXGBE_VMOLR_MPE; + + /* Accept broadcasts. */ + vmolr |= IXGBE_VMOLR_BAM; + + if (tag == 0) { + /* Accept non-vlan tagged traffic. */ + //vmolr |= IXGBE_VMOLR_AUPE; + + /* Allow VM to tag outgoing traffic; no default tag. */ + vmvir = 0; + } else { + /* Require vlan-tagged traffic. */ + vmolr &= ~IXGBE_VMOLR_AUPE; + + /* Tag all traffic with provided vlan tag. */ + vmvir = (tag | IXGBE_VMVIR_VLANA_DEFAULT); + } + IXGBE_WRITE_REG(hw, IXGBE_VMOLR(vf->pool), vmolr); + IXGBE_WRITE_REG(hw, IXGBE_VMVIR(vf->pool), vmvir); +} + + +static boolean_t +ixgbe_vf_frame_size_compatible(struct adapter *adapter, struct ixgbe_vf *vf) +{ + + /* + * Frame size compatibility between PF and VF is only a problem on + * 82599-based cards. X540 and later support any combination of jumbo + * frames on PFs and VFs. + */ + if (adapter->hw.mac.type != ixgbe_mac_82599EB) + return (TRUE); + + switch (vf->api_ver) { + case IXGBE_API_VER_1_0: + case IXGBE_API_VER_UNKNOWN: + /* + * On legacy (1.0 and older) VF versions, we don't support jumbo + * frames on either the PF or the VF. + */ + if (adapter->max_frame_size > ETHER_MAX_LEN || + vf->max_frame_size > ETHER_MAX_LEN) + return (FALSE); + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 17:57:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF8563BD; Mon, 1 Jun 2015 17:57:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACF1D18A4; Mon, 1 Jun 2015 17:57:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51Hv87W016874; Mon, 1 Jun 2015 17:57:08 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51Hv6tR016850; Mon, 1 Jun 2015 17:57:06 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506011757.t51Hv6tR016850@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 1 Jun 2015 17:57:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283884 - in stable/10/sys: conf dev/hwpmc 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 17:57:09 -0000 Author: jhb Date: Mon Jun 1 17:57:05 2015 New Revision: 283884 URL: https://svnweb.freebsd.org/changeset/base/283884 Log: MFC 282641,282658: - Move hwpmc(4) debugging code under a new HWPMC_DEBUG option instead of the broader DEBUG option. - Convert hwpmc(4) debug printfs over to KTR. Sponsored by: Norse Corp, Inc. Modified: stable/10/sys/conf/NOTES stable/10/sys/conf/options stable/10/sys/dev/hwpmc/hwpmc_amd.c stable/10/sys/dev/hwpmc/hwpmc_core.c stable/10/sys/dev/hwpmc/hwpmc_intel.c stable/10/sys/dev/hwpmc/hwpmc_logging.c stable/10/sys/dev/hwpmc/hwpmc_mips.c stable/10/sys/dev/hwpmc/hwpmc_mips24k.c stable/10/sys/dev/hwpmc/hwpmc_mod.c stable/10/sys/dev/hwpmc/hwpmc_mpc7xxx.c stable/10/sys/dev/hwpmc/hwpmc_octeon.c stable/10/sys/dev/hwpmc/hwpmc_piv.c stable/10/sys/dev/hwpmc/hwpmc_ppc970.c stable/10/sys/dev/hwpmc/hwpmc_ppro.c stable/10/sys/dev/hwpmc/hwpmc_soft.c stable/10/sys/dev/hwpmc/hwpmc_tsc.c stable/10/sys/dev/hwpmc/hwpmc_uncore.c stable/10/sys/dev/hwpmc/hwpmc_xscale.c stable/10/sys/sys/pmc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Mon Jun 1 17:43:34 2015 (r283883) +++ stable/10/sys/conf/NOTES Mon Jun 1 17:57:05 2015 (r283884) @@ -561,6 +561,7 @@ options STACK # please see hwpmc(4). device hwpmc # Driver (also a loadable module) +options HWPMC_DEBUG options HWPMC_HOOKS # Other necessary kernel hooks Modified: stable/10/sys/conf/options ============================================================================== --- stable/10/sys/conf/options Mon Jun 1 17:43:34 2015 (r283883) +++ stable/10/sys/conf/options Mon Jun 1 17:57:05 2015 (r283884) @@ -858,6 +858,7 @@ DCONS_FORCE_CONSOLE opt_dcons.h DCONS_FORCE_GDB opt_dcons.h # HWPMC options +HWPMC_DEBUG opt_global.h HWPMC_HOOKS HWPMC_MIPS_BACKTRACE opt_hwpmc_hooks.h Modified: stable/10/sys/dev/hwpmc/hwpmc_amd.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_amd.c Mon Jun 1 17:43:34 2015 (r283883) +++ stable/10/sys/dev/hwpmc/hwpmc_amd.c Mon Jun 1 17:57:05 2015 (r283884) @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef DEBUG +#ifdef HWPMC_DEBUG enum pmc_class amd_pmc_class; #endif @@ -282,16 +282,16 @@ amd_read_pmc(int cpu, int ri, pmc_value_ mode = PMC_TO_MODE(pm); - PMCDBG(MDP,REA,1,"amd-read id=%d class=%d", ri, pd->pm_descr.pd_class); + PMCDBG2(MDP,REA,1,"amd-read id=%d class=%d", ri, pd->pm_descr.pd_class); -#ifdef DEBUG +#ifdef HWPMC_DEBUG KASSERT(pd->pm_descr.pd_class == amd_pmc_class, ("[amd,%d] unknown PMC class (%d)", __LINE__, pd->pm_descr.pd_class)); #endif tmp = rdmsr(pd->pm_perfctr); /* RDMSR serializes */ - PMCDBG(MDP,REA,2,"amd-read (pre-munge) id=%d -> %jd", ri, tmp); + PMCDBG2(MDP,REA,2,"amd-read (pre-munge) id=%d -> %jd", ri, tmp); if (PMC_IS_SAMPLING_MODE(mode)) { /* Sign extend 48 bit value to 64 bits. */ tmp = (pmc_value_t) (((int64_t) tmp << 16) >> 16); @@ -299,7 +299,7 @@ amd_read_pmc(int cpu, int ri, pmc_value_ } *v = tmp; - PMCDBG(MDP,REA,2,"amd-read (post-munge) id=%d -> %jd", ri, *v); + PMCDBG2(MDP,REA,2,"amd-read (post-munge) id=%d -> %jd", ri, *v); return 0; } @@ -329,7 +329,7 @@ amd_write_pmc(int cpu, int ri, pmc_value mode = PMC_TO_MODE(pm); -#ifdef DEBUG +#ifdef HWPMC_DEBUG KASSERT(pd->pm_descr.pd_class == amd_pmc_class, ("[amd,%d] unknown PMC class (%d)", __LINE__, pd->pm_descr.pd_class)); @@ -339,7 +339,7 @@ amd_write_pmc(int cpu, int ri, pmc_value if (PMC_IS_SAMPLING_MODE(mode)) v = AMD_RELOAD_COUNT_TO_PERFCTR_VALUE(v); - PMCDBG(MDP,WRI,1,"amd-write cpu=%d ri=%d v=%jx", cpu, ri, v); + PMCDBG3(MDP,WRI,1,"amd-write cpu=%d ri=%d v=%jx", cpu, ri, v); /* write the PMC value */ wrmsr(pd->pm_perfctr, v); @@ -356,7 +356,7 @@ amd_config_pmc(int cpu, int ri, struct p { struct pmc_hw *phw; - PMCDBG(MDP,CFG,1, "cpu=%d ri=%d pm=%p", cpu, ri, pm); + PMCDBG3(MDP,CFG,1, "cpu=%d ri=%d pm=%p", cpu, ri, pm); KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] illegal CPU value %d", __LINE__, cpu)); @@ -395,7 +395,7 @@ amd_switch_in(struct pmc_cpu *pc, struct { (void) pc; - PMCDBG(MDP,SWI,1, "pc=%p pp=%p enable-msr=%d", pc, pp, + PMCDBG3(MDP,SWI,1, "pc=%p pp=%p enable-msr=%d", pc, pp, (pp->pp_flags & PMC_PP_ENABLE_MSR_ACCESS) != 0); /* enable the RDPMC instruction if needed */ @@ -416,7 +416,7 @@ amd_switch_out(struct pmc_cpu *pc, struc (void) pc; (void) pp; /* can be NULL */ - PMCDBG(MDP,SWO,1, "pc=%p pp=%p enable-msr=%d", pc, pp, pp ? + PMCDBG3(MDP,SWO,1, "pc=%p pp=%p enable-msr=%d", pc, pp, pp ? (pp->pp_flags & PMC_PP_ENABLE_MSR_ACCESS) == 1 : 0); /* always turn off the RDPMC instruction */ @@ -453,7 +453,7 @@ amd_allocate_pmc(int cpu, int ri, struct caps = pm->pm_caps; - PMCDBG(MDP,ALL,1,"amd-allocate ri=%d caps=0x%x", ri, caps); + PMCDBG2(MDP,ALL,1,"amd-allocate ri=%d caps=0x%x", ri, caps); if ((pd->pd_caps & caps) != caps) return EPERM; @@ -500,7 +500,7 @@ amd_allocate_pmc(int cpu, int ri, struct pm->pm_md.pm_amd.pm_amd_evsel = config; /* save config value */ - PMCDBG(MDP,ALL,2,"amd-allocate ri=%d -> config=0x%x", ri, config); + PMCDBG2(MDP,ALL,2,"amd-allocate ri=%d -> config=0x%x", ri, config); return 0; } @@ -515,7 +515,7 @@ amd_allocate_pmc(int cpu, int ri, struct static int amd_release_pmc(int cpu, int ri, struct pmc *pmc) { -#ifdef DEBUG +#ifdef HWPMC_DEBUG const struct amd_descr *pd; #endif struct pmc_hw *phw; @@ -532,7 +532,7 @@ amd_release_pmc(int cpu, int ri, struct KASSERT(phw->phw_pmc == NULL, ("[amd,%d] PHW pmc %p non-NULL", __LINE__, phw->phw_pmc)); -#ifdef DEBUG +#ifdef HWPMC_DEBUG pd = &amd_pmcdesc[ri]; if (pd->pm_descr.pd_class == amd_pmc_class) KASSERT(AMD_PMC_IS_STOPPED(pd->pm_evsel), @@ -567,7 +567,7 @@ amd_start_pmc(int cpu, int ri) ("[amd,%d] starting cpu%d,pmc%d with null pmc record", __LINE__, cpu, ri)); - PMCDBG(MDP,STA,1,"amd-start cpu=%d ri=%d", cpu, ri); + PMCDBG2(MDP,STA,1,"amd-start cpu=%d ri=%d", cpu, ri); KASSERT(AMD_PMC_IS_STOPPED(pd->pm_evsel), ("[amd,%d] pmc%d,cpu%d: Starting active PMC \"%s\"", __LINE__, @@ -576,7 +576,7 @@ amd_start_pmc(int cpu, int ri) /* turn on the PMC ENABLE bit */ config = pm->pm_md.pm_amd.pm_amd_evsel | AMD_PMC_ENABLE; - PMCDBG(MDP,STA,2,"amd-start config=0x%x", config); + PMCDBG1(MDP,STA,2,"amd-start config=0x%x", config); wrmsr(pd->pm_evsel, config); return 0; @@ -610,7 +610,7 @@ amd_stop_pmc(int cpu, int ri) ("[amd,%d] PMC%d, CPU%d \"%s\" already stopped", __LINE__, ri, cpu, pd->pm_descr.pd_name)); - PMCDBG(MDP,STO,1,"amd-stop ri=%d", ri); + PMCDBG1(MDP,STO,1,"amd-stop ri=%d", ri); /* turn off the PMC ENABLE bit */ config = pm->pm_md.pm_amd.pm_amd_evsel & ~AMD_PMC_ENABLE; @@ -637,7 +637,7 @@ amd_intr(int cpu, struct trapframe *tf) KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] out of range CPU %d", __LINE__, cpu)); - PMCDBG(MDP,INT,1, "cpu=%d tf=%p um=%d", cpu, (void *) tf, + PMCDBG3(MDP,INT,1, "cpu=%d tf=%p um=%d", cpu, (void *) tf, TRAPF_USERMODE(tf)); retval = 0; @@ -769,7 +769,7 @@ amd_pcpu_init(struct pmc_mdep *md, int c KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] insane cpu number %d", __LINE__, cpu)); - PMCDBG(MDP,INI,1,"amd-init cpu=%d", cpu); + PMCDBG1(MDP,INI,1,"amd-init cpu=%d", cpu); amd_pcpu[cpu] = pac = malloc(sizeof(struct amd_cpu), M_PMC, M_WAITOK|M_ZERO); @@ -816,7 +816,7 @@ amd_pcpu_fini(struct pmc_mdep *md, int c KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] insane cpu number (%d)", __LINE__, cpu)); - PMCDBG(MDP,INI,1,"amd-cleanup cpu=%d", cpu); + PMCDBG1(MDP,INI,1,"amd-cleanup cpu=%d", cpu); /* * First, turn off all PMCs on this CPU. @@ -835,7 +835,7 @@ amd_pcpu_fini(struct pmc_mdep *md, int c amd_pcpu[cpu] = NULL; -#ifdef DEBUG +#ifdef HWPMC_DEBUG for (i = 0; i < AMD_NPMCS; i++) { KASSERT(pac->pc_amdpmcs[i].phw_pmc == NULL, ("[amd,%d] CPU%d/PMC%d in use", __LINE__, cpu, i)); @@ -912,7 +912,7 @@ pmc_amd_initialize(void) return NULL; } -#ifdef DEBUG +#ifdef HWPMC_DEBUG amd_pmc_class = class; #endif @@ -976,7 +976,7 @@ pmc_amd_initialize(void) pmc_mdep->pmd_npmc += AMD_NPMCS; - PMCDBG(MDP,INI,0,"%s","amd-initialize"); + PMCDBG0(MDP,INI,0,"amd-initialize"); return (pmc_mdep); Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 1 17:43:34 2015 (r283883) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 1 17:57:05 2015 (r283884) @@ -123,7 +123,7 @@ core_pcpu_init(struct pmc_mdep *md, int KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[iaf,%d] insane cpu number %d", __LINE__, cpu)); - PMCDBG(MDP,INI,1,"core-init cpu=%d", cpu); + PMCDBG1(MDP,INI,1,"core-init cpu=%d", cpu); core_ri = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAP].pcd_ri; npmc = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAP].pcd_num; @@ -162,7 +162,7 @@ core_pcpu_fini(struct pmc_mdep *md, int KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] insane cpu number (%d)", __LINE__, cpu)); - PMCDBG(MDP,INI,1,"core-pcpu-fini cpu=%d", cpu); + PMCDBG1(MDP,INI,1,"core-pcpu-fini cpu=%d", cpu); if ((cc = core_pcpu[cpu]) == NULL) return (0); @@ -223,7 +223,7 @@ iaf_allocate_pmc(int cpu, int ri, struct KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal CPU %d", __LINE__, cpu)); - PMCDBG(MDP,ALL,1, "iaf-allocate ri=%d reqcaps=0x%x", ri, pm->pm_caps); + PMCDBG2(MDP,ALL,1, "iaf-allocate ri=%d reqcaps=0x%x", ri, pm->pm_caps); if (ri < 0 || ri > core_iaf_npmc) return (EINVAL); @@ -267,7 +267,7 @@ iaf_allocate_pmc(int cpu, int ri, struct pm->pm_md.pm_iaf.pm_iaf_ctrl = (flags << (ri * 4)); - PMCDBG(MDP,ALL,2, "iaf-allocate config=0x%jx", + PMCDBG1(MDP,ALL,2, "iaf-allocate config=0x%jx", (uintmax_t) pm->pm_md.pm_iaf.pm_iaf_ctrl); return (0); @@ -282,7 +282,7 @@ iaf_config_pmc(int cpu, int ri, struct p KASSERT(ri >= 0 && ri < core_iaf_npmc, ("[core,%d] illegal row-index %d", __LINE__, ri)); - PMCDBG(MDP,CFG,1, "iaf-config cpu=%d ri=%d pm=%p", cpu, ri, pm); + PMCDBG3(MDP,CFG,1, "iaf-config cpu=%d ri=%d pm=%p", cpu, ri, pm); KASSERT(core_pcpu[cpu] != NULL, ("[core,%d] null per-cpu %d", __LINE__, cpu)); @@ -362,7 +362,7 @@ iaf_read_pmc(int cpu, int ri, pmc_value_ else *v = tmp; - PMCDBG(MDP,REA,1, "iaf-read cpu=%d ri=%d msr=0x%x -> v=%jx", cpu, ri, + PMCDBG4(MDP,REA,1, "iaf-read cpu=%d ri=%d msr=0x%x -> v=%jx", cpu, ri, IAF_RI_TO_MSR(ri), *v); return (0); @@ -371,7 +371,7 @@ iaf_read_pmc(int cpu, int ri, pmc_value_ static int iaf_release_pmc(int cpu, int ri, struct pmc *pmc) { - PMCDBG(MDP,REL,1, "iaf-release cpu=%d ri=%d pm=%p", cpu, ri, pmc); + PMCDBG3(MDP,REL,1, "iaf-release cpu=%d ri=%d pm=%p", cpu, ri, pmc); KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal CPU value %d", __LINE__, cpu)); @@ -396,7 +396,7 @@ iaf_start_pmc(int cpu, int ri) KASSERT(ri >= 0 && ri < core_iaf_npmc, ("[core,%d] illegal row-index %d", __LINE__, ri)); - PMCDBG(MDP,STA,1,"iaf-start cpu=%d ri=%d", cpu, ri); + PMCDBG2(MDP,STA,1,"iaf-start cpu=%d ri=%d", cpu, ri); iafc = core_pcpu[cpu]; pm = iafc->pc_corepmcs[ri + core_iaf_ri].phw_pmc; @@ -414,7 +414,7 @@ iaf_start_pmc(int cpu, int ri) IAF_GLOBAL_CTRL_MASK)); } while (iafc->pc_resync != 0); - PMCDBG(MDP,STA,1,"iafctrl=%x(%x) globalctrl=%jx(%jx)", + PMCDBG4(MDP,STA,1,"iafctrl=%x(%x) globalctrl=%jx(%jx)", iafc->pc_iafctrl, (uint32_t) rdmsr(IAF_CTRL), iafc->pc_globalctrl, rdmsr(IA_GLOBAL_CTRL)); @@ -428,7 +428,7 @@ iaf_stop_pmc(int cpu, int ri) struct core_cpu *iafc; uint64_t msr = 0; - PMCDBG(MDP,STO,1,"iaf-stop cpu=%d ri=%d", cpu, ri); + PMCDBG2(MDP,STO,1,"iaf-stop cpu=%d ri=%d", cpu, ri); iafc = core_pcpu[cpu]; @@ -445,7 +445,7 @@ iaf_stop_pmc(int cpu, int ri) iafc->pc_iafctrl &= ~fc; - PMCDBG(MDP,STO,1,"iaf-stop iafctrl=%x", iafc->pc_iafctrl); + PMCDBG1(MDP,STO,1,"iaf-stop iafctrl=%x", iafc->pc_iafctrl); msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK; wrmsr(IAF_CTRL, msr | (iafc->pc_iafctrl & IAF_CTRL_MASK)); @@ -457,7 +457,7 @@ iaf_stop_pmc(int cpu, int ri) IAF_GLOBAL_CTRL_MASK)); } while (iafc->pc_resync != 0); - PMCDBG(MDP,STO,1,"iafctrl=%x(%x) globalctrl=%jx(%jx)", + PMCDBG4(MDP,STO,1,"iafctrl=%x(%x) globalctrl=%jx(%jx)", iafc->pc_iafctrl, (uint32_t) rdmsr(IAF_CTRL), iafc->pc_globalctrl, rdmsr(IA_GLOBAL_CTRL)); @@ -495,7 +495,7 @@ iaf_write_pmc(int cpu, int ri, pmc_value msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK; wrmsr(IAF_CTRL, msr | (cc->pc_iafctrl & IAF_CTRL_MASK)); - PMCDBG(MDP,WRI,1, "iaf-write cpu=%d ri=%d msr=0x%x v=%jx iafctrl=%jx " + PMCDBG6(MDP,WRI,1, "iaf-write cpu=%d ri=%d msr=0x%x v=%jx iafctrl=%jx " "pmc=%jx", cpu, ri, IAF_RI_TO_MSR(ri), v, (uintmax_t) rdmsr(IAF_CTRL), (uintmax_t) rdpmc(IAF_RI_TO_MSR(ri))); @@ -511,7 +511,7 @@ iaf_initialize(struct pmc_mdep *md, int KASSERT(md != NULL, ("[iaf,%d] md is NULL", __LINE__)); - PMCDBG(MDP,INI,1, "%s", "iaf-initialize"); + PMCDBG0(MDP,INI,1, "iaf-initialize"); pcd = &md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAF]; @@ -2265,7 +2265,7 @@ iap_config_pmc(int cpu, int ri, struct p KASSERT(ri >= 0 && ri < core_iap_npmc, ("[core,%d] illegal row-index %d", __LINE__, ri)); - PMCDBG(MDP,CFG,1, "iap-config cpu=%d ri=%d pm=%p", cpu, ri, pm); + PMCDBG3(MDP,CFG,1, "iap-config cpu=%d ri=%d pm=%p", cpu, ri, pm); KASSERT(core_pcpu[cpu] != NULL, ("[core,%d] null per-cpu %d", __LINE__, cpu)); @@ -2344,7 +2344,7 @@ iap_read_pmc(int cpu, int ri, pmc_value_ else *v = tmp & ((1ULL << core_iap_width) - 1); - PMCDBG(MDP,REA,1, "iap-read cpu=%d ri=%d msr=0x%x -> v=%jx", cpu, ri, + PMCDBG4(MDP,REA,1, "iap-read cpu=%d ri=%d msr=0x%x -> v=%jx", cpu, ri, ri, *v); return (0); @@ -2355,7 +2355,7 @@ iap_release_pmc(int cpu, int ri, struct { (void) pm; - PMCDBG(MDP,REL,1, "iap-release cpu=%d ri=%d pm=%p", cpu, ri, + PMCDBG3(MDP,REL,1, "iap-release cpu=%d ri=%d pm=%p", cpu, ri, pm); KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -2388,11 +2388,11 @@ iap_start_pmc(int cpu, int ri) ("[core,%d] starting cpu%d,ri%d with no pmc configured", __LINE__, cpu, ri)); - PMCDBG(MDP,STA,1, "iap-start cpu=%d ri=%d", cpu, ri); + PMCDBG2(MDP,STA,1, "iap-start cpu=%d ri=%d", cpu, ri); evsel = pm->pm_md.pm_iap.pm_iap_evsel; - PMCDBG(MDP,STA,2, "iap-start/2 cpu=%d ri=%d evselmsr=0x%x evsel=0x%x", + PMCDBG4(MDP,STA,2, "iap-start/2 cpu=%d ri=%d evselmsr=0x%x evsel=0x%x", cpu, ri, IAP_EVSEL0 + ri, evsel); /* Event specific configuration. */ @@ -2440,7 +2440,7 @@ iap_stop_pmc(int cpu, int ri) ("[core,%d] cpu%d ri%d no configured PMC to stop", __LINE__, cpu, ri)); - PMCDBG(MDP,STO,1, "iap-stop cpu=%d ri=%d", cpu, ri); + PMCDBG2(MDP,STO,1, "iap-stop cpu=%d ri=%d", cpu, ri); msr = rdmsr(IAP_EVSEL0 + ri) & ~IAP_EVSEL_MASK; wrmsr(IAP_EVSEL0 + ri, msr); /* stop hw */ @@ -2477,7 +2477,7 @@ iap_write_pmc(int cpu, int ri, pmc_value ("[core,%d] cpu%d ri%d no configured PMC to stop", __LINE__, cpu, ri)); - PMCDBG(MDP,WRI,1, "iap-write cpu=%d ri=%d msr=0x%x v=%jx", cpu, ri, + PMCDBG4(MDP,WRI,1, "iap-write cpu=%d ri=%d msr=0x%x v=%jx", cpu, ri, IAP_PMC0 + ri, v); if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) @@ -2502,7 +2502,7 @@ iap_initialize(struct pmc_mdep *md, int KASSERT(md != NULL, ("[iap,%d] md is NULL", __LINE__)); - PMCDBG(MDP,INI,1, "%s", "iap-initialize"); + PMCDBG0(MDP,INI,1, "iap-initialize"); /* Remember the set of architectural events supported. */ core_architectural_events = ~flags; @@ -2540,7 +2540,7 @@ core_intr(int cpu, struct trapframe *tf) int error, found_interrupt, ri; uint64_t msr; - PMCDBG(MDP,INT, 1, "cpu=%d tf=0x%p um=%d", cpu, (void *) tf, + PMCDBG3(MDP,INT, 1, "cpu=%d tf=0x%p um=%d", cpu, (void *) tf, TRAPF_USERMODE(tf)); found_interrupt = 0; @@ -2599,7 +2599,7 @@ core2_intr(int cpu, struct trapframe *tf struct core_cpu *cc; pmc_value_t v; - PMCDBG(MDP,INT, 1, "cpu=%d tf=0x%p um=%d", cpu, (void *) tf, + PMCDBG3(MDP,INT, 1, "cpu=%d tf=0x%p um=%d", cpu, (void *) tf, TRAPF_USERMODE(tf)); /* @@ -2611,7 +2611,7 @@ core2_intr(int cpu, struct trapframe *tf intrstatus = rdmsr(IA_GLOBAL_STATUS); intrenable = intrstatus & core_pmcmask; - PMCDBG(MDP,INT, 1, "cpu=%d intrstatus=%jx", cpu, + PMCDBG2(MDP,INT, 1, "cpu=%d intrstatus=%jx", cpu, (uintmax_t) intrstatus); found_interrupt = 0; @@ -2657,7 +2657,7 @@ core2_intr(int cpu, struct trapframe *tf /* Reload sampling count. */ wrmsr(IAF_CTR0 + n, v); - PMCDBG(MDP,INT, 1, "iaf-intr cpu=%d error=%d v=%jx(%jx)", cpu, + PMCDBG4(MDP,INT, 1, "iaf-intr cpu=%d error=%d v=%jx(%jx)", cpu, error, (uintmax_t) v, (uintmax_t) rdpmc(IAF_RI_TO_MSR(n))); } @@ -2682,7 +2682,7 @@ core2_intr(int cpu, struct trapframe *tf v = iap_reload_count_to_perfctr_value(pm->pm_sc.pm_reloadcount); - PMCDBG(MDP,INT, 1, "iap-intr cpu=%d error=%d v=%jx", cpu, error, + PMCDBG3(MDP,INT, 1, "iap-intr cpu=%d error=%d v=%jx", cpu, error, (uintmax_t) v); /* Reload sampling count. */ @@ -2692,14 +2692,14 @@ core2_intr(int cpu, struct trapframe *tf /* * Reenable all non-stalled PMCs. */ - PMCDBG(MDP,INT, 1, "cpu=%d intrenable=%jx", cpu, + PMCDBG2(MDP,INT, 1, "cpu=%d intrenable=%jx", cpu, (uintmax_t) intrenable); cc->pc_globalctrl |= intrenable; wrmsr(IA_GLOBAL_CTRL, cc->pc_globalctrl & IA_GLOBAL_CTRL_MASK); - PMCDBG(MDP,INT, 1, "cpu=%d fixedctrl=%jx globalctrl=%jx status=%jx " + PMCDBG5(MDP,INT, 1, "cpu=%d fixedctrl=%jx globalctrl=%jx status=%jx " "ovf=%jx", cpu, (uintmax_t) rdmsr(IAF_CTRL), (uintmax_t) rdmsr(IA_GLOBAL_CTRL), (uintmax_t) rdmsr(IA_GLOBAL_STATUS), @@ -2724,7 +2724,7 @@ pmc_core_initialize(struct pmc_mdep *md, ipa_version = cpuid[CORE_CPUID_EAX] & 0xFF; - PMCDBG(MDP,INI,1,"core-init cputype=%d ncpu=%d ipa-version=%d", + PMCDBG3(MDP,INI,1,"core-init cputype=%d ncpu=%d ipa-version=%d", md->pmd_cputype, maxcpu, ipa_version); if (ipa_version < 1 || ipa_version > 3) { @@ -2770,7 +2770,7 @@ pmc_core_initialize(struct pmc_mdep *md, core_pmcmask |= ((1ULL << core_iaf_npmc) - 1) << IAF_OFFSET; } - PMCDBG(MDP,INI,1,"core-init pmcmask=0x%jx iafri=%d", core_pmcmask, + PMCDBG2(MDP,INI,1,"core-init pmcmask=0x%jx iafri=%d", core_pmcmask, core_iaf_ri); core_pcpu = malloc(sizeof(struct core_cpu **) * maxcpu, M_PMC, @@ -2793,7 +2793,7 @@ pmc_core_initialize(struct pmc_mdep *md, void pmc_core_finalize(struct pmc_mdep *md) { - PMCDBG(MDP,INI,1, "%s", "core-finalize"); + PMCDBG0(MDP,INI,1, "core-finalize"); free(core_pcpu, M_PMC); core_pcpu = NULL; Modified: stable/10/sys/dev/hwpmc/hwpmc_intel.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_intel.c Mon Jun 1 17:43:34 2015 (r283883) +++ stable/10/sys/dev/hwpmc/hwpmc_intel.c Mon Jun 1 17:57:05 2015 (r283884) @@ -46,14 +46,14 @@ intel_switch_in(struct pmc_cpu *pc, stru { (void) pc; - PMCDBG(MDP,SWI,1, "pc=%p pp=%p enable-msr=%d", pc, pp, + PMCDBG3(MDP,SWI,1, "pc=%p pp=%p enable-msr=%d", pc, pp, pp->pp_flags & PMC_PP_ENABLE_MSR_ACCESS); /* allow the RDPMC instruction if needed */ if (pp->pp_flags & PMC_PP_ENABLE_MSR_ACCESS) load_cr4(rcr4() | CR4_PCE); - PMCDBG(MDP,SWI,1, "cr4=0x%jx", (uintmax_t) rcr4()); + PMCDBG1(MDP,SWI,1, "cr4=0x%jx", (uintmax_t) rcr4()); return 0; } @@ -64,7 +64,7 @@ intel_switch_out(struct pmc_cpu *pc, str (void) pc; (void) pp; /* can be NULL */ - PMCDBG(MDP,SWO,1, "pc=%p pp=%p cr4=0x%jx", pc, pp, + PMCDBG3(MDP,SWO,1, "pc=%p pp=%p cr4=0x%jx", pc, pp, (uintmax_t) rcr4()); /* always turn off the RDPMC instruction */ @@ -83,7 +83,7 @@ pmc_intel_initialize(void) KASSERT(cpu_vendor_id == CPU_VENDOR_INTEL, ("[intel,%d] Initializing non-intel processor", __LINE__)); - PMCDBG(MDP,INI,0, "intel-initialize cpuid=0x%x", cpu_id); + PMCDBG1(MDP,INI,0, "intel-initialize cpuid=0x%x", cpu_id); cputype = -1; nclasses = 2; Modified: stable/10/sys/dev/hwpmc/hwpmc_logging.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_logging.c Mon Jun 1 17:43:34 2015 (r283883) +++ stable/10/sys/dev/hwpmc/hwpmc_logging.c Mon Jun 1 17:57:05 2015 (r283884) @@ -211,9 +211,9 @@ pmclog_get_buffer(struct pmc_owner *po) TAILQ_REMOVE(&pmc_bufferlist, plb, plb_next); mtx_unlock_spin(&pmc_bufferlist_mtx); - PMCDBG(LOG,GTB,1, "po=%p plb=%p", po, plb); + PMCDBG2(LOG,GTB,1, "po=%p plb=%p", po, plb); -#ifdef DEBUG +#ifdef HWPMC_DEBUG if (plb) KASSERT(plb->plb_ptr == plb->plb_base && plb->plb_base < plb->plb_fence, @@ -261,7 +261,7 @@ pmclog_loop(void *arg) ownercred = crhold(p->p_ucred); PROC_UNLOCK(p); - PMCDBG(LOG,INI,1, "po=%p kt=%p", po, po->po_kthread); + PMCDBG2(LOG,INI,1, "po=%p kt=%p", po, po->po_kthread); KASSERT(po->po_kthread == curthread->td_proc, ("[pmclog,%d] proc mismatch po=%p po/kt=%p curproc=%p", __LINE__, po, po->po_kthread, curthread->td_proc)); @@ -312,7 +312,7 @@ pmclog_loop(void *arg) mtx_unlock(&pmc_kthread_mtx); /* process the request */ - PMCDBG(LOG,WRI,2, "po=%p base=%p ptr=%p", po, + PMCDBG3(LOG,WRI,2, "po=%p base=%p ptr=%p", po, lb->plb_base, lb->plb_ptr); /* change our thread's credentials before issuing the I/O */ @@ -343,7 +343,7 @@ pmclog_loop(void *arg) po->po_error = error; /* save for flush log */ - PMCDBG(LOG,WRI,2, "po=%p error=%d", po, error); + PMCDBG2(LOG,WRI,2, "po=%p error=%d", po, error); break; } @@ -403,7 +403,7 @@ pmclog_release(struct pmc_owner *po) mtx_unlock_spin(&po->po_mtx); - PMCDBG(LOG,REL,1, "po=%p", po); + PMCDBG1(LOG,REL,1, "po=%p", po); } @@ -423,7 +423,7 @@ pmclog_reserve(struct pmc_owner *po, int uint32_t *lh; struct timespec ts; - PMCDBG(LOG,ALL,1, "po=%p len=%d", po, length); + PMCDBG2(LOG,ALL,1, "po=%p len=%d", po, length); KASSERT(length % sizeof(uint32_t) == 0, ("[pmclog,%d] length not a multiple of word size", __LINE__)); @@ -519,7 +519,7 @@ pmclog_schedule_io(struct pmc_owner *po) ("[pmclog,%d] buffer invariants po=%p ptr=%p fenc=%p", __LINE__, po, po->po_curbuf->plb_ptr, po->po_curbuf->plb_fence)); - PMCDBG(LOG,SIO, 1, "po=%p", po); + PMCDBG1(LOG,SIO, 1, "po=%p", po); mtx_assert(&po->po_mtx, MA_OWNED); @@ -579,7 +579,7 @@ pmclog_configure_log(struct pmc_mdep *md * the former is not held here. */ sx_assert(&pmc_sx, SA_UNLOCKED); - PMCDBG(LOG,CFG,1, "config po=%p logfd=%d", po, logfd); + PMCDBG2(LOG,CFG,1, "config po=%p logfd=%d", po, logfd); p = po->po_owner; @@ -649,7 +649,7 @@ pmclog_deconfigure_log(struct pmc_owner int error; struct pmclog_buffer *lb; - PMCDBG(LOG,CFG,1, "de-config po=%p", po); + PMCDBG1(LOG,CFG,1, "de-config po=%p", po); if ((po->po_flags & PMC_PO_OWNS_LOGFILE) == 0) return (EINVAL); @@ -700,7 +700,7 @@ pmclog_flush(struct pmc_owner *po) int error; struct pmclog_buffer *lb; - PMCDBG(LOG,FLS,1, "po=%p", po); + PMCDBG1(LOG,FLS,1, "po=%p", po); /* * If there is a pending error recorded by the logger thread, @@ -741,7 +741,7 @@ int pmclog_close(struct pmc_owner *po) { - PMCDBG(LOG,CLO,1, "po=%p", po); + PMCDBG1(LOG,CLO,1, "po=%p", po); mtx_lock(&pmc_kthread_mtx); @@ -773,7 +773,7 @@ pmclog_process_callchain(struct pmc *pm, uint32_t flags; struct pmc_owner *po; - PMCDBG(LOG,SAM,1,"pm=%p pid=%d n=%d", pm, ps->ps_pid, + PMCDBG3(LOG,SAM,1,"pm=%p pid=%d n=%d", pm, ps->ps_pid, ps->ps_nsamples); recordlen = offsetof(struct pmclog_callchain, pl_pc) + @@ -843,7 +843,7 @@ pmclog_process_pmcallocate(struct pmc *p po = pm->pm_owner; - PMCDBG(LOG,ALL,1, "pm=%p", pm); + PMCDBG1(LOG,ALL,1, "pm=%p", pm); if (PMC_TO_CLASS(pm) == PMC_CLASS_SOFT) { PMCLOG_RESERVE(po, PMCALLOCATEDYN, @@ -874,7 +874,7 @@ pmclog_process_pmcattach(struct pmc *pm, int pathlen, recordlen; struct pmc_owner *po; - PMCDBG(LOG,ATT,1,"pm=%p pid=%d", pm, pid); + PMCDBG2(LOG,ATT,1,"pm=%p pid=%d", pm, pid); po = pm->pm_owner; @@ -893,7 +893,7 @@ pmclog_process_pmcdetach(struct pmc *pm, { struct pmc_owner *po; - PMCDBG(LOG,ATT,1,"!pm=%p pid=%d", pm, pid); + PMCDBG2(LOG,ATT,1,"!pm=%p pid=%d", pm, pid); po = pm->pm_owner; @@ -915,7 +915,7 @@ pmclog_process_proccsw(struct pmc *pm, s KASSERT(pm->pm_flags & PMC_F_LOG_PROCCSW, ("[pmclog,%d] log-process-csw called gratuitously", __LINE__)); - PMCDBG(LOG,SWO,1,"pm=%p pid=%d v=%jx", pm, pp->pp_proc->p_pid, + PMCDBG3(LOG,SWO,1,"pm=%p pid=%d v=%jx", pm, pp->pp_proc->p_pid, v); po = pm->pm_owner; @@ -933,7 +933,7 @@ pmclog_process_procexec(struct pmc_owner { int pathlen, recordlen; - PMCDBG(LOG,EXC,1,"po=%p pid=%d path=\"%s\"", po, pid, path); + PMCDBG3(LOG,EXC,1,"po=%p pid=%d path=\"%s\"", po, pid, path); pathlen = strlen(path) + 1; /* #bytes for the path */ recordlen = offsetof(struct pmclog_procexec, pl_pathname) + pathlen; @@ -957,7 +957,7 @@ pmclog_process_procexit(struct pmc *pm, struct pmc_owner *po; ri = PMC_TO_ROWINDEX(pm); - PMCDBG(LOG,EXT,1,"pm=%p pid=%d v=%jx", pm, pp->pp_proc->p_pid, + PMCDBG3(LOG,EXT,1,"pm=%p pid=%d v=%jx", pm, pp->pp_proc->p_pid, pp->pp_pmcs[ri].pp_pmcval); po = pm->pm_owner; @@ -1003,7 +1003,7 @@ pmclog_process_userlog(struct pmc_owner { int error; - PMCDBG(LOG,WRI,1, "writelog po=%p ud=0x%x", po, wl->pm_userdata); + PMCDBG2(LOG,WRI,1, "writelog po=%p ud=0x%x", po, wl->pm_userdata); error = 0; Modified: stable/10/sys/dev/hwpmc/hwpmc_mips.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_mips.c Mon Jun 1 17:43:34 2015 (r283883) +++ stable/10/sys/dev/hwpmc/hwpmc_mips.c Mon Jun 1 17:57:05 2015 (r283884) @@ -104,7 +104,7 @@ mips_allocate_pmc(int cpu, int ri, struc pm->pm_md.pm_mips_evsel = config; - PMCDBG(MDP,ALL,2,"mips-allocate ri=%d -> config=0x%x", ri, config); + PMCDBG2(MDP,ALL,2,"mips-allocate ri=%d -> config=0x%x", ri, config); return 0; } @@ -123,7 +123,7 @@ mips_read_pmc(int cpu, int ri, pmc_value pm = mips_pcpu[cpu]->pc_mipspmcs[ri].phw_pmc; tmp = mips_pmcn_read(ri); - PMCDBG(MDP,REA,2,"mips-read id=%d -> %jd", ri, tmp); + PMCDBG2(MDP,REA,2,"mips-read id=%d -> %jd", ri, tmp); if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) *v = tmp - (1UL << (mips_pmc_spec.ps_counter_width - 1)); @@ -148,7 +148,7 @@ mips_write_pmc(int cpu, int ri, pmc_valu if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) v = (1UL << (mips_pmc_spec.ps_counter_width - 1)) - v; - PMCDBG(MDP,WRI,1,"mips-write cpu=%d ri=%d v=%jx", cpu, ri, v); + PMCDBG3(MDP,WRI,1,"mips-write cpu=%d ri=%d v=%jx", cpu, ri, v); mips_pmcn_write(ri, v); @@ -160,7 +160,7 @@ mips_config_pmc(int cpu, int ri, struct { struct pmc_hw *phw; - PMCDBG(MDP,CFG,1, "cpu=%d ri=%d pm=%p", cpu, ri, pm); + PMCDBG3(MDP,CFG,1, "cpu=%d ri=%d pm=%p", cpu, ri, pm); KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[mips,%d] illegal CPU value %d", __LINE__, cpu)); @@ -376,7 +376,7 @@ mips_pcpu_init(struct pmc_mdep *md, int KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[mips,%d] wrong cpu number %d", __LINE__, cpu)); - PMCDBG(MDP,INI,1,"mips-init cpu=%d", cpu); + PMCDBG1(MDP,INI,1,"mips-init cpu=%d", cpu); mips_pcpu[cpu] = pac = malloc(sizeof(struct mips_cpu), M_PMC, M_WAITOK|M_ZERO); @@ -421,7 +421,7 @@ pmc_mips_initialize() */ mips_npmcs = 2; - PMCDBG(MDP,INI,1,"mips-init npmcs=%d", mips_npmcs); + PMCDBG1(MDP,INI,1,"mips-init npmcs=%d", mips_npmcs); /* * Allocate space for pointers to PMC HW descriptors and for Modified: stable/10/sys/dev/hwpmc/hwpmc_mips24k.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_mips24k.c Mon Jun 1 17:43:34 2015 (r283883) +++ stable/10/sys/dev/hwpmc/hwpmc_mips24k.c Mon Jun 1 17:57:05 2015 (r283884) @@ -223,7 +223,7 @@ mips_get_perfctl(int cpu, int ri, uint32 if (caps & PMC_CAP_INTERRUPT) config |= MIPS24K_PMC_INTERRUPT_ENABLE; - PMCDBG(MDP,ALL,2,"mips24k-get_perfctl ri=%d -> config=0x%x", ri, config); + PMCDBG2(MDP,ALL,2,"mips24k-get_perfctl ri=%d -> config=0x%x", ri, config); return (config); } Modified: stable/10/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_mod.c Mon Jun 1 17:43:34 2015 (r283883) +++ stable/10/sys/dev/hwpmc/hwpmc_mod.c Mon Jun 1 17:57:05 2015 (r283884) @@ -173,7 +173,7 @@ static struct pmc_classdep **pmc_rowinde * Prototypes */ -#ifdef DEBUG +#ifdef HWPMC_DEBUG static int pmc_debugflags_sysctl_handler(SYSCTL_HANDLER_ARGS); static int pmc_debugflags_parse(char *newstr, char *fence); #endif @@ -239,7 +239,7 @@ TUNABLE_INT(PMC_SYSCTL_NAME_PREFIX "call SYSCTL_INT(_kern_hwpmc, OID_AUTO, callchaindepth, CTLFLAG_TUN|CTLFLAG_RD, &pmc_callchaindepth, 0, "depth of call chain records"); -#ifdef DEBUG +#ifdef HWPMC_DEBUG struct pmc_debugflags pmc_debugflags = PMC_DEBUG_DEFAULT_FLAGS; char pmc_debugstr[PMC_DEBUG_STRSIZE]; TUNABLE_STR(PMC_SYSCTL_NAME_PREFIX "debugflags", pmc_debugstr, @@ -342,7 +342,7 @@ static moduledata_t pmc_mod = { DECLARE_MODULE(pmc, pmc_mod, SI_SUB_SMP, SI_ORDER_ANY); MODULE_VERSION(pmc, PMC_VERSION); -#ifdef DEBUG +#ifdef HWPMC_DEBUG enum pmc_dbgparse_state { PMCDS_WS, /* in whitespace */ PMCDS_MAJOR, /* seen a major keyword */ @@ -656,12 +656,12 @@ pmc_ri_to_classdep(struct pmc_mdep *md, static void pmc_save_cpu_binding(struct pmc_binding *pb) { - PMCDBG(CPU,BND,2, "%s", "save-cpu"); + PMCDBG0(CPU,BND,2, "save-cpu"); thread_lock(curthread); pb->pb_bound = sched_is_bound(curthread); pb->pb_cpu = curthread->td_oncpu; thread_unlock(curthread); - PMCDBG(CPU,BND,2, "save-cpu cpu=%d", pb->pb_cpu); + PMCDBG1(CPU,BND,2, "save-cpu cpu=%d", pb->pb_cpu); } /* @@ -671,7 +671,7 @@ pmc_save_cpu_binding(struct pmc_binding static void pmc_restore_cpu_binding(struct pmc_binding *pb) { - PMCDBG(CPU,BND,2, "restore-cpu curcpu=%d restore=%d", + PMCDBG2(CPU,BND,2, "restore-cpu curcpu=%d restore=%d", curthread->td_oncpu, pb->pb_cpu); thread_lock(curthread); if (pb->pb_bound) @@ -679,7 +679,7 @@ pmc_restore_cpu_binding(struct pmc_bindi else sched_unbind(curthread); thread_unlock(curthread); - PMCDBG(CPU,BND,2, "%s", "restore-cpu done"); + PMCDBG0(CPU,BND,2, "restore-cpu done"); } /* @@ -696,7 +696,7 @@ pmc_select_cpu(int cpu) KASSERT(pmc_cpu_is_active(cpu), ("[pmc,%d] selecting inactive " "CPU %d", __LINE__, cpu)); - PMCDBG(CPU,SEL,2, "select-cpu cpu=%d", cpu); + PMCDBG1(CPU,SEL,2, "select-cpu cpu=%d", cpu); thread_lock(curthread); sched_bind(curthread, cpu); thread_unlock(curthread); @@ -705,7 +705,7 @@ pmc_select_cpu(int cpu) ("[pmc,%d] CPU not bound [cpu=%d, curr=%d]", __LINE__, cpu, curthread->td_oncpu)); - PMCDBG(CPU,SEL,2, "select-cpu cpu=%d ok", cpu); + PMCDBG1(CPU,SEL,2, "select-cpu cpu=%d ok", cpu); } /* @@ -747,14 +747,14 @@ pmc_remove_owner(struct pmc_owner *po) sx_assert(&pmc_sx, SX_XLOCKED); - PMCDBG(OWN,ORM,1, "remove-owner po=%p", po); + PMCDBG1(OWN,ORM,1, "remove-owner po=%p", po); /* Remove descriptor from the owner hash table */ LIST_REMOVE(po, po_next); /* release all owned PMC descriptors */ LIST_FOREACH_SAFE(pm, &po->po_pmcs, pm_next, tmp) { - PMCDBG(OWN,ORM,2, "pmc=%p", pm); + PMCDBG1(OWN,ORM,2, "pmc=%p", pm); KASSERT(pm->pm_owner == po, ("[pmc,%d] owner %p != po %p", __LINE__, pm->pm_owner, po)); @@ -780,7 +780,7 @@ static void pmc_maybe_remove_owner(struct pmc_owner *po) { - PMCDBG(OWN,OMR,1, "maybe-remove-owner po=%p", po); + PMCDBG1(OWN,OMR,1, "maybe-remove-owner po=%p", po); /* * Remove owner record if @@ -818,10 +818,10 @@ pmc_link_target_process(struct pmc *pm, ri = PMC_TO_ROWINDEX(pm); - PMCDBG(PRC,TLK,1, "link-target pmc=%p ri=%d pmc-process=%p", + PMCDBG3(PRC,TLK,1, "link-target pmc=%p ri=%d pmc-process=%p", pm, ri, pp); -#ifdef DEBUG +#ifdef HWPMC_DEBUG LIST_FOREACH(pt, &pm->pm_targets, pt_next) if (pt->pt_process == pp) KASSERT(0, ("[pmc,%d] pp %p already in pmc %p targets", @@ -871,7 +871,7 @@ pmc_unlink_target_process(struct pmc *pm ri = PMC_TO_ROWINDEX(pm); - PMCDBG(PRC,TUL,1, "unlink-target pmc=%p ri=%d pmc-process=%p", + PMCDBG3(PRC,TUL,1, "unlink-target pmc=%p ri=%d pmc-process=%p", pm, ri, pp); KASSERT(pp->pp_pmcs[ri].pp_pmc == pm, @@ -907,7 +907,7 @@ pmc_unlink_target_process(struct pmc *pm kern_psignal(p, SIGIO); PROC_UNLOCK(p); - PMCDBG(PRC,SIG,2, "signalling proc=%p signal=%d", p, + PMCDBG2(PRC,SIG,2, "signalling proc=%p signal=%d", p, SIGIO); } } @@ -980,7 +980,7 @@ pmc_attach_one_process(struct proc *p, s sx_assert(&pmc_sx, SX_XLOCKED); - PMCDBG(PRC,ATT,2, "attach-one pm=%p ri=%d proc=%p (%d, %s)", pm, + PMCDBG5(PRC,ATT,2, "attach-one pm=%p ri=%d proc=%p (%d, %s)", pm, PMC_TO_ROWINDEX(pm), p, p->p_pid, p->p_comm); /* @@ -1045,7 +1045,7 @@ pmc_attach_process(struct proc *p, struc sx_assert(&pmc_sx, SX_XLOCKED); - PMCDBG(PRC,ATT,1, "attach pm=%p ri=%d proc=%p (%d, %s)", pm, + PMCDBG5(PRC,ATT,1, "attach pm=%p ri=%d proc=%p (%d, %s)", pm, PMC_TO_ROWINDEX(pm), p, p->p_pid, p->p_comm); @@ -1112,7 +1112,7 @@ pmc_detach_one_process(struct proc *p, s ri = PMC_TO_ROWINDEX(pm); - PMCDBG(PRC,ATT,2, "detach-one pm=%p ri=%d proc=%p (%d, %s) flags=0x%x", + PMCDBG6(PRC,ATT,2, "detach-one pm=%p ri=%d proc=%p (%d, %s) flags=0x%x", pm, ri, p, p->p_pid, p->p_comm, flags); if ((pp = pmc_find_process_descriptor(p, 0)) == NULL) @@ -1162,7 +1162,7 @@ pmc_detach_process(struct proc *p, struc sx_assert(&pmc_sx, SX_XLOCKED); - PMCDBG(PRC,ATT,1, "detach pm=%p ri=%d proc=%p (%d, %s)", pm, + PMCDBG5(PRC,ATT,1, "detach pm=%p ri=%d proc=%p (%d, %s)", pm, PMC_TO_ROWINDEX(pm), p, p->p_pid, p->p_comm); if ((pm->pm_flags & PMC_F_DESCENDANTS) == 0) @@ -1233,7 +1233,7 @@ pmc_process_csw_in(struct thread *td) cpu = PCPU_GET(cpuid); /* td->td_oncpu is invalid */ - PMCDBG(CSW,SWI,1, "cpu=%d proc=%p (%d, %s) pp=%p", cpu, p, + PMCDBG5(CSW,SWI,1, "cpu=%d proc=%p (%d, %s) pp=%p", cpu, p, p->p_pid, p->p_comm, pp); KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -1300,7 +1300,7 @@ pmc_process_csw_in(struct thread *td) mtx_pool_unlock_spin(pmc_mtxpool, pm); } - PMCDBG(CSW,SWI,1,"cpu=%d ri=%d new=%jd", cpu, ri, newvalue); + PMCDBG3(CSW,SWI,1,"cpu=%d ri=%d new=%jd", cpu, ri, newvalue); pcd->pcd_write_pmc(cpu, adjri, newvalue); pcd->pcd_start_pmc(cpu, adjri); @@ -1361,7 +1361,7 @@ pmc_process_csw_out(struct thread *td) cpu = PCPU_GET(cpuid); /* td->td_oncpu is invalid */ - PMCDBG(CSW,SWO,1, "cpu=%d proc=%p (%d, %s) pp=%p", cpu, p, + PMCDBG5(CSW,SWO,1, "cpu=%d proc=%p (%d, %s) pp=%p", cpu, p, p->p_pid, p->p_comm, pp); KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -1423,7 +1423,7 @@ pmc_process_csw_out(struct thread *td) tmp = newvalue - PMC_PCPU_SAVED(cpu,ri); - PMCDBG(CSW,SWO,1,"cpu=%d ri=%d tmp=%jd", cpu, ri, + PMCDBG3(CSW,SWO,1,"cpu=%d ri=%d tmp=%jd", cpu, ri, tmp); if (mode == PMC_MODE_TS) { @@ -1580,7 +1580,7 @@ pmc_log_kernel_mappings(struct pmc *pm) */ kmbase = linker_hwpmc_list_objects(); for (km = kmbase; km->pm_file != NULL; km++) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 18:05:06 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1F22830; Mon, 1 Jun 2015 18:05:06 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 55EEC1AEC; Mon, 1 Jun 2015 18:05:06 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wizo1 with SMTP id o1so115230673wiz.1; Mon, 01 Jun 2015 11:05:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=2rMCil1UyGo/Y4gBwgRqYcJinf4iH8qxZWO7sC8BlQM=; b=bBFE9s8JMmPVkb1/rqhfq4Xo0AI3RRkXBNxD4LfYech65V8LfWsNwDcOMe66S5eNES WIucB60viWI84USuEmNwLZWKbEr5gubUTnIkSVYwIixCuOv3/dmDSpjkTla+0M/1PNIr aoMBOkSHkzvsgd5Yrqo6yIMJsImhbq2NYcLHaqhIaQRjD8ef/kSztmiWX3T+0GKao1nJ T5+G7Dcw4VcL9AJOSZW0jlyrNcazhl0JUTcczuITyeSf0w4f3bZx9WIYM9+lQMQcFkKL l7hGO6xkGJQSLux4f5JiBqXkVwAl6gcD4iOh3MBB6Ns+nfMmpuB64jL0fTkxlI/KfQfI Z+4A== X-Received: by 10.194.110.100 with SMTP id hz4mr43885585wjb.6.1433181904870; Mon, 01 Jun 2015 11:05:04 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id ch2sm17751242wib.18.2015.06.01.11.05.03 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jun 2015 11:05:03 -0700 (PDT) Sender: Baptiste Daroussin Date: Mon, 1 Jun 2015 20:05:01 +0200 From: Baptiste Daroussin To: Bruce Evans Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r283842 - head/usr.sbin/pw Message-ID: <20150601180501.GA7523@ivaldir.etoilebsd.net> References: <201505312207.t4VM73Vh015383@svn.freebsd.org> <20150601143951.J863@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tKW2IUtsqtDRztdT" Content-Disposition: inline In-Reply-To: <20150601143951.J863@besplex.bde.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 18:05:06 -0000 --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 01, 2015 at 03:36:58PM +1000, Bruce Evans wrote: > On Sun, 31 May 2015, Baptiste Daroussin wrote: >=20 > > Log: > > Remove useless cast in printf and printf-like functions: > > use %u for uid_t and gid_t >=20 > The cast was not useless. It was to avoid the assumption that the default > promotion of uid_t and gid_t is anything in particular. Now it is assumed > that the default promotion is unsigned (int works too, but this is subtle= r). >=20 > uids and gids are only guaranteed to have non-negative values. In > POSIX before about 2001, uid_t and gid_t can be any type that can > represent all the values taken on, so can be floating point. Floating > point was rarely used for POSIX types, and most programs make too many > assumptions about types, so POSIX now requires uid_t and gid_t to be > integer types. Then can still be signed integer types IIRC. Nornally > it is a bug to print signed integer types with unsigned integer formats, > but since uids and gids are guaranteed to be non-negative both formats > work. (pids require different handling since they are overloaded to > hold process group ids as negative values, so pid_t is signed and %u > format is very broken for printing general pids.) Well uid_t is defined as an unsigned int (__uint32_t actually) if it is ever going to be changed to something else they at least it will now raise a war= ning. I consider using %u here is less buggy than the previous casts. >=20 > The program assumed that uids and gids are not too large to be represented > by unsigned long. This was the only way to print them in C90 and before. > C99 broke this by breaking the promise that unsigned long is the largest > unsigned integer type. This broke all code that does careful casts to > unsigned long. However, unsigned long is usually large enough in practic= e. > Careful code now has to cast to uintmax_t, but that is usually excessive > (but doesn't actually work for __uint128_t). Even plain unsigned usually > works on vaxes. >=20 > > Modified: > > head/usr.sbin/pw/pw_conf.c > > head/usr.sbin/pw/pw_group.c > > head/usr.sbin/pw/pw_user.c > > > > Modified: head/usr.sbin/pw/pw_conf.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=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/usr.sbin/pw/pw_conf.c Sun May 31 21:44:09 2015 (r283841) > > +++ head/usr.sbin/pw/pw_conf.c Sun May 31 22:07:03 2015 (r283842) > > @@ -453,19 +453,19 @@ write_userconfig(char const * file) > > config.default_class : ""); > > break; > > case _UC_MINUID: > > - sbuf_printf(buf, "%lu", (unsigned long) config.min_uid); > > + sbuf_printf(buf, "%u", config.min_uid); >=20 > This works accidentally even on some non-vaxes. All supported arches in > FreeBSD have 32-bit unsigned's, and POSIX was broken in about 2007 to > disallow 16-bit unsigned's. uid_t is uint32_t in FreeBSD. However, it > is planned to change ino_t and some other types to 64 bits. I forget if > the plans include uid_t. Even 64-bit ino_t is too large for me. >=20 > The version with the cast to unsigned long is not really better. Suppose > uid_t is expanded to 16 bits. Then without the cast, the size mismatch > is detected. With it, everything still works if unsigned long is 64 bits, > but if unsigned long is 32 bits then the cast just breaks detection of > the mismatch and gives wrong results for values that actually need 64 bit= s. >=20 > > Modified: head/usr.sbin/pw/pw_group.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=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/usr.sbin/pw/pw_group.c Sun May 31 21:44:09 2015 (r283841) > > +++ head/usr.sbin/pw/pw_group.c Sun May 31 22:07:03 2015 (r283842) > > @@ -83,7 +83,7 @@ pw_group(struct userconf * cnf, int mode > > gid_t next =3D gr_gidpolicy(cnf, args); > > if (getarg(args, 'q')) > > return next; > > - printf("%ld\n", (long)next); > > + printf("%u\n", next); > > return EXIT_SUCCESS; > > } > > >=20 > This also has sign changes. gids are supposed to be non-negative, so > using signed long was probably a bug. >=20 > However, the program is elsewhere clueless about types, and I think you > did't change the parts where it uses atol() to misparse input. atol() > can't even handle 32-bit uids on 32-bit arches. It truncates large > positive ones to LONG_MAX. It returns negative values (truncated to > LONG_MIN if necessary). The misparsing then doesn't detect the error > of negative ids, but blindly casts to uid_t or gid_t, of course using > lexical style bugs in the casts. The magic ids -1 and -2 are sometimes > needed (perhaps not as input in pw, but -1 is used as an error value > and this value can be input). These values don't really exist as ids. > They must be cast before use. The actual values just cannot be entered, > since atol() misparses them (it truncates large values, and also doesn't > support hex, so (uid_t)-2 must be written as a long decimal number to > input it for misparsing. I do plan to work on those atol as well, but I try to be very careful with pw(8). So I make small modifications one by one. >=20 > > @@ -137,7 +137,7 @@ pw_group(struct userconf * cnf, int mode > > else if (rc !=3D 0) { > > err(EX_IOERR, "group update"); > > } > > - pw_log(cnf, mode, W_GROUP, "%s(%ld) removed", a_name->val, (long) g= id); > > + pw_log(cnf, mode, W_GROUP, "%s(%u) removed", a_name->val, gid); > > return EXIT_SUCCESS; > > } else if (mode =3D=3D M_PRINT) > > return print_group(grp, getarg(args, 'P') !=3D NULL); >=20 > If the error gid (gid_t)-1 is ever printed, now %u format prints it as a > cryptic decimal number where %ld format printed it as -1. well actually this code was actually used, and I checked the output before = and after the change and it printed the same output 4294967295. Best regards, Bapt --tKW2IUtsqtDRztdT Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlVsns0ACgkQ8kTtMUmk6ExM/wCgnqGE+gb3+K6o8x8qWsIpuibc JmIAnR31xOghBTsEQ83xNzIECu2OI7rA =ZPS8 -----END PGP SIGNATURE----- --tKW2IUtsqtDRztdT-- From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 18:05:31 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C56E097D; Mon, 1 Jun 2015 18:05:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A75C21AF6; Mon, 1 Jun 2015 18:05:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51I5Vu3021909; Mon, 1 Jun 2015 18:05:31 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51I5V6Z021907; Mon, 1 Jun 2015 18:05:31 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506011805.t51I5V6Z021907@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 1 Jun 2015 18:05: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: r283885 - stable/10/usr.sbin/pmcstat 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 18:05:31 -0000 Author: jhb Date: Mon Jun 1 18:05:30 2015 New Revision: 283885 URL: https://svnweb.freebsd.org/changeset/base/283885 Log: MFC 282643: Use the kern.bootfile sysctl to set the default kernel path rather than hardcoding /boot/kernel. This allows pmcstat(8) to work without -k when using nextboot -k or 'boot foo' at the loader to boot alternate kernels. Sponsored by: Norse Corp, Inc. Modified: stable/10/usr.sbin/pmcstat/pmcstat.8 stable/10/usr.sbin/pmcstat/pmcstat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pmcstat/pmcstat.8 ============================================================================== --- stable/10/usr.sbin/pmcstat/pmcstat.8 Mon Jun 1 17:57:05 2015 (r283884) +++ stable/10/usr.sbin/pmcstat/pmcstat.8 Mon Jun 1 18:05:30 2015 (r283885) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Oct 27, 2014 +.Dd May 8, 2015 .Dt PMCSTAT 8 .Os .Sh NAME @@ -279,8 +279,9 @@ Set the pathname of the kernel directory This directory specifies where .Nm should look for the kernel and its modules. -The default is -.Pa /boot/kernel . +The default is to use the path of the running kernel obtained from the +.Va kern.bootfile +sysctl. .It Fl l Ar secs Set system-wide performance measurement duration for .Ar secs Modified: stable/10/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- stable/10/usr.sbin/pmcstat/pmcstat.c Mon Jun 1 17:57:05 2015 (r283884) +++ stable/10/usr.sbin/pmcstat/pmcstat.c Mon Jun 1 18:05:30 2015 (r283885) @@ -557,7 +557,7 @@ main(int argc, char **argv) int c, check_driver_stats, current_sampling_count; int do_callchain, do_descendants, do_logproccsw, do_logprocexit; int do_print, do_read; - size_t dummy; + size_t len; int graphdepth; int pipefd[2], rfd; int use_cumulative_counts; @@ -586,7 +586,6 @@ main(int argc, char **argv) args.pa_verbosity = 1; args.pa_logfd = -1; args.pa_fsroot = ""; - args.pa_kernel = strdup("/boot/kernel"); args.pa_samplesdir = "."; args.pa_printfile = stderr; args.pa_graphdepth = DEFAULT_CALLGRAPH_DEPTH; @@ -610,12 +609,20 @@ main(int argc, char **argv) ev = NULL; CPU_ZERO(&cpumask); + /* Default to using the running system kernel. */ + len = 0; + if (sysctlbyname("kern.bootfile", NULL, &len, NULL, 0) == -1) + err(EX_OSERR, "ERROR: Cannot determine path of running kernel"); + args.pa_kernel = malloc(len + 1); + if (sysctlbyname("kern.bootfile", args.pa_kernel, &len, NULL, 0) == -1) + err(EX_OSERR, "ERROR: Cannot determine path of running kernel"); + /* * The initial CPU mask specifies all non-halted CPUS in the * system. */ - dummy = sizeof(int); - if (sysctlbyname("hw.ncpu", &ncpu, &dummy, NULL, 0) < 0) + len = sizeof(int); + if (sysctlbyname("hw.ncpu", &ncpu, &len, NULL, 0) < 0) err(EX_OSERR, "ERROR: Cannot determine the number of CPUs"); for (hcpu = 0; hcpu < ncpu; hcpu++) CPU_SET(hcpu, &cpumask); @@ -1061,33 +1068,31 @@ main(int argc, char **argv) ); /* - * Check if "-k kerneldir" was specified, and if whether - * 'kerneldir' actually refers to a file. If so, use - * `dirname path` to determine the kernel directory. - */ - if (args.pa_flags & FLAG_HAS_KERNELPATH) { - (void) snprintf(buffer, sizeof(buffer), "%s%s", args.pa_fsroot, - args.pa_kernel); + * Check if 'kerneldir' refers to a file rather than a + * directory. If so, use `dirname path` to determine the + * kernel directory. + */ + (void) snprintf(buffer, sizeof(buffer), "%s%s", args.pa_fsroot, + args.pa_kernel); + if (stat(buffer, &sb) < 0) + err(EX_OSERR, "ERROR: Cannot locate kernel \"%s\"", + buffer); + if (!S_ISREG(sb.st_mode) && !S_ISDIR(sb.st_mode)) + errx(EX_USAGE, "ERROR: \"%s\": Unsupported file type.", + buffer); + if (!S_ISDIR(sb.st_mode)) { + tmp = args.pa_kernel; + args.pa_kernel = strdup(dirname(args.pa_kernel)); + free(tmp); + (void) snprintf(buffer, sizeof(buffer), "%s%s", + args.pa_fsroot, args.pa_kernel); if (stat(buffer, &sb) < 0) - err(EX_OSERR, "ERROR: Cannot locate kernel \"%s\"", + err(EX_OSERR, "ERROR: Cannot stat \"%s\"", buffer); - if (!S_ISREG(sb.st_mode) && !S_ISDIR(sb.st_mode)) - errx(EX_USAGE, "ERROR: \"%s\": Unsupported file type.", + if (!S_ISDIR(sb.st_mode)) + errx(EX_USAGE, + "ERROR: \"%s\" is not a directory.", buffer); - if (!S_ISDIR(sb.st_mode)) { - tmp = args.pa_kernel; - args.pa_kernel = strdup(dirname(args.pa_kernel)); - free(tmp); - (void) snprintf(buffer, sizeof(buffer), "%s%s", - args.pa_fsroot, args.pa_kernel); - if (stat(buffer, &sb) < 0) - err(EX_OSERR, "ERROR: Cannot stat \"%s\"", - buffer); - if (!S_ISDIR(sb.st_mode)) - errx(EX_USAGE, - "ERROR: \"%s\" is not a directory.", - buffer); - } } /* From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 18:08:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E2A7BF2; Mon, 1 Jun 2015 18:08:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CA691B48; Mon, 1 Jun 2015 18:08:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51I8vsL022512; Mon, 1 Jun 2015 18:08:57 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51I8uQ1022510; Mon, 1 Jun 2015 18:08:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506011808.t51I8uQ1022510@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 1 Jun 2015 18:08: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: r283886 - in stable: 10/sys/dev/hwpmc 9/sys/dev/hwpmc 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 18:08:57 -0000 Author: jhb Date: Mon Jun 1 18:08:56 2015 New Revision: 283886 URL: https://svnweb.freebsd.org/changeset/base/283886 Log: MFC 283123: Fix two bugs that could result in PMC sampling effectively stopping. In both cases, the the effect of the bug was that a very small positive number was written to the counter. This means that a large number of events needed to occur before the next sampling interrupt would trigger. Even with very frequently occurring events like clock cycles wrapping all the way around could take a long time. Both bugs occurred when updating the saved reload count for an outgoing thread on a context switch. First, the counter-independent code compares the current reload count against the count set when the thread switched in and generates a delta to apply to the saved count. If this delta causes the reload counter to go negative, it would add a full reload interval to wrap it around to a positive value. The fix is to add the full reload interval if the resulting counter is zero. Second, occasionally the raw counter value read during a context switch has actually wrapped, but an interrupt has not yet triggered. In this case the existing logic would return a very large reload count (e.g. 2^48 - 2 if the counter had overflowed by a count of 2). This was seen both for fixed-function and programmable counters on an E5-2643. Workaround this case by returning a reload count of zero. PR: 198149 Sponsored by: Norse Corp, Inc. Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c stable/10/sys/dev/hwpmc/hwpmc_mod.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/hwpmc/hwpmc_core.c stable/9/sys/dev/hwpmc/hwpmc_mod.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 1 18:05:30 2015 (r283885) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 1 18:08:56 2015 (r283886) @@ -203,6 +203,10 @@ core_pcpu_fini(struct pmc_mdep *md, int static pmc_value_t iaf_perfctr_value_to_reload_count(pmc_value_t v) { + + /* If the PMC has overflowed, return a reload count of zero. */ + if ((v & (1ULL << (core_iaf_width - 1))) == 0) + return (0); v &= (1ULL << core_iaf_width) - 1; return (1ULL << core_iaf_width) - v; } @@ -1786,6 +1790,10 @@ static const int niap_events = sizeof(ia static pmc_value_t iap_perfctr_value_to_reload_count(pmc_value_t v) { + + /* If the PMC has overflowed, return a reload count of zero. */ + if ((v & (1ULL << (core_iap_width - 1))) == 0) + return (0); v &= (1ULL << core_iap_width) - 1; return (1ULL << core_iap_width) - v; } Modified: stable/10/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_mod.c Mon Jun 1 18:05:30 2015 (r283885) +++ stable/10/sys/dev/hwpmc/hwpmc_mod.c Mon Jun 1 18:08:56 2015 (r283886) @@ -1440,7 +1440,7 @@ pmc_process_csw_out(struct thread *td) tmp += pm->pm_sc.pm_reloadcount; mtx_pool_lock_spin(pmc_mtxpool, pm); pp->pp_pmcs[ri].pp_pmcval -= tmp; - if ((int64_t) pp->pp_pmcs[ri].pp_pmcval < 0) + if ((int64_t) pp->pp_pmcs[ri].pp_pmcval <= 0) pp->pp_pmcs[ri].pp_pmcval += pm->pm_sc.pm_reloadcount; mtx_pool_unlock_spin(pmc_mtxpool, pm); From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 18:08:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4424CBF3; Mon, 1 Jun 2015 18:08:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32BE61B49; Mon, 1 Jun 2015 18:08:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51I8wVr022521; Mon, 1 Jun 2015 18:08:58 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51I8vZG022519; Mon, 1 Jun 2015 18:08:57 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506011808.t51I8vZG022519@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 1 Jun 2015 18:08: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: r283886 - in stable: 10/sys/dev/hwpmc 9/sys/dev/hwpmc 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 18:08:58 -0000 Author: jhb Date: Mon Jun 1 18:08:56 2015 New Revision: 283886 URL: https://svnweb.freebsd.org/changeset/base/283886 Log: MFC 283123: Fix two bugs that could result in PMC sampling effectively stopping. In both cases, the the effect of the bug was that a very small positive number was written to the counter. This means that a large number of events needed to occur before the next sampling interrupt would trigger. Even with very frequently occurring events like clock cycles wrapping all the way around could take a long time. Both bugs occurred when updating the saved reload count for an outgoing thread on a context switch. First, the counter-independent code compares the current reload count against the count set when the thread switched in and generates a delta to apply to the saved count. If this delta causes the reload counter to go negative, it would add a full reload interval to wrap it around to a positive value. The fix is to add the full reload interval if the resulting counter is zero. Second, occasionally the raw counter value read during a context switch has actually wrapped, but an interrupt has not yet triggered. In this case the existing logic would return a very large reload count (e.g. 2^48 - 2 if the counter had overflowed by a count of 2). This was seen both for fixed-function and programmable counters on an E5-2643. Workaround this case by returning a reload count of zero. PR: 198149 Sponsored by: Norse Corp, Inc. Modified: stable/9/sys/dev/hwpmc/hwpmc_core.c stable/9/sys/dev/hwpmc/hwpmc_mod.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c stable/10/sys/dev/hwpmc/hwpmc_mod.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/9/sys/dev/hwpmc/hwpmc_core.c Mon Jun 1 18:05:30 2015 (r283885) +++ stable/9/sys/dev/hwpmc/hwpmc_core.c Mon Jun 1 18:08:56 2015 (r283886) @@ -195,6 +195,10 @@ core_pcpu_fini(struct pmc_mdep *md, int static pmc_value_t iaf_perfctr_value_to_reload_count(pmc_value_t v) { + + /* If the PMC has overflowed, return a reload count of zero. */ + if ((v & (1ULL << (core_iaf_width - 1))) == 0) + return (0); v &= (1ULL << core_iaf_width) - 1; return (1ULL << core_iaf_width) - v; } @@ -1697,6 +1701,10 @@ static const int niap_events = sizeof(ia static pmc_value_t iap_perfctr_value_to_reload_count(pmc_value_t v) { + + /* If the PMC has overflowed, return a reload count of zero. */ + if ((v & (1ULL << (core_iap_width - 1))) == 0) + return (0); v &= (1ULL << core_iap_width) - 1; return (1ULL << core_iap_width) - v; } Modified: stable/9/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- stable/9/sys/dev/hwpmc/hwpmc_mod.c Mon Jun 1 18:05:30 2015 (r283885) +++ stable/9/sys/dev/hwpmc/hwpmc_mod.c Mon Jun 1 18:08:56 2015 (r283886) @@ -1434,7 +1434,7 @@ pmc_process_csw_out(struct thread *td) tmp += pm->pm_sc.pm_reloadcount; mtx_pool_lock_spin(pmc_mtxpool, pm); pp->pp_pmcs[ri].pp_pmcval -= tmp; - if ((int64_t) pp->pp_pmcs[ri].pp_pmcval < 0) + if ((int64_t) pp->pp_pmcs[ri].pp_pmcval <= 0) pp->pp_pmcs[ri].pp_pmcval += pm->pm_sc.pm_reloadcount; mtx_pool_unlock_spin(pmc_mtxpool, pm); From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 18:13:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A1F0F6D; Mon, 1 Jun 2015 18:13:33 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58A651D8F; Mon, 1 Jun 2015 18:13:33 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51IDXHX026960; Mon, 1 Jun 2015 18:13:33 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51IDXAO026959; Mon, 1 Jun 2015 18:13:33 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201506011813.t51IDXAO026959@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 1 Jun 2015 18:13:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283887 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 18:13:33 -0000 Author: andrew Date: Mon Jun 1 18:13:32 2015 New Revision: 283887 URL: https://svnweb.freebsd.org/changeset/base/283887 Log: Clear the C bit of the saved program state register when also clearing the return value. We use this bit to signal when a syscall has failed, and without this getcontext/setcontext may fail. MFC after: 1 week Modified: head/sys/arm/arm/machdep.c Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Mon Jun 1 18:08:56 2015 (r283886) +++ head/sys/arm/arm/machdep.c Mon Jun 1 18:13:32 2015 (r283887) @@ -741,10 +741,13 @@ get_mcontext(struct thread *td, mcontext struct trapframe *tf = td->td_frame; __greg_t *gr = mcp->__gregs; - if (clear_ret & GET_MC_CLEAR_RET) + if (clear_ret & GET_MC_CLEAR_RET) { gr[_REG_R0] = 0; - else + gr[_REG_CPSR] = tf->tf_spsr & ~PSR_C; + } else { gr[_REG_R0] = tf->tf_r0; + gr[_REG_CPSR] = tf->tf_spsr; + } gr[_REG_R1] = tf->tf_r1; gr[_REG_R2] = tf->tf_r2; gr[_REG_R3] = tf->tf_r3; @@ -760,7 +763,6 @@ get_mcontext(struct thread *td, mcontext gr[_REG_SP] = tf->tf_usr_sp; gr[_REG_LR] = tf->tf_usr_lr; gr[_REG_PC] = tf->tf_pc; - gr[_REG_CPSR] = tf->tf_spsr; return (0); } From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 18:15:45 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0A6325E; Mon, 1 Jun 2015 18:15:45 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85B851DB3; Mon, 1 Jun 2015 18:15:45 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51IFjaT027500; Mon, 1 Jun 2015 18:15:45 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51IFiF1027492; Mon, 1 Jun 2015 18:15:44 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201506011815.t51IFiF1027492@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 1 Jun 2015 18:15:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283888 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 18:15:45 -0000 Author: andrew Date: Mon Jun 1 18:15:44 2015 New Revision: 283888 URL: https://svnweb.freebsd.org/changeset/base/283888 Log: Remove __ARM_EABI__ from sys/arm/arm, building for oabi is unsupported. Modified: head/sys/arm/arm/elf_trampoline.c head/sys/arm/arm/exception.S head/sys/arm/arm/stack_machdep.c Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Mon Jun 1 18:13:32 2015 (r283887) +++ head/sys/arm/arm/elf_trampoline.c Mon Jun 1 18:15:44 2015 (r283888) @@ -725,7 +725,6 @@ __start(void) (unsigned int)(&load_kernel) + 800, sp); } -#ifdef __ARM_EABI__ /* We need to provide these functions but never call them */ void __aeabi_unwind_cpp_pr0(void); void __aeabi_unwind_cpp_pr1(void); @@ -737,5 +736,3 @@ void __aeabi_unwind_cpp_pr0(void) { } -#endif - Modified: head/sys/arm/arm/exception.S ============================================================================== --- head/sys/arm/arm/exception.S Mon Jun 1 18:13:32 2015 (r283887) +++ head/sys/arm/arm/exception.S Mon Jun 1 18:15:44 2015 (r283888) @@ -237,7 +237,6 @@ _C_LABEL(dtrace_invop_calltrap_addr): ldmia sp, {sp, lr, pc}^ /* Restore lr and exit */ #endif -#if defined(__ARM_EABI__) /* * Unwind hints so we can unwind past functions that use * PULLFRAMEFROMSVCANDEXIT. They are run in reverse order. @@ -249,9 +248,6 @@ _C_LABEL(dtrace_invop_calltrap_addr): .pad #(2*4); /* Skip user sp and lr */ \ .save {r0-r12}; /* Restore r0-r12 */ \ .pad #(4) /* Skip spsr */ -#else -#define UNWINDSVCFRAME -#endif #define DO_AST \ ldr r0, [sp]; /* Get the SPSR from stack */ \ Modified: head/sys/arm/arm/stack_machdep.c ============================================================================== --- head/sys/arm/arm/stack_machdep.c Mon Jun 1 18:13:32 2015 (r283887) +++ head/sys/arm/arm/stack_machdep.c Mon Jun 1 18:15:44 2015 (r283888) @@ -49,16 +49,6 @@ extern vm_offset_t kernel_vm_end; static void stack_capture(struct stack *st, u_int32_t *frame) { -#if !defined(__ARM_EABI__) && !defined(__clang__) - vm_offset_t callpc; - - while (INKERNEL(frame) && (vm_offset_t)frame < kernel_vm_end) { - callpc = frame[FR_SCP]; - if (stack_put(st, callpc) == -1) - break; - frame = (u_int32_t *)(frame[FR_RFP]); - } -#endif } void From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 18:15:46 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC60D25F; Mon, 1 Jun 2015 18:15:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB9FF1DB5; Mon, 1 Jun 2015 18:15:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51IFkbh027541; Mon, 1 Jun 2015 18:15:46 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51IFkPv027540; Mon, 1 Jun 2015 18:15:46 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201506011815.t51IFkPv027540@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 1 Jun 2015 18:15:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283889 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 18:15:46 -0000 Author: delphij Date: Mon Jun 1 18:15:45 2015 New Revision: 283889 URL: https://svnweb.freebsd.org/changeset/base/283889 Log: Clear p_stops when doing PT_DETACH. Without this, if a process was being traced by truss(1), which uses different p_stops bits than gdb(1), the latter would misbehave because of the unexpected bits. Reported by: jceel Submitted by: sef Sponsored by: iXsystems, Inc. MFC after: 2 weeks Modified: head/sys/kern/sys_process.c Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Mon Jun 1 18:15:44 2015 (r283888) +++ head/sys/kern/sys_process.c Mon Jun 1 18:15:45 2015 (r283889) @@ -963,6 +963,7 @@ kern_ptrace(struct thread *td, int req, CTR1(KTR_PTRACE, "PT_DETACH: pid %d", p->p_pid); p->p_oppid = 0; p->p_flag &= ~(P_TRACED | P_WAITED | P_FOLLOWFORK); + p->p_stops = 0; /* should we send SIGCHLD? */ /* childproc_continued(p); */ From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 18:26:22 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 61CEE808; Mon, 1 Jun 2015 18:26:22 +0000 (UTC) (envelope-from jhb@freebsd.org) 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 3D7521016; Mon, 1 Jun 2015 18:26:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 52D2AB97E; Mon, 1 Jun 2015 14:26:21 -0400 (EDT) From: John Baldwin To: Xin LI Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283889 - head/sys/kern Date: Mon, 01 Jun 2015 14:25:17 -0400 Message-ID: <3091869.VXHGj8nhqT@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.1-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201506011815.t51IFkPv027540@svn.freebsd.org> References: <201506011815.t51IFkPv027540@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); Mon, 01 Jun 2015 14:26:21 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 18:26:22 -0000 On Monday, June 01, 2015 06:15:46 PM Xin LI wrote: > Author: delphij > Date: Mon Jun 1 18:15:45 2015 > New Revision: 283889 > URL: https://svnweb.freebsd.org/changeset/base/283889 > > Log: > Clear p_stops when doing PT_DETACH. > > Without this, if a process was being traced by truss(1), which > uses different p_stops bits than gdb(1), the latter would > misbehave because of the unexpected bits. Please also clear this for procfs detach as well. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 18:42:32 2015 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43EE6101; Mon, 1 Jun 2015 18:42:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Mon, 1 Jun 2015 18:42:26 +0000 From: Glen Barber To: Jack F Vogel Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283883 - in head/sys: dev/ixgbe modules/ixv Message-ID: <20150601184226.GC53056@hub.FreeBSD.org> References: <201506011743.t51HhZUP011379@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ZmUaFz6apKcXQszQ" Content-Disposition: inline In-Reply-To: <201506011743.t51HhZUP011379@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 X-PEKBAC-Definition: Problem Exists, Keyboard Between Admin/Computer User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 18:42:32 -0000 --ZmUaFz6apKcXQszQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 01, 2015 at 05:43:35PM +0000, Jack F Vogel wrote: > Author: jfv > Date: Mon Jun 1 17:43:34 2015 > New Revision: 283883 > URL: https://svnweb.freebsd.org/changeset/base/283883 >=20 > Log: > Delta D2489 - Add SRIOV support to the Intel 10G driver. > =20 > NOTE: This is a technology preview, while it has undergone > development testing, Intel has not yet completed full > validation of the feature. It is being integrated for > early access and customer testing. >=20 > Modified: > head/sys/dev/ixgbe/if_ix.c > head/sys/dev/ixgbe/if_ixv.c > head/sys/dev/ixgbe/ix_txrx.c > head/sys/dev/ixgbe/ixgbe.h > head/sys/dev/ixgbe/ixgbe_mbx.h > head/sys/dev/ixgbe/ixgbe_vf.c > head/sys/modules/ixv/Makefile >=20 This breaks the build. Please revert until the change is properly build-tested. /usr/src/sys/dev/ixgbe/if_ix.c:233:2: error: use of undeclared identifier '= pci_init_iov_desc' DEVMETHOD(pci_init_iov, ixgbe_init_iov), ^ /usr/src/sys/sys/bus.h:649:19: note: expanded from macro 'DEVMETHOD' #define DEVMETHOD KOBJMETHOD ^ /usr/src/sys/sys/kobj.h:98:5: note: expanded from macro 'KOBJMETHOD' { &NAME##_desc, (kobjop_t) (1 ? FUNC : (NAME##_t *)NULL) } ^ :48:1: note: expanded from here pci_init_iov_desc ^ /usr/src/sys/dev/ixgbe/if_ix.c:233:2: error: expected expression /usr/src/sys/sys/bus.h:649:19: note: expanded from macro 'DEVMETHOD' #define DEVMETHOD KOBJMETHOD ^ /usr/src/sys/sys/kobj.h:98:52: note: expanded from macro 'KOBJMETHOD' { &NAME##_desc, (kobjop_t) (1 ? FUNC : (NAME##_t *)NULL) } ^ /usr/src/sys/dev/ixgbe/if_ix.c:233:2: error: use of undeclared identifier '= pci_init_iov_t' /usr/src/sys/sys/bus.h:649:19: note: expanded from macro 'DEVMETHOD' #define DEVMETHOD KOBJMETHOD ^ /usr/src/sys/sys/kobj.h:98:42: note: expanded from macro 'KOBJMETHOD' { &NAME##_desc, (kobjop_t) (1 ? FUNC : (NAME##_t *)NULL) } ^ :48:1: note: expanded from here pci_init_iov_t ^ /usr/src/sys/dev/ixgbe/if_ix.c:234:2: error: use of undeclared identifier '= pci_uninit_iov_desc'; did you mean 'pci_enable_io_desc'? DEVMETHOD(pci_uninit_iov, ixgbe_uninit_iov), ^ /usr/src/sys/sys/bus.h:649:19: note: expanded from macro 'DEVMETHOD' #define DEVMETHOD KOBJMETHOD ^ /usr/src/sys/sys/kobj.h:98:5: note: expanded from macro 'KOBJMETHOD' { &NAME##_desc, (kobjop_t) (1 ? FUNC : (NAME##_t *)NULL) } ^ :48:1: note: expanded from here pci_uninit_iov_desc ^ =2E/pci_if.h:125:27: note: 'pci_enable_io_desc' declared here extern struct kobjop_desc pci_enable_io_desc; ^ /usr/src/sys/dev/ixgbe/if_ix.c:234:2: error: expected expression DEVMETHOD(pci_uninit_iov, ixgbe_uninit_iov), ^ /usr/src/sys/sys/bus.h:649:19: note: expanded from macro 'DEVMETHOD' #define DEVMETHOD KOBJMETHOD ^ /usr/src/sys/sys/kobj.h:98:52: note: expanded from macro 'KOBJMETHOD' { &NAME##_desc, (kobjop_t) (1 ? FUNC : (NAME##_t *)NULL) } /usr/src/sys/dev/ixgbe/if_ix.c:234:2: error: use of undeclared identifier '= pci_uninit_iov_t' /usr/src/sys/sys/bus.h:649:19: note: expanded from macro 'DEVMETHOD' #define DEVMETHOD KOBJMETHOD ^ /usr/src/sys/sys/kobj.h:98:42: note: expanded from macro 'KOBJMETHOD' { &NAME##_desc, (kobjop_t) (1 ? FUNC : (NAME##_t *)NULL) } ^ :48:1: note: expanded from here pci_uninit_iov_t ^ /usr/src/sys/dev/ixgbe/if_ix.c:235:2: error: use of undeclared identifier '= pci_add_vf_desc' DEVMETHOD(pci_add_vf, ixgbe_add_vf), ^ /usr/src/sys/sys/bus.h:649:19: note: expanded from macro 'DEVMETHOD' #define DEVMETHOD KOBJMETHOD ^ /usr/src/sys/sys/kobj.h:98:5: note: expanded from macro 'KOBJMETHOD' { &NAME##_desc, (kobjop_t) (1 ? FUNC : (NAME##_t *)NULL) } ^ :48:1: note: expanded from here pci_add_vf_desc ^ /usr/src/sys/dev/ixgbe/if_ix.c:235:2: error: expected expression /usr/src/sys/sys/bus.h:649:19: note: expanded from macro 'DEVMETHOD' #define DEVMETHOD KOBJMETHOD ^ /usr/src/sys/sys/kobj.h:98:52: note: expanded from macro 'KOBJMETHOD' { &NAME##_desc, (kobjop_t) (1 ? FUNC : (NAME##_t *)NULL) } ^ /usr/src/sys/dev/ixgbe/if_ix.c:235:2: error: use of undeclared identifier '= pci_add_vf_t' /usr/src/sys/sys/bus.h:649:19: note: expanded from macro 'DEVMETHOD' #define DEVMETHOD KOBJMETHOD ^ /usr/src/sys/sys/kobj.h:98:42: note: expanded from macro 'KOBJMETHOD' { &NAME##_desc, (kobjop_t) (1 ? FUNC : (NAME##_t *)NULL) } ^ :48:1: note: expanded from here pci_add_vf_t ^ /usr/src/sys/dev/ixgbe/if_ix.c:595:11: error: implicit declaration of funct= ion 'pci_iov_attach' is invalid in C99 [-Werror,-Wimplicit-function-declara= tion] error =3D pci_iov_attach(dev, pf_schema, vf_schema); ^ /usr/src/sys/dev/ixgbe/if_ix.c:660:6: error: implicit declaration of functi= on 'pci_iov_detach' is invalid in C99 [-Werror,-Wimplicit-function-declarat= ion] if (pci_iov_detach(dev) !=3D 0) { ^ /usr/src/sys/dev/ixgbe/if_ix.c:660:6: note: did you mean 'pci_iov_attach'? /usr/src/sys/dev/ixgbe/if_ix.c:595:11: note: 'pci_iov_attach' declared here error =3D pci_iov_attach(dev, pf_schema, vf_schema); ^ 11 errors generated. *** Error code 1 Stop. make[2]: stopped in /usr/obj/usr/src/sys/GENERIC *** Error code 1 Glen --ZmUaFz6apKcXQszQ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVbKeSAAoJEAMUWKVHj+KTFWQP+wZD+02ZXjh8QF9P3EO8gSWg 29DTZtkVO1u8VLe1dWJ0sjX4knMYdxCD55TbURFQwLBKFqlJFvPjVJT0z437eQE6 H+deyFijrMiN8hcwJhxh7w7i/puLiW2NDTLoZR00EJth1O+hFqm23IByojuLEY/V VHOwgOVQFt/BLM0N9mm9d/fb7ko4qtL40Mr+jT2Ih5uUvxLrp6JzOCcK9lPoVT/T FVHXjxLXD37MreBqwDF+ARkFi1as0VIDF3iHlCU4t9KH+xkCdADX9BSXlOxO4e5f aSoIASSDqVH4U3rLi5oYneC6SrCiUOYgTAxUHBgS9N1mjIHgYJYLxlgfqt3NrKWO /Fpvo2hP/WbGOo6/aP3CxAziK8tbvpnBNPbLz0HIsg8jbU4OihwTTqHEUI0W+iXe C61f2aL0yF/fmeB7rqS3Hc8Wj3N6ZZ84P4sgYo5bbcDZRMfFwo2jH8uAxcXJouxU U74YlOiNuE9JI3GuQIzzAJVMQEp9mnbKVQLJ8JIzW/XG1CK0h7yUMF8g8w1yi+Bl sSC53rcHDEuTYgsQrBAAFE6cCpvJ+VRhzEvggCMioQCqr6e+FEzyKZ3dMZYU0E4U GQ6p98LZyvAztdUstRLxT0O72XCyYZsO/tOIO72o5BwTSAg606HfSdngvChiW7lh xRVFwnPHZcDuBGG36ROB =ANj7 -----END PGP SIGNATURE----- --ZmUaFz6apKcXQszQ-- From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 18:46:33 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A81B4B9 for ; Mon, 1 Jun 2015 18:46:33 +0000 (UTC) (envelope-from earline@digitalsolutionleader.com) Received: from smtp102.biz.mail.sg3.yahoo.com (smtp102.biz.mail.sg3.yahoo.com [106.10.167.245]) (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 0ADF915D4 for ; Mon, 1 Jun 2015 18:46:32 +0000 (UTC) (envelope-from earline@digitalsolutionleader.com) Received: (qmail 73475 invoked from network); 1 Jun 2015 18:39:50 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1433183990; bh=1RzNv8rPHI/LYR3rVp8Nfj86vG18YNNbl49wJ19hbCY=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=KxY6kdzxVa8myTmegchMsnK8WDNOrTaJzKf6ozmQ2ysEeAEVkjMQgT1o1MvfU/g6PcE6cnX2xmhyoXzqMoexEOb0K/SVsZGucpW4Jzsj1pfd72l4mp7z9tbZm/KZoNRxtgS8qCXOLw8V7cXnKBs71wgkvlPKF0mthNSC1Qd4oW0= X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Dnlq4dEVM1nN9BD9TqGW6U36kvyb3Y6w3UJpEnlHl.xqg0c RcGiza48RZ7xSvbNDUmljfaEkgnvDOxrWvStmLSXVBoM18HirQbcToKVfC5L cg1SEIaUXGzmRAHaG3fMxLXfmErfZl.unKBtbKthqLhkaOfIdkAuWhNXGMlp TtOp57FsgfI9PtL1phKq6xkbESj1MkIiOTqxpi8Z8J4Hv.Af3ZmZCOW3.Y48 sNcSn6Of_fNRfc5p7JJHJwBfj9oQKf0QaOvYEbySDlR2jLqrBogeQCpinpRp RfeSnQYRMX7ztbN0chNi_iXIsrAOCk9WpRiKlsvJZ.3dbrMnw7MZZZ_jNBkM 7Dofb5P4TcEo4WBQdWeD193jIfmsQ5blTTAsgx7m2iDVOEmo0fk655ndm5O2 S54zFvyLa_rcYJXoNONNfz4TNma_oi6HLfOSVc.lwq3208hzwiG97iqpO_QV r3hIWkYx679BezhnLeaKiZvTgCC2YHspD0QI1T0tBUUop2y2rHrTKIJ36edn rpXwMwPEd0BRxfN.BDwlZXhutV_Eg7ZbIcR5tEb12oA-- X-Yahoo-SMTP: SZxEVwGswBD54bTTYweu7qd6XdQ_IENpK3EWqZoWdWEt7oSHd51PbPGklrN7 From: "Earline Durham" To: Subject: Guest Posting Outreach Specialist Date: Tue, 2 Jun 2015 00:08:54 +0530 Message-ID: <30d501d09c9a$57bfab20$073f0160$@com> MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AdCcmWRsLEq0UP/MRIuhVLmRmsyOfg== Content-Language: en-us Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 18:46:33 -0000 Hi, "Greeting of the Day" My name is Earline Durham and I'm a Blogger Outreach Specialist. Hope you aware of guest posting. But are you fully aware of the great benefits that come with guest posting? "Guest posting" it means writing and publishing an article on someone else's website or blog. This is one of the greatest ways to promote your website and build some great links. Guest posting can help you with branding, it can help you to get known among other influential online personas, and it can even bring new business to your website. Google puts weight on different types of links, and the best types of links are from content placed on real sites and blogs. So to start things off you are going after one of the most valuable types of links. Don't miss out on this opportunity and use our Guest Post Service to promote your website, expand your social reach and build some quality back links for your website. Should this sound interesting please let me know your business niche and I will share some examples with price. Regards, Earline Durham Blogger Outreach Specialist From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 18:49:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7B75578; Mon, 1 Jun 2015 18:49:31 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6FE915F2; Mon, 1 Jun 2015 18:49:31 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51InVaj044189; Mon, 1 Jun 2015 18:49:31 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51InVXA044188; Mon, 1 Jun 2015 18:49:31 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201506011849.t51InVXA044188@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 1 Jun 2015 18:49:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283891 - head/sys/fs/procfs 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 18:49:32 -0000 Author: delphij Date: Mon Jun 1 18:49:31 2015 New Revision: 283891 URL: https://svnweb.freebsd.org/changeset/base/283891 Log: Clear p_stops upon PROCFS_CTL_DETACH, similar to r283889. Noticed by: jhb Reviewed by: sef Sponsored by: iXsystems, Inc. MFC after: 2 weeks Modified: head/sys/fs/procfs/procfs_ctl.c Modified: head/sys/fs/procfs/procfs_ctl.c ============================================================================== --- head/sys/fs/procfs/procfs_ctl.c Mon Jun 1 18:15:50 2015 (r283890) +++ head/sys/fs/procfs/procfs_ctl.c Mon Jun 1 18:49:31 2015 (r283891) @@ -235,6 +235,7 @@ out: } else PROC_LOCK(p); p->p_oppid = 0; + p->p_stops = 0; p->p_flag &= ~P_WAITED; /* XXX ? */ sx_xunlock(&proctree_lock); From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 18:50:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0C866D8; Mon, 1 Jun 2015 18:50:10 +0000 (UTC) (envelope-from delphij@delphij.net) 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 999F0160F; Mon, 1 Jun 2015 18:50:10 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from zeta.ixsystems.com (c-71-202-112-39.hsd1.ca.comcast.net [71.202.112.39]) (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 10DA14183; Mon, 1 Jun 2015 11:50:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1433184610; x=1433199010; bh=LfaqG7dkeaoMreLINOJrCKxxTggLHfC+oLL9JQQcD4o=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=TtjfbGYrl/iKjn1elksMxfgwS9pMcyVFVhdmAGjMwzzb/Avfq6VjtH2hTNmCkAJdD yec+AcaY8D1apVh6s76iEtheiucj3nE4EaERNbk5CsypGmJEMigiTVIL4llEPFIANI zPlM7kfBHeMztJ3IbPAcCU0iPzoHvJFG6bzJh2S4= Message-ID: <556CA960.3040607@delphij.net> Date: Mon, 01 Jun 2015 11:50:08 -0700 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: John Baldwin , Xin LI CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283889 - head/sys/kern References: <201506011815.t51IFkPv027540@svn.freebsd.org> <3091869.VXHGj8nhqT@ralph.baldwin.cx> In-Reply-To: <3091869.VXHGj8nhqT@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 18:50:10 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 06/01/15 11:25, John Baldwin wrote: > On Monday, June 01, 2015 06:15:46 PM Xin LI wrote: >> Author: delphij Date: Mon Jun 1 18:15:45 2015 New Revision: >> 283889 URL: https://svnweb.freebsd.org/changeset/base/283889 >> >> Log: Clear p_stops when doing PT_DETACH. >> >> Without this, if a process was being traced by truss(1), which >> uses different p_stops bits than gdb(1), the latter would >> misbehave because of the unexpected bits. > > Please also clear this for procfs detach as well. Good catch! Fixed in r283891. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.1.4 (FreeBSD) iQIcBAEBCgAGBQJVbKlgAAoJEJW2GBstM+nsDvoP/0GHrHvneR2hhVogwz9uyEUE EAaxfbVtPmEw4pnvlK1spFJIJnVwlAIRMH2i+3xWiUChpYkJNCui9HMXI9G8pI/p DkPgG6XTGD7IedU17Yq0NnbaE6y9WEkTl6AR+UJY27EAohKuZgziWO3Q/npe7J4s 4LPEWmV7F2fXWxAaOaIisg+sKOhh/hJi89IlIhvpPnE9D5JmUo4uIzWZPtmxLg/u Q9dwVZCxgXN1k4Pi46eibqQGGdielNTDR7aWzi3j/fE+OmlnJWQWe9bKDOFuCgpK yzwfru7FmqnfYyfkxyfg5teFh70Y/9bunzcWWAfdRZIcnhOlwEbXuK/CCpesiuoI SPhjo9KXjpzevJoLIr+QgduQ6/FxJmgf1i44ruCATLlZ+7v/OkdQazwXY4gUPZId J/UwdC57sFTiVGVHvR94h7S/Tu1f1OHHdOi0ZKUOVqavQrtdntvR74UX29jCmOP+ 5MJx8LOKZSDoaCRrdvCA0I2XFjirW3xJvpRer3DWm+i/deNKGbBhgaKDpn/bqgQg BVROwLUdxwBJ9ES4VzCpoNZBnHRdEfFdGGvGnFFcdKC3rKqd4Gn54Y/JgiFvEct0 zW1yVsiVurVtPocBIg1aHeEe/qEHsLIEHSe7n1Y2WxyZkh0HIKXco77H1HptW1sv bZAI2tXsjktB+8pT+dmB =MUGS -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 19:15:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B813B2CD; Mon, 1 Jun 2015 19:15:45 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-ig0-x236.google.com (mail-ig0-x236.google.com [IPv6:2607:f8b0:4001:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 80A421D7E; Mon, 1 Jun 2015 19:15:45 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by igbjd9 with SMTP id jd9so69542884igb.1; Mon, 01 Jun 2015 12:15:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Q+cfCjD4dLFX+vOobzdvDq9cdy3srMsiEj4jtQ+QGz0=; b=t6zqA0VE3sGB62j3uj+oo/kn1q80Ym3gfbBBnirOlPtklBflcRF24KjoSVofI03vqC 9ArgQzyDaj/BsnzQ1iVHj4sdcC83Z813qCkuJTj8aiQ9QPzVz21jfkImuXVIcwZOvd+o +iB5/DmZ8mrSL3hrEjLLCWG0kcbPob8T9uTaZsLWPLTEYhJbGglDWzXis+8FPQ5AAs7Y /bT8odOA66QBQlvmGqWjjZyuuZtvhW+2MjHWp68RbAiok3uYsR06cI+adgYY/pXB/2C5 8FayyOy3z9LhYWntN+c4N+bCgM9iPEZzZ4et/tUOiyOCbsZAUM7u//EQa5FkZZl7QRDl ON3w== MIME-Version: 1.0 X-Received: by 10.50.47.50 with SMTP id a18mr8375921ign.46.1433186144834; Mon, 01 Jun 2015 12:15:44 -0700 (PDT) Received: by 10.107.40.194 with HTTP; Mon, 1 Jun 2015 12:15:44 -0700 (PDT) In-Reply-To: <20150601184226.GC53056@hub.FreeBSD.org> References: <201506011743.t51HhZUP011379@svn.freebsd.org> <20150601184226.GC53056@hub.FreeBSD.org> Date: Mon, 1 Jun 2015 15:15:44 -0400 Message-ID: Subject: Re: svn commit: r283883 - in head/sys: dev/ixgbe modules/ixv From: Ryan Stone To: Glen Barber Cc: Jack F Vogel , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 19:15:45 -0000 I think that this is a conflict with r283670, which changed the interface for SR-IOV a little bit. Sorry Jack, I knew that that change was coming but it didn't occur to me that the ixgbe patch would have to be updated. I believe that this patch will fix it: diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 0c3769c..ae822f2 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -46,6 +46,10 @@ #include #endif +#ifdef PCI_IOV +#include +#endif + /********************************************************************* * Set this to one to display debug statistics *********************************************************************/ @@ -230,9 +234,9 @@ static device_method_t ix_methods[] = { DEVMETHOD(device_suspend, ixgbe_suspend), DEVMETHOD(device_resume, ixgbe_resume), #ifdef PCI_IOV - DEVMETHOD(pci_init_iov, ixgbe_init_iov), - DEVMETHOD(pci_uninit_iov, ixgbe_uninit_iov), - DEVMETHOD(pci_add_vf, ixgbe_add_vf), + DEVMETHOD(pci_iov_init, ixgbe_init_iov), + DEVMETHOD(pci_iov_uninit, ixgbe_uninit_iov), + DEVMETHOD(pci_iov_add_vf, ixgbe_add_vf), #endif /* PCI_IOV */ DEVMETHOD_END }; diff --git a/sys/modules/ix/Makefile b/sys/modules/ix/Makefile index 1f30cb0..8846f2d 100644 --- a/sys/modules/ix/Makefile +++ b/sys/modules/ix/Makefile @@ -3,7 +3,7 @@ .PATH: ${.CURDIR}/../../dev/ixgbe KMOD = if_ix -SRCS = device_if.h bus_if.h pci_if.h +SRCS = device_if.h bus_if.h pci_if.h pci_iov_if.h SRCS += opt_inet.h opt_inet6.h opt_rss.h SRCS += if_ix.c ix_txrx.c # Shared source From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 19:26:25 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B85DD60C; Mon, 1 Jun 2015 19:26:25 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A65061FDF; Mon, 1 Jun 2015 19:26:25 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51JQPGv065972; Mon, 1 Jun 2015 19:26:25 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51JQPnZ065970; Mon, 1 Jun 2015 19:26:25 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201506011926.t51JQPnZ065970@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 1 Jun 2015 19:26:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283892 - in stable: 10/sys/dev/acpica 8/sys/dev/acpica 9/sys/dev/acpica X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 19:26:25 -0000 Author: jkim Date: Mon Jun 1 19:26:24 2015 New Revision: 283892 URL: https://svnweb.freebsd.org/changeset/base/283892 Log: MFC: r283261 Do not probe Intel PIIX4 south bridge quirks on amd64. Modified: stable/10/sys/dev/acpica/acpi_cpu.c stable/10/sys/dev/acpica/acpi_throttle.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/8/sys/dev/acpica/acpi_cpu.c stable/8/sys/dev/acpica/acpi_throttle.c stable/9/sys/dev/acpica/acpi_cpu.c stable/9/sys/dev/acpica/acpi_throttle.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/acpica/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/10/sys/dev/acpica/acpi_cpu.c ============================================================================== --- stable/10/sys/dev/acpica/acpi_cpu.c Mon Jun 1 18:49:31 2015 (r283891) +++ stable/10/sys/dev/acpica/acpi_cpu.c Mon Jun 1 19:26:24 2015 (r283892) @@ -171,7 +171,8 @@ static void acpi_cpu_startup_cx(struct a static void acpi_cpu_cx_list(struct acpi_cpu_softc *sc); static void acpi_cpu_idle(sbintime_t sbt); static void acpi_cpu_notify(ACPI_HANDLE h, UINT32 notify, void *context); -static int acpi_cpu_quirks(void); +static void acpi_cpu_quirks(void); +static void acpi_cpu_quirks_piix4(void); static int acpi_cpu_usage_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_cpu_set_cx_lowest(struct acpi_cpu_softc *sc); static int acpi_cpu_cx_lowest_sysctl(SYSCTL_HANDLER_ARGS); @@ -1125,12 +1126,9 @@ acpi_cpu_notify(ACPI_HANDLE h, UINT32 no acpi_UserNotify("PROCESSOR", sc->cpu_handle, notify); } -static int +static void acpi_cpu_quirks(void) { - device_t acpi_dev; - uint32_t val; - ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); /* @@ -1164,6 +1162,16 @@ acpi_cpu_quirks(void) } /* Look for various quirks of the PIIX4 part. */ + acpi_cpu_quirks_piix4(); +} + +static void +acpi_cpu_quirks_piix4(void) +{ +#ifdef __i386__ + device_t acpi_dev; + uint32_t val; + acpi_dev = pci_find_device(PCI_VENDOR_INTEL, PCI_DEVICE_82371AB_3); if (acpi_dev != NULL) { switch (pci_get_revid(acpi_dev)) { @@ -1212,8 +1220,7 @@ acpi_cpu_quirks(void) break; } } - - return (0); +#endif } static int Modified: stable/10/sys/dev/acpica/acpi_throttle.c ============================================================================== --- stable/10/sys/dev/acpica/acpi_throttle.c Mon Jun 1 18:49:31 2015 (r283891) +++ stable/10/sys/dev/acpica/acpi_throttle.c Mon Jun 1 19:26:24 2015 (r283892) @@ -96,7 +96,7 @@ static void acpi_throttle_identify(drive static int acpi_throttle_probe(device_t dev); static int acpi_throttle_attach(device_t dev); static int acpi_throttle_evaluate(struct acpi_throttle_softc *sc); -static int acpi_throttle_quirks(struct acpi_throttle_softc *sc); +static void acpi_throttle_quirks(struct acpi_throttle_softc *sc); static int acpi_thr_settings(device_t dev, struct cf_setting *sets, int *count); static int acpi_thr_set(device_t dev, const struct cf_setting *set); @@ -314,9 +314,10 @@ acpi_throttle_evaluate(struct acpi_throt return (0); } -static int +static void acpi_throttle_quirks(struct acpi_throttle_softc *sc) { +#ifdef __i386__ device_t acpi_dev; /* Look for various quirks of the PIIX4 part. */ @@ -339,8 +340,7 @@ acpi_throttle_quirks(struct acpi_throttl break; } } - - return (0); +#endif } static int From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 19:26:27 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CF93616; Mon, 1 Jun 2015 19:26:27 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AE1C1FE1; Mon, 1 Jun 2015 19:26:27 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51JQRfF065986; Mon, 1 Jun 2015 19:26:27 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51JQQoZ065984; Mon, 1 Jun 2015 19:26:26 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201506011926.t51JQQoZ065984@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 1 Jun 2015 19:26:26 +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: r283892 - in stable: 10/sys/dev/acpica 8/sys/dev/acpica 9/sys/dev/acpica 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 19:26:27 -0000 Author: jkim Date: Mon Jun 1 19:26:24 2015 New Revision: 283892 URL: https://svnweb.freebsd.org/changeset/base/283892 Log: MFC: r283261 Do not probe Intel PIIX4 south bridge quirks on amd64. Modified: stable/9/sys/dev/acpica/acpi_cpu.c stable/9/sys/dev/acpica/acpi_throttle.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/acpica/acpi_cpu.c stable/10/sys/dev/acpica/acpi_throttle.c stable/8/sys/dev/acpica/acpi_cpu.c stable/8/sys/dev/acpica/acpi_throttle.c Directory Properties: stable/10/ (props changed) stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/acpica/ (props changed) Modified: stable/9/sys/dev/acpica/acpi_cpu.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_cpu.c Mon Jun 1 18:49:31 2015 (r283891) +++ stable/9/sys/dev/acpica/acpi_cpu.c Mon Jun 1 19:26:24 2015 (r283892) @@ -171,7 +171,8 @@ static void acpi_cpu_startup_cx(struct a static void acpi_cpu_cx_list(struct acpi_cpu_softc *sc); static void acpi_cpu_idle(void); static void acpi_cpu_notify(ACPI_HANDLE h, UINT32 notify, void *context); -static int acpi_cpu_quirks(void); +static void acpi_cpu_quirks(void); +static void acpi_cpu_quirks_piix4(void); static int acpi_cpu_usage_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_cpu_set_cx_lowest(struct acpi_cpu_softc *sc); static int acpi_cpu_cx_lowest_sysctl(SYSCTL_HANDLER_ARGS); @@ -1122,12 +1123,9 @@ acpi_cpu_notify(ACPI_HANDLE h, UINT32 no acpi_UserNotify("PROCESSOR", sc->cpu_handle, notify); } -static int +static void acpi_cpu_quirks(void) { - device_t acpi_dev; - uint32_t val; - ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); /* @@ -1161,6 +1159,16 @@ acpi_cpu_quirks(void) } /* Look for various quirks of the PIIX4 part. */ + acpi_cpu_quirks_piix4(); +} + +static void +acpi_cpu_quirks_piix4(void) +{ +#ifdef __i386__ + device_t acpi_dev; + uint32_t val; + acpi_dev = pci_find_device(PCI_VENDOR_INTEL, PCI_DEVICE_82371AB_3); if (acpi_dev != NULL) { switch (pci_get_revid(acpi_dev)) { @@ -1209,8 +1217,7 @@ acpi_cpu_quirks(void) break; } } - - return (0); +#endif } static int Modified: stable/9/sys/dev/acpica/acpi_throttle.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_throttle.c Mon Jun 1 18:49:31 2015 (r283891) +++ stable/9/sys/dev/acpica/acpi_throttle.c Mon Jun 1 19:26:24 2015 (r283892) @@ -96,7 +96,7 @@ static void acpi_throttle_identify(drive static int acpi_throttle_probe(device_t dev); static int acpi_throttle_attach(device_t dev); static int acpi_throttle_evaluate(struct acpi_throttle_softc *sc); -static int acpi_throttle_quirks(struct acpi_throttle_softc *sc); +static void acpi_throttle_quirks(struct acpi_throttle_softc *sc); static int acpi_thr_settings(device_t dev, struct cf_setting *sets, int *count); static int acpi_thr_set(device_t dev, const struct cf_setting *set); @@ -314,9 +314,10 @@ acpi_throttle_evaluate(struct acpi_throt return (0); } -static int +static void acpi_throttle_quirks(struct acpi_throttle_softc *sc) { +#ifdef __i386__ device_t acpi_dev; /* Look for various quirks of the PIIX4 part. */ @@ -339,8 +340,7 @@ acpi_throttle_quirks(struct acpi_throttl break; } } - - return (0); +#endif } static int From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 19:26:26 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7AE2960D; Mon, 1 Jun 2015 19:26:26 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68C9B1FE0; Mon, 1 Jun 2015 19:26:26 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51JQQMl065979; Mon, 1 Jun 2015 19:26:26 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51JQQM6065977; Mon, 1 Jun 2015 19:26:26 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201506011926.t51JQQM6065977@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 1 Jun 2015 19:26:26 +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: r283892 - in stable: 10/sys/dev/acpica 8/sys/dev/acpica 9/sys/dev/acpica 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 19:26:26 -0000 Author: jkim Date: Mon Jun 1 19:26:24 2015 New Revision: 283892 URL: https://svnweb.freebsd.org/changeset/base/283892 Log: MFC: r283261 Do not probe Intel PIIX4 south bridge quirks on amd64. Modified: stable/8/sys/dev/acpica/acpi_cpu.c stable/8/sys/dev/acpica/acpi_throttle.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/acpica/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/acpica/acpi_cpu.c stable/10/sys/dev/acpica/acpi_throttle.c stable/9/sys/dev/acpica/acpi_cpu.c stable/9/sys/dev/acpica/acpi_throttle.c Directory Properties: stable/10/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/8/sys/dev/acpica/acpi_cpu.c ============================================================================== --- stable/8/sys/dev/acpica/acpi_cpu.c Mon Jun 1 18:49:31 2015 (r283891) +++ stable/8/sys/dev/acpica/acpi_cpu.c Mon Jun 1 19:26:24 2015 (r283892) @@ -167,7 +167,8 @@ static void acpi_cpu_startup_cx(struct a static void acpi_cpu_cx_list(struct acpi_cpu_softc *sc); static void acpi_cpu_idle(void); static void acpi_cpu_notify(ACPI_HANDLE h, UINT32 notify, void *context); -static int acpi_cpu_quirks(void); +static void acpi_cpu_quirks(void); +static void acpi_cpu_quirks_piix4(void); static int acpi_cpu_usage_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_cpu_set_cx_lowest(struct acpi_cpu_softc *sc); static int acpi_cpu_cx_lowest_sysctl(SYSCTL_HANDLER_ARGS); @@ -1097,12 +1098,9 @@ acpi_cpu_notify(ACPI_HANDLE h, UINT32 no acpi_UserNotify("PROCESSOR", sc->cpu_handle, notify); } -static int +static void acpi_cpu_quirks(void) { - device_t acpi_dev; - uint32_t val; - ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); /* @@ -1136,6 +1134,16 @@ acpi_cpu_quirks(void) } /* Look for various quirks of the PIIX4 part. */ + acpi_cpu_quirks_piix4(); +} + +static void +acpi_cpu_quirks_piix4(void) +{ +#ifdef __i386__ + device_t acpi_dev; + uint32_t val; + acpi_dev = pci_find_device(PCI_VENDOR_INTEL, PCI_DEVICE_82371AB_3); if (acpi_dev != NULL) { switch (pci_get_revid(acpi_dev)) { @@ -1184,8 +1192,7 @@ acpi_cpu_quirks(void) break; } } - - return (0); +#endif } static int Modified: stable/8/sys/dev/acpica/acpi_throttle.c ============================================================================== --- stable/8/sys/dev/acpica/acpi_throttle.c Mon Jun 1 18:49:31 2015 (r283891) +++ stable/8/sys/dev/acpica/acpi_throttle.c Mon Jun 1 19:26:24 2015 (r283892) @@ -96,7 +96,7 @@ static void acpi_throttle_identify(drive static int acpi_throttle_probe(device_t dev); static int acpi_throttle_attach(device_t dev); static int acpi_throttle_evaluate(struct acpi_throttle_softc *sc); -static int acpi_throttle_quirks(struct acpi_throttle_softc *sc); +static void acpi_throttle_quirks(struct acpi_throttle_softc *sc); static int acpi_thr_settings(device_t dev, struct cf_setting *sets, int *count); static int acpi_thr_set(device_t dev, const struct cf_setting *set); @@ -314,9 +314,10 @@ acpi_throttle_evaluate(struct acpi_throt return (0); } -static int +static void acpi_throttle_quirks(struct acpi_throttle_softc *sc) { +#ifdef __i386__ device_t acpi_dev; /* Look for various quirks of the PIIX4 part. */ @@ -339,8 +340,7 @@ acpi_throttle_quirks(struct acpi_throttl break; } } - - return (0); +#endif } static int From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 19:30:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F27DAD9; Mon, 1 Jun 2015 19:30:46 +0000 (UTC) (envelope-from delphij@delphij.net) 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 6FA7210A1; Mon, 1 Jun 2015 19:30:46 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from zeta.ixsystems.com (c-71-202-112-39.hsd1.ca.comcast.net [71.202.112.39]) (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 B5DD1441E; Mon, 1 Jun 2015 12:30:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1433187046; x=1433201446; bh=KOU8IKbNZd2FjQfx4r3YZCqgH9itNrF8ri+mnT3VJec=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=mKsQmZaJFsAVjqNuuZL0FVr5ui/3n5eJnwk/dXDgVNS2F1fi7PT9sR2Gdwn2BxUJx SxDSOOmputAPNCXffn7SVQ0GhqGceV6r7RXQ+M1jLsLhmEUv/AQpne6K+prvV79fkw pwWYilXhIZ6s0BHJJ6FtTz3l9e5phnm9ue/Xq3Sk= Message-ID: <556CB2E5.7070304@delphij.net> Date: Mon, 01 Jun 2015 12:30:45 -0700 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Ryan Stone , Glen Barber CC: Jack F Vogel , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r283883 - in head/sys: dev/ixgbe modules/ixv References: <201506011743.t51HhZUP011379@svn.freebsd.org> <20150601184226.GC53056@hub.FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 19:30:46 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 06/01/15 12:15, Ryan Stone wrote: > I think that this is a conflict with r283670, which changed the > interface for SR-IOV a little bit. > > Sorry Jack, I knew that that change was coming but it didn't occur > to me that the ixgbe patch would have to be updated. I believe > that this patch will fix it: > > diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index > 0c3769c..ae822f2 100644 --- a/sys/dev/ixgbe/if_ix.c +++ > b/sys/dev/ixgbe/if_ix.c @@ -46,6 +46,10 @@ #include > #endif > > +#ifdef PCI_IOV +#include +#endif + > /********************************************************************* > > * Set this to one to display debug statistics > *********************************************************************/ > > @@ -230,9 +234,9 @@ static device_method_t ix_methods[] = { > DEVMETHOD(device_suspend, ixgbe_suspend), DEVMETHOD(device_resume, > ixgbe_resume), #ifdef PCI_IOV - DEVMETHOD(pci_init_iov, > ixgbe_init_iov), - DEVMETHOD(pci_uninit_iov, > ixgbe_uninit_iov), - DEVMETHOD(pci_add_vf, ixgbe_add_vf), + > DEVMETHOD(pci_iov_init, ixgbe_init_iov), + > DEVMETHOD(pci_iov_uninit, ixgbe_uninit_iov), + > DEVMETHOD(pci_iov_add_vf, ixgbe_add_vf), #endif /* PCI_IOV */ > DEVMETHOD_END }; diff --git a/sys/modules/ix/Makefile > b/sys/modules/ix/Makefile index 1f30cb0..8846f2d 100644 --- > a/sys/modules/ix/Makefile +++ b/sys/modules/ix/Makefile @@ -3,7 > +3,7 @@ .PATH: ${.CURDIR}/../../dev/ixgbe > > KMOD = if_ix -SRCS = device_if.h bus_if.h pci_if.h +SRCS = > device_if.h bus_if.h pci_if.h pci_iov_if.h SRCS += opt_inet.h > opt_inet6.h opt_rss.h SRCS += if_ix.c ix_txrx.c # Shared source I think modules/ixv also needs to be updated? In 283670 John have also renamed the [un]init_iov functions to iov_[un]init, to match the names. I think ixgbe should follow that as well. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.1.4 (FreeBSD) iQIcBAEBCgAGBQJVbLLlAAoJEJW2GBstM+nsYH8QAIfxz9MfJ3xGorc/5lZhCyQb ZvVV3kdI5Cg6cysUeyQBW2okFQ2BbfHuy+B1IlM7rNoFAbtx0nVpA7Ef12WhJEfQ 0eKt+MjkMgGxopVNy4RtUnH79MtljDcPPJZsFsMOwvqpLQD/0vSGPEAPBgToWEfp PQ2E4aznzb6ilj8KpQflO32R0dRJt0R9XTq7mVnkfaPtb3e85F3ACEPj0U3+Xpor 8qwjk9ji/vAR2TLziruZKOCm66jwusjpCM0Mr0tqwpv4KlsJh5fB1zCkBGtYMIkK yDm7glkgM0wBUS2ThPUXEbzn5vJ2Q5eB5m2EjFcNpMnjGPinClDzFOHfvrZRNhDN ZddqnpKIf1HJSD6O7Q0+MfaDxfS0UQV678OP+5maMXLdbD8Kox+Z3vazG4W4TQGC wbvp7NNgi/c/f1sE5CKRg3VIJGK3rq7DHZqnz9S2u9OdkGpIGscwzrVM29ebEXOA 7uMeyjTaB3eCObBa2Sdea8wcJzsT7OyS984aiLRxBcKSzS4l3sLI+14a6Fn4Snpr ppf0DKUg8rc3ywMJ2utAyf6vu3S57uIetJRH8IqzIvGszs55h32RwWfsFX5FeC9c FNW83PjgMrmlM2I73gkGWAYFWbs/ziuBLmLr4qVNRVdli5rmkIZaRBNfdT8HSneY q26lHAasDzROf+9W42R/ =MwRo -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 20:05:08 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66D284CB; Mon, 1 Jun 2015 20:05:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 558661A62; Mon, 1 Jun 2015 20:05:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51K58L6087886; Mon, 1 Jun 2015 20:05:08 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51K57om087880; Mon, 1 Jun 2015 20:05:07 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506012005.t51K57om087880@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 1 Jun 2015 20:05:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283893 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 20:05:08 -0000 Author: jhb Date: Mon Jun 1 20:05:06 2015 New Revision: 283893 URL: https://svnweb.freebsd.org/changeset/base/283893 Log: Catch up to the SRIOV API changes in r283670. Modified: head/sys/dev/ixgbe/if_ix.c head/sys/dev/ixgbe/ixgbe.h Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Mon Jun 1 19:26:24 2015 (r283892) +++ head/sys/dev/ixgbe/if_ix.c Mon Jun 1 20:05:06 2015 (r283893) @@ -230,9 +230,9 @@ static device_method_t ix_methods[] = { DEVMETHOD(device_suspend, ixgbe_suspend), DEVMETHOD(device_resume, ixgbe_resume), #ifdef PCI_IOV - DEVMETHOD(pci_init_iov, ixgbe_init_iov), - DEVMETHOD(pci_uninit_iov, ixgbe_uninit_iov), - DEVMETHOD(pci_add_vf, ixgbe_add_vf), + DEVMETHOD(pci_iov_init, ixgbe_init_iov), + DEVMETHOD(pci_iov_uninit, ixgbe_uninit_iov), + DEVMETHOD(pci_iov_add_vf, ixgbe_add_vf), #endif /* PCI_IOV */ DEVMETHOD_END }; Modified: head/sys/dev/ixgbe/ixgbe.h ============================================================================== --- head/sys/dev/ixgbe/ixgbe.h Mon Jun 1 19:26:24 2015 (r283892) +++ head/sys/dev/ixgbe/ixgbe.h Mon Jun 1 20:05:06 2015 (r283893) @@ -95,6 +95,7 @@ #ifdef PCI_IOV #include #include +#include #endif #include "ixgbe_api.h" From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 20:26:39 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A6382EB; Mon, 1 Jun 2015 20:26:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28E181F5D; Mon, 1 Jun 2015 20:26:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51KQdZU099426; Mon, 1 Jun 2015 20:26:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51KQd5j099425; Mon, 1 Jun 2015 20:26:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201506012026.t51KQd5j099425@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 1 Jun 2015 20:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283894 - head/release/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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 20:26:39 -0000 Author: gjb Date: Mon Jun 1 20:26:38 2015 New Revision: 283894 URL: https://svnweb.freebsd.org/changeset/base/283894 Log: Disable arm_create_user(). As-is, this does not create the user in the userland for the target image, but creates the user in the build chroot. Before this is re-enabled, I want to figure out a clean way to do this without requiring the overhead of third-party utilities (such as qemu). MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/tools/arm.subr Modified: head/release/tools/arm.subr ============================================================================== --- head/release/tools/arm.subr Mon Jun 1 20:05:06 2015 (r283893) +++ head/release/tools/arm.subr Mon Jun 1 20:26:38 2015 (r283894) @@ -98,7 +98,7 @@ arm_install_base() { installworld installkernel distribution chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/msdos - arm_create_user + #arm_create_user echo '# Custom /etc/fstab for FreeBSD embedded images' \ > ${CHROOTDIR}/${DESTDIR}/etc/fstab From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 20:59:19 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B19D369; Mon, 1 Jun 2015 20:59:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1991F1749; Mon, 1 Jun 2015 20:59:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51KxISq015757; Mon, 1 Jun 2015 20:59:18 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51KxINk015756; Mon, 1 Jun 2015 20:59:18 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201506012059.t51KxINk015756@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 1 Jun 2015 20:59:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283895 - head/release/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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 20:59:19 -0000 Author: gjb Date: Mon Jun 1 20:59:18 2015 New Revision: 283895 URL: https://svnweb.freebsd.org/changeset/base/283895 Log: Re-enable arm_create_user(), and pass the '-V DESTDIR/etc' to pw(8) to set the correct /etc directory for the user/group files. Provided by: ian (thanks!) MFC after: 3 days X-MFC-with: r283894 Sponsored by: The FreeBSD Foundation Modified: head/release/tools/arm.subr Modified: head/release/tools/arm.subr ============================================================================== --- head/release/tools/arm.subr Mon Jun 1 20:26:38 2015 (r283894) +++ head/release/tools/arm.subr Mon Jun 1 20:59:18 2015 (r283895) @@ -80,11 +80,14 @@ arm_create_disk() { arm_create_user() { # Create a default user account 'freebsd' with the password 'freebsd', # and set the default password for the 'root' user to 'root'. - chroot ${CHROOTDIR} /usr/sbin/pw groupadd freebsd -g 1001 - chroot ${CHROOTDIR} /usr/sbin/pw useradd freebsd \ + chroot ${CHROOTDIR} /usr/sbin/pw -V ${DESTDIR}/etc \ + groupadd freebsd -g 1001 + chroot ${CHROOTDIR} /usr/sbin/pw -V ${DESTDIR}/etc \ + useradd freebsd \ -m -M 0755 -w yes -n freebsd -u 1001 -g 1001 -G 0 \ -c 'FreeBSD User' -d '/home/freebsd' -s '/bin/csh' - chroot ${CHROOTDIR} /usr/sbin/pw usermod root -w yes + chroot ${CHROOTDIR} /usr/sbin/pw -V ${DESTDIR}/etc \ + usermod root -w yes return 0 } @@ -98,7 +101,7 @@ arm_install_base() { installworld installkernel distribution chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/msdos - #arm_create_user + arm_create_user echo '# Custom /etc/fstab for FreeBSD embedded images' \ > ${CHROOTDIR}/${DESTDIR}/etc/fstab From owner-svn-src-all@FreeBSD.ORG Mon Jun 1 21:10:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C679486C; Mon, 1 Jun 2015 21:10:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4E1F1ACD; Mon, 1 Jun 2015 21:10:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t51LAmlu024155; Mon, 1 Jun 2015 21:10:48 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t51LAmq3024154; Mon, 1 Jun 2015 21:10:48 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201506012110.t51LAmq3024154@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 1 Jun 2015 21:10:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283896 - head/release/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.20 Precedence: list List-Id: "SVN commit messages 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, 01 Jun 2015 21:10:48 -0000 Author: gjb Date: Mon Jun 1 21:10:47 2015 New Revision: 283896 URL: https://svnweb.freebsd.org/changeset/base/283896 Log: In arm_create_disk(), disable soft updates journaling. Disabling soft updates journaling appears to resolve issues with kernel panics, and may also be generally bad to have enabled for SD cards. Requested by: ian MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/tools/arm.subr Modified: head/release/tools/arm.subr ============================================================================== --- head/release/tools/arm.subr Mon Jun 1 20:59:18 2015 (r283895) +++ head/release/tools/arm.subr Mon Jun 1 21:10:47 2015 (r283896) @@ -72,7 +72,7 @@ arm_create_disk() { chroot ${CHROOTDIR} gpart create -s bsd ${mddev}s2 chroot ${CHROOTDIR} gpart add -t freebsd-ufs -a 64k /dev/${mddev}s2 chroot ${CHROOTDIR} newfs -U -L rootfs /dev/${mddev}s2a - chroot ${CHROOTDIR} tunefs -j enable -N enable /dev/${mddev}s2a + chroot ${CHROOTDIR} tunefs -N enable /dev/${mddev}s2a return 0 } From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 00:47:39 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3FE7780; Tue, 2 Jun 2015 00:47:39 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A79F41E7C; Tue, 2 Jun 2015 00:47:39 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t520ldLN031122; Tue, 2 Jun 2015 00:47:39 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t520ldXV031121; Tue, 2 Jun 2015 00:47:39 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506020047.t520ldXV031121@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 2 Jun 2015 00:47:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283897 - head/share/man/man4 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 00:47:39 -0000 Author: ae Date: Tue Jun 2 00:47:38 2015 New Revision: 283897 URL: https://svnweb.freebsd.org/changeset/base/283897 Log: Add example howto configure gre(4) tunnel with the same inner and outer addresses using multiple FIBs. X-MFC after: r282809 Modified: head/share/man/man4/gre.4 Modified: head/share/man/man4/gre.4 ============================================================================== --- head/share/man/man4/gre.4 Mon Jun 1 21:10:47 2015 (r283896) +++ head/share/man/man4/gre.4 Tue Jun 2 00:47:38 2015 (r283897) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 7, 2014 +.Dd June 2, 2015 .Dt GRE 4 .Os .Sh NAME @@ -117,6 +117,44 @@ ifconfig greN inet 192.168.2.1 192.168.1 ifconfig greN inet tunnel B A route add -net 192.168.1 -netmask 255.255.255.0 192.168.1.1 .Ed +.Pp +In case when internal and external IP addresses are the same, +different routing tables (FIB) should be used. +The default FIB will be applied to IP packets before GRE encapsulation. +After encapsulation GRE interface should set different FIB number to +outgoing packet. +Then different FIB will be applied to such encapsulated packets. +According to this FIB packet should be routed to tunnel endpoint. +.Bd -literal +Host X -- Host A (198.51.100.1) ---tunnel--- Cisco D (203.0.113.1) -- Host E + \\ / + \\ / + +----- Host B ----- Host C -----+ + (198.51.100.254) +.Ed +.Pp +On Host A (FreeBSD): +.Pp +First of multiple FIBs should be configured via loader.conf: +.Bd -literal -offset indent +net.fibs=2 +net.add_addr_allfibs=0 +.Ed +.Pp +Then routes to the gateway and remote tunnel endpoint via this gateway +should be added to the second FIB: +.Bd -literal -offset indent +route add -net 198.51.100.0 -netmask 255.255.255.0 -fib 1 -iface em0 +route add -host 203.0.113.1 -fib 1 198.51.100.254 +.Ed +.Pp +And GRE tunnel should be configured to change FIB for encapsulated packets: +.Bd -literal -offset indent +ifconfig greN create +ifconfig greN inet 198.51.100.1 203.0.113.1 +ifconfig greN inet tunnel 198.51.100.1 203.0.113.1 tunnelfib 1 +.Ed +.Pp .Sh NOTES The MTU of .Nm From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 01:47:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C62AB6EC; Tue, 2 Jun 2015 01:47:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B45CE1CCE; Tue, 2 Jun 2015 01:47:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t521lDjH061129; Tue, 2 Jun 2015 01:47:13 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t521lDOx061128; Tue, 2 Jun 2015 01:47:13 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201506020147.t521lDOx061128@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 2 Jun 2015 01:47:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283898 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 01:47:13 -0000 Author: mav Date: Tue Jun 2 01:47:12 2015 New Revision: 283898 URL: https://svnweb.freebsd.org/changeset/base/283898 Log: Fix bug in r278331: unlike some other options MaxRecvDataSegmentLength is not negotiated as minimum, but only reported by sides to each other. MFC after: 1 week Modified: head/usr.sbin/ctld/login.c Modified: head/usr.sbin/ctld/login.c ============================================================================== --- head/usr.sbin/ctld/login.c Tue Jun 2 00:47:38 2015 (r283897) +++ head/usr.sbin/ctld/login.c Tue Jun 2 01:47:12 2015 (r283898) @@ -557,7 +557,7 @@ login_negotiate_key(struct pdu *request, tmp = conn->conn_data_segment_limit; } conn->conn_max_data_segment_length = tmp; - keys_add_int(response_keys, name, tmp); + keys_add_int(response_keys, name, conn->conn_data_segment_limit); } else if (strcmp(name, "MaxBurstLength") == 0) { tmp = strtoul(value, NULL, 10); if (tmp <= 0) { From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 01:55:55 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBCB18C9; Tue, 2 Jun 2015 01:55:55 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9AA21EF1; Tue, 2 Jun 2015 01:55:55 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t521ttg2065880; Tue, 2 Jun 2015 01:55:55 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t521ttKd065879; Tue, 2 Jun 2015 01:55:55 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506020155.t521ttKd065879@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 2 Jun 2015 01:55: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: r283899 - stable/10/sbin/dumpfs 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 01:55:55 -0000 Author: ae Date: Tue Jun 2 01:55:54 2015 New Revision: 283899 URL: https://svnweb.freebsd.org/changeset/base/283899 Log: MFC r283577: Print leading zeroes of UFS2 fs_id like we do for UFS1. PR: 156908 Modified: stable/10/sbin/dumpfs/dumpfs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/dumpfs/dumpfs.c ============================================================================== --- stable/10/sbin/dumpfs/dumpfs.c Tue Jun 2 01:47:12 2015 (r283898) +++ stable/10/sbin/dumpfs/dumpfs.c Tue Jun 2 01:55:54 2015 (r283899) @@ -165,7 +165,7 @@ dumpfs(const char *name) fstime = afs.fs_time; printf("magic\t%x (UFS2)\ttime\t%s", afs.fs_magic, ctime(&fstime)); - printf("superblock location\t%jd\tid\t[ %x %x ]\n", + printf("superblock location\t%jd\tid\t[ %08x %08x ]\n", (intmax_t)afs.fs_sblockloc, afs.fs_id[0], afs.fs_id[1]); printf("ncg\t%d\tsize\t%jd\tblocks\t%jd\n", afs.fs_ncg, (intmax_t)fssize, (intmax_t)afs.fs_dsize); From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 02:05:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16577A7C; Tue, 2 Jun 2015 02:05:33 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC7921103; Tue, 2 Jun 2015 02:05:32 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5225WuG070903; Tue, 2 Jun 2015 02:05:32 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5225WMf070902; Tue, 2 Jun 2015 02:05:32 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506020205.t5225WMf070902@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 2 Jun 2015 02:05:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283900 - stable/10/sys/geom/uncompress 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 02:05:33 -0000 Author: ae Date: Tue Jun 2 02:05:32 2015 New Revision: 283900 URL: https://svnweb.freebsd.org/changeset/base/283900 Log: MFC r283104: Read GEOM_UNCOMPRESS metadata using several requests that fit into MAXPHYS. For large compressed images the metadata size can be bigger than MAXPHYS and this triggers KASSERT in g_read_data(). Also use g_free() to free memory allocated by g_read_data(). PR: 199476 Modified: stable/10/sys/geom/uncompress/g_uncompress.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/uncompress/g_uncompress.c ============================================================================== --- stable/10/sys/geom/uncompress/g_uncompress.c Tue Jun 2 01:55:54 2015 (r283899) +++ stable/10/sys/geom/uncompress/g_uncompress.c Tue Jun 2 02:05:32 2015 (r283900) @@ -464,7 +464,8 @@ g_uncompress_taste(struct g_class *mp, s struct g_provider *pp2; struct g_consumer *cp; struct g_geom *gp; - uint32_t i, total_offsets, type; + uint64_t *offsets; + uint32_t i, r, total, total_offsets, type; uint8_t *buf; int error; @@ -499,8 +500,8 @@ g_uncompress_taste(struct g_class *mp, s */ DPRINTF(("%s: media sectorsize %u, mediasize %jd\n", gp->name, pp->sectorsize, (intmax_t)pp->mediasize)); - i = roundup(sizeof(struct cloop_header), pp->sectorsize); - buf = g_read_data(cp, 0, i, NULL); + total = roundup(sizeof(struct cloop_header), pp->sectorsize); + buf = g_read_data(cp, 0, total, NULL); if (buf == NULL) goto err; header = (struct cloop_header *) buf; @@ -557,20 +558,29 @@ g_uncompress_taste(struct g_class *mp, s gp->name, sc->nblocks); goto err; } - free(buf, M_GEOM); + g_free(buf); - i = roundup((sizeof(struct cloop_header) + - total_offsets * sizeof(uint64_t)), pp->sectorsize); - buf = g_read_data(cp, 0, i, NULL); - if (buf == NULL) - goto err; sc->offsets = malloc(total_offsets * sizeof(uint64_t), - M_GEOM_UNCOMPRESS, M_WAITOK); - for (i = 0; i <= total_offsets; i++) { - sc->offsets[i] = be64toh(((uint64_t *) - (buf+sizeof(struct cloop_header)))[i]); + M_GEOM_UNCOMPRESS, M_WAITOK | M_ZERO); + total = roundup((sizeof(struct cloop_header) + + total_offsets * sizeof(uint64_t)), pp->sectorsize); +#define RSZ ((total - r) > MAXPHYS ? MAXPHYS: (total - r)) + for (r = 0, i = 0; r < total; r += MAXPHYS) { + buf = g_read_data(cp, r, RSZ, &error); + if (buf == NULL) { + free(sc->offsets, M_GEOM_UNCOMPRESS); + goto err; + } + offsets = (uint64_t *)buf; + if (r == 0) + offsets += + sizeof(struct cloop_header) / sizeof(uint64_t); + for (; i < total_offsets && offsets < (uint64_t *)(buf + RSZ); + i++, offsets++) + sc->offsets[i] = be64toh(*offsets); + g_free(buf); } - free(buf, M_GEOM); +#undef RSZ buf = NULL; DPRINTF(("%s: done reading offsets\n", gp->name)); mtx_init(&sc->last_mtx, "geom_uncompress cache", NULL, MTX_DEF); @@ -619,7 +629,7 @@ err: g_topology_lock(); g_access(cp, -1, 0, 0); if (buf != NULL) - free(buf, M_GEOM); + g_free(buf); if (gp->softc != NULL) { g_uncompress_softc_free(gp->softc, NULL); gp->softc = NULL; From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 03:14:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 834D68EE; Tue, 2 Jun 2015 03:14:48 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 704A0120B; Tue, 2 Jun 2015 03:14:48 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t523EmCR006714; Tue, 2 Jun 2015 03:14:48 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t523EhM8006686; Tue, 2 Jun 2015 03:14:43 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506020314.t523EhM8006686@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 2 Jun 2015 03:14: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: r283901 - in stable/10/sys: netinet netinet6 netipsec 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 03:14:48 -0000 Author: ae Date: Tue Jun 2 03:14:42 2015 New Revision: 283901 URL: https://svnweb.freebsd.org/changeset/base/283901 Log: MFC r275392: Remove route chaching support from ipsec code. It isn't used for some time. * remove sa_route_union declaration and route_cache member from struct secashead; * remove key_sa_routechange() call from ICMP and ICMPv6 code; * simplify ip_ipsec_mtu(); * remove #include ; Sponsored by: Yandex LLC Modified: stable/10/sys/netinet/ip_icmp.c stable/10/sys/netinet/ip_ipsec.c stable/10/sys/netinet6/icmp6.c stable/10/sys/netinet6/ip6_ipsec.c stable/10/sys/netipsec/ipsec.c stable/10/sys/netipsec/ipsec.h stable/10/sys/netipsec/ipsec_input.c stable/10/sys/netipsec/ipsec_mbuf.c stable/10/sys/netipsec/ipsec_output.c stable/10/sys/netipsec/key.c stable/10/sys/netipsec/key.h stable/10/sys/netipsec/key_debug.c stable/10/sys/netipsec/keydb.h stable/10/sys/netipsec/keysock.c stable/10/sys/netipsec/xform_ah.c stable/10/sys/netipsec/xform_esp.c stable/10/sys/netipsec/xform_ipcomp.c stable/10/sys/netipsec/xform_ipip.c stable/10/sys/netipsec/xform_tcp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/ip_icmp.c ============================================================================== --- stable/10/sys/netinet/ip_icmp.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netinet/ip_icmp.c Tue Jun 2 03:14:42 2015 (r283901) @@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" -#include "opt_ipsec.h" #include #include @@ -64,10 +63,6 @@ __FBSDID("$FreeBSD$"); #include #ifdef INET -#ifdef IPSEC -#include -#include -#endif #include @@ -664,9 +659,6 @@ reflect: (struct sockaddr *)&icmpgw, fibnum); } pfctlinput(PRC_REDIRECT_HOST, (struct sockaddr *)&icmpsrc); -#ifdef IPSEC - key_sa_routechange((struct sockaddr *)&icmpsrc); -#endif break; /* Modified: stable/10/sys/netinet/ip_ipsec.c ============================================================================== --- stable/10/sys/netinet/ip_ipsec.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netinet/ip_ipsec.c Tue Jun 2 03:14:42 2015 (r283901) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -215,35 +214,7 @@ ip_ipsec_mtu(struct mbuf *m, int mtu) * tunnel MTU = if MTU - sizeof(IP) - ESP/AH hdrsiz * XXX quickhack!!! */ - struct secpolicy *sp = NULL; - int ipsecerror; - int ipsechdr; - struct route *ro; - sp = ipsec_getpolicybyaddr(m, - IPSEC_DIR_OUTBOUND, - IP_FORWARDING, - &ipsecerror); - if (sp != NULL) { - /* count IPsec header size */ - ipsechdr = ipsec_hdrsiz(m, IPSEC_DIR_OUTBOUND, NULL); - - /* - * find the correct route for outer IPv4 - * header, compute tunnel MTU. - */ - if (sp->req != NULL && - sp->req->sav != NULL && - sp->req->sav->sah != NULL) { - ro = &sp->req->sav->sah->route_cache.sa_route; - if (ro->ro_rt && ro->ro_rt->rt_ifp) { - mtu = ro->ro_rt->rt_mtu ? ro->ro_rt->rt_mtu : - ro->ro_rt->rt_ifp->if_mtu; - mtu -= ipsechdr; - } - } - KEY_FREESP(&sp); - } - return mtu; + return (mtu - ipsec_hdrsiz(m, IPSEC_DIR_OUTBOUND, NULL)); } /* Modified: stable/10/sys/netinet6/icmp6.c ============================================================================== --- stable/10/sys/netinet6/icmp6.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netinet6/icmp6.c Tue Jun 2 03:14:42 2015 (r283901) @@ -65,7 +65,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" -#include "opt_ipsec.h" #include #include @@ -107,11 +106,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef IPSEC -#include -#include -#endif - extern struct domain inet6domain; VNET_PCPUSTAT_DEFINE(struct icmp6stat, icmp6stat); @@ -2503,9 +2497,6 @@ icmp6_redirect_input(struct mbuf *m, int sdst.sin6_len = sizeof(struct sockaddr_in6); bcopy(&reddst6, &sdst.sin6_addr, sizeof(struct in6_addr)); pfctlinput(PRC_REDIRECT_HOST, (struct sockaddr *)&sdst); -#ifdef IPSEC - key_sa_routechange((struct sockaddr *)&sdst); -#endif /* IPSEC */ } freeit: Modified: stable/10/sys/netinet6/ip6_ipsec.c ============================================================================== --- stable/10/sys/netinet6/ip6_ipsec.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netinet6/ip6_ipsec.c Tue Jun 2 03:14:42 2015 (r283901) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: stable/10/sys/netipsec/ipsec.c ============================================================================== --- stable/10/sys/netipsec/ipsec.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/ipsec.c Tue Jun 2 03:14:42 2015 (r283901) @@ -55,7 +55,6 @@ #include #include -#include #include #include Modified: stable/10/sys/netipsec/ipsec.h ============================================================================== --- stable/10/sys/netipsec/ipsec.h Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/ipsec.h Tue Jun 2 03:14:42 2015 (r283901) @@ -47,6 +47,10 @@ #ifdef _KERNEL +#include +#include +#include + #define IPSEC_ASSERT(_c,_m) KASSERT(_c, _m) #define IPSEC_IS_PRIVILEGED_SO(_so) \ Modified: stable/10/sys/netipsec/ipsec_input.c ============================================================================== --- stable/10/sys/netipsec/ipsec_input.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/ipsec_input.c Tue Jun 2 03:14:42 2015 (r283901) @@ -57,7 +57,6 @@ #include #include -#include #include #include Modified: stable/10/sys/netipsec/ipsec_mbuf.c ============================================================================== --- stable/10/sys/netipsec/ipsec_mbuf.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/ipsec_mbuf.c Tue Jun 2 03:14:42 2015 (r283901) @@ -37,11 +37,8 @@ #include #include -#include #include - #include - #include /* Modified: stable/10/sys/netipsec/ipsec_output.c ============================================================================== --- stable/10/sys/netipsec/ipsec_output.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/ipsec_output.c Tue Jun 2 03:14:42 2015 (r283901) @@ -45,7 +45,6 @@ #include #include -#include #include #include Modified: stable/10/sys/netipsec/key.c ============================================================================== --- stable/10/sys/netipsec/key.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/key.c Tue Jun 2 03:14:42 2015 (r283901) @@ -58,7 +58,6 @@ #include #include -#include #include #include @@ -2766,10 +2765,6 @@ key_delsah(sah) /* remove from tree of SA index */ if (__LIST_CHAINED(sah)) LIST_REMOVE(sah, chain); - if (sah->route_cache.sa_route.ro_rt) { - RTFREE(sah->route_cache.sa_route.ro_rt); - sah->route_cache.sa_route.ro_rt = (struct rtentry *)NULL; - } free(sah, M_IPSEC_SAH); } } @@ -7893,26 +7888,6 @@ key_sa_recordxfer(sav, m) return; } -/* dumb version */ -void -key_sa_routechange(dst) - struct sockaddr *dst; -{ - struct secashead *sah; - struct route *ro; - - SAHTREE_LOCK(); - LIST_FOREACH(sah, &V_sahtree, chain) { - ro = &sah->route_cache.sa_route; - if (ro->ro_rt && dst->sa_len == ro->ro_dst.sa_len - && bcmp(dst, &ro->ro_dst, dst->sa_len) == 0) { - RTFREE(ro->ro_rt); - ro->ro_rt = (struct rtentry *)NULL; - } - } - SAHTREE_UNLOCK(); -} - static void key_sa_chgstate(struct secasvar *sav, u_int8_t state) { Modified: stable/10/sys/netipsec/key.h ============================================================================== --- stable/10/sys/netipsec/key.h Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/key.h Tue Jun 2 03:14:42 2015 (r283901) @@ -107,7 +107,6 @@ extern void key_init __P((void)); extern void key_destroy(void); #endif extern void key_sa_recordxfer __P((struct secasvar *, struct mbuf *)); -extern void key_sa_routechange __P((struct sockaddr *)); extern void key_sa_stir_iv __P((struct secasvar *)); #ifdef IPSEC_NAT_T u_int16_t key_portfromsaddr(struct sockaddr *); Modified: stable/10/sys/netipsec/key_debug.c ============================================================================== --- stable/10/sys/netipsec/key_debug.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/key_debug.c Tue Jun 2 03:14:42 2015 (r283901) @@ -45,7 +45,6 @@ #endif #include -#include #include #include Modified: stable/10/sys/netipsec/keydb.h ============================================================================== --- stable/10/sys/netipsec/keydb.h Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/keydb.h Tue Jun 2 03:14:42 2015 (r283901) @@ -85,12 +85,6 @@ struct seclifetime { u_int64_t usetime; }; -union sa_route_union { - struct route sa_route; - struct route sin_route; /* Duplicate for consistency. */ - struct route_in6 sin6_route; -}; - /* Security Association Data Base */ struct secashead { LIST_ENTRY(secashead) chain; @@ -105,8 +99,6 @@ struct secashead { LIST_HEAD(_satree, secasvar) savtree[SADB_SASTATE_MAX+1]; /* SA chain */ /* The first of this list is newer SA */ - - union sa_route_union route_cache; }; struct xformsw; Modified: stable/10/sys/netipsec/keysock.c ============================================================================== --- stable/10/sys/netipsec/keysock.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/keysock.c Tue Jun 2 03:14:42 2015 (r283901) @@ -53,7 +53,6 @@ #include #include -#include #include #include Modified: stable/10/sys/netipsec/xform_ah.c ============================================================================== --- stable/10/sys/netipsec/xform_ah.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/xform_ah.c Tue Jun 2 03:14:42 2015 (r283901) @@ -56,7 +56,6 @@ #include #include -#include #include #include #include Modified: stable/10/sys/netipsec/xform_esp.c ============================================================================== --- stable/10/sys/netipsec/xform_esp.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/xform_esp.c Tue Jun 2 03:14:42 2015 (r283901) @@ -56,7 +56,6 @@ #include #include -#include #include #include #include Modified: stable/10/sys/netipsec/xform_ipcomp.c ============================================================================== --- stable/10/sys/netipsec/xform_ipcomp.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/xform_ipcomp.c Tue Jun 2 03:14:42 2015 (r283901) @@ -48,7 +48,6 @@ #include #include -#include #include #include Modified: stable/10/sys/netipsec/xform_ipip.c ============================================================================== --- stable/10/sys/netipsec/xform_ipip.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/xform_ipip.c Tue Jun 2 03:14:42 2015 (r283901) @@ -53,7 +53,6 @@ #include #include -#include #include #include Modified: stable/10/sys/netipsec/xform_tcp.c ============================================================================== --- stable/10/sys/netipsec/xform_tcp.c Tue Jun 2 02:05:32 2015 (r283900) +++ stable/10/sys/netipsec/xform_tcp.c Tue Jun 2 03:14:42 2015 (r283901) @@ -47,7 +47,6 @@ #include #include -#include #include #include From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 03:43:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63D08CE8; Tue, 2 Jun 2015 03:43:38 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50E141955; Tue, 2 Jun 2015 03:43:38 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t523hc6r021305; Tue, 2 Jun 2015 03:43:38 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t523hbEn021298; Tue, 2 Jun 2015 03:43:37 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506020343.t523hbEn021298@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 2 Jun 2015 03:43:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283902 - stable/10/sys/netipsec 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 03:43:38 -0000 Author: ae Date: Tue Jun 2 03:43:36 2015 New Revision: 283902 URL: https://svnweb.freebsd.org/changeset/base/283902 Log: MFC r275390: Remove unused declartations. MFC r275437: ANSIfy function declarations. MFC r275438: Remove __P() macro. Sponsored by: Yandex LLC Modified: stable/10/sys/netipsec/ipsec.c stable/10/sys/netipsec/ipsec.h stable/10/sys/netipsec/ipsec6.h stable/10/sys/netipsec/key.c stable/10/sys/netipsec/key.h stable/10/sys/netipsec/key_debug.c stable/10/sys/netipsec/key_debug.h stable/10/sys/netipsec/keydb.h stable/10/sys/netipsec/keysock.c stable/10/sys/netipsec/keysock.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netipsec/ipsec.c ============================================================================== --- stable/10/sys/netipsec/ipsec.c Tue Jun 2 03:14:42 2015 (r283901) +++ stable/10/sys/netipsec/ipsec.c Tue Jun 2 03:43:36 2015 (r283902) @@ -236,17 +236,17 @@ SYSCTL_VNET_PCPUSTAT(_net_inet6_ipsec6, struct ipsecstat, ipsec6stat, "IPsec IPv6 statistics."); #endif /* INET6 */ -static int ipsec_setspidx_inpcb __P((struct mbuf *, struct inpcb *)); -static int ipsec_setspidx __P((struct mbuf *, struct secpolicyindex *, int)); -static void ipsec4_get_ulp __P((struct mbuf *m, struct secpolicyindex *, int)); -static int ipsec4_setspidx_ipaddr __P((struct mbuf *, struct secpolicyindex *)); +static int ipsec_setspidx_inpcb(struct mbuf *, struct inpcb *); +static int ipsec_setspidx(struct mbuf *, struct secpolicyindex *, int); +static void ipsec4_get_ulp(struct mbuf *m, struct secpolicyindex *, int); +static int ipsec4_setspidx_ipaddr(struct mbuf *, struct secpolicyindex *); #ifdef INET6 -static void ipsec6_get_ulp __P((struct mbuf *m, struct secpolicyindex *, int)); -static int ipsec6_setspidx_ipaddr __P((struct mbuf *, struct secpolicyindex *)); +static void ipsec6_get_ulp(struct mbuf *m, struct secpolicyindex *, int); +static int ipsec6_setspidx_ipaddr(struct mbuf *, struct secpolicyindex *); #endif -static void ipsec_delpcbpolicy __P((struct inpcbpolicy *)); -static struct secpolicy *ipsec_deepcopy_policy __P((struct secpolicy *src)); -static void vshiftl __P((unsigned char *, int, int)); +static void ipsec_delpcbpolicy(struct inpcbpolicy *); +static struct secpolicy *ipsec_deepcopy_policy(struct secpolicy *src); +static void vshiftl(unsigned char *, int, int); MALLOC_DEFINE(M_IPSEC_INPCB, "inpcbpolicy", "inpcb-resident ipsec policy"); Modified: stable/10/sys/netipsec/ipsec.h ============================================================================== --- stable/10/sys/netipsec/ipsec.h Tue Jun 2 03:14:42 2015 (r283901) +++ stable/10/sys/netipsec/ipsec.h Tue Jun 2 03:43:36 2015 (r283902) @@ -326,40 +326,39 @@ extern struct ipsecrequest *ipsec_newisr extern void ipsec_delisr(struct ipsecrequest *); struct tdb_ident; -extern struct secpolicy *ipsec_getpolicy __P((struct tdb_ident*, u_int)); +extern struct secpolicy *ipsec_getpolicy(struct tdb_ident*, u_int); struct inpcb; -extern struct secpolicy *ipsec4_checkpolicy __P((struct mbuf *, u_int, u_int, - int *, struct inpcb *)); +extern struct secpolicy *ipsec4_checkpolicy(struct mbuf *, u_int, u_int, + int *, struct inpcb *); extern struct secpolicy * ipsec_getpolicybyaddr(struct mbuf *, u_int, int, int *); struct inpcb; -extern int ipsec_init_policy __P((struct socket *so, struct inpcbpolicy **)); -extern int ipsec_copy_policy - __P((struct inpcbpolicy *, struct inpcbpolicy *)); -extern u_int ipsec_get_reqlevel __P((struct ipsecrequest *)); -extern int ipsec_in_reject __P((struct secpolicy *, struct mbuf *)); - -extern int ipsec_set_policy __P((struct inpcb *inp, int optname, - caddr_t request, size_t len, struct ucred *cred)); -extern int ipsec_get_policy __P((struct inpcb *inpcb, caddr_t request, - size_t len, struct mbuf **mp)); -extern int ipsec_delete_pcbpolicy __P((struct inpcb *)); -extern int ipsec4_in_reject __P((struct mbuf *, struct inpcb *)); +extern int ipsec_init_policy(struct socket *so, struct inpcbpolicy **); +extern int ipsec_copy_policy(struct inpcbpolicy *, struct inpcbpolicy *); +extern u_int ipsec_get_reqlevel(struct ipsecrequest *); +extern int ipsec_in_reject(struct secpolicy *, struct mbuf *); + +extern int ipsec_set_policy(struct inpcb *inp, int optname, + caddr_t request, size_t len, struct ucred *cred); +extern int ipsec_get_policy(struct inpcb *inpcb, caddr_t request, + size_t len, struct mbuf **mp); +extern int ipsec_delete_pcbpolicy(struct inpcb *); +extern int ipsec4_in_reject(struct mbuf *, struct inpcb *); struct secas; struct tcpcb; -extern int ipsec_chkreplay __P((u_int32_t, struct secasvar *)); -extern int ipsec_updatereplay __P((u_int32_t, struct secasvar *)); +extern int ipsec_chkreplay(u_int32_t, struct secasvar *); +extern int ipsec_updatereplay(u_int32_t, struct secasvar *); -extern size_t ipsec_hdrsiz __P((struct mbuf *, u_int, struct inpcb *)); -extern size_t ipsec_hdrsiz_tcp __P((struct tcpcb *)); +extern size_t ipsec_hdrsiz(struct mbuf *, u_int, struct inpcb *); +extern size_t ipsec_hdrsiz_tcp(struct tcpcb *); union sockaddr_union; extern char * ipsec_address(union sockaddr_union* sa); -extern const char *ipsec_logsastr __P((struct secasvar *)); +extern const char *ipsec_logsastr(struct secasvar *); -extern void ipsec_dumpmbuf __P((struct mbuf *)); +extern void ipsec_dumpmbuf(struct mbuf *); struct m_tag; extern void ah4_input(struct mbuf *m, int off); @@ -370,11 +369,11 @@ extern void ipcomp4_input(struct mbuf *m extern int ipsec4_common_input(struct mbuf *m, ...); extern int ipsec4_common_input_cb(struct mbuf *m, struct secasvar *sav, int skip, int protoff, struct m_tag *mt); -extern int ipsec4_process_packet __P((struct mbuf *, struct ipsecrequest *, - int, int)); -extern int ipsec_process_done __P((struct mbuf *, struct ipsecrequest *)); +extern int ipsec4_process_packet(struct mbuf *, struct ipsecrequest *, + int, int); +extern int ipsec_process_done(struct mbuf *, struct ipsecrequest *); -extern struct mbuf *ipsec_copypkt __P((struct mbuf *)); +extern struct mbuf *ipsec_copypkt(struct mbuf *); extern void m_checkalignment(const char* where, struct mbuf *m0, int off, int len); @@ -393,11 +392,10 @@ extern void ipsec_bpf(struct mbuf *, str #endif /* _KERNEL */ #ifndef _KERNEL -extern caddr_t ipsec_set_policy __P((char *, int)); -extern int ipsec_get_policylen __P((caddr_t)); -extern char *ipsec_dump_policy __P((caddr_t, char *)); - -extern const char *ipsec_strerror __P((void)); +extern caddr_t ipsec_set_policy(char *, int); +extern int ipsec_get_policylen(caddr_t); +extern char *ipsec_dump_policy(caddr_t, char *); +extern const char *ipsec_strerror(void); #endif /* ! KERNEL */ Modified: stable/10/sys/netipsec/ipsec6.h ============================================================================== --- stable/10/sys/netipsec/ipsec6.h Tue Jun 2 03:14:42 2015 (r283901) +++ stable/10/sys/netipsec/ipsec6.h Tue Jun 2 03:43:36 2015 (r283902) @@ -59,23 +59,13 @@ VNET_DECLARE(int, ip6_ipsec_ecn); #define V_ip6_ipsec_ecn VNET(ip6_ipsec_ecn) struct inpcb; - -extern int ipsec6_in_reject __P((struct mbuf *, struct inpcb *)); - -struct ip6_hdr; -extern const char *ipsec6_logpacketstr __P((struct ip6_hdr *, u_int32_t)); +extern int ipsec6_in_reject(struct mbuf *, struct inpcb *); struct m_tag; extern int ipsec6_common_input(struct mbuf **mp, int *offp, int proto); extern int ipsec6_common_input_cb(struct mbuf *m, struct secasvar *sav, int skip, int protoff, struct m_tag *mt); extern void esp6_ctlinput(int, struct sockaddr *, void *); - -struct ipsec_output_state; -extern int ipsec6_output_trans __P((struct ipsec_output_state *, u_char *, - struct mbuf *, struct secpolicy *, int, int *)); -extern int ipsec6_output_tunnel __P((struct ipsec_output_state *, - struct secpolicy *, int)); extern int ipsec6_process_packet(struct mbuf *, struct ipsecrequest *); #endif /*_KERNEL*/ Modified: stable/10/sys/netipsec/key.c ============================================================================== --- stable/10/sys/netipsec/key.c Tue Jun 2 03:14:42 2015 (r283901) +++ stable/10/sys/netipsec/key.c Tue Jun 2 03:43:36 2015 (r283902) @@ -408,54 +408,54 @@ struct sadb_msghdr { int extlen[SADB_EXT_MAX + 1]; }; -static struct secasvar *key_allocsa_policy __P((const struct secasindex *)); -static void key_freesp_so __P((struct secpolicy **)); -static struct secasvar *key_do_allocsa_policy __P((struct secashead *, u_int)); -static void key_delsp __P((struct secpolicy *)); -static struct secpolicy *key_getsp __P((struct secpolicyindex *)); +static struct secasvar *key_allocsa_policy(const struct secasindex *); +static void key_freesp_so(struct secpolicy **); +static struct secasvar *key_do_allocsa_policy(struct secashead *, u_int); +static void key_delsp(struct secpolicy *); +static struct secpolicy *key_getsp(struct secpolicyindex *); static void _key_delsp(struct secpolicy *sp); -static struct secpolicy *key_getspbyid __P((u_int32_t)); -static u_int32_t key_newreqid __P((void)); -static struct mbuf *key_gather_mbuf __P((struct mbuf *, - const struct sadb_msghdr *, int, int, ...)); -static int key_spdadd __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static u_int32_t key_getnewspid __P((void)); -static int key_spddelete __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_spddelete2 __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_spdget __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_spdflush __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_spddump __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static struct mbuf *key_setdumpsp __P((struct secpolicy *, - u_int8_t, u_int32_t, u_int32_t)); -static u_int key_getspreqmsglen __P((struct secpolicy *)); -static int key_spdexpire __P((struct secpolicy *)); -static struct secashead *key_newsah __P((struct secasindex *)); -static void key_delsah __P((struct secashead *)); -static struct secasvar *key_newsav __P((struct mbuf *, +static struct secpolicy *key_getspbyid(u_int32_t); +static u_int32_t key_newreqid(void); +static struct mbuf *key_gather_mbuf(struct mbuf *, + const struct sadb_msghdr *, int, int, ...); +static int key_spdadd(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static u_int32_t key_getnewspid(void); +static int key_spddelete(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static int key_spddelete2(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static int key_spdget(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static int key_spdflush(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static int key_spddump(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static struct mbuf *key_setdumpsp(struct secpolicy *, + u_int8_t, u_int32_t, u_int32_t); +static u_int key_getspreqmsglen(struct secpolicy *); +static int key_spdexpire(struct secpolicy *); +static struct secashead *key_newsah(struct secasindex *); +static void key_delsah(struct secashead *); +static struct secasvar *key_newsav(struct mbuf *, const struct sadb_msghdr *, struct secashead *, int *, - const char*, int)); + const char*, int); #define KEY_NEWSAV(m, sadb, sah, e) \ key_newsav(m, sadb, sah, e, __FILE__, __LINE__) -static void key_delsav __P((struct secasvar *)); -static struct secashead *key_getsah __P((struct secasindex *)); -static struct secasvar *key_checkspidup __P((struct secasindex *, u_int32_t)); -static struct secasvar *key_getsavbyspi __P((struct secashead *, u_int32_t)); -static int key_setsaval __P((struct secasvar *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_mature __P((struct secasvar *)); -static struct mbuf *key_setdumpsa __P((struct secasvar *, u_int8_t, - u_int8_t, u_int32_t, u_int32_t)); -static struct mbuf *key_setsadbmsg __P((u_int8_t, u_int16_t, u_int8_t, - u_int32_t, pid_t, u_int16_t)); -static struct mbuf *key_setsadbsa __P((struct secasvar *)); -static struct mbuf *key_setsadbaddr __P((u_int16_t, - const struct sockaddr *, u_int8_t, u_int16_t)); +static void key_delsav(struct secasvar *); +static struct secashead *key_getsah(struct secasindex *); +static struct secasvar *key_checkspidup(struct secasindex *, u_int32_t); +static struct secasvar *key_getsavbyspi(struct secashead *, u_int32_t); +static int key_setsaval(struct secasvar *, struct mbuf *, + const struct sadb_msghdr *); +static int key_mature(struct secasvar *); +static struct mbuf *key_setdumpsa(struct secasvar *, u_int8_t, + u_int8_t, u_int32_t, u_int32_t); +static struct mbuf *key_setsadbmsg(u_int8_t, u_int16_t, u_int8_t, + u_int32_t, pid_t, u_int16_t); +static struct mbuf *key_setsadbsa(struct secasvar *); +static struct mbuf *key_setsadbaddr(u_int16_t, + const struct sockaddr *, u_int8_t, u_int16_t); #ifdef IPSEC_NAT_T static struct mbuf *key_setsadbxport(u_int16_t, u_int16_t); static struct mbuf *key_setsadbxtype(u_int16_t); @@ -463,15 +463,15 @@ static struct mbuf *key_setsadbxtype(u_i static void key_porttosaddr(struct sockaddr *, u_int16_t); #define KEY_PORTTOSADDR(saddr, port) \ key_porttosaddr((struct sockaddr *)(saddr), (port)) -static struct mbuf *key_setsadbxsa2 __P((u_int8_t, u_int32_t, u_int32_t)); -static struct mbuf *key_setsadbxpolicy __P((u_int16_t, u_int8_t, - u_int32_t)); +static struct mbuf *key_setsadbxsa2(u_int8_t, u_int32_t, u_int32_t); +static struct mbuf *key_setsadbxpolicy(u_int16_t, u_int8_t, + u_int32_t); static struct seckey *key_dup_keymsg(const struct sadb_key *, u_int, struct malloc_type *); static struct seclifetime *key_dup_lifemsg(const struct sadb_lifetime *src, struct malloc_type *type); #ifdef INET6 -static int key_ismyaddr6 __P((struct sockaddr_in6 *)); +static int key_ismyaddr6(struct sockaddr_in6 *); #endif /* flags for key_cmpsaidx() */ @@ -479,73 +479,75 @@ static int key_ismyaddr6 __P((struct soc #define CMP_MODE_REQID 2 /* additionally HEAD, reqid, mode. */ #define CMP_REQID 3 /* additionally HEAD, reaid. */ #define CMP_EXACTLY 4 /* all elements. */ -static int key_cmpsaidx - __P((const struct secasindex *, const struct secasindex *, int)); - -static int key_cmpspidx_exactly - __P((struct secpolicyindex *, struct secpolicyindex *)); -static int key_cmpspidx_withmask - __P((struct secpolicyindex *, struct secpolicyindex *)); -static int key_sockaddrcmp __P((const struct sockaddr *, const struct sockaddr *, int)); -static int key_bbcmp __P((const void *, const void *, u_int)); -static u_int16_t key_satype2proto __P((u_int8_t)); -static u_int8_t key_proto2satype __P((u_int16_t)); - -static int key_getspi __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static u_int32_t key_do_getnewspi __P((struct sadb_spirange *, - struct secasindex *)); -static int key_update __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); +static int key_cmpsaidx(const struct secasindex *, + const struct secasindex *, int); +static int key_cmpspidx_exactly(struct secpolicyindex *, + struct secpolicyindex *); +static int key_cmpspidx_withmask(struct secpolicyindex *, + struct secpolicyindex *); +static int key_sockaddrcmp(const struct sockaddr *, + const struct sockaddr *, int); +static int key_bbcmp(const void *, const void *, u_int); +static u_int16_t key_satype2proto(u_int8_t); +static u_int8_t key_proto2satype(u_int16_t); + +static int key_getspi(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static u_int32_t key_do_getnewspi(struct sadb_spirange *, + struct secasindex *); +static int key_update(struct socket *, struct mbuf *, + const struct sadb_msghdr *); #ifdef IPSEC_DOSEQCHECK -static struct secasvar *key_getsavbyseq __P((struct secashead *, u_int32_t)); +static struct secasvar *key_getsavbyseq(struct secashead *, u_int32_t); #endif -static int key_add __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_setident __P((struct secashead *, struct mbuf *, - const struct sadb_msghdr *)); -static struct mbuf *key_getmsgbuf_x1 __P((struct mbuf *, - const struct sadb_msghdr *)); -static int key_delete __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_get __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); - -static void key_getcomb_setlifetime __P((struct sadb_comb *)); -static struct mbuf *key_getcomb_esp __P((void)); -static struct mbuf *key_getcomb_ah __P((void)); -static struct mbuf *key_getcomb_ipcomp __P((void)); -static struct mbuf *key_getprop __P((const struct secasindex *)); - -static int key_acquire __P((const struct secasindex *, struct secpolicy *)); -static struct secacq *key_newacq __P((const struct secasindex *)); -static struct secacq *key_getacq __P((const struct secasindex *)); -static struct secacq *key_getacqbyseq __P((u_int32_t)); -static struct secspacq *key_newspacq __P((struct secpolicyindex *)); -static struct secspacq *key_getspacq __P((struct secpolicyindex *)); -static int key_acquire2 __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_register __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_expire __P((struct secasvar *)); -static int key_flush __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_dump __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_promisc __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *)); -static int key_senderror __P((struct socket *, struct mbuf *, int)); -static int key_validate_ext __P((const struct sadb_ext *, int)); -static int key_align __P((struct mbuf *, struct sadb_msghdr *)); +static int key_add(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static int key_setident(struct secashead *, struct mbuf *, + const struct sadb_msghdr *); +static struct mbuf *key_getmsgbuf_x1(struct mbuf *, + const struct sadb_msghdr *); +static int key_delete(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static int key_delete_all(struct socket *, struct mbuf *, + const struct sadb_msghdr *, u_int16_t); +static int key_get(struct socket *, struct mbuf *, + const struct sadb_msghdr *); + +static void key_getcomb_setlifetime(struct sadb_comb *); +static struct mbuf *key_getcomb_esp(void); +static struct mbuf *key_getcomb_ah(void); +static struct mbuf *key_getcomb_ipcomp(void); +static struct mbuf *key_getprop(const struct secasindex *); + +static int key_acquire(const struct secasindex *, struct secpolicy *); +static struct secacq *key_newacq(const struct secasindex *); +static struct secacq *key_getacq(const struct secasindex *); +static struct secacq *key_getacqbyseq(u_int32_t); +static struct secspacq *key_newspacq(struct secpolicyindex *); +static struct secspacq *key_getspacq(struct secpolicyindex *); +static int key_acquire2(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static int key_register(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static int key_expire(struct secasvar *); +static int key_flush(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static int key_dump(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static int key_promisc(struct socket *, struct mbuf *, + const struct sadb_msghdr *); +static int key_senderror(struct socket *, struct mbuf *, int); +static int key_validate_ext(const struct sadb_ext *, int); +static int key_align(struct mbuf *, struct sadb_msghdr *); static struct mbuf *key_setlifetime(struct seclifetime *src, u_int16_t exttype); static struct mbuf *key_setkey(struct seckey *src, u_int16_t exttype); #if 0 -static const char *key_getfqdn __P((void)); -static const char *key_getuserfqdn __P((void)); +static const char *key_getfqdn(void); +static const char *key_getuserfqdn(void); #endif -static void key_sa_chgstate __P((struct secasvar *, u_int8_t)); +static void key_sa_chgstate(struct secasvar *, u_int8_t); static __inline void sa_initref(struct secasvar *sav) @@ -610,7 +612,8 @@ key_havesp(u_int dir) * others: found and return the pointer. */ struct secpolicy * -key_allocsp(struct secpolicyindex *spidx, u_int dir, const char* where, int tag) +key_allocsp(struct secpolicyindex *spidx, u_int dir, const char* where, + int tag) { struct secpolicy *sp; @@ -662,11 +665,8 @@ found: * others: found and return the pointer. */ struct secpolicy * -key_allocsp2(u_int32_t spi, - union sockaddr_union *dst, - u_int8_t proto, - u_int dir, - const char* where, int tag) +key_allocsp2(u_int32_t spi, union sockaddr_union *dst, u_int8_t proto, + u_int dir, const char* where, int tag) { struct secpolicy *sp; @@ -1074,11 +1074,8 @@ key_do_allocsa_policy(struct secashead * * keep source address in IPsec SA. We see a tricky situation here. */ struct secasvar * -key_allocsa( - union sockaddr_union *dst, - u_int proto, - u_int32_t spi, - const char* where, int tag) +key_allocsa(union sockaddr_union *dst, u_int proto, u_int32_t spi, + const char* where, int tag) { struct secashead *sah; struct secasvar *sav; @@ -1399,10 +1396,7 @@ _key_delsp(struct secpolicy *sp) * so must be set properly later. */ struct secpolicy * -key_msg2sp(xpl0, len, error) - struct sadb_x_policy *xpl0; - size_t len; - int *error; +key_msg2sp(struct sadb_x_policy *xpl0, size_t len, int *error) { struct secpolicy *newsp; @@ -1634,8 +1628,7 @@ key_newreqid() * copy secpolicy struct to sadb_x_policy structure indicated. */ struct mbuf * -key_sp2msg(sp) - struct secpolicy *sp; +key_sp2msg(struct secpolicy *sp) { struct sadb_x_policy *xpl; int tlen; @@ -1693,17 +1686,8 @@ key_sp2msg(sp) /* m will not be freed nor modified */ static struct mbuf * -#ifdef __STDC__ key_gather_mbuf(struct mbuf *m, const struct sadb_msghdr *mhp, - int ndeep, int nitem, ...) -#else -key_gather_mbuf(m, mhp, ndeep, nitem, va_alist) - struct mbuf *m; - const struct sadb_msghdr *mhp; - int ndeep; - int nitem; - va_dcl -#endif + int ndeep, int nitem, ...) { va_list ap; int idx; @@ -1792,10 +1776,7 @@ fail: * m will always be freed. */ static int -key_spdadd(so, m, mhp) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_spdadd(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp) { struct sadb_address *src0, *dst0; struct sadb_x_policy *xpl0, *xpl; @@ -2057,10 +2038,8 @@ key_getnewspid() * m will always be freed. */ static int -key_spddelete(so, m, mhp) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_spddelete(struct socket *so, struct mbuf *m, + const struct sadb_msghdr *mhp) { struct sadb_address *src0, *dst0; struct sadb_x_policy *xpl0; @@ -2167,10 +2146,8 @@ key_spddelete(so, m, mhp) * m will always be freed. */ static int -key_spddelete2(so, m, mhp) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_spddelete2(struct socket *so, struct mbuf *m, + const struct sadb_msghdr *mhp) { u_int32_t id; struct secpolicy *sp; @@ -2261,10 +2238,7 @@ key_spddelete2(so, m, mhp) * m will always be freed. */ static int -key_spdget(so, m, mhp) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_spdget(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp) { u_int32_t id; struct secpolicy *sp; @@ -2315,8 +2289,7 @@ key_spdget(so, m, mhp) * others: error number */ int -key_spdacquire(sp) - struct secpolicy *sp; +key_spdacquire(struct secpolicy *sp) { struct mbuf *result = NULL, *m; struct secspacq *newspacq; @@ -2376,10 +2349,7 @@ key_spdacquire(sp) * m will always be freed. */ static int -key_spdflush(so, m, mhp) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_spdflush(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp) { struct sadb_msg *newmsg; struct secpolicy *sp; @@ -2428,10 +2398,7 @@ key_spdflush(so, m, mhp) * m will always be freed. */ static int -key_spddump(so, m, mhp) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_spddump(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp) { struct secpolicy *sp; int cnt; @@ -2474,7 +2441,8 @@ key_spddump(so, m, mhp) } static struct mbuf * -key_setdumpsp(struct secpolicy *sp, u_int8_t type, u_int32_t seq, u_int32_t pid) +key_setdumpsp(struct secpolicy *sp, u_int8_t type, u_int32_t seq, + u_int32_t pid) { struct mbuf *result = NULL, *m; struct seclifetime lt; @@ -2550,8 +2518,7 @@ fail: * get PFKEY message length for security policy and request. */ static u_int -key_getspreqmsglen(sp) - struct secpolicy *sp; +key_getspreqmsglen(struct secpolicy *sp) { u_int tlen; @@ -2588,8 +2555,7 @@ key_getspreqmsglen(sp) * others : error number */ static int -key_spdexpire(sp) - struct secpolicy *sp; +key_spdexpire(struct secpolicy *sp) { struct mbuf *result = NULL, *m; int len; @@ -2702,8 +2668,7 @@ key_spdexpire(sp) * others : pointer to new SA head. */ static struct secashead * -key_newsah(saidx) - struct secasindex *saidx; +key_newsah(struct secasindex *saidx) { struct secashead *newsah; @@ -2730,8 +2695,7 @@ key_newsah(saidx) * delete SA index and all SA registerd. */ static void -key_delsah(sah) - struct secashead *sah; +key_delsah(struct secashead *sah) { struct secasvar *sav, *nextsav; u_int stateidx; @@ -2782,13 +2746,8 @@ key_delsah(sah) * does not modify mbuf. does not free mbuf on error. */ static struct secasvar * -key_newsav(m, mhp, sah, errp, where, tag) - struct mbuf *m; - const struct sadb_msghdr *mhp; - struct secashead *sah; - int *errp; - const char* where; - int tag; +key_newsav(struct mbuf *m, const struct sadb_msghdr *mhp, + struct secashead *sah, int *errp, const char *where, int tag) { struct secasvar *newsav; const struct sadb_sa *xsa; @@ -2933,8 +2892,7 @@ key_cleansav(struct secasvar *sav) * free() SA variable entry. */ static void -key_delsav(sav) - struct secasvar *sav; +key_delsav(struct secasvar *sav) { IPSEC_ASSERT(sav != NULL, ("null sav")); IPSEC_ASSERT(sav->refcnt == 0, ("reference count %u > 0", sav->refcnt)); @@ -2954,8 +2912,7 @@ key_delsav(sav) * others : found, pointer to a SA. */ static struct secashead * -key_getsah(saidx) - struct secasindex *saidx; +key_getsah(struct secasindex *saidx) { struct secashead *sah; @@ -2979,9 +2936,7 @@ key_getsah(saidx) * others : found, pointer to a SA. */ static struct secasvar * -key_checkspidup(saidx, spi) - struct secasindex *saidx; - u_int32_t spi; +key_checkspidup(struct secasindex *saidx, u_int32_t spi) { struct secashead *sah; struct secasvar *sav; @@ -3015,9 +2970,7 @@ key_checkspidup(saidx, spi) * others : found, pointer to a SA. */ static struct secasvar * -key_getsavbyspi(sah, spi) - struct secashead *sah; - u_int32_t spi; +key_getsavbyspi(struct secashead *sah, u_int32_t spi) { struct secasvar *sav; u_int stateidx, state; @@ -3057,10 +3010,8 @@ key_getsavbyspi(sah, spi) * does not modify mbuf. does not free mbuf on error. */ static int -key_setsaval(sav, m, mhp) - struct secasvar *sav; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_setsaval(struct secasvar *sav, struct mbuf *m, + const struct sadb_msghdr *mhp) { int error = 0; @@ -3598,8 +3549,7 @@ key_setsadbmsg(u_int8_t type, u_int16_t * copy secasvar data into sadb_address. */ static struct mbuf * -key_setsadbsa(sav) - struct secasvar *sav; +key_setsadbsa(struct secasvar *sav) { struct mbuf *m; struct sadb_sa *p; @@ -3629,7 +3579,8 @@ key_setsadbsa(sav) * set data into sadb_address. */ static struct mbuf * -key_setsadbaddr(u_int16_t exttype, const struct sockaddr *saddr, u_int8_t prefixlen, u_int16_t ul_proto) +key_setsadbaddr(u_int16_t exttype, const struct sockaddr *saddr, + u_int8_t prefixlen, u_int16_t ul_proto) { struct mbuf *m; struct sadb_address *p; @@ -3758,7 +3709,7 @@ key_setsadbxport(u_int16_t port, u_int16 /* * Get port from sockaddr. Port is in network byte order. */ -u_int16_t +u_int16_t key_portfromsaddr(struct sockaddr *sa) { @@ -3841,7 +3792,7 @@ key_setsadbxpolicy(u_int16_t type, u_int */ struct seckey * key_dup_keymsg(const struct sadb_key *src, u_int len, - struct malloc_type *type) + struct malloc_type *type) { struct seckey *dst; dst = (struct seckey *)malloc(sizeof(struct seckey), type, M_NOWAIT); @@ -3873,8 +3824,7 @@ key_dup_keymsg(const struct sadb_key *sr */ static struct seclifetime * -key_dup_lifemsg(const struct sadb_lifetime *src, - struct malloc_type *type) +key_dup_lifemsg(const struct sadb_lifetime *src, struct malloc_type *type) { struct seclifetime *dst = NULL; @@ -3925,8 +3875,7 @@ key_ismyaddr(struct sockaddr *sa) #include static int -key_ismyaddr6(sin6) - struct sockaddr_in6 *sin6; +key_ismyaddr6(struct sockaddr_in6 *sin6) { struct in6_ifaddr *ia; #if 0 @@ -3979,10 +3928,8 @@ key_ismyaddr6(sin6) * 0 : not equal */ static int -key_cmpsaidx( - const struct secasindex *saidx0, - const struct secasindex *saidx1, - int flag) +key_cmpsaidx(const struct secasindex *saidx0, const struct secasindex *saidx1, + int flag) { int chkport = 0; @@ -4061,9 +4008,8 @@ key_cmpsaidx( * 0 : not equal */ static int -key_cmpspidx_exactly( - struct secpolicyindex *spidx0, - struct secpolicyindex *spidx1) +key_cmpspidx_exactly(struct secpolicyindex *spidx0, + struct secpolicyindex *spidx1) { /* sanity */ if (spidx0 == NULL && spidx1 == NULL) @@ -4091,9 +4037,8 @@ key_cmpspidx_exactly( * 0 : not equal */ static int -key_cmpspidx_withmask( - struct secpolicyindex *spidx0, - struct secpolicyindex *spidx1) +key_cmpspidx_withmask(struct secpolicyindex *spidx0, + struct secpolicyindex *spidx1) { /* sanity */ if (spidx0 == NULL && spidx1 == NULL) @@ -4184,10 +4129,8 @@ key_cmpspidx_withmask( /* returns 0 on match */ static int -key_sockaddrcmp( - const struct sockaddr *sa1, - const struct sockaddr *sa2, - int port) +key_sockaddrcmp(const struct sockaddr *sa1, const struct sockaddr *sa2, + int port) { #ifdef satosin #undef satosin @@ -4534,9 +4477,7 @@ key_random() } void -key_randomfill(p, l) - void *p; - size_t l; +key_randomfill(void *p, size_t l) { size_t n; u_long v; @@ -4622,10 +4563,7 @@ key_proto2satype(u_int16_t proto) * other if success, return pointer to the message to send. */ static int -key_getspi(so, m, mhp) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_getspi(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp) { struct sadb_address *src0, *dst0; struct secasindex saidx; @@ -4857,9 +4795,7 @@ key_getspi(so, m, mhp) * others: success. */ static u_int32_t -key_do_getnewspi(spirange, saidx) - struct sadb_spirange *spirange; - struct secasindex *saidx; +key_do_getnewspi(struct sadb_spirange *spirange, struct secasindex *saidx) { u_int32_t newspi; u_int32_t min, max; @@ -4937,10 +4873,7 @@ key_do_getnewspi(spirange, saidx) * m will always be freed. */ static int -key_update(so, m, mhp) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_update(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp) { struct sadb_sa *sa0; struct sadb_address *src0, *dst0; @@ -5184,9 +5117,7 @@ key_update(so, m, mhp) */ #ifdef IPSEC_DOSEQCHECK static struct secasvar * -key_getsavbyseq(sah, seq) - struct secashead *sah; - u_int32_t seq; +key_getsavbyseq(struct secashead *sah, u_int32_t seq) { struct secasvar *sav; u_int state; @@ -5227,10 +5158,7 @@ key_getsavbyseq(sah, seq) * m will always be freed. */ static int -key_add(so, m, mhp) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_add(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp) { struct sadb_sa *sa0; struct sadb_address *src0, *dst0; @@ -5441,10 +5369,8 @@ key_add(so, m, mhp) /* m is retained */ static int -key_setident(sah, m, mhp) - struct secashead *sah; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_setident(struct secashead *sah, struct mbuf *m, + const struct sadb_msghdr *mhp) { const struct sadb_ident *idsrc, *iddst; int idsrclen, iddstlen; @@ -5517,9 +5443,7 @@ key_setident(sah, m, mhp) * it is caller's responsibility to free the result. */ static struct mbuf * -key_getmsgbuf_x1(m, mhp) - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_getmsgbuf_x1(struct mbuf *m, const struct sadb_msghdr *mhp) { struct mbuf *n; @@ -5548,9 +5472,6 @@ key_getmsgbuf_x1(m, mhp) return n; } -static int key_delete_all __P((struct socket *, struct mbuf *, - const struct sadb_msghdr *, u_int16_t)); - /* * SADB_DELETE processing * receive @@ -5563,10 +5484,7 @@ static int key_delete_all __P((struct so * m will always be freed. */ static int -key_delete(so, m, mhp) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_delete(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp) { struct sadb_sa *sa0; struct sadb_address *src0, *dst0; @@ -5710,8 +5628,8 @@ key_delete(so, m, mhp) * delete all SAs for src/dst. Called from key_delete(). */ static int -key_delete_all(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp, - u_int16_t proto) +key_delete_all(struct socket *so, struct mbuf *m, + const struct sadb_msghdr *mhp, u_int16_t proto) { struct sadb_address *src0, *dst0; struct secasindex saidx; @@ -5831,10 +5749,7 @@ key_delete_all(struct socket *so, struct * m will always be freed. */ static int -key_get(so, m, mhp) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; +key_get(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp) { struct sadb_sa *sa0; struct sadb_address *src0, *dst0; @@ -5957,8 +5872,7 @@ key_get(so, m, mhp) /* XXX make it sysctl-configurable? */ static void -key_getcomb_setlifetime(comb) - struct sadb_comb *comb; +key_getcomb_setlifetime(struct sadb_comb *comb) { comb->sadb_comb_soft_allocations = 1; @@ -6050,11 +5964,8 @@ key_getcomb_esp() } static void -key_getsizes_ah( - const struct auth_hash *ah, - int alg, - u_int16_t* min, - u_int16_t* max) +key_getsizes_ah(const struct auth_hash *ah, int alg, u_int16_t* min, + u_int16_t* max) { *min = *max = ah->keysize; @@ -6184,8 +6095,7 @@ key_getcomb_ipcomp() * XXX sysctl interface to ipsec_{ah,esp}_keymin */ static struct mbuf * -key_getprop(saidx) - const struct secasindex *saidx; +key_getprop(const struct secasindex *saidx) { struct sadb_prop *prop; struct mbuf *m, *n; @@ -6457,8 +6367,7 @@ key_getacq(const struct secasindex *said } static struct secacq * -key_getacqbyseq(seq) - u_int32_t seq; +key_getacqbyseq(u_int32_t seq) { struct secacq *acq; @@ -6473,8 +6382,7 @@ key_getacqbyseq(seq) } static struct secspacq * -key_newspacq(spidx) - struct secpolicyindex *spidx; +key_newspacq(struct secpolicyindex *spidx) { struct secspacq *acq; @@ -6499,8 +6407,7 @@ key_newspacq(spidx) } static struct secspacq * -key_getspacq(spidx) - struct secpolicyindex *spidx; +key_getspacq(struct secpolicyindex *spidx) { struct secspacq *acq; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 03:51:34 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20D5FFC4; Tue, 2 Jun 2015 03:51:34 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02CFA1B11; Tue, 2 Jun 2015 03:51:34 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t523pXqw026016; Tue, 2 Jun 2015 03:51:33 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t523pXmU026015; Tue, 2 Jun 2015 03:51:33 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506020351.t523pXmU026015@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 2 Jun 2015 03:51: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: r283903 - stable/10/sys/netipsec 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 03:51:34 -0000 Author: ae Date: Tue Jun 2 03:51:33 2015 New Revision: 283903 URL: https://svnweb.freebsd.org/changeset/base/283903 Log: MFC r283101: Teach key_expire() send SADB_EXPIRE message with the SADB_EXT_LIFETIME_HARD extension header type. The key_flush_sad() now will send SADB_EXPIRE message when HARD lifetime expires. This is required by RFC 2367 and some keying daemons rely on these messages. HARD lifetime messages have precedence over SOFT lifetime messages, so now they will be checked first. Also now SADB_EXPIRE messages will be send even the SA has not been used, because keying daemons might want to rekey such SA. PR: 200282, 200283 MFC r283102: Change SA's state before sending SADB_EXPIRE message. This state will be reported to keying daemon. Modified: stable/10/sys/netipsec/key.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netipsec/key.c ============================================================================== --- stable/10/sys/netipsec/key.c Tue Jun 2 03:43:36 2015 (r283902) +++ stable/10/sys/netipsec/key.c Tue Jun 2 03:51:33 2015 (r283903) @@ -529,7 +529,7 @@ static int key_acquire2(struct socket *, const struct sadb_msghdr *); static int key_register(struct socket *, struct mbuf *, const struct sadb_msghdr *); -static int key_expire(struct secasvar *); +static int key_expire(struct secasvar *, int); static int key_flush(struct socket *, struct mbuf *, const struct sadb_msghdr *); static int key_dump(struct socket *, struct mbuf *, @@ -4302,41 +4302,29 @@ key_flush_sad(time_t now) "time, why?\n", __func__)); continue; } - - /* check SOFT lifetime */ - if (sav->lft_s->addtime != 0 && - now - sav->created > sav->lft_s->addtime) { - key_sa_chgstate(sav, SADB_SASTATE_DYING); - /* - * Actually, only send expire message if - * SA has been used, as it was done before, - * but should we always send such message, - * and let IKE daemon decide if it should be - * renegotiated or not ? - * XXX expire message will actually NOT be - * sent if SA is only used after soft - * lifetime has been reached, see below - * (DYING state) - */ - if (sav->lft_c->usetime != 0) - key_expire(sav); - } - /* check SOFT lifetime by bytes */ /* - * XXX I don't know the way to delete this SA - * when new SA is installed. Caution when it's - * installed too big lifetime by time. + * RFC 2367: + * HARD lifetimes MUST take precedence over SOFT + * lifetimes, meaning if the HARD and SOFT lifetimes + * are the same, the HARD lifetime will appear on the + * EXPIRE message. */ - else if (sav->lft_s->bytes != 0 && - sav->lft_s->bytes < sav->lft_c->bytes) { - + /* check HARD lifetime */ + if ((sav->lft_h->addtime != 0 && + now - sav->created > sav->lft_h->addtime) || + (sav->lft_h->bytes != 0 && + sav->lft_h->bytes < sav->lft_c->bytes)) { + key_sa_chgstate(sav, SADB_SASTATE_DEAD); + key_expire(sav, 1); + KEY_FREESAV(&sav); + } + /* check SOFT lifetime */ + else if ((sav->lft_s->addtime != 0 && + now - sav->created > sav->lft_s->addtime) || + (sav->lft_s->bytes != 0 && + sav->lft_s->bytes < sav->lft_c->bytes)) { key_sa_chgstate(sav, SADB_SASTATE_DYING); - /* - * XXX If we keep to send expire - * message in the status of - * DYING. Do remove below code. - */ - key_expire(sav); + key_expire(sav, 0); } } @@ -4356,6 +4344,7 @@ key_flush_sad(time_t now) if (sav->lft_h->addtime != 0 && now - sav->created > sav->lft_h->addtime) { key_sa_chgstate(sav, SADB_SASTATE_DEAD); + key_expire(sav, 1); KEY_FREESAV(&sav); } #if 0 /* XXX Should we keep to send expire message until HARD lifetime ? */ @@ -4371,13 +4360,14 @@ key_flush_sad(time_t now) * If there is no SA then sending * expire message. */ - key_expire(sav); + key_expire(sav, 0); } #endif /* check HARD lifetime by bytes */ else if (sav->lft_h->bytes != 0 && sav->lft_h->bytes < sav->lft_c->bytes) { key_sa_chgstate(sav, SADB_SASTATE_DEAD); + key_expire(sav, 1); KEY_FREESAV(&sav); } } @@ -6783,7 +6773,7 @@ key_freereg(struct socket *so) * others : error number */ static int -key_expire(struct secasvar *sav) +key_expire(struct secasvar *sav, int hard) { int satype; struct mbuf *result = NULL, *m; @@ -6841,11 +6831,19 @@ key_expire(struct secasvar *sav) lt->sadb_lifetime_usetime = sav->lft_c->usetime; lt = (struct sadb_lifetime *)(mtod(m, caddr_t) + len / 2); lt->sadb_lifetime_len = PFKEY_UNIT64(sizeof(struct sadb_lifetime)); - lt->sadb_lifetime_exttype = SADB_EXT_LIFETIME_SOFT; - lt->sadb_lifetime_allocations = sav->lft_s->allocations; - lt->sadb_lifetime_bytes = sav->lft_s->bytes; - lt->sadb_lifetime_addtime = sav->lft_s->addtime; - lt->sadb_lifetime_usetime = sav->lft_s->usetime; + if (hard) { + lt->sadb_lifetime_exttype = SADB_EXT_LIFETIME_HARD; + lt->sadb_lifetime_allocations = sav->lft_h->allocations; + lt->sadb_lifetime_bytes = sav->lft_h->bytes; + lt->sadb_lifetime_addtime = sav->lft_h->addtime; + lt->sadb_lifetime_usetime = sav->lft_h->usetime; + } else { + lt->sadb_lifetime_exttype = SADB_EXT_LIFETIME_SOFT; + lt->sadb_lifetime_allocations = sav->lft_s->allocations; + lt->sadb_lifetime_bytes = sav->lft_s->bytes; + lt->sadb_lifetime_addtime = sav->lft_s->addtime; + lt->sadb_lifetime_usetime = sav->lft_s->usetime; + } m_cat(result, m); /* set sadb_address for source */ From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 08:03:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C2DF239; Tue, 2 Jun 2015 08:03:29 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78FD715C5; Tue, 2 Jun 2015 08:03:29 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5283TnJ052247; Tue, 2 Jun 2015 08:03:29 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5283TQ0052246; Tue, 2 Jun 2015 08:03:29 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201506020803.t5283TQ0052246@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Tue, 2 Jun 2015 08:03:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283905 - stable/10/usr.sbin/pmcstat 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 08:03:29 -0000 Author: hiren Date: Tue Jun 2 08:03:28 2015 New Revision: 283905 URL: https://svnweb.freebsd.org/changeset/base/283905 Log: MFC: r282866 Fix pmcstat symbol resolution for userland processes. When examining existing processes pmcstat fails to correctly determine the locations of executable sections of the process due to a miscalculated virtual load address. This does not affect the newly launched processes as the same value passed as a "start address" to the pmcstat_image_link() thus nullifying the effect of it. The issue manifests itself in processes not being reported in the pmcstat(8) output and "dubious frames" being reported. Fix it for now by ignoring all the sections except the executable one. This won't fix the issue for objects with multiple executable sections but helps in majority of real world usecases. The real solution would be to modify the MAP-IN event to include the appropriate load address so pmcstat(8) won't have to manually parse object files to try to determine it. PR: 198147, 198148 Submitted by: stas Modified: stable/10/usr.sbin/pmcstat/pmcstat_log.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- stable/10/usr.sbin/pmcstat/pmcstat_log.c Tue Jun 2 07:26:26 2015 (r283904) +++ stable/10/usr.sbin/pmcstat/pmcstat_log.c Tue Jun 2 08:03:28 2015 (r283905) @@ -716,7 +716,8 @@ pmcstat_image_get_elf_params(struct pmcs ph.p_offset); break; case PT_LOAD: - if ((ph.p_offset & (-ph.p_align)) == 0) + if ((ph.p_flags & PF_X) != 0 && + (ph.p_offset & (-ph.p_align)) == 0) image->pi_vaddr = ph.p_vaddr & (-ph.p_align); break; } From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 09:03:16 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F9D9D39; Tue, 2 Jun 2015 09:03:16 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D0031585; Tue, 2 Jun 2015 09:03:16 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5293F7Z081584; Tue, 2 Jun 2015 09:03:15 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5293Fa3081583; Tue, 2 Jun 2015 09:03:15 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201506020903.t5293Fa3081583@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Tue, 2 Jun 2015 09:03:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283906 - head/lib/libgssapi 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 09:03:16 -0000 Author: araujo (ports committer) Date: Tue Jun 2 09:03:15 2015 New Revision: 283906 URL: https://svnweb.freebsd.org/changeset/base/283906 Log: Remove unused variable allocated_ctx reported by clang. Differential Revision: D2684 Reviewed by: rodrigc Modified: head/lib/libgssapi/gss_accept_sec_context.c Modified: head/lib/libgssapi/gss_accept_sec_context.c ============================================================================== --- head/lib/libgssapi/gss_accept_sec_context.c Tue Jun 2 08:03:28 2015 (r283905) +++ head/lib/libgssapi/gss_accept_sec_context.c Tue Jun 2 09:03:15 2015 (r283906) @@ -165,7 +165,6 @@ OM_uint32 gss_accept_sec_context(OM_uint struct _gss_mechanism_cred *mc; gss_cred_id_t acceptor_mc, delegated_mc; gss_name_t src_mn; - int allocated_ctx; *minor_status = 0; if (src_name) @@ -206,11 +205,8 @@ OM_uint32 gss_accept_sec_context(OM_uint free(ctx); return (GSS_S_BAD_MECH); } - allocated_ctx = 1; - } else { + } else m = ctx->gc_mech; - allocated_ctx = 0; - } if (cred) { SLIST_FOREACH(mc, &cred->gc_mc, gmc_link) From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 09:05:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA78AF98; Tue, 2 Jun 2015 09:05:46 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7B4815B3; Tue, 2 Jun 2015 09:05:46 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5295kKI082101; Tue, 2 Jun 2015 09:05:46 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5295k7G082099; Tue, 2 Jun 2015 09:05:46 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201506020905.t5295k7G082099@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Tue, 2 Jun 2015 09:05:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283907 - head/sbin/camcontrol 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 09:05:47 -0000 Author: araujo (ports committer) Date: Tue Jun 2 09:05:45 2015 New Revision: 283907 URL: https://svnweb.freebsd.org/changeset/base/283907 Log: Remove unused variables reported by clang. Differential Revision: D2688 Reviewed by: rodrigc, mav Modified: head/sbin/camcontrol/camcontrol.c head/sbin/camcontrol/persist.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Tue Jun 2 09:03:15 2015 (r283906) +++ head/sbin/camcontrol/camcontrol.c Tue Jun 2 09:05:45 2015 (r283907) @@ -2566,12 +2566,11 @@ atahpa(struct cam_device *device, int re struct ata_params *ident_buf; struct ccb_getdev cgd; struct ata_set_max_pwd pwd; - int error, confirm, quiet, c, action, actions, setpwd, persist; + int error, confirm, quiet, c, action, actions, persist; int security, is48bit, pwdsize; u_int64_t hpasize, maxsize; actions = 0; - setpwd = 0; confirm = 0; quiet = 0; maxsize = 0; Modified: head/sbin/camcontrol/persist.c ============================================================================== --- head/sbin/camcontrol/persist.c Tue Jun 2 09:03:15 2015 (r283906) +++ head/sbin/camcontrol/persist.c Tue Jun 2 09:05:45 2015 (r283907) @@ -432,7 +432,7 @@ scsipersist(struct cam_device *device, i uint32_t res_len = 0; unsigned long rel_tgt_port = 0; uint8_t *res_buf = NULL; - int scope = SPR_LU_SCOPE, res_type = 0, key_set = 0, sa_key_set = 0; + int scope = SPR_LU_SCOPE, res_type = 0; struct persist_transport_id *id, *id2; STAILQ_HEAD(, persist_transport_id) transport_id_list; uint64_t key = 0, sa_key = 0; @@ -510,10 +510,8 @@ scsipersist(struct cam_device *device, i } if (c == 'k') { key = tmpval; - key_set = 1; } else { sa_key = tmpval; - sa_key_set = 1; } break; } From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 09:42:01 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C637915; Tue, 2 Jun 2015 09:42:01 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED2291EFD; Tue, 2 Jun 2015 09:42:00 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t529g0Em001738; Tue, 2 Jun 2015 09:42:00 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t529g0qD001737; Tue, 2 Jun 2015 09:42:00 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <201506020942.t529g0qD001737@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Tue, 2 Jun 2015 09:42:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283908 - stable/10/lib/libiconv_modules/UTF7 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 09:42:01 -0000 Author: tijl Date: Tue Jun 2 09:42:00 2015 New Revision: 283908 URL: https://svnweb.freebsd.org/changeset/base/283908 Log: MFC r283406,283418: Fix decoding of UTF-7 when a base64 encoded chunk appears at the end of the input buffer. _citrus_UTF7_mbtoutf16 stored the decoder state at the beginning so it could restore this state on an incomplete character such that the next call would restart the decoding. The problem was that "-" (end of base64 mode) at the end of a string was also treated as an incomplete character but was also removed from the state buffer. So the initial state would be restored (with base64 mode) and the next call would no longer see the "-" so it continued in base64 mode. This state saving/restoring isn't needed here. It's already handled elsewhere (citrus_iconv_std.c:_citrus_iconv_std_iconv_convert) so just remove it. Also initialise *nresult. When only 2 bytes can be read from a 4 byte UTF-16 character in a base64 encoded chunk of a UTF-7 string, treat that as an incomplete character and return an error instead of a shift sequence and no error. Also check that the low 2 bytes have a valid value. PR: 200398 Modified: stable/10/lib/libiconv_modules/UTF7/citrus_utf7.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libiconv_modules/UTF7/citrus_utf7.c ============================================================================== --- stable/10/lib/libiconv_modules/UTF7/citrus_utf7.c Tue Jun 2 09:05:45 2015 (r283907) +++ stable/10/lib/libiconv_modules/UTF7/citrus_utf7.c Tue Jun 2 09:42:00 2015 (r283908) @@ -62,8 +62,7 @@ typedef struct { unsigned int mode: 1, /* whether base64 mode */ bits: 4, /* need to hold 0 - 15 */ - cache: 22, /* 22 = BASE64_BIT + UTF16_BIT */ - surrogate: 1; /* whether surrogate pair or not */ + cache: 22; /* 22 = BASE64_BIT + UTF16_BIT */ int chlen; char ch[4]; /* BASE64_IN, 3 * 6 = 18, most closed to UTF16_BIT */ } _UTF7State; @@ -154,21 +153,17 @@ _citrus_UTF7_mbtoutf16(_UTF7EncodingInfo uint16_t * __restrict u16, char ** __restrict s, size_t n, _UTF7State * __restrict psenc, size_t * __restrict nresult) { - _UTF7State sv; char *s0; int done, i, len; + *nresult = 0; s0 = *s; - sv = *psenc; for (i = 0, done = 0; done == 0; i++) { if (i == psenc->chlen) { if (n-- < 1) { *nresult = (size_t)-2; *s = s0; - sv.chlen = psenc->chlen; - memcpy(sv.ch, psenc->ch, sizeof(sv.ch)); - *psenc = sv; return (0); } psenc->ch[psenc->chlen++] = *s0++; @@ -257,34 +252,31 @@ _citrus_UTF7_mbrtowc_priv(_UTF7EncodingI *nresult = (size_t)_ENCODING_IS_STATE_DEPENDENT; return (0); } - if (psenc->surrogate) { - hi = (psenc->cache >> psenc->bits) & UTF16_MAX; - if (hi < HISRG_MIN || hi > HISRG_MAX) - return (EINVAL); - siz = 0; - } else { - err = _citrus_UTF7_mbtoutf16(ei, &hi, s, n, psenc, &nr); - if (nr == (size_t)-1 || nr == (size_t)-2) { - *nresult = nr; - return (err); - } - if (err != 0) - return (err); - n -= nr; - siz = nr; - if (hi < HISRG_MIN || hi > HISRG_MAX) { - u32 = (uint32_t)hi; - goto done; - } - psenc->surrogate = 1; + err = _citrus_UTF7_mbtoutf16(ei, &hi, s, n, psenc, &nr); + if (nr == (size_t)-1 || nr == (size_t)-2) { + *nresult = nr; + return (err); + } + if (err != 0) + return (err); + n -= nr; + siz = nr; + if (hi < HISRG_MIN || hi > HISRG_MAX) { + u32 = (uint32_t)hi; + goto done; } err = _citrus_UTF7_mbtoutf16(ei, &lo, s, n, psenc, &nr); if (nr == (size_t)-1 || nr == (size_t)-2) { + psenc->chlen = 1; /* make get_state_desc return incomplete */ *nresult = nr; return (err); } if (err != 0) return (err); + if (lo < LOSRG_MIN || lo > LOSRG_MAX) { + *nresult = (size_t)-1; + return (EILSEQ); + } hi -= HISRG_MIN; lo -= LOSRG_MIN; u32 = (hi << 10 | lo) + SRG_BASE; @@ -297,7 +289,6 @@ done: _citrus_UTF7_init_state(ei, psenc); } else { *nresult = siz; - psenc->surrogate = 0; } return (err); } @@ -396,7 +387,7 @@ _citrus_UTF7_put_state_reset(_UTF7Encodi { int bits, pos; - if (psenc->chlen != 0 || psenc->bits > BASE64_BIT || psenc->surrogate) + if (psenc->chlen != 0 || psenc->bits > BASE64_BIT) return (EINVAL); if (psenc->mode) { From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 13:07:24 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3ECB6CEF; Tue, 2 Jun 2015 13:07:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2099210C0; Tue, 2 Jun 2015 13:07:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52D7Ose006294; Tue, 2 Jun 2015 13:07:24 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52D7Nun006291; Tue, 2 Jun 2015 13:07:23 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021307.t52D7Nun006291@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 13:07: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: r283909 - stable/10/usr.bin/gcore 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 13:07:24 -0000 Author: jhb Date: Tue Jun 2 13:07:22 2015 New Revision: 283909 URL: https://svnweb.freebsd.org/changeset/base/283909 Log: MFC 269128: Create 32-bit core files for 32-bit processes on 64-bit machines. The 64-bit machine supported right now is amd64, but it's not too hard to add powerpc64. Added: stable/10/usr.bin/gcore/elf32core.c - copied unchanged from r269128, head/usr.bin/gcore/elf32core.c Modified: stable/10/usr.bin/gcore/Makefile stable/10/usr.bin/gcore/elfcore.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/gcore/Makefile ============================================================================== --- stable/10/usr.bin/gcore/Makefile Tue Jun 2 09:42:00 2015 (r283908) +++ stable/10/usr.bin/gcore/Makefile Tue Jun 2 13:07:22 2015 (r283909) @@ -6,6 +6,10 @@ SRCS= elfcore.c gcore.c DPADD= ${LIBSBUF} ${LIBUTIL} LDADD= -lsbuf -lutil +.if ${MACHINE_ARCH} == "amd64" +SRCS+= elf32core.c +.endif + WARNS?= 1 .include Copied: stable/10/usr.bin/gcore/elf32core.c (from r269128, head/usr.bin/gcore/elf32core.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.bin/gcore/elf32core.c Tue Jun 2 13:07:22 2015 (r283909, copy of r269128, head/usr.bin/gcore/elf32core.c) @@ -0,0 +1,66 @@ +/* $FreeBSD$ */ +#ifndef __LP64__ +#error "this file must be compiled for LP64." +#endif + +#define __ELF_WORD_SIZE 32 +#define _MACHINE_ELF_WANT_32BIT + +#include + +struct prpsinfo32 { + int pr_version; + u_int pr_psinfosz; + char pr_fname[PRFNAMESZ+1]; + char pr_psargs[PRARGSZ+1]; +}; + +struct prstatus32 { + int pr_version; + u_int pr_statussz; + u_int pr_gregsetsz; + u_int pr_fpregsetsz; + int pr_osreldate; + int pr_cursig; + pid_t pr_pid; + struct reg32 pr_reg; +}; + +#define ELFCORE_COMPAT_32 1 +#include "elfcore.c" + +static void +elf_convert_gregset(elfcore_gregset_t *rd, struct reg *rs) +{ +#ifdef __amd64__ + rd->r_gs = rs->r_gs; + rd->r_fs = rs->r_fs; + rd->r_es = rs->r_es; + rd->r_ds = rs->r_ds; + rd->r_edi = rs->r_rdi; + rd->r_esi = rs->r_rsi; + rd->r_ebp = rs->r_rbp; + rd->r_ebx = rs->r_rbx; + rd->r_edx = rs->r_rdx; + rd->r_ecx = rs->r_rcx; + rd->r_eax = rs->r_rax; + rd->r_eip = rs->r_rip; + rd->r_cs = rs->r_cs; + rd->r_eflags = rs->r_rflags; + rd->r_esp = rs->r_rsp; + rd->r_ss = rs->r_ss; +#else +#error Unsupported architecture +#endif +} + +static void +elf_convert_fpregset(elfcore_fpregset_t *rd, struct fpreg *rs) +{ +#ifdef __amd64__ + /* XXX this is wrong... */ + memcpy(rd, rs, sizeof(*rd)); +#else +#error Unsupported architecture +#endif +} Modified: stable/10/usr.bin/gcore/elfcore.c ============================================================================== --- stable/10/usr.bin/gcore/elfcore.c Tue Jun 2 09:42:00 2015 (r283908) +++ stable/10/usr.bin/gcore/elfcore.c Tue Jun 2 13:07:22 2015 (r283909) @@ -28,6 +28,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include @@ -74,6 +75,22 @@ struct sseg_closure { size_t size; /* Total size of all writable segments. */ }; +#ifdef ELFCORE_COMPAT_32 +typedef struct fpreg32 elfcore_fpregset_t; +typedef struct reg32 elfcore_gregset_t; +typedef struct prpsinfo32 elfcore_prpsinfo_t; +typedef struct prstatus32 elfcore_prstatus_t; +static void elf_convert_gregset(elfcore_gregset_t *rd, struct reg *rs); +static void elf_convert_fpregset(elfcore_fpregset_t *rd, struct fpreg *rs); +#else +typedef fpregset_t elfcore_fpregset_t; +typedef gregset_t elfcore_gregset_t; +typedef prpsinfo_t elfcore_prpsinfo_t; +typedef prstatus_t elfcore_prstatus_t; +#define elf_convert_gregset(d,s) *d = *s +#define elf_convert_fpregset(d,s) *d = *s +#endif + typedef void* (*notefunc_t)(void *, size_t *); static void cb_put_phdr(vm_map_entry_t, void *); @@ -112,13 +129,28 @@ elf_ident(int efd, pid_t pid __unused, c { Elf_Ehdr hdr; int cnt; + uint16_t machine; cnt = read(efd, &hdr, sizeof(hdr)); if (cnt != sizeof(hdr)) return (0); - if (IS_ELF(hdr)) - return (1); - return (0); + if (!IS_ELF(hdr)) + return (0); + switch (hdr.e_ident[EI_DATA]) { + case ELFDATA2LSB: + machine = le16toh(hdr.e_machine); + break; + case ELFDATA2MSB: + machine = be16toh(hdr.e_machine); + break; + default: + return (0); + } + if (!ELF_MACHINE_OK(machine)) + return (0); + + /* Looks good. */ + return (1); } static void @@ -198,7 +230,7 @@ elf_coredump(int efd __unused, int fd, p uintmax_t nleft = php->p_filesz; iorequest.piod_op = PIOD_READ_D; - iorequest.piod_offs = (caddr_t)php->p_vaddr; + iorequest.piod_offs = (caddr_t)(uintptr_t)php->p_vaddr; while (nleft > 0) { char buf[8*1024]; size_t nwant; @@ -318,6 +350,7 @@ elf_putnotes(pid_t pid, struct sbuf *sb, #endif } +#ifndef ELFCORE_COMPAT_32 elf_putnote(NT_PROCSTAT_PROC, elf_note_procstat_proc, &pid, sb); elf_putnote(NT_PROCSTAT_FILES, elf_note_procstat_files, &pid, sb); elf_putnote(NT_PROCSTAT_VMMAP, elf_note_procstat_vmmap, &pid, sb); @@ -328,6 +361,7 @@ elf_putnotes(pid_t pid, struct sbuf *sb, elf_putnote(NT_PROCSTAT_PSSTRINGS, elf_note_procstat_psstrings, &pid, sb); elf_putnote(NT_PROCSTAT_AUXV, elf_note_procstat_auxv, &pid, sb); +#endif size = sbuf_end_section(sb, old_len, 1, 0); if (size == -1) @@ -499,7 +533,7 @@ static void * elf_note_prpsinfo(void *arg, size_t *sizep) { pid_t pid; - prpsinfo_t *psinfo; + elfcore_prpsinfo_t *psinfo; struct kinfo_proc kip; size_t len; int name[4]; @@ -509,7 +543,7 @@ elf_note_prpsinfo(void *arg, size_t *siz if (psinfo == NULL) errx(1, "out of memory"); psinfo->pr_version = PRPSINFO_VERSION; - psinfo->pr_psinfosz = sizeof(prpsinfo_t); + psinfo->pr_psinfosz = sizeof(*psinfo); name[0] = CTL_KERN; name[1] = KERN_PROC; @@ -531,19 +565,21 @@ static void * elf_note_prstatus(void *arg, size_t *sizep) { lwpid_t tid; - prstatus_t *status; + elfcore_prstatus_t *status; + struct reg greg; tid = *(lwpid_t *)arg; status = calloc(1, sizeof(*status)); if (status == NULL) errx(1, "out of memory"); status->pr_version = PRSTATUS_VERSION; - status->pr_statussz = sizeof(prstatus_t); - status->pr_gregsetsz = sizeof(gregset_t); - status->pr_fpregsetsz = sizeof(fpregset_t); + status->pr_statussz = sizeof(*status); + status->pr_gregsetsz = sizeof(elfcore_gregset_t); + status->pr_fpregsetsz = sizeof(elfcore_fpregset_t); status->pr_osreldate = __FreeBSD_version; status->pr_pid = tid; - ptrace(PT_GETREGS, tid, (void *)&status->pr_reg, 0); + ptrace(PT_GETREGS, tid, (void *)&greg, 0); + elf_convert_gregset(&status->pr_reg, &greg); *sizep = sizeof(*status); return (status); @@ -553,13 +589,15 @@ static void * elf_note_fpregset(void *arg, size_t *sizep) { lwpid_t tid; - prfpregset_t *fpregset; + elfcore_fpregset_t *fpregset; + fpregset_t fpreg; tid = *(lwpid_t *)arg; fpregset = calloc(1, sizeof(*fpregset)); if (fpregset == NULL) errx(1, "out of memory"); - ptrace(PT_GETFPREGS, tid, (void *)fpregset, 0); + ptrace(PT_GETFPREGS, tid, (void *)&fpreg, 0); + elf_convert_fpregset(fpregset, &fpreg); *sizep = sizeof(*fpregset); return (fpregset); @@ -736,5 +774,5 @@ elf_note_procstat_rlimit(void *arg, size return (buf); } -struct dumpers elfdump = { elf_ident, elf_coredump }; -TEXT_SET(dumpset, elfdump); +struct dumpers __elfN(dump) = { elf_ident, elf_coredump }; +TEXT_SET(dumpset, __elfN(dump)); From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 14:54:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9866FE90; Tue, 2 Jun 2015 14:54:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 845511CE3; Tue, 2 Jun 2015 14:54:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52EsuN5061549; Tue, 2 Jun 2015 14:54:56 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52EssdH061540; Tue, 2 Jun 2015 14:54:54 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021454.t52EssdH061540@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 14:54:54 +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: r283910 - in stable/10: sys/compat/freebsd32 sys/ia64/include sys/mips/include sys/powerpc/include sys/sparc64/include sys/sys sys/x86/include usr.bin/gcore 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 14:54:56 -0000 Author: jhb Date: Tue Jun 2 14:54:53 2015 New Revision: 283910 URL: https://svnweb.freebsd.org/changeset/base/283910 Log: MFC 281266: Move the 32-bit compatible procfs types from freebsd32.h to and export them to userland. - Define __HAVE_REG32 on platforms that define a reg32 structure and check for this in to control when to export prstatus32, etc. - Add prstatus32_t and prpsinfo32_t typedefs for the 32-bit structures. libbfd looks for these types, and having them fixes 'gcore' in gdb of a 32-bit process on a 64-bit platform. - Use the structure definitions from in gcore's elf32 core dump code instead of duplicating the definitions. Modified: stable/10/sys/compat/freebsd32/freebsd32.h stable/10/sys/ia64/include/reg.h stable/10/sys/mips/include/reg.h stable/10/sys/powerpc/include/reg.h stable/10/sys/sparc64/include/reg.h stable/10/sys/sys/procfs.h stable/10/sys/x86/include/reg.h stable/10/usr.bin/gcore/elf32core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/freebsd32/freebsd32.h ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32.h Tue Jun 2 13:07:22 2015 (r283909) +++ stable/10/sys/compat/freebsd32/freebsd32.h Tue Jun 2 14:54:53 2015 (r283910) @@ -243,32 +243,6 @@ struct i386_ldt_args32 { uint32_t num; }; -/* - * Alternative layouts for - */ -struct prstatus32 { - int pr_version; - u_int pr_statussz; - u_int pr_gregsetsz; - u_int pr_fpregsetsz; - int pr_osreldate; - int pr_cursig; - pid_t pr_pid; - struct reg32 pr_reg; -}; - -struct prpsinfo32 { - int pr_version; - u_int pr_psinfosz; - char pr_fname[PRFNAMESZ+1]; - char pr_psargs[PRARGSZ+1]; -}; - -struct thrmisc32 { - char pr_tname[MAXCOMLEN+1]; - u_int _pad; -}; - struct mq_attr32 { int mq_flags; int mq_maxmsg; Modified: stable/10/sys/ia64/include/reg.h ============================================================================== --- stable/10/sys/ia64/include/reg.h Tue Jun 2 13:07:22 2015 (r283909) +++ stable/10/sys/ia64/include/reg.h Tue Jun 2 14:54:53 2015 (r283910) @@ -81,6 +81,8 @@ struct dbreg { unsigned long dbr_inst[8]; }; +#define __HAVE_REG32 + #ifdef _KERNEL struct thread; Modified: stable/10/sys/mips/include/reg.h ============================================================================== --- stable/10/sys/mips/include/reg.h Tue Jun 2 13:07:22 2015 (r283909) +++ stable/10/sys/mips/include/reg.h Tue Jun 2 14:54:53 2015 (r283910) @@ -70,7 +70,7 @@ struct dbreg { unsigned long junk; }; -#ifdef COMPAT_FREEBSD32 +#ifdef __LP64__ /* Must match struct trapframe */ struct reg32 { uint32_t r_regs[NUMSAVEREGS]; @@ -83,6 +83,8 @@ struct fpreg32 { struct dbreg32 { uint32_t junk; }; + +#define __HAVE_REG32 #endif #ifdef _KERNEL Modified: stable/10/sys/powerpc/include/reg.h ============================================================================== --- stable/10/sys/powerpc/include/reg.h Tue Jun 2 13:07:22 2015 (r283909) +++ stable/10/sys/powerpc/include/reg.h Tue Jun 2 14:54:53 2015 (r283910) @@ -28,7 +28,7 @@ struct dbreg { unsigned int junk; }; -#ifdef COMPAT_FREEBSD32 +#ifdef __LP64__ /* Must match struct trapframe */ struct reg32 { int32_t fixreg[32]; @@ -46,6 +46,8 @@ struct fpreg32 { struct dbreg32 { struct dbreg data; }; + +#define __HAVE_REG32 #endif #ifdef _KERNEL Modified: stable/10/sys/sparc64/include/reg.h ============================================================================== --- stable/10/sys/sparc64/include/reg.h Tue Jun 2 13:07:22 2015 (r283909) +++ stable/10/sys/sparc64/include/reg.h Tue Jun 2 14:54:53 2015 (r283910) @@ -98,6 +98,12 @@ struct dbreg { int dummy; }; +/* + * NB: sparcv8 binaries are not supported even though this header + * defines the relevant structures. + */ +#define __HAVE_REG32 + #ifdef _KERNEL /* * XXX these interfaces are MI, so they should be declared in a MI place. Modified: stable/10/sys/sys/procfs.h ============================================================================== --- stable/10/sys/sys/procfs.h Tue Jun 2 13:07:22 2015 (r283909) +++ stable/10/sys/sys/procfs.h Tue Jun 2 14:54:53 2015 (r283910) @@ -89,4 +89,29 @@ typedef struct thrmisc { typedef uint64_t psaddr_t; /* An address in the target process. */ +#ifdef __HAVE_REG32 +typedef struct prstatus32 { + int32_t pr_version; + uint32_t pr_statussz; + uint32_t pr_gregsetsz; + uint32_t pr_fpregsetsz; + int32_t pr_osreldate; + int32_t pr_cursig; + int32_t pr_pid; + struct reg32 pr_reg; +} prstatus32_t; + +typedef struct prpsinfo32 { + int32_t pr_version; + uint32_t pr_psinfosz; + char pr_fname[PRFNAMESZ+1]; + char pr_psargs[PRARGSZ+1]; +} prpsinfo32_t; + +struct thrmisc32 { + char pr_tname[MAXCOMLEN+1]; + uint32_t _pad; +}; +#endif /* __HAVE_REG32 */ + #endif /* _SYS_PROCFS_H_ */ Modified: stable/10/sys/x86/include/reg.h ============================================================================== --- stable/10/sys/x86/include/reg.h Tue Jun 2 13:07:22 2015 (r283909) +++ stable/10/sys/x86/include/reg.h Tue Jun 2 14:54:53 2015 (r283910) @@ -91,6 +91,7 @@ #define __fpreg64 fpreg #define __dbreg32 dbreg32 #define __dbreg64 dbreg +#define __HAVE_REG32 #endif /* Modified: stable/10/usr.bin/gcore/elf32core.c ============================================================================== --- stable/10/usr.bin/gcore/elf32core.c Tue Jun 2 13:07:22 2015 (r283909) +++ stable/10/usr.bin/gcore/elf32core.c Tue Jun 2 14:54:53 2015 (r283910) @@ -8,24 +8,6 @@ #include -struct prpsinfo32 { - int pr_version; - u_int pr_psinfosz; - char pr_fname[PRFNAMESZ+1]; - char pr_psargs[PRARGSZ+1]; -}; - -struct prstatus32 { - int pr_version; - u_int pr_statussz; - u_int pr_gregsetsz; - u_int pr_fpregsetsz; - int pr_osreldate; - int pr_cursig; - pid_t pr_pid; - struct reg32 pr_reg; -}; - #define ELFCORE_COMPAT_32 1 #include "elfcore.c" From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 14:55:56 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0BB09FED; Tue, 2 Jun 2015 14:55:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDC401CF0; Tue, 2 Jun 2015 14:55:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52EttNL061820; Tue, 2 Jun 2015 14:55:55 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52EttKe061819; Tue, 2 Jun 2015 14:55:55 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021455.t52EttKe061819@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 14:55: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: r283911 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 14:55:56 -0000 Author: jhb Date: Tue Jun 2 14:55:55 2015 New Revision: 283911 URL: https://svnweb.freebsd.org/changeset/base/283911 Log: MFC 281601: Remove THRMISC_VERSION. The thrmisc structure doesn't include a version number, so this wasn't used (and can't easily be added). If at some point we want to extend thrmisc, we will probably need to just add a new note type and ensure that the new type includes a version number. Modified: stable/10/sys/sys/procfs.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/procfs.h ============================================================================== --- stable/10/sys/sys/procfs.h Tue Jun 2 14:54:53 2015 (r283910) +++ stable/10/sys/sys/procfs.h Tue Jun 2 14:55:55 2015 (r283911) @@ -80,8 +80,6 @@ typedef struct prpsinfo { char pr_psargs[PRARGSZ+1]; /* Arguments, null terminated (1) */ } prpsinfo_t; -#define THRMISC_VERSION 1 /* Current version of thrmisc_t */ - typedef struct thrmisc { char pr_tname[MAXCOMLEN+1]; /* Thread name, null terminated (1) */ u_int _pad; /* Convenience pad, 0-filled (1) */ From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 15:02:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23FD9629; Tue, 2 Jun 2015 15:02:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12CD11F5D; Tue, 2 Jun 2015 15:02:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52F2UPv066945; Tue, 2 Jun 2015 15:02:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52F2UGg066944; Tue, 2 Jun 2015 15:02:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201506021502.t52F2UGg066944@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 2 Jun 2015 15:02:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283913 - head/release/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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 15:02:31 -0000 Author: gjb Date: Tue Jun 2 15:02:30 2015 New Revision: 283913 URL: https://svnweb.freebsd.org/changeset/base/283913 Log: Pass the '-b' argument to pw(8) so the '/home' directory is created in the correct place. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/tools/arm.subr Modified: head/release/tools/arm.subr ============================================================================== --- head/release/tools/arm.subr Tue Jun 2 15:02:28 2015 (r283912) +++ head/release/tools/arm.subr Tue Jun 2 15:02:30 2015 (r283913) @@ -85,7 +85,8 @@ arm_create_user() { chroot ${CHROOTDIR} /usr/sbin/pw -V ${DESTDIR}/etc \ useradd freebsd \ -m -M 0755 -w yes -n freebsd -u 1001 -g 1001 -G 0 \ - -c 'FreeBSD User' -d '/home/freebsd' -s '/bin/csh' + -c 'FreeBSD User' -d '/home/freebsd' -s '/bin/csh' \ + -b "${DESTDIR}/home" chroot ${CHROOTDIR} /usr/sbin/pw -V ${DESTDIR}/etc \ usermod root -w yes From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 15:02:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89347626; Tue, 2 Jun 2015 15:02:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 764C81F59; Tue, 2 Jun 2015 15:02:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52F2TiJ066879; Tue, 2 Jun 2015 15:02:29 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52F2Td2066877; Tue, 2 Jun 2015 15:02:29 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021502.t52F2Td2066877@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 15:02:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283912 - in stable: 10/lib/libc/sys 8/lib/libc/sys 9/lib/libc/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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 15:02:29 -0000 Author: jhb Date: Tue Jun 2 15:02:28 2015 New Revision: 283912 URL: https://svnweb.freebsd.org/changeset/base/283912 Log: MFC 281170: vfork() first appeared in 3BSD which pre-dates 2.9BSD. Verified via the copy of 3BSD on disc 1 of "The CSRG Archives". PR: 198612 Modified: stable/10/lib/libc/sys/vfork.2 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/8/lib/libc/sys/vfork.2 stable/9/lib/libc/sys/vfork.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/10/lib/libc/sys/vfork.2 ============================================================================== --- stable/10/lib/libc/sys/vfork.2 Tue Jun 2 14:55:55 2015 (r283911) +++ stable/10/lib/libc/sys/vfork.2 Tue Jun 2 15:02:28 2015 (r283912) @@ -28,7 +28,7 @@ .\" @(#)vfork.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd November 13, 2009 +.Dd April 6, 2015 .Dt VFORK 2 .Os .Sh NAME @@ -111,7 +111,7 @@ Same as for The .Fn vfork system call appeared in -.Bx 2.9 . +.Bx 3 . .Sh BUGS To avoid a possible deadlock situation, processes that are children in the middle From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 15:02:30 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F94F627; Tue, 2 Jun 2015 15:02:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D43A1F5A; Tue, 2 Jun 2015 15:02:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52F2TVA066899; Tue, 2 Jun 2015 15:02:29 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52F2TNB066898; Tue, 2 Jun 2015 15:02:29 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021502.t52F2TNB066898@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 15:02:29 +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: r283912 - in stable: 10/lib/libc/sys 8/lib/libc/sys 9/lib/libc/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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 15:02:30 -0000 Author: jhb Date: Tue Jun 2 15:02:28 2015 New Revision: 283912 URL: https://svnweb.freebsd.org/changeset/base/283912 Log: MFC 281170: vfork() first appeared in 3BSD which pre-dates 2.9BSD. Verified via the copy of 3BSD on disc 1 of "The CSRG Archives". PR: 198612 Modified: stable/8/lib/libc/sys/vfork.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libc/sys/vfork.2 stable/9/lib/libc/sys/vfork.2 Directory Properties: stable/10/ (props changed) stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/sys/vfork.2 ============================================================================== --- stable/8/lib/libc/sys/vfork.2 Tue Jun 2 14:55:55 2015 (r283911) +++ stable/8/lib/libc/sys/vfork.2 Tue Jun 2 15:02:28 2015 (r283912) @@ -28,7 +28,7 @@ .\" @(#)vfork.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd November 13, 2009 +.Dd April 6, 2015 .Dt VFORK 2 .Os .Sh NAME @@ -111,7 +111,7 @@ Same as for The .Fn vfork system call appeared in -.Bx 2.9 . +.Bx 3 . .Sh BUGS To avoid a possible deadlock situation, processes that are children in the middle From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 15:02:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAF80628; Tue, 2 Jun 2015 15:02:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8D771F5B; Tue, 2 Jun 2015 15:02:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52F2UDW066924; Tue, 2 Jun 2015 15:02:30 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52F2U8I066923; Tue, 2 Jun 2015 15:02:30 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021502.t52F2U8I066923@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 15:02:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r283912 - in stable: 10/lib/libc/sys 8/lib/libc/sys 9/lib/libc/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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 15:02:31 -0000 Author: jhb Date: Tue Jun 2 15:02:28 2015 New Revision: 283912 URL: https://svnweb.freebsd.org/changeset/base/283912 Log: MFC 281170: vfork() first appeared in 3BSD which pre-dates 2.9BSD. Verified via the copy of 3BSD on disc 1 of "The CSRG Archives". PR: 198612 Modified: stable/9/lib/libc/sys/vfork.2 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libc/sys/vfork.2 stable/8/lib/libc/sys/vfork.2 Directory Properties: stable/10/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/9/lib/libc/sys/vfork.2 ============================================================================== --- stable/9/lib/libc/sys/vfork.2 Tue Jun 2 14:55:55 2015 (r283911) +++ stable/9/lib/libc/sys/vfork.2 Tue Jun 2 15:02:28 2015 (r283912) @@ -28,7 +28,7 @@ .\" @(#)vfork.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd November 13, 2009 +.Dd April 6, 2015 .Dt VFORK 2 .Os .Sh NAME @@ -111,7 +111,7 @@ Same as for The .Fn vfork system call appeared in -.Bx 2.9 . +.Bx 3 . .Sh BUGS To avoid a possible deadlock situation, processes that are children in the middle From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 15:07:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC66AE55; Tue, 2 Jun 2015 15:07:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AABA11FCE; Tue, 2 Jun 2015 15:07:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52F762j067724; Tue, 2 Jun 2015 15:07:06 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52F76pV067723; Tue, 2 Jun 2015 15:07:06 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021507.t52F76pV067723@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 15:07:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283914 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 15:07:06 -0000 Author: jhb Date: Tue Jun 2 15:07:06 2015 New Revision: 283914 URL: https://svnweb.freebsd.org/changeset/base/283914 Log: MFC 282552: Remove the note about seekdir() removing telldir() cookies. That was removed back in r269204. Modified: stable/10/lib/libc/gen/directory.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/directory.3 ============================================================================== --- stable/10/lib/libc/gen/directory.3 Tue Jun 2 15:02:30 2015 (r283913) +++ stable/10/lib/libc/gen/directory.3 Tue Jun 2 15:07:06 2015 (r283914) @@ -28,7 +28,7 @@ .\" @(#)directory.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 28, 2014 +.Dd May 6, 2015 .Dt DIRECTORY 3 .Os .Sh NAME @@ -263,12 +263,6 @@ function appeared in function appeared in .Fx 10.0 . .Sh BUGS -The invalidation of -.Fn telldir -tokens when calling -.Fn seekdir -is non-standard. This is a compile time option. -.Pp The behaviour of .Fn telldir and From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 15:09:34 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20FD814A; Tue, 2 Jun 2015 15:09:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F0841005; Tue, 2 Jun 2015 15:09:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52F9Xoh068122; Tue, 2 Jun 2015 15:09:33 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52F9X3p068121; Tue, 2 Jun 2015 15:09:33 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021509.t52F9X3p068121@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 15:09: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: r283915 - stable/10/lib/libc/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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 15:09:34 -0000 Author: jhb Date: Tue Jun 2 15:09:33 2015 New Revision: 283915 URL: https://svnweb.freebsd.org/changeset/base/283915 Log: MFC 282416: Partially revert r255486, the first argument to socketpair() is a socket domain, not a file descriptor. Use 'domain' instead of the original 'd' for this argument to match socket(2). PR: 199491 Modified: stable/10/lib/libc/sys/socketpair.2 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/socketpair.2 ============================================================================== --- stable/10/lib/libc/sys/socketpair.2 Tue Jun 2 15:07:06 2015 (r283914) +++ stable/10/lib/libc/sys/socketpair.2 Tue Jun 2 15:09:33 2015 (r283915) @@ -28,7 +28,7 @@ .\" @(#)socketpair.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 11, 2013 +.Dd May 4, 2015 .Dt SOCKETPAIR 2 .Os .Sh NAME @@ -40,13 +40,13 @@ .In sys/types.h .In sys/socket.h .Ft int -.Fn socketpair "int fd" "int type" "int protocol" "int *sv" +.Fn socketpair "int domain" "int type" "int protocol" "int *sv" .Sh DESCRIPTION The .Fn socketpair system call creates an unnamed pair of connected sockets in -the specified domain -.Fa fd , +the specified communications +.Fa domain , of the specified .Fa type , and using the optionally specified From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 15:12:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 343AF4DE; Tue, 2 Jun 2015 15:12:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16A2C122E; Tue, 2 Jun 2015 15:12:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52FCXL2072510; Tue, 2 Jun 2015 15:12:33 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52FCXId072509; Tue, 2 Jun 2015 15:12:33 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021512.t52FCXId072509@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 15:12: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: r283916 - in stable: 10/lib/libc/sys 8/lib/libc/sys 9/lib/libc/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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 15:12:34 -0000 Author: jhb Date: Tue Jun 2 15:12:33 2015 New Revision: 283916 URL: https://svnweb.freebsd.org/changeset/base/283916 Log: MFC 282417: Various updates to the ftruncate(2) documentation: - Note that ftruncate(2) can operate on shared memory objects and cross reference shm_open(2). - Note that ftruncate(2) does not change the file position pointer (aka seek pointer) of the file descriptor. - ftruncate(2) will fail with EINVAL for all sorts of other fd types than just sockets, so instead note that it fails for all but regular files and shared memory objects. - Note that ftruncate(2) also appeared in 4.2BSD along with truncate(2). (Or at least the manpage for both appeared in 4.2, I did not check the kernel code itself to see if either predated 4.2.) PR: 199472 Modified: stable/10/lib/libc/sys/truncate.2 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/8/lib/libc/sys/truncate.2 stable/9/lib/libc/sys/truncate.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/10/lib/libc/sys/truncate.2 ============================================================================== --- stable/10/lib/libc/sys/truncate.2 Tue Jun 2 15:09:33 2015 (r283915) +++ stable/10/lib/libc/sys/truncate.2 Tue Jun 2 15:12:33 2015 (r283916) @@ -28,7 +28,7 @@ .\" @(#)truncate.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd December 13, 2006 +.Dd May 4, 2015 .Dt TRUNCATE 2 .Os .Sh NAME @@ -60,9 +60,18 @@ is lost. If the file was smaller than this size, it will be extended as if by writing bytes with the value zero. -With -.Fn ftruncate , -the file must be open for writing. +.Pp +The +.Fn ftruncate +system call causes the file or shared memory object backing the file descriptor +.Fa fd +to be truncated or extended to +.Fa length +bytes in size. +The file descriptor must be a valid file descriptor open for writing. +The file position pointer associated with the file descriptor +.Fa fd +will not be modified. .Sh RETURN VALUES .Rv -std If the file to be modified is not a directory or @@ -129,7 +138,7 @@ is not a valid descriptor. The .Fa fd argument -references a socket, not a file. +references a file descriptor that is not a regular file or shared memory object. .It Bq Er EINVAL The .Fa fd @@ -138,11 +147,14 @@ is not open for writing. .El .Sh SEE ALSO .Xr chflags 2 , -.Xr open 2 +.Xr open 2 , +.Xr shm_open 2 .Sh HISTORY The .Fn truncate -system call appeared in +and +.Fn ftruncate +system calls appeared in .Bx 4.2 . .Sh BUGS These calls should be generalized to allow ranges From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 15:12:34 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9BBC4DF; Tue, 2 Jun 2015 15:12:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAD77122F; Tue, 2 Jun 2015 15:12:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52FCYML072516; Tue, 2 Jun 2015 15:12:34 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52FCY7w072515; Tue, 2 Jun 2015 15:12:34 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021512.t52FCY7w072515@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 15:12: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: r283916 - in stable: 10/lib/libc/sys 8/lib/libc/sys 9/lib/libc/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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 15:12:35 -0000 Author: jhb Date: Tue Jun 2 15:12:33 2015 New Revision: 283916 URL: https://svnweb.freebsd.org/changeset/base/283916 Log: MFC 282417: Various updates to the ftruncate(2) documentation: - Note that ftruncate(2) can operate on shared memory objects and cross reference shm_open(2). - Note that ftruncate(2) does not change the file position pointer (aka seek pointer) of the file descriptor. - ftruncate(2) will fail with EINVAL for all sorts of other fd types than just sockets, so instead note that it fails for all but regular files and shared memory objects. - Note that ftruncate(2) also appeared in 4.2BSD along with truncate(2). (Or at least the manpage for both appeared in 4.2, I did not check the kernel code itself to see if either predated 4.2.) PR: 199472 Modified: stable/8/lib/libc/sys/truncate.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libc/sys/truncate.2 stable/9/lib/libc/sys/truncate.2 Directory Properties: stable/10/ (props changed) stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/sys/truncate.2 ============================================================================== --- stable/8/lib/libc/sys/truncate.2 Tue Jun 2 15:09:33 2015 (r283915) +++ stable/8/lib/libc/sys/truncate.2 Tue Jun 2 15:12:33 2015 (r283916) @@ -28,7 +28,7 @@ .\" @(#)truncate.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd December 13, 2006 +.Dd May 4, 2015 .Dt TRUNCATE 2 .Os .Sh NAME @@ -60,9 +60,18 @@ is lost. If the file was smaller than this size, it will be extended as if by writing bytes with the value zero. -With -.Fn ftruncate , -the file must be open for writing. +.Pp +The +.Fn ftruncate +system call causes the file or shared memory object backing the file descriptor +.Fa fd +to be truncated or extended to +.Fa length +bytes in size. +The file descriptor must be a valid file descriptor open for writing. +The file position pointer associated with the file descriptor +.Fa fd +will not be modified. .Sh RETURN VALUES .Rv -std If the file to be modified is not a directory or @@ -129,7 +138,7 @@ is not a valid descriptor. The .Fa fd argument -references a socket, not a file. +references a file descriptor that is not a regular file or shared memory object. .It Bq Er EINVAL The .Fa fd @@ -138,11 +147,14 @@ is not open for writing. .El .Sh SEE ALSO .Xr chflags 2 , -.Xr open 2 +.Xr open 2 , +.Xr shm_open 2 .Sh HISTORY The .Fn truncate -system call appeared in +and +.Fn ftruncate +system calls appeared in .Bx 4.2 . .Sh BUGS These calls should be generalized to allow ranges From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 15:12:35 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56C704E0; Tue, 2 Jun 2015 15:12:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 380371230; Tue, 2 Jun 2015 15:12:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52FCZjZ072524; Tue, 2 Jun 2015 15:12:35 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52FCZjf072523; Tue, 2 Jun 2015 15:12:35 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021512.t52FCZjf072523@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 15:12: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: r283916 - in stable: 10/lib/libc/sys 8/lib/libc/sys 9/lib/libc/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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 15:12:35 -0000 Author: jhb Date: Tue Jun 2 15:12:33 2015 New Revision: 283916 URL: https://svnweb.freebsd.org/changeset/base/283916 Log: MFC 282417: Various updates to the ftruncate(2) documentation: - Note that ftruncate(2) can operate on shared memory objects and cross reference shm_open(2). - Note that ftruncate(2) does not change the file position pointer (aka seek pointer) of the file descriptor. - ftruncate(2) will fail with EINVAL for all sorts of other fd types than just sockets, so instead note that it fails for all but regular files and shared memory objects. - Note that ftruncate(2) also appeared in 4.2BSD along with truncate(2). (Or at least the manpage for both appeared in 4.2, I did not check the kernel code itself to see if either predated 4.2.) PR: 199472 Modified: stable/9/lib/libc/sys/truncate.2 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libc/sys/truncate.2 stable/8/lib/libc/sys/truncate.2 Directory Properties: stable/10/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/9/lib/libc/sys/truncate.2 ============================================================================== --- stable/9/lib/libc/sys/truncate.2 Tue Jun 2 15:09:33 2015 (r283915) +++ stable/9/lib/libc/sys/truncate.2 Tue Jun 2 15:12:33 2015 (r283916) @@ -28,7 +28,7 @@ .\" @(#)truncate.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd December 13, 2006 +.Dd May 4, 2015 .Dt TRUNCATE 2 .Os .Sh NAME @@ -60,9 +60,18 @@ is lost. If the file was smaller than this size, it will be extended as if by writing bytes with the value zero. -With -.Fn ftruncate , -the file must be open for writing. +.Pp +The +.Fn ftruncate +system call causes the file or shared memory object backing the file descriptor +.Fa fd +to be truncated or extended to +.Fa length +bytes in size. +The file descriptor must be a valid file descriptor open for writing. +The file position pointer associated with the file descriptor +.Fa fd +will not be modified. .Sh RETURN VALUES .Rv -std If the file to be modified is not a directory or @@ -129,7 +138,7 @@ is not a valid descriptor. The .Fa fd argument -references a socket, not a file. +references a file descriptor that is not a regular file or shared memory object. .It Bq Er EINVAL The .Fa fd @@ -138,11 +147,14 @@ is not open for writing. .El .Sh SEE ALSO .Xr chflags 2 , -.Xr open 2 +.Xr open 2 , +.Xr shm_open 2 .Sh HISTORY The .Fn truncate -system call appeared in +and +.Fn ftruncate +system calls appeared in .Bx 4.2 . .Sh BUGS These calls should be generalized to allow ranges From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 16:07:29 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9685319F; Tue, 2 Jun 2015 16:07:29 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A37113DA; Tue, 2 Jun 2015 16:07:29 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52G7TPS098656; Tue, 2 Jun 2015 16:07:29 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52G7TIk098655; Tue, 2 Jun 2015 16:07:29 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201506021607.t52G7TIk098655@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 2 Jun 2015 16:07:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283918 - head/sys/arm/broadcom/bcm2835 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 16:07:29 -0000 Author: ian Date: Tue Jun 2 16:07:28 2015 New Revision: 283918 URL: https://svnweb.freebsd.org/changeset/base/283918 Log: Add a missing wakeup when releasing ownership of the SPI hardware. Also, validate the chipselect parameter before grabbing ownership of the hardware, and report timeout errors after releasing it. PR: 200584 Modified: head/sys/arm/broadcom/bcm2835/bcm2835_spi.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_spi.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_spi.c Tue Jun 2 15:35:38 2015 (r283917) +++ head/sys/arm/broadcom/bcm2835/bcm2835_spi.c Tue Jun 2 16:07:28 2015 (r283918) @@ -427,6 +427,15 @@ bcm_spi_transfer(device_t dev, device_t KASSERT(cmd->tx_data_sz == cmd->rx_data_sz, ("TX/RX data sizes should be equal")); + /* Get the proper chip select for this child. */ + spibus_get_cs(child, &cs); + if (cs < 0 || cs > 2) { + device_printf(dev, + "Invalid chip select %d requested by %s\n", cs, + device_get_nameunit(child)); + return (EINVAL); + } + BCM_SPI_LOCK(sc); /* If the controller is in use wait until it is available. */ @@ -441,16 +450,6 @@ bcm_spi_transfer(device_t dev, device_t SPI_CS_CLEAR_RXFIFO | SPI_CS_CLEAR_TXFIFO, SPI_CS_CLEAR_RXFIFO | SPI_CS_CLEAR_TXFIFO); - /* Get the proper chip select for this child. */ - spibus_get_cs(child, &cs); - if (cs < 0 || cs > 2) { - device_printf(dev, - "Invalid chip select %d requested by %s\n", cs, - device_get_nameunit(child)); - BCM_SPI_UNLOCK(sc); - return (EINVAL); - } - /* Save a pointer to the SPI command. */ sc->sc_cmd = cmd; sc->sc_read = 0; @@ -471,8 +470,10 @@ bcm_spi_transfer(device_t dev, device_t /* Make sure the SPI engine and interrupts are disabled. */ bcm_spi_modifyreg(sc, SPI_CS, SPI_CS_TA | SPI_CS_INTR | SPI_CS_INTD, 0); - /* Clear the controller flags. */ + /* Release the controller and wakeup the next thread waiting for it. */ sc->sc_flags = 0; + wakeup_one(dev); + BCM_SPI_UNLOCK(sc); /* * Check for transfer timeout. The SPI controller doesn't @@ -483,8 +484,6 @@ bcm_spi_transfer(device_t dev, device_t err = EIO; } - BCM_SPI_UNLOCK(sc); - return (err); } From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 17:00:31 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3D23DE3; Tue, 2 Jun 2015 17:00:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1D351130; Tue, 2 Jun 2015 17:00:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52H0VSD023924; Tue, 2 Jun 2015 17:00:31 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52H0VFS023923; Tue, 2 Jun 2015 17:00:31 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201506021700.t52H0VFS023923@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 2 Jun 2015 17:00:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283919 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 17:00:31 -0000 Author: gjb Date: Tue Jun 2 17:00:31 2015 New Revision: 283919 URL: https://svnweb.freebsd.org/changeset/base/283919 Log: Remove trailing tabs to avoid spamming stdout with long lines. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.ec2 Modified: head/release/Makefile.ec2 ============================================================================== --- head/release/Makefile.ec2 Tue Jun 2 16:07:28 2015 (r283918) +++ head/release/Makefile.ec2 Tue Jun 2 17:00:31 2015 (r283919) @@ -51,9 +51,9 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL} @echo "--------------------------------------------------------------" @false .endif - /usr/local/bin/bsdec2-image-upload ${PUBLISH} \ - ${.OBJDIR}/ec2.raw \ - "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \ - "${TYPE} ${REVISION}-${BRANCH}-${TARGET}" \ + /usr/local/bin/bsdec2-image-upload ${PUBLISH} \ + ${.OBJDIR}/ec2.raw \ + "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \ + "${TYPE} ${REVISION}-${BRANCH}-${TARGET}" \ ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} @touch ${.TARGET} From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 17:03:32 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CCFEAF8F; Tue, 2 Jun 2015 17:03:32 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB1E31343; Tue, 2 Jun 2015 17:03:32 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52H3W23027905; Tue, 2 Jun 2015 17:03:32 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52H3WW0027904; Tue, 2 Jun 2015 17:03:32 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201506021703.t52H3WW0027904@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 2 Jun 2015 17:03:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283920 - head/release/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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 17:03:32 -0000 Author: gjb Date: Tue Jun 2 17:03:31 2015 New Revision: 283920 URL: https://svnweb.freebsd.org/changeset/base/283920 Log: Add a configuration file to support the Cubox/Hummingboard SoC. Sponsored by: The FreeBSD Foundation Added: head/release/arm/CUBOX-HUMMINGBOARD.conf (contents, props changed) Added: head/release/arm/CUBOX-HUMMINGBOARD.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/arm/CUBOX-HUMMINGBOARD.conf Tue Jun 2 17:03:31 2015 (r283920) @@ -0,0 +1,39 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +EMBEDDEDBUILD=1 +EMBEDDED_TARGET="arm" +EMBEDDED_TARGET_ARCH="armv6" +EMBEDDEDPORTS="sysutils/u-boot-cubox-hummingboard" +KERNEL="IMX6" +WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x11000000" +IMAGE_SIZE="1G" +PART_SCHEME="MBR" +FAT_SIZE="50m -b 16384" +FAT_TYPE="16" +MD_ARGS="-x 63 -y 255" +NODOC=1 +export BOARDNAME="CUBOX-HUMMINGBOARD" + +arm_install_uboot() { + UBOOT_DIR="/usr/local/share/u-boot/u-boot-cubox-hummingboard" + UBOOT_FILES="u-boot.imx" + FATMOUNT="${DESTDIR%${KERNEL}}/fat" + UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" + chroot ${CHROOTDIR} dd if=${UBOOT_DIR}/${UBOOT_FILES} \ + of=/dev/${mddev} bs=512 seek=2 + chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" + chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} + chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} + chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr ${FATMOUNT}/ubldr + chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot + sync + umount_loop ${CHROOTDIR}/${FATMOUNT} + umount_loop ${CHROOTDIR}/${UFSMOUNT} + chroot ${CHROOTDIR} rmdir ${FATMOUNT} + chroot ${CHROOTDIR} rmdir ${UFSMOUNT} + + return 0 +} From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 17:40:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D475709; Tue, 2 Jun 2015 17:40:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A5E21BBF; Tue, 2 Jun 2015 17:40:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52HerUT046357; Tue, 2 Jun 2015 17:40:53 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52Her4Q046356; Tue, 2 Jun 2015 17:40:53 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201506021740.t52Her4Q046356@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 2 Jun 2015 17:40:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283922 - head/sys/dev/usb/controller 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 17:40:53 -0000 Author: hselasky Date: Tue Jun 2 17:40:52 2015 New Revision: 283922 URL: https://svnweb.freebsd.org/changeset/base/283922 Log: Fix for control endpoint handling in the DWC OTG driver. The data stage processing is only allowed after the setup complete event has been received. Else a race may occur and the OUT data can be corrupted. While at it ensure resetting a FIFO has the required wait loop. MFC after: 3 days Modified: head/sys/dev/usb/controller/dwc_otg.c Modified: head/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.c Tue Jun 2 17:11:47 2015 (r283921) +++ head/sys/dev/usb/controller/dwc_otg.c Tue Jun 2 17:40:52 2015 (r283922) @@ -180,6 +180,22 @@ dwc_otg_get_hw_ep_profile(struct usb_dev *ppf = NULL; } +static void +dwc_otg_tx_fifo_reset(struct dwc_otg_softc *sc, uint32_t value) +{ + uint32_t temp; + + /* reset FIFO */ + DWC_OTG_WRITE_4(sc, DOTG_GRSTCTL, value); + + /* wait for reset to complete */ + for (temp = 0; temp != 16; temp++) { + value = DWC_OTG_READ_4(sc, DOTG_GRSTCTL); + if (!(value & (GRSTCTL_TXFFLSH | GRSTCTL_RXFFLSH))) + break; + } +} + static int dwc_otg_init_fifo(struct dwc_otg_softc *sc, uint8_t mode) { @@ -331,12 +347,11 @@ dwc_otg_init_fifo(struct dwc_otg_softc * } /* reset RX FIFO */ - DWC_OTG_WRITE_4(sc, DOTG_GRSTCTL, - GRSTCTL_RXFFLSH); + dwc_otg_tx_fifo_reset(sc, GRSTCTL_RXFFLSH); if (mode != DWC_MODE_OTG) { /* reset all TX FIFOs */ - DWC_OTG_WRITE_4(sc, DOTG_GRSTCTL, + dwc_otg_tx_fifo_reset(sc, GRSTCTL_TXFIFO(0x10) | GRSTCTL_TXFFLSH); } else { @@ -947,15 +962,21 @@ dwc_otg_setup_rx(struct dwc_otg_softc *s if (GRXSTSRD_CHNUM_GET(sc->sc_last_rx_status) != 0) goto not_complete; - if ((sc->sc_last_rx_status & GRXSTSRD_DPID_MASK) != - GRXSTSRD_DPID_DATA0) { + if ((sc->sc_last_rx_status & GRXSTSRD_PKTSTS_MASK) != + GRXSTSRD_STP_DATA) { + if ((sc->sc_last_rx_status & GRXSTSRD_PKTSTS_MASK) != + GRXSTSRD_STP_COMPLETE || td->remainder != 0) { + /* release FIFO */ + dwc_otg_common_rx_ack(sc); + goto not_complete; + } /* release FIFO */ dwc_otg_common_rx_ack(sc); - goto not_complete; + return (0); /* complete */ } - if ((sc->sc_last_rx_status & GRXSTSRD_PKTSTS_MASK) != - GRXSTSRD_STP_DATA) { + if ((sc->sc_last_rx_status & GRXSTSRD_DPID_MASK) != + GRXSTSRD_DPID_DATA0) { /* release FIFO */ dwc_otg_common_rx_ack(sc); goto not_complete; @@ -969,14 +990,6 @@ dwc_otg_setup_rx(struct dwc_otg_softc *s /* get the packet byte count */ count = GRXSTSRD_BCNT_GET(sc->sc_last_rx_status); - /* verify data length */ - if (count != td->remainder) { - DPRINTFN(0, "Invalid SETUP packet " - "length, %d bytes\n", count); - /* release FIFO */ - dwc_otg_common_rx_ack(sc); - goto not_complete; - } if (count != sizeof(req)) { DPRINTFN(0, "Unsupported SETUP packet " "length, %d bytes\n", count); @@ -1002,43 +1015,27 @@ dwc_otg_setup_rx(struct dwc_otg_softc *s } /* don't send any data by default */ - DWC_OTG_WRITE_4(sc, DOTG_DIEPTSIZ(0), - DXEPTSIZ_SET_NPKT(0) | - DXEPTSIZ_SET_NBYTES(0)); - - temp = sc->sc_in_ctl[0]; - - /* enable IN endpoint */ - DWC_OTG_WRITE_4(sc, DOTG_DIEPCTL(0), - temp | DIEPCTL_EPENA); - DWC_OTG_WRITE_4(sc, DOTG_DIEPCTL(0), - temp | DIEPCTL_SNAK); + DWC_OTG_WRITE_4(sc, DOTG_DIEPTSIZ(0), DIEPCTL_EPDIS); + DWC_OTG_WRITE_4(sc, DOTG_DOEPTSIZ(0), DOEPCTL_EPDIS); /* reset IN endpoint buffer */ - DWC_OTG_WRITE_4(sc, DOTG_GRSTCTL, + dwc_otg_tx_fifo_reset(sc, GRSTCTL_TXFIFO(0) | GRSTCTL_TXFFLSH); /* acknowledge RX status */ dwc_otg_common_rx_ack(sc); - return (0); /* complete */ + td->did_stall = 1; not_complete: /* abort any ongoing transfer, before enabling again */ - - temp = sc->sc_out_ctl[0]; - - temp |= DOEPCTL_EPENA | - DOEPCTL_SNAK; - - /* enable OUT endpoint */ - DWC_OTG_WRITE_4(sc, DOTG_DOEPCTL(0), temp); - if (!td->did_stall) { td->did_stall = 1; DPRINTFN(5, "stalling IN and OUT direction\n"); + temp = sc->sc_out_ctl[0]; + /* set stall after enabling endpoint */ DWC_OTG_WRITE_4(sc, DOTG_DOEPCTL(0), temp | DOEPCTL_STALL); @@ -1049,13 +1046,6 @@ not_complete: DWC_OTG_WRITE_4(sc, DOTG_DIEPCTL(0), temp | DIEPCTL_STALL); } - - /* setup number of buffers to receive */ - DWC_OTG_WRITE_4(sc, DOTG_DOEPTSIZ(0), - DXEPTSIZ_SET_MULTI(3) | - DXEPTSIZ_SET_NPKT(1) | - DXEPTSIZ_SET_NBYTES(sizeof(req))); - return (1); /* not complete */ } @@ -1499,7 +1489,9 @@ dwc_otg_data_rx(struct dwc_otg_softc *sc /* check for SETUP packet */ if ((sc->sc_last_rx_status & GRXSTSRD_PKTSTS_MASK) == - GRXSTSRD_STP_DATA) { + GRXSTSRD_STP_DATA || + (sc->sc_last_rx_status & GRXSTSRD_PKTSTS_MASK) == + GRXSTSRD_STP_COMPLETE) { if (td->remainder == 0) { /* * We are actually complete and have @@ -1584,15 +1576,10 @@ dwc_otg_data_rx(struct dwc_otg_softc *sc not_complete: - temp = sc->sc_out_ctl[td->ep_no]; - - temp |= DOEPCTL_EPENA | DOEPCTL_CNAK; - - DWC_OTG_WRITE_4(sc, DOTG_DOEPCTL(td->ep_no), temp); - /* enable SETUP and transfer complete interrupt */ if (td->ep_no == 0) { DWC_OTG_WRITE_4(sc, DOTG_DOEPTSIZ(0), + DXEPTSIZ_SET_MULTI(3) | DXEPTSIZ_SET_NPKT(1) | DXEPTSIZ_SET_NBYTES(td->max_packet_size)); } else { @@ -1601,8 +1588,12 @@ not_complete: DXEPTSIZ_SET_MULTI(1) | DXEPTSIZ_SET_NPKT(4) | DXEPTSIZ_SET_NBYTES(4 * - ((td->max_packet_size + 3) & ~3))); + ((td->max_packet_size + 3) & ~3))); } + temp = sc->sc_out_ctl[td->ep_no]; + DWC_OTG_WRITE_4(sc, DOTG_DOEPCTL(td->ep_no), temp | + DOEPCTL_EPENA | DOEPCTL_CNAK); + return (1); /* not complete */ } @@ -2004,7 +1995,9 @@ repeat: (GRXSTSRD_CHNUM_GET(temp) == 0)) { if ((temp & GRXSTSRD_PKTSTS_MASK) != - GRXSTSRD_STP_DATA) { + GRXSTSRD_STP_DATA && + (temp & GRXSTSRD_PKTSTS_MASK) != + GRXSTSRD_STP_COMPLETE) { /* dump data - wrong direction */ dwc_otg_common_rx_ack(sc); @@ -2209,7 +2202,9 @@ not_complete: (GRXSTSRD_CHNUM_GET(temp) == 0)) { if ((temp & GRXSTSRD_PKTSTS_MASK) == - GRXSTSRD_STP_DATA) { + GRXSTSRD_STP_DATA || + (temp & GRXSTSRD_PKTSTS_MASK) == + GRXSTSRD_STP_COMPLETE) { DPRINTFN(5, "faking complete\n"); /* * Race condition: We are complete! @@ -2634,6 +2629,7 @@ repeat: /* non-data messages we simply skip */ if (temp != GRXSTSRD_STP_DATA && + temp != GRXSTSRD_STP_COMPLETE && temp != GRXSTSRD_OUT_DATA) { dwc_otg_common_rx_ack(sc); goto repeat; @@ -3669,7 +3665,7 @@ dwc_otg_clear_stall_sub_locked(struct dw /* we only reset the transmit FIFO */ if (ep_dir) { - DWC_OTG_WRITE_4(sc, DOTG_GRSTCTL, + dwc_otg_tx_fifo_reset(sc, GRSTCTL_TXFIFO(ep_no) | GRSTCTL_TXFFLSH); From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 18:28:42 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD661732; Tue, 2 Jun 2015 18:28:42 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A33917CA; Tue, 2 Jun 2015 18:28:42 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52ISgtg069460; Tue, 2 Jun 2015 18:28:42 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52ISgFJ069457; Tue, 2 Jun 2015 18:28:42 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201506021828.t52ISgFJ069457@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 2 Jun 2015 18:28:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283923 - head/sys/dev/e1000 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 18:28:42 -0000 Author: sbruno Date: Tue Jun 2 18:28:41 2015 New Revision: 283923 URL: https://svnweb.freebsd.org/changeset/base/283923 Log: Simplify hang detection by stealing the techniques used in ixl(4) and applying them to em(4). Rely on iterations through the local timer, and the tx queue state to determine if an actual hang has occurred. Any time a descriptor is used (packet sent), the tx queue is flagged as busy. Then when txeof runs, it either clears the flag when all is clean, or resets it to 1 if ANY are cleaned, if nothing is cleaned it increments the flag. Local timer simply checks to see if busy ever reaches MAX (10, which is compile time configurable), and then sets it as HUNG, at that point there is one more timer cycle in which to have any cleans, if not a watchdog reset will occur. Differential Revision: https://reviews.freebsd.org/D2019 Submitted by: jfv Reviewed by: hiren Obtained from: Intel Corporation MFC after: 2 weeks Relnotes: Yes Sponsored by: Limelight Networks Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Tue Jun 2 17:40:52 2015 (r283922) +++ head/sys/dev/e1000/if_em.c Tue Jun 2 18:28:41 2015 (r283923) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2014, Intel Corporation + Copyright (c) 2001-2015, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -943,11 +943,9 @@ em_mq_start_locked(if_t ifp, struct tx_r break; } - if (enq > 0) { - /* Set the watchdog */ - txr->queue_status = EM_QUEUE_WORKING; - txr->watchdog_time = ticks; - } + /* Mark the queue as having work */ + if ((enq > 0) && (txr->busy == EM_TX_IDLE)) + txr->busy = EM_TX_BUSY; if (txr->tx_avail < EM_MAX_SCATTER) em_txeof(txr); @@ -1032,12 +1030,12 @@ em_start_locked(if_t ifp, struct tx_ring break; } + /* Mark the queue as having work */ + if (txr->busy == EM_TX_IDLE) + txr->busy = EM_TX_BUSY; + /* Send a copy of the frame to the BPF listener */ if_etherbpfmtap(ifp, m_head); - - /* Set timeout in case hardware has problems transmitting. */ - txr->watchdog_time = ticks; - txr->queue_status = EM_QUEUE_WORKING; } return; @@ -2102,8 +2100,6 @@ retry: */ tx_buffer = &txr->tx_buffers[first]; tx_buffer->next_eop = last; - /* Update the watchdog time early and often */ - txr->watchdog_time = ticks; /* * Advance the Transmit Descriptor Tail (TDT), this tells the E1000 @@ -2247,15 +2243,16 @@ em_local_timer(void *arg) ** and the HUNG state will be static if set. */ for (int i = 0; i < adapter->num_queues; i++, txr++) { - if ((txr->queue_status == EM_QUEUE_HUNG) && - (adapter->pause_frames == 0)) + /* Last cycle a queue was declared hung */ + if (txr->busy == EM_TX_HUNG) goto hung; + if (txr->busy >= EM_TX_MAXTRIES) + txr->busy = EM_TX_HUNG; /* Schedule a TX tasklet if needed */ if (txr->tx_avail <= EM_MAX_SCATTER) taskqueue_enqueue(txr->tq, &txr->tx_task); } - adapter->pause_frames = 0; callout_reset(&adapter->timer, hz, em_local_timer, adapter); #ifndef DEVICE_POLLING /* Trigger an RX interrupt to guarantee mbuf refresh */ @@ -2274,7 +2271,6 @@ hung: txr->me, txr->tx_avail, txr->next_to_clean); if_setdrvflagbits(ifp, 0, IFF_DRV_RUNNING); adapter->watchdog_events++; - adapter->pause_frames = 0; em_init_locked(adapter); } @@ -2343,9 +2339,9 @@ em_update_link_status(struct adapter *ad if (bootverbose) device_printf(dev, "Link is Down\n"); adapter->link_active = 0; - /* Link down, disable watchdog */ + /* Link down, disable hang detection */ for (int i = 0; i < adapter->num_queues; i++, txr++) - txr->queue_status = EM_QUEUE_IDLE; + txr->busy = EM_TX_IDLE; if_link_state_change(ifp, LINK_STATE_DOWN); } } @@ -2376,10 +2372,10 @@ em_stop(void *arg) /* Tell the stack that the interface is no longer active */ if_setdrvflagbits(ifp, IFF_DRV_OACTIVE, IFF_DRV_RUNNING); - /* Unarm watchdog timer. */ + /* Disarm Hang Detection. */ for (int i = 0; i < adapter->num_queues; i++, txr++) { EM_TX_LOCK(txr); - txr->queue_status = EM_QUEUE_IDLE; + txr->busy = EM_TX_IDLE; EM_TX_UNLOCK(txr); } @@ -3358,7 +3354,7 @@ em_setup_transmit_ring(struct tx_ring *t /* Set number of descriptors available */ txr->tx_avail = adapter->num_tx_desc; - txr->queue_status = EM_QUEUE_IDLE; + txr->busy = EM_TX_IDLE; /* Clear checksum offload context. */ txr->last_hw_offload = 0; @@ -3419,7 +3415,7 @@ em_initialize_transmit_unit(struct adapt E1000_READ_REG(&adapter->hw, E1000_TDBAL(i)), E1000_READ_REG(&adapter->hw, E1000_TDLEN(i))); - txr->queue_status = EM_QUEUE_IDLE; + txr->busy = EM_TX_IDLE; } /* Set the default values for the Tx Inter Packet Gap timer */ @@ -3802,9 +3798,9 @@ em_txeof(struct tx_ring *txr) return; #endif /* DEV_NETMAP */ - /* No work, make sure watchdog is off */ + /* No work, make sure hang detection is disabled */ if (txr->tx_avail == adapter->num_tx_desc) { - txr->queue_status = EM_QUEUE_IDLE; + txr->busy = EM_TX_IDLE; return; } @@ -3847,7 +3843,6 @@ em_txeof(struct tx_ring *txr) tx_buffer->m_head = NULL; } tx_buffer->next_eop = -1; - txr->watchdog_time = ticks; if (++first == adapter->num_tx_desc) first = 0; @@ -3872,14 +3867,16 @@ em_txeof(struct tx_ring *txr) txr->next_to_clean = first; /* - ** Watchdog calculation, we know there's - ** work outstanding or the first return - ** would have been taken, so none processed - ** for too long indicates a hang. local timer - ** will examine this and do a reset if needed. + ** Hang detection: we know there's work outstanding + ** or the entry return would have been taken, so no + ** descriptor processed here indicates a potential hang. + ** The local timer will examine this and do a reset if needed. */ - if ((!processed) && ((ticks - txr->watchdog_time) > EM_WATCHDOG)) - txr->queue_status = EM_QUEUE_HUNG; + if (processed == 0) { + if (txr->busy != EM_TX_HUNG) + ++txr->busy; + } else /* At least one descriptor was cleaned */ + txr->busy = EM_TX_BUSY; /* note this clears HUNG */ /* * If we have a minimum free, clear IFF_DRV_OACTIVE @@ -3891,10 +3888,9 @@ em_txeof(struct tx_ring *txr) if (txr->tx_avail >= EM_MAX_SCATTER) if_setdrvflagbits(ifp, 0, IFF_DRV_OACTIVE); - /* Disable watchdog if all clean */ - if (txr->tx_avail == adapter->num_tx_desc) { - txr->queue_status = EM_QUEUE_IDLE; - } + /* Disable hang detection if all clean */ + if (txr->tx_avail == adapter->num_tx_desc) + txr->busy = EM_TX_IDLE; } @@ -5130,12 +5126,7 @@ em_update_stats_counters(struct adapter adapter->stats.rlec += E1000_READ_REG(&adapter->hw, E1000_RLEC); adapter->stats.xonrxc += E1000_READ_REG(&adapter->hw, E1000_XONRXC); adapter->stats.xontxc += E1000_READ_REG(&adapter->hw, E1000_XONTXC); - /* - ** For watchdog management we need to know if we have been - ** paused during the last interval, so capture that here. - */ - adapter->pause_frames = E1000_READ_REG(&adapter->hw, E1000_XOFFRXC); - adapter->stats.xoffrxc += adapter->pause_frames; + adapter->stats.xoffrxc += E1000_READ_REG(&adapter->hw, E1000_XOFFRXC); adapter->stats.xofftxc += E1000_READ_REG(&adapter->hw, E1000_XOFFTXC); adapter->stats.fcruc += E1000_READ_REG(&adapter->hw, E1000_FCRUC); adapter->stats.prc64 += E1000_READ_REG(&adapter->hw, E1000_PRC64); @@ -5762,7 +5753,7 @@ em_print_debug_info(struct adapter *adap device_printf(dev, "hw rdh = %d, hw rdt = %d\n", E1000_READ_REG(&adapter->hw, E1000_RDH(0)), E1000_READ_REG(&adapter->hw, E1000_RDT(0))); - device_printf(dev, "Tx Queue Status = %d\n", txr->queue_status); + device_printf(dev, "Tx Queue Status = %d\n", txr->busy); device_printf(dev, "TX descriptors avail = %d\n", txr->tx_avail); device_printf(dev, "Tx Descriptors avail failure = %ld\n", Modified: head/sys/dev/e1000/if_em.h ============================================================================== --- head/sys/dev/e1000/if_em.h Tue Jun 2 17:40:52 2015 (r283922) +++ head/sys/dev/e1000/if_em.h Tue Jun 2 18:28:41 2015 (r283923) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2011, Intel Corporation + Copyright (c) 2001-2015, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -188,9 +188,19 @@ #define EM_EEPROM_APME 0x400; #define EM_82544_APME 0x0004; -#define EM_QUEUE_IDLE 0 -#define EM_QUEUE_WORKING 1 -#define EM_QUEUE_HUNG 2 +/* + * Driver state logic for the detection of a hung state + * in hardware. Set TX_HUNG whenever a TX packet is used + * (data is sent) and clear it when txeof() is invoked if + * any descriptors from the ring are cleaned/reclaimed. + * Increment internal counter if no descriptors are cleaned + * and compare to TX_MAXTRIES. When counter > TX_MAXTRIES, + * reset adapter. + */ +#define EM_TX_IDLE 0x00000000 +#define EM_TX_BUSY 0x00000001 +#define EM_TX_HUNG 0x80000000 +#define EM_TX_MAXTRIES 10 /* * TDBA/RDBA should be aligned on 16 byte boundary. But TDLEN/RDLEN should be @@ -281,8 +291,7 @@ struct tx_ring { u32 me; u32 msix; u32 ims; - int queue_status; - int watchdog_time; + int busy; struct em_dma_alloc txdma; struct e1000_tx_desc *tx_base; struct task tx_task; @@ -368,7 +377,6 @@ struct adapter { int if_flags; int max_frame_size; int min_frame_size; - int pause_frames; struct mtx core_mtx; int em_insert_vlan_header; u32 ims; From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 18:37:06 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFD449E0; Tue, 2 Jun 2015 18:37:06 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC64C1A00; Tue, 2 Jun 2015 18:37:06 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52Ib6Kg074330; Tue, 2 Jun 2015 18:37:06 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52Ib4UN074318; Tue, 2 Jun 2015 18:37:04 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201506021837.t52Ib4UN074318@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Tue, 2 Jun 2015 18:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283924 - in head/sys: compat/linprocfs dev/hwpmc fs/procfs 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 18:37:07 -0000 Author: vangyzen Date: Tue Jun 2 18:37:04 2015 New Revision: 283924 URL: https://svnweb.freebsd.org/changeset/base/283924 Log: Provide vnode in memory map info for files on tmpfs When providing memory map information to userland, populate the vnode pointer for tmpfs files. Set the memory mapping to appear as a vnode type, to match FreeBSD 9 behavior. This fixes the use of tmpfs files with the dtrace pid provider, procstat -v, procfs, linprocfs, pmc (pmcstat), and ptrace (PT_VM_ENTRY). Submitted by: Eric Badger (initial revision) Obtained from: Dell Inc. PR: 198431 MFC after: 2 weeks Reviewed by: jhb Approved by: kib (mentor) Modified: head/sys/compat/linprocfs/linprocfs.c head/sys/dev/hwpmc/hwpmc_mod.c head/sys/fs/procfs/procfs_map.c head/sys/kern/kern_proc.c head/sys/kern/sys_process.c head/sys/vm/vm_object.c head/sys/vm/vm_object.h Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Tue Jun 2 18:28:41 2015 (r283923) +++ head/sys/compat/linprocfs/linprocfs.c Tue Jun 2 18:37:04 2015 (r283924) @@ -1025,20 +1025,16 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) ino = 0; if (lobj) { off = IDX_TO_OFF(lobj->size); - if (lobj->type == OBJT_VNODE) { - vp = lobj->handle; - if (vp) - vref(vp); - } - else - vp = NULL; + vp = vm_object_vnode(lobj); + if (vp != NULL) + vref(vp); if (lobj != obj) VM_OBJECT_RUNLOCK(lobj); flags = obj->flags; ref_count = obj->ref_count; shadow_count = obj->shadow_count; VM_OBJECT_RUNLOCK(obj); - if (vp) { + if (vp != NULL) { vn_fullpath(td, vp, &name, &freename); vn_lock(vp, LK_SHARED | LK_RETRY); VOP_GETATTR(vp, &vat, td->td_ucred); Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Tue Jun 2 18:28:41 2015 (r283923) +++ head/sys/dev/hwpmc/hwpmc_mod.c Tue Jun 2 18:37:04 2015 (r283924) @@ -1655,7 +1655,8 @@ pmc_log_process_mappings(struct pmc_owne continue; } - if (lobj->type != OBJT_VNODE || lobj->handle == NULL) { + vp = vm_object_vnode(lobj); + if (vp == NULL) { if (lobj != obj) VM_OBJECT_RUNLOCK(lobj); VM_OBJECT_RUNLOCK(obj); @@ -1667,7 +1668,7 @@ pmc_log_process_mappings(struct pmc_owne * vnode, so we don't emit redundant MAP-IN * directives. */ - if (entry->start == last_end && lobj->handle == last_vp) { + if (entry->start == last_end && vp == last_vp) { last_end = entry->end; if (lobj != obj) VM_OBJECT_RUNLOCK(lobj); @@ -1690,7 +1691,6 @@ pmc_log_process_mappings(struct pmc_owne last_timestamp = map->timestamp; vm_map_unlock_read(map); - vp = lobj->handle; vref(vp); if (lobj != obj) VM_OBJECT_RUNLOCK(lobj); Modified: head/sys/fs/procfs/procfs_map.c ============================================================================== --- head/sys/fs/procfs/procfs_map.c Tue Jun 2 18:28:41 2015 (r283923) +++ head/sys/fs/procfs/procfs_map.c Tue Jun 2 18:37:04 2015 (r283924) @@ -159,11 +159,11 @@ procfs_doprocmap(PFS_FILL_ARGS) freepath = NULL; fullpath = "-"; if (lobj) { + vp = NULL; switch (lobj->type) { default: case OBJT_DEFAULT: type = "default"; - vp = NULL; break; case OBJT_VNODE: type = "vnode"; @@ -171,13 +171,19 @@ procfs_doprocmap(PFS_FILL_ARGS) vref(vp); break; case OBJT_SWAP: - type = "swap"; - vp = NULL; + if ((lobj->flags & OBJ_TMPFS_NODE) != 0) { + type = "vnode"; + if ((lobj->flags & OBJ_TMPFS) != 0) { + vp = lobj->un_pager.swp.swp_tmpfs; + vref(vp); + } + } else { + type = "swap"; + } break; case OBJT_SG: case OBJT_DEVICE: type = "device"; - vp = NULL; break; } if (lobj != obj) Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Tue Jun 2 18:28:41 2015 (r283923) +++ head/sys/kern/kern_proc.c Tue Jun 2 18:37:04 2015 (r283924) @@ -2113,7 +2113,15 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_A vref(vp); break; case OBJT_SWAP: - kve->kve_type = KVME_TYPE_SWAP; + if ((lobj->flags & OBJ_TMPFS_NODE) != 0) { + kve->kve_type = KVME_TYPE_VNODE; + if ((lobj->flags & OBJ_TMPFS) != 0) { + vp = lobj->un_pager.swp.swp_tmpfs; + vref(vp); + } + } else { + kve->kve_type = KVME_TYPE_SWAP; + } break; case OBJT_DEVICE: kve->kve_type = KVME_TYPE_DEVICE; @@ -2339,7 +2347,15 @@ kern_proc_vmmap_out(struct proc *p, stru vref(vp); break; case OBJT_SWAP: - kve->kve_type = KVME_TYPE_SWAP; + if ((lobj->flags & OBJ_TMPFS_NODE) != 0) { + kve->kve_type = KVME_TYPE_VNODE; + if ((lobj->flags & OBJ_TMPFS) != 0) { + vp = lobj->un_pager.swp.swp_tmpfs; + vref(vp); + } + } else { + kve->kve_type = KVME_TYPE_SWAP; + } break; case OBJT_DEVICE: kve->kve_type = KVME_TYPE_DEVICE; Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Tue Jun 2 18:28:41 2015 (r283923) +++ head/sys/kern/sys_process.c Tue Jun 2 18:37:04 2015 (r283924) @@ -402,7 +402,7 @@ ptrace_vm_entry(struct thread *td, struc lobj = tobj; pve->pve_offset += tobj->backing_object_offset; } - vp = (lobj->type == OBJT_VNODE) ? lobj->handle : NULL; + vp = vm_object_vnode(lobj); if (vp != NULL) vref(vp); if (lobj != obj) Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Tue Jun 2 18:28:41 2015 (r283923) +++ head/sys/vm/vm_object.c Tue Jun 2 18:37:04 2015 (r283924) @@ -2287,6 +2287,18 @@ next_page: } } +struct vnode * +vm_object_vnode(vm_object_t object) +{ + + VM_OBJECT_ASSERT_LOCKED(object); + if (object->type == OBJT_VNODE) + return (object->handle); + if (object->type == OBJT_SWAP && (object->flags & OBJ_TMPFS) != 0) + return (object->un_pager.swp.swp_tmpfs); + return (NULL); +} + static int sysctl_vm_object_list(SYSCTL_HANDLER_ARGS) { Modified: head/sys/vm/vm_object.h ============================================================================== --- head/sys/vm/vm_object.h Tue Jun 2 18:28:41 2015 (r283923) +++ head/sys/vm/vm_object.h Tue Jun 2 18:37:04 2015 (r283924) @@ -322,6 +322,7 @@ boolean_t vm_object_sync(vm_object_t, vm boolean_t); void vm_object_unwire(vm_object_t object, vm_ooffset_t offset, vm_size_t length, uint8_t queue); +struct vnode *vm_object_vnode(vm_object_t object); #endif /* _KERNEL */ #endif /* _VM_OBJECT_ */ From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 19:05:03 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EF038C6; Tue, 2 Jun 2015 19:05:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CF1410E2; Tue, 2 Jun 2015 19:05:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52J53Wk090314; Tue, 2 Jun 2015 19:05:03 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52J53kV090313; Tue, 2 Jun 2015 19:05:03 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201506021905.t52J53kV090313@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 2 Jun 2015 19:05:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283925 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 19:05:03 -0000 Author: bdrewery Date: Tue Jun 2 19:05:02 2015 New Revision: 283925 URL: https://svnweb.freebsd.org/changeset/base/283925 Log: Similar to r280178, don't hide command for building static library. Modified: head/share/mk/bsd.lib.mk Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Tue Jun 2 18:37:04 2015 (r283924) +++ head/share/mk/bsd.lib.mk Tue Jun 2 19:05:02 2015 (r283925) @@ -169,7 +169,7 @@ _LIBS= lib${LIB_PRIVATE}${LIB}.a lib${LIB_PRIVATE}${LIB}.a: ${OBJS} ${STATICOBJS} @${ECHO} building static ${LIB} library @rm -f ${.TARGET} - @${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD} + ${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD} ${RANLIB} ${RANLIBFLAGS} ${.TARGET} .endif @@ -183,7 +183,7 @@ NOPATH_FILES+= ${POBJS} lib${LIB_PRIVATE}${LIB}_p.a: ${POBJS} @${ECHO} building profiled ${LIB} library @rm -f ${.TARGET} - @${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${POBJS} | tsort -q` ${ARADD} + ${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${POBJS} | tsort -q` ${ARADD} ${RANLIB} ${RANLIBFLAGS} ${.TARGET} .endif @@ -240,7 +240,7 @@ _LIBS+= lib${LIB_PRIVATE}${LIB}_pic.a lib${LIB_PRIVATE}${LIB}_pic.a: ${SOBJS} @${ECHO} building special pic ${LIB} library @rm -f ${.TARGET} - @${AR} ${ARFLAGS} ${.TARGET} ${SOBJS} ${ARADD} + ${AR} ${ARFLAGS} ${.TARGET} ${SOBJS} ${ARADD} ${RANLIB} ${RANLIBFLAGS} ${.TARGET} .endif From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 19:20:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 375303F1; Tue, 2 Jun 2015 19:20:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1864614ED; Tue, 2 Jun 2015 19:20:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52JKfCi097704; Tue, 2 Jun 2015 19:20:41 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52JKdgU097695; Tue, 2 Jun 2015 19:20:39 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021920.t52JKdgU097695@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 19:20:39 +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: r283927 - in stable: 10/lib/libc/gen 10/lib/libc/include 10/lib/libc/stdio 10/lib/libc/sys 10/share/man/man9 10/sys/amd64/include 10/sys/boot/i386/common 10/sys/dev/pci 10/sys/i386/incl... 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 19:20:42 -0000 Author: jhb Date: Tue Jun 2 19:20:39 2015 New Revision: 283927 URL: https://svnweb.freebsd.org/changeset/base/283927 Log: MFC 281887: Reassign copyright statements on several files from Advanced Computing Technologies LLC to Hudson River Trading LLC. Modified: stable/7/sys/amd64/amd64/mca.c stable/7/sys/amd64/include/mca.h stable/7/sys/amd64/include/vm.h stable/7/sys/i386/i386/mca.c stable/7/sys/i386/include/mca.h stable/7/sys/i386/include/vm.h stable/7/sys/vm/sg_pager.c stable/7/sys/x86/pci/qpi.c Directory Properties: stable/7/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libc/gen/_once_stub.c stable/10/lib/libc/include/compat.h stable/10/lib/libc/stdio/open_memstream.3 stable/10/lib/libc/stdio/open_memstream.c stable/10/lib/libc/stdio/open_wmemstream.c stable/10/lib/libc/sys/closefrom.2 stable/10/lib/libc/sys/procctl.2 stable/10/share/man/man9/BUS_BIND_INTR.9 stable/10/share/man/man9/BUS_CHILD_DELETED.9 stable/10/share/man/man9/BUS_CHILD_DETACHED.9 stable/10/share/man/man9/BUS_DESCRIBE_INTR.9 stable/10/share/man/man9/BUS_NEW_PASS.9 stable/10/share/man/man9/VOP_ADVISE.9 stable/10/share/man/man9/VOP_ALLOCATE.9 stable/10/share/man/man9/bus_adjust_resource.9 stable/10/share/man/man9/bus_generic_new_pass.9 stable/10/share/man/man9/bus_set_pass.9 stable/10/share/man/man9/refcount.9 stable/10/share/man/man9/sglist.9 stable/10/share/man/man9/shm_map.9 stable/10/sys/amd64/include/vm.h stable/10/sys/boot/i386/common/edd.h stable/10/sys/dev/pci/pci_subr.c stable/10/sys/i386/include/vm.h stable/10/sys/sys/procctl.h stable/10/sys/vm/sg_pager.c stable/10/sys/x86/acpica/srat.c stable/10/sys/x86/include/mca.h stable/10/sys/x86/pci/qpi.c stable/10/sys/x86/x86/mca.c stable/10/tools/regression/lib/libc/stdio/test-open_memstream.c stable/10/tools/regression/lib/libc/stdio/test-open_wmemstream.c stable/10/tools/regression/netinet/arphold/arphold.c stable/10/usr.bin/perror/perror.1 stable/10/usr.bin/perror/perror.c stable/10/usr.bin/procstat/procstat_rusage.c stable/10/usr.bin/protect/protect.1 stable/10/usr.bin/protect/protect.c stable/10/usr.sbin/bhyve/ioapic.c stable/10/usr.sbin/bhyve/ioapic.h stable/10/usr.sbin/bhyve/pci_irq.c stable/10/usr.sbin/bhyve/pci_irq.h stable/10/usr.sbin/bhyve/pm.c stable/10/usr.sbin/etcupdate/etcupdate.8 stable/10/usr.sbin/etcupdate/etcupdate.sh stable/10/usr.sbin/etcupdate/tests/always_test.sh stable/10/usr.sbin/etcupdate/tests/conflicts_test.sh stable/10/usr.sbin/etcupdate/tests/fbsdid_test.sh stable/10/usr.sbin/etcupdate/tests/ignore_test.sh stable/10/usr.sbin/etcupdate/tests/preworld_test.sh stable/10/usr.sbin/etcupdate/tests/tests_test.sh stable/10/usr.sbin/etcupdate/tests/tzsetup_test.sh stable/10/usr.sbin/pciconf/err.c stable/8/lib/libc/gen/_once_stub.c stable/8/lib/libc/include/compat.h stable/8/lib/libc/sys/closefrom.2 stable/8/share/man/man9/BUS_BIND_INTR.9 stable/8/share/man/man9/BUS_DESCRIBE_INTR.9 stable/8/share/man/man9/BUS_NEW_PASS.9 stable/8/share/man/man9/bus_adjust_resource.9 stable/8/share/man/man9/bus_generic_new_pass.9 stable/8/share/man/man9/bus_set_pass.9 stable/8/share/man/man9/refcount.9 stable/8/share/man/man9/sglist.9 stable/8/share/man/man9/shm_map.9 stable/8/sys/amd64/include/mca.h stable/8/sys/amd64/include/vm.h stable/8/sys/boot/i386/common/edd.h stable/8/sys/i386/include/mca.h stable/8/sys/i386/include/vm.h stable/8/sys/vm/sg_pager.c stable/8/sys/x86/pci/qpi.c stable/8/sys/x86/x86/mca.c stable/8/tools/regression/file/closefrom/closefrom.c stable/8/tools/regression/netinet/arphold/arphold.c stable/8/tools/regression/usr.sbin/etcupdate/always.sh stable/8/tools/regression/usr.sbin/etcupdate/conflicts.sh stable/8/tools/regression/usr.sbin/etcupdate/fbsdid.sh stable/8/tools/regression/usr.sbin/etcupdate/ignore.sh stable/8/tools/regression/usr.sbin/etcupdate/preworld.sh stable/8/tools/regression/usr.sbin/etcupdate/tests.sh stable/8/tools/regression/usr.sbin/etcupdate/tzsetup.sh stable/8/usr.bin/perror/perror.1 stable/8/usr.bin/perror/perror.c stable/8/usr.sbin/etcupdate/etcupdate.8 stable/8/usr.sbin/etcupdate/etcupdate.sh stable/8/usr.sbin/pciconf/err.c stable/9/lib/libc/gen/_once_stub.c stable/9/lib/libc/include/compat.h stable/9/lib/libc/stdio/open_memstream.3 (contents, props changed) stable/9/lib/libc/stdio/open_memstream.c stable/9/lib/libc/stdio/open_wmemstream.c stable/9/lib/libc/sys/closefrom.2 stable/9/lib/libc/sys/procctl.2 stable/9/share/man/man9/BUS_BIND_INTR.9 stable/9/share/man/man9/BUS_CHILD_DELETED.9 stable/9/share/man/man9/BUS_DESCRIBE_INTR.9 stable/9/share/man/man9/BUS_NEW_PASS.9 stable/9/share/man/man9/bus_adjust_resource.9 stable/9/share/man/man9/bus_generic_new_pass.9 stable/9/share/man/man9/bus_set_pass.9 stable/9/share/man/man9/refcount.9 stable/9/share/man/man9/sglist.9 stable/9/share/man/man9/shm_map.9 stable/9/sys/amd64/include/vm.h stable/9/sys/boot/i386/common/edd.h stable/9/sys/dev/pci/pci_subr.c stable/9/sys/i386/include/vm.h stable/9/sys/sys/procctl.h stable/9/sys/vm/sg_pager.c stable/9/sys/x86/acpica/srat.c stable/9/sys/x86/include/mca.h stable/9/sys/x86/pci/qpi.c stable/9/sys/x86/x86/mca.c stable/9/tools/regression/file/closefrom/closefrom.c stable/9/tools/regression/lib/libc/stdio/test-open_memstream.c stable/9/tools/regression/lib/libc/stdio/test-open_wmemstream.c stable/9/tools/regression/netinet/arphold/arphold.c stable/9/tools/regression/usr.sbin/etcupdate/always.sh stable/9/tools/regression/usr.sbin/etcupdate/conflicts.sh stable/9/tools/regression/usr.sbin/etcupdate/fbsdid.sh stable/9/tools/regression/usr.sbin/etcupdate/ignore.sh stable/9/tools/regression/usr.sbin/etcupdate/preworld.sh stable/9/tools/regression/usr.sbin/etcupdate/tests.sh stable/9/tools/regression/usr.sbin/etcupdate/tzsetup.sh stable/9/usr.bin/perror/perror.1 stable/9/usr.bin/perror/perror.c stable/9/usr.bin/procstat/procstat_rusage.c stable/9/usr.bin/protect/protect.1 stable/9/usr.bin/protect/protect.c stable/9/usr.sbin/etcupdate/etcupdate.8 stable/9/usr.sbin/etcupdate/etcupdate.sh stable/9/usr.sbin/pciconf/err.c Directory Properties: stable/10/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) stable/8/share/man/man9/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/i386/ (props changed) stable/8/sys/vm/ (props changed) stable/8/sys/x86/ (props changed) stable/8/usr.bin/perror/ (props changed) stable/8/usr.sbin/etcupdate/ (props changed) stable/8/usr.sbin/pciconf/ (props changed) stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) stable/9/share/man/man9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/sys/ (props changed) stable/9/tools/regression/lib/libc/ (props changed) stable/9/tools/regression/netinet/ (props changed) stable/9/usr.bin/procstat/ (props changed) stable/9/usr.bin/protect/ (props changed) stable/9/usr.sbin/etcupdate/ (props changed) stable/9/usr.sbin/pciconf/ (props changed) Modified: stable/7/sys/amd64/amd64/mca.c ============================================================================== --- stable/7/sys/amd64/amd64/mca.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/7/sys/amd64/amd64/mca.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/7/sys/amd64/include/mca.h ============================================================================== --- stable/7/sys/amd64/include/mca.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/7/sys/amd64/include/mca.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/7/sys/amd64/include/vm.h ============================================================================== --- stable/7/sys/amd64/include/vm.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/7/sys/amd64/include/vm.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/7/sys/i386/i386/mca.c ============================================================================== --- stable/7/sys/i386/i386/mca.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/7/sys/i386/i386/mca.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/7/sys/i386/include/mca.h ============================================================================== --- stable/7/sys/i386/include/mca.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/7/sys/i386/include/mca.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/7/sys/i386/include/vm.h ============================================================================== --- stable/7/sys/i386/include/vm.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/7/sys/i386/include/vm.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/7/sys/vm/sg_pager.c ============================================================================== --- stable/7/sys/vm/sg_pager.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/7/sys/vm/sg_pager.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/7/sys/x86/pci/qpi.c ============================================================================== --- stable/7/sys/x86/pci/qpi.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/7/sys/x86/pci/qpi.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Advanced Computing Technologies LLC + * Copyright (c) 2010 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 19:20:57 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A445524; Tue, 2 Jun 2015 19:20:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8436D152F; Tue, 2 Jun 2015 19:20:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52JKvaW098381; Tue, 2 Jun 2015 19:20:57 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52JKgEH097710; Tue, 2 Jun 2015 19:20:42 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021920.t52JKgEH097710@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 19:20:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283927 - in stable: 10/lib/libc/gen 10/lib/libc/include 10/lib/libc/stdio 10/lib/libc/sys 10/share/man/man9 10/sys/amd64/include 10/sys/boot/i386/common 10/sys/dev/pci 10/sys/i386/incl... 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 19:20:57 -0000 Author: jhb Date: Tue Jun 2 19:20:39 2015 New Revision: 283927 URL: https://svnweb.freebsd.org/changeset/base/283927 Log: MFC 281887: Reassign copyright statements on several files from Advanced Computing Technologies LLC to Hudson River Trading LLC. Modified: stable/10/lib/libc/gen/_once_stub.c stable/10/lib/libc/include/compat.h stable/10/lib/libc/stdio/open_memstream.3 stable/10/lib/libc/stdio/open_memstream.c stable/10/lib/libc/stdio/open_wmemstream.c stable/10/lib/libc/sys/closefrom.2 stable/10/lib/libc/sys/procctl.2 stable/10/share/man/man9/BUS_BIND_INTR.9 stable/10/share/man/man9/BUS_CHILD_DELETED.9 stable/10/share/man/man9/BUS_CHILD_DETACHED.9 stable/10/share/man/man9/BUS_DESCRIBE_INTR.9 stable/10/share/man/man9/BUS_NEW_PASS.9 stable/10/share/man/man9/VOP_ADVISE.9 stable/10/share/man/man9/VOP_ALLOCATE.9 stable/10/share/man/man9/bus_adjust_resource.9 stable/10/share/man/man9/bus_generic_new_pass.9 stable/10/share/man/man9/bus_set_pass.9 stable/10/share/man/man9/refcount.9 stable/10/share/man/man9/sglist.9 stable/10/share/man/man9/shm_map.9 stable/10/sys/amd64/include/vm.h stable/10/sys/boot/i386/common/edd.h stable/10/sys/dev/pci/pci_subr.c stable/10/sys/i386/include/vm.h stable/10/sys/sys/procctl.h stable/10/sys/vm/sg_pager.c stable/10/sys/x86/acpica/srat.c stable/10/sys/x86/include/mca.h stable/10/sys/x86/pci/qpi.c stable/10/sys/x86/x86/mca.c stable/10/tools/regression/lib/libc/stdio/test-open_memstream.c stable/10/tools/regression/lib/libc/stdio/test-open_wmemstream.c stable/10/tools/regression/netinet/arphold/arphold.c stable/10/usr.bin/perror/perror.1 stable/10/usr.bin/perror/perror.c stable/10/usr.bin/procstat/procstat_rusage.c stable/10/usr.bin/protect/protect.1 stable/10/usr.bin/protect/protect.c stable/10/usr.sbin/bhyve/ioapic.c stable/10/usr.sbin/bhyve/ioapic.h stable/10/usr.sbin/bhyve/pci_irq.c stable/10/usr.sbin/bhyve/pci_irq.h stable/10/usr.sbin/bhyve/pm.c stable/10/usr.sbin/etcupdate/etcupdate.8 stable/10/usr.sbin/etcupdate/etcupdate.sh stable/10/usr.sbin/etcupdate/tests/always_test.sh stable/10/usr.sbin/etcupdate/tests/conflicts_test.sh stable/10/usr.sbin/etcupdate/tests/fbsdid_test.sh stable/10/usr.sbin/etcupdate/tests/ignore_test.sh stable/10/usr.sbin/etcupdate/tests/preworld_test.sh stable/10/usr.sbin/etcupdate/tests/tests_test.sh stable/10/usr.sbin/etcupdate/tests/tzsetup_test.sh stable/10/usr.sbin/pciconf/err.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/7/sys/amd64/amd64/mca.c stable/7/sys/amd64/include/mca.h stable/7/sys/amd64/include/vm.h stable/7/sys/i386/i386/mca.c stable/7/sys/i386/include/mca.h stable/7/sys/i386/include/vm.h stable/7/sys/vm/sg_pager.c stable/7/sys/x86/pci/qpi.c stable/8/lib/libc/gen/_once_stub.c stable/8/lib/libc/include/compat.h stable/8/lib/libc/sys/closefrom.2 stable/8/share/man/man9/BUS_BIND_INTR.9 stable/8/share/man/man9/BUS_DESCRIBE_INTR.9 stable/8/share/man/man9/BUS_NEW_PASS.9 stable/8/share/man/man9/bus_adjust_resource.9 stable/8/share/man/man9/bus_generic_new_pass.9 stable/8/share/man/man9/bus_set_pass.9 stable/8/share/man/man9/refcount.9 stable/8/share/man/man9/sglist.9 stable/8/share/man/man9/shm_map.9 stable/8/sys/amd64/include/mca.h stable/8/sys/amd64/include/vm.h stable/8/sys/boot/i386/common/edd.h stable/8/sys/i386/include/mca.h stable/8/sys/i386/include/vm.h stable/8/sys/vm/sg_pager.c stable/8/sys/x86/pci/qpi.c stable/8/sys/x86/x86/mca.c stable/8/tools/regression/file/closefrom/closefrom.c stable/8/tools/regression/netinet/arphold/arphold.c stable/8/tools/regression/usr.sbin/etcupdate/always.sh stable/8/tools/regression/usr.sbin/etcupdate/conflicts.sh stable/8/tools/regression/usr.sbin/etcupdate/fbsdid.sh stable/8/tools/regression/usr.sbin/etcupdate/ignore.sh stable/8/tools/regression/usr.sbin/etcupdate/preworld.sh stable/8/tools/regression/usr.sbin/etcupdate/tests.sh stable/8/tools/regression/usr.sbin/etcupdate/tzsetup.sh stable/8/usr.bin/perror/perror.1 stable/8/usr.bin/perror/perror.c stable/8/usr.sbin/etcupdate/etcupdate.8 stable/8/usr.sbin/etcupdate/etcupdate.sh stable/8/usr.sbin/pciconf/err.c stable/9/lib/libc/gen/_once_stub.c stable/9/lib/libc/include/compat.h stable/9/lib/libc/stdio/open_memstream.3 (contents, props changed) stable/9/lib/libc/stdio/open_memstream.c stable/9/lib/libc/stdio/open_wmemstream.c stable/9/lib/libc/sys/closefrom.2 stable/9/lib/libc/sys/procctl.2 stable/9/share/man/man9/BUS_BIND_INTR.9 stable/9/share/man/man9/BUS_CHILD_DELETED.9 stable/9/share/man/man9/BUS_DESCRIBE_INTR.9 stable/9/share/man/man9/BUS_NEW_PASS.9 stable/9/share/man/man9/bus_adjust_resource.9 stable/9/share/man/man9/bus_generic_new_pass.9 stable/9/share/man/man9/bus_set_pass.9 stable/9/share/man/man9/refcount.9 stable/9/share/man/man9/sglist.9 stable/9/share/man/man9/shm_map.9 stable/9/sys/amd64/include/vm.h stable/9/sys/boot/i386/common/edd.h stable/9/sys/dev/pci/pci_subr.c stable/9/sys/i386/include/vm.h stable/9/sys/sys/procctl.h stable/9/sys/vm/sg_pager.c stable/9/sys/x86/acpica/srat.c stable/9/sys/x86/include/mca.h stable/9/sys/x86/pci/qpi.c stable/9/sys/x86/x86/mca.c stable/9/tools/regression/file/closefrom/closefrom.c stable/9/tools/regression/lib/libc/stdio/test-open_memstream.c stable/9/tools/regression/lib/libc/stdio/test-open_wmemstream.c stable/9/tools/regression/netinet/arphold/arphold.c stable/9/tools/regression/usr.sbin/etcupdate/always.sh stable/9/tools/regression/usr.sbin/etcupdate/conflicts.sh stable/9/tools/regression/usr.sbin/etcupdate/fbsdid.sh stable/9/tools/regression/usr.sbin/etcupdate/ignore.sh stable/9/tools/regression/usr.sbin/etcupdate/preworld.sh stable/9/tools/regression/usr.sbin/etcupdate/tests.sh stable/9/tools/regression/usr.sbin/etcupdate/tzsetup.sh stable/9/usr.bin/perror/perror.1 stable/9/usr.bin/perror/perror.c stable/9/usr.bin/procstat/procstat_rusage.c stable/9/usr.bin/protect/protect.1 stable/9/usr.bin/protect/protect.c stable/9/usr.sbin/etcupdate/etcupdate.8 stable/9/usr.sbin/etcupdate/etcupdate.sh stable/9/usr.sbin/pciconf/err.c Directory Properties: stable/7/sys/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) stable/8/share/man/man9/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/i386/ (props changed) stable/8/sys/vm/ (props changed) stable/8/sys/x86/ (props changed) stable/8/usr.bin/perror/ (props changed) stable/8/usr.sbin/etcupdate/ (props changed) stable/8/usr.sbin/pciconf/ (props changed) stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) stable/9/share/man/man9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/sys/ (props changed) stable/9/tools/regression/lib/libc/ (props changed) stable/9/tools/regression/netinet/ (props changed) stable/9/usr.bin/procstat/ (props changed) stable/9/usr.bin/protect/ (props changed) stable/9/usr.sbin/etcupdate/ (props changed) stable/9/usr.sbin/pciconf/ (props changed) Modified: stable/10/lib/libc/gen/_once_stub.c ============================================================================== --- stable/10/lib/libc/gen/_once_stub.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/lib/libc/gen/_once_stub.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/lib/libc/include/compat.h ============================================================================== --- stable/10/lib/libc/include/compat.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/lib/libc/include/compat.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/lib/libc/stdio/open_memstream.3 ============================================================================== --- stable/10/lib/libc/stdio/open_memstream.3 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/lib/libc/stdio/open_memstream.3 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/lib/libc/stdio/open_memstream.c ============================================================================== --- stable/10/lib/libc/stdio/open_memstream.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/lib/libc/stdio/open_memstream.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/lib/libc/stdio/open_wmemstream.c ============================================================================== --- stable/10/lib/libc/stdio/open_wmemstream.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/lib/libc/stdio/open_wmemstream.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/lib/libc/sys/closefrom.2 ============================================================================== --- stable/10/lib/libc/sys/closefrom.2 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/lib/libc/sys/closefrom.2 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/lib/libc/sys/procctl.2 ============================================================================== --- stable/10/lib/libc/sys/procctl.2 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/lib/libc/sys/procctl.2 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/BUS_BIND_INTR.9 ============================================================================== --- stable/10/share/man/man9/BUS_BIND_INTR.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/BUS_BIND_INTR.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/BUS_CHILD_DELETED.9 ============================================================================== --- stable/10/share/man/man9/BUS_CHILD_DELETED.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/BUS_CHILD_DELETED.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2012 Advanced Computing Technologies LLC +.\" Copyright (c) 2012 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/BUS_CHILD_DETACHED.9 ============================================================================== --- stable/10/share/man/man9/BUS_CHILD_DETACHED.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/BUS_CHILD_DETACHED.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2012 Advanced Computing Technologies LLC +.\" Copyright (c) 2012 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/BUS_DESCRIBE_INTR.9 ============================================================================== --- stable/10/share/man/man9/BUS_DESCRIBE_INTR.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/BUS_DESCRIBE_INTR.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/BUS_NEW_PASS.9 ============================================================================== --- stable/10/share/man/man9/BUS_NEW_PASS.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/BUS_NEW_PASS.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/VOP_ADVISE.9 ============================================================================== --- stable/10/share/man/man9/VOP_ADVISE.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/VOP_ADVISE.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/VOP_ALLOCATE.9 ============================================================================== --- stable/10/share/man/man9/VOP_ALLOCATE.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/VOP_ALLOCATE.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/bus_adjust_resource.9 ============================================================================== --- stable/10/share/man/man9/bus_adjust_resource.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/bus_adjust_resource.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2011 Advanced Computing Technologies LLC +.\" Copyright (c) 2011 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/bus_generic_new_pass.9 ============================================================================== --- stable/10/share/man/man9/bus_generic_new_pass.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/bus_generic_new_pass.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/bus_set_pass.9 ============================================================================== --- stable/10/share/man/man9/bus_set_pass.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/bus_set_pass.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/refcount.9 ============================================================================== --- stable/10/share/man/man9/refcount.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/refcount.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/sglist.9 ============================================================================== --- stable/10/share/man/man9/sglist.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/sglist.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/share/man/man9/shm_map.9 ============================================================================== --- stable/10/share/man/man9/shm_map.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/share/man/man9/shm_map.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2011 Advanced Computing Technologies LLC +.\" Copyright (c) 2011 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/sys/amd64/include/vm.h ============================================================================== --- stable/10/sys/amd64/include/vm.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/sys/amd64/include/vm.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/sys/boot/i386/common/edd.h ============================================================================== --- stable/10/sys/boot/i386/common/edd.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/sys/boot/i386/common/edd.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Advanced Computing Technologies LLC + * Copyright (c) 2011 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/sys/dev/pci/pci_subr.c ============================================================================== --- stable/10/sys/dev/pci/pci_subr.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/sys/dev/pci/pci_subr.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Advanced Computing Technologies LLC + * Copyright (c) 2011 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/sys/i386/include/vm.h ============================================================================== --- stable/10/sys/i386/include/vm.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/sys/i386/include/vm.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/sys/sys/procctl.h ============================================================================== --- stable/10/sys/sys/procctl.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/sys/sys/procctl.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/sys/vm/sg_pager.c ============================================================================== --- stable/10/sys/vm/sg_pager.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/sys/vm/sg_pager.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/sys/x86/acpica/srat.c ============================================================================== --- stable/10/sys/x86/acpica/srat.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/sys/x86/acpica/srat.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Advanced Computing Technologies LLC + * Copyright (c) 2010 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/sys/x86/include/mca.h ============================================================================== --- stable/10/sys/x86/include/mca.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/sys/x86/include/mca.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/sys/x86/pci/qpi.c ============================================================================== --- stable/10/sys/x86/pci/qpi.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/sys/x86/pci/qpi.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Advanced Computing Technologies LLC + * Copyright (c) 2010 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/sys/x86/x86/mca.c ============================================================================== --- stable/10/sys/x86/x86/mca.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/sys/x86/x86/mca.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/tools/regression/lib/libc/stdio/test-open_memstream.c ============================================================================== --- stable/10/tools/regression/lib/libc/stdio/test-open_memstream.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/tools/regression/lib/libc/stdio/test-open_memstream.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/tools/regression/lib/libc/stdio/test-open_wmemstream.c ============================================================================== --- stable/10/tools/regression/lib/libc/stdio/test-open_wmemstream.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/tools/regression/lib/libc/stdio/test-open_wmemstream.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/tools/regression/netinet/arphold/arphold.c ============================================================================== --- stable/10/tools/regression/netinet/arphold/arphold.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/tools/regression/netinet/arphold/arphold.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Advanced Computing Technologies LLC + * Copyright (c) 2010 Hudson River Trading LLC * Written by George Neville-Neil gnn@freebsd.org * All rights reserved. * Modified: stable/10/usr.bin/perror/perror.1 ============================================================================== --- stable/10/usr.bin/perror/perror.1 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.bin/perror/perror.1 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: George V. Neville-Neil .\" All rights reserved. .\" Modified: stable/10/usr.bin/perror/perror.c ============================================================================== --- stable/10/usr.bin/perror/perror.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.bin/perror/perror.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: George V. Neville-Neil * All rights reserved. * Modified: stable/10/usr.bin/procstat/procstat_rusage.c ============================================================================== --- stable/10/usr.bin/procstat/procstat_rusage.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.bin/procstat/procstat_rusage.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Advanced Computing Technologies LLC + * Copyright (c) 2012 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/usr.bin/protect/protect.1 ============================================================================== --- stable/10/usr.bin/protect/protect.1 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.bin/protect/protect.1 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/usr.bin/protect/protect.c ============================================================================== --- stable/10/usr.bin/protect/protect.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.bin/protect/protect.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/usr.sbin/bhyve/ioapic.c ============================================================================== --- stable/10/usr.sbin/bhyve/ioapic.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/bhyve/ioapic.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Advanced Computing Technologies LLC + * Copyright (c) 2014 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/usr.sbin/bhyve/ioapic.h ============================================================================== --- stable/10/usr.sbin/bhyve/ioapic.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/bhyve/ioapic.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Advanced Computing Technologies LLC + * Copyright (c) 2014 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/usr.sbin/bhyve/pci_irq.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_irq.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/bhyve/pci_irq.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Advanced Computing Technologies LLC + * Copyright (c) 2014 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/usr.sbin/bhyve/pci_irq.h ============================================================================== --- stable/10/usr.sbin/bhyve/pci_irq.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/bhyve/pci_irq.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Advanced Computing Technologies LLC + * Copyright (c) 2014 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/usr.sbin/bhyve/pm.c ============================================================================== --- stable/10/usr.sbin/bhyve/pm.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/bhyve/pm.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/10/usr.sbin/etcupdate/etcupdate.8 ============================================================================== --- stable/10/usr.sbin/etcupdate/etcupdate.8 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/etcupdate/etcupdate.8 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2010-2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2010-2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/10/usr.sbin/etcupdate/etcupdate.sh ============================================================================== --- stable/10/usr.sbin/etcupdate/etcupdate.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/etcupdate/etcupdate.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010-2013 Advanced Computing Technologies LLC +# Copyright (c) 2010-2013 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/10/usr.sbin/etcupdate/tests/always_test.sh ============================================================================== --- stable/10/usr.sbin/etcupdate/tests/always_test.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/etcupdate/tests/always_test.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/10/usr.sbin/etcupdate/tests/conflicts_test.sh ============================================================================== --- stable/10/usr.sbin/etcupdate/tests/conflicts_test.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/etcupdate/tests/conflicts_test.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/10/usr.sbin/etcupdate/tests/fbsdid_test.sh ============================================================================== --- stable/10/usr.sbin/etcupdate/tests/fbsdid_test.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/etcupdate/tests/fbsdid_test.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/10/usr.sbin/etcupdate/tests/ignore_test.sh ============================================================================== --- stable/10/usr.sbin/etcupdate/tests/ignore_test.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/etcupdate/tests/ignore_test.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/10/usr.sbin/etcupdate/tests/preworld_test.sh ============================================================================== --- stable/10/usr.sbin/etcupdate/tests/preworld_test.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/etcupdate/tests/preworld_test.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2013 Advanced Computing Technologies LLC +# Copyright (c) 2013 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/10/usr.sbin/etcupdate/tests/tests_test.sh ============================================================================== --- stable/10/usr.sbin/etcupdate/tests/tests_test.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/etcupdate/tests/tests_test.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/10/usr.sbin/etcupdate/tests/tzsetup_test.sh ============================================================================== --- stable/10/usr.sbin/etcupdate/tests/tzsetup_test.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/etcupdate/tests/tzsetup_test.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2013 Advanced Computing Technologies LLC +# Copyright (c) 2013 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/10/usr.sbin/pciconf/err.c ============================================================================== --- stable/10/usr.sbin/pciconf/err.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/10/usr.sbin/pciconf/err.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Advanced Computing Technologies LLC + * Copyright (c) 2012 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 19:21:07 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B285654; Tue, 2 Jun 2015 19:21:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 852B31558; Tue, 2 Jun 2015 19:21:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52JL7dw098999; Tue, 2 Jun 2015 19:21:07 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52JKwsa098393; Tue, 2 Jun 2015 19:20:58 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021920.t52JKwsa098393@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 19:20:58 +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: r283927 - in stable: 10/lib/libc/gen 10/lib/libc/include 10/lib/libc/stdio 10/lib/libc/sys 10/share/man/man9 10/sys/amd64/include 10/sys/boot/i386/common 10/sys/dev/pci 10/sys/i386/incl... 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 19:21:07 -0000 Author: jhb Date: Tue Jun 2 19:20:39 2015 New Revision: 283927 URL: https://svnweb.freebsd.org/changeset/base/283927 Log: MFC 281887: Reassign copyright statements on several files from Advanced Computing Technologies LLC to Hudson River Trading LLC. Modified: stable/8/lib/libc/gen/_once_stub.c stable/8/lib/libc/include/compat.h stable/8/lib/libc/sys/closefrom.2 stable/8/share/man/man9/BUS_BIND_INTR.9 stable/8/share/man/man9/BUS_DESCRIBE_INTR.9 stable/8/share/man/man9/BUS_NEW_PASS.9 stable/8/share/man/man9/bus_adjust_resource.9 stable/8/share/man/man9/bus_generic_new_pass.9 stable/8/share/man/man9/bus_set_pass.9 stable/8/share/man/man9/refcount.9 stable/8/share/man/man9/sglist.9 stable/8/share/man/man9/shm_map.9 stable/8/sys/amd64/include/mca.h stable/8/sys/amd64/include/vm.h stable/8/sys/boot/i386/common/edd.h stable/8/sys/i386/include/mca.h stable/8/sys/i386/include/vm.h stable/8/sys/vm/sg_pager.c stable/8/sys/x86/pci/qpi.c stable/8/sys/x86/x86/mca.c stable/8/tools/regression/file/closefrom/closefrom.c stable/8/tools/regression/netinet/arphold/arphold.c stable/8/tools/regression/usr.sbin/etcupdate/always.sh stable/8/tools/regression/usr.sbin/etcupdate/conflicts.sh stable/8/tools/regression/usr.sbin/etcupdate/fbsdid.sh stable/8/tools/regression/usr.sbin/etcupdate/ignore.sh stable/8/tools/regression/usr.sbin/etcupdate/preworld.sh stable/8/tools/regression/usr.sbin/etcupdate/tests.sh stable/8/tools/regression/usr.sbin/etcupdate/tzsetup.sh stable/8/usr.bin/perror/perror.1 stable/8/usr.bin/perror/perror.c stable/8/usr.sbin/etcupdate/etcupdate.8 stable/8/usr.sbin/etcupdate/etcupdate.sh stable/8/usr.sbin/pciconf/err.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) stable/8/share/man/man9/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/i386/ (props changed) stable/8/sys/vm/ (props changed) stable/8/sys/x86/ (props changed) stable/8/usr.bin/perror/ (props changed) stable/8/usr.sbin/etcupdate/ (props changed) stable/8/usr.sbin/pciconf/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libc/gen/_once_stub.c stable/10/lib/libc/include/compat.h stable/10/lib/libc/stdio/open_memstream.3 stable/10/lib/libc/stdio/open_memstream.c stable/10/lib/libc/stdio/open_wmemstream.c stable/10/lib/libc/sys/closefrom.2 stable/10/lib/libc/sys/procctl.2 stable/10/share/man/man9/BUS_BIND_INTR.9 stable/10/share/man/man9/BUS_CHILD_DELETED.9 stable/10/share/man/man9/BUS_CHILD_DETACHED.9 stable/10/share/man/man9/BUS_DESCRIBE_INTR.9 stable/10/share/man/man9/BUS_NEW_PASS.9 stable/10/share/man/man9/VOP_ADVISE.9 stable/10/share/man/man9/VOP_ALLOCATE.9 stable/10/share/man/man9/bus_adjust_resource.9 stable/10/share/man/man9/bus_generic_new_pass.9 stable/10/share/man/man9/bus_set_pass.9 stable/10/share/man/man9/refcount.9 stable/10/share/man/man9/sglist.9 stable/10/share/man/man9/shm_map.9 stable/10/sys/amd64/include/vm.h stable/10/sys/boot/i386/common/edd.h stable/10/sys/dev/pci/pci_subr.c stable/10/sys/i386/include/vm.h stable/10/sys/sys/procctl.h stable/10/sys/vm/sg_pager.c stable/10/sys/x86/acpica/srat.c stable/10/sys/x86/include/mca.h stable/10/sys/x86/pci/qpi.c stable/10/sys/x86/x86/mca.c stable/10/tools/regression/lib/libc/stdio/test-open_memstream.c stable/10/tools/regression/lib/libc/stdio/test-open_wmemstream.c stable/10/tools/regression/netinet/arphold/arphold.c stable/10/usr.bin/perror/perror.1 stable/10/usr.bin/perror/perror.c stable/10/usr.bin/procstat/procstat_rusage.c stable/10/usr.bin/protect/protect.1 stable/10/usr.bin/protect/protect.c stable/10/usr.sbin/bhyve/ioapic.c stable/10/usr.sbin/bhyve/ioapic.h stable/10/usr.sbin/bhyve/pci_irq.c stable/10/usr.sbin/bhyve/pci_irq.h stable/10/usr.sbin/bhyve/pm.c stable/10/usr.sbin/etcupdate/etcupdate.8 stable/10/usr.sbin/etcupdate/etcupdate.sh stable/10/usr.sbin/etcupdate/tests/always_test.sh stable/10/usr.sbin/etcupdate/tests/conflicts_test.sh stable/10/usr.sbin/etcupdate/tests/fbsdid_test.sh stable/10/usr.sbin/etcupdate/tests/ignore_test.sh stable/10/usr.sbin/etcupdate/tests/preworld_test.sh stable/10/usr.sbin/etcupdate/tests/tests_test.sh stable/10/usr.sbin/etcupdate/tests/tzsetup_test.sh stable/10/usr.sbin/pciconf/err.c stable/7/sys/amd64/amd64/mca.c stable/7/sys/amd64/include/mca.h stable/7/sys/amd64/include/vm.h stable/7/sys/i386/i386/mca.c stable/7/sys/i386/include/mca.h stable/7/sys/i386/include/vm.h stable/7/sys/vm/sg_pager.c stable/7/sys/x86/pci/qpi.c stable/9/lib/libc/gen/_once_stub.c stable/9/lib/libc/include/compat.h stable/9/lib/libc/stdio/open_memstream.3 (contents, props changed) stable/9/lib/libc/stdio/open_memstream.c stable/9/lib/libc/stdio/open_wmemstream.c stable/9/lib/libc/sys/closefrom.2 stable/9/lib/libc/sys/procctl.2 stable/9/share/man/man9/BUS_BIND_INTR.9 stable/9/share/man/man9/BUS_CHILD_DELETED.9 stable/9/share/man/man9/BUS_DESCRIBE_INTR.9 stable/9/share/man/man9/BUS_NEW_PASS.9 stable/9/share/man/man9/bus_adjust_resource.9 stable/9/share/man/man9/bus_generic_new_pass.9 stable/9/share/man/man9/bus_set_pass.9 stable/9/share/man/man9/refcount.9 stable/9/share/man/man9/sglist.9 stable/9/share/man/man9/shm_map.9 stable/9/sys/amd64/include/vm.h stable/9/sys/boot/i386/common/edd.h stable/9/sys/dev/pci/pci_subr.c stable/9/sys/i386/include/vm.h stable/9/sys/sys/procctl.h stable/9/sys/vm/sg_pager.c stable/9/sys/x86/acpica/srat.c stable/9/sys/x86/include/mca.h stable/9/sys/x86/pci/qpi.c stable/9/sys/x86/x86/mca.c stable/9/tools/regression/file/closefrom/closefrom.c stable/9/tools/regression/lib/libc/stdio/test-open_memstream.c stable/9/tools/regression/lib/libc/stdio/test-open_wmemstream.c stable/9/tools/regression/netinet/arphold/arphold.c stable/9/tools/regression/usr.sbin/etcupdate/always.sh stable/9/tools/regression/usr.sbin/etcupdate/conflicts.sh stable/9/tools/regression/usr.sbin/etcupdate/fbsdid.sh stable/9/tools/regression/usr.sbin/etcupdate/ignore.sh stable/9/tools/regression/usr.sbin/etcupdate/preworld.sh stable/9/tools/regression/usr.sbin/etcupdate/tests.sh stable/9/tools/regression/usr.sbin/etcupdate/tzsetup.sh stable/9/usr.bin/perror/perror.1 stable/9/usr.bin/perror/perror.c stable/9/usr.bin/procstat/procstat_rusage.c stable/9/usr.bin/protect/protect.1 stable/9/usr.bin/protect/protect.c stable/9/usr.sbin/etcupdate/etcupdate.8 stable/9/usr.sbin/etcupdate/etcupdate.sh stable/9/usr.sbin/pciconf/err.c Directory Properties: stable/10/ (props changed) stable/7/sys/ (props changed) stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) stable/9/share/man/man9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/sys/ (props changed) stable/9/tools/regression/lib/libc/ (props changed) stable/9/tools/regression/netinet/ (props changed) stable/9/usr.bin/procstat/ (props changed) stable/9/usr.bin/protect/ (props changed) stable/9/usr.sbin/etcupdate/ (props changed) stable/9/usr.sbin/pciconf/ (props changed) Modified: stable/8/lib/libc/gen/_once_stub.c ============================================================================== --- stable/8/lib/libc/gen/_once_stub.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/lib/libc/gen/_once_stub.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/8/lib/libc/include/compat.h ============================================================================== --- stable/8/lib/libc/include/compat.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/lib/libc/include/compat.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/8/lib/libc/sys/closefrom.2 ============================================================================== --- stable/8/lib/libc/sys/closefrom.2 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/lib/libc/sys/closefrom.2 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/8/share/man/man9/BUS_BIND_INTR.9 ============================================================================== --- stable/8/share/man/man9/BUS_BIND_INTR.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/share/man/man9/BUS_BIND_INTR.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/8/share/man/man9/BUS_DESCRIBE_INTR.9 ============================================================================== --- stable/8/share/man/man9/BUS_DESCRIBE_INTR.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/share/man/man9/BUS_DESCRIBE_INTR.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/8/share/man/man9/BUS_NEW_PASS.9 ============================================================================== --- stable/8/share/man/man9/BUS_NEW_PASS.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/share/man/man9/BUS_NEW_PASS.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/8/share/man/man9/bus_adjust_resource.9 ============================================================================== --- stable/8/share/man/man9/bus_adjust_resource.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/share/man/man9/bus_adjust_resource.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2011 Advanced Computing Technologies LLC +.\" Copyright (c) 2011 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/8/share/man/man9/bus_generic_new_pass.9 ============================================================================== --- stable/8/share/man/man9/bus_generic_new_pass.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/share/man/man9/bus_generic_new_pass.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/8/share/man/man9/bus_set_pass.9 ============================================================================== --- stable/8/share/man/man9/bus_set_pass.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/share/man/man9/bus_set_pass.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/8/share/man/man9/refcount.9 ============================================================================== --- stable/8/share/man/man9/refcount.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/share/man/man9/refcount.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/8/share/man/man9/sglist.9 ============================================================================== --- stable/8/share/man/man9/sglist.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/share/man/man9/sglist.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/8/share/man/man9/shm_map.9 ============================================================================== --- stable/8/share/man/man9/shm_map.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/share/man/man9/shm_map.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2011 Advanced Computing Technologies LLC +.\" Copyright (c) 2011 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/8/sys/amd64/include/mca.h ============================================================================== --- stable/8/sys/amd64/include/mca.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/sys/amd64/include/mca.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/8/sys/amd64/include/vm.h ============================================================================== --- stable/8/sys/amd64/include/vm.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/sys/amd64/include/vm.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/8/sys/boot/i386/common/edd.h ============================================================================== --- stable/8/sys/boot/i386/common/edd.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/sys/boot/i386/common/edd.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Advanced Computing Technologies LLC + * Copyright (c) 2011 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/8/sys/i386/include/mca.h ============================================================================== --- stable/8/sys/i386/include/mca.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/sys/i386/include/mca.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/8/sys/i386/include/vm.h ============================================================================== --- stable/8/sys/i386/include/vm.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/sys/i386/include/vm.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/8/sys/vm/sg_pager.c ============================================================================== --- stable/8/sys/vm/sg_pager.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/sys/vm/sg_pager.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/8/sys/x86/pci/qpi.c ============================================================================== --- stable/8/sys/x86/pci/qpi.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/sys/x86/pci/qpi.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Advanced Computing Technologies LLC + * Copyright (c) 2010 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/8/sys/x86/x86/mca.c ============================================================================== --- stable/8/sys/x86/x86/mca.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/sys/x86/x86/mca.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/8/tools/regression/file/closefrom/closefrom.c ============================================================================== --- stable/8/tools/regression/file/closefrom/closefrom.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/tools/regression/file/closefrom/closefrom.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/8/tools/regression/netinet/arphold/arphold.c ============================================================================== --- stable/8/tools/regression/netinet/arphold/arphold.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/tools/regression/netinet/arphold/arphold.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Advanced Computing Technologies LLC + * Copyright (c) 2010 Hudson River Trading LLC * Written by George Neville-Neil gnn@freebsd.org * All rights reserved. * Modified: stable/8/tools/regression/usr.sbin/etcupdate/always.sh ============================================================================== --- stable/8/tools/regression/usr.sbin/etcupdate/always.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/tools/regression/usr.sbin/etcupdate/always.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/8/tools/regression/usr.sbin/etcupdate/conflicts.sh ============================================================================== --- stable/8/tools/regression/usr.sbin/etcupdate/conflicts.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/tools/regression/usr.sbin/etcupdate/conflicts.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/8/tools/regression/usr.sbin/etcupdate/fbsdid.sh ============================================================================== --- stable/8/tools/regression/usr.sbin/etcupdate/fbsdid.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/tools/regression/usr.sbin/etcupdate/fbsdid.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/8/tools/regression/usr.sbin/etcupdate/ignore.sh ============================================================================== --- stable/8/tools/regression/usr.sbin/etcupdate/ignore.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/tools/regression/usr.sbin/etcupdate/ignore.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/8/tools/regression/usr.sbin/etcupdate/preworld.sh ============================================================================== --- stable/8/tools/regression/usr.sbin/etcupdate/preworld.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/tools/regression/usr.sbin/etcupdate/preworld.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2013 Advanced Computing Technologies LLC +# Copyright (c) 2013 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/8/tools/regression/usr.sbin/etcupdate/tests.sh ============================================================================== --- stable/8/tools/regression/usr.sbin/etcupdate/tests.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/tools/regression/usr.sbin/etcupdate/tests.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/8/tools/regression/usr.sbin/etcupdate/tzsetup.sh ============================================================================== --- stable/8/tools/regression/usr.sbin/etcupdate/tzsetup.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/tools/regression/usr.sbin/etcupdate/tzsetup.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2013 Advanced Computing Technologies LLC +# Copyright (c) 2013 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/8/usr.bin/perror/perror.1 ============================================================================== --- stable/8/usr.bin/perror/perror.1 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/usr.bin/perror/perror.1 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: George V. Neville-Neil .\" All rights reserved. .\" Modified: stable/8/usr.bin/perror/perror.c ============================================================================== --- stable/8/usr.bin/perror/perror.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/usr.bin/perror/perror.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: George V. Neville-Neil * All rights reserved. * Modified: stable/8/usr.sbin/etcupdate/etcupdate.8 ============================================================================== --- stable/8/usr.sbin/etcupdate/etcupdate.8 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/usr.sbin/etcupdate/etcupdate.8 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2010-2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2010-2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/8/usr.sbin/etcupdate/etcupdate.sh ============================================================================== --- stable/8/usr.sbin/etcupdate/etcupdate.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/usr.sbin/etcupdate/etcupdate.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010-2013 Advanced Computing Technologies LLC +# Copyright (c) 2010-2013 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/8/usr.sbin/pciconf/err.c ============================================================================== --- stable/8/usr.sbin/pciconf/err.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/8/usr.sbin/pciconf/err.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Advanced Computing Technologies LLC + * Copyright (c) 2012 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 19:21:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F065678C; Tue, 2 Jun 2015 19:21:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA8CC158C; Tue, 2 Jun 2015 19:21:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52JLKDl099099; Tue, 2 Jun 2015 19:21:20 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52JL83X099007; Tue, 2 Jun 2015 19:21:08 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506021921.t52JL83X099007@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Jun 2015 19:21: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: r283927 - in stable: 10/lib/libc/gen 10/lib/libc/include 10/lib/libc/stdio 10/lib/libc/sys 10/share/man/man9 10/sys/amd64/include 10/sys/boot/i386/common 10/sys/dev/pci 10/sys/i386/incl... 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 19:21:21 -0000 Author: jhb Date: Tue Jun 2 19:20:39 2015 New Revision: 283927 URL: https://svnweb.freebsd.org/changeset/base/283927 Log: MFC 281887: Reassign copyright statements on several files from Advanced Computing Technologies LLC to Hudson River Trading LLC. Modified: stable/9/lib/libc/gen/_once_stub.c stable/9/lib/libc/include/compat.h stable/9/lib/libc/stdio/open_memstream.3 (contents, props changed) stable/9/lib/libc/stdio/open_memstream.c stable/9/lib/libc/stdio/open_wmemstream.c stable/9/lib/libc/sys/closefrom.2 stable/9/lib/libc/sys/procctl.2 stable/9/share/man/man9/BUS_BIND_INTR.9 stable/9/share/man/man9/BUS_CHILD_DELETED.9 stable/9/share/man/man9/BUS_DESCRIBE_INTR.9 stable/9/share/man/man9/BUS_NEW_PASS.9 stable/9/share/man/man9/bus_adjust_resource.9 stable/9/share/man/man9/bus_generic_new_pass.9 stable/9/share/man/man9/bus_set_pass.9 stable/9/share/man/man9/refcount.9 stable/9/share/man/man9/sglist.9 stable/9/share/man/man9/shm_map.9 stable/9/sys/amd64/include/vm.h stable/9/sys/boot/i386/common/edd.h stable/9/sys/dev/pci/pci_subr.c stable/9/sys/i386/include/vm.h stable/9/sys/sys/procctl.h stable/9/sys/vm/sg_pager.c stable/9/sys/x86/acpica/srat.c stable/9/sys/x86/include/mca.h stable/9/sys/x86/pci/qpi.c stable/9/sys/x86/x86/mca.c stable/9/tools/regression/file/closefrom/closefrom.c stable/9/tools/regression/lib/libc/stdio/test-open_memstream.c stable/9/tools/regression/lib/libc/stdio/test-open_wmemstream.c stable/9/tools/regression/netinet/arphold/arphold.c stable/9/tools/regression/usr.sbin/etcupdate/always.sh stable/9/tools/regression/usr.sbin/etcupdate/conflicts.sh stable/9/tools/regression/usr.sbin/etcupdate/fbsdid.sh stable/9/tools/regression/usr.sbin/etcupdate/ignore.sh stable/9/tools/regression/usr.sbin/etcupdate/preworld.sh stable/9/tools/regression/usr.sbin/etcupdate/tests.sh stable/9/tools/regression/usr.sbin/etcupdate/tzsetup.sh stable/9/usr.bin/perror/perror.1 stable/9/usr.bin/perror/perror.c stable/9/usr.bin/procstat/procstat_rusage.c stable/9/usr.bin/protect/protect.1 stable/9/usr.bin/protect/protect.c stable/9/usr.sbin/etcupdate/etcupdate.8 stable/9/usr.sbin/etcupdate/etcupdate.sh stable/9/usr.sbin/pciconf/err.c Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) stable/9/share/man/man9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/sys/ (props changed) stable/9/tools/regression/lib/libc/ (props changed) stable/9/tools/regression/netinet/ (props changed) stable/9/usr.bin/procstat/ (props changed) stable/9/usr.bin/protect/ (props changed) stable/9/usr.sbin/etcupdate/ (props changed) stable/9/usr.sbin/pciconf/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libc/gen/_once_stub.c stable/10/lib/libc/include/compat.h stable/10/lib/libc/stdio/open_memstream.3 stable/10/lib/libc/stdio/open_memstream.c stable/10/lib/libc/stdio/open_wmemstream.c stable/10/lib/libc/sys/closefrom.2 stable/10/lib/libc/sys/procctl.2 stable/10/share/man/man9/BUS_BIND_INTR.9 stable/10/share/man/man9/BUS_CHILD_DELETED.9 stable/10/share/man/man9/BUS_CHILD_DETACHED.9 stable/10/share/man/man9/BUS_DESCRIBE_INTR.9 stable/10/share/man/man9/BUS_NEW_PASS.9 stable/10/share/man/man9/VOP_ADVISE.9 stable/10/share/man/man9/VOP_ALLOCATE.9 stable/10/share/man/man9/bus_adjust_resource.9 stable/10/share/man/man9/bus_generic_new_pass.9 stable/10/share/man/man9/bus_set_pass.9 stable/10/share/man/man9/refcount.9 stable/10/share/man/man9/sglist.9 stable/10/share/man/man9/shm_map.9 stable/10/sys/amd64/include/vm.h stable/10/sys/boot/i386/common/edd.h stable/10/sys/dev/pci/pci_subr.c stable/10/sys/i386/include/vm.h stable/10/sys/sys/procctl.h stable/10/sys/vm/sg_pager.c stable/10/sys/x86/acpica/srat.c stable/10/sys/x86/include/mca.h stable/10/sys/x86/pci/qpi.c stable/10/sys/x86/x86/mca.c stable/10/tools/regression/lib/libc/stdio/test-open_memstream.c stable/10/tools/regression/lib/libc/stdio/test-open_wmemstream.c stable/10/tools/regression/netinet/arphold/arphold.c stable/10/usr.bin/perror/perror.1 stable/10/usr.bin/perror/perror.c stable/10/usr.bin/procstat/procstat_rusage.c stable/10/usr.bin/protect/protect.1 stable/10/usr.bin/protect/protect.c stable/10/usr.sbin/bhyve/ioapic.c stable/10/usr.sbin/bhyve/ioapic.h stable/10/usr.sbin/bhyve/pci_irq.c stable/10/usr.sbin/bhyve/pci_irq.h stable/10/usr.sbin/bhyve/pm.c stable/10/usr.sbin/etcupdate/etcupdate.8 stable/10/usr.sbin/etcupdate/etcupdate.sh stable/10/usr.sbin/etcupdate/tests/always_test.sh stable/10/usr.sbin/etcupdate/tests/conflicts_test.sh stable/10/usr.sbin/etcupdate/tests/fbsdid_test.sh stable/10/usr.sbin/etcupdate/tests/ignore_test.sh stable/10/usr.sbin/etcupdate/tests/preworld_test.sh stable/10/usr.sbin/etcupdate/tests/tests_test.sh stable/10/usr.sbin/etcupdate/tests/tzsetup_test.sh stable/10/usr.sbin/pciconf/err.c stable/7/sys/amd64/amd64/mca.c stable/7/sys/amd64/include/mca.h stable/7/sys/amd64/include/vm.h stable/7/sys/i386/i386/mca.c stable/7/sys/i386/include/mca.h stable/7/sys/i386/include/vm.h stable/7/sys/vm/sg_pager.c stable/7/sys/x86/pci/qpi.c stable/8/lib/libc/gen/_once_stub.c stable/8/lib/libc/include/compat.h stable/8/lib/libc/sys/closefrom.2 stable/8/share/man/man9/BUS_BIND_INTR.9 stable/8/share/man/man9/BUS_DESCRIBE_INTR.9 stable/8/share/man/man9/BUS_NEW_PASS.9 stable/8/share/man/man9/bus_adjust_resource.9 stable/8/share/man/man9/bus_generic_new_pass.9 stable/8/share/man/man9/bus_set_pass.9 stable/8/share/man/man9/refcount.9 stable/8/share/man/man9/sglist.9 stable/8/share/man/man9/shm_map.9 stable/8/sys/amd64/include/mca.h stable/8/sys/amd64/include/vm.h stable/8/sys/boot/i386/common/edd.h stable/8/sys/i386/include/mca.h stable/8/sys/i386/include/vm.h stable/8/sys/vm/sg_pager.c stable/8/sys/x86/pci/qpi.c stable/8/sys/x86/x86/mca.c stable/8/tools/regression/file/closefrom/closefrom.c stable/8/tools/regression/netinet/arphold/arphold.c stable/8/tools/regression/usr.sbin/etcupdate/always.sh stable/8/tools/regression/usr.sbin/etcupdate/conflicts.sh stable/8/tools/regression/usr.sbin/etcupdate/fbsdid.sh stable/8/tools/regression/usr.sbin/etcupdate/ignore.sh stable/8/tools/regression/usr.sbin/etcupdate/preworld.sh stable/8/tools/regression/usr.sbin/etcupdate/tests.sh stable/8/tools/regression/usr.sbin/etcupdate/tzsetup.sh stable/8/usr.bin/perror/perror.1 stable/8/usr.bin/perror/perror.c stable/8/usr.sbin/etcupdate/etcupdate.8 stable/8/usr.sbin/etcupdate/etcupdate.sh stable/8/usr.sbin/pciconf/err.c Directory Properties: stable/10/ (props changed) stable/7/sys/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) stable/8/share/man/man9/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/i386/ (props changed) stable/8/sys/vm/ (props changed) stable/8/sys/x86/ (props changed) stable/8/usr.bin/perror/ (props changed) stable/8/usr.sbin/etcupdate/ (props changed) stable/8/usr.sbin/pciconf/ (props changed) Modified: stable/9/lib/libc/gen/_once_stub.c ============================================================================== --- stable/9/lib/libc/gen/_once_stub.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/lib/libc/gen/_once_stub.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/lib/libc/include/compat.h ============================================================================== --- stable/9/lib/libc/include/compat.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/lib/libc/include/compat.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/lib/libc/stdio/open_memstream.3 ============================================================================== --- stable/9/lib/libc/stdio/open_memstream.3 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/lib/libc/stdio/open_memstream.3 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/lib/libc/stdio/open_memstream.c ============================================================================== --- stable/9/lib/libc/stdio/open_memstream.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/lib/libc/stdio/open_memstream.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/lib/libc/stdio/open_wmemstream.c ============================================================================== --- stable/9/lib/libc/stdio/open_wmemstream.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/lib/libc/stdio/open_wmemstream.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/lib/libc/sys/closefrom.2 ============================================================================== --- stable/9/lib/libc/sys/closefrom.2 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/lib/libc/sys/closefrom.2 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/lib/libc/sys/procctl.2 ============================================================================== --- stable/9/lib/libc/sys/procctl.2 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/lib/libc/sys/procctl.2 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/share/man/man9/BUS_BIND_INTR.9 ============================================================================== --- stable/9/share/man/man9/BUS_BIND_INTR.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/share/man/man9/BUS_BIND_INTR.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/share/man/man9/BUS_CHILD_DELETED.9 ============================================================================== --- stable/9/share/man/man9/BUS_CHILD_DELETED.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/share/man/man9/BUS_CHILD_DELETED.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2012 Advanced Computing Technologies LLC +.\" Copyright (c) 2012 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/share/man/man9/BUS_DESCRIBE_INTR.9 ============================================================================== --- stable/9/share/man/man9/BUS_DESCRIBE_INTR.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/share/man/man9/BUS_DESCRIBE_INTR.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/share/man/man9/BUS_NEW_PASS.9 ============================================================================== --- stable/9/share/man/man9/BUS_NEW_PASS.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/share/man/man9/BUS_NEW_PASS.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/share/man/man9/bus_adjust_resource.9 ============================================================================== --- stable/9/share/man/man9/bus_adjust_resource.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/share/man/man9/bus_adjust_resource.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2011 Advanced Computing Technologies LLC +.\" Copyright (c) 2011 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/share/man/man9/bus_generic_new_pass.9 ============================================================================== --- stable/9/share/man/man9/bus_generic_new_pass.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/share/man/man9/bus_generic_new_pass.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/share/man/man9/bus_set_pass.9 ============================================================================== --- stable/9/share/man/man9/bus_set_pass.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/share/man/man9/bus_set_pass.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ .\" -*- nroff -*- .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/share/man/man9/refcount.9 ============================================================================== --- stable/9/share/man/man9/refcount.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/share/man/man9/refcount.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/share/man/man9/sglist.9 ============================================================================== --- stable/9/share/man/man9/sglist.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/share/man/man9/sglist.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/share/man/man9/shm_map.9 ============================================================================== --- stable/9/share/man/man9/shm_map.9 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/share/man/man9/shm_map.9 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2011 Advanced Computing Technologies LLC +.\" Copyright (c) 2011 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/sys/amd64/include/vm.h ============================================================================== --- stable/9/sys/amd64/include/vm.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/sys/amd64/include/vm.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/sys/boot/i386/common/edd.h ============================================================================== --- stable/9/sys/boot/i386/common/edd.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/sys/boot/i386/common/edd.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Advanced Computing Technologies LLC + * Copyright (c) 2011 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/sys/dev/pci/pci_subr.c ============================================================================== --- stable/9/sys/dev/pci/pci_subr.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/sys/dev/pci/pci_subr.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Advanced Computing Technologies LLC + * Copyright (c) 2011 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/sys/i386/include/vm.h ============================================================================== --- stable/9/sys/i386/include/vm.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/sys/i386/include/vm.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/sys/sys/procctl.h ============================================================================== --- stable/9/sys/sys/procctl.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/sys/sys/procctl.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/sys/vm/sg_pager.c ============================================================================== --- stable/9/sys/vm/sg_pager.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/sys/vm/sg_pager.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/sys/x86/acpica/srat.c ============================================================================== --- stable/9/sys/x86/acpica/srat.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/sys/x86/acpica/srat.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Advanced Computing Technologies LLC + * Copyright (c) 2010 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/sys/x86/include/mca.h ============================================================================== --- stable/9/sys/x86/include/mca.h Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/sys/x86/include/mca.h Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/sys/x86/pci/qpi.c ============================================================================== --- stable/9/sys/x86/pci/qpi.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/sys/x86/pci/qpi.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Advanced Computing Technologies LLC + * Copyright (c) 2010 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/sys/x86/x86/mca.c ============================================================================== --- stable/9/sys/x86/x86/mca.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/sys/x86/x86/mca.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/tools/regression/file/closefrom/closefrom.c ============================================================================== --- stable/9/tools/regression/file/closefrom/closefrom.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/tools/regression/file/closefrom/closefrom.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/tools/regression/lib/libc/stdio/test-open_memstream.c ============================================================================== --- stable/9/tools/regression/lib/libc/stdio/test-open_memstream.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/tools/regression/lib/libc/stdio/test-open_memstream.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/tools/regression/lib/libc/stdio/test-open_wmemstream.c ============================================================================== --- stable/9/tools/regression/lib/libc/stdio/test-open_wmemstream.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/tools/regression/lib/libc/stdio/test-open_wmemstream.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/tools/regression/netinet/arphold/arphold.c ============================================================================== --- stable/9/tools/regression/netinet/arphold/arphold.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/tools/regression/netinet/arphold/arphold.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Advanced Computing Technologies LLC + * Copyright (c) 2010 Hudson River Trading LLC * Written by George Neville-Neil gnn@freebsd.org * All rights reserved. * Modified: stable/9/tools/regression/usr.sbin/etcupdate/always.sh ============================================================================== --- stable/9/tools/regression/usr.sbin/etcupdate/always.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/tools/regression/usr.sbin/etcupdate/always.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/9/tools/regression/usr.sbin/etcupdate/conflicts.sh ============================================================================== --- stable/9/tools/regression/usr.sbin/etcupdate/conflicts.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/tools/regression/usr.sbin/etcupdate/conflicts.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/9/tools/regression/usr.sbin/etcupdate/fbsdid.sh ============================================================================== --- stable/9/tools/regression/usr.sbin/etcupdate/fbsdid.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/tools/regression/usr.sbin/etcupdate/fbsdid.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/9/tools/regression/usr.sbin/etcupdate/ignore.sh ============================================================================== --- stable/9/tools/regression/usr.sbin/etcupdate/ignore.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/tools/regression/usr.sbin/etcupdate/ignore.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/9/tools/regression/usr.sbin/etcupdate/preworld.sh ============================================================================== --- stable/9/tools/regression/usr.sbin/etcupdate/preworld.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/tools/regression/usr.sbin/etcupdate/preworld.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2013 Advanced Computing Technologies LLC +# Copyright (c) 2013 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/9/tools/regression/usr.sbin/etcupdate/tests.sh ============================================================================== --- stable/9/tools/regression/usr.sbin/etcupdate/tests.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/tools/regression/usr.sbin/etcupdate/tests.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010 Advanced Computing Technologies LLC +# Copyright (c) 2010 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/9/tools/regression/usr.sbin/etcupdate/tzsetup.sh ============================================================================== --- stable/9/tools/regression/usr.sbin/etcupdate/tzsetup.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/tools/regression/usr.sbin/etcupdate/tzsetup.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2013 Advanced Computing Technologies LLC +# Copyright (c) 2013 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/9/usr.bin/perror/perror.1 ============================================================================== --- stable/9/usr.bin/perror/perror.1 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/usr.bin/perror/perror.1 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2009 Advanced Computing Technologies LLC +.\" Copyright (c) 2009 Hudson River Trading LLC .\" Written by: George V. Neville-Neil .\" All rights reserved. .\" Modified: stable/9/usr.bin/perror/perror.c ============================================================================== --- stable/9/usr.bin/perror/perror.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/usr.bin/perror/perror.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: George V. Neville-Neil * All rights reserved. * Modified: stable/9/usr.bin/procstat/procstat_rusage.c ============================================================================== --- stable/9/usr.bin/procstat/procstat_rusage.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/usr.bin/procstat/procstat_rusage.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Advanced Computing Technologies LLC + * Copyright (c) 2012 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/usr.bin/protect/protect.1 ============================================================================== --- stable/9/usr.bin/protect/protect.1 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/usr.bin/protect/protect.1 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/usr.bin/protect/protect.c ============================================================================== --- stable/9/usr.bin/protect/protect.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/usr.bin/protect/protect.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * Modified: stable/9/usr.sbin/etcupdate/etcupdate.8 ============================================================================== --- stable/9/usr.sbin/etcupdate/etcupdate.8 Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/usr.sbin/etcupdate/etcupdate.8 Tue Jun 2 19:20:39 2015 (r283927) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2010-2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2010-2013 Hudson River Trading LLC .\" Written by: John H. Baldwin .\" All rights reserved. .\" Modified: stable/9/usr.sbin/etcupdate/etcupdate.sh ============================================================================== --- stable/9/usr.sbin/etcupdate/etcupdate.sh Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/usr.sbin/etcupdate/etcupdate.sh Tue Jun 2 19:20:39 2015 (r283927) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2010-2013 Advanced Computing Technologies LLC +# Copyright (c) 2010-2013 Hudson River Trading LLC # Written by: John H. Baldwin # All rights reserved. # Modified: stable/9/usr.sbin/pciconf/err.c ============================================================================== --- stable/9/usr.sbin/pciconf/err.c Tue Jun 2 19:15:13 2015 (r283926) +++ stable/9/usr.sbin/pciconf/err.c Tue Jun 2 19:20:39 2015 (r283927) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Advanced Computing Technologies LLC + * Copyright (c) 2012 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 20:29:59 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 454966EB; Tue, 2 Jun 2015 20:29:59 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3309E157A; Tue, 2 Jun 2015 20:29:59 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52KTxt5032333; Tue, 2 Jun 2015 20:29:59 GMT (envelope-from pjd@FreeBSD.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52KTx6r032332; Tue, 2 Jun 2015 20:29:59 GMT (envelope-from pjd@FreeBSD.org) Message-Id: <201506022029.t52KTx6r032332@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pjd set sender to pjd@FreeBSD.org using -f From: Pawel Jakub Dawidek Date: Tue, 2 Jun 2015 20:29: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: r283928 - stable/10/sbin/geom/class/eli 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 20:29:59 -0000 Author: pjd Date: Tue Jun 2 20:29:58 2015 New Revision: 283928 URL: https://svnweb.freebsd.org/changeset/base/283928 Log: MFC r265950 (by thomas): Add mention of metadata version 7 in FreeBSD 10.0. Modified: stable/10/sbin/geom/class/eli/geli.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/geom/class/eli/geli.8 ============================================================================== --- stable/10/sbin/geom/class/eli/geli.8 Tue Jun 2 19:20:39 2015 (r283927) +++ stable/10/sbin/geom/class/eli/geli.8 Tue Jun 2 20:29:58 2015 (r283928) @@ -1053,6 +1053,8 @@ metadata version supported by the given .It Li 8.2 Ta 5 .Pp .It Li 9.0 Ta 6 +.Pp +.It Li 10.0 Ta 7 .El .Sh AUTHORS .An Pawel Jakub Dawidek Aq pjd@FreeBSD.org From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 20:53:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79AD9D52; Tue, 2 Jun 2015 20:53:18 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 687C91C07; Tue, 2 Jun 2015 20:53:18 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52KrICV046681; Tue, 2 Jun 2015 20:53:18 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52KrIuk046680; Tue, 2 Jun 2015 20:53:18 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201506022053.t52KrIuk046680@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Jun 2015 20:53:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283929 - head/games/grdc 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 20:53:18 -0000 Author: emaste Date: Tue Jun 2 20:53:17 2015 New Revision: 283929 URL: https://svnweb.freebsd.org/changeset/base/283929 Log: Correct grdc(1) 12-hour display between 12:00 and 13:00 PM starts at 12:00, not 13:00. PR: 194291, 200133 Submitted by: Nick Price MFC after: 1 week Modified: head/games/grdc/grdc.c Modified: head/games/grdc/grdc.c ============================================================================== --- head/games/grdc/grdc.c Tue Jun 2 20:29:58 2015 (r283928) +++ head/games/grdc/grdc.c Tue Jun 2 20:53:17 2015 (r283929) @@ -150,14 +150,14 @@ main(int argc, char *argv[]) set(tm->tm_min/10, 14); if (t12) { - if (tm->tm_hour > 12) { - tm->tm_hour -= 12; - mvaddstr(YBASE + 5, XBASE + 52, "PM"); - } else { + if (tm->tm_hour < 12) { if (tm->tm_hour == 0) tm->tm_hour = 12; - mvaddstr(YBASE + 5, XBASE + 52, "AM"); + } else { + if (tm->tm_hour > 12) + tm->tm_hour -= 12; + mvaddstr(YBASE + 5, XBASE + 52, "PM"); } } From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 21:24:49 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B1A8656; Tue, 2 Jun 2015 21:24:49 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CC241356; Tue, 2 Jun 2015 21:24:49 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52LOnjO062200; Tue, 2 Jun 2015 21:24:49 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52LOm74062196; Tue, 2 Jun 2015 21:24:48 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201506022124.t52LOm74062196@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 2 Jun 2015 21:24: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: r283930 - in stable/10: share/mk sys/arm/conf sys/conf sys/modules/dtb 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 21:24:49 -0000 Author: imp Date: Tue Jun 2 21:24:47 2015 New Revision: 283930 URL: https://svnweb.freebsd.org/changeset/base/283930 Log: MFC: Merge r276846: Add infrastructure to build dtb files from dts files. Added: stable/10/share/mk/bsd.dtb.mk - copied unchanged from r276846, head/share/mk/bsd.dtb.mk stable/10/sys/conf/dtb.mk - copied, changed from r276846, head/sys/conf/dtb.mk stable/10/sys/modules/dtb/ - copied from r276846, head/sys/modules/dtb/ Modified: stable/10/share/mk/Makefile stable/10/sys/arm/conf/ATMEL Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/Makefile ============================================================================== --- stable/10/share/mk/Makefile Tue Jun 2 20:53:17 2015 (r283929) +++ stable/10/share/mk/Makefile Tue Jun 2 21:24:47 2015 (r283930) @@ -11,6 +11,7 @@ FILES= \ bsd.crunchgen.mk \ bsd.dep.mk \ bsd.doc.mk \ + bsd.dtb.mk \ bsd.endian.mk \ bsd.files.mk \ bsd.incs.mk \ Copied: stable/10/share/mk/bsd.dtb.mk (from r276846, head/share/mk/bsd.dtb.mk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/mk/bsd.dtb.mk Tue Jun 2 21:24:47 2015 (r283930, copy of r276846, head/share/mk/bsd.dtb.mk) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +# Search for kernel source tree in standard places. +.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \ + ${.CURDIR}/../../../../.. /sys /usr/src/sys +.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk) +SYSDIR= ${_dir} +.endif +.endfor +.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \ + !exists(${SYSDIR}/conf/kmod.mk) +.error Unable to locate the kernel source tree. Set SYSDIR to override. +.endif + +.include "${SYSDIR}/conf/dtb.mk" + +.include Modified: stable/10/sys/arm/conf/ATMEL ============================================================================== --- stable/10/sys/arm/conf/ATMEL Tue Jun 2 20:53:17 2015 (r283929) +++ stable/10/sys/arm/conf/ATMEL Tue Jun 2 21:24:47 2015 (r283930) @@ -15,7 +15,7 @@ makeoptions KERNVIRTADDR=0xc0000000 options KERNPHYSADDR=0x20000000 options KERNVIRTADDR=0xc0000000 -makeoptions MODULES_OVERRIDE="" +makeoptions MODULES_OVERRIDE="dtb/atmel" # list all boards here, but not just yet (no multiboard in mainline). options ARM_MANY_BOARD Copied and modified: stable/10/sys/conf/dtb.mk (from r276846, head/sys/conf/dtb.mk) ============================================================================== --- head/sys/conf/dtb.mk Thu Jan 8 18:28:06 2015 (r276846, copy source) +++ stable/10/sys/conf/dtb.mk Tue Jun 2 21:24:47 2015 (r283930) @@ -29,7 +29,7 @@ .include # Grab all the options for a kernel build. For backwards compat, we need to # do this after bsd.own.mk. -.include "kern.opts.mk" +#.include "kern.opts.mk" # commented out to minize difference with 11.x and newer # Search for kernel source tree in standard places. .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 21:36:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2AF3947; Tue, 2 Jun 2015 21:36:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0A271622; Tue, 2 Jun 2015 21:36:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52Laji1067577; Tue, 2 Jun 2015 21:36:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52LajY7067576; Tue, 2 Jun 2015 21:36:45 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201506022136.t52LajY7067576@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 2 Jun 2015 21:36: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: r283931 - stable/10/sys/arm/arm 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 21:36:46 -0000 Author: imp Date: Tue Jun 2 21:36:45 2015 New Revision: 283931 URL: https://svnweb.freebsd.org/changeset/base/283931 Log: MFC: r283014: Disable unmapped I/O: it is broken for unaligned pages r283126: Fix comments Modified: stable/10/sys/arm/arm/pmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/pmap.c ============================================================================== --- stable/10/sys/arm/arm/pmap.c Tue Jun 2 21:24:47 2015 (r283930) +++ stable/10/sys/arm/arm/pmap.c Tue Jun 2 21:36:45 2015 (r283931) @@ -4324,7 +4324,13 @@ pmap_copy_page(vm_page_t src, vm_page_t pmap_copy_page_func(VM_PAGE_TO_PHYS(src), VM_PAGE_TO_PHYS(dst)); } -int unmapped_buf_allowed = 1; +/* + * We have code to do unmapped I/O. However, it isn't quite right and + * causes un-page-aligned I/O to devices to fail (most notably newfs + * or fsck). We give up a little performance to not allow unmapped I/O + * to gain stability. + */ +int unmapped_buf_allowed = 0; void pmap_copy_pages(vm_page_t ma[], vm_offset_t a_offset, vm_page_t mb[], From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 22:23:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B31E7435; Tue, 2 Jun 2015 22:23:21 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1CB0111D; Tue, 2 Jun 2015 22:23:21 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52MNL5x094103; Tue, 2 Jun 2015 22:23:21 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52MNLbp094102; Tue, 2 Jun 2015 22:23:21 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201506022223.t52MNLbp094102@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 2 Jun 2015 22:23:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283933 - head/sys/boot/forth 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 22:23:21 -0000 Author: dteske Date: Tue Jun 2 22:23:20 2015 New Revision: 283933 URL: https://svnweb.freebsd.org/changeset/base/283933 Log: Add comments to indicate where the flag for later abort" originates. MFC after: 3 days X-MFC-to: stable/10 Modified: head/sys/boot/forth/support.4th Modified: head/sys/boot/forth/support.4th ============================================================================== --- head/sys/boot/forth/support.4th Tue Jun 2 22:05:33 2015 (r283932) +++ head/sys/boot/forth/support.4th Tue Jun 2 22:23:20 2015 (r283933) @@ -1437,12 +1437,12 @@ also builtins abort" Unable to load a kernel!" ; -: load_xen ( -- ) +: load_xen ( -- flag ) s" xen_kernel" getenv dup -1 <> if - 1 1 load + 1 1 load ( c-addr/u flag N -- flag ) else drop - 0 + 0 ( -1 -- flag ) then ; From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 22:39:17 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1C79874D; Tue, 2 Jun 2015 22:39:17 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B0FF13CC; Tue, 2 Jun 2015 22:39:17 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52MdG7l000268; Tue, 2 Jun 2015 22:39:16 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52MdGPQ000267; Tue, 2 Jun 2015 22:39:16 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201506022239.t52MdGPQ000267@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 2 Jun 2015 22:39:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283934 - head/sys/dev/iwi 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 22:39:17 -0000 Author: glebius Date: Tue Jun 2 22:39:16 2015 New Revision: 283934 URL: https://svnweb.freebsd.org/changeset/base/283934 Log: The argument passed to the iwi_update_wme() is softc, not ieee80211com. This fatal mismatch appeared to be absolutely harmless, since both structs have pointer to struct ifnet as their first member, and they both point to the same ifnet. And the first member is the only one used from the argument. Modified: head/sys/dev/iwi/if_iwi.c Modified: head/sys/dev/iwi/if_iwi.c ============================================================================== --- head/sys/dev/iwi/if_iwi.c Tue Jun 2 22:23:20 2015 (r283933) +++ head/sys/dev/iwi/if_iwi.c Tue Jun 2 22:39:16 2015 (r283934) @@ -1083,8 +1083,7 @@ iwi_wme_setparams(struct iwi_softc *sc, static void iwi_update_wme(void *arg, int npending) { - struct ieee80211com *ic = arg; - struct iwi_softc *sc = ic->ic_ifp->if_softc; + struct iwi_softc *sc = arg; IWI_LOCK_DECL; IWI_LOCK(sc); From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 22:45:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 18AE69A9; Tue, 2 Jun 2015 22:45:29 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E260B165E; Tue, 2 Jun 2015 22:45:28 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52MjSwu004855; Tue, 2 Jun 2015 22:45:28 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52MjSWx004854; Tue, 2 Jun 2015 22:45:28 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201506022245.t52MjSWx004854@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 2 Jun 2015 22:45:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283935 - head/sys/dev/iwi 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 22:45:29 -0000 Author: glebius Date: Tue Jun 2 22:45:28 2015 New Revision: 283935 URL: https://svnweb.freebsd.org/changeset/base/283935 Log: Make the last revision compilable. Remove extra argument from iwi_wme_setparams(), a softc has 1 to 1 accordance with ieee80211com. Modified: head/sys/dev/iwi/if_iwi.c Modified: head/sys/dev/iwi/if_iwi.c ============================================================================== --- head/sys/dev/iwi/if_iwi.c Tue Jun 2 22:39:16 2015 (r283934) +++ head/sys/dev/iwi/if_iwi.c Tue Jun 2 22:45:28 2015 (r283935) @@ -154,7 +154,7 @@ static void iwi_node_free(struct ieee802 static void iwi_media_status(struct ifnet *, struct ifmediareq *); static int iwi_newstate(struct ieee80211vap *, enum ieee80211_state, int); static void iwi_wme_init(struct iwi_softc *); -static int iwi_wme_setparams(struct iwi_softc *, struct ieee80211com *); +static int iwi_wme_setparams(struct iwi_softc *); static void iwi_update_wme(void *, int); static int iwi_wme_update(struct ieee80211com *); static uint16_t iwi_read_prom_word(struct iwi_softc *, uint8_t); @@ -1059,8 +1059,9 @@ iwi_wme_init(struct iwi_softc *sc) } static int -iwi_wme_setparams(struct iwi_softc *sc, struct ieee80211com *ic) +iwi_wme_setparams(struct iwi_softc *sc) { + struct ieee80211com *ic = sc->sc_ifp->if_l2com; const struct wmeParams *wmep; int ac; @@ -1087,7 +1088,7 @@ iwi_update_wme(void *arg, int npending) IWI_LOCK_DECL; IWI_LOCK(sc); - (void) iwi_wme_setparams(sc, ic); + (void) iwi_wme_setparams(sc); IWI_UNLOCK(sc); } @@ -2946,7 +2947,7 @@ iwi_auth_and_assoc(struct iwi_softc *sc, if ((vap->iv_flags & IEEE80211_F_WME) && ni->ni_ies.wme_ie != NULL) { /* NB: don't treat WME setup as failure */ - if (iwi_wme_setparams(sc, ic) == 0 && iwi_wme_setie(sc) == 0) + if (iwi_wme_setparams(sc) == 0 && iwi_wme_setie(sc) == 0) assoc->policy |= htole16(IWI_POLICY_WME); /* XXX complain on failure? */ } From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 23:11:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CDF1444A; Tue, 2 Jun 2015 23:11:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD0D51CCA; Tue, 2 Jun 2015 23:11:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52NBDBr017119; Tue, 2 Jun 2015 23:11:13 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52NBDNm017118; Tue, 2 Jun 2015 23:11:13 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201506022311.t52NBDNm017118@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 2 Jun 2015 23:11:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283936 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 02 Jun 2015 23:11:13 -0000 Author: mav Date: Tue Jun 2 23:11:12 2015 New Revision: 283936 URL: https://svnweb.freebsd.org/changeset/base/283936 Log: Restore AHCI quirks printing as base16. smh@ at r278034 made it base17, that is somewhat odd. :) MFC after: 3 days Modified: head/sys/dev/ahci/ahci.h Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Tue Jun 2 22:45:28 2015 (r283935) +++ head/sys/dev/ahci/ahci.h Tue Jun 2 23:11:12 2015 (r283936) @@ -578,7 +578,7 @@ enum ahci_err_type { #define AHCI_Q_RESTORE_CAP 0x00080000 #define AHCI_Q_BIT_STRING \ - "\021" \ + "\020" \ "\001NOFORCE" \ "\002NOPMP" \ "\003NONCQ" \ From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 02:50:59 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A4B3662; Wed, 3 Jun 2015 02:50:59 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46E611E90; Wed, 3 Jun 2015 02:50:59 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t532oxkA032119; Wed, 3 Jun 2015 02:50:59 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t532oxae032118; Wed, 3 Jun 2015 02:50:59 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506030250.t532oxae032118@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 3 Jun 2015 02:50: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: r283937 - stable/10/sys/netipsec 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 02:50:59 -0000 Author: ae Date: Wed Jun 3 02:50:58 2015 New Revision: 283937 URL: https://svnweb.freebsd.org/changeset/base/283937 Log: MFC r283146: In the reply to SADB_X_SPDGET message use the same sequence number that was in the request. Some IKE deamons expect it will the same. Linux and NetBSD also follow this behaviour. PR: 137309 Modified: stable/10/sys/netipsec/key.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netipsec/key.c ============================================================================== --- stable/10/sys/netipsec/key.c Tue Jun 2 23:11:12 2015 (r283936) +++ stable/10/sys/netipsec/key.c Wed Jun 3 02:50:58 2015 (r283937) @@ -2226,7 +2226,7 @@ key_spddelete2(struct socket *so, struct } /* - * SADB_X_GET processing + * SADB_X_SPDGET processing * receive * * from the user(?), @@ -2264,7 +2264,8 @@ key_spdget(struct socket *so, struct mbu return key_senderror(so, m, ENOENT); } - n = key_setdumpsp(sp, SADB_X_SPDGET, 0, mhp->msg->sadb_msg_pid); + n = key_setdumpsp(sp, SADB_X_SPDGET, mhp->msg->sadb_msg_seq, + mhp->msg->sadb_msg_pid); KEY_FREESP(&sp); if (n != NULL) { m_freem(m); From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 06:02:50 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23ED6E33; Wed, 3 Jun 2015 06:02:50 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 135511B2B; Wed, 3 Jun 2015 06:02:50 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5362nWg028194; Wed, 3 Jun 2015 06:02:49 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5362n3r028193; Wed, 3 Jun 2015 06:02:49 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506030602.t5362n3r028193@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 3 Jun 2015 06:02:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283938 - head 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 06:02:50 -0000 Author: bapt Date: Wed Jun 3 06:02:49 2015 New Revision: 283938 URL: https://svnweb.freebsd.org/changeset/base/283938 Log: mandoc's makewhatis requires gnuzip to be in the path when deadling with with compressed manpages. This should fix spam during installworld: "exec: No such file or directory" Reported by: many Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Jun 3 02:50:58 2015 (r283937) +++ head/Makefile.inc1 Wed Jun 3 06:02:49 2015 (r283938) @@ -1366,7 +1366,8 @@ _kerberos5_bootstrap_tools= \ .if ${MK_MANDOCDB} != "no" _libohash?= lib/libohash _makewhatis= lib/libsqlite3 \ - usr.bin/mandoc + usr.bin/mandoc \ + usr.bin/gzip ${_bt}-usr.bin/mandoc: ${_bt}-lib/libohash ${_bt}-lib/libsqlite3 .else _makewhatis=usr.bin/makewhatis From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 06:38:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FB6B2DD for ; Wed, 3 Jun 2015 06:38:18 +0000 (UTC) (envelope-from leo@globebloom.com) Received: from smtpbg299.qq.com (smtpbg299.qq.com [184.105.67.99]) (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 08A4C11E6 for ; Wed, 3 Jun 2015 06:38:14 +0000 (UTC) (envelope-from leo@globebloom.com) X-QQ-mid: bizesmtp1t1433313484t100t217 Received: from PNWMSVFF0MUCQZE (unknown [114.111.167.210]) by esmtp4.qq.com (ESMTP) with SMTP id 0 for ; Wed, 03 Jun 2015 14:38:02 +0800 (CST) X-QQ-SSF: 01100000002000F0Fd22000A0000000 X-QQ-FEAT: 9NFkmNiL4heWgwYC4GXfhnNId/d4bjT9ZIiyMQhaKsW+s8XGPj97fZQ+I2i4R FeezmH0MzeXdWk0vMbO75lnv+9GLeuEZFSu3du5h4Xi/sAax+72FOLSq1g12x26BnTVbeWb zuyTP0Df/tbVfpIASG9sfktpZw+MZlXBK2wlK73V+qRpcdANcNPzvPnw5D3/8YDaSQmjPjm k49nd6o8FOdC6H2dlFCcc/mUPzvpMawuSnJ/HHIW7WJaAL0V0q/W7 X-QQ-GoodBg: 0 Date: Wed, 3 Jun 2015 14:38:00 +0800 From: "Leo Jiang SS&HN" To: svn-src-all Subject: Shall we can visit your factory or office? X-Priority: 3 X-GUID: 2D773C7D-A537-433C-9A8F-6621577BAE5A X-Has-Attach: no X-Mailer: Foxmail 7, 2, 5, 140[cn] Mime-Version: 1.0 Message-ID: <2015060314375917151868@globebloom.com> X-QQ-SENDSIZE: 520 X-QQ-FName: 33BE97F9522D4F63BADB6E9F0EC57FC6 X-QQ-LocalIP: 112.95.241.173 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 06:38:18 -0000 RGVhciBTaXINCg0KV2Ugd2lsbCBnbyB0byB0aGUgVUFFICZVSyB0byB0YWtlIHBhcnQgaW4gdGhl IGV4aGliaXRpb24gYWxzbyB2aXNpdCBvdXIgY3VzdG9tZXIgYXQgT2N0Lg0KU2hhbGwgd2UgY2Fu IHZpc2l0IHlvdXIgZmFjdG9yeSBvciBvZmZpY2U/DQoNCkFzIHRoZSBiaWdnZXN0IG1hbnVmYWN0 dXJlIGluIENoaW5hLCBDIFN0cnV0LyBCUyBFTjYxMzg2LTEgZ2FsdmFuaXplZCBjb25kdWl0L0VN VCBjb25kdWl0JkFjY2Vzc29yaWVzL0ZsZXhpYmxlIGNvbmR1aXQgYWxsIGluY2x1ZGluZyBvdXIg TWFpbiBwcm9kdWN0cy4gV2UgZ2xhZCB0byBpbnZpdGVkIHlvdSB2aXNpdGVkIG91ciBmYWN0b3J5 Lg0KDQpJZiB5b3UgYWdyZWUgd2l0aCB0aGF0IHBscyByZXBseSBtZSxsZXQgZWFybiBlYWNob3Ro ZXIuDQoNCkJlc3QgcmVnYXJkcw0KTGVvIGppYW5nDQoNCg0KDQoNClNTJkhOIElORFVTVFJZIEdS T1VQDQpMRU8gSklBTkcNClNLWVBFOmppYW5nLnlpbmd6ZSBPUiBnbG9iZWJsb29tMDAwMQ0KVGVs Ojg2IDAxMCA1MjQ4NDAyMiAgTW9iaWxlIFBob25lOjg2IDE4NjQ4MzI2MTIyKFdIQVRTIEFQUCkN CkFERFJFU1M6Uk9PTSAxMjA1ICxKSU5IQUlTSEFOR0ZVIENFTlRFUiAsQlVJTERJTkcgQixEQUpJ QU9USU5HIERJU1RSSUNLVCAuMTAwMDI4LEJFSUpJTkcgQ0hJTkEuDQo= From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 06:39:46 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC51C332; Wed, 3 Jun 2015 06:39:46 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 6EACC11F0; Wed, 3 Jun 2015 06:39:45 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 7546542811F; Wed, 3 Jun 2015 16:39:35 +1000 (AEST) Date: Wed, 3 Jun 2015 16:39:32 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Baptiste Daroussin cc: Bruce Evans , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r283842 - head/usr.sbin/pw In-Reply-To: <20150601180501.GA7523@ivaldir.etoilebsd.net> Message-ID: <20150603155545.E1331@besplex.bde.org> References: <201505312207.t4VM73Vh015383@svn.freebsd.org> <20150601143951.J863@besplex.bde.org> <20150601180501.GA7523@ivaldir.etoilebsd.net> 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=BoBgutj5 c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=0lsTka3QrQbgM_JBd40A:9 a=EoK6N0YADXpUK65B:21 a=a6pfpDM_nVtj1rF-:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 06:39:46 -0000 On Mon, 1 Jun 2015, Baptiste Daroussin wrote: > On Mon, Jun 01, 2015 at 03:36:58PM +1000, Bruce Evans wrote: >> On Sun, 31 May 2015, Baptiste Daroussin wrote: >> >>> Log: >>> Remove useless cast in printf and printf-like functions: >>> use %u for uid_t and gid_t >> >> The cast was not useless. It was to avoid the assumption that the default >> promotion of uid_t and gid_t is anything in particular. Now it is assumed >> that the default promotion is unsigned (int works too, but this is subtler). >> >> uids and gids are only guaranteed to have non-negative values. In >> POSIX before about 2001, uid_t and gid_t can be any type that can >> represent all the values taken on, so can be floating point. Floating >> point was rarely used for POSIX types, and most programs make too many >> assumptions about types, so POSIX now requires uid_t and gid_t to be >> integer types. Then can still be signed integer types IIRC. Nornally >> it is a bug to print signed integer types with unsigned integer formats, >> but since uids and gids are guaranteed to be non-negative both formats >> work. (pids require different handling since they are overloaded to >> hold process group ids as negative values, so pid_t is signed and %u >> format is very broken for printing general pids.) > > Well uid_t is defined as an unsigned int (__uint32_t actually) if it is ever > going to be changed to something else they at least it will now raise a warning. The definition is an implementation detail. Knowing this detail defeats the point of using typedefs. > I consider using %u here is less buggy than the previous casts. The casts were almost 100% correct (only had sign mismatches) when written in ~1996 before C99 added uintmax_t and broke unsigned long. Using %u don't even attempt to preserve the 1996 level of correctness/ carefulness. pw is badly written so I'm surprised that it was this careful. chpass from 4.4BSD at least uses strtoul() to parse uids and gids, although it has many of the usual errors in such use (first it blindly assigns the result of strtoul() to a uid_t. Then it has a bogus check for ids being (uid_t)ULONG_MAX. It is isn't clear if this is one of the usual errors in the use of strto*(), or just an obfuscated way of checking that the special id (uid_t)-1 is not input...) chpass int 4.4BSD was improved from chpass in Net/2 by switching from atoi() to strtoul(). Note that unless you further switch all these strto*()s to strtoumax(), ids larger than ULONG_MAX are just unsupported, so uid_t can't be larger than uint32_t on 32-bit arches, and all the casts to u_long remained 100% correct within this limit. This shows that C99's breakage of long is much more than for printing. All input methods that were careful enough to use strtol() or strtoul() to parse values represented by typedefed integer types are now broken unless they have been changed to use strtoimax or stroumax() (or more usually, because the types are still no larger than long or u_long). It will take a few more rounds of expansion before the larger types are common. On i386, u_long must remains 32 bits and use of 64 bits for any basic type will cause much the same bugs as use of it for off_t. On amd64, u_long must remain 64 bits and it will take use of __int128_t to break things. Bruce From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 08:56:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05EAB8FE; Wed, 3 Jun 2015 08:56:01 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x22f.google.com (mail-qk0-x22f.google.com [IPv6:2607:f8b0:400d:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B67101337; Wed, 3 Jun 2015 08:56:00 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qkoo18 with SMTP id o18so1490692qko.1; Wed, 03 Jun 2015 01:56:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=XpYdcAQb/zTy86fj40GnXsKoU8uexsbIaWaAM3q5z1I=; b=KxUXvfRpRBPBvKUa8tH6ZCt+QL7nhDSCLXr627ZhOB2eH9Sy0LXAMO83doWwqiDY+2 yhJVvStwtywgRrW+ZWAwo6s7A/it+bFOflMatWIoDidrfWKDPNLmwPlI9IJbh0zk69LR t5TRN9QY97qoLqoxJ7lMMTD8J0cLeNhkibesM97DWy/hlB7pdP0xwVTIcbZzPgtKbuU0 OuilzaZEz57Uo7Wi8hZsVWGTk9ua0XZmd+FKVf9gX+Xz/BarMY/YR3msBbUb+omDAiNH VwNsvs69wW+3KLfNwiGfGHDZkwJU3QfwHTN7gesfN5nitRmfhaOypxEl4Mk0uSFm9jiH WzdA== MIME-Version: 1.0 X-Received: by 10.55.16.146 with SMTP id 18mr55570083qkq.39.1433321759918; Wed, 03 Jun 2015 01:55:59 -0700 (PDT) Received: by 10.140.98.73 with HTTP; Wed, 3 Jun 2015 01:55:59 -0700 (PDT) In-Reply-To: <201506030602.t5362n3r028193@svn.freebsd.org> References: <201506030602.t5362n3r028193@svn.freebsd.org> Date: Wed, 3 Jun 2015 01:55:59 -0700 Message-ID: Subject: Re: svn commit: r283938 - head From: NGie Cooper To: Baptiste Daroussin Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 08:56:01 -0000 On Tue, Jun 2, 2015 at 11:02 PM, Baptiste Daroussin wrote: > Author: bapt > Date: Wed Jun 3 06:02:49 2015 > New Revision: 283938 > URL: https://svnweb.freebsd.org/changeset/base/283938 > > Log: > mandoc's makewhatis requires gnuzip to be in the path when deadling with > with compressed manpages. > > This should fix spam during installworld: "exec: No such file or directory" > > Reported by: many This needs some liblegacy love... https://jenkins.freebsd.org/job/FreeBSD_HEAD_i386/229/console From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 09:01:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1BC5BFA; Wed, 3 Jun 2015 09:01:45 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 739F3158B; Wed, 3 Jun 2015 09:01:45 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wiga1 with SMTP id a1so6414194wig.0; Wed, 03 Jun 2015 02:01:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=FgIfhDyxMd4IEST3s0YRw2mOp0cYiIcOZ5o4667XVQI=; b=UNmkcdZIaEuM5wuLu6SeQNRv4tLQd+MG/azlft1dxSvxU2B9tt3Pzn0/rjWO2A1OoR yg6PST7QWiexPkxBrCL4CVj1OunGh3nKovVz7cDb2D0FUKmDPM556Tqv9yEQmIR7yUuk B4c3TJ8yYt9X0fWpQLd3K4YGRlIL/8G/br3WHlTLLeCKZ/yIjmvtouM6la+tMKe4E1PZ P7DR5dWp6Mbfzau+kmPntdxqIIuzYVH7gHcIfSYqreMV1f8Yg3KN1YJXaq0vr/czqeSO DajN0GzZbG4UCiiGfN2At3dcSt4F27rZcxAKa6y5X17/noxKEoSJNkUUqlh17gAXkGMj E9GQ== X-Received: by 10.194.178.201 with SMTP id da9mr49935369wjc.139.1433322103928; Wed, 03 Jun 2015 02:01:43 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id uc9sm60827wjc.7.2015.06.03.02.01.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jun 2015 02:01:42 -0700 (PDT) Sender: Baptiste Daroussin Date: Wed, 3 Jun 2015 11:01:40 +0200 From: Baptiste Daroussin To: NGie Cooper Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r283938 - head Message-ID: <20150603090139.GA32562@ivaldir.etoilebsd.net> References: <201506030602.t5362n3r028193@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2fHTh5uZTiUOsy+g" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 09:01:45 -0000 --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 03, 2015 at 01:55:59AM -0700, NGie Cooper wrote: > On Tue, Jun 2, 2015 at 11:02 PM, Baptiste Daroussin wr= ote: > > Author: bapt > > Date: Wed Jun 3 06:02:49 2015 > > New Revision: 283938 > > URL: https://svnweb.freebsd.org/changeset/base/283938 > > > > Log: > > mandoc's makewhatis requires gnuzip to be in the path when deadling w= ith > > with compressed manpages. > > > > This should fix spam during installworld: "exec: No such file or dire= ctory" > > > > Reported by: many >=20 > This needs some liblegacy love... Yes I need to make that happen, but I won't be able to do anything before 2= 1h CEST Best regards, Bapt --2fHTh5uZTiUOsy+g Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlVuwnMACgkQ8kTtMUmk6ExUcACgijGjGd8Mf6hAO2IIJy9ZNuE2 ab8An0fxD3OOddm+Jzf0wnz4Ak9Dc6B5 =B9P5 -----END PGP SIGNATURE----- --2fHTh5uZTiUOsy+g-- From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 10:03:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 217AC64A; Wed, 3 Jun 2015 10:03:39 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AF763143A; Wed, 3 Jun 2015 10:03:38 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: by wifw1 with SMTP id w1so15462526wif.0; Wed, 03 Jun 2015 03:03:37 -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=+R25y/hC/JZVTfM7GxaSsw9IKSZTnNaBm8GfaSZ35AA=; b=0tTBlklllTYaXbn1z40nEpncWqbN6kWzxd/MZjMWgIHJumIltVsFl8+bCiB8WQe2zB aekCTODmbXUTxGAz5KsWY4bTTt9n4BdYchr9Kahz3DB9G8kCmyOGLUPBd6PInJY6dDTO LQQv4ncMPCiFdL99vpp90jDXUWkGoCgZ9Gq0fKwD/fKTWfk1vhAp//kkKnkc+JuCOfLs XfbDpB6vBt9qElv7r00/NRqnlHpYuu5Uhe7sQyZ0NJyI4XNMQ1nWntf6m7zFRazV8nHa 1KS394DqPw4xgcAWd3VvU2gqrWpUYWldJu87G2V4M73ortYfz7skoQdySuWIhl14ADkP Z3xQ== MIME-Version: 1.0 X-Received: by 10.194.82.167 with SMTP id j7mr60389035wjy.123.1433325817115; Wed, 03 Jun 2015 03:03:37 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.27.100.214 with HTTP; Wed, 3 Jun 2015 03:03:37 -0700 (PDT) In-Reply-To: <201506030602.t5362n3r028193@svn.freebsd.org> References: <201506030602.t5362n3r028193@svn.freebsd.org> Date: Wed, 3 Jun 2015 13:03:37 +0300 X-Google-Sender-Auth: bbM5ysDMBpB8NJ72OoZsD2Ut5uk Message-ID: Subject: Re: svn commit: r283938 - head From: Sergey Kandaurov To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 10:03:39 -0000 On 3 June 2015 at 09:02, Baptiste Daroussin wrote: > Author: bapt > Date: Wed Jun 3 06:02:49 2015 > New Revision: 283938 > URL: https://svnweb.freebsd.org/changeset/base/283938 > > Log: > mandoc's makewhatis requires gnuzip to be in the path when deadling with > with compressed manpages. > [pluknet@omg] man gnuzip No manual entry for gnuzip Looks like a typo in "gzip", which is the name for the compressing format as described in RFC 1952, and of the utility that implements it. The implementation that is included in base is BSD-licensed and has no relationship with GNU project. As from usr.bin/gzip/gzip.c * gzip.c -- GPL free gzip using zlib. -- wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 10:10:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F434851; Wed, 3 Jun 2015 10:10:01 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C278147C; Wed, 3 Jun 2015 10:10:01 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53AA1te049061; Wed, 3 Jun 2015 10:10:01 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53AA1ch049060; Wed, 3 Jun 2015 10:10:01 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506031010.t53AA1ch049060@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 3 Jun 2015 10:10:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283939 - head/sys/boot/userboot/userboot 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 10:10:01 -0000 Author: avg Date: Wed Jun 3 10:10:00 2015 New Revision: 283939 URL: https://svnweb.freebsd.org/changeset/base/283939 Log: userboot: enable bzipfs support Additionally, sort all real filesystems before the virtual ones. Differential Revision: https://reviews.freebsd.org/D2709 Reviewed by: grehan MFC after: 5 days Modified: head/sys/boot/userboot/userboot/conf.c Modified: head/sys/boot/userboot/userboot/conf.c ============================================================================== --- head/sys/boot/userboot/userboot/conf.c Wed Jun 3 06:02:49 2015 (r283938) +++ head/sys/boot/userboot/userboot/conf.c Wed Jun 3 10:10:00 2015 (r283939) @@ -65,10 +65,11 @@ struct fs_ops *file_system[] = { &host_fsops, &ufs_fsops, &cd9660_fsops, - &gzipfs_fsops, #if defined(USERBOOT_ZFS_SUPPORT) &zfs_fsops, #endif + &gzipfs_fsops, + &bzipfs_fsops, NULL }; From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 11:25:10 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CA79432; Wed, 3 Jun 2015 11:25:10 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id B9146175F; Wed, 3 Jun 2015 11:25:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) 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 OAA09396; Wed, 03 Jun 2015 14:25:00 +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 1Z06n6-0003K6-59; Wed, 03 Jun 2015 14:25:00 +0300 Message-ID: <556EE3D3.6030608@FreeBSD.org> Date: Wed, 03 Jun 2015 14:24:03 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Sergey Kandaurov , Baptiste Daroussin CC: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r283938 - head References: <201506030602.t5362n3r028193@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 11:25:10 -0000 On 03/06/2015 13:03, Sergey Kandaurov wrote: > On 3 June 2015 at 09:02, Baptiste Daroussin wrote: >> Author: bapt >> Date: Wed Jun 3 06:02:49 2015 >> New Revision: 283938 >> URL: https://svnweb.freebsd.org/changeset/base/283938 >> >> Log: >> mandoc's makewhatis requires gnuzip to be in the path when deadling with >> with compressed manpages. >> > > [pluknet@omg] man gnuzip > No manual entry for gnuzip > > Looks like a typo in "gzip", which is the name for the compressing format > as described in RFC 1952, and of the utility that implements it. I suspect that it's simpler and "gunzip" was intended :) > The implementation that is included in base is BSD-licensed and has no > relationship with GNU project. > > As from usr.bin/gzip/gzip.c > > * gzip.c -- GPL free gzip using zlib. > -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 11:36:48 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C869F774; Wed, 3 Jun 2015 11:36:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B613819D2; Wed, 3 Jun 2015 11:36:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53Bamrs094883; Wed, 3 Jun 2015 11:36:48 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53Bamfg094882; Wed, 3 Jun 2015 11:36:48 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201506031136.t53Bamfg094882@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Jun 2015 11:36: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: r283940 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 11:36:48 -0000 Author: emaste Date: Wed Jun 3 11:36:47 2015 New Revision: 283940 URL: https://svnweb.freebsd.org/changeset/base/283940 Log: MFC r257736 (by pjd): - Remove mac_get_fd/mac_set_fd - those are not syscalls. The __mac_get_fd() and __mac_set_fd() syscalls are listed earlier. - Correct typo in syscall name. It should be sched_rr_get_interval, not sched_rr_getinterval. Modified: stable/10/sys/kern/capabilities.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/capabilities.conf ============================================================================== --- stable/10/sys/kern/capabilities.conf Wed Jun 3 10:10:00 2015 (r283939) +++ stable/10/sys/kern/capabilities.conf Wed Jun 3 11:36:47 2015 (r283940) @@ -386,13 +386,6 @@ listen lseek ## -## Allow MAC label operations by file descriptor, subject to capability -## rights. -## -mac_get_fd -mac_set_fd - -## ## Allow simple VM operations on the current process. ## madvise @@ -552,7 +545,7 @@ sched_get_priority_min ## sched_getparam sched_getscheduler -sched_rr_getinterval +sched_rr_get_interval sched_setparam sched_setscheduler sched_yield From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 11:39:30 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 487AD8F1; Wed, 3 Jun 2015 11:39:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3677C19FA; Wed, 3 Jun 2015 11:39:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53BdUWI095449; Wed, 3 Jun 2015 11:39:30 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53BdUXJ095448; Wed, 3 Jun 2015 11:39:30 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201506031139.t53BdUXJ095448@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Jun 2015 11:39: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: r283941 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 11:39:30 -0000 Author: emaste Date: Wed Jun 3 11:39:29 2015 New Revision: 283941 URL: https://svnweb.freebsd.org/changeset/base/283941 Log: Regen for r283940. Modified: stable/10/sys/kern/init_sysent.c Modified: stable/10/sys/kern/init_sysent.c ============================================================================== --- stable/10/sys/kern/init_sysent.c Wed Jun 3 11:36:47 2015 (r283940) +++ stable/10/sys/kern/init_sysent.c Wed Jun 3 11:39:29 2015 (r283941) @@ -368,7 +368,7 @@ struct sysent sysent[] = { { 0, (sy_call_t *)sys_sched_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 331 = sched_yield */ { AS(sched_get_priority_max_args), (sy_call_t *)sys_sched_get_priority_max, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 332 = sched_get_priority_max */ { AS(sched_get_priority_min_args), (sy_call_t *)sys_sched_get_priority_min, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 333 = sched_get_priority_min */ - { AS(sched_rr_get_interval_args), (sy_call_t *)sys_sched_rr_get_interval, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 334 = sched_rr_get_interval */ + { AS(sched_rr_get_interval_args), (sy_call_t *)sys_sched_rr_get_interval, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 334 = sched_rr_get_interval */ { AS(utrace_args), (sy_call_t *)sys_utrace, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 335 = utrace */ { compat4(AS(freebsd4_sendfile_args),sendfile), AUE_SENDFILE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 336 = freebsd4 sendfile */ { AS(kldsym_args), (sy_call_t *)sys_kldsym, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 337 = kldsym */ From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 13:10:26 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B56E5E44; Wed, 3 Jun 2015 13:10:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89A5B10BB; Wed, 3 Jun 2015 13:10:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53DAQVD041701; Wed, 3 Jun 2015 13:10:26 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53DAQSH041699; Wed, 3 Jun 2015 13:10:26 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201506031310.t53DAQSH041699@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Jun 2015 13:10: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: r283942 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 13:10:26 -0000 Author: emaste Date: Wed Jun 3 13:10:25 2015 New Revision: 283942 URL: https://svnweb.freebsd.org/changeset/base/283942 Log: MFC r259436,259437 by pjd: Allow for pselect(2) in capability mode. Modified: stable/10/sys/kern/capabilities.conf stable/10/sys/kern/init_sysent.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/capabilities.conf ============================================================================== --- stable/10/sys/kern/capabilities.conf Wed Jun 3 11:39:29 2015 (r283941) +++ stable/10/sys/kern/capabilities.conf Wed Jun 3 13:10:25 2015 (r283942) @@ -559,10 +559,11 @@ sctp_generic_sendmsg_iov sctp_peeloff ## -## Allow select(2), which will be scoped by capability rights. +## Allow pselect(2) and select(2), which will be scoped by capability rights. ## ## XXXRW: But is it? ## +pselect select ## Modified: stable/10/sys/kern/init_sysent.c ============================================================================== --- stable/10/sys/kern/init_sysent.c Wed Jun 3 11:39:29 2015 (r283941) +++ stable/10/sys/kern/init_sysent.c Wed Jun 3 13:10:25 2015 (r283942) @@ -556,7 +556,7 @@ struct sysent sysent[] = { { AS(pdkill_args), (sy_call_t *)sys_pdkill, AUE_PDKILL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 519 = pdkill */ { AS(pdgetpid_args), (sy_call_t *)sys_pdgetpid, AUE_PDGETPID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 520 = pdgetpid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 521 = pdwait4 */ - { AS(pselect_args), (sy_call_t *)sys_pselect, AUE_SELECT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 522 = pselect */ + { AS(pselect_args), (sy_call_t *)sys_pselect, AUE_SELECT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 522 = pselect */ { AS(getloginclass_args), (sy_call_t *)sys_getloginclass, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 523 = getloginclass */ { AS(setloginclass_args), (sy_call_t *)sys_setloginclass, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 524 = setloginclass */ { AS(rctl_get_racct_args), (sy_call_t *)sys_rctl_get_racct, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 525 = rctl_get_racct */ From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 13:12:10 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C12DFAE; Wed, 3 Jun 2015 13:12:10 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 107761289; Wed, 3 Jun 2015 13:12:10 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53DC92b045094; Wed, 3 Jun 2015 13:12:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53DC9Yr045092; Wed, 3 Jun 2015 13:12:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201506031312.t53DC9Yr045092@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Jun 2015 13:12:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283943 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 13:12:10 -0000 Author: emaste Date: Wed Jun 3 13:12:08 2015 New Revision: 283943 URL: https://svnweb.freebsd.org/changeset/base/283943 Log: MFC r261220 by csjp: Allow sigwait(2) in capabilities mode. It's common for multi-threaded processes to create a thread for the purpose of synchronously processing signals. Allow such processes to utilize a capabilities sandbox. Modified: stable/10/sys/kern/capabilities.conf stable/10/sys/kern/init_sysent.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/capabilities.conf ============================================================================== --- stable/10/sys/kern/capabilities.conf Wed Jun 3 13:10:25 2015 (r283942) +++ stable/10/sys/kern/capabilities.conf Wed Jun 3 13:12:08 2015 (r283943) @@ -667,6 +667,7 @@ sigsuspend sigtimedwait sigvec sigwaitinfo +sigwait ## ## Allow creating new socket pairs with socket(2) and socketpair(2). Modified: stable/10/sys/kern/init_sysent.c ============================================================================== --- stable/10/sys/kern/init_sysent.c Wed Jun 3 13:10:25 2015 (r283942) +++ stable/10/sys/kern/init_sysent.c Wed Jun 3 13:12:08 2015 (r283943) @@ -463,7 +463,7 @@ struct sysent sysent[] = { { AS(__acl_set_link_args), (sy_call_t *)sys___acl_set_link, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 426 = __acl_set_link */ { AS(__acl_delete_link_args), (sy_call_t *)sys___acl_delete_link, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 427 = __acl_delete_link */ { AS(__acl_aclcheck_link_args), (sy_call_t *)sys___acl_aclcheck_link, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 428 = __acl_aclcheck_link */ - { AS(sigwait_args), (sy_call_t *)sys_sigwait, AUE_SIGWAIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 429 = sigwait */ + { AS(sigwait_args), (sy_call_t *)sys_sigwait, AUE_SIGWAIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 429 = sigwait */ { AS(thr_create_args), (sy_call_t *)sys_thr_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 430 = thr_create */ { AS(thr_exit_args), (sy_call_t *)sys_thr_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 431 = thr_exit */ { AS(thr_self_args), (sy_call_t *)sys_thr_self, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 432 = thr_self */ From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 13:32:30 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17CD65CF; Wed, 3 Jun 2015 13:32:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E031617E8; Wed, 3 Jun 2015 13:32:29 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53DWTJo055077; Wed, 3 Jun 2015 13:32:29 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53DWTXU055075; Wed, 3 Jun 2015 13:32:29 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506031332.t53DWTXU055075@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 3 Jun 2015 13:32:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283945 - in head: contrib/mdocml usr.bin/mandoc 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 13:32:30 -0000 Author: bapt Date: Wed Jun 3 13:32:28 2015 New Revision: 283945 URL: https://svnweb.freebsd.org/changeset/base/283945 Log: Replace the gunzip(1) system by a minimalistic zlib based implementation. This allows to not depend on gunzip(1) at bootstrap time, and is good enough to wait for upstream real implementation using zlib. Modified: head/contrib/mdocml/read.c head/usr.bin/mandoc/Makefile Modified: head/contrib/mdocml/read.c ============================================================================== --- head/contrib/mdocml/read.c Wed Jun 3 13:26:15 2015 (r283944) +++ head/contrib/mdocml/read.c Wed Jun 3 13:32:28 2015 (r283945) @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -35,6 +36,7 @@ #include #include #include +#include #include "mandoc.h" #include "mandoc_aux.h" @@ -792,6 +794,27 @@ mparse_readfd(struct mparse *curp, int f return(curp->file_status); } +/* + * hack to avoid depending on gnuzip(1) waiting for upstream proper + * support + */ +static int +gunzip(const char *file) +{ + gzFile gz; + char buf[8192]; + int r; + + gz = gzopen(file, "r"); + if (gz == NULL) + err(EXIT_FAILURE, "cannot open %s", file); + + while ((r = gzread(gz, buf, sizeof(buf))) > 0) + fwrite(buf, 1, r, stdout); + + gzclose(gz); + return (EXIT_SUCCESS); +} enum mandoclevel mparse_open(struct mparse *curp, int *fd, const char *file) { @@ -846,9 +869,7 @@ mparse_open(struct mparse *curp, int *fd perror("dup"); exit((int)MANDOCLEVEL_SYSERR); } - execlp("gunzip", "gunzip", "-c", file, NULL); - perror("exec"); - exit((int)MANDOCLEVEL_SYSERR); + exit(gunzip(file)); default: close(pfd[1]); *fd = pfd[0]; Modified: head/usr.bin/mandoc/Makefile ============================================================================== --- head/usr.bin/mandoc/Makefile Wed Jun 3 13:26:15 2015 (r283944) +++ head/usr.bin/mandoc/Makefile Wed Jun 3 13:32:28 2015 (r283945) @@ -84,6 +84,6 @@ WARNS?= 2 CFLAGS+= -DHAVE_CONFIG_H \ -I${.CURDIR}/../../lib/libohash/ \ -I${.CURDIR}/../../contrib/sqlite3 -LIBADD= ohash sqlite3 +LIBADD= ohash sqlite3 z .include From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 13:43:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2B8990D; Wed, 3 Jun 2015 13:43:04 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1EF01A45; Wed, 3 Jun 2015 13:43:04 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53Dh4Rb060046; Wed, 3 Jun 2015 13:43:04 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53Dh4Gu060045; Wed, 3 Jun 2015 13:43:04 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506031343.t53Dh4Gu060045@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 3 Jun 2015 13:43:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283946 - head 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 13:43:04 -0000 Author: bapt Date: Wed Jun 3 13:43:04 2015 New Revision: 283946 URL: https://svnweb.freebsd.org/changeset/base/283946 Log: Revert r283938 it is not needed anymore and broken gzip(1) cannot be used as bootstrap tools as it depends on syscalls that only exists on HEAD Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Jun 3 13:32:28 2015 (r283945) +++ head/Makefile.inc1 Wed Jun 3 13:43:04 2015 (r283946) @@ -1366,8 +1366,7 @@ _kerberos5_bootstrap_tools= \ .if ${MK_MANDOCDB} != "no" _libohash?= lib/libohash _makewhatis= lib/libsqlite3 \ - usr.bin/mandoc \ - usr.bin/gzip + usr.bin/mandoc ${_bt}-usr.bin/mandoc: ${_bt}-lib/libohash ${_bt}-lib/libsqlite3 .else _makewhatis=usr.bin/makewhatis From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 14:07:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25ED6D7C; Wed, 3 Jun 2015 14:07:52 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 144DD1F16; Wed, 3 Jun 2015 14:07:52 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53E7pbY070462; Wed, 3 Jun 2015 14:07:51 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53E7pDX070458; Wed, 3 Jun 2015 14:07:51 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201506031407.t53E7pDX070458@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 3 Jun 2015 14:07:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283947 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 14:07:52 -0000 Author: ian Date: Wed Jun 3 14:07:50 2015 New Revision: 283947 URL: https://svnweb.freebsd.org/changeset/base/283947 Log: Better handling of userland sysarch() requests to flush icache. On armv6, cache maintenance can trigger page faults. Add handling so that these turn into SIGSEGV that kills the process rather than panics that kill the kernel. Differential Revision: https://reviews.freebsd.org/D2035 Submitted by: Michal Meloun Modified: head/sys/arm/arm/cpu_asm-v6.S head/sys/arm/arm/sys_machdep.c head/sys/arm/arm/trap-v6.c Modified: head/sys/arm/arm/cpu_asm-v6.S ============================================================================== --- head/sys/arm/arm/cpu_asm-v6.S Wed Jun 3 13:43:04 2015 (r283946) +++ head/sys/arm/arm/cpu_asm-v6.S Wed Jun 3 14:07:50 2015 (r283947) @@ -26,6 +26,7 @@ * * $FreeBSD$ */ +#include "assym.s" #include #include @@ -33,6 +34,17 @@ #include #include +#if __ARM_ARCH >= 6 +#define GET_PCB(tmp) \ + mrc CP15_TPIDRPRW(tmp); \ + add tmp, tmp, #(TD_PCB) +#else +.Lcurpcb: + .word _C_LABEL(__pcpu) + PC_CURPCB +#define GET_PCB(tmp) \ + ldr tmp, .Lcurpcb +#endif + /* * Define cache functions used by startup code, which counts on the fact that * only r0-r3,r12 (ip) are modified and no stack space is used. These functions @@ -208,3 +220,59 @@ ASENTRY_NP(dcache_wbinv_poc_all) bx lr #endif /* __ARM_ARCH == 6 */ END(dcache_wbinv_poc_all) + +ASENTRY_NP(dcache_wb_pou_checked) + ldr ip, .Lcpuinfo + ldr ip, [ip, #DCACHE_LINE_SIZE] + + GET_PCB(r2) + ldr r2, [r2] + + adr r3, _C_LABEL(cachebailout) + str r3, [r2, #PCB_ONFAULT] +1: + mcr CP15_DCCMVAC(r0) + add r0, r0, ip + subs r1, r1, ip + bhi 1b + DSB + mov r0, #0 + str r0, [r2, #PCB_ONFAULT] + mov r0, #1 /* cannot be faulting address */ + RET + +.Lcpuinfo: + .word cpuinfo +END(dcache_wb_pou_checked) + +ASENTRY_NP(icache_inv_pou_checked) + ldr ip, .Lcpuinfo + ldr ip, [ip, #ICACHE_LINE_SIZE] + + GET_PCB(r2) + ldr r2, [r2] + + adr r3, _C_LABEL(cachebailout) + str r3, [r2, #PCB_ONFAULT] + +1: + mcr CP15_ICIMVAU(r0) + add r0, r0, ip + subs r1, r1, ip + bhi 1b + DSB + ISB + mov r0, #0 + str r0, [r2, #PCB_ONFAULT] + mov r0, #1 /* cannot be faulting address */ + RET +END(icache_inv_pou_checked) + +/* label must be global as trap-v6.c references it */ + .global _C_LABEL(cachebailout) +_C_LABEL(cachebailout): + DSB + ISB + mov r1, #0 + str r1, [r2, #PCB_ONFAULT] + RET Modified: head/sys/arm/arm/sys_machdep.c ============================================================================== --- head/sys/arm/arm/sys_machdep.c Wed Jun 3 13:43:04 2015 (r283946) +++ head/sys/arm/arm/sys_machdep.c Wed Jun 3 14:07:50 2015 (r283947) @@ -41,8 +41,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include +#include #ifndef _SYS_SYSPROTO_H_ struct sysarch_args { @@ -55,16 +59,89 @@ struct sysarch_args { static int arm32_sync_icache (struct thread *, void *); static int arm32_drain_writebuf(struct thread *, void *); +#if __ARM_ARCH >= 6 +static int +sync_icache(uintptr_t addr, size_t len) +{ + size_t size; + vm_offset_t rv; + + /* + * Align starting address to even number because value of "1" + * is used as return value for success. + */ + len += addr & 1; + addr &= ~1; + + /* Break whole range to pages. */ + do { + size = PAGE_SIZE - (addr & PAGE_MASK); + size = min(size, len); + rv = dcache_wb_pou_checked(addr, size); + if (rv == 1) /* see dcache_wb_pou_checked() */ + rv = icache_inv_pou_checked(addr, size); + if (rv != 1) { + if (!useracc((void *)addr, size, VM_PROT_READ)) { + /* Invalid access */ + return (rv); + } + /* Valid but unmapped page - skip it. */ + } + len -= size; + addr += size; + } while (len > 0); + + /* Invalidate branch predictor buffer. */ + bpb_inv_all(); + return (1); +} +#endif + static int arm32_sync_icache(struct thread *td, void *args) { struct arm_sync_icache_args ua; int error; + ksiginfo_t ksi; +#if __ARM_ARCH >= 6 + vm_offset_t rv; +#endif if ((error = copyin(args, &ua, sizeof(ua))) != 0) return (error); + if (ua.len == 0) { + td->td_retval[0] = 0; + return (0); + } + + /* + * Validate arguments. Address and length are unsigned, + * so we can use wrapped overflow check. + */ + if (((ua.addr + ua.len) < ua.addr) || + ((ua.addr + ua.len) > VM_MAXUSER_ADDRESS)) { + ksiginfo_init_trap(&ksi); + ksi.ksi_signo = SIGSEGV; + ksi.ksi_code = SEGV_ACCERR; + ksi.ksi_addr = (void *)max(ua.addr, VM_MAXUSER_ADDRESS); + trapsignal(td, &ksi); + return (EINVAL); + } + +#if __ARM_ARCH >= 6 + rv = sync_icache(ua.addr, ua.len); + if (rv != 1) { + ksiginfo_init_trap(&ksi); + ksi.ksi_signo = SIGSEGV; + ksi.ksi_code = SEGV_MAPERR; + ksi.ksi_addr = (void *)rv; + trapsignal(td, &ksi); + return (EINVAL); + } +#else cpu_icache_sync_range(ua.addr, ua.len); +#endif td->td_retval[0] = 0; return (0); Modified: head/sys/arm/arm/trap-v6.c ============================================================================== --- head/sys/arm/arm/trap-v6.c Wed Jun 3 13:43:04 2015 (r283946) +++ head/sys/arm/arm/trap-v6.c Wed Jun 3 14:07:50 2015 (r283947) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #endif extern char fusubailout[]; +extern char cachebailout[]; #ifdef DEBUG int last_fault_code; /* For the benefit of pmap_fault_fixup() */ @@ -133,7 +134,7 @@ static const struct abort aborts[] = { {abort_align, "Alignment Fault"}, {abort_fatal, "Debug Event"}, {NULL, "Access Bit (L1)"}, - {abort_icache, "Instruction cache maintenance"}, + {NULL, "Instruction cache maintenance"}, {NULL, "Translation Fault (L1)"}, {NULL, "Access Bit (L2)"}, {NULL, "Translation Fault (L2)"}, @@ -406,6 +407,24 @@ abort_handler(struct trapframe *tf, int } /* + * Don't pass faulting cache operation to vm_fault(). We don't want + * to handle all vm stuff at this moment. + */ + pcb = td->td_pcb; + if (__predict_false(pcb->pcb_onfault == cachebailout)) { + tf->tf_r0 = far; /* return failing address */ + tf->tf_pc = (register_t)pcb->pcb_onfault; + return; + } + + /* Handle remaining I cache aborts. */ + if (idx == FAULT_ICACHE) { + if (abort_icache(tf, idx, fsr, far, prefetch, td, &ksig)) + goto do_trapsignal; + goto out; + } + + /* * At this point, we're dealing with one of the following aborts: * * FAULT_TRAN_xx - Translation From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 14:48:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 774028D0; Wed, 3 Jun 2015 14:48:04 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65AB1199A; Wed, 3 Jun 2015 14:48:04 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53Em4je090710; Wed, 3 Jun 2015 14:48:04 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53Em4Gn090709; Wed, 3 Jun 2015 14:48:04 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201506031448.t53Em4Gn090709@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 3 Jun 2015 14:48:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283948 - head/sys/dev/dwc 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 14:48:04 -0000 Author: loos Date: Wed Jun 3 14:48:03 2015 New Revision: 283948 URL: https://svnweb.freebsd.org/changeset/base/283948 Log: Fix the OACTIVE handling on if_dwc. Previously the OACTIVE flag was being set when the tx descriptors are fully allocated but it wasn't unset anywhere. As soon as a packet is transmitted, unset the OACTIVE flag and call start routine to push any pending packets from the tx queue. This closes another race where a full tx queue would jam the tx path (tx queue is full, new packets cannot be added to queue and dwc_txstart never gets called). Modified: head/sys/dev/dwc/if_dwc.c Modified: head/sys/dev/dwc/if_dwc.c ============================================================================== --- head/sys/dev/dwc/if_dwc.c Wed Jun 3 14:07:50 2015 (r283947) +++ head/sys/dev/dwc/if_dwc.c Wed Jun 3 14:48:03 2015 (r283948) @@ -741,9 +741,11 @@ dwc_txfinish_locked(struct dwc_softc *sc { struct dwc_bufmap *bmap; struct dwc_hwdesc *desc; + struct ifnet *ifp; DWC_ASSERT_LOCKED(sc); + fp = sc->ifp; while (sc->tx_idx_tail != sc->tx_idx_head) { desc = &sc->txdesc_ring[sc->tx_idx_tail]; if ((desc->tdes0 & DDESC_TDES0_OWN) != 0) @@ -756,6 +758,7 @@ dwc_txfinish_locked(struct dwc_softc *sc bmap->mbuf = NULL; dwc_setup_txdesc(sc, sc->tx_idx_tail, 0, 0); sc->tx_idx_tail = next_txidx(sc, sc->tx_idx_tail); + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; } /* If there are no buffers outstanding, muzzle the watchdog. */ @@ -838,8 +841,10 @@ dwc_intr(void *arg) if (reg & DMA_STATUS_RI) dwc_rxfinish_locked(sc); - if (reg & DMA_STATUS_TI) + if (reg & DMA_STATUS_TI) { dwc_txfinish_locked(sc); + dwc_txstart_locked(sc); + } } if (reg & DMA_STATUS_AIS) { From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 14:52:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95DF7A8D; Wed, 3 Jun 2015 14:52:34 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-ob0-x22f.google.com (mail-ob0-x22f.google.com [IPv6:2607:f8b0:4003:c01::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 59CFF1BC6; Wed, 3 Jun 2015 14:52:34 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by obcnx10 with SMTP id nx10so9577582obc.2; Wed, 03 Jun 2015 07:52:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=2zbt0wbcdTsuFZnGTIJDUJef2akQqoLNN6ASSgGAEbc=; b=nZZxZu2dHIfSmgp61X4Tnii3u/Qo1B017TQSu+qJuzJfL4L2Asp86EY48aCv4mCvTr b4GGKYpkectjb8VBG+SEYz2ohwJmLVHCaTYvuT7r+5D3Ho4piwGt3cGeBYUJDHQGRNxt 5/oT8OYZmPPKoq5ZY5nVgk4Rsh1CRtBSxt+kjKw1LkkbHXysqcYi/MnlE9BIOU6cdhgz DYZyBapoAKEkJDp3Hd+MHFqxTjO9LZ7N7Xn3MOvsVU7IFAGLmkJZtpEtQD9BTp7M6qhG 50qgYvrZ7Y8BD46gEyACh0qU8PsKHh1CtCgrrH6ypGxtQ1fxb/fB2vbeuTalr+rINEKU Ohog== MIME-Version: 1.0 X-Received: by 10.60.93.42 with SMTP id cr10mr20601921oeb.74.1433343153747; Wed, 03 Jun 2015 07:52:33 -0700 (PDT) Received: by 10.202.11.193 with HTTP; Wed, 3 Jun 2015 07:52:33 -0700 (PDT) Received: by 10.202.11.193 with HTTP; Wed, 3 Jun 2015 07:52:33 -0700 (PDT) Reply-To: araujo@FreeBSD.org In-Reply-To: <201506031448.t53Em4Gn090709@svn.freebsd.org> References: <201506031448.t53Em4Gn090709@svn.freebsd.org> Date: Wed, 3 Jun 2015 22:52:33 +0800 Message-ID: Subject: Re: svn commit: r283948 - head/sys/dev/dwc From: Marcelo Araujo To: Luiz Otavio O Souza Cc: svn-src-head@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 14:52:34 -0000 Oi, fp = sc->ifp; Deveria ser: ifp = sc->ifp; []s On Jun 3, 2015 10:48 PM, "Luiz Otavio O Souza" wrote: > Author: loos > Date: Wed Jun 3 14:48:03 2015 > New Revision: 283948 > URL: https://svnweb.freebsd.org/changeset/base/283948 > > Log: > Fix the OACTIVE handling on if_dwc. > > Previously the OACTIVE flag was being set when the tx descriptors are > fully > allocated but it wasn't unset anywhere. > > As soon as a packet is transmitted, unset the OACTIVE flag and call start > routine to push any pending packets from the tx queue. > > This closes another race where a full tx queue would jam the tx path (tx > queue is full, new packets cannot be added to queue and dwc_txstart never > gets called). > > Modified: > head/sys/dev/dwc/if_dwc.c > > Modified: head/sys/dev/dwc/if_dwc.c > > ============================================================================== > --- head/sys/dev/dwc/if_dwc.c Wed Jun 3 14:07:50 2015 (r283947) > +++ head/sys/dev/dwc/if_dwc.c Wed Jun 3 14:48:03 2015 (r283948) > @@ -741,9 +741,11 @@ dwc_txfinish_locked(struct dwc_softc *sc > { > struct dwc_bufmap *bmap; > struct dwc_hwdesc *desc; > + struct ifnet *ifp; > > DWC_ASSERT_LOCKED(sc); > > + fp = sc->ifp; > while (sc->tx_idx_tail != sc->tx_idx_head) { > desc = &sc->txdesc_ring[sc->tx_idx_tail]; > if ((desc->tdes0 & DDESC_TDES0_OWN) != 0) > @@ -756,6 +758,7 @@ dwc_txfinish_locked(struct dwc_softc *sc > bmap->mbuf = NULL; > dwc_setup_txdesc(sc, sc->tx_idx_tail, 0, 0); > sc->tx_idx_tail = next_txidx(sc, sc->tx_idx_tail); > + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; > } > > /* If there are no buffers outstanding, muzzle the watchdog. */ > @@ -838,8 +841,10 @@ dwc_intr(void *arg) > if (reg & DMA_STATUS_RI) > dwc_rxfinish_locked(sc); > > - if (reg & DMA_STATUS_TI) > + if (reg & DMA_STATUS_TI) { > dwc_txfinish_locked(sc); > + dwc_txstart_locked(sc); > + } > } > > if (reg & DMA_STATUS_AIS) { > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 15:02:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB900470; Wed, 3 Jun 2015 15:02:14 +0000 (UTC) (envelope-from loos.br@gmail.com) Received: from mail-la0-x22d.google.com (mail-la0-x22d.google.com [IPv6:2a00:1450:4010:c03::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F2921E4E; Wed, 3 Jun 2015 15:02:14 +0000 (UTC) (envelope-from loos.br@gmail.com) Received: by labpy14 with SMTP id py14so10451663lab.0; Wed, 03 Jun 2015 08:02:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=HyroETHIR8WhEnTtGuU6YYkspLggEpvURax8SEGq2+8=; b=VUvCPdPBQJ2OSd2N1ow82K//9eNFB/LoKukTkR9KUAeyis2Ou+v4Qfg50JZuXK+VAU upMeQ2eytASCc7GMBmbH+8GHuKb+BKH8AYhBmzkHk8GyR9rXh15a/SIpjHdj3c35gKQv gKe+Wn+H1/uHonq0dqpK+JG3AFSB/+xTqW0i7JO9BVBlqpCDhr08h9UhByUZHjsf9oT0 zDat3u6Rz3yW5LZsWsQ0Qkh85xw9hoIzKnDfVNwATKhSToFMQLV+p/7bjmVouGQWGLKi ORaDybwwGnAwfE3ii/bFXfxhbcDyrkwiF6Ha7gmdLyrHPGN+zD8O7zKEG6jzto8Vx8x9 0ioQ== MIME-Version: 1.0 X-Received: by 10.112.242.40 with SMTP id wn8mr32701715lbc.57.1433343732390; Wed, 03 Jun 2015 08:02:12 -0700 (PDT) Received: by 10.112.154.166 with HTTP; Wed, 3 Jun 2015 08:02:12 -0700 (PDT) In-Reply-To: References: <201506031448.t53Em4Gn090709@svn.freebsd.org> Date: Wed, 3 Jun 2015 12:02:12 -0300 Message-ID: Subject: Re: svn commit: r283948 - head/sys/dev/dwc From: Luiz Otavio O Souza To: araujo@freebsd.org Cc: Luiz Otavio O Souza , svn-src-head@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 15:02:14 -0000 On Wed, Jun 3, 2015 at 11:52 AM, Marcelo Araujo wrote: > Oi, > > fp = sc->ifp; > > Deveria ser: > > ifp = sc->ifp; > > []s > Yeah, I caught the conflict when merging back to my work sources. Obrigado Marcelo. Luiz From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 15:18:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3DB6D9A; Wed, 3 Jun 2015 15:18:32 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D265E113B; Wed, 3 Jun 2015 15:18:32 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53FIWHo006073; Wed, 3 Jun 2015 15:18:32 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53FIWXT006071; Wed, 3 Jun 2015 15:18:32 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201506031518.t53FIWXT006071@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 3 Jun 2015 15:18:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283949 - head/sys/dev/dwc 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 15:18:33 -0000 Author: loos Date: Wed Jun 3 15:18:32 2015 New Revision: 283949 URL: https://svnweb.freebsd.org/changeset/base/283949 Log: Fix wrong variable name in the previous commit. Pointy hat to: loos Reported by: araujo Modified: head/sys/dev/dwc/if_dwc.c Modified: head/sys/dev/dwc/if_dwc.c ============================================================================== --- head/sys/dev/dwc/if_dwc.c Wed Jun 3 14:48:03 2015 (r283948) +++ head/sys/dev/dwc/if_dwc.c Wed Jun 3 15:18:32 2015 (r283949) @@ -745,7 +745,7 @@ dwc_txfinish_locked(struct dwc_softc *sc DWC_ASSERT_LOCKED(sc); - fp = sc->ifp; + ifp = sc->ifp; while (sc->tx_idx_tail != sc->tx_idx_head) { desc = &sc->txdesc_ring[sc->tx_idx_tail]; if ((desc->tdes0 & DDESC_TDES0_OWN) != 0) From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 15:22:53 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8115FB3; Wed, 3 Jun 2015 15:22:53 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-ob0-x231.google.com (mail-ob0-x231.google.com [IPv6:2607:f8b0:4003:c01::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6C11013B6; Wed, 3 Jun 2015 15:22:53 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by objn8 with SMTP id n8so10441571obj.3; Wed, 03 Jun 2015 08:22:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=ytuzVsw2rYQzdi+EOSKwUbrbnOUbWJ1pp2mdDt1YgSk=; b=UdE0bQ3syiJLLhtw2B0KXh5Yj6IPkkYX85UQ+zvfNYMaaqm8iGxC4LqVCKom1Gus66 ldExNQlYvcmTigS8hjkzWEnoW8N3VNbdbpzznq2p/foByddi3K551f3GZv9i7B7KuWzq e2GRGKRL0SLQb7Pja1MdoKBLsm5cjCiyTeYjvRrcEPrWkhWhHphAe/PWWrosEzluv+wJ kbXCTkeLe2DhgJa9lrNirhUN1xxkLpLqd44nrDPtMK/0OWJ92j4h+wX/BlPQjcIybyFV uD1S5jRAy8QzHW19yNKCcfjbccqnJTLmbtgVoH1iV+TS2wpNhUC7x8AzDtFX9MCapLJm OXLQ== MIME-Version: 1.0 X-Received: by 10.182.91.35 with SMTP id cb3mr28250559obb.87.1433344972817; Wed, 03 Jun 2015 08:22:52 -0700 (PDT) Received: by 10.202.11.193 with HTTP; Wed, 3 Jun 2015 08:22:52 -0700 (PDT) Received: by 10.202.11.193 with HTTP; Wed, 3 Jun 2015 08:22:52 -0700 (PDT) Reply-To: araujo@FreeBSD.org In-Reply-To: <201506031518.t53FIWXT006071@svn.freebsd.org> References: <201506031518.t53FIWXT006071@svn.freebsd.org> Date: Wed, 3 Jun 2015 23:22:52 +0800 Message-ID: Subject: Re: svn commit: r283949 - head/sys/dev/dwc From: Marcelo Araujo To: Luiz Otavio O Souza Cc: svn-src-head@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 15:22:53 -0000 Thanks Luiz, and sorry the email that I sent in Portuguese, that one should be addressed only to you. Best, On Jun 3, 2015 11:18 PM, "Luiz Otavio O Souza" wrote: > Author: loos > Date: Wed Jun 3 15:18:32 2015 > New Revision: 283949 > URL: https://svnweb.freebsd.org/changeset/base/283949 > > Log: > Fix wrong variable name in the previous commit. > > Pointy hat to: loos > Reported by: araujo > > Modified: > head/sys/dev/dwc/if_dwc.c > > Modified: head/sys/dev/dwc/if_dwc.c > > ============================================================================== > --- head/sys/dev/dwc/if_dwc.c Wed Jun 3 14:48:03 2015 (r283948) > +++ head/sys/dev/dwc/if_dwc.c Wed Jun 3 15:18:32 2015 (r283949) > @@ -745,7 +745,7 @@ dwc_txfinish_locked(struct dwc_softc *sc > > DWC_ASSERT_LOCKED(sc); > > - fp = sc->ifp; > + ifp = sc->ifp; > while (sc->tx_idx_tail != sc->tx_idx_head) { > desc = &sc->txdesc_ring[sc->tx_idx_tail]; > if ((desc->tdes0 & DDESC_TDES0_OWN) != 0) > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 15:32:45 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8761C3D9; Wed, 3 Jun 2015 15:32:45 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 730591696; Wed, 3 Jun 2015 15:32:45 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53FWjsx015139; Wed, 3 Jun 2015 15:32:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53FWhND015132; Wed, 3 Jun 2015 15:32:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201506031532.t53FWhND015132@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 3 Jun 2015 15:32: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: r283950 - in stable/10/sys: dev/sound/pcm dev/sound/usb 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 15:32:45 -0000 Author: hselasky Date: Wed Jun 3 15:32:43 2015 New Revision: 283950 URL: https://svnweb.freebsd.org/changeset/base/283950 Log: MFC r282650 and r282651: Extend the maximum number of allowed PCM channels in a PCM stream to 127 and decrease the maximum number of sub-channels to 1. These definitions are only used inside the kernel and can be changed later if more than one sub-channel is desired. This has been done to allow so-called USB audio rack modules to work with FreeBSD. Add support for more than 8 audio channels per PCM stream for USB audio class compliant devices under FreeBSD. Tested using 16 recording and 16 playback audio channels simultaneously. Bump the FreeBSD version to force recompiling all external modules. Modified: stable/10/sys/dev/sound/pcm/channel.c stable/10/sys/dev/sound/pcm/channel.h stable/10/sys/dev/sound/pcm/feeder_chain.c stable/10/sys/dev/sound/pcm/sound.h stable/10/sys/dev/sound/usb/uaudio.c stable/10/sys/sys/param.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/pcm/channel.c ============================================================================== --- stable/10/sys/dev/sound/pcm/channel.c Wed Jun 3 15:18:32 2015 (r283949) +++ stable/10/sys/dev/sound/pcm/channel.c Wed Jun 3 15:32:43 2015 (r283950) @@ -1029,32 +1029,17 @@ static const struct { { NULL, NULL, NULL, 0 } }; -static const struct { - char *name, *alias1, *alias2; - int matrix_id; -} matrix_id_tab[] = { - { "1.0", "1", "mono", SND_CHN_MATRIX_1_0 }, - { "2.0", "2", "stereo", SND_CHN_MATRIX_2_0 }, - { "2.1", NULL, NULL, SND_CHN_MATRIX_2_1 }, - { "3.0", "3", NULL, SND_CHN_MATRIX_3_0 }, - { "3.1", NULL, NULL, SND_CHN_MATRIX_3_1 }, - { "4.0", "4", "quad", SND_CHN_MATRIX_4_0 }, - { "4.1", NULL, NULL, SND_CHN_MATRIX_4_1 }, - { "5.0", "5", NULL, SND_CHN_MATRIX_5_0 }, - { "5.1", "6", NULL, SND_CHN_MATRIX_5_1 }, - { "6.0", NULL, NULL, SND_CHN_MATRIX_6_0 }, - { "6.1", "7", NULL, SND_CHN_MATRIX_6_1 }, - { "7.0", NULL, NULL, SND_CHN_MATRIX_7_0 }, - { "7.1", "8", NULL, SND_CHN_MATRIX_7_1 }, - { NULL, NULL, NULL, SND_CHN_MATRIX_UNKNOWN } -}; - uint32_t snd_str2afmt(const char *req) { - uint32_t i, afmt; - int matrix_id; - char b1[8], b2[8]; + int ext; + int ch; + int i; + char b1[8]; + char b2[8]; + + memset(b1, 0, sizeof(b1)); + memset(b2, 0, sizeof(b2)); i = sscanf(req, "%5[^:]:%6s", b1, b2); @@ -1068,88 +1053,78 @@ snd_str2afmt(const char *req) } else return (0); - afmt = 0; - matrix_id = SND_CHN_MATRIX_UNKNOWN; - - for (i = 0; afmt == 0 && afmt_tab[i].name != NULL; i++) { - if (strcasecmp(afmt_tab[i].name, b1) == 0 || - (afmt_tab[i].alias1 != NULL && - strcasecmp(afmt_tab[i].alias1, b1) == 0) || - (afmt_tab[i].alias2 != NULL && - strcasecmp(afmt_tab[i].alias2, b1) == 0)) { - afmt = afmt_tab[i].afmt; - strlcpy(b1, afmt_tab[i].name, sizeof(b1)); - } - } + i = sscanf(b2, "%d.%d", &ch, &ext); - if (afmt == 0) + if (i == 0) { + if (strcasecmp(b2, "mono") == 0) { + ch = 1; + ext = 0; + } else if (strcasecmp(b2, "stereo") == 0) { + ch = 2; + ext = 0; + } else if (strcasecmp(b2, "quad") == 0) { + ch = 4; + ext = 0; + } else + return (0); + } else if (i == 1) { + if (ch < 1 || ch > AFMT_CHANNEL_MAX) + return (0); + ext = 0; + } else if (i == 2) { + if (ext < 0 || ext > AFMT_EXTCHANNEL_MAX) + return (0); + if (ch < 1 || (ch + ext) > AFMT_CHANNEL_MAX) + return (0); + } else return (0); - for (i = 0; matrix_id == SND_CHN_MATRIX_UNKNOWN && - matrix_id_tab[i].name != NULL; i++) { - if (strcmp(matrix_id_tab[i].name, b2) == 0 || - (matrix_id_tab[i].alias1 != NULL && - strcmp(matrix_id_tab[i].alias1, b2) == 0) || - (matrix_id_tab[i].alias2 != NULL && - strcasecmp(matrix_id_tab[i].alias2, b2) == 0)) { - matrix_id = matrix_id_tab[i].matrix_id; - strlcpy(b2, matrix_id_tab[i].name, sizeof(b2)); + for (i = 0; afmt_tab[i].name != NULL; i++) { + if (strcasecmp(afmt_tab[i].name, b1) != 0) { + if (afmt_tab[i].alias1 == NULL) + continue; + if (strcasecmp(afmt_tab[i].alias1, b1) != 0) { + if (afmt_tab[i].alias2 == NULL) + continue; + if (strcasecmp(afmt_tab[i].alias2, b1) != 0) + continue; + } } + /* found a match */ + return (SND_FORMAT(afmt_tab[i].afmt, ch + ext, ext)); } - - if (matrix_id == SND_CHN_MATRIX_UNKNOWN) - return (0); - -#ifndef _KERNEL - printf("Parse OK: '%s' -> '%s:%s' %d\n", req, b1, b2, - (int)(b2[0]) - '0' + (int)(b2[2]) - '0'); -#endif - - return (SND_FORMAT(afmt, b2[0] - '0' + b2[2] - '0', b2[2] - '0')); + /* not a valid format */ + return (0); } uint32_t snd_afmt2str(uint32_t afmt, char *buf, size_t len) { - uint32_t i, enc, ch, ext; - char tmp[AFMTSTR_LEN]; + uint32_t enc; + uint32_t ext; + uint32_t ch; + int i; if (buf == NULL || len < AFMTSTR_LEN) return (0); - - bzero(tmp, sizeof(tmp)); + memset(buf, 0, len); enc = AFMT_ENCODING(afmt); ch = AFMT_CHANNEL(afmt); ext = AFMT_EXTCHANNEL(afmt); - - for (i = 0; afmt_tab[i].name != NULL; i++) { - if (enc == afmt_tab[i].afmt) { - strlcpy(tmp, afmt_tab[i].name, sizeof(tmp)); - strlcat(tmp, ":", sizeof(tmp)); - break; - } - } - - if (strlen(tmp) == 0) + /* check there is at least one channel */ + if (ch <= ext) return (0); - - for (i = 0; matrix_id_tab[i].name != NULL; i++) { - if (ch == (matrix_id_tab[i].name[0] - '0' + - matrix_id_tab[i].name[2] - '0') && - ext == (matrix_id_tab[i].name[2] - '0')) { - strlcat(tmp, matrix_id_tab[i].name, sizeof(tmp)); - break; - } + for (i = 0; afmt_tab[i].name != NULL; i++) { + if (enc != afmt_tab[i].afmt) + continue; + /* found a match */ + snprintf(buf, len, "%s:%d.%d", + afmt_tab[i].name, ch - ext, ext); + return (SND_FORMAT(enc, ch, ext)); } - - if (strlen(tmp) == 0) - return (0); - - strlcpy(buf, tmp, len); - - return (snd_str2afmt(buf)); + return (0); } int Modified: stable/10/sys/dev/sound/pcm/channel.h ============================================================================== --- stable/10/sys/dev/sound/pcm/channel.h Wed Jun 3 15:18:32 2015 (r283949) +++ stable/10/sys/dev/sound/pcm/channel.h Wed Jun 3 15:32:43 2015 (r283950) @@ -162,6 +162,7 @@ struct pcm_channel { } channels; struct pcmchan_matrix matrix; + struct pcmchan_matrix matrix_scratch; int volume[SND_VOL_C_MAX][SND_CHN_T_VOL_MAX]; Modified: stable/10/sys/dev/sound/pcm/feeder_chain.c ============================================================================== --- stable/10/sys/dev/sound/pcm/feeder_chain.c Wed Jun 3 15:18:32 2015 (r283949) +++ stable/10/sys/dev/sound/pcm/feeder_chain.c Wed Jun 3 15:32:43 2015 (r283950) @@ -562,6 +562,20 @@ feeder_build_mixer(struct pcm_channel *c ((c)->mode == FEEDER_CHAIN_LEAN && \ !((c)->current.afmt & (AFMT_S16_NE | AFMT_S32_NE))))) +static void +feeder_default_matrix(struct pcmchan_matrix *m, uint32_t fmt, int id) +{ + int x; + + memset(m, 0, sizeof(*m)); + + m->id = id; + m->channels = AFMT_CHANNEL(fmt); + m->ext = AFMT_EXTCHANNEL(fmt); + for (x = 0; x != SND_CHN_T_MAX; x++) + m->offset[x] = -1; +} + int feeder_chain(struct pcm_channel *c) { @@ -642,10 +656,10 @@ feeder_chain(struct pcm_channel *c) */ hwmatrix = CHANNEL_GETMATRIX(c->methods, c->devinfo, hwfmt); if (hwmatrix == NULL) { - device_printf(c->dev, - "%s(): failed to acquire hw matrix [0x%08x]\n", - __func__, hwfmt); - return (ENODEV); + /* setup a default matrix */ + hwmatrix = &c->matrix_scratch; + feeder_default_matrix(hwmatrix, hwfmt, + SND_CHN_MATRIX_UNKNOWN); } /* ..... and rebuild hwfmt. */ hwfmt = SND_FORMAT(hwfmt, hwmatrix->channels, hwmatrix->ext); @@ -657,13 +671,14 @@ feeder_chain(struct pcm_channel *c) softmatrix->ext != AFMT_EXTCHANNEL(softfmt)) { softmatrix = feeder_matrix_format_map(softfmt); if (softmatrix == NULL) { - device_printf(c->dev, - "%s(): failed to acquire soft matrix [0x%08x]\n", - __func__, softfmt); - return (ENODEV); + /* setup a default matrix */ + softmatrix = &c->matrix; + feeder_default_matrix(softmatrix, softfmt, + SND_CHN_MATRIX_PCMCHANNEL); + } else { + c->matrix = *softmatrix; + c->matrix.id = SND_CHN_MATRIX_PCMCHANNEL; } - c->matrix = *softmatrix; - c->matrix.id = SND_CHN_MATRIX_PCMCHANNEL; } softfmt = SND_FORMAT(softfmt, softmatrix->channels, softmatrix->ext); if (softfmt != c->format) Modified: stable/10/sys/dev/sound/pcm/sound.h ============================================================================== --- stable/10/sys/dev/sound/pcm/sound.h Wed Jun 3 15:18:32 2015 (r283949) +++ stable/10/sys/dev/sound/pcm/sound.h Wed Jun 3 15:32:43 2015 (r283950) @@ -220,10 +220,12 @@ struct snd_mixer; * ~(0xb00ff7ff) */ #define AFMT_ENCODING_MASK 0xf00fffff -#define AFMT_CHANNEL_MASK 0x01f00000 +#define AFMT_CHANNEL_MASK 0x07f00000 #define AFMT_CHANNEL_SHIFT 20 -#define AFMT_EXTCHANNEL_MASK 0x0e000000 -#define AFMT_EXTCHANNEL_SHIFT 25 +#define AFMT_CHANNEL_MAX 0x7f +#define AFMT_EXTCHANNEL_MASK 0x08000000 +#define AFMT_EXTCHANNEL_SHIFT 27 +#define AFMT_EXTCHANNEL_MAX 1 #define AFMT_ENCODING(v) ((v) & AFMT_ENCODING_MASK) Modified: stable/10/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/10/sys/dev/sound/usb/uaudio.c Wed Jun 3 15:18:32 2015 (r283949) +++ stable/10/sys/dev/sound/usb/uaudio.c Wed Jun 3 15:32:43 2015 (r283950) @@ -121,6 +121,8 @@ SYSCTL_INT(_hw_usb_uaudio, OID_AUTO, def #define UAUDIO_NFRAMES 64 /* must be factor of 8 due HS-USB */ #define UAUDIO_NCHANBUFS 2 /* number of outstanding request */ #define UAUDIO_RECURSE_LIMIT 255 /* rounds */ +#define UAUDIO_CHANNELS_MAX MIN(64, AFMT_CHANNEL_MAX) +#define UAUDIO_MATRIX_MAX 8 /* channels */ #define MAKE_WORD(h,l) (((h) << 8) | (l)) #define BIT_TEST(bm,bno) (((bm)[(bno) / 8] >> (7 - ((bno) % 8))) & 1) @@ -352,6 +354,7 @@ struct uaudio_softc { uint8_t sc_uq_au_no_xu:1; uint8_t sc_uq_bad_adc:1; uint8_t sc_uq_au_vendor_class:1; + uint8_t sc_pcm_bitperfect:1; }; struct uaudio_terminal_node { @@ -1068,6 +1071,10 @@ uaudio_attach_sub(device_t dev, kobj_cla */ uaudio_pcm_setflags(dev, SD_F_SOFTPCMVOL); } + if (sc->sc_pcm_bitperfect) { + DPRINTF("device needs bitperfect by default\n"); + uaudio_pcm_setflags(dev, SD_F_BITPERFECT); + } if (mixer_init(dev, mixer_class, sc)) goto detach; sc->sc_mixer_init = 1; @@ -1842,19 +1849,21 @@ uaudio_chan_fill_info_sub(struct uaudio_ format = chan_alt->p_fmt->freebsd_fmt; + /* get default SND_FORMAT() */ + format = SND_FORMAT(format, chan_alt->channels, 0); + switch (chan_alt->channels) { - case 2: - /* stereo */ - format = SND_FORMAT(format, 2, 0); - break; + uint32_t temp_fmt; case 1: - /* mono */ - format = SND_FORMAT(format, 1, 0); + case 2: + /* mono and stereo */ break; default: /* surround and more */ - format = feeder_matrix_default_format( - SND_FORMAT(format, chan_alt->channels, 0)); + temp_fmt = feeder_matrix_default_format(format); + /* if multichannel, then format can be zero */ + if (temp_fmt != 0) + format = temp_fmt; break; } @@ -1881,6 +1890,10 @@ uaudio_chan_fill_info_sub(struct uaudio_ chan->pcm_cap.fmtlist = chan->pcm_format; chan->pcm_cap.fmtlist[0] = format; + /* check if device needs bitperfect */ + if (chan_alt->channels > UAUDIO_MATRIX_MAX) + sc->sc_pcm_bitperfect = 1; + if (rate < chan->pcm_cap.minspeed || chan->pcm_cap.minspeed == 0) chan->pcm_cap.minspeed = rate; if (rate > chan->pcm_cap.maxspeed || chan->pcm_cap.maxspeed == 0) @@ -1955,15 +1968,15 @@ uaudio_chan_fill_info(struct uaudio_soft channels = 4; break; default: - channels = 16; + channels = UAUDIO_CHANNELS_MAX; break; } - } else if (channels > 16) { - channels = 16; - } - if (sbuf_new(&sc->sc_sndstat, NULL, 4096, SBUF_AUTOEXTEND)) { + } else if (channels > UAUDIO_CHANNELS_MAX) + channels = UAUDIO_CHANNELS_MAX; + + if (sbuf_new(&sc->sc_sndstat, NULL, 4096, SBUF_AUTOEXTEND)) sc->sc_sndstat_valid = 1; - } + /* try to search for a valid config */ for (x = channels; x; x--) { Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Wed Jun 3 15:18:32 2015 (r283949) +++ stable/10/sys/sys/param.h Wed Jun 3 15:32:43 2015 (r283950) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1001516 /* Master, propagated to newvers */ +#define __FreeBSD_version 1001517 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 15:41:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03F1E6BF; Wed, 3 Jun 2015 15:41:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAB01178F; Wed, 3 Jun 2015 15:41:03 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53Ff3co018245; Wed, 3 Jun 2015 15:41:03 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53Ff3S5018244; Wed, 3 Jun 2015 15:41:03 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201506031541.t53Ff3S5018244@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 3 Jun 2015 15:41:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283951 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 15:41:04 -0000 Author: hselasky Date: Wed Jun 3 15:41:03 2015 New Revision: 283951 URL: https://svnweb.freebsd.org/changeset/base/283951 Log: MFC r283103: Fix for DWC OTG device side isochronous transfers. The even or odd isochronous frame bit needs to be flipped. Modified: stable/10/sys/dev/usb/controller/dwc_otg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- stable/10/sys/dev/usb/controller/dwc_otg.c Wed Jun 3 15:32:43 2015 (r283950) +++ stable/10/sys/dev/usb/controller/dwc_otg.c Wed Jun 3 15:41:03 2015 (r283951) @@ -1561,6 +1561,22 @@ dwc_otg_data_rx(struct dwc_otg_softc *sc /* release FIFO */ dwc_otg_common_rx_ack(sc); + temp = sc->sc_out_ctl[td->ep_no]; + + /* check for isochronous mode */ + if ((temp & DIEPCTL_EPTYPE_MASK) == + (DIEPCTL_EPTYPE_ISOC << DIEPCTL_EPTYPE_SHIFT)) { + /* toggle odd or even frame bit */ + if (temp & DIEPCTL_SETD1PID) { + temp &= ~DIEPCTL_SETD1PID; + temp |= DIEPCTL_SETD0PID; + } else { + temp &= ~DIEPCTL_SETD0PID; + temp |= DIEPCTL_SETD1PID; + } + sc->sc_out_ctl[td->ep_no] = temp; + } + /* check if we are complete */ if ((td->remainder == 0) || got_short) { if (td->short_pkt) { @@ -2136,10 +2152,23 @@ repeat: temp = sc->sc_in_ctl[td->ep_no]; + /* check for isochronous mode */ + if ((temp & DIEPCTL_EPTYPE_MASK) == + (DIEPCTL_EPTYPE_ISOC << DIEPCTL_EPTYPE_SHIFT)) { + /* toggle odd or even frame bit */ + if (temp & DIEPCTL_SETD1PID) { + temp &= ~DIEPCTL_SETD1PID; + temp |= DIEPCTL_SETD0PID; + } else { + temp &= ~DIEPCTL_SETD0PID; + temp |= DIEPCTL_SETD1PID; + } + sc->sc_in_ctl[td->ep_no] = temp; + } + /* must enable before writing data to FIFO */ DWC_OTG_WRITE_4(sc, DOTG_DIEPCTL(td->ep_no), temp | - DIEPCTL_EPENA | - DIEPCTL_CNAK); + DIEPCTL_EPENA | DIEPCTL_CNAK); td->tx_bytes = count; From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 15:43:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90F0B8B1; Wed, 3 Jun 2015 15:43:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E257191A; Wed, 3 Jun 2015 15:43:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53Fhu43020282; Wed, 3 Jun 2015 15:43:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53FhunV020281; Wed, 3 Jun 2015 15:43:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201506031543.t53FhunV020281@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 3 Jun 2015 15:43:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283952 - head/sys/dev/usb/template 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 15:43:56 -0000 Author: hselasky Date: Wed Jun 3 15:43:55 2015 New Revision: 283952 URL: https://svnweb.freebsd.org/changeset/base/283952 Log: Fix spelling. Modified: head/sys/dev/usb/template/usb_template_midi.c Modified: head/sys/dev/usb/template/usb_template_midi.c ============================================================================== --- head/sys/dev/usb/template/usb_template_midi.c Wed Jun 3 15:41:03 2015 (r283951) +++ head/sys/dev/usb/template/usb_template_midi.c Wed Jun 3 15:43:55 2015 (r283952) @@ -171,7 +171,7 @@ static const void *midi_descs_1[] = { static const struct usb_temp_interface_desc midi_iface_1 = { .ppRawDesc = midi_descs_1, .ppEndpoints = midi_iface_1_ep, - .bInterfaceClass = 0x01, /* Midi */ + .bInterfaceClass = 0x01, /* MIDI */ .bInterfaceSubClass = 3, /* MIDI streaming */ .bInterfaceProtocol = 0, .iInterface = INDEX_MIDI_IF, From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 17:10:12 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B5E1699; Wed, 3 Jun 2015 17:10:12 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 294EB1DC8; Wed, 3 Jun 2015 17:10:12 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53HABT5061859; Wed, 3 Jun 2015 17:10:11 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53HABcH061858; Wed, 3 Jun 2015 17:10:11 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201506031710.t53HABcH061858@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Wed, 3 Jun 2015 17:10:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283956 - head/share/man/man8 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 17:10:12 -0000 Author: jmg Date: Wed Jun 3 17:10:11 2015 New Revision: 283956 URL: https://svnweb.freebsd.org/changeset/base/283956 Log: install nanobsd.sh as a MLINK as that is the .Nm of the man page.. really the man page should be renamed as nanobsd.sh is not installed as nanobsd.. Modified: head/share/man/man8/Makefile Modified: head/share/man/man8/Makefile ============================================================================== --- head/share/man/man8/Makefile Wed Jun 3 16:47:14 2015 (r283955) +++ head/share/man/man8/Makefile Wed Jun 3 17:10:11 2015 (r283956) @@ -13,7 +13,9 @@ MAN= crash.8 \ ${_uefi.8} \ yp.8 -MLINKS= rc.8 rc.atm.8 \ +MLINKS= + nanobsd.8 nanobsd.sh.8 \ + rc.8 rc.atm.8 \ rc.8 rc.d.8 \ rc.8 rc.firewall.8 \ rc.8 rc.local.8 \ From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 17:10:53 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9203C7EF; Wed, 3 Jun 2015 17:10:53 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7FA801EEF; Wed, 3 Jun 2015 17:10:53 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53HArBs062476; Wed, 3 Jun 2015 17:10:53 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53HAr4n062475; Wed, 3 Jun 2015 17:10:53 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201506031710.t53HAr4n062475@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Wed, 3 Jun 2015 17:10:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283957 - head/share/man/man8 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 17:10:53 -0000 Author: jmg Date: Wed Jun 3 17:10:52 2015 New Revision: 283957 URL: https://svnweb.freebsd.org/changeset/base/283957 Log: fix missing backslash.. Modified: head/share/man/man8/Makefile Modified: head/share/man/man8/Makefile ============================================================================== --- head/share/man/man8/Makefile Wed Jun 3 17:10:11 2015 (r283956) +++ head/share/man/man8/Makefile Wed Jun 3 17:10:52 2015 (r283957) @@ -13,7 +13,7 @@ MAN= crash.8 \ ${_uefi.8} \ yp.8 -MLINKS= +MLINKS= \ nanobsd.8 nanobsd.sh.8 \ rc.8 rc.atm.8 \ rc.8 rc.d.8 \ From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 17:45:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A82576D1; Wed, 3 Jun 2015 17:45:46 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93AAB17FA; Wed, 3 Jun 2015 17:45:46 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53HjkFn081960; Wed, 3 Jun 2015 17:45:46 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53HjkYT081958; Wed, 3 Jun 2015 17:45:46 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201506031745.t53HjkYT081958@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 3 Jun 2015 17:45: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: r283958 - stable/10/contrib/traceroute 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 17:45:46 -0000 Author: tuexen Date: Wed Jun 3 17:45:45 2015 New Revision: 283958 URL: https://svnweb.freebsd.org/changeset/base/283958 Log: MFC r283784: Remove trailing whitespaces. MFC r283785: Require the embedded packet to contain 8 bytes after the IP header instead of only 4. This is guaranteed by RFC 792 and the verification of GRE, ICMP and TCP packets use 8 bytes. MFC r283786: There is no payload anymore. So compute the minimum packet length correctly and use 40 as the default (if the minumum allows it), as specified in the man page. MFC r283806: When the packet verification fails in verbose mode, print the correct number of words in host byte order. Also remove a stray 'x'. MFC r283808: Don't send malformed SCTP probe packets. MFC r283813: Use an empty string for field descriptions of unknown protocols. MFC r283817: Don't send illegal packets when using UDP-Lite. MFC r283819: A TCP checksum of 0 is completely valid. Mapping 0 to 0xffff only applies to UDP and UDP-Lite. MFC r283820: The code starts with base + 1 as the first port. Fix to documentation to match that. Modified: stable/10/contrib/traceroute/traceroute.8 stable/10/contrib/traceroute/traceroute.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/traceroute/traceroute.8 ============================================================================== --- stable/10/contrib/traceroute/traceroute.8 Wed Jun 3 17:10:52 2015 (r283957) +++ stable/10/contrib/traceroute/traceroute.8 Wed Jun 3 17:45:45 2015 (r283958) @@ -16,7 +16,7 @@ .\" $Id: traceroute.8,v 1.19 2000/09/21 08:44:19 leres Exp $ .\" $FreeBSD$ .\" -.Dd June 19, 2012 +.Dd May 31, 2015 .Dt TRACEROUTE 8 .Os .Sh NAME @@ -65,7 +65,7 @@ Turn on AS# lookups and use the giv default. .It Fl e Firewall evasion mode. -Use fixed destination ports for UDP and TCP probes. +Use fixed destination ports for UDP, UDP-Lite, TCP and SCTP probes. The destination port does NOT increment with each packet sent. .It Fl f Ar first_ttl Set the initial time-to-live used in the first outgoing probe packet. @@ -110,21 +110,24 @@ Print hop addresses numerically rather t path). .It Fl P Ar proto Send packets of specified IP protocol. The currently supported protocols -are: UDP, TCP, GRE and ICMP. Other protocols may also be specified (either by -name or by number), though +are: UDP, UDP-Lite, TCP, SCTP, GRE and ICMP. Other protocols may also be +specified (either by name or by number), though .Nm does not implement any special knowledge of their packet formats. This option is useful for determining which router along a path may be blocking packets based on IP protocol number. But see BUGS below. .It Fl p Ar port -Protocol specific. For UDP and TCP, sets +Protocol specific. For UDP, UDP-Lite, TCP and SCTP, sets the base .Ar port number used in probes (default is 33434). -Traceroute hopes that nothing is listening on UDP ports -.Em base +Traceroute hopes that nothing is listening on UDP ports (or UDP-Lite ports +if used by +.Nm +and supported by the peer) +.Em base + 1 to -.Em base + nhops * nprobes - 1 +.Em base + nhops * nprobes at the destination host (so an ICMP PORT_UNREACHABLE message will be returned to terminate the route tracing). If something is listening on a port in the default range, this option can be used Modified: stable/10/contrib/traceroute/traceroute.c ============================================================================== --- stable/10/contrib/traceroute/traceroute.c Wed Jun 3 17:10:52 2015 (r283957) +++ stable/10/contrib/traceroute/traceroute.c Wed Jun 3 17:45:45 2015 (r283958) @@ -219,6 +219,7 @@ static const char rcsid[] = #include #include #include +#include #include #include #include @@ -367,9 +368,10 @@ void freehostinfo(struct hostinfo *); void getaddr(u_int32_t *, char *); struct hostinfo *gethostinfo(char *); u_short in_cksum(u_short *, int); +u_int32_t sctp_crc32c(const void *, u_int32_t); char *inetname(struct in_addr); int main(int, char **); -u_short p_cksum(struct ip *, u_short *, int); +u_short p_cksum(struct ip *, u_short *, int, int); int packet_ok(u_char *, int, struct sockaddr_in *, int); char *pr_type(u_char); void print(u_char *, int, struct sockaddr_in *); @@ -389,8 +391,12 @@ int usleep(u_int); void udp_prep(struct outdata *); int udp_check(const u_char *, int); +void udplite_prep(struct outdata *); +int udplite_check(const u_char *, int); void tcp_prep(struct outdata *); int tcp_check(const u_char *, int); +void sctp_prep(struct outdata *); +int sctp_check(const u_char *, int); void gre_prep(struct outdata *); int gre_check(const u_char *, int); void gen_prep(struct outdata *); @@ -424,6 +430,15 @@ struct outproto protos[] = { udp_check }, { + "udplite", + "spt dpt cov sum", + IPPROTO_UDPLITE, + sizeof(struct udphdr), + 32768 + 666, + udplite_prep, + udplite_check + }, + { "tcp", "spt dpt seq ack xxflwin sum urp", IPPROTO_TCP, @@ -433,6 +448,15 @@ struct outproto protos[] = { tcp_check }, { + "sctp", + "spt dpt vtag crc tyfllen tyfllen ", + IPPROTO_SCTP, + sizeof(struct sctphdr), + 32768 + 666, + sctp_prep, + sctp_check + }, + { "gre", "flg pro len clid", IPPROTO_GRE, @@ -452,7 +476,7 @@ struct outproto protos[] = { }, { NULL, - NULL, + "", 0, 2 * sizeof(u_short), 0, @@ -541,12 +565,12 @@ main(int argc, char **argv) case 'a': as_path = 1; break; - + case 'A': as_path = 1; as_server = optarg; break; - + case 'd': options |= SO_DEBUG; break; @@ -669,8 +693,11 @@ main(int argc, char **argv) if (lsrr > 0) optlen = (lsrr + 1) * sizeof(gwlist[0]); - minpacket = sizeof(*outip) + proto->hdrlen + sizeof(struct outdata) + optlen; - packlen = minpacket; /* minimum sized packet */ + minpacket = sizeof(*outip) + proto->hdrlen + optlen; + if (minpacket > 40) + packlen = minpacket; + else + packlen = 40; /* Process destination and optional packet size */ switch (argc - optind) { @@ -704,6 +731,11 @@ main(int argc, char **argv) #endif protlen = packlen - sizeof(*outip) - optlen; + if ((proto->num == IPPROTO_SCTP) && (packlen & 3)) { + Fprintf(stderr, "%s: packet length must be a multiple of 4\n", + prog); + exit(1); + } outip = (struct ip *)malloc((unsigned)packlen); if (outip == NULL) { @@ -931,7 +963,7 @@ main(int argc, char **argv) as_path = 0; } } - + #if defined(IPSEC) && defined(IPSEC_POLICY_IPSEC) if (setpolicy(sndsock, "in bypass") < 0) errx(1, "%s", ipsec_strerror()); @@ -1330,7 +1362,7 @@ packet_ok(register u_char *buf, int cc, hiplen = ((u_char *)icp + cc) - (u_char *)hip; hlen = hip->ip_hl << 2; inner = (u_char *)((u_char *)hip + hlen); - if (hlen + 12 <= cc + if (hlen + 16 <= cc && hip->ip_p == proto->num && (*proto->check)(inner, (u_char)seq)) return (type == ICMP_TIMXCEED ? -1 : code + 1); @@ -1343,8 +1375,8 @@ packet_ok(register u_char *buf, int cc, Printf("\n%d bytes from %s to ", cc, inet_ntoa(from->sin_addr)); Printf("%s: icmp type %d (%s) code %d\n", inet_ntoa(ip->ip_dst), type, pr_type(type), icp->icmp_code); - for (i = 4; i < cc ; i += sizeof(*lp)) - Printf("%2d: x%8.8x\n", i, *lp++); + for (i = 4; i <= cc - ICMP_MINLEN; i += sizeof(*lp)) + Printf("%2d: %8.8x\n", i, ntohl(*lp++)); } #endif return(0); @@ -1383,7 +1415,7 @@ udp_prep(struct outdata *outdata) outudp->uh_ulen = htons((u_short)protlen); outudp->uh_sum = 0; if (doipcksum) { - u_short sum = p_cksum(outip, (u_short*)outudp, protlen); + u_short sum = p_cksum(outip, (u_short*)outudp, protlen, protlen); outudp->uh_sum = (sum) ? sum : 0xffff; } @@ -1400,6 +1432,32 @@ udp_check(const u_char *data, int seq) } void +udplite_prep(struct outdata *outdata) +{ + struct udphdr *const outudp = (struct udphdr *) outp; + + outudp->uh_sport = htons(ident + (fixedPort ? outdata->seq : 0)); + outudp->uh_dport = htons(port + (fixedPort ? 0 : outdata->seq)); + outudp->uh_ulen = htons(8); + outudp->uh_sum = 0; + if (doipcksum) { + u_short sum = p_cksum(outip, (u_short*)outudp, protlen, 8); + outudp->uh_sum = (sum) ? sum : 0xffff; + } + + return; +} + +int +udplite_check(const u_char *data, int seq) +{ + struct udphdr *const udp = (struct udphdr *) data; + + return (ntohs(udp->uh_sport) == ident + (fixedPort ? seq : 0) && + ntohs(udp->uh_dport) == port + (fixedPort ? 0 : seq)); +} + +void tcp_prep(struct outdata *outdata) { struct tcphdr *const tcp = (struct tcphdr *) outp; @@ -1412,10 +1470,8 @@ tcp_prep(struct outdata *outdata) tcp->th_flags = TH_SYN; tcp->th_sum = 0; - if (doipcksum) { - u_short sum = p_cksum(outip, (u_short*)tcp, protlen); - tcp->th_sum = (sum) ? sum : 0xffff; - } + if (doipcksum) + tcp->th_sum = p_cksum(outip, (u_short*)tcp, protlen, protlen); } int @@ -1429,6 +1485,47 @@ tcp_check(const u_char *data, int seq) } void +sctp_prep(struct outdata *outdata) +{ + struct sctphdr *const sctp = (struct sctphdr *) outp; + struct sctp_chunkhdr *chk; + + sctp->src_port = htons(ident); + sctp->dest_port = htons(port + (fixedPort ? 0 : outdata->seq)); + sctp->v_tag = (sctp->src_port << 16) | sctp->dest_port; + sctp->checksum = htonl(0); + if (protlen >= + (int)(sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr))) { + chk = (struct sctp_chunkhdr *)(sctp + 1); + chk->chunk_type = SCTP_SHUTDOWN_ACK; + chk->chunk_flags = 0; + chk->chunk_length = htons(4); + } + if (protlen >= + (int)(sizeof(struct sctphdr) + 2 * sizeof(struct sctp_chunkhdr))) { + chk = chk + 1; + chk->chunk_type = SCTP_PAD_CHUNK; + chk->chunk_flags = 0; + chk->chunk_length = htons(protlen - + (sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr))); + } + if (doipcksum) { + sctp->checksum = sctp_crc32c(sctp, protlen); + } +} + +int +sctp_check(const u_char *data, int seq) +{ + struct sctphdr *const sctp = (struct sctphdr *) data; + + return (ntohs(sctp->src_port) == ident + && ntohs(sctp->dest_port) == port + (fixedPort ? 0 : seq) + && sctp->v_tag == + (u_int32_t)((sctp->src_port << 16) | sctp->dest_port)); +} + +void gre_prep(struct outdata *outdata) { struct grehdr *const gre = (struct grehdr *) outp; @@ -1494,8 +1591,8 @@ print(register u_char *buf, register int /* * Checksum routine for UDP and TCP headers. */ -u_short -p_cksum(struct ip *ip, u_short *data, int len) +u_short +p_cksum(struct ip *ip, u_short *data, int len, int cov) { static struct ipovly ipo; u_short sum[2]; @@ -1506,7 +1603,7 @@ p_cksum(struct ip *ip, u_short *data, in ipo.ih_dst = ip->ip_dst; sum[1] = in_cksum((u_short*)&ipo, sizeof(ipo)); /* pseudo ip hdr cksum */ - sum[0] = in_cksum(data, len); /* payload data cksum */ + sum[0] = in_cksum(data, cov); /* payload data cksum */ return ~in_cksum(sum, sizeof(sum)); } @@ -1547,6 +1644,98 @@ in_cksum(register u_short *addr, registe } /* + * CRC32C routine for the Stream Control Transmission Protocol + */ + +#define CRC32C(c, d) (c = (c>>8) ^ crc_c[(c^(d))&0xFF]) + +static u_int32_t crc_c[256] = { + 0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, + 0xC79A971F, 0x35F1141C, 0x26A1E7E8, 0xD4CA64EB, + 0x8AD958CF, 0x78B2DBCC, 0x6BE22838, 0x9989AB3B, + 0x4D43CFD0, 0xBF284CD3, 0xAC78BF27, 0x5E133C24, + 0x105EC76F, 0xE235446C, 0xF165B798, 0x030E349B, + 0xD7C45070, 0x25AFD373, 0x36FF2087, 0xC494A384, + 0x9A879FA0, 0x68EC1CA3, 0x7BBCEF57, 0x89D76C54, + 0x5D1D08BF, 0xAF768BBC, 0xBC267848, 0x4E4DFB4B, + 0x20BD8EDE, 0xD2D60DDD, 0xC186FE29, 0x33ED7D2A, + 0xE72719C1, 0x154C9AC2, 0x061C6936, 0xF477EA35, + 0xAA64D611, 0x580F5512, 0x4B5FA6E6, 0xB93425E5, + 0x6DFE410E, 0x9F95C20D, 0x8CC531F9, 0x7EAEB2FA, + 0x30E349B1, 0xC288CAB2, 0xD1D83946, 0x23B3BA45, + 0xF779DEAE, 0x05125DAD, 0x1642AE59, 0xE4292D5A, + 0xBA3A117E, 0x4851927D, 0x5B016189, 0xA96AE28A, + 0x7DA08661, 0x8FCB0562, 0x9C9BF696, 0x6EF07595, + 0x417B1DBC, 0xB3109EBF, 0xA0406D4B, 0x522BEE48, + 0x86E18AA3, 0x748A09A0, 0x67DAFA54, 0x95B17957, + 0xCBA24573, 0x39C9C670, 0x2A993584, 0xD8F2B687, + 0x0C38D26C, 0xFE53516F, 0xED03A29B, 0x1F682198, + 0x5125DAD3, 0xA34E59D0, 0xB01EAA24, 0x42752927, + 0x96BF4DCC, 0x64D4CECF, 0x77843D3B, 0x85EFBE38, + 0xDBFC821C, 0x2997011F, 0x3AC7F2EB, 0xC8AC71E8, + 0x1C661503, 0xEE0D9600, 0xFD5D65F4, 0x0F36E6F7, + 0x61C69362, 0x93AD1061, 0x80FDE395, 0x72966096, + 0xA65C047D, 0x5437877E, 0x4767748A, 0xB50CF789, + 0xEB1FCBAD, 0x197448AE, 0x0A24BB5A, 0xF84F3859, + 0x2C855CB2, 0xDEEEDFB1, 0xCDBE2C45, 0x3FD5AF46, + 0x7198540D, 0x83F3D70E, 0x90A324FA, 0x62C8A7F9, + 0xB602C312, 0x44694011, 0x5739B3E5, 0xA55230E6, + 0xFB410CC2, 0x092A8FC1, 0x1A7A7C35, 0xE811FF36, + 0x3CDB9BDD, 0xCEB018DE, 0xDDE0EB2A, 0x2F8B6829, + 0x82F63B78, 0x709DB87B, 0x63CD4B8F, 0x91A6C88C, + 0x456CAC67, 0xB7072F64, 0xA457DC90, 0x563C5F93, + 0x082F63B7, 0xFA44E0B4, 0xE9141340, 0x1B7F9043, + 0xCFB5F4A8, 0x3DDE77AB, 0x2E8E845F, 0xDCE5075C, + 0x92A8FC17, 0x60C37F14, 0x73938CE0, 0x81F80FE3, + 0x55326B08, 0xA759E80B, 0xB4091BFF, 0x466298FC, + 0x1871A4D8, 0xEA1A27DB, 0xF94AD42F, 0x0B21572C, + 0xDFEB33C7, 0x2D80B0C4, 0x3ED04330, 0xCCBBC033, + 0xA24BB5A6, 0x502036A5, 0x4370C551, 0xB11B4652, + 0x65D122B9, 0x97BAA1BA, 0x84EA524E, 0x7681D14D, + 0x2892ED69, 0xDAF96E6A, 0xC9A99D9E, 0x3BC21E9D, + 0xEF087A76, 0x1D63F975, 0x0E330A81, 0xFC588982, + 0xB21572C9, 0x407EF1CA, 0x532E023E, 0xA145813D, + 0x758FE5D6, 0x87E466D5, 0x94B49521, 0x66DF1622, + 0x38CC2A06, 0xCAA7A905, 0xD9F75AF1, 0x2B9CD9F2, + 0xFF56BD19, 0x0D3D3E1A, 0x1E6DCDEE, 0xEC064EED, + 0xC38D26C4, 0x31E6A5C7, 0x22B65633, 0xD0DDD530, + 0x0417B1DB, 0xF67C32D8, 0xE52CC12C, 0x1747422F, + 0x49547E0B, 0xBB3FFD08, 0xA86F0EFC, 0x5A048DFF, + 0x8ECEE914, 0x7CA56A17, 0x6FF599E3, 0x9D9E1AE0, + 0xD3D3E1AB, 0x21B862A8, 0x32E8915C, 0xC083125F, + 0x144976B4, 0xE622F5B7, 0xF5720643, 0x07198540, + 0x590AB964, 0xAB613A67, 0xB831C993, 0x4A5A4A90, + 0x9E902E7B, 0x6CFBAD78, 0x7FAB5E8C, 0x8DC0DD8F, + 0xE330A81A, 0x115B2B19, 0x020BD8ED, 0xF0605BEE, + 0x24AA3F05, 0xD6C1BC06, 0xC5914FF2, 0x37FACCF1, + 0x69E9F0D5, 0x9B8273D6, 0x88D28022, 0x7AB90321, + 0xAE7367CA, 0x5C18E4C9, 0x4F48173D, 0xBD23943E, + 0xF36E6F75, 0x0105EC76, 0x12551F82, 0xE03E9C81, + 0x34F4F86A, 0xC69F7B69, 0xD5CF889D, 0x27A40B9E, + 0x79B737BA, 0x8BDCB4B9, 0x988C474D, 0x6AE7C44E, + 0xBE2DA0A5, 0x4C4623A6, 0x5F16D052, 0xAD7D5351 +}; + +u_int32_t +sctp_crc32c(const void *packet, u_int32_t len) +{ + u_int32_t i, crc32c; + u_int8_t byte0, byte1, byte2, byte3; + const u_int8_t *buf = (const u_int8_t *)packet; + + crc32c = ~0; + for (i = 0; i < len; i++) + CRC32C(crc32c, buf[i]); + crc32c = ~crc32c; + byte0 = crc32c & 0xff; + byte1 = (crc32c>>8) & 0xff; + byte2 = (crc32c>>16) & 0xff; + byte3 = (crc32c>>24) & 0xff; + crc32c = ((byte0 << 24) | (byte1 << 16) | (byte2 << 8) | byte3); + return htonl(crc32c); +} + +/* * Subtract 2 timeval structs: out = out - in. * Out is assumed to be within about LONG_MAX seconds of in. */ From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 17:58:52 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25BB1AFD; Wed, 3 Jun 2015 17:58:52 +0000 (UTC) (envelope-from tuexen@freebsd.org) 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" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DBFF11A99; Wed, 3 Jun 2015 17:58:51 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from [192.168.1.200] (p508F1163.dip0.t-ipconnect.de [80.143.17.99]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id 515421C0B463E; Wed, 3 Jun 2015 19:58:49 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r283806 - head/contrib/traceroute From: Michael Tuexen In-Reply-To: <4E05B479-A012-4219-822A-68DF72CCAACF@freebsd.org> Date: Wed, 3 Jun 2015 19:58:47 +0200 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <0EA0845B-0C79-40D3-A73A-27EA1C6EDAC0@freebsd.org> References: <201505310810.t4V8AZWR074647@svn.freebsd.org> <20150531185852.GA20409@strugglingcoder.info> <4E05B479-A012-4219-822A-68DF72CCAACF@freebsd.org> To: hiren panchasara X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 17:58:52 -0000 > On 31 May 2015, at 21:45, Michael Tuexen wrote: >=20 >> On 31 May 2015, at 20:58, hiren panchasara = wrote: >>=20 >> On 05/31/15 at 08:10P, Michael Tuexen wrote: >>> Author: tuexen >>> Date: Sun May 31 08:10:35 2015 >>> New Revision: 283806 >>> URL: https://svnweb.freebsd.org/changeset/base/283806 >>>=20 >>> Log: >>> When the packet verification fails in verbose mode, print the = correct >>> number of words in host byte order. Also remove a stray 'x'. >>>=20 >>> MFC after: 3 days >>>=20 >>> Modified: >>> head/contrib/traceroute/traceroute.c >>=20 >> Picking up a random traceroute commit here. I am not sure of the = history >> but don't we try to upstream the fixes for contrib/* things, in = general?=20 > The last version was release 12 years ago. They where integrated in > https://svnweb.freebsd.org/base?view=3Drevision&revision=3D100787 >=20 > I can submit the patches also to traceroute@ee.lbl.gov as indicated in > = https://svnweb.freebsd.org/base/head/contrib/traceroute/FREEBSD-upgrade?vi= ew=3Dmarkup I tried to... However, the e-mail address traceroute@ee.lbl.gov doesn't = seem to work anymore... Best regards Michael >=20 > Thanks for making me aware of it. >=20 > Best regards > Michael >>=20 >> I am just curious. Thanks for the fixes, btw. >>=20 >> Cheers, >> Hiren >=20 >=20 >=20 From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 18:01:12 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E08F2C97; Wed, 3 Jun 2015 18:01:11 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC5571B98; Wed, 3 Jun 2015 18:01:11 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53I1Bhc090117; Wed, 3 Jun 2015 18:01:11 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53I1ARn090108; Wed, 3 Jun 2015 18:01:10 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201506031801.t53I1ARn090108@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Wed, 3 Jun 2015 18:01:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283959 - in head: share/man/man4 sys/conf sys/dev/e1000 sys/dev/netmap sys/modules/em 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 18:01:12 -0000 Author: sbruno Date: Wed Jun 3 18:01:09 2015 New Revision: 283959 URL: https://svnweb.freebsd.org/changeset/base/283959 Log: Change EM_MULTIQUEUE to a real kernconf entry and enable support for up to 2 rx/tx queues for the 82574. Program the 82574 to enable 5 msix vectors, assign 1 to each rx queue, 1 to each tx queue and 1 to the link handler. Inspired by DragonFlyBSD, enable some RSS logic for handling tx queue handling/processing. Move multiqueue handler functions so that they line up better in a diff review to if_igb.c Always enqueue tx work to be done in em_mq_start, if unable to acquire the TX lock, then this will be processed in the background later by the taskqueue. Remove mbuf argument from em_start_mq_locked() as the work is always enqueued. (stolen from igb) Setup TARC, TXDCTL and RXDCTL registers for better performance and stability in multiqueue and singlequeue implementations. Handle Intel errata 3 and generic multiqueue behavior with the initialization of TARC(0) and TARC(1) Bind interrupt threads to cpus in order. (stolen from igb) Add 2 new DDB functions, one to display the queue(s) and their settings and one to reset the adapter. Primarily used for debugging. In the multiqueue configuration, bump RXD and TXD ring size to max for the adapter (4096). Setup an RDTR of 64 and an RADV of 128 in multiqueue configuration to cut down on the number of interrupts. RADV was arbitrarily set to 2x RDTR and can be adjusted as needed. Cleanup the display in top a bit to make it clearer where the taskqueue threads are running and what they should be doing. Ensure that both queues are processed by em_local_timer() by writing them both to the IMS register to generate soft interrupts. Ensure that an soft interrupt is generated when em_msix_link() is run so that any races between assertion of the link/status interrupt and a rx/tx interrupt are handled. Document existing tuneables: hw.em.eee_setting, hw.em.msix, hw.em.smart_pwr_down, hw.em.sbp Document use of hw.em.num_queues and the new kernel option EM_MULTIQUEUE Thanks to Intel for their continued support of FreeBSD. Reviewed by: erj jfv hiren gnn wblock Obtained from: Intel Corporation MFC after: 2 weeks Relnotes: Yes Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D1994 Modified: head/share/man/man4/em.4 head/sys/conf/NOTES head/sys/conf/options head/sys/dev/e1000/e1000_defines.h head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h head/sys/dev/netmap/if_em_netmap.h head/sys/modules/em/Makefile Modified: head/share/man/man4/em.4 ============================================================================== --- head/share/man/man4/em.4 Wed Jun 3 17:45:45 2015 (r283958) +++ head/share/man/man4/em.4 Wed Jun 3 18:01:09 2015 (r283959) @@ -45,6 +45,14 @@ kernel configuration file: .Cd "device em" .Ed .Pp +Optional multiqueue support is available via the following kernel +compile options: +.Bd -ragged -offset indent +.Cd "options EM_MULTIQUEUE" +.Ed +.Pp +Note: Activating EM_MULTIQUEUE support is not supported by Intel. +.Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : @@ -197,6 +205,18 @@ Tunables can be set at the prompt before booting the kernel or stored in .Xr loader.conf 5 . .Bl -tag -width indent +.It Va hw.em.eee_setting +Disable or enable Energy Efficient Ethernet. +Default 1 (disabled). +.It Va hw.em.msix +Enable or disable MSI-X style interrupts. +Default 1 (enabled). +.It Va hw.em.smart_pwr_down +Enable or disable smart power down features on newer adapters. +Default 0 (disabled). +.It Va hw.em.sbp +Show bad packets when in promiscuous mode. +Default 0 (off). .It Va hw.em.rxd Number of receive descriptors allocated by the driver. The default value is 1024 for adapters newer than 82547, @@ -228,6 +248,11 @@ If .Va hw.em.tx_int_delay is non-zero, this tunable limits the maximum delay in which a transmit interrupt is generated. +.It Va hw.em.num_queues +Number of hardware queues that will be configured on this adapter (maximum of 2) +Defaults to 1. +Only valid with kernel configuration +.Cd "options EM_MULTIQUEUE". .El .Sh FILES .Bl -tag -width /dev/led/em* @@ -287,3 +312,5 @@ You can enable it on an .Nm interface using .Xr ifconfig 8 . +.Pp +Activating EM_MULTIQUEUE support requires MSI-X features. Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Wed Jun 3 17:45:45 2015 (r283958) +++ head/sys/conf/NOTES Wed Jun 3 18:01:09 2015 (r283959) @@ -2980,6 +2980,9 @@ options RANDOM_DEBUG # Debugging messag # Module to enable execution of application via emulators like QEMU options IMAGACT_BINMISC +# Intel em(4) driver +options EM_MULTIQUEUE # Activate multiqueue features/disable MSI-X + # zlib I/O stream support # This enables support for compressed core dumps. options GZIO Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Wed Jun 3 17:45:45 2015 (r283958) +++ head/sys/conf/options Wed Jun 3 18:01:09 2015 (r283959) @@ -940,3 +940,6 @@ RCTL opt_global.h RANDOM_YARROW opt_random.h RANDOM_FORTUNA opt_random.h RANDOM_DEBUG opt_random.h + +# Intel em(4) driver +EM_MULTIQUEUE opt_em.h Modified: head/sys/dev/e1000/e1000_defines.h ============================================================================== --- head/sys/dev/e1000/e1000_defines.h Wed Jun 3 17:45:45 2015 (r283958) +++ head/sys/dev/e1000/e1000_defines.h Wed Jun 3 18:01:09 2015 (r283959) @@ -158,10 +158,12 @@ E1000_RXDEXT_STATERR_CXE | \ E1000_RXDEXT_STATERR_RXE) +#define E1000_MRQC_RSS_ENABLE_2Q 0x00000001 #define E1000_MRQC_RSS_FIELD_MASK 0xFFFF0000 #define E1000_MRQC_RSS_FIELD_IPV4_TCP 0x00010000 #define E1000_MRQC_RSS_FIELD_IPV4 0x00020000 #define E1000_MRQC_RSS_FIELD_IPV6_TCP_EX 0x00040000 +#define E1000_MRQC_RSS_FIELD_IPV6_EX 0x00080000 #define E1000_MRQC_RSS_FIELD_IPV6 0x00100000 #define E1000_MRQC_RSS_FIELD_IPV6_TCP 0x00200000 Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Wed Jun 3 17:45:45 2015 (r283958) +++ head/sys/dev/e1000/if_em.c Wed Jun 3 18:01:09 2015 (r283959) @@ -32,6 +32,8 @@ ******************************************************************************/ /*$FreeBSD$*/ +#include "opt_em.h" +#include "opt_ddb.h" #include "opt_inet.h" #include "opt_inet6.h" @@ -41,6 +43,10 @@ #include #include +#ifdef DDB +#include +#include +#endif #if __FreeBSD_version >= 800000 #include #endif @@ -52,6 +58,7 @@ #include #include #include +#include #include #include #include @@ -208,7 +215,7 @@ static int em_resume(device_t); #ifdef EM_MULTIQUEUE static int em_mq_start(if_t, struct mbuf *); static int em_mq_start_locked(if_t, - struct tx_ring *, struct mbuf *); + struct tx_ring *); static void em_qflush(if_t); #else static void em_start(if_t); @@ -299,6 +306,10 @@ static void em_handle_tx(void *context, static void em_handle_rx(void *context, int pending); static void em_handle_link(void *context, int pending); +#ifdef EM_MULTIQUEUE +static void em_enable_vectors_82574(struct adapter *); +#endif + static void em_set_sysctl_value(struct adapter *, const char *, const char *, int *, int); static int em_set_flowcntl(SYSCTL_HANDLER_ARGS); @@ -388,6 +399,19 @@ static int em_enable_msix = TRUE; SYSCTL_INT(_hw_em, OID_AUTO, enable_msix, CTLFLAG_RDTUN, &em_enable_msix, 0, "Enable MSI-X interrupts"); +#ifdef EM_MULTIQUEUE +static int em_num_queues = 1; +SYSCTL_INT(_hw_em, OID_AUTO, num_queues, CTLFLAG_RDTUN, &em_num_queues, 0, + "82574 only: Number of queues to configure, 0 indicates autoconfigure"); +#endif + +/* +** Global variable to store last used CPU when binding queues +** to CPUs in igb_allocate_msix. Starts at CPU_FIRST and increments when a +** queue is bound to a cpu. +*/ +static int em_last_bind_cpu = -1; + /* How many packets rxeof tries to clean at a time */ static int em_rx_process_limit = 100; SYSCTL_INT(_hw_em, OID_AUTO, rx_process_limit, CTLFLAG_RDTUN, @@ -420,10 +444,10 @@ static int em_probe(device_t dev) { char adapter_name[60]; - u16 pci_vendor_id = 0; - u16 pci_device_id = 0; - u16 pci_subvendor_id = 0; - u16 pci_subdevice_id = 0; + uint16_t pci_vendor_id = 0; + uint16_t pci_device_id = 0; + uint16_t pci_subvendor_id = 0; + uint16_t pci_subdevice_id = 0; em_vendor_info_t *ent; INIT_DEBUGOUT("em_probe: begin"); @@ -550,6 +574,11 @@ em_attach(device_t dev) goto err_pci; } + /* + * Setup MSI/X or MSI if PCI Express + */ + adapter->msix = em_setup_msix(adapter); + e1000_get_bus_info(hw); /* Set up some sysctls for the tunable interrupt delays */ @@ -880,7 +909,7 @@ em_resume(device_t dev) EM_TX_LOCK(txr); #ifdef EM_MULTIQUEUE if (!drbr_empty(ifp, txr->br)) - em_mq_start_locked(ifp, txr, NULL); + em_mq_start_locked(ifp, txr); #else if (!if_sendq_empty(ifp)) em_start_locked(ifp, txr); @@ -894,105 +923,7 @@ em_resume(device_t dev) } -#ifdef EM_MULTIQUEUE -/********************************************************************* - * Multiqueue Transmit routines - * - * em_mq_start is called by the stack to initiate a transmit. - * however, if busy the driver can queue the request rather - * than do an immediate send. It is this that is an advantage - * in this driver, rather than also having multiple tx queues. - **********************************************************************/ -static int -em_mq_start_locked(if_t ifp, struct tx_ring *txr, struct mbuf *m) -{ - struct adapter *adapter = txr->adapter; - struct mbuf *next; - int err = 0, enq = 0; - - if ((if_getdrvflags(ifp) & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING || adapter->link_active == 0) { - if (m != NULL) - err = drbr_enqueue(ifp, txr->br, m); - return (err); - } - - enq = 0; - if (m != NULL) { - err = drbr_enqueue(ifp, txr->br, m); - if (err) - return (err); - } - - /* Process the queue */ - while ((next = drbr_peek(ifp, txr->br)) != NULL) { - if ((err = em_xmit(txr, &next)) != 0) { - if (next == NULL) - drbr_advance(ifp, txr->br); - else - drbr_putback(ifp, txr->br, next); - break; - } - drbr_advance(ifp, txr->br); - enq++; - if_inc_counter(ifp, IFCOUNTER_OBYTES, next->m_pkthdr.len); - if (next->m_flags & M_MCAST) - if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); - if_etherbpfmtap(ifp, next); - if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0) - break; - } - - /* Mark the queue as having work */ - if ((enq > 0) && (txr->busy == EM_TX_IDLE)) - txr->busy = EM_TX_BUSY; - - if (txr->tx_avail < EM_MAX_SCATTER) - em_txeof(txr); - if (txr->tx_avail < EM_MAX_SCATTER) - if_setdrvflagbits(ifp, IFF_DRV_OACTIVE,0); - return (err); -} - -/* -** Multiqueue capable stack interface -*/ -static int -em_mq_start(if_t ifp, struct mbuf *m) -{ - struct adapter *adapter = if_getsoftc(ifp); - struct tx_ring *txr = adapter->tx_rings; - int error; - - if (EM_TX_TRYLOCK(txr)) { - error = em_mq_start_locked(ifp, txr, m); - EM_TX_UNLOCK(txr); - } else - error = drbr_enqueue(ifp, txr->br, m); - - return (error); -} - -/* -** Flush all ring buffers -*/ -static void -em_qflush(if_t ifp) -{ - struct adapter *adapter = if_getsoftc(ifp); - struct tx_ring *txr = adapter->tx_rings; - struct mbuf *m; - - for (int i = 0; i < adapter->num_queues; i++, txr++) { - EM_TX_LOCK(txr); - while ((m = buf_ring_dequeue_sc(txr->br)) != NULL) - m_freem(m); - EM_TX_UNLOCK(txr); - } - if_qflush(ifp); -} -#else /* !EM_MULTIQUEUE */ - +#ifndef EM_MULTIQUEUE static void em_start_locked(if_t ifp, struct tx_ring *txr) { @@ -1035,7 +966,8 @@ em_start_locked(if_t ifp, struct tx_ring txr->busy = EM_TX_BUSY; /* Send a copy of the frame to the BPF listener */ - if_etherbpfmtap(ifp, m_head); + ETHER_BPF_MTAP(ifp, m_head); + } return; @@ -1054,6 +986,115 @@ em_start(if_t ifp) } return; } +#else /* EM_MULTIQUEUE */ +/********************************************************************* + * Multiqueue Transmit routines + * + * em_mq_start is called by the stack to initiate a transmit. + * however, if busy the driver can queue the request rather + * than do an immediate send. It is this that is an advantage + * in this driver, rather than also having multiple tx queues. + **********************************************************************/ +/* +** Multiqueue capable stack interface +*/ +static int +em_mq_start(if_t ifp, struct mbuf *m) +{ + struct adapter *adapter = if_getsoftc(ifp); + struct tx_ring *txr = adapter->tx_rings; + unsigned int i, error; + + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) + i = m->m_pkthdr.flowid % adapter->num_queues; + else + i = curcpu % adapter->num_queues; + + txr = &adapter->tx_rings[i]; + + error = drbr_enqueue(ifp, txr->br, m); + if (error) + return (error); + + if (EM_TX_TRYLOCK(txr)) { + em_mq_start_locked(ifp, txr); + EM_TX_UNLOCK(txr); + } else + taskqueue_enqueue(txr->tq, &txr->tx_task); + + return (0); +} + +static int +em_mq_start_locked(if_t ifp, struct tx_ring *txr) +{ + struct adapter *adapter = txr->adapter; + struct mbuf *next; + int err = 0, enq = 0; + + EM_TX_LOCK_ASSERT(txr); + + if (((if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0) || + adapter->link_active == 0) { + return (ENETDOWN); + } + + /* Process the queue */ + while ((next = drbr_peek(ifp, txr->br)) != NULL) { + if ((err = em_xmit(txr, &next)) != 0) { + if (next == NULL) { + /* It was freed, move forward */ + drbr_advance(ifp, txr->br); + } else { + /* + * Still have one left, it may not be + * the same since the transmit function + * may have changed it. + */ + drbr_putback(ifp, txr->br, next); + } + break; + } + drbr_advance(ifp, txr->br); + enq++; + if_inc_counter(ifp, IFCOUNTER_OBYTES, next->m_pkthdr.len); + if (next->m_flags & M_MCAST) + if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); + ETHER_BPF_MTAP(ifp, next); + if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0) + break; + } + + /* Mark the queue as having work */ + if ((enq > 0) && (txr->busy == EM_TX_IDLE)) + txr->busy = EM_TX_BUSY; + + if (txr->tx_avail < EM_MAX_SCATTER) + em_txeof(txr); + if (txr->tx_avail < EM_MAX_SCATTER) { + if_setdrvflagbits(ifp, IFF_DRV_OACTIVE,0); + } + return (err); +} + +/* +** Flush all ring buffers +*/ +static void +em_qflush(if_t ifp) +{ + struct adapter *adapter = if_getsoftc(ifp); + struct tx_ring *txr = adapter->tx_rings; + struct mbuf *m; + + for (int i = 0; i < adapter->num_queues; i++, txr++) { + EM_TX_LOCK(txr); + while ((m = buf_ring_dequeue_sc(txr->br)) != NULL) + m_freem(m); + EM_TX_UNLOCK(txr); + } + if_qflush(ifp); +} #endif /* EM_MULTIQUEUE */ /********************************************************************* @@ -1449,7 +1490,7 @@ em_poll(if_t ifp, enum poll_cmd cmd, int em_txeof(txr); #ifdef EM_MULTIQUEUE if (!drbr_empty(ifp, txr->br)) - em_mq_start_locked(ifp, txr, NULL); + em_mq_start_locked(ifp, txr); #else if (!if_sendq_empty(ifp)) em_start_locked(ifp, txr); @@ -1516,14 +1557,14 @@ em_handle_que(void *context, int pending struct tx_ring *txr = adapter->tx_rings; struct rx_ring *rxr = adapter->rx_rings; - if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) { bool more = em_rxeof(rxr, adapter->rx_process_limit, NULL); + EM_TX_LOCK(txr); em_txeof(txr); #ifdef EM_MULTIQUEUE if (!drbr_empty(ifp, txr->br)) - em_mq_start_locked(ifp, txr, NULL); + em_mq_start_locked(ifp, txr); #else if (!if_sendq_empty(ifp)) em_start_locked(ifp, txr); @@ -1557,11 +1598,12 @@ em_msix_tx(void *arg) em_txeof(txr); #ifdef EM_MULTIQUEUE if (!drbr_empty(ifp, txr->br)) - em_mq_start_locked(ifp, txr, NULL); + em_mq_start_locked(ifp, txr); #else if (!if_sendq_empty(ifp)) em_start_locked(ifp, txr); #endif + /* Reenable this interrupt */ E1000_WRITE_REG(&adapter->hw, E1000_IMS, txr->ims); EM_TX_UNLOCK(txr); @@ -1587,9 +1629,10 @@ em_msix_rx(void *arg) more = em_rxeof(rxr, adapter->rx_process_limit, NULL); if (more) taskqueue_enqueue(rxr->tq, &rxr->rx_task); - else + else { /* Reenable this interrupt */ E1000_WRITE_REG(&adapter->hw, E1000_IMS, rxr->ims); + } return; } @@ -1616,6 +1659,16 @@ em_msix_link(void *arg) } else E1000_WRITE_REG(&adapter->hw, E1000_IMS, EM_MSIX_LINK | E1000_IMS_LSC); + /* + ** Because we must read the ICR for this interrupt + ** it may clear other causes using autoclear, for + ** this reason we simply create a soft interrupt + ** for all these vectors. + */ + if (reg_icr) { + E1000_WRITE_REG(&adapter->hw, + E1000_ICS, adapter->ims); + } return; } @@ -1629,9 +1682,10 @@ em_handle_rx(void *context, int pending) more = em_rxeof(rxr, adapter->rx_process_limit, NULL); if (more) taskqueue_enqueue(rxr->tq, &rxr->rx_task); - else + else { /* Reenable this interrupt */ E1000_WRITE_REG(&adapter->hw, E1000_IMS, rxr->ims); + } } static void @@ -1645,7 +1699,7 @@ em_handle_tx(void *context, int pending) em_txeof(txr); #ifdef EM_MULTIQUEUE if (!drbr_empty(ifp, txr->br)) - em_mq_start_locked(ifp, txr, NULL); + em_mq_start_locked(ifp, txr); #else if (!if_sendq_empty(ifp)) em_start_locked(ifp, txr); @@ -1675,7 +1729,7 @@ em_handle_link(void *context, int pendin EM_TX_LOCK(txr); #ifdef EM_MULTIQUEUE if (!drbr_empty(ifp, txr->br)) - em_mq_start_locked(ifp, txr, NULL); + em_mq_start_locked(ifp, txr); #else if (if_sendq_empty(ifp)) em_start_locked(ifp, txr); @@ -2219,7 +2273,7 @@ em_local_timer(void *arg) if_t ifp = adapter->ifp; struct tx_ring *txr = adapter->tx_rings; struct rx_ring *rxr = adapter->rx_rings; - u32 trigger; + u32 trigger = 0; EM_CORE_LOCK_ASSERT(adapter); @@ -2232,9 +2286,11 @@ em_local_timer(void *arg) e1000_rar_set(&adapter->hw, adapter->hw.mac.addr, 0); /* Mask to use in the irq trigger */ - if (adapter->msix_mem) - trigger = rxr->ims; - else + if (adapter->msix_mem) { + for (int i = 0; i < adapter->num_queues; i++, rxr++) + trigger |= rxr->ims; + rxr = adapter->rx_rings; + } else trigger = E1000_ICS_RXDMT0; /* @@ -2243,7 +2299,6 @@ em_local_timer(void *arg) ** and the HUNG state will be static if set. */ for (int i = 0; i < adapter->num_queues; i++, txr++) { - /* Last cycle a queue was declared hung */ if (txr->busy == EM_TX_HUNG) goto hung; if (txr->busy >= EM_TX_MAXTRIES) @@ -2261,14 +2316,9 @@ em_local_timer(void *arg) return; hung: /* Looks like we're hung */ - device_printf(adapter->dev, "Watchdog timeout -- resetting\n"); - device_printf(adapter->dev, - "Queue(%d) tdh = %d, hw tdt = %d\n", txr->me, - E1000_READ_REG(&adapter->hw, E1000_TDH(txr->me)), - E1000_READ_REG(&adapter->hw, E1000_TDT(txr->me))); - device_printf(adapter->dev,"TX(%d) desc avail = %d," - "Next TX to Clean = %d\n", - txr->me, txr->tx_avail, txr->next_to_clean); + device_printf(adapter->dev, "Watchdog timeout Queue[%d]-- resetting\n", + txr->me); + em_print_debug_info(adapter); if_setdrvflagbits(ifp, 0, IFF_DRV_RUNNING); adapter->watchdog_events++; em_init_locked(adapter); @@ -2320,7 +2370,7 @@ em_update_link_status(struct adapter *ad (hw->mac.type == e1000_82572))) { int tarc0; tarc0 = E1000_READ_REG(hw, E1000_TARC(0)); - tarc0 &= ~SPEED_MODE_BIT; + tarc0 &= ~TARC_SPEED_MODE_BIT; E1000_WRITE_REG(hw, E1000_TARC(0), tarc0); } if (bootverbose) @@ -2436,14 +2486,6 @@ em_allocate_pci_resources(struct adapter rman_get_bushandle(adapter->memory); adapter->hw.hw_addr = (u8 *)&adapter->osdep.mem_bus_space_handle; - /* Default to a single queue */ - adapter->num_queues = 1; - - /* - * Setup MSI/X or MSI if PCI Express - */ - adapter->msix = em_setup_msix(adapter); - adapter->hw.back = &adapter->osdep; return (0); @@ -2518,13 +2560,14 @@ em_allocate_msix(struct adapter *adapter struct tx_ring *txr = adapter->tx_rings; struct rx_ring *rxr = adapter->rx_rings; int error, rid, vector = 0; + int cpu_id = 0; /* Make sure all interrupts are disabled */ E1000_WRITE_REG(&adapter->hw, E1000_IMC, 0xffffffff); /* First set up ring resources */ - for (int i = 0; i < adapter->num_queues; i++, txr++, rxr++) { + for (int i = 0; i < adapter->num_queues; i++, rxr++, vector++) { /* RX ring */ rid = vector + 1; @@ -2544,14 +2587,20 @@ em_allocate_msix(struct adapter *adapter return (error); } #if __FreeBSD_version >= 800504 - bus_describe_intr(dev, rxr->res, rxr->tag, "rx %d", i); + bus_describe_intr(dev, rxr->res, rxr->tag, "rx%d", i); #endif - rxr->msix = vector++; /* NOTE increment vector for TX */ + rxr->msix = vector; + + if (em_last_bind_cpu < 0) + em_last_bind_cpu = CPU_FIRST(); + cpu_id = em_last_bind_cpu; + bus_bind_intr(dev, rxr->res, cpu_id); + TASK_INIT(&rxr->rx_task, 0, em_handle_rx, rxr); rxr->tq = taskqueue_create_fast("em_rxq", M_NOWAIT, taskqueue_thread_enqueue, &rxr->tq); - taskqueue_start_threads(&rxr->tq, 1, PI_NET, "%s rxq", - device_get_nameunit(adapter->dev)); + taskqueue_start_threads(&rxr->tq, 1, PI_NET, "%s rxq (cpuid %d)", + device_get_nameunit(adapter->dev), cpu_id); /* ** Set the bit to enable interrupt ** in E1000_IMS -- bits 20 and 21 @@ -2559,8 +2608,13 @@ em_allocate_msix(struct adapter *adapter ** NOTHING to do with the MSIX vector */ rxr->ims = 1 << (20 + i); + adapter->ims |= rxr->ims; adapter->ivars |= (8 | rxr->msix) << (i * 4); + em_last_bind_cpu = CPU_NEXT(em_last_bind_cpu); + } + + for (int i = 0; i < adapter->num_queues; i++, txr++, vector++) { /* TX ring */ rid = vector + 1; txr->res = bus_alloc_resource_any(dev, @@ -2578,14 +2632,20 @@ em_allocate_msix(struct adapter *adapter return (error); } #if __FreeBSD_version >= 800504 - bus_describe_intr(dev, txr->res, txr->tag, "tx %d", i); + bus_describe_intr(dev, txr->res, txr->tag, "tx%d", i); #endif - txr->msix = vector++; /* Increment vector for next pass */ + txr->msix = vector; + + if (em_last_bind_cpu < 0) + em_last_bind_cpu = CPU_FIRST(); + cpu_id = em_last_bind_cpu; + bus_bind_intr(dev, txr->res, cpu_id); + TASK_INIT(&txr->tx_task, 0, em_handle_tx, txr); txr->tq = taskqueue_create_fast("em_txq", M_NOWAIT, taskqueue_thread_enqueue, &txr->tq); - taskqueue_start_threads(&txr->tq, 1, PI_NET, "%s txq", - device_get_nameunit(adapter->dev)); + taskqueue_start_threads(&txr->tq, 1, PI_NET, "%s txq (cpuid %d)", + device_get_nameunit(adapter->dev), cpu_id); /* ** Set the bit to enable interrupt ** in E1000_IMS -- bits 22 and 23 @@ -2593,13 +2653,16 @@ em_allocate_msix(struct adapter *adapter ** NOTHING to do with the MSIX vector */ txr->ims = 1 << (22 + i); + adapter->ims |= txr->ims; adapter->ivars |= (8 | txr->msix) << (8 + (i * 4)); + + em_last_bind_cpu = CPU_NEXT(em_last_bind_cpu); } /* Link interrupt */ - ++rid; + rid = vector + 1; adapter->res = bus_alloc_resource_any(dev, - SYS_RES_IRQ, &rid, RF_ACTIVE); + SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if (!adapter->res) { device_printf(dev,"Unable to allocate " "bus resource: Link interrupt [%d]\n", rid); @@ -2615,7 +2678,7 @@ em_allocate_msix(struct adapter *adapter return (error); } #if __FreeBSD_version >= 800504 - bus_describe_intr(dev, adapter->res, adapter->tag, "link"); + bus_describe_intr(dev, adapter->res, adapter->tag, "link"); #endif adapter->linkvec = vector; adapter->ivars |= (8 | vector) << 16; @@ -2639,9 +2702,8 @@ em_free_pci_resources(struct adapter *ad */ for (int i = 0; i < adapter->num_queues; i++) { txr = &adapter->tx_rings[i]; - rxr = &adapter->rx_rings[i]; /* an early abort? */ - if ((txr == NULL) || (rxr == NULL)) + if (txr == NULL) break; rid = txr->msix +1; if (txr->tag != NULL) { @@ -2651,6 +2713,11 @@ em_free_pci_resources(struct adapter *ad if (txr->res != NULL) bus_release_resource(dev, SYS_RES_IRQ, rid, txr->res); + + rxr = &adapter->rx_rings[i]; + /* an early abort? */ + if (rxr == NULL) + break; rid = rxr->msix +1; if (rxr->tag != NULL) { bus_teardown_intr(dev, rxr->res, rxr->tag); @@ -2700,14 +2767,19 @@ em_setup_msix(struct adapter *adapter) device_t dev = adapter->dev; int val; + /* Nearly always going to use one queue */ + adapter->num_queues = 1; + /* - ** Setup MSI/X for Hartwell: tests have shown - ** use of two queues to be unstable, and to - ** provide no great gain anyway, so we simply - ** seperate the interrupts and use a single queue. + ** Try using MSI-X for Hartwell adapters */ if ((adapter->hw.mac.type == e1000_82574) && (em_enable_msix == TRUE)) { +#ifdef EM_MULTIQUEUE + adapter->num_queues = (em_num_queues == 1) ? 1 : 2; + if (adapter->num_queues > 1) + em_enable_vectors_82574(adapter); +#endif /* Map the MSIX BAR */ int rid = PCIR_BAR(EM_MSIX_BAR); adapter->msix_mem = bus_alloc_resource_any(dev, @@ -2719,16 +2791,34 @@ em_setup_msix(struct adapter *adapter) goto msi; } val = pci_msix_count(dev); - /* We only need/want 3 vectors */ - if (val >= 3) - val = 3; - else { - device_printf(adapter->dev, - "MSIX: insufficient vectors, using MSI\n"); - goto msi; + +#ifdef EM_MULTIQUEUE + /* We need 5 vectors in the multiqueue case */ + if (adapter->num_queues > 1 ) { + if (val >= 5) + val = 5; + else { + adapter->num_queues = 1; + device_printf(adapter->dev, + "Insufficient MSIX vectors for >1 queue, " + "using single queue...\n"); + goto msix_one; + } + } else { +msix_one: +#endif + if (val >= 3) + val = 3; + else { + device_printf(adapter->dev, + "Insufficient MSIX vectors, using MSI\n"); + goto msi; + } +#ifdef EM_MULTIQUEUE } +#endif - if ((pci_alloc_msix(dev, &val) == 0) && (val == 3)) { + if ((pci_alloc_msix(dev, &val) == 0)) { device_printf(adapter->dev, "Using MSIX interrupts " "with %d vectors\n", val); @@ -2749,7 +2839,7 @@ msi: } val = 1; if (pci_alloc_msi(dev, &val) == 0) { - device_printf(adapter->dev,"Using an MSI interrupt\n"); + device_printf(adapter->dev, "Using an MSI interrupt\n"); return (val); } /* Should only happen due to manual configuration */ @@ -3394,7 +3484,7 @@ em_initialize_transmit_unit(struct adapt { struct tx_ring *txr = adapter->tx_rings; struct e1000_hw *hw = &adapter->hw; - u32 tctl, tarc, tipg = 0; + u32 tctl, txdctl = 0, tarc, tipg = 0; INIT_DEBUGOUT("em_initialize_transmit_unit: begin"); @@ -3416,6 +3506,15 @@ em_initialize_transmit_unit(struct adapt E1000_READ_REG(&adapter->hw, E1000_TDLEN(i))); txr->busy = EM_TX_IDLE; + txdctl = 0; /* clear txdctl */ + txdctl |= 0x1f; /* PTHRESH */ + txdctl |= 1 << 8; /* HTHRESH */ + txdctl |= 1 << 16;/* WTHRESH */ + txdctl |= 1 << 22; /* Reserved bit 22 must always be 1 */ + txdctl |= E1000_TXDCTL_GRAN; + txdctl |= 1 << 25; /* LWTHRESH */ + + E1000_WRITE_REG(hw, E1000_TXDCTL(i), txdctl); } /* Set the default values for the Tx Inter Packet Gap timer */ @@ -3446,15 +3545,25 @@ em_initialize_transmit_unit(struct adapt if ((adapter->hw.mac.type == e1000_82571) || (adapter->hw.mac.type == e1000_82572)) { tarc = E1000_READ_REG(&adapter->hw, E1000_TARC(0)); - tarc |= SPEED_MODE_BIT; + tarc |= TARC_SPEED_MODE_BIT; E1000_WRITE_REG(&adapter->hw, E1000_TARC(0), tarc); } else if (adapter->hw.mac.type == e1000_80003es2lan) { + /* errata: program both queues to unweighted RR */ tarc = E1000_READ_REG(&adapter->hw, E1000_TARC(0)); tarc |= 1; E1000_WRITE_REG(&adapter->hw, E1000_TARC(0), tarc); tarc = E1000_READ_REG(&adapter->hw, E1000_TARC(1)); tarc |= 1; E1000_WRITE_REG(&adapter->hw, E1000_TARC(1), tarc); + } else if (adapter->hw.mac.type == e1000_82574) { + tarc = E1000_READ_REG(&adapter->hw, E1000_TARC(0)); + tarc |= TARC_ERRATA_BIT; + if ( adapter->num_queues > 1) { + tarc |= (TARC_COMPENSATION_MODE | TARC_MQ_FIX); + E1000_WRITE_REG(&adapter->hw, E1000_TARC(0), tarc); + E1000_WRITE_REG(&adapter->hw, E1000_TARC(1), tarc); + } else + E1000_WRITE_REG(&adapter->hw, E1000_TARC(0), tarc); } adapter->txd_cmd = E1000_TXD_CMD_IFCS; @@ -3885,8 +3994,9 @@ em_txeof(struct tx_ring *txr) * TX lock which, with a single queue, guarantees * sanity. */ - if (txr->tx_avail >= EM_MAX_SCATTER) + if (txr->tx_avail >= EM_MAX_SCATTER) { if_setdrvflagbits(ifp, 0, IFF_DRV_OACTIVE); + } /* Disable hang detection if all clean */ if (txr->tx_avail == adapter->num_tx_desc) @@ -4258,6 +4368,9 @@ em_initialize_receive_unit(struct adapte E1000_WRITE_REG(&adapter->hw, E1000_RADV, adapter->rx_abs_int_delay.value); + + E1000_WRITE_REG(&adapter->hw, E1000_RDTR, + adapter->rx_int_delay.value); /* * Set the interrupt throttling rate. Value is calculated * as DEFAULT_ITR = 1/(MAX_INTS_PER_SEC * 256ns) @@ -4269,20 +4382,65 @@ em_initialize_receive_unit(struct adapte ** using the EITR register (82574 only) */ if (hw->mac.type == e1000_82574) { + u32 rfctl; for (int i = 0; i < 4; i++) E1000_WRITE_REG(hw, E1000_EITR_82574(i), DEFAULT_ITR); /* Disable accelerated acknowledge */ - E1000_WRITE_REG(hw, E1000_RFCTL, E1000_RFCTL_ACK_DIS); + rfctl = E1000_READ_REG(hw, E1000_RFCTL); + rfctl |= E1000_RFCTL_ACK_DIS; + E1000_WRITE_REG(hw, E1000_RFCTL, rfctl); } rxcsum = E1000_READ_REG(hw, E1000_RXCSUM); - if (if_getcapenable(ifp) & IFCAP_RXCSUM) + if (if_getcapenable(ifp) & IFCAP_RXCSUM) { +#ifdef EM_MULTIQUEUE + rxcsum |= E1000_RXCSUM_TUOFL | + E1000_RXCSUM_IPOFL | + E1000_RXCSUM_PCSD; +#else rxcsum |= E1000_RXCSUM_TUOFL; - else +#endif + } else rxcsum &= ~E1000_RXCSUM_TUOFL; + E1000_WRITE_REG(hw, E1000_RXCSUM, rxcsum); +#ifdef EM_MULTIQUEUE + if (adapter->num_queues > 1) { + uint32_t rss_key[10]; + uint32_t reta; + int i; + + /* + * Configure RSS key + */ + arc4rand(rss_key, sizeof(rss_key), 0); + for (i = 0; i < 10; ++i) + E1000_WRITE_REG_ARRAY(hw,E1000_RSSRK(0), i, rss_key[i]); + + /* + * Configure RSS redirect table in following fashion: + * (hash & ring_cnt_mask) == rdr_table[(hash & rdr_table_mask)] + */ + reta = 0; + for (i = 0; i < 4; ++i) { + uint32_t q; + q = (i % adapter->num_queues) << 7; + reta |= q << (8 * i); + } + for (i = 0; i < 32; ++i) + E1000_WRITE_REG(hw, E1000_RETA(i), reta); + + E1000_WRITE_REG(hw, E1000_MRQC, E1000_MRQC_RSS_ENABLE_2Q | + E1000_MRQC_RSS_FIELD_IPV4_TCP | + E1000_MRQC_RSS_FIELD_IPV4 | + E1000_MRQC_RSS_FIELD_IPV6_TCP_EX | + E1000_MRQC_RSS_FIELD_IPV6_EX | + E1000_MRQC_RSS_FIELD_IPV6 | + E1000_MRQC_RSS_FIELD_IPV6_TCP); + } +#endif /* ** XXX TEMPORARY WORKAROUND: on some systems with 82573 ** long latencies are observed, like Lenovo X60. This @@ -4317,13 +4475,30 @@ em_initialize_receive_unit(struct adapte E1000_WRITE_REG(hw, E1000_RDT(i), rdt); } - /* Set PTHRESH for improved jumbo performance */ + /* + * Set PTHRESH for improved jumbo performance + * According to 10.2.5.11 of Intel 82574 Datasheet, + * RXDCTL(1) is written whenever RXDCTL(0) is written. + * Only write to RXDCTL(1) if there is a need for different + * settings. + */ if (((adapter->hw.mac.type == e1000_ich9lan) || (adapter->hw.mac.type == e1000_pch2lan) || (adapter->hw.mac.type == e1000_ich10lan)) && (if_getmtu(ifp) > ETHERMTU)) { u32 rxdctl = E1000_READ_REG(hw, E1000_RXDCTL(0)); E1000_WRITE_REG(hw, E1000_RXDCTL(0), rxdctl | 3); + } else if ((adapter->hw.mac.type == e1000_82574) && + (if_getmtu(ifp) > ETHERMTU)) { + for (int i = 0; i < adapter->num_queues; i++) { + u32 rxdctl = E1000_READ_REG(hw, E1000_RXDCTL(i)); + + rxdctl |= 0x20; /* PTHRESH */ + rxdctl |= 4 << 8; /* HTHRESH */ + rxdctl |= 4 << 16;/* WTHRESH */ + rxdctl |= 1 << 24; /* Switch to granularity */ + E1000_WRITE_REG(hw, E1000_RXDCTL(i), rxdctl); + } } if (adapter->hw.mac.type >= e1000_pch2lan) { @@ -4390,6 +4565,11 @@ em_rxeof(struct rx_ring *rxr, int count, EM_RX_LOCK(rxr); + /* Sync the ring */ + bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + + #ifdef DEV_NETMAP if (netmap_rx_irq(ifp, rxr->me, &processed)) { EM_RX_UNLOCK(rxr); @@ -4402,9 +4582,6 @@ em_rxeof(struct rx_ring *rxr, int count, if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0) break; - bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 18:33:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBFC65E5; Wed, 3 Jun 2015 18:33:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C3F31505; Wed, 3 Jun 2015 18:33:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53IXmwZ006972; Wed, 3 Jun 2015 18:33:48 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53IXmLI006969; Wed, 3 Jun 2015 18:33:48 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201506031833.t53IXmLI006969@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Jun 2015 18:33: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: r283960 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 18:33:48 -0000 Author: emaste Date: Wed Jun 3 18:33:47 2015 New Revision: 283960 URL: https://svnweb.freebsd.org/changeset/base/283960 Log: MFC r259438 by pjd: Fix syscalls that can be loaded as kernel modules They were not given the flag allowing to call them from capability mode sandbox. And regenerate init_sysent.c Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/kern/init_sysent.c stable/10/sys/kern/makesyscalls.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/init_sysent.c ============================================================================== --- stable/10/sys/kern/init_sysent.c Wed Jun 3 18:01:09 2015 (r283959) +++ stable/10/sys/kern/init_sysent.c Wed Jun 3 18:33:47 2015 (r283960) @@ -289,9 +289,9 @@ struct sysent sysent[] = { { AS(openbsd_poll_args), (sy_call_t *)sys_openbsd_poll, AUE_POLL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 252 = openbsd_poll */ { 0, (sy_call_t *)sys_issetugid, AUE_ISSETUGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 253 = issetugid */ { AS(lchown_args), (sy_call_t *)sys_lchown, AUE_LCHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 254 = lchown */ - { AS(aio_read_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 255 = aio_read */ - { AS(aio_write_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 256 = aio_write */ - { AS(lio_listio_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 257 = lio_listio */ + { AS(aio_read_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 255 = aio_read */ + { AS(aio_write_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 256 = aio_write */ + { AS(lio_listio_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 257 = lio_listio */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 258 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 259 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 260 = nosys */ @@ -348,13 +348,13 @@ struct sysent sysent[] = { { AS(setresuid_args), (sy_call_t *)sys_setresuid, AUE_SETRESUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 311 = setresuid */ { AS(setresgid_args), (sy_call_t *)sys_setresgid, AUE_SETRESGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 312 = setresgid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 313 = obsolete signanosleep */ - { AS(aio_return_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 314 = aio_return */ - { AS(aio_suspend_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 315 = aio_suspend */ - { AS(aio_cancel_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 316 = aio_cancel */ - { AS(aio_error_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 317 = aio_error */ - { AS(oaio_read_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 318 = oaio_read */ - { AS(oaio_write_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 319 = oaio_write */ - { AS(olio_listio_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 320 = olio_listio */ + { AS(aio_return_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 314 = aio_return */ + { AS(aio_suspend_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 315 = aio_suspend */ + { AS(aio_cancel_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 316 = aio_cancel */ + { AS(aio_error_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 317 = aio_error */ + { AS(oaio_read_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 318 = oaio_read */ + { AS(oaio_write_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 319 = oaio_write */ + { AS(olio_listio_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 320 = olio_listio */ { 0, (sy_call_t *)sys_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 321 = yield */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 322 = obsolete thr_sleep */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 323 = obsolete thr_wakeup */ @@ -393,7 +393,7 @@ struct sysent sysent[] = { { AS(extattr_set_file_args), (sy_call_t *)sys_extattr_set_file, AUE_EXTATTR_SET_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 356 = extattr_set_file */ { AS(extattr_get_file_args), (sy_call_t *)sys_extattr_get_file, AUE_EXTATTR_GET_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 357 = extattr_get_file */ { AS(extattr_delete_file_args), (sy_call_t *)sys_extattr_delete_file, AUE_EXTATTR_DELETE_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 358 = extattr_delete_file */ - { AS(aio_waitcomplete_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 359 = aio_waitcomplete */ + { AS(aio_waitcomplete_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 359 = aio_waitcomplete */ { AS(getresuid_args), (sy_call_t *)sys_getresuid, AUE_GETRESUID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 360 = getresuid */ { AS(getresgid_args), (sy_call_t *)sys_getresgid, AUE_GETRESGID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 361 = getresgid */ { 0, (sy_call_t *)sys_kqueue, AUE_KQUEUE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 362 = kqueue */ @@ -492,14 +492,14 @@ struct sysent sysent[] = { { AS(thr_new_args), (sy_call_t *)sys_thr_new, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 455 = thr_new */ { AS(sigqueue_args), (sy_call_t *)sys_sigqueue, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 456 = sigqueue */ { AS(kmq_open_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 457 = kmq_open */ - { AS(kmq_setattr_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 458 = kmq_setattr */ - { AS(kmq_timedreceive_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 459 = kmq_timedreceive */ - { AS(kmq_timedsend_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 460 = kmq_timedsend */ - { AS(kmq_notify_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 461 = kmq_notify */ + { AS(kmq_setattr_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 458 = kmq_setattr */ + { AS(kmq_timedreceive_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 459 = kmq_timedreceive */ + { AS(kmq_timedsend_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 460 = kmq_timedsend */ + { AS(kmq_notify_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 461 = kmq_notify */ { AS(kmq_unlink_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 462 = kmq_unlink */ { AS(abort2_args), (sy_call_t *)sys_abort2, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 463 = abort2 */ { AS(thr_set_name_args), (sy_call_t *)sys_thr_set_name, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 464 = thr_set_name */ - { AS(aio_fsync_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 465 = aio_fsync */ + { AS(aio_fsync_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 465 = aio_fsync */ { AS(rtprio_thread_args), (sy_call_t *)sys_rtprio_thread, AUE_RTPRIO, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 466 = rtprio_thread */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 467 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 468 = nosys */ Modified: stable/10/sys/kern/makesyscalls.sh ============================================================================== --- stable/10/sys/kern/makesyscalls.sh Wed Jun 3 18:01:09 2015 (r283959) +++ stable/10/sys/kern/makesyscalls.sh Wed Jun 3 18:33:47 2015 (r283960) @@ -459,7 +459,7 @@ s/\$//g printf("\t{ %s, (sy_call_t *)", argssize) > sysent column = 8 + 2 + length(argssize) + 15 if (flag("NOSTD")) { - printf("%s },", "lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT") > sysent + printf("lkmressys, AUE_NULL, NULL, 0, 0, %s, SY_THR_ABSENT },", flags) > sysent column = column + length("lkmressys") + length("AUE_NULL") + 3 } else { if (funcname == "nosys" || funcname == "sysarch" || From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 18:49:22 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72F11BC1; Wed, 3 Jun 2015 18:49:22 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B4C117C3; Wed, 3 Jun 2015 18:49:21 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id 8883818E10; Wed, 3 Jun 2015 11:49:15 -0700 (PDT) Date: Wed, 3 Jun 2015 11:49:15 -0700 From: hiren panchasara To: Michael Tuexen Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283806 - head/contrib/traceroute Message-ID: <20150603184915.GC20409@strugglingcoder.info> References: <201505310810.t4V8AZWR074647@svn.freebsd.org> <20150531185852.GA20409@strugglingcoder.info> <4E05B479-A012-4219-822A-68DF72CCAACF@freebsd.org> <0EA0845B-0C79-40D3-A73A-27EA1C6EDAC0@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="RIYY1s2vRbPFwWeW" Content-Disposition: inline In-Reply-To: <0EA0845B-0C79-40D3-A73A-27EA1C6EDAC0@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 18:49:22 -0000 --RIYY1s2vRbPFwWeW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 06/03/15 at 07:58P, Michael Tuexen wrote: > > On 31 May 2015, at 21:45, Michael Tuexen wrote: > >=20 > >> On 31 May 2015, at 20:58, hiren panchasara wrote: > >>=20 > >> On 05/31/15 at 08:10P, Michael Tuexen wrote: > >>> Author: tuexen > >>> Date: Sun May 31 08:10:35 2015 > >>> New Revision: 283806 > >>> URL: https://svnweb.freebsd.org/changeset/base/283806 > >>>=20 > >>> Log: > >>> When the packet verification fails in verbose mode, print the correct > >>> number of words in host byte order. Also remove a stray 'x'. > >>>=20 > >>> MFC after: 3 days > >>>=20 > >>> Modified: > >>> head/contrib/traceroute/traceroute.c > >>=20 > >> Picking up a random traceroute commit here. I am not sure of the histo= ry > >> but don't we try to upstream the fixes for contrib/* things, in genera= l?=20 > > The last version was release 12 years ago. They where integrated in > > https://svnweb.freebsd.org/base?view=3Drevision&revision=3D100787 > >=20 > > I can submit the patches also to traceroute@ee.lbl.gov as indicated in > > https://svnweb.freebsd.org/base/head/contrib/traceroute/FREEBSD-upgrade= ?view=3Dmarkup > I tried to... However, the e-mail address traceroute@ee.lbl.gov doesn't s= eem > to work anymore... In that case, we should continue fixing things in-house like you've been do= ing. Thanks again. cheers, Hiren --RIYY1s2vRbPFwWeW Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJVb0wqXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lDAMH/R5/EgTBYtXuhduDNrsPJaft GltOFd+lObkUQnKmGJ7+Rt851M0ODsOgmrXBsRni69ZmVhif/gF2/7PI5tgAd0Ca 1aNX4hA99tWReI8SlkDVVordV1BckTYRngGkp1pL2tsYgx81vN0hrzTJbmtbzFGZ +cC6YWBnqz56OhLtqdZ5rYBv5fGMkQAnwZMfLkp1jFh6oUxvEyUACrUMyvoix1jl agas+AUWG9quokeLYcWf2EnSb0IZlyzzM/jEf8b8OGlJagTlpjkKOqMLo4lrUk2h JYksMsiaT2pLMK/amOlC2hMyEFrd7zOHfwushdqa0set/6MeVtWpeh3Y9OVIndc= =EUif -----END PGP SIGNATURE----- --RIYY1s2vRbPFwWeW-- From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 19:08:27 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 097ABEAF; Wed, 3 Jun 2015 19:08:27 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDE211C7B; Wed, 3 Jun 2015 19:08:26 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53J8Q75024611; Wed, 3 Jun 2015 19:08:26 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53J8Q8P024606; Wed, 3 Jun 2015 19:08:26 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506031908.t53J8Q8P024606@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 3 Jun 2015 19:08:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283961 - head/usr.sbin/pw 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 19:08:27 -0000 Author: bapt Date: Wed Jun 3 19:08:25 2015 New Revision: 283961 URL: https://svnweb.freebsd.org/changeset/base/283961 Log: New pw -R rootdir option This allows to set an alternate root directory in which the users/groups will be manipulated Requested by: gjb, ian Tested by: gjb Modified: head/usr.sbin/pw/pw.c head/usr.sbin/pw/pw_user.c head/usr.sbin/pw/pwupd.h Modified: head/usr.sbin/pw/pw.c ============================================================================== --- head/usr.sbin/pw/pw.c Wed Jun 3 18:33:47 2015 (r283960) +++ head/usr.sbin/pw/pw.c Wed Jun 3 19:08:25 2015 (r283961) @@ -56,7 +56,7 @@ static const char *Combo2[] = { struct pwf PWF = { - 0, + PWF_REGULAR, setpwent, endpwent, getpwent, @@ -71,7 +71,7 @@ struct pwf PWF = }; struct pwf VPWF = { - 1, + PWF_ALT, vsetpwent, vendpwent, vgetpwent, @@ -99,24 +99,27 @@ main(int argc, char *argv[]) char *config = NULL; struct userconf *cnf; struct stat st; + char arg; + struct carg *carg; + char *etcpath = NULL; static const char *opts[W_NUM][M_NUM] = { { /* user */ - "V:C:qn:u:c:d:e:p:g:G:mM:k:s:oL:i:w:h:H:Db:NPy:Y", - "V:C:qn:u:rY", - "V:C:qn:u:c:d:e:p:g:G:mM:l:k:s:w:L:h:H:FNPY", - "V:C:qn:u:FPa7", - "V:C:q", - "V:C:q", - "V:C:q" + "R:V:C:qn:u:c:d:e:p:g:G:mM:k:s:oL:i:w:h:H:Db:NPy:Y", + "R:V:C:qn:u:rY", + "R:V:C:qn:u:c:d:e:p:g:G:mM:l:k:s:w:L:h:H:FNPY", + "R:V:C:qn:u:FPa7", + "R:V:C:q", + "R:V:C:q", + "R:V:C:q" }, { /* grp */ - "V:C:qn:g:h:H:M:opNPY", - "V:C:qn:g:Y", - "V:C:qn:d:g:l:h:H:FM:m:NPY", - "V:C:qn:g:FPa", - "V:C:q" + "R:V:C:qn:g:h:H:M:opNPY", + "R:V:C:qn:g:Y", + "R:V:C:qn:d:g:l:h:H:FM:m:NPY", + "R:V:C:qn:g:FPa", + "R:V:C:q" } }; @@ -141,7 +144,8 @@ main(int argc, char *argv[]) /* * Special case, allow pw -V [args] for scripts etc. */ - if (argv[1][1] == 'V') { + arg = argv[1][1]; + if (arg == 'V' || arg == 'R') { optarg = &argv[1][2]; if (*optarg == '\0') { if (stat(argv[2], &st) != 0) @@ -155,7 +159,7 @@ main(int argc, char *argv[]) ++argv; --argc; } - addarg(&arglist, 'V', optarg); + addarg(&arglist, arg, optarg); } else break; } @@ -217,19 +221,29 @@ main(int argc, char *argv[]) config = getarg(&arglist, 'C') ? getarg(&arglist, 'C')->val : NULL; - if (getarg(&arglist, 'V') != NULL) { - char * etcpath = getarg(&arglist, 'V')->val; - if (*etcpath) { - if (config == NULL) { /* Only override config location if -C not specified */ - asprintf(&config, "%s/pw.conf", etcpath); - if (config == NULL) - errx(EX_OSERR, "out of memory"); - } - memcpy(&PWF, &VPWF, sizeof PWF); - setpwdir(etcpath); - setgrdir(etcpath); + if ((carg = getarg(&arglist, 'R')) != NULL) { + asprintf(&etcpath, "%s/etc", carg->val); + if (etcpath == NULL) + errx(EX_OSERR, "out of memory"); + } + if (etcpath == NULL && (carg = getarg(&arglist, 'V')) != NULL) { + etcpath = strdup(carg->val); + if (etcpath == NULL) + errx(EX_OSERR, "out of memory"); + } + if (etcpath && *etcpath) { + if (config == NULL) { /* Only override config location if -C not specified */ + asprintf(&config, "%s/pw.conf", etcpath); + if (config == NULL) + errx(EX_OSERR, "out of memory"); } + setpwdir(etcpath); + setgrdir(etcpath); + memcpy(&PWF, &VPWF, sizeof PWF); + if (getarg(&arglist, 'R')) + PWF._altdir = PWF_ROOTDIR; } + free(etcpath); /* * Now, let's do the common initialisation @@ -303,6 +317,7 @@ cmdhelp(int mode, int which) { "usage: pw useradd [name] [switches]\n" "\t-V etcdir alternate /etc location\n" + "\t-R rootir alternate root directory\n" "\t-C config configuration file\n" "\t-q quiet operation\n" " Adding users:\n" @@ -325,6 +340,7 @@ cmdhelp(int mode, int which) "\t-N no update\n" " Setting defaults:\n" "\t-V etcdir alternate /etc location\n" + "\t-R rootir alternate root directory\n" "\t-D set user defaults\n" "\t-b dir default home root dir\n" "\t-e period default expiry period\n" @@ -341,12 +357,14 @@ cmdhelp(int mode, int which) "\t-y path set NIS passwd file path\n", "usage: pw userdel [uid|name] [switches]\n" "\t-V etcdir alternate /etc location\n" + "\t-R rootir alternate root directory\n" "\t-n name login name\n" "\t-u uid user id\n" "\t-Y update NIS maps\n" "\t-r remove home & contents\n", "usage: pw usermod [uid|name] [switches]\n" "\t-V etcdir alternate /etc location\n" + "\t-R rootir alternate root directory\n" "\t-C config configuration file\n" "\t-q quiet operation\n" "\t-F force add if no user\n" @@ -370,6 +388,7 @@ cmdhelp(int mode, int which) "\t-N no update\n", "usage: pw usershow [uid|name] [switches]\n" "\t-V etcdir alternate /etc location\n" + "\t-R rootir alternate root directory\n" "\t-n name login name\n" "\t-u uid user id\n" "\t-F force print\n" @@ -378,6 +397,7 @@ cmdhelp(int mode, int which) "\t-7 print in v7 format\n", "usage: pw usernext [switches]\n" "\t-V etcdir alternate /etc location\n" + "\t-R rootir alternate root directory\n" "\t-C config configuration file\n" "\t-q quiet operation\n", "usage pw: lock [switches]\n" @@ -392,6 +412,7 @@ cmdhelp(int mode, int which) { "usage: pw groupadd [group|gid] [switches]\n" "\t-V etcdir alternate /etc location\n" + "\t-R rootir alternate root directory\n" "\t-C config configuration file\n" "\t-q quiet operation\n" "\t-n group group name\n" @@ -402,11 +423,13 @@ cmdhelp(int mode, int which) "\t-N no update\n", "usage: pw groupdel [group|gid] [switches]\n" "\t-V etcdir alternate /etc location\n" + "\t-R rootir alternate root directory\n" "\t-n name group name\n" "\t-g gid group id\n" "\t-Y update NIS maps\n", "usage: pw groupmod [group|gid] [switches]\n" "\t-V etcdir alternate /etc location\n" + "\t-R rootir alternate root directory\n" "\t-C config configuration file\n" "\t-q quiet operation\n" "\t-F force add if not exists\n" @@ -420,6 +443,7 @@ cmdhelp(int mode, int which) "\t-N no update\n", "usage: pw groupshow [group|gid] [switches]\n" "\t-V etcdir alternate /etc location\n" + "\t-R rootir alternate root directory\n" "\t-n name group name\n" "\t-g gid group id\n" "\t-F force print\n" @@ -427,6 +451,7 @@ cmdhelp(int mode, int which) "\t-a print all accounting groups\n", "usage: pw groupnext [switches]\n" "\t-V etcdir alternate /etc location\n" + "\t-R rootir alternate root directory\n" "\t-C config configuration file\n" "\t-q quiet operation\n" } Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Wed Jun 3 18:33:47 2015 (r283960) +++ head/usr.sbin/pw/pw_user.c Wed Jun 3 19:08:25 2015 (r283961) @@ -63,6 +63,28 @@ static char *shell_path(char const * static void rmat(uid_t uid); static void rmopie(char const * name); +static void +create_and_populate_homedir(int mode, struct cargs *args, struct passwd *pwd, + struct userconf *cnf) +{ + char *homedir, *dotdir; + struct carg *arg; + + homedir = dotdir = NULL; + + if ((arg = getarg(args, 'R'))) { + asprintf(&homedir, "%s/%s", arg->val, pwd->pw_dir); + if (homedir == NULL) + errx(EX_OSERR, "out of memory"); + asprintf(&dotdir, "%s/%s", arg->val, cnf->dotdir); + } + + copymkdir(homedir ? homedir : pwd->pw_dir, dotdir ? dotdir: cnf->dotdir, + cnf->homemode, pwd->pw_uid, pwd->pw_gid); + pw_log(cnf, mode, W_USER, "%s(%u) home %s made", pwd->pw_name, + pwd->pw_uid, pwd->pw_dir); +} + /*- * -C config configuration file * -q quiet operation @@ -108,6 +130,7 @@ pw_user(struct userconf * cnf, int mode, struct group *grp; struct stat st; char line[_PASSWORD_LEN+1]; + char path[MAXPATHLEN]; FILE *fp; char *dmode_c; void *set = NULL; @@ -451,7 +474,7 @@ pw_user(struct userconf * cnf, int mode, pw_log(cnf, mode, W_USER, "%s(%u) account removed", a_name->val, uid); - if (!PWALTDIR()) { + if (PWALTDIR()) { /* * Remove mail file */ @@ -800,11 +823,13 @@ pw_user(struct userconf * cnf, int mode, * doesn't hurt anything to create the empty mailfile */ if (mode == M_ADD) { - if (!PWALTDIR()) { - snprintf(line, sizeof(line), "%s/%s", _PATH_MAILDIR, pwd->pw_name); - close(open(line, O_RDWR | O_CREAT, 0600)); /* Preserve contents & + if (PWALTDIR() != PWF_ALT) { + arg = getarg(args, 'R'); + snprintf(path, sizeof(path), "%s%s/%s", + arg ? arg->val : "", _PATH_MAILDIR, pwd->pw_name); + close(open(path, O_RDWR | O_CREAT, 0600)); /* Preserve contents & * mtime */ - chown(line, pwd->pw_uid, pwd->pw_gid); + chown(path, pwd->pw_uid, pwd->pw_gid); } } @@ -813,12 +838,9 @@ pw_user(struct userconf * cnf, int mode, * that this also `works' for editing users if -m is used, but * existing files will *not* be overwritten. */ - if (!PWALTDIR() && getarg(args, 'm') != NULL && pwd->pw_dir && *pwd->pw_dir == '/' && pwd->pw_dir[1]) { - copymkdir(pwd->pw_dir, cnf->dotdir, cnf->homemode, pwd->pw_uid, pwd->pw_gid); - pw_log(cnf, mode, W_USER, "%s(%u) home %s made", - pwd->pw_name, pwd->pw_uid, pwd->pw_dir); - } - + if (PWALTDIR() != PWF_ALT && getarg(args, 'm') != NULL && pwd->pw_dir && + *pwd->pw_dir == '/' && pwd->pw_dir[1]) + create_and_populate_homedir(mode, args, pwd, cnf); /* * Finally, send mail to the new user as well, if we are asked to Modified: head/usr.sbin/pw/pwupd.h ============================================================================== --- head/usr.sbin/pw/pwupd.h Wed Jun 3 18:33:47 2015 (r283960) +++ head/usr.sbin/pw/pwupd.h Wed Jun 3 19:08:25 2015 (r283961) @@ -71,6 +71,10 @@ extern struct pwf VPWF; #define GETGRGID(gid) PWF._getgrgid(gid) #define GETGRNAM(nam) PWF._getgrnam(nam) +#define PWF_REGULAR 0 +#define PWF_ALT 1 +#define PWF_ROOTDIR 2 + #define PWALTDIR() PWF._altdir #ifndef _PATH_PWD #define _PATH_PWD "/etc" From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 19:17:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67EFA2A9; Wed, 3 Jun 2015 19:17:46 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BDAF1EC6; Wed, 3 Jun 2015 19:17:46 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53JHko5029588; Wed, 3 Jun 2015 19:17:46 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53JHkYs029587; Wed, 3 Jun 2015 19:17:46 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201506031917.t53JHkYs029587@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Jun 2015 19:17:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283962 - head/usr.sbin/pw 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 19:17:46 -0000 Author: gjb Date: Wed Jun 3 19:17:45 2015 New Revision: 283962 URL: https://svnweb.freebsd.org/changeset/base/283962 Log: Document pw(8) '-R' option, added in r283961. MFC after: 1 week X-MFC-after: r283961 Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/pw/pw.8 Modified: head/usr.sbin/pw/pw.8 ============================================================================== --- head/usr.sbin/pw/pw.8 Wed Jun 3 19:08:25 2015 (r283961) +++ head/usr.sbin/pw/pw.8 Wed Jun 3 19:17:45 2015 (r283962) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 29, 2012 +.Dd June 3, 2015 .Dt PW 8 .Os .Sh NAME @@ -32,6 +32,7 @@ .Nd create, remove, modify & display system users and groups .Sh SYNOPSIS .Nm +.Op Fl R Ar rootdir .Op Fl V Ar etcdir .Ar useradd .Op name|uid @@ -57,6 +58,7 @@ .Op Fl P .Op Fl Y .Nm +.Op Fl R Ar rootdir .Op Fl V Ar etcdir .Ar useradd .Op name|uid @@ -76,6 +78,7 @@ .Op Fl s Ar shell .Op Fl y Ar path .Nm +.Op Fl R Ar rootdir .Op Fl V Ar etcdir .Ar userdel .Op name|uid @@ -84,6 +87,7 @@ .Op Fl r .Op Fl Y .Nm +.Op Fl R Ar rootdir .Op Fl V Ar etcdir .Ar usermod .Op name|uid @@ -109,6 +113,7 @@ .Op Fl P .Op Fl Y .Nm +.Op Fl R Ar rootdir .Op Fl V Ar etcdir .Ar usershow .Op name|uid @@ -119,11 +124,13 @@ .Op Fl 7 .Op Fl a .Nm +.Op Fl R Ar rootdir .Op Fl V Ar etcdir .Ar usernext .Op Fl C Ar config .Op Fl q .Nm +.Op Fl R Ar rootdir .Op Fl V Ar etcdir .Ar groupadd .Op group|gid @@ -138,6 +145,7 @@ .Op Fl P .Op Fl Y .Nm +.Op Fl R Ar rootdir .Op Fl V Ar etcdir .Ar groupdel .Op group|gid @@ -145,6 +153,7 @@ .Op Fl g Ar gid .Op Fl Y .Nm +.Op Fl R Ar rootdir .Op Fl V Ar etcdir .Ar groupmod .Op group|gid @@ -161,6 +170,7 @@ .Op Fl P .Op Fl Y .Nm +.Op Fl R Ar rootdir .Op Fl V Ar etcdir .Ar groupshow .Op group|gid @@ -170,17 +180,20 @@ .Op Fl P .Op Fl a .Nm +.Op Fl R Ar rootdir .Op Fl V Ar etcdir .Ar groupnext .Op Fl C Ar config .Op Fl q .Nm +.Op Fl R Ar rootdir .Op Fl V Ar etcdir .Ar lock .Op name|uid .Op Fl C Ar config .Op Fl q .Nm +.Op Fl R Ar rootdir .Op Fl V Ar etcdir .Ar unlock .Op name|uid @@ -246,6 +259,12 @@ options. .Pp The following flags are common to most or all modes of operation: .Bl -tag -width "-G grouplist" +.It Fl R Ar rootdir +Specifies an alternate root directory within which +.Nm +will operate. +Any paths specified will be relative to +.Va rootdir . .It Fl V Ar etcdir This flag sets an alternate location for the password, group and configuration files, and may be used to maintain a user/group database in an alternate location. From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 19:18:07 2015 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5588D407; Wed, 3 Jun 2015 19:18:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Wed, 3 Jun 2015 19:18:02 +0000 From: Glen Barber To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283961 - head/usr.sbin/pw Message-ID: <20150603191802.GA1550@hub.FreeBSD.org> References: <201506031908.t53J8Q8P024606@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline In-Reply-To: <201506031908.t53J8Q8P024606@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 X-PEKBAC-Definition: Problem Exists, Keyboard Between Admin/Computer User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 19:18:07 -0000 --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 03, 2015 at 07:08:26PM +0000, Baptiste Daroussin wrote: > Author: bapt > Date: Wed Jun 3 19:08:25 2015 > New Revision: 283961 > URL: https://svnweb.freebsd.org/changeset/base/283961 >=20 > Log: > New pw -R rootdir option > =20 > This allows to set an alternate root directory in which the users/group= s will be > manipulated > =20 > Requested by: gjb, ian > Tested by: gjb >=20 Thank you! Glen --UugvWAfsgieZRqgk Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVb1LkAAoJEAMUWKVHj+KTYZgP/RyRO/Z7/b6Xj2ykXQy1qtHT axUZdpZ1Z0xnESoHtRyr6KuZsbibpiH/jPgeFqprpmhkWILhhM97rplm8XkKp2Vo pcBWjvHVkjL37+SMp357OgWCMg7Prom0X6I/U/sDaYqGv4gxEgtFslDyhbs0xoYk R86AeP0jpbSelBQwkh+3j3+wGqWE4bi3YP+W634TPwEnaM3wAdT4voUkxTnat601 jOWuHLtL5RAxjCW63m68g2WJ3mXlDvnfRrpyqJawFe25d3H8u0N0XWpPSqV6ZYkJ 5oCmNfcJYwAdRgc3cjq2y1c/QD4xHiqH4P2yrDVcsA26TOzaTukX42PpIBccjTgA jPBd9G4DXXGn8Dpu6xQ53SpZHCMGQnaUctwSAo11bVf1HWYbJXlx1KQs9GcRv3PC /6pc0H2VzLTuyHvjZrPjvkZNKEQy9vg01Jy1QKqErKUrkTkmz0ZaDMqj5Dgfab0y UeB0NVowCiBXmiJtkgU/Y2frZI9OfbhFmURzqxy0YxGekckm715txx4p3HsJdcQm IdIqAcdQvmzy41895jndOsk2+GQvQO7ixge3FgwBuFlriMvId3QkM8UGfA8N6X8z JMroB8WONeYpXQIzyLHhH70soOWoJeOhxyP1xEtTVt3z7stMclAQaBrHeYZBoGfF 6EJZW0cS3b+rYz+rVehP =Z6CM -----END PGP SIGNATURE----- --UugvWAfsgieZRqgk-- From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 19:19:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA52C572; Wed, 3 Jun 2015 19:19:26 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97B351EDE; Wed, 3 Jun 2015 19:19:26 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53JJQ6P029862; Wed, 3 Jun 2015 19:19:26 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53JJQTG029861; Wed, 3 Jun 2015 19:19:26 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201506031919.t53JJQTG029861@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Jun 2015 19:19:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283963 - head/release/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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 19:19:26 -0000 Author: gjb Date: Wed Jun 3 19:19:25 2015 New Revision: 283963 URL: https://svnweb.freebsd.org/changeset/base/283963 Log: Use the new pw(8) '-R' option to create the users/groups. MFC after: 1 week X-MFC-after: r283961 Sponsored by: The FreeBSD Foundation Modified: head/release/tools/arm.subr Modified: head/release/tools/arm.subr ============================================================================== --- head/release/tools/arm.subr Wed Jun 3 19:17:45 2015 (r283962) +++ head/release/tools/arm.subr Wed Jun 3 19:19:25 2015 (r283963) @@ -80,14 +80,13 @@ arm_create_disk() { arm_create_user() { # Create a default user account 'freebsd' with the password 'freebsd', # and set the default password for the 'root' user to 'root'. - chroot ${CHROOTDIR} /usr/sbin/pw -V ${DESTDIR}/etc \ + chroot ${CHROOTDIR} /usr/sbin/pw -R ${DESTDIR} \ groupadd freebsd -g 1001 - chroot ${CHROOTDIR} /usr/sbin/pw -V ${DESTDIR}/etc \ + chroot ${CHROOTDIR} /usr/sbin/pw -R ${DESTDIR} \ useradd freebsd \ -m -M 0755 -w yes -n freebsd -u 1001 -g 1001 -G 0 \ - -c 'FreeBSD User' -d '/home/freebsd' -s '/bin/csh' \ - -b "${DESTDIR}/home" - chroot ${CHROOTDIR} /usr/sbin/pw -V ${DESTDIR}/etc \ + -c 'FreeBSD User' -d '/home/freebsd' -s '/bin/csh' + chroot ${CHROOTDIR} /usr/sbin/pw -R ${DESTDIR} \ usermod root -w yes return 0 From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 19:22:16 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0E0A6EF; Wed, 3 Jun 2015 19:22:16 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF1F410D6; Wed, 3 Jun 2015 19:22:16 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53JMGe5033889; Wed, 3 Jun 2015 19:22:16 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53JMGWp033888; Wed, 3 Jun 2015 19:22:16 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506031922.t53JMGWp033888@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 3 Jun 2015 19:22:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283964 - head/lib/libutil 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 19:22:17 -0000 Author: bapt Date: Wed Jun 3 19:22:16 2015 New Revision: 283964 URL: https://svnweb.freebsd.org/changeset/base/283964 Log: Fix typo Modified: head/lib/libutil/pw_util.3 Modified: head/lib/libutil/pw_util.3 ============================================================================== --- head/lib/libutil/pw_util.3 Wed Jun 3 19:19:25 2015 (r283963) +++ head/lib/libutil/pw_util.3 Wed Jun 3 19:22:16 2015 (r283964) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 30, 2012 +.Dd June 06, 2015 .Dt PW_UTIL 3 .Os .Sh NAME @@ -222,7 +222,7 @@ and it is the caller's responsibility to The .Fn pw_mkdb function regenerates the password database by running -.Xr pw_mkdb 8 . +.Xr pwd_mkdb 8 . If .Fa user only the record corresponding to that user will be updated. From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 19:27:38 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A4908C4; Wed, 3 Jun 2015 19:27:38 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF3241103; Wed, 3 Jun 2015 19:27:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53JRboq034599; Wed, 3 Jun 2015 19:27:37 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53JRbvQ034596; Wed, 3 Jun 2015 19:27:37 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201506031927.t53JRbvQ034596@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 3 Jun 2015 19:27:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r283965 - in vendor-sys/acpica/dist/source: common include tools/acpihelp 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 19:27:38 -0000 Author: jkim Date: Wed Jun 3 19:27:36 2015 New Revision: 283965 URL: https://svnweb.freebsd.org/changeset/base/283965 Log: - Update for new NFIT table GUIDs. - Fix ill-formed GUID strings for NFIT tables. - Fix a possible fault when performing a UUID search. https://github.com/acpica/acpica/commit/83727be https://github.com/acpica/acpica/commit/6005294 https://github.com/acpica/acpica/commit/4a1cca9 Modified: vendor-sys/acpica/dist/source/common/ahuuids.c vendor-sys/acpica/dist/source/include/acuuid.h vendor-sys/acpica/dist/source/tools/acpihelp/ahdecode.c Modified: vendor-sys/acpica/dist/source/common/ahuuids.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahuuids.c Wed Jun 3 19:22:16 2015 (r283964) +++ vendor-sys/acpica/dist/source/common/ahuuids.c Wed Jun 3 19:27:36 2015 (r283965) @@ -43,6 +43,7 @@ #include "acpi.h" #include "accommon.h" +#include "acuuid.h" #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME ("ahuuids") @@ -52,44 +53,36 @@ */ 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"}, + {"[Controllers]", NULL}, + {"GPIO Controller", UUID_GPIO_CONTROLLER}, + {"USB Controller", UUID_USB_CONTROLLER}, + {"SATA Controller", UUID_SATA_CONTROLLER}, + + {"[Devices]", NULL}, + {"PCI Host Bridge Device", UUID_PCI_HOST_BRIDGE}, + {"HID I2C Device", UUID_I2C_DEVICE}, + {"Power Button Device", UUID_POWER_BUTTON}, + + {"[Interfaces]", NULL}, + {"Device Labeling Interface", UUID_DEVICE_LABELING}, + {"Physical Presence Interface", UUID_PHYSICAL_PRESENCE}, + + {"[Non-volatile DIMM and NFIT table]", NULL}, + {"Volatile Memory Region", UUID_VOLATILE_MEMORY}, + {"Persistent Memory Region", UUID_PERSISTENT_MEMORY}, + {"NVDIMM Control Region", UUID_CONTROL_REGION}, + {"NVDIMM Data Region", UUID_DATA_REGION}, + {"Volatile Virtual Disk", UUID_VOLATILE_VIRTUAL_DISK}, + {"Volatile Virtual CD", UUID_VOLATILE_VIRTUAL_CD}, + {"Persistent Virtual Disk", UUID_PERSISTENT_VIRTUAL_DISK}, + {"Persistent Virtual CD", UUID_PERSISTENT_VIRTUAL_CD}, + + {"[Miscellaneous]", NULL}, + {"Platform-wide Capabilities", UUID_PLATFORM_CAPABILITIES}, + {"Dynamic Enumeration", UUID_DYNAMIC_ENUMERATION}, + {"Battery Thermal Limit", UUID_BATTERY_THERMAL_LIMIT}, + {"Thermal Extensions", UUID_THERMAL_EXTENSIONS}, + {"Device Properties for _DSD", UUID_DEVICE_PROPERTIES}, {NULL, NULL} }; @@ -120,6 +113,13 @@ AcpiAhMatchUuid ( for (Info = AcpiUuids; Info->Description; Info++) { + /* Null string means desciption is a UUID class */ + + if (!Info->String) + { + continue; + } + AcpiUtConvertStringToUuid (Info->String, UuidBuffer); if (!ACPI_MEMCMP (Data, UuidBuffer, UUID_BUFFER_LENGTH)) Modified: vendor-sys/acpica/dist/source/include/acuuid.h ============================================================================== --- vendor-sys/acpica/dist/source/include/acuuid.h Wed Jun 3 19:22:16 2015 (r283964) +++ vendor-sys/acpica/dist/source/include/acuuid.h Wed Jun 3 19:27:36 2015 (r283965) @@ -50,15 +50,41 @@ * Note2: This file is standalone and should remain that way. */ -/* NFIT/NVDIMM */ +/* Controllers */ + +#define UUID_GPIO_CONTROLLER "4f248f40-d5e2-499f-834c-27758ea1cd3f" +#define UUID_USB_CONTROLLER "ce2ee385-00e6-48cb-9f05-2edb927c4899" +#define UUID_SATA_CONTROLLER "e4db149b-fcfe-425b-a6d8-92357d78fc7f" + +/* Devices */ + +#define UUID_PCI_HOST_BRIDGE "33db4d5b-1ff7-401c-9657-7441c03dd766" +#define UUID_I2C_DEVICE "3cdff6f7-4267-4555-ad05-b30a3d8938de" +#define UUID_POWER_BUTTON "dfbcf3c5-e7a5-44e6-9c1f-29c76f6e059c" + +/* Interfaces */ + +#define UUID_DEVICE_LABELING "e5c937d0-3553-4d7a-9117-ea4d19c3434d" +#define UUID_PHYSICAL_PRESENCE "3dddfaa6-361b-4eb4-a424-8d10089d1653" + +/* NVDIMM - NFIT table */ + +#define UUID_VOLATILE_MEMORY "7305944f-fdda-44e3-b16c-3f22d252e5d0" +#define UUID_PERSISTENT_MEMORY "66f0d379-b4f3-4074-ac43-0d3318b78cdb" +#define UUID_CONTROL_REGION "92f701f6-13b4-405d-910b-299367e8234c" +#define UUID_DATA_REGION "91af0530-5d86-470e-a6b0-0a2db9408249" +#define UUID_VOLATILE_VIRTUAL_DISK "77ab535a-45fc-624b-5560-f7b281d1f96e" +#define UUID_VOLATILE_VIRTUAL_CD "3d5abd30-4175-87ce-6d64-d2ade523c4bb" +#define UUID_PERSISTENT_VIRTUAL_DISK "5cea02c9-4d07-69d3-269f-4496fbe096f9" +#define UUID_PERSISTENT_VIRTUAL_CD "08018188-42cd-bb48-100f-5387d53ded3d" + +/* Miscellaneous */ + +#define UUID_PLATFORM_CAPABILITIES "0811b06e-4a27-44f9-8d60-3cbbc22e7b48" +#define UUID_DYNAMIC_ENUMERATION "d8c1a3a6-be9b-4c9b-91bf-c3cb81fc5daf" +#define UUID_BATTERY_THERMAL_LIMIT "4c2067e3-887d-475c-9720-4af1d3ed602e" +#define UUID_THERMAL_EXTENSIONS "14d399cd-7a27-4b18-8fb4-7cb7b9f4e500" +#define UUID_DEVICE_PROPERTIES "daffd814-6eba-4d8c-8a91-bc9bbf4aa301" -#define UUID_VOLATILE_MEMORY "4F940573-DAFD-E344-B16C-3F22D252E5D0" -#define UUID_PERSISTENT_MEMORY "79D3F066-F3B4-7440-AC43-0D3318B78CDB" -#define UUID_CONTROL_REGION "F601F792-B413-5D40-910B-299367E8234C" -#define UUID_DATA_REGION "3005AF91-865D-0E47-A6B0-0A2DB9408249" -#define UUID_VOLATILE_VIRTUAL_DISK "5A53AB77-FC45-4B62-5560-F7B281D1F96E" -#define UUID_VOLATILE_VIRTUAL_CD "30BD5A3D-7541-CE87-6D64-D2ADE523C4BB" -#define UUID_PERSISTENT_VIRTUAL_DISK "C902EA5C-074D-69D3-269F-4496FBE096F9" -#define UUID_PERSISTENT_VIRTUAL_CD "88810108-CD42-48BB-100F-5387D53DED3D" #endif /* __AUUID_H__ */ Modified: vendor-sys/acpica/dist/source/tools/acpihelp/ahdecode.c ============================================================================== --- vendor-sys/acpica/dist/source/tools/acpihelp/ahdecode.c Wed Jun 3 19:22:16 2015 (r283964) +++ vendor-sys/acpica/dist/source/tools/acpihelp/ahdecode.c Wed Jun 3 19:27:36 2015 (r283965) @@ -912,12 +912,32 @@ AhDisplayUuids ( const AH_UUID *Info; - printf ("ACPI-related UUIDs:\n\n"); + printf ("ACPI-related UUIDs/GUIDs:\n"); + + /* Display entire table of known ACPI-related UUIDs/GUIDs */ for (Info = AcpiUuids; Info->Description; Info++) { - printf ("%32s : %s\n", Info->Description, Info->String); + if (!Info->String) /* Null UUID string means group description */ + { + printf ("\n%36s\n", Info->Description); + } + else + { + printf ("%32s : %s\n", Info->Description, Info->String); + } } + + /* Help info on how UUIDs/GUIDs strings are encoded */ + + printf ("\n\nByte encoding of UUID/GUID strings" + " into ACPI Buffer objects (use ToUUID from ASL):\n\n"); + + printf ("%32s : %s\n", "Input UUID/GUID String format", + "aabbccdd-eeff-gghh-iijj-kkllmmnnoopp"); + + printf ("%32s : %s\n", "Expected output ACPI buffer", + "dd,cc,bb,aa, ff,ee, hh,gg, ii,jj, kk,ll,mm,nn,oo,pp"); } From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 19:40:00 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D372ADD; Wed, 3 Jun 2015 19:40:00 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A65D13A6; Wed, 3 Jun 2015 19:40:00 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53Je0dm039936; Wed, 3 Jun 2015 19:40:00 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53JdxYO039882; Wed, 3 Jun 2015 19:39:59 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201506031939.t53JdxYO039882@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 3 Jun 2015 19:39:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283966 - in head/sys/contrib/dev/acpica: common 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 19:40:00 -0000 Author: jkim Date: Wed Jun 3 19:39:59 2015 New Revision: 283966 URL: https://svnweb.freebsd.org/changeset/base/283966 Log: MFV: r283965 - Update GUIDs for new NFIT tables. - Fix ill-formed GUID strings for NFIT tables. - Fix a possible fault when performing a UUID search. Modified: head/sys/contrib/dev/acpica/common/ahuuids.c head/sys/contrib/dev/acpica/include/acuuid.h Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/contrib/dev/acpica/common/ahuuids.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahuuids.c Wed Jun 3 19:27:36 2015 (r283965) +++ head/sys/contrib/dev/acpica/common/ahuuids.c Wed Jun 3 19:39:59 2015 (r283966) @@ -43,6 +43,7 @@ #include #include +#include #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME ("ahuuids") @@ -52,44 +53,36 @@ */ 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"}, + {"[Controllers]", NULL}, + {"GPIO Controller", UUID_GPIO_CONTROLLER}, + {"USB Controller", UUID_USB_CONTROLLER}, + {"SATA Controller", UUID_SATA_CONTROLLER}, + + {"[Devices]", NULL}, + {"PCI Host Bridge Device", UUID_PCI_HOST_BRIDGE}, + {"HID I2C Device", UUID_I2C_DEVICE}, + {"Power Button Device", UUID_POWER_BUTTON}, + + {"[Interfaces]", NULL}, + {"Device Labeling Interface", UUID_DEVICE_LABELING}, + {"Physical Presence Interface", UUID_PHYSICAL_PRESENCE}, + + {"[Non-volatile DIMM and NFIT table]", NULL}, + {"Volatile Memory Region", UUID_VOLATILE_MEMORY}, + {"Persistent Memory Region", UUID_PERSISTENT_MEMORY}, + {"NVDIMM Control Region", UUID_CONTROL_REGION}, + {"NVDIMM Data Region", UUID_DATA_REGION}, + {"Volatile Virtual Disk", UUID_VOLATILE_VIRTUAL_DISK}, + {"Volatile Virtual CD", UUID_VOLATILE_VIRTUAL_CD}, + {"Persistent Virtual Disk", UUID_PERSISTENT_VIRTUAL_DISK}, + {"Persistent Virtual CD", UUID_PERSISTENT_VIRTUAL_CD}, + + {"[Miscellaneous]", NULL}, + {"Platform-wide Capabilities", UUID_PLATFORM_CAPABILITIES}, + {"Dynamic Enumeration", UUID_DYNAMIC_ENUMERATION}, + {"Battery Thermal Limit", UUID_BATTERY_THERMAL_LIMIT}, + {"Thermal Extensions", UUID_THERMAL_EXTENSIONS}, + {"Device Properties for _DSD", UUID_DEVICE_PROPERTIES}, {NULL, NULL} }; @@ -120,6 +113,13 @@ AcpiAhMatchUuid ( for (Info = AcpiUuids; Info->Description; Info++) { + /* Null string means desciption is a UUID class */ + + if (!Info->String) + { + continue; + } + AcpiUtConvertStringToUuid (Info->String, UuidBuffer); if (!ACPI_MEMCMP (Data, UuidBuffer, UUID_BUFFER_LENGTH)) Modified: head/sys/contrib/dev/acpica/include/acuuid.h ============================================================================== --- head/sys/contrib/dev/acpica/include/acuuid.h Wed Jun 3 19:27:36 2015 (r283965) +++ head/sys/contrib/dev/acpica/include/acuuid.h Wed Jun 3 19:39:59 2015 (r283966) @@ -50,15 +50,41 @@ * Note2: This file is standalone and should remain that way. */ -/* NFIT/NVDIMM */ +/* Controllers */ + +#define UUID_GPIO_CONTROLLER "4f248f40-d5e2-499f-834c-27758ea1cd3f" +#define UUID_USB_CONTROLLER "ce2ee385-00e6-48cb-9f05-2edb927c4899" +#define UUID_SATA_CONTROLLER "e4db149b-fcfe-425b-a6d8-92357d78fc7f" + +/* Devices */ + +#define UUID_PCI_HOST_BRIDGE "33db4d5b-1ff7-401c-9657-7441c03dd766" +#define UUID_I2C_DEVICE "3cdff6f7-4267-4555-ad05-b30a3d8938de" +#define UUID_POWER_BUTTON "dfbcf3c5-e7a5-44e6-9c1f-29c76f6e059c" + +/* Interfaces */ + +#define UUID_DEVICE_LABELING "e5c937d0-3553-4d7a-9117-ea4d19c3434d" +#define UUID_PHYSICAL_PRESENCE "3dddfaa6-361b-4eb4-a424-8d10089d1653" + +/* NVDIMM - NFIT table */ + +#define UUID_VOLATILE_MEMORY "7305944f-fdda-44e3-b16c-3f22d252e5d0" +#define UUID_PERSISTENT_MEMORY "66f0d379-b4f3-4074-ac43-0d3318b78cdb" +#define UUID_CONTROL_REGION "92f701f6-13b4-405d-910b-299367e8234c" +#define UUID_DATA_REGION "91af0530-5d86-470e-a6b0-0a2db9408249" +#define UUID_VOLATILE_VIRTUAL_DISK "77ab535a-45fc-624b-5560-f7b281d1f96e" +#define UUID_VOLATILE_VIRTUAL_CD "3d5abd30-4175-87ce-6d64-d2ade523c4bb" +#define UUID_PERSISTENT_VIRTUAL_DISK "5cea02c9-4d07-69d3-269f-4496fbe096f9" +#define UUID_PERSISTENT_VIRTUAL_CD "08018188-42cd-bb48-100f-5387d53ded3d" + +/* Miscellaneous */ + +#define UUID_PLATFORM_CAPABILITIES "0811b06e-4a27-44f9-8d60-3cbbc22e7b48" +#define UUID_DYNAMIC_ENUMERATION "d8c1a3a6-be9b-4c9b-91bf-c3cb81fc5daf" +#define UUID_BATTERY_THERMAL_LIMIT "4c2067e3-887d-475c-9720-4af1d3ed602e" +#define UUID_THERMAL_EXTENSIONS "14d399cd-7a27-4b18-8fb4-7cb7b9f4e500" +#define UUID_DEVICE_PROPERTIES "daffd814-6eba-4d8c-8a91-bc9bbf4aa301" -#define UUID_VOLATILE_MEMORY "4F940573-DAFD-E344-B16C-3F22D252E5D0" -#define UUID_PERSISTENT_MEMORY "79D3F066-F3B4-7440-AC43-0D3318B78CDB" -#define UUID_CONTROL_REGION "F601F792-B413-5D40-910B-299367E8234C" -#define UUID_DATA_REGION "3005AF91-865D-0E47-A6B0-0A2DB9408249" -#define UUID_VOLATILE_VIRTUAL_DISK "5A53AB77-FC45-4B62-5560-F7B281D1F96E" -#define UUID_VOLATILE_VIRTUAL_CD "30BD5A3D-7541-CE87-6D64-D2ADE523C4BB" -#define UUID_PERSISTENT_VIRTUAL_DISK "C902EA5C-074D-69D3-269F-4496FBE096F9" -#define UUID_PERSISTENT_VIRTUAL_CD "88810108-CD42-48BB-100F-5387D53DED3D" #endif /* __AUUID_H__ */ From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 19:48:33 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1713ACF8; Wed, 3 Jun 2015 19:48:33 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DDA49169C; Wed, 3 Jun 2015 19:48:32 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t53JmPTH013431 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Jun 2015 12:48:25 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t53JmP8K013430; Wed, 3 Jun 2015 12:48:25 -0700 (PDT) (envelope-from jmg) Date: Wed, 3 Jun 2015 12:48:25 -0700 From: John-Mark Gurney To: Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283929 - head/games/grdc Message-ID: <20150603194825.GJ50817@funkthat.com> References: <201506022053.t52KrIuk046680@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201506022053.t52KrIuk046680@svn.freebsd.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 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? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Wed, 03 Jun 2015 12:48:25 -0700 (PDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 19:48:33 -0000 Ed Maste wrote this message on Tue, Jun 02, 2015 at 20:53 +0000: > Author: emaste > Date: Tue Jun 2 20:53:17 2015 > New Revision: 283929 > URL: https://svnweb.freebsd.org/changeset/base/283929 > > Log: > Correct grdc(1) 12-hour display between 12:00 and 13:00 > > PM starts at 12:00, not 13:00. > > PR: 194291, 200133 > Submitted by: Nick Price > MFC after: 1 week The fact that this was missed for a 20+ year old program shows that we should just remove it... and that it wasn't using strftime to get it, and the patch doesn't use strftime's %p... -- 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 Wed Jun 3 20:01:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6285938D; Wed, 3 Jun 2015 20:01:03 +0000 (UTC) (envelope-from glebius@FreeBSD.org) 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 E22611A23; Wed, 3 Jun 2015 20:01:02 +0000 (UTC) (envelope-from glebius@FreeBSD.org) 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 t53K105v044978 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 3 Jun 2015 23:01:00 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t53K10Cc044977; Wed, 3 Jun 2015 23:01:00 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 3 Jun 2015 23:01:00 +0300 From: Gleb Smirnoff To: Luiz Otavio O Souza Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283948 - head/sys/dev/dwc Message-ID: <20150603200100.GB73119@FreeBSD.org> References: <201506031448.t53Em4Gn090709@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201506031448.t53Em4Gn090709@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 20:01:03 -0000 On Wed, Jun 03, 2015 at 02:48:04PM +0000, Luiz Otavio O Souza wrote: L> Author: loos L> Date: Wed Jun 3 14:48:03 2015 L> New Revision: 283948 L> URL: https://svnweb.freebsd.org/changeset/base/283948 L> L> Log: L> Fix the OACTIVE handling on if_dwc. L> L> Previously the OACTIVE flag was being set when the tx descriptors are fully L> allocated but it wasn't unset anywhere. L> L> As soon as a packet is transmitted, unset the OACTIVE flag and call start L> routine to push any pending packets from the tx queue. L> L> This closes another race where a full tx queue would jam the tx path (tx L> queue is full, new packets cannot be added to queue and dwc_txstart never L> gets called). The only real fix of OACTIVE handling is removing OACTIVE :) -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 20:02:13 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 996C04EA; Wed, 3 Jun 2015 20:02:13 +0000 (UTC) (envelope-from glebius@FreeBSD.org) 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 219A01B82; Wed, 3 Jun 2015 20:02:12 +0000 (UTC) (envelope-from glebius@FreeBSD.org) 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 t53K2AHw044994 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 3 Jun 2015 23:02:10 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t53K2AOQ044993; Wed, 3 Jun 2015 23:02:10 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 3 Jun 2015 23:02:10 +0300 From: Gleb Smirnoff To: hiren panchasara Cc: Michael Tuexen , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283806 - head/contrib/traceroute Message-ID: <20150603200210.GC73119@FreeBSD.org> References: <201505310810.t4V8AZWR074647@svn.freebsd.org> <20150531185852.GA20409@strugglingcoder.info> <4E05B479-A012-4219-822A-68DF72CCAACF@freebsd.org> <0EA0845B-0C79-40D3-A73A-27EA1C6EDAC0@freebsd.org> <20150603184915.GC20409@strugglingcoder.info> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150603184915.GC20409@strugglingcoder.info> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 20:02:13 -0000 On Wed, Jun 03, 2015 at 11:49:15AM -0700, hiren panchasara wrote: h> > >> Picking up a random traceroute commit here. I am not sure of the history h> > >> but don't we try to upstream the fixes for contrib/* things, in general? h> > > The last version was release 12 years ago. They where integrated in h> > > https://svnweb.freebsd.org/base?view=revision&revision=100787 h> > > h> > > I can submit the patches also to traceroute@ee.lbl.gov as indicated in h> > > https://svnweb.freebsd.org/base/head/contrib/traceroute/FREEBSD-upgrade?view=markup h> > I tried to... However, the e-mail address traceroute@ee.lbl.gov doesn't seem h> > to work anymore... h> h> In that case, we should continue fixing things in-house like you've been doing. And probably 'svn mv' it out of contrib. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 20:04:40 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7117266F; Wed, 3 Jun 2015 20:04:40 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44E2D1BB4; Wed, 3 Jun 2015 20:04:40 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53K4eIY053981; Wed, 3 Jun 2015 20:04:40 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53K4eY1053980; Wed, 3 Jun 2015 20:04:40 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506032004.t53K4eY1053980@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 3 Jun 2015 20:04:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283967 - head/share/doc/papers/bufbio 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 20:04:40 -0000 Author: bapt Date: Wed Jun 3 20:04:39 2015 New Revision: 283967 URL: https://svnweb.freebsd.org/changeset/base/283967 Log: In r282297 \fC was wrong changed to \fCW.) when it should have been \fCW Reported by: carsten.kunze@arcor.de (heirloom doctools) Modified: head/share/doc/papers/bufbio/bio.ms Modified: head/share/doc/papers/bufbio/bio.ms ============================================================================== --- head/share/doc/papers/bufbio/bio.ms Wed Jun 3 19:39:59 2015 (r283966) +++ head/share/doc/papers/bufbio/bio.ms Wed Jun 3 20:04:39 2015 (r283967) @@ -40,7 +40,7 @@ This paper contains the road-map for a s FreeBSD, which will support these facilities. .AE .NH -The miseducation of \f(CW.)struct buf\fP. +The miseducation of \f(CWstruct buf\fP. .PP To fully appreciate the topic, I include a little historic overview of struct buf, it is a most enlightening case of not exactly bit-rot @@ -215,7 +215,7 @@ and Vinum. They all basically do the sa a logical space to a physical space, and the mappings they perform can be 1:1 or 1:N. \** .FS -It is interesting to note that Lions in his comments to the \f(CW.)rkaddr\fP +It is interesting to note that Lions in his comments to the \f(CWrkaddr\fP routine (p. 16-2) writes \fIThe code in this procedure incorporates a special feature for files which extend over more than one disk drive. This feature is described in the UPM Section "RK(IV)". Its @@ -258,7 +258,7 @@ limited extent diskslice/label, which need only the I/O aspect, not the vnode, caching or VM linkage. .IP .I -The I/O aspect of struct buf should be put in a separate \f(CW.)struct bio\fP. +The I/O aspect of struct buf should be put in a separate \f(CWstruct bio\fP. .R .NH 1 Implications for future struct buf improvements @@ -296,7 +296,7 @@ Anything that could be added to or done the I/O aspect of struct buf can also be added to or done with the I/O aspect if it lives in a new "struct bio". .NH 1 -Implementing a \f(CW.)struct bio\fP +Implementing a \f(CWstruct bio\fP .PP The first decision to be made was who got to use the name "struct buf", and considering the fact that it is the I/O aspect which gets separated From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 20:45:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81D0023A; Wed, 3 Jun 2015 20:45:59 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (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 6D51A1614; Wed, 3 Jun 2015 20:45:59 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from 50-196-156-133-static.hfc.comcastbusiness.net ([50.196.156.133]:50350 helo=tinkerbell.pixel8networks.com) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1Z08vI-000BWQ-RY; Wed, 03 Jun 2015 06:41:36 -0700 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) Subject: Re: svn commit: r283929 - head/games/grdc From: Devin Teske In-Reply-To: <20150603194825.GJ50817@funkthat.com> Date: Wed, 3 Jun 2015 13:45:55 -0700 Cc: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Devin Teske Content-Transfer-Encoding: quoted-printable Message-Id: <4D6EF798-B894-41AC-8889-84791D925D7E@FreeBSD.org> References: <201506022053.t52KrIuk046680@svn.freebsd.org> <20150603194825.GJ50817@funkthat.com> To: John-Mark Gurney X-Mailer: Apple Mail (2.1990.1) Sender: devin@shxd.cx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 20:45:59 -0000 > On Jun 3, 2015, at 12:48 PM, John-Mark Gurney = wrote: >=20 > Ed Maste wrote this message on Tue, Jun 02, 2015 at 20:53 +0000: >> Author: emaste >> Date: Tue Jun 2 20:53:17 2015 >> New Revision: 283929 >> URL: https://svnweb.freebsd.org/changeset/base/283929 >>=20 >> Log: >> Correct grdc(1) 12-hour display between 12:00 and 13:00 >>=20 >> PM starts at 12:00, not 13:00. >>=20 >> PR: 194291, 200133 >> Submitted by: Nick Price >> MFC after: 1 week >=20 > The fact that this was missed for a 20+ year old program shows that > we should just remove it=E2=80=A6 FYI removal was discussed on src-commmitters@ (svn-src-all@ and svn-src-head@ were also CC=E2=80=99d) on these days by these people: Thread Subject: svn commit r278616 - in head: . = contrib/netbsd-tests/games etc etc/mtree etc/root games games/caesar games/fortune/ datfiles release/scripts share/man/man4 share/man/man6 share/man/man7 share/mk sh... Feb 10, 2015 @ 01:47A: commit r278616 by cperciva removes grdc et. al. = games Feb 10, 2015 @ 01:49A: cperciva says if you want punch card support, = e-mail off-list Feb 10, 2015 @ 02:29A: dteske voices opposition to removal of grdc Feb 10, 2015 @ 06:36A: Slawa Olihovchenkov voices opposition to removal = of pom Feb 10, 2015 @ 10:25A: Jan Beich gives opinions on grdc Feb 10, 2015 @ 10:37A: Stanislav Sedov gives +1 for keeping grdc and voices opposition to removal of caesar/rot13 Then fast forward to February 21: Thread Subject: svn commit: r279150 - in head: . games games/bcd = games/ppt tools/build/mk February 21, 2015 @ 11:23P: cperciva moves forward with ``Step 2 of = eliminating the =E2=80=9Cgames=E2=80=9D distribution=E2=80=99=E2=80=99 while = retaining pom, grdc, rot13, and caesar utilities based on ``an astonishing volume of email informing [cperciva] that = those are still being widely used.=E2=80=99' =E2=80=94=20 Cheers, Devin From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 20:48:01 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AEC4D3A7; Wed, 3 Jun 2015 20:48:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D63B1630; Wed, 3 Jun 2015 20:48:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53Km1ri074500; Wed, 3 Jun 2015 20:48:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53Km1nc074499; Wed, 3 Jun 2015 20:48:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201506032048.t53Km1nc074499@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Jun 2015 20:48:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283968 - head/sys/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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 20:48:01 -0000 Author: kib Date: Wed Jun 3 20:48:00 2015 New Revision: 283968 URL: https://svnweb.freebsd.org/changeset/base/283968 Log: Syncing a directory vnode might drop the vnode lock in the softdep_sync() similarly to the regular vnode sync. Allow retry for both vnode types. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/ufs/ffs/ffs_vnops.c Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Wed Jun 3 20:04:39 2015 (r283967) +++ head/sys/ufs/ffs/ffs_vnops.c Wed Jun 3 20:48:00 2015 (r283968) @@ -201,8 +201,8 @@ retry: * bo_dirty list. Recheck and resync as needed. */ BO_LOCK(bo); - if (vp->v_type == VREG && (bo->bo_numoutput > 0 || - bo->bo_dirty.bv_cnt > 0)) { + if ((vp->v_type == VREG || vp->v_type == VDIR) && + (bo->bo_numoutput > 0 || bo->bo_dirty.bv_cnt > 0)) { BO_UNLOCK(bo); goto retry; } From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 20:48:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C71C64EA; Wed, 3 Jun 2015 20:48:29 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B50181635; Wed, 3 Jun 2015 20:48:29 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53KmTwA074623; Wed, 3 Jun 2015 20:48:29 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53KmSCf074619; Wed, 3 Jun 2015 20:48:28 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506032048.t53KmSCf074619@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 3 Jun 2015 20:48:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283969 - head/lib/libutil 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 20:48:29 -0000 Author: bapt Date: Wed Jun 3 20:48:28 2015 New Revision: 283969 URL: https://svnweb.freebsd.org/changeset/base/283969 Log: Add a pw_mkdb2(3) function which does the same thing as pw_mkdb(3) except it takes a new argument allowing to specify the endianness of the database to generate Differential Revision: https://reviews.freebsd.org/D2730 Reviewed by: ian Modified: head/lib/libutil/Makefile head/lib/libutil/libutil.h head/lib/libutil/pw_util.3 head/lib/libutil/pw_util.c Modified: head/lib/libutil/Makefile ============================================================================== --- head/lib/libutil/Makefile Wed Jun 3 20:48:00 2015 (r283968) +++ head/lib/libutil/Makefile Wed Jun 3 20:48:28 2015 (r283969) @@ -78,6 +78,7 @@ MLINKS+=pw_util.3 pw_copy.3 \ pw_util.3 pw_make.3 \ pw_util.3 pw_make_v7.3 \ pw_util.3 pw_mkdb.3 \ + pw_util.3 pw_mkdb2.3 \ pw_util.3 pw_lock.3 \ pw_util.3 pw_scan.3 \ pw_util.3 pw_tempname.3 \ Modified: head/lib/libutil/libutil.h ============================================================================== --- head/lib/libutil/libutil.h Wed Jun 3 20:48:00 2015 (r283968) +++ head/lib/libutil/libutil.h Wed Jun 3 20:48:28 2015 (r283969) @@ -144,6 +144,9 @@ char *fparseln(FILE *_fp, size_t *_len, #endif #ifdef _PWD_H_ +#define PWDB_NATIVE 0 +#define PWDB_LE 1 +#define PWDB_BE 2 int pw_copy(int _ffd, int _tfd, const struct passwd *_pw, struct passwd *_old_pw); struct passwd @@ -155,6 +158,7 @@ int pw_init(const char *_dir, const char char *pw_make(const struct passwd *_pw); char *pw_make_v7(const struct passwd *_pw); int pw_mkdb(const char *_user); +int pw_mkdb2(const char *_user, int endian); int pw_lock(void); struct passwd * pw_scan(const char *_line, int _flags); Modified: head/lib/libutil/pw_util.3 ============================================================================== --- head/lib/libutil/pw_util.3 Wed Jun 3 20:48:00 2015 (r283968) +++ head/lib/libutil/pw_util.3 Wed Jun 3 20:48:28 2015 (r283969) @@ -37,6 +37,7 @@ .Nm pw_make , .Nm pw_make_v7 , .Nm pw_mkdb , +.Nm pw_mkdb2 , .Nm pw_lock , .Nm pw_scan , .Nm pw_tempname , @@ -66,6 +67,8 @@ .Ft int .Fn pw_mkdb "const char *user" .Ft int +.Fn pw_mkdb "const char *user" "int endian" +.Ft int .Fn pw_lock "void" .Ft "struct passwd *" .Fn pw_scan "const char *line" "int flags" @@ -225,11 +228,30 @@ function regenerates the password databa .Xr pwd_mkdb 8 . If .Fa user -only the record corresponding to that user will be updated. +is set, only the record corresponding to that user will be updated. The .Fn pw_mkdb function returns 0 in case of success and -1 in case of failure. .Pp +.Fn pw_mkdb2 +function regenerates the password database by running +.Xr pwd_mkdb 8 . +If +.Fa user +is set, only the record corresponding to that user will be updated. +.Pp +The +.Fa endian +variable can take the following values +.Bl -tag -width PWDB_NATIVE +.It Dv PWDB_NATIVE +the database will be generated in host native endianness. +.It Dv PWDB_LE +the database will be generated in Little-endian. +.It Dv PWDB_BE +the database will be generated in Big-endian. +.El +.Pp The .Fn pw_lock function locks the master password file. Modified: head/lib/libutil/pw_util.c ============================================================================== --- head/lib/libutil/pw_util.c Wed Jun 3 20:48:00 2015 (r283968) +++ head/lib/libutil/pw_util.c Wed Jun 3 20:48:28 2015 (r283969) @@ -242,14 +242,36 @@ pw_tmp(int mfd) return (tfd); } +int +pw_mkdb(const char *user) +{ + + return (pw_mkdb2(user, PWDB_NATIVE)); +} + /* * Regenerate the password database. */ int -pw_mkdb(const char *user) +pw_mkdb2(const char *user, int endian) { int pstat; pid_t pid; + const char *arg; + + switch (endian) { + case PWDB_NATIVE: + arg = "-p"; + break; + case PWDB_LE: + arg = "-pL"; + break; + case PWDB_BE: + arg = "-pB"; + break; + default: + return (-1); + } (void)fflush(stderr); switch ((pid = fork())) { @@ -258,10 +280,10 @@ pw_mkdb(const char *user) case 0: /* child */ if (user == NULL) - execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", + execl(_PATH_PWD_MKDB, "pwd_mkdb", arg, "-d", passwd_dir, tempname, (char *)NULL); else - execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", + execl(_PATH_PWD_MKDB, "pwd_mkdb", arg, "-d", passwd_dir, "-u", user, tempname, (char *)NULL); _exit(1); From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 21:26:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DFD3FE4; Wed, 3 Jun 2015 21:26:52 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 665BC1FFD; Wed, 3 Jun 2015 21:26:52 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t53LQpdQ014395 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Jun 2015 14:26:51 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t53LQpPU014394; Wed, 3 Jun 2015 14:26:51 -0700 (PDT) (envelope-from jmg) Date: Wed, 3 Jun 2015 14:26:51 -0700 From: John-Mark Gurney To: Devin Teske Cc: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283929 - head/games/grdc Message-ID: <20150603212651.GL50817@funkthat.com> References: <201506022053.t52KrIuk046680@svn.freebsd.org> <20150603194825.GJ50817@funkthat.com> <4D6EF798-B894-41AC-8889-84791D925D7E@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D6EF798-B894-41AC-8889-84791D925D7E@FreeBSD.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 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? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Wed, 03 Jun 2015 14:26:51 -0700 (PDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 21:26:52 -0000 Devin Teske wrote this message on Wed, Jun 03, 2015 at 13:45 -0700: > > On Jun 3, 2015, at 12:48 PM, John-Mark Gurney wrote: > > > > Ed Maste wrote this message on Tue, Jun 02, 2015 at 20:53 +0000: > >> Author: emaste > >> Date: Tue Jun 2 20:53:17 2015 > >> New Revision: 283929 > >> URL: https://svnweb.freebsd.org/changeset/base/283929 > >> > >> Log: > >> Correct grdc(1) 12-hour display between 12:00 and 13:00 > >> > >> PM starts at 12:00, not 13:00. > >> > >> PR: 194291, 200133 > >> Submitted by: Nick Price > >> MFC after: 1 week > > > > The fact that this was missed for a 20+ year old program shows that > > we should just remove it??? > > FYI removal was discussed on src-commmitters@ (svn-src-all@ and > svn-src-head@ were also CC???d) on these days by these people: Ok, and what does this mean to you? To me that the two people who voiced their support of keeping it didn't notice such a trivial bug, or bother to commit the bugs in the database shows they aren't interested in maintaining it.. -- 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 Wed Jun 3 21:51:49 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53CEA5A1; Wed, 3 Jun 2015 21:51:49 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-wg0-x22b.google.com (mail-wg0-x22b.google.com [IPv6:2a00:1450:400c:c00::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 009A5170D; Wed, 3 Jun 2015 21:51:49 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: by wgv5 with SMTP id 5so19905330wgv.1; Wed, 03 Jun 2015 14:51:46 -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=jAtQrqvwxQDkA0D+Pn/tvu2Qm2w/OVf+pouHCS71vrI=; b=f0nQhC7J68soF26ym3vt0CqI50MKPDAhIN4CDl18UaFtQzf+IirSRn7NVw89JSeC0v XMiKucx5wsPvF1L0gymBEp5Q/xIVadOZ2thgdA+RcMqjL26NjbRlOWov5Ny6C2aR1lnp Dy+0sTaI+NenW2WGBf2C9ar7rDhA+OO7tfvofyvmbZwGYUb4ZKLKWCg/Ik1lNVmicYRP TjqrCqeoJPdzNyNBZKCl+ICj0pVf7vxX0Vnk31LzLzCe4alofNN36xP8G0nu44hOCiZw MX6TWb/BWJ5h4WIh8PSmB2wg0mu6jrRb8TYjjFP7ReYZurHQLkjDls2ybQgIU21XWGg9 v9tA== MIME-Version: 1.0 X-Received: by 10.180.82.6 with SMTP id e6mr46194313wiy.84.1433368306549; Wed, 03 Jun 2015 14:51:46 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.27.100.214 with HTTP; Wed, 3 Jun 2015 14:51:46 -0700 (PDT) In-Reply-To: <201506032048.t53KmSCf074619@svn.freebsd.org> References: <201506032048.t53KmSCf074619@svn.freebsd.org> Date: Thu, 4 Jun 2015 00:51:46 +0300 X-Google-Sender-Auth: ylTLYRuPXJ-O0hQ7jnqNbv8gy50 Message-ID: Subject: Re: svn commit: r283969 - head/lib/libutil From: Sergey Kandaurov To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 21:51:49 -0000 On 3 June 2015 at 23:48, Baptiste Daroussin wrote: > Author: bapt > Date: Wed Jun 3 20:48:28 2015 > New Revision: 283969 > URL: https://svnweb.freebsd.org/changeset/base/283969 > > Log: > Add a pw_mkdb2(3) function which does the same thing as pw_mkdb(3) except > it takes a new argument allowing to specify the endianness of the database > to generate > Why not change pw_mkdb()? Is it used outside of the project? > Modified: head/lib/libutil/pw_util.3 > ============================================================================== > --- head/lib/libutil/pw_util.3 Wed Jun 3 20:48:00 2015 (r283968) > +++ head/lib/libutil/pw_util.3 Wed Jun 3 20:48:28 2015 (r283969) > @@ -37,6 +37,7 @@ > .Nm pw_make , > .Nm pw_make_v7 , > .Nm pw_mkdb , > +.Nm pw_mkdb2 , > .Nm pw_lock , > .Nm pw_scan , > .Nm pw_tempname , > @@ -66,6 +67,8 @@ > .Ft int > .Fn pw_mkdb "const char *user" > .Ft int > +.Fn pw_mkdb "const char *user" "int endian" typo there -- wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 21:58:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DA8677E; Wed, 3 Jun 2015 21:58:46 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 00D3A1791; Wed, 3 Jun 2015 21:58:46 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wifw1 with SMTP id w1so37934888wif.0; Wed, 03 Jun 2015 14:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=R65MZoseHgJTu44oQdPfV7/754WZwTazDHSy/HkBu8U=; b=nE9ELEQ/Ga+3g/f/jtd1dwUKdv+0CEHR+vmQ1OM8LYEINGD3oaI9fvRm3HkAJaouQn fU8N0bi2KoWvKORYti98tGJ/dNI0Qbs2ad6PqFGdf3pi495hw95Yn95bsFTJX4zZrSKf 4KiBPttAyD2MA17WjL0Ah0MOx2V0udvDxdUAYimCL0ATiSWFXrp21/T11s6DFmPi8W20 axYoLa5GMM9LoPSmYpNZVT5++UPzBzrBp3pR45Us2lQaT9OJ79NFR5SLCEWmqYqVlDUt PJR2gGh7dDT87cfIn081am+7zTLGsqOC310ZIobEjdxDZbb18vmThZzPBcDP/WV/6kUF Xchg== X-Received: by 10.194.200.228 with SMTP id jv4mr63435282wjc.157.1433368724364; Wed, 03 Jun 2015 14:58:44 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id js3sm2886944wjc.5.2015.06.03.14.58.43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jun 2015 14:58:43 -0700 (PDT) Sender: Baptiste Daroussin Date: Wed, 3 Jun 2015 23:58:41 +0200 From: Baptiste Daroussin To: Sergey Kandaurov Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r283969 - head/lib/libutil Message-ID: <20150603215841.GF32562@ivaldir.etoilebsd.net> References: <201506032048.t53KmSCf074619@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Wtrm9ATX0sn6fFKv" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 21:58:46 -0000 --Wtrm9ATX0sn6fFKv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 04, 2015 at 12:51:46AM +0300, Sergey Kandaurov wrote: > On 3 June 2015 at 23:48, Baptiste Daroussin wrote: > > Author: bapt > > Date: Wed Jun 3 20:48:28 2015 > > New Revision: 283969 > > URL: https://svnweb.freebsd.org/changeset/base/283969 > > > > Log: > > Add a pw_mkdb2(3) function which does the same thing as pw_mkdb(3) ex= cept > > it takes a new argument allowing to specify the endianness of the dat= abase > > to generate > > >=20 > Why not change pw_mkdb()? Is it used outside of the project? >=20 Because that would change the ABI of libutil and it is not a private librar= y aka we are supposed to maintain ABI compatibility as we do not know if it is us= ed or not externally to the project. I care about the ABI because I have made this change in order to use it in pw(8) and MFC it to stable/10 before 10.2. libutil is not versionned so this is the only way to not break the ABI. Exc= ept if someone has a better idea than I do. Best regards, Bapt --Wtrm9ATX0sn6fFKv Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlVveJEACgkQ8kTtMUmk6EzviACgsPTwWtjKbdgBy1eoW0yzp07U nYgAn1/+XXfW0AfV14Zg9HYFfE5isAv/ =ipb9 -----END PGP SIGNATURE----- --Wtrm9ATX0sn6fFKv-- From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 22:01:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 397438FA; Wed, 3 Jun 2015 22:01:14 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27F47187E; Wed, 3 Jun 2015 22:01:14 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53M1Erg010893; Wed, 3 Jun 2015 22:01:14 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53M1ErV010892; Wed, 3 Jun 2015 22:01:14 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506032201.t53M1ErV010892@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 3 Jun 2015 22:01:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283970 - head/lib/libutil 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 22:01:14 -0000 Author: bapt Date: Wed Jun 3 22:01:13 2015 New Revision: 283970 URL: https://svnweb.freebsd.org/changeset/base/283970 Log: Capitalize the list of accepted variables Suggested by: wblock Modified: head/lib/libutil/pw_util.3 Modified: head/lib/libutil/pw_util.3 ============================================================================== --- head/lib/libutil/pw_util.3 Wed Jun 3 20:48:28 2015 (r283969) +++ head/lib/libutil/pw_util.3 Wed Jun 3 22:01:13 2015 (r283970) @@ -245,11 +245,11 @@ The variable can take the following values .Bl -tag -width PWDB_NATIVE .It Dv PWDB_NATIVE -the database will be generated in host native endianness. +The database will be generated in host native endianness. .It Dv PWDB_LE -the database will be generated in Little-endian. +The database will be generated in Little-endian. .It Dv PWDB_BE -the database will be generated in Big-endian. +The database will be generated in Big-endian. .El .Pp The From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 22:24:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24F35BF7; Wed, 3 Jun 2015 22:24:58 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12C2E1E4C; Wed, 3 Jun 2015 22:24:58 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t53MOvpi023516; Wed, 3 Jun 2015 22:24:57 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t53MOvfw023515; Wed, 3 Jun 2015 22:24:57 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201506032224.t53MOvfw023515@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 3 Jun 2015 22:24: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: r283971 - stable/10/sys/boot/forth 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.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 22:24:58 -0000 Author: dteske Date: Wed Jun 3 22:24:57 2015 New Revision: 283971 URL: https://svnweb.freebsd.org/changeset/base/283971 Log: MFC r268254 (jmg): Add a hint that you can enable this by default if you want; necessary if you want the keyboard break to work early in boot. Modified: stable/10/sys/boot/forth/loader.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/forth/loader.conf ============================================================================== --- stable/10/sys/boot/forth/loader.conf Wed Jun 3 22:01:13 2015 (r283970) +++ stable/10/sys/boot/forth/loader.conf Wed Jun 3 22:24:57 2015 (r283971) @@ -138,6 +138,7 @@ module_path="/boot/modules" # Set the mo #vfs.root.mountfrom="" # Specify root partition in a way the # kernel understands #vm.kmem_size="" # Sets the size of kernel memory (bytes) +#debug.kdb.break_to_debugger="0" # Allow console to break into debugger. #debug.ktr.cpumask="0xf" # Bitmask of CPUs to enable KTR on #debug.ktr.mask="0x1200" # Bitmask of KTR events to enable #debug.ktr.verbose="1" # Enable console dump of KTR events From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 22:43:47 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1FE8EB9; Wed, 3 Jun 2015 22:43:47 +0000 (UTC) (envelope-from delphij@delphij.net) 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 87EA91301; Wed, 3 Jun 2015 22:43:47 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from zeta.ixsystems.com (unknown [12.229.62.2]) (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 0E82017078; Wed, 3 Jun 2015 15:43:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1433371427; x=1433385827; bh=WWgXDwHXfjfuLUPJe1I3yZKLXrD4XQ5T10UnFQyr+VA=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=C8JdP6Z6C+JKUdlQjCx7RxwaXRJfl9vB5Cuo7wAYrDfqoRzeuY5oMiuJ0byOR3Vg4 FEqZZ6P+kd6gxcRYJG7ulT9OQgBflT+mXP2HczcN7DN6OHYwX+wcrAP2QA0XAkeKW/ NGidPD6Lm4nvTvMmCUWWYhPzXsn2VLEQrsW0IOG8= Message-ID: <556F8322.9050602@delphij.net> Date: Wed, 03 Jun 2015 15:43:46 -0700 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Baptiste Daroussin , Sergey Kandaurov CC: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, nectar@FreeBSD.org Subject: Re: svn commit: r283969 - head/lib/libutil References: <201506032048.t53KmSCf074619@svn.freebsd.org> <20150603215841.GF32562@ivaldir.etoilebsd.net> In-Reply-To: <20150603215841.GF32562@ivaldir.etoilebsd.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 22:43:47 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 06/03/15 14:58, Baptiste Daroussin wrote: > On Thu, Jun 04, 2015 at 12:51:46AM +0300, Sergey Kandaurov wrote: >> On 3 June 2015 at 23:48, Baptiste Daroussin >> wrote: >>> Author: bapt Date: Wed Jun 3 20:48:28 2015 New Revision: >>> 283969 URL: https://svnweb.freebsd.org/changeset/base/283969 >>> >>> Log: Add a pw_mkdb2(3) function which does the same thing as >>> pw_mkdb(3) except it takes a new argument allowing to specify >>> the endianness of the database to generate >>> >> >> Why not change pw_mkdb()? Is it used outside of the project? >> > Because that would change the ABI of libutil and it is not a > private library aka we are supposed to maintain ABI compatibility > as we do not know if it is used or not externally to the project. I > care about the ABI because I have made this change in order to use > it in pw(8) and MFC it to stable/10 before 10.2. > > libutil is not versionned so this is the only way to not break the > ABI. Except if someone has a better idea than I do. Looking at r113596, pwd_mkdb(8) was changed to generate both legacy (version 3, endianness sensitive) and new (version 4, machine independent) formats. Now, after 12 years, is it still sensible to generate legacy format db entries? Maybe we should just disable the generation by default and eventually remove the ability to generate them? Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.1.4 (FreeBSD) iQIcBAEBCgAGBQJVb4MYAAoJEJW2GBstM+nsUqAP/1VTYSVd4CvhepOd6uEoi6YG 616V2X6vNNA11BKK7AHWjSIydzwpg1GNrEUeSUwoU7vCzNAsU0zIjYWK2Vfl30ru PFjtuDlJwU3z5qhYtLlBOoSMQk+0LDJ0t8SSeaaXNO589t+66B+USSJk1YvTGOB8 KkkLq20Y+C+VyVEQ76I/RExJE5aJSvtUgN4+po+Ic8iZHhSWPJoe7XsHK/L/R/QZ WJuGQe7qmbpfi1j1wHdGRpdtYzZolwvc8Z6RHNhIA7h5m83wdR0zOgtH/RlFAtn8 4IBd2V0YCBTz6nrRav1lSo/tXGrKTFzoM6ij+Sjl4k2IQXsc/DkIpV9XUJH4oQBF mhJlNP7BxomUlb2J6anqfdh3+ni3Rpx3FN+77lAMe1IWolbEwJkXsVZDUDZ8O4Ik QF+qa+lY4aFR83ZNq9AG0aU7/UdoX0+COr0VJ0SwYk/DgpmGOqhxLnOMyWdWehLm kIeJkZPySGNGqnqUISfSRxjKXns7CqfGEuRMO6ED2m+x0Tg4KMmklnjnMPG4H8hv qbt4ALynIeuaGIG7oCrc1EXw5XbrMrPeU2mIA+82uqAGgsQdYngFi4vzr3kp7CkK yLKxlFuPrQ6QS9uJI1/MhCDpXff+GzJGE5R22QgFsLNiQemDfvjVcne4ZBBTwWI7 S78XZWGwJihSGp0XgDAd =4wxs -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 23:10:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60AAA2DC; Wed, 3 Jun 2015 23:10:32 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (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 490E6181F; Wed, 3 Jun 2015 23:10:32 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from 50-196-156-133-static.hfc.comcastbusiness.net ([50.196.156.133]:51199 helo=tinkerbell.pixel8networks.com) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1Z0B8y-000Gln-VD; Wed, 03 Jun 2015 09:03:53 -0700 Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) Subject: Re: svn commit: r283929 - head/games/grdc From: Devin Teske In-Reply-To: <20150603212651.GL50817@funkthat.com> Date: Wed, 3 Jun 2015 16:10:35 -0700 Cc: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Devin Teske Message-Id: <65EE2E83-06C1-446B-94F7-6CFAB99B990D@FreeBSD.org> References: <201506022053.t52KrIuk046680@svn.freebsd.org> <20150603194825.GJ50817@funkthat.com> <4D6EF798-B894-41AC-8889-84791D925D7E@FreeBSD.org> <20150603212651.GL50817@funkthat.com> To: John-Mark Gurney X-Mailer: Apple Mail (2.1990.1) Sender: devin@shxd.cx Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 03 Jun 2015 23:10:32 -0000 > On Jun 3, 2015, at 2:26 PM, John-Mark Gurney wrote: >=20 > Devin Teske wrote this message on Wed, Jun 03, 2015 at 13:45 -0700: >>> On Jun 3, 2015, at 12:48 PM, John-Mark Gurney = wrote: >>>=20 >>> Ed Maste wrote this message on Tue, Jun 02, 2015 at 20:53 +0000: >>>> Author: emaste >>>> Date: Tue Jun 2 20:53:17 2015 >>>> New Revision: 283929 >>>> URL: https://svnweb.freebsd.org/changeset/base/283929 >>>>=20 >>>> Log: >>>> Correct grdc(1) 12-hour display between 12:00 and 13:00 >>>>=20 >>>> PM starts at 12:00, not 13:00. >>>>=20 >>>> PR: 194291, 200133 >>>> Submitted by: Nick Price >>>> MFC after: 1 week >>>=20 >>> The fact that this was missed for a 20+ year old program shows that >>> we should just remove it??? >>=20 >> FYI removal was discussed on src-commmitters@ (svn-src-all@ and >> svn-src-head@ were also CC???d) on these days by these people: >=20 > Ok, and what does this mean to you? >=20 > To me that the two people who voiced their support of keeping it > didn't notice such a trivial bug, or bother to commit the bugs in > the database shows they aren't interested in maintaining it.. >=20 Means that the people using it (incl. me) never hit those edge-cases. Seldom is there time to go poking around the code of things that appear to be working as-expected 100% of the time. That=E2=80=99s all. In the case of this particular bug, I hadn=E2=80=99t noticed it. And I = use grdc all the time. What can we say? code gets better over time with more eyeballs (and sometimes the old eyeballs stop scrutinizing, so it=E2=80=99= s often good to also have young eyeballs take a look at things). I don=E2=80=99t think this situation is a call for deprecating anything. =E2=80=94=20 Devin= From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 00:01:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C8F482C; Thu, 4 Jun 2015 00:01:58 +0000 (UTC) (envelope-from rionda@gmail.com) Received: from mail-oi0-x22d.google.com (mail-oi0-x22d.google.com [IPv6:2607:f8b0:4003:c06::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 60DD014C4; Thu, 4 Jun 2015 00:01:58 +0000 (UTC) (envelope-from rionda@gmail.com) Received: by oihb142 with SMTP id b142so19797682oih.3; Wed, 03 Jun 2015 17:01: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:content-transfer-encoding; bh=ko7U1f0xTuGMrrzLK9W3mHqzCjJGPxH/361IXdPsQpU=; b=gyqEpr7Si5PxUliT5WKjU7J7L/oTUQYijjMFwIzOBBBHcppQZXGVqgYatYbvhSN5G9 yI5RhwrAtn0t3TUpjuZb2DHWz8Vt7YEvGaM/wn0IwgNbrAG2yElcFkea2xjJen6jxd5j Jt2kkwN+LpH/p1TSwv6L6NK9lCzyU0/9Pu/sXT+5mI7ki45RyLAaPLhewSTuq3ujH3hq OYTJ0QUQPqanhychFV+ycgai/BsQ1zI1z0UCJDzQvfbQkByxq0xciAeJXuY0W/+LXcdi siqev9/x5Gmi2I1LlDOvyKfFNW4IVNLQBSGv4s3zKiZ2rcKwoymfq86dQw31iAoRrrSK bXTg== X-Received: by 10.202.107.77 with SMTP id g74mr28215141oic.120.1433376117282; Wed, 03 Jun 2015 17:01:57 -0700 (PDT) MIME-Version: 1.0 Sender: rionda@gmail.com Received: by 10.76.91.131 with HTTP; Wed, 3 Jun 2015 17:01:36 -0700 (PDT) In-Reply-To: <65EE2E83-06C1-446B-94F7-6CFAB99B990D@FreeBSD.org> References: <201506022053.t52KrIuk046680@svn.freebsd.org> <20150603194825.GJ50817@funkthat.com> <4D6EF798-B894-41AC-8889-84791D925D7E@FreeBSD.org> <20150603212651.GL50817@funkthat.com> <65EE2E83-06C1-446B-94F7-6CFAB99B990D@FreeBSD.org> From: Matteo Riondato Date: Wed, 3 Jun 2015 20:01:36 -0400 X-Google-Sender-Auth: 1_9KrKDTXdfyOdiC0ysTCQRGJOc Message-ID: Subject: Re: svn commit: r283929 - head/games/grdc To: Devin Teske Cc: John-Mark Gurney , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ed Maste Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 00:01:58 -0000 On Wed, Jun 3, 2015 at 7:10 PM, Devin Teske wrote: > >> On Jun 3, 2015, at 2:26 PM, John-Mark Gurney wrote: >> Ok, and what does this mean to you? >> >> To me that the two people who voiced their support of keeping it >> didn't notice such a trivial bug, or bother to commit the bugs in >> the database shows they aren't interested in maintaining it.. >> > > Means that the people using it (incl. me) never hit those edge-cases. > In the case of this particular bug, I hadn=E2=80=99t noticed it. And I us= e grdc > all the time. So do I and I've never noticed it either, and it's because it only happens when running "grdc -t". I didn't even know that "grdc" had options. =3D) Best, Matteo From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 01:52:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B528A263; Thu, 4 Jun 2015 01:52:18 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2A411D46; Thu, 4 Jun 2015 01:52:18 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t541qIpq026599; Thu, 4 Jun 2015 01:52:18 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t541qIME026598; Thu, 4 Jun 2015 01:52:18 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201506040152.t541qIME026598@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 4 Jun 2015 01:52: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: r283972 - stable/10/etc 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 01:52:18 -0000 Author: ian Date: Thu Jun 4 01:52:17 2015 New Revision: 283972 URL: https://svnweb.freebsd.org/changeset/base/283972 Log: MFC r262955: Add 3wire and std as terminal types/classes. These are similar to the existing terminal types/classes that have the baudrate suffix, but differ in that no baudrate is set/defined. Modified: stable/10/etc/gettytab Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/gettytab ============================================================================== --- stable/10/etc/gettytab Wed Jun 3 22:24:57 2015 (r283971) +++ stable/10/etc/gettytab Thu Jun 4 01:52:17 2015 (r283972) @@ -49,6 +49,8 @@ default:\ # autobaud code in getty, and likewise can # be assigned to any table desired (hopefully the same speed). # +std:\ + :np:sp#0: a|std.110|110-baud:\ :np:nd#1:cd#1:uc:sp#110: b|std.134|134.5-baud:\ @@ -219,6 +221,8 @@ al.230400:\ # Entries for 3-wire serial terminals. These don't supply carrier, so # clocal needs to be set, and crtscts needs to be unset. # +3wire:\ + :np:nc:sp#0: 3wire.9600|9600-3wire:\ :np:nc:sp#9600: 3wire.19200|19200-3wire:\ From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 02:12:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51BBF5A0; Thu, 4 Jun 2015 02:12:24 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25BDF11B9; Thu, 4 Jun 2015 02:12:24 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t542COjY036510; Thu, 4 Jun 2015 02:12:24 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t542CO4N036509; Thu, 4 Jun 2015 02:12:24 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201506040212.t542CO4N036509@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Thu, 4 Jun 2015 02:12:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283973 - head/sys/amd64/vmm/amd 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 02:12:24 -0000 Author: neel Date: Thu Jun 4 02:12:23 2015 New Revision: 283973 URL: https://svnweb.freebsd.org/changeset/base/283973 Log: Use tunable 'hw.vmm.svm.features' to disable specific SVM features even though they might be available in hardware. Use tunable 'hw.vmm.svm.num_asids' to limit the number of ASIDs used by the hypervisor. MFC after: 1 week Modified: head/sys/amd64/vmm/amd/svm.c Modified: head/sys/amd64/vmm/amd/svm.c ============================================================================== --- head/sys/amd64/vmm/amd/svm.c Thu Jun 4 01:52:17 2015 (r283972) +++ head/sys/amd64/vmm/amd/svm.c Thu Jun 4 02:12:23 2015 (r283973) @@ -102,8 +102,8 @@ static MALLOC_DEFINE(M_SVM_VLAPIC, "svm- /* Per-CPU context area. */ extern struct pcpu __pcpu[]; -static uint32_t svm_feature; /* AMD SVM features. */ -SYSCTL_UINT(_hw_vmm_svm, OID_AUTO, features, CTLFLAG_RD, &svm_feature, 0, +static uint32_t svm_feature = ~0U; /* AMD SVM features. */ +SYSCTL_UINT(_hw_vmm_svm, OID_AUTO, features, CTLFLAG_RDTUN, &svm_feature, 0, "SVM features advertised by CPUID.8000000AH:EDX"); static int disable_npf_assist; @@ -112,7 +112,7 @@ SYSCTL_INT(_hw_vmm_svm, OID_AUTO, disabl /* Maximum ASIDs supported by the processor */ static uint32_t nasid; -SYSCTL_UINT(_hw_vmm_svm, OID_AUTO, num_asids, CTLFLAG_RD, &nasid, 0, +SYSCTL_UINT(_hw_vmm_svm, OID_AUTO, num_asids, CTLFLAG_RDTUN, &nasid, 0, "Number of ASIDs supported by this processor"); /* Current ASID generation for each host cpu */ @@ -174,9 +174,14 @@ check_svm_features(void) /* CPUID Fn8000_000A is for SVM */ do_cpuid(0x8000000A, regs); - svm_feature = regs[3]; + svm_feature &= regs[3]; - nasid = regs[1]; + /* + * The number of ASIDs can be configured to be less than what is + * supported by the hardware but not more. + */ + if (nasid == 0 || nasid > regs[1]) + nasid = regs[1]; KASSERT(nasid > 1, ("Insufficient ASIDs for guests: %#x", nasid)); /* bhyve requires the Nested Paging feature */ From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 02:44:37 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB05B900; Thu, 4 Jun 2015 02:44:37 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8B5018C1; Thu, 4 Jun 2015 02:44:37 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t542ibel051339; Thu, 4 Jun 2015 02:44:37 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t542ibW9051338; Thu, 4 Jun 2015 02:44:37 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201506040244.t542ibW9051338@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Thu, 4 Jun 2015 02:44:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283974 - head/lib/libugidfw 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 02:44:38 -0000 Author: araujo (ports committer) Date: Thu Jun 4 02:44:37 2015 New Revision: 283974 URL: https://svnweb.freebsd.org/changeset/base/283974 Log: Remove unused variables and silence clang warnings. Differential Revision: D2686 Reviewed by: rodrigc Modified: head/lib/libugidfw/ugidfw.c Modified: head/lib/libugidfw/ugidfw.c ============================================================================== --- head/lib/libugidfw/ugidfw.c Thu Jun 4 02:12:23 2015 (r283973) +++ head/lib/libugidfw/ugidfw.c Thu Jun 4 02:44:37 2015 (r283974) @@ -64,11 +64,10 @@ bsde_rule_to_string(struct mac_bsdextend struct statfs *mntbuf; char *cur, type[sizeof(rule->mbr_object.mbo_type) * CHAR_BIT + 1]; size_t left, len; - int anymode, unknownmode, truncated, numfs, i, notdone; + int anymode, unknownmode, numfs, i, notdone; cur = buf; left = buflen; - truncated = 0; len = snprintf(cur, left, "subject "); if (len < 0 || len > left) @@ -1216,7 +1215,7 @@ bsde_delete_rule(int rulenum, size_t buf { struct mac_bsdextended_rule rule; int name[10]; - size_t len, size; + size_t len; int error; if (bsde_check_version(buflen, errstr) != 0) @@ -1233,7 +1232,6 @@ bsde_delete_rule(int rulenum, size_t buf name[len] = rulenum; len++; - size = sizeof(rule); error = sysctl(name, len, NULL, NULL, &rule, 0); if (error) { len = snprintf(errstr, buflen, "%s.%d: %s", MIB ".rules", From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 02:48:05 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42F36A7B; Thu, 4 Jun 2015 02:48:05 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 309DA18E0; Thu, 4 Jun 2015 02:48:05 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t542m5Gt051867; Thu, 4 Jun 2015 02:48:05 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t542m57I051866; Thu, 4 Jun 2015 02:48:05 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201506040248.t542m57I051866@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Thu, 4 Jun 2015 02:48:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283975 - head/lib/libdpv 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 02:48:05 -0000 Author: araujo (ports committer) Date: Thu Jun 4 02:48:04 2015 New Revision: 283975 URL: https://svnweb.freebsd.org/changeset/base/283975 Log: Clean up unused variable and silence clang warnings. Differential Revision: D2682 Reviewed by: rodrigc Modified: head/lib/libdpv/dprompt.c Modified: head/lib/libdpv/dprompt.c ============================================================================== --- head/lib/libdpv/dprompt.c Thu Jun 4 02:44:37 2015 (r283974) +++ head/lib/libdpv/dprompt.c Thu Jun 4 02:48:04 2015 (r283975) @@ -391,7 +391,6 @@ dprompt_add_files(struct dpv_file_node * enum dprompt_state dstate; int estext_lsize; int estext_rsize; - int estext_size; int flabel_size; int hlen; int lsize; @@ -559,13 +558,11 @@ dprompt_add_files(struct dpv_file_node * bg_code = "\\Zr\\Z1"; /* Red */ estext_lsize = fail_lsize; estext_rsize = fail_rsize; - estext_size = fail_size; estext = fail; } else { /* e.g., DPV_STATUS_DONE */ bg_code = "\\Zr\\Z2"; /* Green */ estext_lsize = done_lsize; estext_rsize = done_rsize; - estext_size = done_size; estext = done; } switch (dstate) { From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 02:50:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8061BBD5; Thu, 4 Jun 2015 02:50:14 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DF921910; Thu, 4 Jun 2015 02:50:14 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t542oEaQ052733; Thu, 4 Jun 2015 02:50:14 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t542oEhA052732; Thu, 4 Jun 2015 02:50:14 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201506040250.t542oEhA052732@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Thu, 4 Jun 2015 02:50:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283976 - head/lib/libdevstat 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 02:50:14 -0000 Author: araujo (ports committer) Date: Thu Jun 4 02:50:13 2015 New Revision: 283976 URL: https://svnweb.freebsd.org/changeset/base/283976 Log: Remove unused variable and silence clang warnings. Differential Revision: D2681 Reviewed by: rodrigc Modified: head/lib/libdevstat/devstat.c Modified: head/lib/libdevstat/devstat.c ============================================================================== --- head/lib/libdevstat/devstat.c Thu Jun 4 02:48:04 2015 (r283975) +++ head/lib/libdevstat/devstat.c Thu Jun 4 02:50:13 2015 (r283976) @@ -334,7 +334,6 @@ devstat_getdevs(kvm_t *kd, struct statin { int error; size_t dssize; - int oldnumdevs; long oldgeneration; int retval = 0; struct devinfo *dinfo; @@ -348,7 +347,6 @@ devstat_getdevs(kvm_t *kd, struct statin return(-1); } - oldnumdevs = dinfo->numdevs; oldgeneration = dinfo->generation; if (kd == NULL) { From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 04:50:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9969D70D; Thu, 4 Jun 2015 04:50:53 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 863BD1584; Thu, 4 Jun 2015 04:50:53 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t544orAK012583; Thu, 4 Jun 2015 04:50:53 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t544orJN012582; Thu, 4 Jun 2015 04:50:53 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201506040450.t544orJN012582@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Thu, 4 Jun 2015 04:50: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: r283977 - stable/10/share/man/man3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 04:50:53 -0000 Author: pkelsey Date: Thu Jun 4 04:50:52 2015 New Revision: 283977 URL: https://svnweb.freebsd.org/changeset/base/283977 Log: MFC r283652: Provide an unambiguous description of the potential hazard in calling pthread_setspecific(3) from a key destructor. Modified: stable/10/share/man/man3/pthread_setspecific.3 Modified: stable/10/share/man/man3/pthread_setspecific.3 ============================================================================== --- stable/10/share/man/man3/pthread_setspecific.3 Thu Jun 4 02:50:13 2015 (r283976) +++ stable/10/share/man/man3/pthread_setspecific.3 Thu Jun 4 04:50:52 2015 (r283977) @@ -67,7 +67,10 @@ is undefined. The .Fn pthread_setspecific function may be called from a thread-specific data destructor function, -however this may result in lost storage or infinite loops. +however this may result in lost storage or infinite loops if doing so +causes non-NULL key values to remain after +.Bq PTHREAD_DESTRUCTOR_ITERATIONS +iterations of destructor calls have been made. .Sh RETURN VALUES If successful, the .Fn pthread_setspecific From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 04:54:55 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B836898; Thu, 4 Jun 2015 04:54:55 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08A941707; Thu, 4 Jun 2015 04:54:55 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t544ssIM016043; Thu, 4 Jun 2015 04:54:54 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t544ssSN016042; Thu, 4 Jun 2015 04:54:54 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201506040454.t544ssSN016042@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Thu, 4 Jun 2015 04:54:54 +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: r283978 - stable/10/sbin/dhclient 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 04:54:55 -0000 Author: pkelsey Date: Thu Jun 4 04:54:54 2015 New Revision: 283978 URL: https://svnweb.freebsd.org/changeset/base/283978 Log: MFC r283641: Add CAP_FCNTL to the lease file capsicum rights, and limit to CAP_FCNTL_GETFL. Without CAP_FCNTL_GETFL, the lease file truncation in rewrite_client_leases() will fail to trim old data when rewriting the file with a lesser amount of data. Modified: stable/10/sbin/dhclient/dhclient.c Modified: stable/10/sbin/dhclient/dhclient.c ============================================================================== --- stable/10/sbin/dhclient/dhclient.c Thu Jun 4 04:50:52 2015 (r283977) +++ stable/10/sbin/dhclient/dhclient.c Thu Jun 4 04:54:54 2015 (r283978) @@ -1847,12 +1847,16 @@ rewrite_client_leases(void) leaseFile = fopen(path_dhclient_db, "w"); if (!leaseFile) error("can't create %s: %m", path_dhclient_db); - cap_rights_init(&rights, CAP_FSTAT, CAP_FSYNC, CAP_FTRUNCATE, - CAP_SEEK, CAP_WRITE); + cap_rights_init(&rights, CAP_FCNTL, CAP_FSTAT, CAP_FSYNC, + CAP_FTRUNCATE, CAP_SEEK, CAP_WRITE); if (cap_rights_limit(fileno(leaseFile), &rights) < 0 && errno != ENOSYS) { error("can't limit lease descriptor: %m"); } + if (cap_fcntls_limit(fileno(leaseFile), CAP_FCNTL_GETFL) < 0 && + errno != ENOSYS) { + error("can't limit lease descriptor fcntls: %m"); + } } else { fflush(leaseFile); rewind(leaseFile); From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 05:21:26 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2ABDC08; Thu, 4 Jun 2015 05:21:25 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 760751D2B; Thu, 4 Jun 2015 05:21:25 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wiga1 with SMTP id a1so35363890wig.0; Wed, 03 Jun 2015 22:21:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=XbKSL4vs2yW8yS9GHRGqSB8EEDnwMNIa4ljh+6UEjK8=; b=QqPvCEuEYsrkvyC6fk9sKYIyYzfl35Vtr5fCwBJp7pcEFObeodYXxbhLVJyfsz9497 /5UPrf0wBlG8cAFfQxUrVeylfEzBjxl14pYAqeqEvw8ODUloWlplIg3ZDAPFjANNeVVv 9Mq+WJ/2lsGK4DAzCGzvpZAUmAXULZlGCecFwIgmH9MCRh1RBxoGkqv3bGDqgzoY4dTS G5Oc8uzoA6xZhIPPLFMEAWptDxBTVTrkU959imszO+yN8szzOGRj1Q5LWFpHJ33PtM1B iXSzIYwCGPip9kwP7jDhqgdCblcGkn0WYw8xDQEkKJpMGEw7Vn8ILJGHA2b7PqTrx9oC gDCQ== X-Received: by 10.194.178.39 with SMTP id cv7mr34728301wjc.100.1433395283963; Wed, 03 Jun 2015 22:21:23 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id c3sm3958167wja.3.2015.06.03.22.21.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jun 2015 22:21:23 -0700 (PDT) Sender: Baptiste Daroussin Date: Thu, 4 Jun 2015 07:21:21 +0200 From: Baptiste Daroussin To: d@delphij.net Cc: Sergey Kandaurov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, nectar@FreeBSD.org Subject: Re: svn commit: r283969 - head/lib/libutil Message-ID: <20150604052120.GH32562@ivaldir.etoilebsd.net> References: <201506032048.t53KmSCf074619@svn.freebsd.org> <20150603215841.GF32562@ivaldir.etoilebsd.net> <556F8322.9050602@delphij.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CD/aTaZybdUisKIc" Content-Disposition: inline In-Reply-To: <556F8322.9050602@delphij.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 05:21:26 -0000 --CD/aTaZybdUisKIc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 03, 2015 at 03:43:46PM -0700, Xin Li wrote: > On 06/03/15 14:58, Baptiste Daroussin wrote: > > On Thu, Jun 04, 2015 at 12:51:46AM +0300, Sergey Kandaurov wrote: > >> On 3 June 2015 at 23:48, Baptiste Daroussin > >> wrote: > >>> Author: bapt Date: Wed Jun 3 20:48:28 2015 New Revision: > >>> 283969 URL: https://svnweb.freebsd.org/changeset/base/283969 > >>>=20 > >>> Log: Add a pw_mkdb2(3) function which does the same thing as > >>> pw_mkdb(3) except it takes a new argument allowing to specify > >>> the endianness of the database to generate > >>>=20 > >>=20 > >> Why not change pw_mkdb()? Is it used outside of the project? > >>=20 > > Because that would change the ABI of libutil and it is not a > > private library aka we are supposed to maintain ABI compatibility > > as we do not know if it is used or not externally to the project. I > > care about the ABI because I have made this change in order to use > > it in pw(8) and MFC it to stable/10 before 10.2. > >=20 > > libutil is not versionned so this is the only way to not break the > > ABI. Except if someone has a better idea than I do. >=20 > Looking at r113596, pwd_mkdb(8) was changed to generate both legacy > (version 3, endianness sensitive) and new (version 4, machine > independent) formats. >=20 > Now, after 12 years, is it still sensible to generate legacy format db > entries? Maybe we should just disable the generation by default and > eventually remove the ability to generate them? >=20 That could be an option, in this case we could add a -l (legacy) option to pwd_mkdb to allow the users to generate the db in legacy format and drop su= pport support for legacy format in all other tools. Meaning I can revert pw_mkdb2= (3) If noone raised a voice against disable the generation by default, I'll do = it in a couple of days. Best regards, Bapt --CD/aTaZybdUisKIc Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlVv4E8ACgkQ8kTtMUmk6EzcJQCgj7JXlzynJdha7X8XIVawQ0Il 8W8AnR27CtARQzhy5+YG4qM2QnlXkrEF =cIO6 -----END PGP SIGNATURE----- --CD/aTaZybdUisKIc-- From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 05:31:02 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31770EBE; Thu, 4 Jun 2015 05:31:02 +0000 (UTC) (envelope-from joel@vnode.se) Received: from smtp.vnode.se (smtp.vnode.se [IPv6:2001:67c:40c:e3aa::5]) by mx1.freebsd.org (Postfix) with ESMTP id E3B5D1E66; Thu, 4 Jun 2015 05:31:01 +0000 (UTC) (envelope-from joel@vnode.se) Received: from ymer.vnode.se (h71n10-th-c-d4.ias.bredband.telia.com [81.234.63.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.vnode.se (Postfix) with ESMTPSA id C661112F37; Thu, 4 Jun 2015 07:30:51 +0200 (CEST) Date: Thu, 4 Jun 2015 07:30:51 +0200 From: Joel Dahl To: Gleb Smirnoff Cc: hiren panchasara , Michael Tuexen , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283806 - head/contrib/traceroute Message-ID: <20150604053051.GA12118@ymer.vnode.se> Mail-Followup-To: Gleb Smirnoff , hiren panchasara , Michael Tuexen , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201505310810.t4V8AZWR074647@svn.freebsd.org> <20150531185852.GA20409@strugglingcoder.info> <4E05B479-A012-4219-822A-68DF72CCAACF@freebsd.org> <0EA0845B-0C79-40D3-A73A-27EA1C6EDAC0@freebsd.org> <20150603184915.GC20409@strugglingcoder.info> <20150603200210.GC73119@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150603200210.GC73119@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 05:31:02 -0000 On Wed, Jun 03, 2015 at 11:02:10PM +0300, Gleb Smirnoff wrote: > On Wed, Jun 03, 2015 at 11:49:15AM -0700, hiren panchasara wrote: > h> > >> Picking up a random traceroute commit here. I am not sure of the history > h> > >> but don't we try to upstream the fixes for contrib/* things, in general? > h> > > The last version was release 12 years ago. They where integrated in > h> > > https://svnweb.freebsd.org/base?view=revision&revision=100787 > h> > > > h> > > I can submit the patches also to traceroute@ee.lbl.gov as indicated in > h> > > https://svnweb.freebsd.org/base/head/contrib/traceroute/FREEBSD-upgrade?view=markup > h> > I tried to... However, the e-mail address traceroute@ee.lbl.gov doesn't seem > h> > to work anymore... > h> > h> In that case, we should continue fixing things in-house like you've been doing. > > And probably 'svn mv' it out of contrib. Yes, please move it. There is no upstream. -- Joel From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 05:37:07 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9CA418B; Thu, 4 Jun 2015 05:37:07 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7CF51FEC; Thu, 4 Jun 2015 05:37:07 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t545b7cP035938; Thu, 4 Jun 2015 05:37:07 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t545b7XK035937; Thu, 4 Jun 2015 05:37:07 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201506040537.t545b7XK035937@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 4 Jun 2015 05:37:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283979 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 05:37:08 -0000 Author: adrian Date: Thu Jun 4 05:37:07 2015 New Revision: 283979 URL: https://svnweb.freebsd.org/changeset/base/283979 Log: Disable bgscan for now - it interferes with 11n activity and general stability. I'll re-enable it once the scan overhaul is done - the NIC itself can do bgscan, but not how we're doing it. MFC after: 2 weeks Sponsored by: Norse Corp, Inc. Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Thu Jun 4 04:54:54 2015 (r283978) +++ head/sys/dev/iwn/if_iwn.c Thu Jun 4 05:37:07 2015 (r283979) @@ -565,7 +565,9 @@ iwn_attach(device_t dev) ic->ic_caps = IEEE80211_C_STA /* station mode supported */ | IEEE80211_C_MONITOR /* monitor mode supported */ +#if 0 | IEEE80211_C_BGSCAN /* background scanning */ +#endif | IEEE80211_C_TXPMGT /* tx power management */ | IEEE80211_C_SHSLOT /* short slot time supported */ | IEEE80211_C_WPA From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 06:30:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A5522B5; Thu, 4 Jun 2015 06:30:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 784BA1D4F; Thu, 4 Jun 2015 06:30:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t546UeZQ062064; Thu, 4 Jun 2015 06:30:40 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t546Uelc061867; Thu, 4 Jun 2015 06:30:40 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201506040630.t546Uelc061867@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 4 Jun 2015 06:30:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283980 - head/sys/net80211 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 06:30:40 -0000 Author: adrian Date: Thu Jun 4 06:30:39 2015 New Revision: 283980 URL: https://svnweb.freebsd.org/changeset/base/283980 Log: First pass of adding transmit parameters as an option for outbound 802.11 mbufs. The raw transmit path currently doesn't make it easy to queue these frames: * there's no node reference stored in the mbuf, like for the normal path, and * the bpf supplied raw transmit parameters (rate, rts/cts, etc) are passed in as an argument, not as an mbuf tag. In order to support driver queuing of these frames, we need to be able to put the above into the mbuf before the driver gets it, so the driver /can/ put it into a queue if needed. Use an mbuf tag and for now just verbatim copy the bpf parameters into it. Later on it may grow to include more options but this will do for now. Why would you want to queue raw frames? Well, in the case of iwn(4), we can't send the firmware frames to transmit before we hear a beacon - the firmware will consider passive channels as unavailable until it hears a beacon. The firmware "passive" channel state is cleared upon each RXON command, which is sent to update association status. So, when we attempt association and authorisation, the RXON command causes the firmware to clear out what it's already seen, and so we have to wait for a beacon before we can transmit. Before people get overly excited - this alone doesn't "fix" 5GHz operation - it just makes it (more) possible. The aim here is to convert all the drivers over to use a raw_xmit() API that doesn't include the node and params - instead they'd get those from the mbuf. Then raw_xmit() becomes just a side-channel version of the normal transmit path for management traffic. MFC after: 2 weeks Sponsored by: Norse Corp, Inc. Modified: head/sys/net80211/ieee80211_freebsd.c head/sys/net80211/ieee80211_freebsd.h Modified: head/sys/net80211/ieee80211_freebsd.c ============================================================================== --- head/sys/net80211/ieee80211_freebsd.c Thu Jun 4 05:37:07 2015 (r283979) +++ head/sys/net80211/ieee80211_freebsd.c Thu Jun 4 06:30:39 2015 (r283980) @@ -474,6 +474,40 @@ ieee80211_add_callback(struct mbuf *m, return 1; } +int +ieee80211_add_xmit_params(struct mbuf *m, + const struct ieee80211_bpf_params *params) +{ + struct m_tag *mtag; + struct ieee80211_tx_params *tx; + + mtag = m_tag_alloc(MTAG_ABI_NET80211, NET80211_TAG_XMIT_PARAMS, + sizeof(struct ieee80211_tx_params), M_NOWAIT); + if (mtag == NULL) + return (0); + + tx = (struct ieee80211_tx_params *)(mtag+1); + memcpy(&tx->params, params, sizeof(struct ieee80211_bpf_params)); + m_tag_prepend(m, mtag); + return (1); +} + +int +ieee80211_get_xmit_params(struct mbuf *m, + struct ieee80211_bpf_params *params) +{ + struct m_tag *mtag; + struct ieee80211_tx_params *tx; + + mtag = m_tag_locate(m, MTAG_ABI_NET80211, NET80211_TAG_XMIT_PARAMS, + NULL); + if (mtag == NULL) + return (-1); + tx = (struct ieee80211_tx_params *)(mtag + 1); + memcpy(params, &tx->params, sizeof(struct ieee80211_bpf_params)); + return (0); +} + void ieee80211_process_callback(struct ieee80211_node *ni, struct mbuf *m, int status) Modified: head/sys/net80211/ieee80211_freebsd.h ============================================================================== --- head/sys/net80211/ieee80211_freebsd.h Thu Jun 4 05:37:07 2015 (r283979) +++ head/sys/net80211/ieee80211_freebsd.h Thu Jun 4 06:30:39 2015 (r283980) @@ -327,6 +327,9 @@ int ieee80211_add_callback(struct mbuf * void (*func)(struct ieee80211_node *, void *, int), void *arg); void ieee80211_process_callback(struct ieee80211_node *, struct mbuf *, int); +#define NET80211_TAG_XMIT_PARAMS 1 +/* See below; this is after the bpf_params definition */ + struct ieee80211com; int ieee80211_parent_xmitpkt(struct ieee80211com *, struct mbuf *); int ieee80211_vap_xmitpkt(struct ieee80211vap *, struct mbuf *); @@ -607,6 +610,14 @@ struct ieee80211_bpf_params { uint8_t ibp_rate3; /* series 4 IEEE tx rate */ }; +struct ieee80211_tx_params { + struct ieee80211_bpf_params params; +}; +int ieee80211_add_xmit_params(struct mbuf *m, + const struct ieee80211_bpf_params *); +int ieee80211_get_xmit_params(struct mbuf *m, + struct ieee80211_bpf_params *); + /* * Malloc API. Other BSD operating systems have slightly * different malloc/free namings (eg DragonflyBSD.) From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 07:24:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71E3011E; Thu, 4 Jun 2015 07:24:57 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 603F51A5D; Thu, 4 Jun 2015 07:24:57 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t547Ov35090195; Thu, 4 Jun 2015 07:24:57 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t547OuIh090193; Thu, 4 Jun 2015 07:24:56 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201506040724.t547OuIh090193@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 4 Jun 2015 07:24:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283981 - head/usr.sbin/pwd_mkdb 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 07:24:57 -0000 Author: delphij Date: Thu Jun 4 07:24:56 2015 New Revision: 283981 URL: https://svnweb.freebsd.org/changeset/base/283981 Log: In r113596, version 4 of entries have been added but pwd_mkdb have been generating both new (machine independent) and legacy version entries (endianness sensitive). The base system have been using the new format for quite some time, so disable the generation by default. An interim option, -l, have been added to re-enable old behavior. The -l, -B and -L options are considered deprecated and will be removed in FreeBSD 12.0 release. Modified: head/usr.sbin/pwd_mkdb/pwd_mkdb.8 head/usr.sbin/pwd_mkdb/pwd_mkdb.c Modified: head/usr.sbin/pwd_mkdb/pwd_mkdb.8 ============================================================================== --- head/usr.sbin/pwd_mkdb/pwd_mkdb.8 Thu Jun 4 06:30:39 2015 (r283980) +++ head/usr.sbin/pwd_mkdb/pwd_mkdb.8 Thu Jun 4 07:24:56 2015 (r283981) @@ -36,7 +36,7 @@ .Nd "generate the password databases" .Sh SYNOPSIS .Nm -.Op Fl BCiLNp +.Op Fl BCilLNp .Op Fl d Ar directory .Op Fl s Ar cachesize .Op Fl u Ar username @@ -61,14 +61,10 @@ different from the historic Version 7 st .Pp The options are as follows: .Bl -tag -width flag -.It Fl B -Store data in big-endian format. .It Fl C Check if the password file is in the correct format. Do not change, add, or remove any files. -.It Fl L -Store data in little-endian format. .It Fl N Tell .Nm @@ -116,6 +112,34 @@ encrypted password and the insecure vers The databases are used by the C library password routines (see .Xr getpwent 3 ) . .Pp +By default, +the +.Nm +utility generates new, +machine independent format +.Pq v4 +entries only. +For compatibility with +.Fx 5.0 +and earlier releases, +the +.Fl l +option may be specified, +which enables generation of legacy format +.Pq v3 +entries. +The legacy format entries are endianness dependent. +.Pp +The following options may be specified and will affect the +generation of legacy entries. +.Pp +.Bl -tag -width flag +.It Fl B +Store data in big-endian format. +.It Fl L +Store data in little-endian format. +.El +.Pp The .Nm utility exits zero on success, non-zero on failure. Modified: head/usr.sbin/pwd_mkdb/pwd_mkdb.c ============================================================================== --- head/usr.sbin/pwd_mkdb/pwd_mkdb.c Thu Jun 4 06:30:39 2015 (r283980) +++ head/usr.sbin/pwd_mkdb/pwd_mkdb.c Thu Jun 4 07:24:56 2015 (r283981) @@ -112,15 +112,15 @@ main(int argc, char *argv[]) char sbuf2[MAXPATHLEN]; char *username; u_int method, methoduid; - int Cflag, dflag, iflag; + int Cflag, dflag, iflag, lflag; int nblock = 0; - iflag = dflag = Cflag = 0; + iflag = dflag = Cflag = lflag = 0; strcpy(prefix, _PATH_PWD); makeold = 0; username = NULL; oldfp = NULL; - while ((ch = getopt(argc, argv, "BCLNd:ips:u:v")) != -1) + while ((ch = getopt(argc, argv, "BCLlNd:ips:u:v")) != -1) switch(ch) { case 'B': /* big-endian output */ openinfo.lorder = BIG_ENDIAN; @@ -128,6 +128,9 @@ main(int argc, char *argv[]) case 'C': /* verify only */ Cflag = 1; break; + case 'l': /* generate legacy entries */ + lflag = 1; + break; case 'L': /* little-endian output */ openinfo.lorder = LITTLE_ENDIAN; break; @@ -465,6 +468,7 @@ main(int argc, char *argv[]) error("put"); } + if (lflag) { /* Create insecure data. (legacy version) */ p = buf; COMPACT(pwd.pw_name); @@ -555,6 +559,7 @@ main(int argc, char *argv[]) error("put"); } } + } /* Create original format password file entry */ if (is_comment && makeold){ /* copy comments */ if (fprintf(oldfp, "%s\n", line) < 0) @@ -583,6 +588,7 @@ main(int argc, char *argv[]) error("put"); if ((sdp->put)(sdp, &key, &data, method) == -1) error("put"); + if (lflag) { tbuf[0] = LEGACY_VERSION(_PW_KEYYPENABLED); key.size = 1; if ((dp->put)(dp, &key, &data, method) == -1) @@ -590,6 +596,7 @@ main(int argc, char *argv[]) if ((sdp->put)(sdp, &key, &data, method) == -1) error("put"); } + } if ((dp->close)(dp) == -1) error("close"); From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 07:25:41 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1AC31272; Thu, 4 Jun 2015 07:25:41 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 091061A6B; Thu, 4 Jun 2015 07:25:41 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t547PeGD090382; Thu, 4 Jun 2015 07:25:40 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t547PeCV090381; Thu, 4 Jun 2015 07:25:40 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201506040725.t547PeCV090381@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 4 Jun 2015 07:25:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283982 - head/usr.sbin/pwd_mkdb 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 07:25:41 -0000 Author: delphij Date: Thu Jun 4 07:25:40 2015 New Revision: 283982 URL: https://svnweb.freebsd.org/changeset/base/283982 Log: Whitespace changes for r283981. No actual code changes. Modified: head/usr.sbin/pwd_mkdb/pwd_mkdb.c Modified: head/usr.sbin/pwd_mkdb/pwd_mkdb.c ============================================================================== --- head/usr.sbin/pwd_mkdb/pwd_mkdb.c Thu Jun 4 07:24:56 2015 (r283981) +++ head/usr.sbin/pwd_mkdb/pwd_mkdb.c Thu Jun 4 07:25:40 2015 (r283982) @@ -469,97 +469,97 @@ main(int argc, char *argv[]) } if (lflag) { - /* Create insecure data. (legacy version) */ - p = buf; - COMPACT(pwd.pw_name); - COMPACT("*"); - LSCALAR(pwd.pw_uid); - LSCALAR(pwd.pw_gid); - LSCALAR(pwd.pw_change); - COMPACT(pwd.pw_class); - COMPACT(pwd.pw_gecos); - COMPACT(pwd.pw_dir); - COMPACT(pwd.pw_shell); - LSCALAR(pwd.pw_expire); - LSCALAR(pwd.pw_fields); - data.size = p - buf; - - /* Create secure data. (legacy version) */ - p = sbuf; - COMPACT(pwd.pw_name); - COMPACT(pwd.pw_passwd); - LSCALAR(pwd.pw_uid); - LSCALAR(pwd.pw_gid); - LSCALAR(pwd.pw_change); - COMPACT(pwd.pw_class); - COMPACT(pwd.pw_gecos); - COMPACT(pwd.pw_dir); - COMPACT(pwd.pw_shell); - LSCALAR(pwd.pw_expire); - LSCALAR(pwd.pw_fields); - sdata.size = p - sbuf; - - /* Store insecure by name. */ - tbuf[0] = LEGACY_VERSION(_PW_KEYBYNAME); - len = strlen(pwd.pw_name); - memmove(tbuf + 1, pwd.pw_name, len); - key.size = len + 1; - if ((dp->put)(dp, &key, &data, method) == -1) - error("put"); - - /* Store insecure by number. */ - tbuf[0] = LEGACY_VERSION(_PW_KEYBYNUM); - store = HTOL(cnt); - memmove(tbuf + 1, &store, sizeof(store)); - key.size = sizeof(store) + 1; - if ((dp->put)(dp, &key, &data, method) == -1) - error("put"); - - /* Store insecure by uid. */ - tbuf[0] = LEGACY_VERSION(_PW_KEYBYUID); - store = HTOL(pwd.pw_uid); - memmove(tbuf + 1, &store, sizeof(store)); - key.size = sizeof(store) + 1; - if ((dp->put)(dp, &key, &data, methoduid) == -1) - error("put"); + /* Create insecure data. (legacy version) */ + p = buf; + COMPACT(pwd.pw_name); + COMPACT("*"); + LSCALAR(pwd.pw_uid); + LSCALAR(pwd.pw_gid); + LSCALAR(pwd.pw_change); + COMPACT(pwd.pw_class); + COMPACT(pwd.pw_gecos); + COMPACT(pwd.pw_dir); + COMPACT(pwd.pw_shell); + LSCALAR(pwd.pw_expire); + LSCALAR(pwd.pw_fields); + data.size = p - buf; + + /* Create secure data. (legacy version) */ + p = sbuf; + COMPACT(pwd.pw_name); + COMPACT(pwd.pw_passwd); + LSCALAR(pwd.pw_uid); + LSCALAR(pwd.pw_gid); + LSCALAR(pwd.pw_change); + COMPACT(pwd.pw_class); + COMPACT(pwd.pw_gecos); + COMPACT(pwd.pw_dir); + COMPACT(pwd.pw_shell); + LSCALAR(pwd.pw_expire); + LSCALAR(pwd.pw_fields); + sdata.size = p - sbuf; + + /* Store insecure by name. */ + tbuf[0] = LEGACY_VERSION(_PW_KEYBYNAME); + len = strlen(pwd.pw_name); + memmove(tbuf + 1, pwd.pw_name, len); + key.size = len + 1; + if ((dp->put)(dp, &key, &data, method) == -1) + error("put"); - /* Store secure by name. */ - tbuf[0] = LEGACY_VERSION(_PW_KEYBYNAME); - len = strlen(pwd.pw_name); - memmove(tbuf + 1, pwd.pw_name, len); - key.size = len + 1; - if ((sdp->put)(sdp, &key, &sdata, method) == -1) - error("put"); + /* Store insecure by number. */ + tbuf[0] = LEGACY_VERSION(_PW_KEYBYNUM); + store = HTOL(cnt); + memmove(tbuf + 1, &store, sizeof(store)); + key.size = sizeof(store) + 1; + if ((dp->put)(dp, &key, &data, method) == -1) + error("put"); - /* Store secure by number. */ - tbuf[0] = LEGACY_VERSION(_PW_KEYBYNUM); - store = HTOL(cnt); - memmove(tbuf + 1, &store, sizeof(store)); - key.size = sizeof(store) + 1; - if ((sdp->put)(sdp, &key, &sdata, method) == -1) - error("put"); + /* Store insecure by uid. */ + tbuf[0] = LEGACY_VERSION(_PW_KEYBYUID); + store = HTOL(pwd.pw_uid); + memmove(tbuf + 1, &store, sizeof(store)); + key.size = sizeof(store) + 1; + if ((dp->put)(dp, &key, &data, methoduid) == -1) + error("put"); - /* Store secure by uid. */ - tbuf[0] = LEGACY_VERSION(_PW_KEYBYUID); - store = HTOL(pwd.pw_uid); - memmove(tbuf + 1, &store, sizeof(store)); - key.size = sizeof(store) + 1; - if ((sdp->put)(sdp, &key, &sdata, methoduid) == -1) - error("put"); + /* Store secure by name. */ + tbuf[0] = LEGACY_VERSION(_PW_KEYBYNAME); + len = strlen(pwd.pw_name); + memmove(tbuf + 1, pwd.pw_name, len); + key.size = len + 1; + if ((sdp->put)(sdp, &key, &sdata, method) == -1) + error("put"); - /* Store insecure and secure special plus and special minus */ - if (pwd.pw_name[0] == '+' || pwd.pw_name[0] == '-') { - tbuf[0] = LEGACY_VERSION(_PW_KEYYPBYNUM); - store = HTOL(ypcnt); + /* Store secure by number. */ + tbuf[0] = LEGACY_VERSION(_PW_KEYBYNUM); + store = HTOL(cnt); memmove(tbuf + 1, &store, sizeof(store)); key.size = sizeof(store) + 1; - if ((dp->put)(dp, &key, &data, method) == -1) - error("put"); if ((sdp->put)(sdp, &key, &sdata, method) == -1) error("put"); + + /* Store secure by uid. */ + tbuf[0] = LEGACY_VERSION(_PW_KEYBYUID); + store = HTOL(pwd.pw_uid); + memmove(tbuf + 1, &store, sizeof(store)); + key.size = sizeof(store) + 1; + if ((sdp->put)(sdp, &key, &sdata, methoduid) == -1) + error("put"); + + /* Store insecure and secure special plus and special minus */ + if (pwd.pw_name[0] == '+' || pwd.pw_name[0] == '-') { + tbuf[0] = LEGACY_VERSION(_PW_KEYYPBYNUM); + store = HTOL(ypcnt); + memmove(tbuf + 1, &store, sizeof(store)); + key.size = sizeof(store) + 1; + if ((dp->put)(dp, &key, &data, method) == -1) + error("put"); + if ((sdp->put)(sdp, &key, &sdata, method) == -1) + error("put"); + } } } - } /* Create original format password file entry */ if (is_comment && makeold){ /* copy comments */ if (fprintf(oldfp, "%s\n", line) < 0) @@ -589,13 +589,13 @@ main(int argc, char *argv[]) if ((sdp->put)(sdp, &key, &data, method) == -1) error("put"); if (lflag) { - tbuf[0] = LEGACY_VERSION(_PW_KEYYPENABLED); - key.size = 1; - if ((dp->put)(dp, &key, &data, method) == -1) - error("put"); - if ((sdp->put)(sdp, &key, &data, method) == -1) - error("put"); - } + tbuf[0] = LEGACY_VERSION(_PW_KEYYPENABLED); + key.size = 1; + if ((dp->put)(dp, &key, &data, method) == -1) + error("put"); + if ((sdp->put)(sdp, &key, &data, method) == -1) + error("put"); + } } if ((dp->close)(dp) == -1) From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 07:37:10 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60DBC7C6; Thu, 4 Jun 2015 07:37:10 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FFED1D14; Thu, 4 Jun 2015 07:37:10 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t547bACQ095673; Thu, 4 Jun 2015 07:37:10 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t547b9OK095671; Thu, 4 Jun 2015 07:37:09 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201506040737.t547b9OK095671@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 4 Jun 2015 07:37:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283983 - in head: . 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 07:37:10 -0000 Author: delphij Date: Thu Jun 4 07:37:09 2015 New Revision: 283983 URL: https://svnweb.freebsd.org/changeset/base/283983 Log: Document the disable of legacy entries in password database in UPDATING and bump __FreeBSD_version after r283981. Modified: head/UPDATING head/sys/sys/param.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Jun 4 07:25:40 2015 (r283982) +++ head/UPDATING Thu Jun 4 07:37:09 2015 (r283983) @@ -31,6 +31,15 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20150604: + Generation of legacy formatted entries have been disabled by default + in pwd_mkdb(8), as all base system consumers of the legacy formatted + entries were converted to use the new format by default when the new, + machine independent format have been added and supported since FreeBSD + 5.x. + + Please see the pwd_mkdb(8) manual page for further details. + 20150525: Clang and llvm have been upgraded to 3.6.1 release. Please see the 20141231 entry below for information about prerequisites and upgrading, Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Thu Jun 4 07:25:40 2015 (r283982) +++ head/sys/sys/param.h Thu Jun 4 07:37:09 2015 (r283983) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100075 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100076 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 07:41:59 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 892A997C; Thu, 4 Jun 2015 07:41:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::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 F3C921F00; Thu, 4 Jun 2015 07:41:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t547frWP045983 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 4 Jun 2015 10:41:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t547frWP045983 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t547fqwT045982; Thu, 4 Jun 2015 10:41:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 4 Jun 2015 10:41:52 +0300 From: Konstantin Belousov To: Marcelo Araujo Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283974 - head/lib/libugidfw Message-ID: <20150604074152.GZ2499@kib.kiev.ua> References: <201506040244.t542ibW9051338@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201506040244.t542ibW9051338@svn.freebsd.org> 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.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 07:41:59 -0000 On Thu, Jun 04, 2015 at 02:44:37AM +0000, Marcelo Araujo wrote: > Author: araujo (ports committer) > Date: Thu Jun 4 02:44:37 2015 > New Revision: 283974 > URL: https://svnweb.freebsd.org/changeset/base/283974 > > Log: > Remove unused variables and silence clang warnings. > > Differential Revision: D2686 > Reviewed by: rodrigc > > Modified: > head/lib/libugidfw/ugidfw.c > > @@ -1216,7 +1215,7 @@ bsde_delete_rule(int rulenum, size_t buf > { > struct mac_bsdextended_rule rule; > int name[10]; > - size_t len, size; > + size_t len; > int error; > > if (bsde_check_version(buflen, errstr) != 0) > @@ -1233,7 +1232,6 @@ bsde_delete_rule(int rulenum, size_t buf > name[len] = rulenum; > len++; > > - size = sizeof(rule); > error = sysctl(name, len, NULL, NULL, &rule, 0); This is very strange chunk. I suspect that the intent was to have 'size' as the sixth argument to the sysctl(3) call, or just have sizeof(rule) instead of 0. > if (error) { > len = snprintf(errstr, buflen, "%s.%d: %s", MIB ".rules", From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 07:53:00 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 488DFD3F; Thu, 4 Jun 2015 07:53:00 +0000 (UTC) (envelope-from delphij@delphij.net) 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 EF7911199; Thu, 4 Jun 2015 07:52:59 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from Xins-MBP.home.us.delphij.net (c-71-202-112-39.hsd1.ca.comcast.net [71.202.112.39]) (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 A1F4917DB6; Thu, 4 Jun 2015 00:52:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1433404379; x=1433418779; bh=9Sp+DKyQG711enRF492iQ7eYIdnbcXMn6UNF6nWDNWQ=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=CqCYTi+e8mtsqwBBmhK8Bo+rdI3E8nEV3mDZueRGr3FUooKDhX1U8D8BvgHvQIkDH bF+q6cV+w7PZcAkSMdcE+bo3D4qZbVs3jnMfgnxUh+2Z4qemK9Kw1coZjzCJmON6PM Xahbv8H03hkBwkg0+HsmD/FzVSQVYn2y+p87yMfY= Message-ID: <557003DA.9090205@delphij.net> Date: Thu, 04 Jun 2015 00:52:58 -0700 From: Xin Li User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Baptiste Daroussin , d@delphij.net CC: Sergey Kandaurov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, nectar@FreeBSD.org Subject: Re: svn commit: r283969 - head/lib/libutil References: <201506032048.t53KmSCf074619@svn.freebsd.org> <20150603215841.GF32562@ivaldir.etoilebsd.net> <556F8322.9050602@delphij.net> <20150604052120.GH32562@ivaldir.etoilebsd.net> In-Reply-To: <20150604052120.GH32562@ivaldir.etoilebsd.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 07:53:00 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 6/3/15 22:21, Baptiste Daroussin wrote: > On Wed, Jun 03, 2015 at 03:43:46PM -0700, Xin Li wrote: >> On 06/03/15 14:58, Baptiste Daroussin wrote: >>> On Thu, Jun 04, 2015 at 12:51:46AM +0300, Sergey Kandaurov >>> wrote: >>>> On 3 June 2015 at 23:48, Baptiste Daroussin >>>> wrote: >>>>> Author: bapt Date: Wed Jun 3 20:48:28 2015 New Revision: >>>>> 283969 URL: >>>>> https://svnweb.freebsd.org/changeset/base/283969 >>>>> >>>>> Log: Add a pw_mkdb2(3) function which does the same thing >>>>> as pw_mkdb(3) except it takes a new argument allowing to >>>>> specify the endianness of the database to generate >>>>> >>>> >>>> Why not change pw_mkdb()? Is it used outside of the project? >>>> >>> Because that would change the ABI of libutil and it is not a >>> private library aka we are supposed to maintain ABI >>> compatibility as we do not know if it is used or not externally >>> to the project. I care about the ABI because I have made this >>> change in order to use it in pw(8) and MFC it to stable/10 >>> before 10.2. >>> >>> libutil is not versionned so this is the only way to not break >>> the ABI. Except if someone has a better idea than I do. >> >> Looking at r113596, pwd_mkdb(8) was changed to generate both >> legacy (version 3, endianness sensitive) and new (version 4, >> machine independent) formats. >> >> Now, after 12 years, is it still sensible to generate legacy >> format db entries? Maybe we should just disable the generation >> by default and eventually remove the ability to generate them? >> > > That could be an option, in this case we could add a -l (legacy) > option to pwd_mkdb to allow the users to generate the db in legacy > format and drop support support for legacy format in all other > tools. Meaning I can revert pw_mkdb2(3) Well, I think the pw_mkdb2(3) should be reverted, because the base system libraries are not using the legacy format when new formatted entries are present (which is true for databases generated on FreeBSD 5+); and if they do, that shall be seen as a bug and we should fix these libraries. I have committed r283981-r283983 to implement the default change and the -l option. Cheers, -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJVcAPZAAoJEJW2GBstM+nsb1oQAKug0zb3dxTSZScZJ/R8YBof +upLW/MALifOlhkYz0QBp+VQwrXvX+ZT1tseIwopg6pL0mrq9ZRrSb5DepFIc8fY lJ0P1s15RF41hRFcRSh3bJh8rEGekgS5fv3EFWwvrwUSA1D22X+wOofCLfZs2uji MpPmhc1g5jMN3tx4Evsx/7prSoXFGZYimnVIb8uNmjJyruHlrSrXsIau/b8ND4lm 7eQS4n5EoNmu8ui7rk4IsJPr1kP/gpjE+UPGi0tICjb8In8lE0Tj2fgMuDpRHQ7K II90Qanv+RZrapRb8zIOJRH8GBA0IlE8LzcIcoI4Dd32eP+HfP6BPMOD+kB9VlsS xapUo/PSF6ouScPNIoQD0Pq1VdvYHUTid/McoI6UTauHYSerl8mGOvpSRZF1GIFa pFzpJcsl15tWXAhwrDxSSwO+2BvtXDO36K+VbmTlMlr8Z623S6F2K/MyEkIbpj55 Un85J2xNoYbeEjc8+66emjILUZajGXXiJLS4v1f5RYTyOTl4t7coV4aDPb2c0aZu JsbagSfkPCuHttzwbry4EnfI+4eRo7+wtR3rf9tOXBt6DOY7qTba6GSBIpvVeqbe tlM/rpXnREgIUFyshKGN50I2OcpJY9RWALNUMwlCXDUbW4sHwy7acma0+hhDoGAl Q5Hc9f0/u76LNnvDQWNZ =6rIW -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 08:00:13 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 709F7208; Thu, 4 Jun 2015 08:00:13 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FB99121A; Thu, 4 Jun 2015 08:00:13 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5480DQR006295; Thu, 4 Jun 2015 08:00:13 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5480CJd006286; Thu, 4 Jun 2015 08:00:12 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506040800.t5480CJd006286@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 4 Jun 2015 08:00:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283984 - head/lib/libutil 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 08:00:13 -0000 Author: bapt Date: Thu Jun 4 08:00:11 2015 New Revision: 283984 URL: https://svnweb.freebsd.org/changeset/base/283984 Log: revert r283969,283970 not needed anymore after r283981 Modified: head/lib/libutil/Makefile head/lib/libutil/libutil.h head/lib/libutil/pw_util.3 head/lib/libutil/pw_util.c Modified: head/lib/libutil/Makefile ============================================================================== --- head/lib/libutil/Makefile Thu Jun 4 07:37:09 2015 (r283983) +++ head/lib/libutil/Makefile Thu Jun 4 08:00:11 2015 (r283984) @@ -78,7 +78,6 @@ MLINKS+=pw_util.3 pw_copy.3 \ pw_util.3 pw_make.3 \ pw_util.3 pw_make_v7.3 \ pw_util.3 pw_mkdb.3 \ - pw_util.3 pw_mkdb2.3 \ pw_util.3 pw_lock.3 \ pw_util.3 pw_scan.3 \ pw_util.3 pw_tempname.3 \ Modified: head/lib/libutil/libutil.h ============================================================================== --- head/lib/libutil/libutil.h Thu Jun 4 07:37:09 2015 (r283983) +++ head/lib/libutil/libutil.h Thu Jun 4 08:00:11 2015 (r283984) @@ -144,9 +144,6 @@ char *fparseln(FILE *_fp, size_t *_len, #endif #ifdef _PWD_H_ -#define PWDB_NATIVE 0 -#define PWDB_LE 1 -#define PWDB_BE 2 int pw_copy(int _ffd, int _tfd, const struct passwd *_pw, struct passwd *_old_pw); struct passwd @@ -158,7 +155,6 @@ int pw_init(const char *_dir, const char char *pw_make(const struct passwd *_pw); char *pw_make_v7(const struct passwd *_pw); int pw_mkdb(const char *_user); -int pw_mkdb2(const char *_user, int endian); int pw_lock(void); struct passwd * pw_scan(const char *_line, int _flags); Modified: head/lib/libutil/pw_util.3 ============================================================================== --- head/lib/libutil/pw_util.3 Thu Jun 4 07:37:09 2015 (r283983) +++ head/lib/libutil/pw_util.3 Thu Jun 4 08:00:11 2015 (r283984) @@ -37,7 +37,6 @@ .Nm pw_make , .Nm pw_make_v7 , .Nm pw_mkdb , -.Nm pw_mkdb2 , .Nm pw_lock , .Nm pw_scan , .Nm pw_tempname , @@ -67,8 +66,6 @@ .Ft int .Fn pw_mkdb "const char *user" .Ft int -.Fn pw_mkdb "const char *user" "int endian" -.Ft int .Fn pw_lock "void" .Ft "struct passwd *" .Fn pw_scan "const char *line" "int flags" @@ -228,30 +225,11 @@ function regenerates the password databa .Xr pwd_mkdb 8 . If .Fa user -is set, only the record corresponding to that user will be updated. +only the record corresponding to that user will be updated. The .Fn pw_mkdb function returns 0 in case of success and -1 in case of failure. .Pp -.Fn pw_mkdb2 -function regenerates the password database by running -.Xr pwd_mkdb 8 . -If -.Fa user -is set, only the record corresponding to that user will be updated. -.Pp -The -.Fa endian -variable can take the following values -.Bl -tag -width PWDB_NATIVE -.It Dv PWDB_NATIVE -The database will be generated in host native endianness. -.It Dv PWDB_LE -The database will be generated in Little-endian. -.It Dv PWDB_BE -The database will be generated in Big-endian. -.El -.Pp The .Fn pw_lock function locks the master password file. Modified: head/lib/libutil/pw_util.c ============================================================================== --- head/lib/libutil/pw_util.c Thu Jun 4 07:37:09 2015 (r283983) +++ head/lib/libutil/pw_util.c Thu Jun 4 08:00:11 2015 (r283984) @@ -242,36 +242,14 @@ pw_tmp(int mfd) return (tfd); } -int -pw_mkdb(const char *user) -{ - - return (pw_mkdb2(user, PWDB_NATIVE)); -} - /* * Regenerate the password database. */ int -pw_mkdb2(const char *user, int endian) +pw_mkdb(const char *user) { int pstat; pid_t pid; - const char *arg; - - switch (endian) { - case PWDB_NATIVE: - arg = "-p"; - break; - case PWDB_LE: - arg = "-pL"; - break; - case PWDB_BE: - arg = "-pB"; - break; - default: - return (-1); - } (void)fflush(stderr); switch ((pid = fork())) { @@ -280,10 +258,10 @@ pw_mkdb2(const char *user, int endian) case 0: /* child */ if (user == NULL) - execl(_PATH_PWD_MKDB, "pwd_mkdb", arg, + execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", "-d", passwd_dir, tempname, (char *)NULL); else - execl(_PATH_PWD_MKDB, "pwd_mkdb", arg, + execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", "-d", passwd_dir, "-u", user, tempname, (char *)NULL); _exit(1); From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 08:05:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1A28456; Thu, 4 Jun 2015 08:05:44 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0D5814AA; Thu, 4 Jun 2015 08:05:44 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5485iEH010645; Thu, 4 Jun 2015 08:05:44 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5485iYf010644; Thu, 4 Jun 2015 08:05:44 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506040805.t5485iYf010644@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 4 Jun 2015 08:05:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283985 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 08:05:45 -0000 Author: bapt Date: Thu Jun 4 08:05:44 2015 New Revision: 283985 URL: https://svnweb.freebsd.org/changeset/base/283985 Log: After r283981 it is no more needed to specify endianness when generating the passwd database Modified: head/etc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Thu Jun 4 08:00:11 2015 (r283984) +++ head/etc/Makefile Thu Jun 4 08:05:44 2015 (r283985) @@ -188,13 +188,10 @@ distribute: .include .if ${TARGET_ENDIANNESS} == "1234" CAP_MKDB_ENDIAN?= -l -PWD_MKDB_ENDIAN?= -L .elif ${TARGET_ENDIANNESS} == "4321" CAP_MKDB_ENDIAN?= -b -PWD_MKDB_ENDIAN?= -B .else CAP_MKDB_ENDIAN?= -PWD_MKDB_ENDIAN?= .endif .if defined(NO_ROOT) @@ -220,8 +217,7 @@ distribution: .if ${MK_TCSH} == "no" sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd .endif - pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \ - ${DESTDIR}/etc/master.passwd + pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd .if defined(NO_ROOT) ( \ echo "./etc/login.conf.db type=file mode=0644 uname=root gname=wheel"; \ From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 08:09:06 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06136749; Thu, 4 Jun 2015 08:09:06 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B2E31506; Thu, 4 Jun 2015 08:09:05 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wiga1 with SMTP id a1so39066035wig.0; Thu, 04 Jun 2015 01:09:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=A24LIapDc5LEUiLSbBlt07TteVbvl1nxJlp3ej99a9w=; b=al0yO6JbewQa1Sd1rIp3TwWA2gPXbYrfE4lNFBKFgAqJTWPNe+zpJJBT+5iFTX4flb y9X6QKGQkfPOTwmIwoZXeYqYF1+hBXWiUDw0Tmu4qwvI8o5lXGfK5rF0j44InbEw97zu crYW+h1da32iaHvbocdq2jtZvqnPOnUcWBopcZAVS+K6L9qQ8fz+NrH0wzLygcfDHidk BO5k/EdovCUS5YGPNgDtj3M6CrA1KtXxT34M8mrJHX6i6OeZW8BTkOKgl3Gj95xhtmfA md5ZGGjdLeKFZ2BaX3rI7rtxdQOyCtkNW/905Whk6zveKZWiEi1sa9Syva3lW6jjACSQ HuJg== X-Received: by 10.180.215.101 with SMTP id oh5mr5450843wic.6.1433405343968; Thu, 04 Jun 2015 01:09:03 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id y19sm5137939wia.15.2015.06.04.01.09.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Jun 2015 01:09:01 -0700 (PDT) Sender: Baptiste Daroussin Date: Thu, 4 Jun 2015 10:08:59 +0200 From: Baptiste Daroussin To: Xin Li Cc: d@delphij.net, Sergey Kandaurov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, nectar@FreeBSD.org Subject: Re: svn commit: r283969 - head/lib/libutil Message-ID: <20150604080858.GA1832@ivaldir.etoilebsd.net> References: <201506032048.t53KmSCf074619@svn.freebsd.org> <20150603215841.GF32562@ivaldir.etoilebsd.net> <556F8322.9050602@delphij.net> <20150604052120.GH32562@ivaldir.etoilebsd.net> <557003DA.9090205@delphij.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="T4sUOijqQbZv57TR" Content-Disposition: inline In-Reply-To: <557003DA.9090205@delphij.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 08:09:06 -0000 --T4sUOijqQbZv57TR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 04, 2015 at 12:52:58AM -0700, Xin Li wrote: >=20 >=20 > On 6/3/15 22:21, Baptiste Daroussin wrote: > > On Wed, Jun 03, 2015 at 03:43:46PM -0700, Xin Li wrote: > >> On 06/03/15 14:58, Baptiste Daroussin wrote: > >>> On Thu, Jun 04, 2015 at 12:51:46AM +0300, Sergey Kandaurov > >>> wrote: > >>>> On 3 June 2015 at 23:48, Baptiste Daroussin > >>>> wrote: > >>>>> Author: bapt Date: Wed Jun 3 20:48:28 2015 New Revision:=20 > >>>>> 283969 URL: > >>>>> https://svnweb.freebsd.org/changeset/base/283969 > >>>>>=20 > >>>>> Log: Add a pw_mkdb2(3) function which does the same thing > >>>>> as pw_mkdb(3) except it takes a new argument allowing to > >>>>> specify the endianness of the database to generate > >>>>>=20 > >>>>=20 > >>>> Why not change pw_mkdb()? Is it used outside of the project? > >>>>=20 > >>> Because that would change the ABI of libutil and it is not a=20 > >>> private library aka we are supposed to maintain ABI > >>> compatibility as we do not know if it is used or not externally > >>> to the project. I care about the ABI because I have made this > >>> change in order to use it in pw(8) and MFC it to stable/10 > >>> before 10.2. > >>>=20 > >>> libutil is not versionned so this is the only way to not break > >>> the ABI. Except if someone has a better idea than I do. > >>=20 > >> Looking at r113596, pwd_mkdb(8) was changed to generate both > >> legacy (version 3, endianness sensitive) and new (version 4, > >> machine independent) formats. > >>=20 > >> Now, after 12 years, is it still sensible to generate legacy > >> format db entries? Maybe we should just disable the generation > >> by default and eventually remove the ability to generate them? > >>=20 > >=20 > > That could be an option, in this case we could add a -l (legacy) > > option to pwd_mkdb to allow the users to generate the db in legacy > > format and drop support support for legacy format in all other > > tools. Meaning I can revert pw_mkdb2(3) >=20 > Well, I think the pw_mkdb2(3) should be reverted, because the base > system libraries are not using the legacy format when new formatted > entries are present (which is true for databases generated on FreeBSD > 5+); and if they do, that shall be seen as a bug and we should fix > these libraries. >=20 > I have committed r283981-r283983 to implement the default change and > the -l option. >=20 done, thank you! Bapt --T4sUOijqQbZv57TR Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlVwB5oACgkQ8kTtMUmk6ExTWgCgoVXuu1hJui9ADtOuPaDR38Wi bW8Anj7z++CJVQoLe0gDlf4oDvsVkevi =6Mo0 -----END PGP SIGNATURE----- --T4sUOijqQbZv57TR-- From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 08:11:59 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDF7E92A; Thu, 4 Jun 2015 08:11:59 +0000 (UTC) (envelope-from delphij@delphij.net) 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 D65F81709; Thu, 4 Jun 2015 08:11:59 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from Xins-MBP.home.us.delphij.net (c-71-202-112-39.hsd1.ca.comcast.net [71.202.112.39]) (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 692A317E76; Thu, 4 Jun 2015 01:11:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1433405519; x=1433419919; bh=ZZf7m3IiRxAJYOYe/ivgWuoAQY6l+7TCJJ8CYZNVfDo=; h=Date:From:To:Subject:References:In-Reply-To; b=PTMwxdhdz0M1Zm/zpUFZZw1abvqz5TS7rMGOXB0MXLfBqZAhA7xAkNIIcnUzOwDIb 9utYEagP7g0NaULM0eiYiwxNU8a313tU7sd0oQZXsbkyOTJOJyqwUFwLKCmeG0j69L SPGJ84HV50LJglwXAikxUgXkCOmhnpG/CEqCn+uA= Message-ID: <5570084E.6060809@delphij.net> Date: Thu, 04 Jun 2015 01:11:58 -0700 From: Xin Li User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283985 - head/etc References: <201506040805.t5485iYf010644@svn.freebsd.org> In-Reply-To: <201506040805.t5485iYf010644@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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 08:12:00 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 6/4/15 01:05, Baptiste Daroussin wrote: > Author: bapt Date: Thu Jun 4 08:05:44 2015 New Revision: 283985 > URL: https://svnweb.freebsd.org/changeset/base/283985 > > Log: After r283981 it is no more needed to specify endianness when > generating the passwd database Thanks! Cheers, -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJVcAhNAAoJEJW2GBstM+ns53UP/AjxAY4vzjM8ZsBh+GkxjTht ePJtOF5SnCsG6ATQQ7x9zr+55Uwq9qidbaIbkf9V+3I8N5VPoOSbHmRHvj7aFRd3 IivJzO+WE4tSFfUbJcz6NaEtOAu0qUEsh4si/lD7LyFUhIxRsIi9wxVXZr/U5ZbS 8QC4iRsSCBAGBc+sWsaG0iwJPzaHKSJkHGTXUqXA8mpuko1SM0htNriX/bdb856V qMFmCnLScEKd7JiOx7ndbXT5PGdDVTr3U2hvKDX4gx3II9yg4BZlBGGz1HFvcKno WAwPng3hKe+KHEhVbDZri5rngwUn0ZitGBFKxOXjPPpEJr/+yGybchM3mAA8N3gh BRSrOzAsf+Q9LC530tmbU/neMm9Dh2i2OYNeeyoy8S01D71H54kBSY0J/82WEI91 sxCtFzPIEJjezOxqeK4d1YUwCKzWT9ISbsfsgmnLcx8dKEkGIHfnwJClic5szoE/ 1dSz6CA1HmNAOA/7TegU1UfqIqwK2C4QFjtSzzmmiZvncv7MmMYiZdZUZ5eHTp7w yuiAG3GpYBaEcJYlsakIE06JQx+ktS1PswHSGY2TiLIIEIyuAPcYPMH8mY+EtjoI nEzfIQB/pwyo+T3bTLzAKnHnvdY+Cp4uXezh1s0Of/zkYrpNjOhj6zOLM5axwiT4 Mpv1SFb02rx2zmX9PEze =AyfO -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 08:29:44 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5E1AD84; Thu, 4 Jun 2015 08:29:44 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x22b.google.com (mail-qk0-x22b.google.com [IPv6:2607:f8b0:400d:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A2EF119B4; Thu, 4 Jun 2015 08:29:44 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qkx62 with SMTP id 62so20114314qkx.3; Thu, 04 Jun 2015 01:29:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Za5sZL92fz6NlQeBu9dcAVrigordperovlrhYV+GimI=; b=asdXgeVIEqOSj2Lq+E+5U6RgTzoo7DeklJEGpVI5phR1HW1KUoxN4e9e+04a1yRhlr 3YEacffw4ZGkNVMWJXJMatEzcdvrtk7s0z9m+wXQzyTi1geiP2WejFSymEa9Dj/PwE3O Bq5H6ix9id9lRkDfkKJT3VVFdKd5pF+d5t09BXaSafcKhvI7iwt3LL9TP6Q63oRnAQIu myaRKBR3oT04gk170VfRx3LQLKJycwrrLGX53umOIrCyclUgj4NM6rW7nmNvxJEwJtTs mILbIcNxTDNdtIEU4b2GyHWd6Zh4Ogn6nxXo0MhvydbNVONF58Jet9GcdtiNfOQFTJ6u z/Mg== MIME-Version: 1.0 X-Received: by 10.140.108.195 with SMTP id j61mr41368489qgf.83.1433406583808; Thu, 04 Jun 2015 01:29:43 -0700 (PDT) Received: by 10.140.98.73 with HTTP; Thu, 4 Jun 2015 01:29:43 -0700 (PDT) In-Reply-To: <20150604074152.GZ2499@kib.kiev.ua> References: <201506040244.t542ibW9051338@svn.freebsd.org> <20150604074152.GZ2499@kib.kiev.ua> Date: Thu, 4 Jun 2015 01:29:43 -0700 Message-ID: Subject: Re: svn commit: r283974 - head/lib/libugidfw From: NGie Cooper To: Konstantin Belousov Cc: Marcelo Araujo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 08:29:45 -0000 On Thu, Jun 4, 2015 at 12:41 AM, Konstantin Belousov wrote: ... >> - size = sizeof(rule); >> error = sysctl(name, len, NULL, NULL, &rule, 0); > This is very strange chunk. I suspect that the intent was to have 'size' > as the sixth argument to the sysctl(3) call, or just have sizeof(rule) > instead of 0. Agreed. From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 10:18:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CC86426; Thu, 4 Jun 2015 10:18:04 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-ob0-x236.google.com (mail-ob0-x236.google.com [IPv6:2607:f8b0:4003:c01::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E32DE14CF; Thu, 4 Jun 2015 10:18:03 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by obew15 with SMTP id w15so29163508obe.1; Thu, 04 Jun 2015 03:18:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=Wf5TTIR1flZORLtbOtK4GcS8RD4CaEv6pQEu59RbpYU=; b=mutnVuEf3yYPH00UOHf6sEGdQYzQYUymAbPGzoVV3jMVPAW2a78iVCwLx89KBRiXqv moMWZRw+WidE9nk2vNjTb97IOq+ryRIxjeSEJxBdBanWzpgjqeAVDqfCUHIKRka+ovo+ +x/TB1iTBA1mY2LwtRP3C8yw3a4YzQmyGW6Q0l+04SEPw2qGAxPR8IANxBOau9JFH889 fvfr+/qYf34EykULb/x84Yn4bNjk1RPmS3XOHsHfcYCQTFeOejLXc8tSA0KlQZxHuDlt YT6sHO3dskBMDAqAiRR0ZQxyWbXb/eS7zGG4voBKl/7DUAYKWV97o0qki5bcaz6Ql3yN LB0A== MIME-Version: 1.0 X-Received: by 10.182.97.138 with SMTP id ea10mr31035258obb.11.1433413083089; Thu, 04 Jun 2015 03:18:03 -0700 (PDT) Received: by 10.202.11.193 with HTTP; Thu, 4 Jun 2015 03:18:03 -0700 (PDT) Reply-To: araujo@FreeBSD.org In-Reply-To: References: <201506040244.t542ibW9051338@svn.freebsd.org> <20150604074152.GZ2499@kib.kiev.ua> Date: Thu, 4 Jun 2015 18:18:03 +0800 Message-ID: Subject: Re: svn commit: r283974 - head/lib/libugidfw From: Marcelo Araujo To: NGie Cooper Cc: Konstantin Belousov , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 10:18:04 -0000 2015-06-04 16:29 GMT+08:00 NGie Cooper : > On Thu, Jun 4, 2015 at 12:41 AM, Konstantin Belousov > wrote: > ... > >> - size = sizeof(rule); > >> error = sysctl(name, len, NULL, NULL, &rule, 0); > > This is very strange chunk. I suspect that the intent was to have 'size' > > as the sixth argument to the sysctl(3) call, or just have sizeof(rule) > > instead of 0. > > Agreed. > Agreed too, I have open another review request, because I have double check and there are some missing prototypes too. Best, -- -- Marcelo Araujo (__)araujo@FreeBSD.org \\\'',)http://www.FreeBSD.org \/ \ ^ Power To Server. .\. /_) From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 10:55:37 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 18181E08; Thu, 4 Jun 2015 10:55:37 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 044BB1E7D; Thu, 4 Jun 2015 10:55:37 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t54Ataub097446; Thu, 4 Jun 2015 10:55:36 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t54AtaUD097445; Thu, 4 Jun 2015 10:55:36 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201506041055.t54AtaUD097445@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 4 Jun 2015 10:55:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283986 - head/sys/net80211 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 10:55:37 -0000 Author: andrew Date: Thu Jun 4 10:55:36 2015 New Revision: 283986 URL: https://svnweb.freebsd.org/changeset/base/283986 Log: Fix the build by hiding ieee80211_add_xmit_params and ieee80211_get_xmit_params from userspace. Modified: head/sys/net80211/ieee80211_freebsd.h Modified: head/sys/net80211/ieee80211_freebsd.h ============================================================================== --- head/sys/net80211/ieee80211_freebsd.h Thu Jun 4 08:05:44 2015 (r283985) +++ head/sys/net80211/ieee80211_freebsd.h Thu Jun 4 10:55:36 2015 (r283986) @@ -610,6 +610,7 @@ struct ieee80211_bpf_params { uint8_t ibp_rate3; /* series 4 IEEE tx rate */ }; +#ifdef _KERNEL struct ieee80211_tx_params { struct ieee80211_bpf_params params; }; @@ -617,6 +618,7 @@ int ieee80211_add_xmit_params(struct mbu const struct ieee80211_bpf_params *); int ieee80211_get_xmit_params(struct mbuf *m, struct ieee80211_bpf_params *); +#endif /* _KERNEL */ /* * Malloc API. Other BSD operating systems have slightly From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 12:35:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 655B9513; Thu, 4 Jun 2015 12:35:01 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5286F182C; Thu, 4 Jun 2015 12:35:01 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t54CZ15E048415; Thu, 4 Jun 2015 12:35:01 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t54CZ1dJ048413; Thu, 4 Jun 2015 12:35:01 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201506041235.t54CZ1dJ048413@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 4 Jun 2015 12:35: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: r283987 - stable/10/sys/fs/nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 12:35:01 -0000 Author: rmacklem Date: Thu Jun 4 12:35:00 2015 New Revision: 283987 URL: https://svnweb.freebsd.org/changeset/base/283987 Log: MFC: r283273 The NFS client wasn't handling getdirentries(2) requests for sizes that are not an exact multiple of DIRBLKSIZ correctly. Fortunately readdir(3) always uses an exact multiple of DIRBLKSIZ, so few applications were affected. This patch fixes this problem by reducing the size of the directory read to an exact multiple of DIRBLKSIZ. Modified: stable/10/sys/fs/nfsclient/nfs_clvnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clvnops.c Thu Jun 4 10:55:36 2015 (r283986) +++ stable/10/sys/fs/nfsclient/nfs_clvnops.c Thu Jun 4 12:35:00 2015 (r283987) @@ -2211,7 +2211,7 @@ nfs_readdir(struct vop_readdir_args *ap) struct vnode *vp = ap->a_vp; struct nfsnode *np = VTONFS(vp); struct uio *uio = ap->a_uio; - ssize_t tresid; + ssize_t tresid, left; int error = 0; struct vattr vattr; @@ -2240,6 +2240,17 @@ nfs_readdir(struct vop_readdir_args *ap) } /* + * NFS always guarantees that directory entries don't straddle + * DIRBLKSIZ boundaries. As such, we need to limit the size + * to an exact multiple of DIRBLKSIZ, to avoid copying a partial + * directory entry. + */ + left = uio->uio_resid % DIRBLKSIZ; + if (left == uio->uio_resid) + return (EINVAL); + uio->uio_resid -= left; + + /* * Call ncl_bioread() to do the real work. */ tresid = uio->uio_resid; @@ -2250,6 +2261,9 @@ nfs_readdir(struct vop_readdir_args *ap) if (ap->a_eofflag != NULL) *ap->a_eofflag = 1; } + + /* Add the partial DIRBLKSIZ (left) back in. */ + uio->uio_resid += left; return (error); } From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 12:46:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1EFF3A27; Thu, 4 Jun 2015 12:46:58 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C7911ACC; Thu, 4 Jun 2015 12:46:58 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t54CkvNs053895; Thu, 4 Jun 2015 12:46:57 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t54CkvAw053893; Thu, 4 Jun 2015 12:46:57 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201506041246.t54CkvAw053893@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 4 Jun 2015 12:46:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283988 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 12:46:58 -0000 Author: tuexen Date: Thu Jun 4 12:46:56 2015 New Revision: 283988 URL: https://svnweb.freebsd.org/changeset/base/283988 Log: Export a pointer to the SCTP socket. This is needed to add SCTP support to sockstat. MFC after: 3 days Modified: head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_uio.h Modified: head/sys/netinet/sctp_sysctl.c ============================================================================== --- head/sys/netinet/sctp_sysctl.c Thu Jun 4 12:35:00 2015 (r283987) +++ head/sys/netinet/sctp_sysctl.c Thu Jun 4 12:46:56 2015 (r283988) @@ -418,6 +418,7 @@ sctp_sysctl_handle_assoclist(SYSCTL_HAND xinpcb.total_recvs = inp->total_recvs; xinpcb.total_nospaces = inp->total_nospaces; xinpcb.fragmentation_point = inp->sctp_frag_point; + xinpcb.socket = inp->sctp_socket; so = inp->sctp_socket; if ((so == NULL) || (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE)) { Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Thu Jun 4 12:35:00 2015 (r283987) +++ head/sys/netinet/sctp_uio.h Thu Jun 4 12:46:56 2015 (r283988) @@ -1165,7 +1165,12 @@ struct xsctp_inpcb { uint16_t local_port; uint16_t qlen; uint16_t maxqlen; - uint32_t extra_padding[31]; /* future */ + void *socket; +#if defined(__LP64__) + uint32_t extra_padding[29]; /* future */ +#else + uint32_t extra_padding[30]; /* future */ +#endif }; struct xsctp_tcb { From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 15:02:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7008B2E; Thu, 4 Jun 2015 15:02:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C52A01C9C; Thu, 4 Jun 2015 15:02:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t54F25iP023267; Thu, 4 Jun 2015 15:02:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t54F25T3023266; Thu, 4 Jun 2015 15:02:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201506041502.t54F25T3023266@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 4 Jun 2015 15:02:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283989 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 15:02:05 -0000 Author: gjb Date: Thu Jun 4 15:02:05 2015 New Revision: 283989 URL: https://svnweb.freebsd.org/changeset/base/283989 Log: Re-implement endian-aware services_mkdb(8) in the 'distribute' target. This effectively reverts r261142, which reverted both r261031 and r261044. Prodded by: jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/etc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Thu Jun 4 12:46:56 2015 (r283988) +++ head/etc/Makefile Thu Jun 4 15:02:05 2015 (r283989) @@ -207,6 +207,8 @@ distribution: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${BIN1} ${DESTDIR}/etc; \ cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \ + services_mkdb ${CAP_MKDB_ENDIAN} -q -o ${DESTDIR}/var/db/services.db \ + ${DESTDIR}/etc/services; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \ ${BIN2} ${DESTDIR}/etc; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 15:04:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36A57C9C; Thu, 4 Jun 2015 15:04:39 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x231.google.com (mail-ig0-x231.google.com [IPv6:2607:f8b0:4001:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F3CAD1CBA; Thu, 4 Jun 2015 15:04:38 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igbsb11 with SMTP id sb11so41504446igb.0; Thu, 04 Jun 2015 08:04:38 -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=ksZoKjHn38M23/tfbvoElvboZlqfpVVCF3Xs3KZ20B4=; b=lcA/8EaZHqsmXU63bik9BfHSfTmnpi//BjPwhJdMtH9SDxawvQCK8gY/05IogY5U2m YsApWTh+6FrzQPeIy3SxocIIy4lwHskIZ2b/Gjp2SqobOoFyCm7H9hINfWeGSFKk4ile 6IF/mzq0FtnjQYrfT+o+66lCtdc2OhFVhm9DHGCO2zAfmFowqYTN+/bl5+ujE/OQUyrI cWm9tRwDNVQDbyqxjlT1CHy91AEZFFHClHoFMp3PMzefG38XbZlPcZbdRVf71U/Wg2GV 8uOftoOjkUnyakTIbgiHQYK0KucKwsTz0YKyxyO2gupHp0VAbMLT7cWh3hS2LYdRbYZq TbuQ== MIME-Version: 1.0 X-Received: by 10.107.5.210 with SMTP id 201mr46988215iof.88.1433430278224; Thu, 04 Jun 2015 08:04:38 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.38.133 with HTTP; Thu, 4 Jun 2015 08:04:38 -0700 (PDT) In-Reply-To: <201506041055.t54AtaUD097445@svn.freebsd.org> References: <201506041055.t54AtaUD097445@svn.freebsd.org> Date: Thu, 4 Jun 2015 08:04:38 -0700 X-Google-Sender-Auth: 2wII6_zvZKeCJPOughm8B0cCqPI Message-ID: Subject: Re: svn commit: r283986 - head/sys/net80211 From: Adrian Chadd To: Andrew Turner Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 15:04:39 -0000 oops, sorry! Thanks Andrew! -a On 4 June 2015 at 03:55, Andrew Turner wrote: > Author: andrew > Date: Thu Jun 4 10:55:36 2015 > New Revision: 283986 > URL: https://svnweb.freebsd.org/changeset/base/283986 > > Log: > Fix the build by hiding ieee80211_add_xmit_params and > ieee80211_get_xmit_params from userspace. > > Modified: > head/sys/net80211/ieee80211_freebsd.h > > Modified: head/sys/net80211/ieee80211_freebsd.h > ============================================================================== > --- head/sys/net80211/ieee80211_freebsd.h Thu Jun 4 08:05:44 2015 (r283985) > +++ head/sys/net80211/ieee80211_freebsd.h Thu Jun 4 10:55:36 2015 (r283986) > @@ -610,6 +610,7 @@ struct ieee80211_bpf_params { > uint8_t ibp_rate3; /* series 4 IEEE tx rate */ > }; > > +#ifdef _KERNEL > struct ieee80211_tx_params { > struct ieee80211_bpf_params params; > }; > @@ -617,6 +618,7 @@ int ieee80211_add_xmit_params(struct mbu > const struct ieee80211_bpf_params *); > int ieee80211_get_xmit_params(struct mbuf *m, > struct ieee80211_bpf_params *); > +#endif /* _KERNEL */ > > /* > * Malloc API. Other BSD operating systems have slightly > From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 16:27:24 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CF67D5E; Thu, 4 Jun 2015 16:27:24 +0000 (UTC) (envelope-from slm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48B31103F; Thu, 4 Jun 2015 16:27:24 +0000 (UTC) (envelope-from slm@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t54GROA5063641; Thu, 4 Jun 2015 16:27:24 GMT (envelope-from slm@FreeBSD.org) Received: (from slm@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t54GRJB1063616; Thu, 4 Jun 2015 16:27:19 GMT (envelope-from slm@FreeBSD.org) Message-Id: <201506041627.t54GRJB1063616@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: slm set sender to slm@FreeBSD.org using -f From: Stephen McConnell Date: Thu, 4 Jun 2015 16:27:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283990 - in stable/10/sys/dev/mpr: . mpi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 16:27:24 -0000 Author: slm Date: Thu Jun 4 16:27:18 2015 New Revision: 283990 URL: https://svnweb.freebsd.org/changeset/base/283990 Log: MFC: r283661 - Updated all files with 2015 Avago copyright, and updated LSI's copyright dates. - Changed all of the PCI device strings from LSI to Avago Technologies (LSI). - Added a sysctl variable to control how StartStopUnit behavior works. User can select to spin down disks based on if disk is SSD or HDD. - Inquiry data is required to tell if a disk will support SSU at shutdown or not. Due to the addition of mprssas_async, which gets Advanced Info but not Inquiry data, the setting of supports_SSU was moved to the mprsas_scsiio_complete function, which snoops for any Inquiry commands. And, since disks are shutdown as a target and not a LUN, this process was simplified by basing it on targets and not LUNs. - Added a sysctl variable that sets the amount of time to retry after sending a failed SATA ID command. This helps with some bad disks and large disks that require a lot of time to spin up. Part of this change was to add a callout to handle timeouts with the SATA ID command. The callout function is called mprsas_ata_id_timeout(). (Fixes PR 191348) - Changed the way resets work by allowing I/O to continue to devices that are not currently under a reset condition. This uses devq's instead of simq's and makes use of the MPSSAS_TARGET_INRESET flag. This change also adds a function called mprsas_prepare_tm(). - Some changes were made to reduce code duplication when getting a SAS address for a SATA disk. - Fixed some formatting and whitespace. - Bump version of mpr driver to 9.255.01.00-fbsd PR: 191348 Modified: stable/10/sys/dev/mpr/mpi/mpi2.h stable/10/sys/dev/mpr/mpi/mpi2_cnfg.h stable/10/sys/dev/mpr/mpi/mpi2_hbd.h stable/10/sys/dev/mpr/mpi/mpi2_history.txt stable/10/sys/dev/mpr/mpi/mpi2_init.h stable/10/sys/dev/mpr/mpi/mpi2_ioc.h stable/10/sys/dev/mpr/mpi/mpi2_ra.h stable/10/sys/dev/mpr/mpi/mpi2_raid.h stable/10/sys/dev/mpr/mpi/mpi2_sas.h stable/10/sys/dev/mpr/mpi/mpi2_targ.h stable/10/sys/dev/mpr/mpi/mpi2_tool.h stable/10/sys/dev/mpr/mpi/mpi2_type.h stable/10/sys/dev/mpr/mpr.c stable/10/sys/dev/mpr/mpr_config.c stable/10/sys/dev/mpr/mpr_ioctl.h stable/10/sys/dev/mpr/mpr_mapping.c stable/10/sys/dev/mpr/mpr_mapping.h stable/10/sys/dev/mpr/mpr_pci.c stable/10/sys/dev/mpr/mpr_sas.c stable/10/sys/dev/mpr/mpr_sas.h stable/10/sys/dev/mpr/mpr_sas_lsi.c stable/10/sys/dev/mpr/mpr_user.c stable/10/sys/dev/mpr/mprvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mpr/mpi/mpi2.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +27,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2013 LSI Corporation. + * Copyright (c) 2000-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2.h Modified: stable/10/sys/dev/mpr/mpi/mpi2_cnfg.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_cnfg.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2_cnfg.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +27,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2013 LSI Corporation. + * Copyright (c) 2000-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_cnfg.h Modified: stable/10/sys/dev/mpr/mpi/mpi2_hbd.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_hbd.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2_hbd.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +27,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2009-2011 LSI Corporation. + * Copyright (c) 2009-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_hbd.h Modified: stable/10/sys/dev/mpr/mpi/mpi2_history.txt ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_history.txt Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2_history.txt Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ @@ -35,7 +36,8 @@ Fusion-MPT MPI 2.0 / 2.5 Header File Change History ============================== - Copyright (c) 2000-2013 LSI Corporation. + Copyright (c) 2000-2015 LSI Corporation. + Copyright (c) 2013-2015 Avago Technologies --------------------------------------- Header Set Release Version: 02.00.33 Modified: stable/10/sys/dev/mpr/mpi/mpi2_init.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_init.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2_init.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +27,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2013 LSI Corporation. + * Copyright (c) 2000-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_init.h Modified: stable/10/sys/dev/mpr/mpi/mpi2_ioc.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_ioc.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2_ioc.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +27,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2013 LSI Corporation. + * Copyright (c) 2000-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_ioc.h Modified: stable/10/sys/dev/mpr/mpi/mpi2_ra.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_ra.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2_ra.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +27,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2009 LSI Corporation. + * Copyright (c) 2012-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_ra.h Modified: stable/10/sys/dev/mpr/mpi/mpi2_raid.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_raid.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2_raid.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +27,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2013 LSI Corporation. + * Copyright (c) 2000-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_raid.h Modified: stable/10/sys/dev/mpr/mpi/mpi2_sas.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_sas.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2_sas.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +27,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2013 LSI Corporation. + * Copyright (c) 2000-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_sas.h Modified: stable/10/sys/dev/mpr/mpi/mpi2_targ.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_targ.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2_targ.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +27,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2012 LSI Corporation. + * Copyright (c) 2000-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_targ.h Modified: stable/10/sys/dev/mpr/mpi/mpi2_tool.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_tool.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2_tool.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +27,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2013 LSI Corporation. + * Copyright (c) 2000-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_tool.h Modified: stable/10/sys/dev/mpr/mpi/mpi2_type.h ============================================================================== --- stable/10/sys/dev/mpr/mpi/mpi2_type.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpi/mpi2_type.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2013 LSI Corp. + * Copyright (c) 2012-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,13 +27,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ /* - * Copyright (c) 2000-2007 LSI Corporation. + * Copyright (c) 2000-2015 LSI Corporation. + * Copyright (c) 2013-2015 Avago Technologies * * * Name: mpi2_type.h Modified: stable/10/sys/dev/mpr/mpr.c ============================================================================== --- stable/10/sys/dev/mpr/mpr.c Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpr.c Thu Jun 4 16:27:18 2015 (r283990) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2009 Yahoo! Inc. - * Copyright (c) 2012-2014 LSI Corp. + * Copyright (c) 2011-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,12 +25,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD + * */ #include __FBSDID("$FreeBSD$"); -/* Communications core for LSI MPT2 */ +/* Communications core for Avago Technologies (LSI) MPT3 */ /* TODO Move headers to mprvar */ #include @@ -72,7 +75,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include static int mpr_diag_reset(struct mpr_softc *sc, int sleep_flag); static int mpr_init_queues(struct mpr_softc *sc); @@ -352,11 +354,9 @@ mpr_transition_operational(struct mpr_so static int mpr_iocfacts_allocate(struct mpr_softc *sc, uint8_t attaching) { - int error, i; + int error; Mpi2IOCFactsReply_t saved_facts; uint8_t saved_mode, reallocating; - struct mprsas_lun *lun, *lun_tmp; - struct mprsas_target *targ; mpr_dprint(sc, MPR_TRACE, "%s\n", __func__); @@ -513,27 +513,7 @@ mpr_iocfacts_allocate(struct mpr_softc * */ if (reallocating) { mpr_iocfacts_free(sc); - - /* - * The number of targets is based on IOC Facts, so free all of - * the allocated LUNs for each target and then the target buffer - * itself. - */ - for (i=0; i< saved_facts.MaxTargets; i++) { - targ = &sc->sassc->targets[i]; - SLIST_FOREACH_SAFE(lun, &targ->luns, lun_link, - lun_tmp) { - free(lun, M_MPR); - } - } - free(sc->sassc->targets, M_MPR); - - sc->sassc->targets = malloc(sizeof(struct mprsas_target) * - sc->facts->MaxTargets, M_MPR, M_WAITOK|M_ZERO); - if (!sc->sassc->targets) { - panic("%s failed to alloc targets with error %d\n", - __func__, ENOMEM); - } + mprsas_realloc_targets(sc, saved_facts.MaxTargets); } /* @@ -775,7 +755,7 @@ mpr_reinit(struct mpr_softc *sc) /* the end of discovery will release the simq, so we're done. */ mpr_dprint(sc, MPR_INFO, "%s finished sc %p post %u free %u\n", __func__, sc, sc->replypostindex, sc->replyfreeindex); - mprsas_release_simq_reinit(sassc); + mprsas_release_simq_reinit(sassc); return 0; } @@ -816,7 +796,8 @@ mpr_wait_db_ack(struct mpr_softc *sc, in * 0.5 milisecond */ if (mtx_owned(&sc->mpr_mtx) && sleep_flag == CAN_SLEEP) - msleep(&sc->msleep_fake_chan, &sc->mpr_mtx, 0, "mprdba", hz/1000); + msleep(&sc->msleep_fake_chan, &sc->mpr_mtx, 0, "mprdba", + hz/1000); else if (sleep_flag == CAN_SLEEP) pause("mprdba", hz/1000); else @@ -982,7 +963,7 @@ mpr_enqueue_request(struct mpr_softc *sc reply_descriptor rd; MPR_FUNCTRACE(sc); - mpr_dprint(sc, MPR_TRACE, "%s SMID %u cm %p ccb %p\n", __func__, + mpr_dprint(sc, MPR_TRACE, "SMID %u cm %p ccb %p\n", cm->cm_desc.Default.SMID, cm, cm->cm_ccb); if (sc->mpr_flags & MPR_FLAGS_ATTACH_DONE && !(sc->mpr_flags & @@ -1372,6 +1353,8 @@ mpr_get_tunables(struct mpr_softc *sc) sc->disable_msix = 0; sc->disable_msi = 0; sc->max_chains = MPR_CHAIN_FRAMES; + sc->enable_ssu = MPR_SSU_ENABLE_SSD_DISABLE_HDD; + sc->spinup_wait_time = DEFAULT_SPINUP_WAIT; /* * Grab the global variables. @@ -1380,6 +1363,8 @@ mpr_get_tunables(struct mpr_softc *sc) TUNABLE_INT_FETCH("hw.mpr.disable_msix", &sc->disable_msix); TUNABLE_INT_FETCH("hw.mpr.disable_msi", &sc->disable_msi); TUNABLE_INT_FETCH("hw.mpr.max_chains", &sc->max_chains); + TUNABLE_INT_FETCH("hw.mpr.enable_ssu", &sc->enable_ssu); + TUNABLE_INT_FETCH("hw.mpr.spinup_wait_time", &sc->spinup_wait_time); /* Grab the unit-instance variables */ snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.debug_level", @@ -1402,6 +1387,14 @@ mpr_get_tunables(struct mpr_softc *sc) snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.exclude_ids", device_get_unit(sc->mpr_dev)); TUNABLE_STR_FETCH(tmpstr, sc->exclude_ids, sizeof(sc->exclude_ids)); + + snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.enable_ssu", + device_get_unit(sc->mpr_dev)); + TUNABLE_INT_FETCH(tmpstr, &sc->enable_ssu); + + snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.spinup_wait_time", + device_get_unit(sc->mpr_dev)); + TUNABLE_INT_FETCH(tmpstr, &sc->spinup_wait_time); } static void @@ -1474,11 +1467,20 @@ mpr_setup_sysctl(struct mpr_softc *sc) OID_AUTO, "max_chains", CTLFLAG_RD, &sc->max_chains, 0,"maximum chain frames that will be allocated"); + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "enable_ssu", CTLFLAG_RW, &sc->enable_ssu, 0, + "enable SSU to SATA SSD/HDD at shutdown"); + #if __FreeBSD_version >= 900030 SYSCTL_ADD_UQUAD(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "chain_alloc_fail", CTLFLAG_RD, &sc->chain_alloc_fail, "chain allocation failures"); #endif //FreeBSD_version >= 900030 + + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "spinup_wait_time", CTLFLAG_RD, + &sc->spinup_wait_time, DEFAULT_SPINUP_WAIT, "seconds to wait for " + "spinup after SATA ID error"); } int @@ -2096,7 +2098,7 @@ mpr_update_events(struct mpr_softc *sc, (reply->IOCStatus & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) error = ENXIO; - if(reply) + if (reply) mpr_print_event(sc, reply); mpr_dprint(sc, MPR_TRACE, "%s finished error %d\n", __func__, error); @@ -2163,8 +2165,8 @@ mpr_deregister_events(struct mpr_softc * * Add a chain element as the next SGE for the specified command. * Reset cm_sge and cm_sgesize to indicate all the available space. Chains are * only required for IEEE commands. Therefore there is no code for commands - * that have the MPR_CM_FLAGS_SGE_SIMPLE flag set (and those commands shouldn't - * be requesting chains). + * that have the MPR_CM_FLAGS_SGE_SIMPLE flag set (and those commands + * shouldn't be requesting chains). */ static int mpr_add_chain(struct mpr_command *cm, int segsleft) @@ -2246,9 +2248,9 @@ mpr_add_chain(struct mpr_command *cm, in /* * Add one scatter-gather element to the scatter-gather list for a command. - * Maintain cm_sglsize and cm_sge as the remaining size and pointer to the next - * SGE to fill in, respectively. In Gen3, the MPI SGL does not have a chain, - * so don't consider any chain additions. + * Maintain cm_sglsize and cm_sge as the remaining size and pointer to the + * next SGE to fill in, respectively. In Gen3, the MPI SGL does not have a + * chain, so don't consider any chain additions. */ int mpr_push_sge(struct mpr_command *cm, MPI2_SGE_SIMPLE64 *sge, size_t len, @@ -2660,7 +2662,7 @@ mpr_request_polled(struct mpr_softc *sc, } } - if(error) { + if (error) { mpr_dprint(sc, MPR_FAULT, "Calling Reinit from %s\n", __func__); rc = mpr_reinit(sc); mpr_dprint(sc, MPR_FAULT, "Reinit %s\n", (rc == 0) ? @@ -2717,9 +2719,12 @@ mpr_read_config_page(struct mpr_softc *s cm->cm_data = params->buffer; cm->cm_length = params->length; - cm->cm_sge = &req->PageBufferSGE; - cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); - cm->cm_flags = MPR_CM_FLAGS_SGE_SIMPLE | MPR_CM_FLAGS_DATAIN; + if (cm->cm_data != NULL) { + cm->cm_sge = &req->PageBufferSGE; + cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); + cm->cm_flags = MPR_CM_FLAGS_SGE_SIMPLE | MPR_CM_FLAGS_DATAIN; + } else + cm->cm_sge = NULL; cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_complete_data = params; @@ -2776,9 +2781,12 @@ mpr_config_complete(struct mpr_softc *sc goto done; } params->status = reply->IOCStatus; - if (params->hdr.Ext.ExtPageType != 0) { + if (params->hdr.Struct.PageType == MPI2_CONFIG_PAGETYPE_EXTENDED) { params->hdr.Ext.ExtPageType = reply->ExtPageType; params->hdr.Ext.ExtPageLength = reply->ExtPageLength; + params->hdr.Ext.PageType = reply->Header.PageType; + params->hdr.Ext.PageNumber = reply->Header.PageNumber; + params->hdr.Ext.PageVersion = reply->Header.PageVersion; } else { params->hdr.Struct.PageType = reply->Header.PageType; params->hdr.Struct.PageNumber = reply->Header.PageNumber; Modified: stable/10/sys/dev/mpr/mpr_config.c ============================================================================== --- stable/10/sys/dev/mpr/mpr_config.c Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpr_config.c Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2011-2014 LSI Corp. + * Copyright (c) 2011-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD */ #include Modified: stable/10/sys/dev/mpr/mpr_ioctl.h ============================================================================== --- stable/10/sys/dev/mpr/mpr_ioctl.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpr_ioctl.h Thu Jun 4 16:27:18 2015 (r283990) @@ -27,12 +27,13 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD userland interface + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD userland interface * * $FreeBSD$ */ /*- - * Copyright (c) 2011-2014 LSI Corp. + * Copyright (c) 2011-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -56,7 +57,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ Modified: stable/10/sys/dev/mpr/mpr_mapping.c ============================================================================== --- stable/10/sys/dev/mpr/mpr_mapping.c Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpr_mapping.c Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2011-2014 LSI Corp. + * Copyright (c) 2011-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD */ #include @@ -326,11 +327,13 @@ _mapping_get_high_missing_mt_idx(struct { u32 map_idx, high_idx = MPR_ENCTABLE_BAD_IDX; u8 high_missing_count = 0; - u32 start_idx, end_idx, start_idx_ir = 0, end_idx_ir; + u32 start_idx, end_idx, start_idx_ir, end_idx_ir; struct dev_mapping_table *mt_entry; u16 ioc_pg8_flags = le16toh(sc->ioc_pg8.Flags); start_idx = 0; + start_idx_ir = 0; + end_idx_ir = 0; end_idx = sc->max_devices; if (ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_RESERVED_TARGETID_0) start_idx = 1; @@ -887,14 +890,14 @@ _mapping_get_dev_info(struct mpr_softc * u16 ioc_pg8_flags = le16toh(sc->ioc_pg8.Flags); Mpi2ConfigReply_t mpi_reply; Mpi2SasDevicePage0_t sas_device_pg0; - u8 entry, enc_idx, phy_idx; + u8 entry, enc_idx, phy_idx, sata_end_device; u32 map_idx, index, device_info; struct _map_phy_change *phy_change, *tmp_phy_change; uint64_t sas_address; struct enc_mapping_table *et_entry; struct dev_mapping_table *mt_entry; u8 add_code = MPI2_EVENT_SAS_TOPO_RC_TARG_ADDED; - int rc; + int rc = 1; for (entry = 0; entry < topo_change->num_entries; entry++) { phy_change = &topo_change->phy_details[entry]; @@ -908,41 +911,36 @@ _mapping_get_dev_info(struct mpr_softc * continue; } + /* + * Always get SATA Identify information because this is used + * to determine if Start/Stop Unit should be sent to the drive + * when the system is shutdown. + */ device_info = le32toh(sas_device_pg0.DeviceInfo); - if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == - MPI2_IOCPAGE8_FLAGS_DEVICE_PERSISTENCE_MAPPING) { - if ((device_info & MPI2_SAS_DEVICE_INFO_END_DEVICE) && - (device_info & MPI2_SAS_DEVICE_INFO_SATA_DEVICE)) { - rc = mprsas_get_sas_address_for_sata_disk(sc, - &sas_address, phy_change->dev_handle, - device_info); - if (rc) { - printf("%s: failed to compute the " - "hashed SAS Address for SATA " - "device with handle 0x%04x\n", - __func__, phy_change->dev_handle); - sas_address = - sas_device_pg0.SASAddress.High; - sas_address = (sas_address << 32) | - sas_device_pg0.SASAddress.Low; - } + sas_address = sas_device_pg0.SASAddress.High; + sas_address = (sas_address << 32) | + sas_device_pg0.SASAddress.Low; + sata_end_device = 0; + if ((device_info & MPI2_SAS_DEVICE_INFO_END_DEVICE) && + (device_info & MPI2_SAS_DEVICE_INFO_SATA_DEVICE)) { + sata_end_device = 1; + rc = mprsas_get_sas_address_for_sata_disk(sc, + &sas_address, phy_change->dev_handle, device_info, + &phy_change->is_SATA_SSD); + if (rc) { + mpr_dprint(sc, MPR_ERROR, "%s: failed to get " + "disk type (SSD or HDD) and SAS Address " + "for SATA device with handle 0x%04x\n", + __func__, phy_change->dev_handle); + } else { mpr_dprint(sc, MPR_INFO, "SAS Address for SATA " "device = %jx\n", sas_address); - } else { - sas_address = - sas_device_pg0.SASAddress.High; - sas_address = (sas_address << 32) | - sas_device_pg0.SASAddress.Low; } - } else { - sas_address = sas_device_pg0.SASAddress.High; - sas_address = (sas_address << 32) | - sas_device_pg0.SASAddress.Low; } + phy_change->physical_id = sas_address; phy_change->slot = le16toh(sas_device_pg0.Slot); - phy_change->device_info = - le32toh(sas_device_pg0.DeviceInfo); + phy_change->device_info = le32toh(sas_device_pg0.DeviceInfo); if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) == MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING) { @@ -950,10 +948,10 @@ _mapping_get_dev_info(struct mpr_softc * topo_change->enc_handle); if (enc_idx == MPR_ENCTABLE_BAD_IDX) { phy_change->is_processed = 1; - printf("%s: failed to add the device with " - "handle 0x%04x because the enclosure is " - "not in the mapping table\n", __func__, - phy_change->dev_handle); + mpr_dprint(sc, MPR_MAPPING, "%s: failed to add " + "the device with handle 0x%04x because the " + "enclosure is not in the mapping table\n", + __func__, phy_change->dev_handle); continue; } if (!((phy_change->device_info & Modified: stable/10/sys/dev/mpr/mpr_mapping.h ============================================================================== --- stable/10/sys/dev/mpr/mpr_mapping.h Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpr_mapping.h Thu Jun 4 16:27:18 2015 (r283990) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2011-2014 LSI Corp. + * Copyright (c) 2011-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * LSI MPT-Fusion Host Adapter FreeBSD + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD * * $FreeBSD$ */ @@ -38,6 +39,7 @@ * @dev_handle: device handle for the device pointed by this entry * @slot: slot ID * @is_processed: Flag to indicate whether this entry is processed or not + * @is_SATA_SSD: 1 if this is a SATA device AND an SSD, 0 otherwise */ struct _map_phy_change { uint64_t physical_id; @@ -46,6 +48,8 @@ struct _map_phy_change { uint16_t slot; uint8_t reason; uint8_t is_processed; + uint8_t is_SATA_SSD; + uint8_t reserved; }; /** @@ -66,6 +70,6 @@ struct _map_topology_change { extern int mprsas_get_sas_address_for_sata_disk(struct mpr_softc *ioc, - u64 *sas_address, u16 handle, u32 device_info); + u64 *sas_address, u16 handle, u32 device_info, u8 *is_SATA_SSD); #endif Modified: stable/10/sys/dev/mpr/mpr_pci.c ============================================================================== --- stable/10/sys/dev/mpr/mpr_pci.c Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpr_pci.c Thu Jun 4 16:27:18 2015 (r283990) @@ -27,7 +27,7 @@ #include __FBSDID("$FreeBSD$"); -/* PCI/PCI-X/PCIe bus interface for the LSI MPT2 controllers */ +/* PCI/PCI-X/PCIe bus interface for the Avago Tech (LSI) MPT3 controllers */ /* TODO Move headers to mprvar */ #include @@ -99,17 +99,17 @@ struct mpr_ident { const char *desc; } mpr_identifiers[] = { { MPI2_MFGPAGE_VENDORID_LSI, MPI25_MFGPAGE_DEVID_SAS3004, - 0xffff, 0xffff, 0, "LSI SAS3004" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS3004" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI25_MFGPAGE_DEVID_SAS3008, - 0xffff, 0xffff, 0, "LSI SAS3008" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS3008" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI25_MFGPAGE_DEVID_SAS3108_1, - 0xffff, 0xffff, 0, "LSI SAS3108_1" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS3108_1" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI25_MFGPAGE_DEVID_SAS3108_2, - 0xffff, 0xffff, 0, "LSI SAS3108_2" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS3108_2" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI25_MFGPAGE_DEVID_SAS3108_5, - 0xffff, 0xffff, 0, "LSI SAS3108_5" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS3108_5" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI25_MFGPAGE_DEVID_SAS3108_6, - 0xffff, 0xffff, 0, "LSI SAS3108_6" }, + 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS3108_6" }, { 0, 0, 0, 0, 0, NULL } }; Modified: stable/10/sys/dev/mpr/mpr_sas.c ============================================================================== --- stable/10/sys/dev/mpr/mpr_sas.c Thu Jun 4 15:02:05 2015 (r283989) +++ stable/10/sys/dev/mpr/mpr_sas.c Thu Jun 4 16:27:18 2015 (r283990) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2009 Yahoo! Inc. - * Copyright (c) 2011-2014 LSI Corp. + * Copyright (c) 2011-2015 LSI Corp. + * Copyright (c) 2013-2015 Avago Technologies * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,12 +24,15 @@ * 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. + * + * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD + * */ #include __FBSDID("$FreeBSD$"); -/* Communications core for LSI MPT2 */ +/* Communications core for Avago Technologies (LSI) MPT3 */ /* TODO Move headers to mprvar */ #include @@ -122,14 +126,10 @@ static void mprsas_scsiio_complete(struc static void mprsas_action_resetdev(struct mprsas_softc *, union ccb *); static void mprsas_resetdev_complete(struct mpr_softc *, struct mpr_command *); -static int mprsas_send_abort(struct mpr_softc *sc, struct mpr_command *tm, +static int mprsas_send_abort(struct mpr_softc *sc, struct mpr_command *tm, struct mpr_command *cm); -static int mprsas_send_reset(struct mpr_softc *sc, struct mpr_command *tm, - uint8_t type); static void mprsas_async(void *callback_arg, uint32_t code, struct cam_path *path, void *arg); -static void mprsas_prepare_ssu(struct mpr_softc *sc, struct cam_path *path, - struct ccb_getdev *cgd); #if (__FreeBSD_version < 901503) || \ ((__FreeBSD_version >= 1000000) && (__FreeBSD_version < 1000006)) static void mprsas_check_eedp(struct mpr_softc *sc, struct cam_path *path, @@ -142,13 +142,12 @@ static void mprsas_portenable_complete(s struct mpr_command *cm); #if __FreeBSD_version >= 900026 -static void -mprsas_smpio_complete(struct mpr_softc *sc, struct mpr_command *cm); +static void mprsas_smpio_complete(struct mpr_softc *sc, + struct mpr_command *cm); static void mprsas_send_smpcmd(struct mprsas_softc *sassc, - union ccb *ccb, uint64_t sasaddr); -static void -mprsas_action_smpio(struct mprsas_softc *sassc, union ccb *ccb); -#endif + union ccb *ccb, uint64_t sasaddr); +static void mprsas_action_smpio(struct mprsas_softc *sassc, union ccb *ccb); +#endif //FreeBSD_version >= 900026 struct mprsas_target * mprsas_find_target_by_handle(struct mprsas_softc *sassc, int start, @@ -230,7 +229,7 @@ mprsas_startup_decrement(struct mprsas_s } } -/* LSI's firmware requires us to stop sending commands when we're doing task +/* The firmware requires us to stop sending commands when we're doing task * management, so refcount the TMs and keep the simq frozen when any are in * use. */ @@ -241,35 +240,31 @@ mprsas_alloc_tm(struct mpr_softc *sc) MPR_FUNCTRACE(sc); tm = mpr_alloc_high_priority_command(sc); - if (tm != NULL) { - if (sc->sassc->tm_count++ == 0) { - mpr_dprint(sc, MPR_RECOVERY, - "%s freezing simq\n", __func__); - xpt_freeze_simq(sc->sassc->sim, 1); - } - mpr_dprint(sc, MPR_RECOVERY, "%s tm_count %u\n", __func__, - sc->sassc->tm_count); - } return tm; } void mprsas_free_tm(struct mpr_softc *sc, struct mpr_command *tm) { - mpr_dprint(sc, MPR_TRACE, "%s", __func__); + MPR_FUNCTRACE(sc); if (tm == NULL) return; - /* if there are no TMs in use, we can release the simq. We use our - * own refcount so that it's easier for a diag reset to cleanup and - * release the simq. - */ - if (--sc->sassc->tm_count == 0) { - mpr_dprint(sc, MPR_RECOVERY, "%s releasing simq\n", __func__); - xpt_release_simq(sc->sassc->sim, 1); + /* + * For TM's the devq is frozen for the device. Unfreeze it here and + * free the resources used for freezing the devq. Must clear the + * INRESET flag as well or scsi I/O will not work. + */ + if (tm->cm_targ != NULL) { + tm->cm_targ->flags &= ~MPRSAS_TARGET_INRESET; + } + if (tm->cm_ccb) { + mpr_dprint(sc, MPR_INFO, "Unfreezing devq for target ID %d\n", + tm->cm_targ->tid); + xpt_release_devq(tm->cm_ccb->ccb_h.path, 1, TRUE); + xpt_free_path(tm->cm_ccb->ccb_h.path); + xpt_free_ccb(tm->cm_ccb); } - mpr_dprint(sc, MPR_RECOVERY, "%s tm_count %u\n", __func__, - sc->sassc->tm_count); mpr_free_high_priority_command(sc, tm); } @@ -298,8 +293,8 @@ mprsas_rescan_target(struct mpr_softc *s return; } - if (xpt_create_path(&ccb->ccb_h.path, NULL, pathid, - targetid, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { + if (xpt_create_path(&ccb->ccb_h.path, NULL, pathid, targetid, + CAM_LUN_WILDCARD) != CAM_REQ_CMP) { mpr_dprint(sc, MPR_ERROR, "unable to create path for rescan\n"); xpt_free_ccb(ccb); return; @@ -473,11 +468,16 @@ mprsas_prepare_volume_remove(struct mprs MPI2_REQ_DESCRIPT_FLAGS_HIGH_PRIORITY; cm->cm_complete = mprsas_remove_volume; cm->cm_complete_data = (void *)(uintptr_t)handle; + + mpr_dprint(sc, MPR_INFO, "%s: Sending reset for target ID %d\n", + __func__, targ->tid); + mprsas_prepare_for_tm(sc, cm, targ, CAM_LUN_WILDCARD); + mpr_map_command(sc, cm); } /* - * The MPT2 firmware performs debounce on the link to avoid transient link + * The MPT3 firmware performs debounce on the link to avoid transient link * errors and false removals. When it does decide that link has been lost * and a device needs to go away, it expects that the host will perform a * target reset and then an op remove. The reset has the side-effect of @@ -532,6 +532,11 @@ mprsas_prepare_remove(struct mprsas_soft MPI2_REQ_DESCRIPT_FLAGS_HIGH_PRIORITY; cm->cm_complete = mprsas_remove_device; cm->cm_complete_data = (void *)(uintptr_t)handle; + + mpr_dprint(sc, MPR_INFO, "%s: Sending reset for target ID %d\n", + __func__, targ->tid); + mprsas_prepare_for_tm(sc, cm, targ, CAM_LUN_WILDCARD); + mpr_map_command(sc, cm); } @@ -596,10 +601,10 @@ mprsas_remove_device(struct mpr_softc *s mpr_map_command(sc, tm); - mpr_dprint(sc, MPR_XINFO, "clearing target %u handle 0x%04x\n", + mpr_dprint(sc, MPR_INFO, "clearing target %u handle 0x%04x\n", targ->tid, handle); if (targ->encl_level_valid) { - mpr_dprint(sc, MPR_XINFO, "At enclosure level %d, slot %d, " + mpr_dprint(sc, MPR_INFO, "At enclosure level %d, slot %d, " "connector name (%4s)\n", targ->encl_level, targ->encl_slot, targ->connector_name); } @@ -608,7 +613,7 @@ mprsas_remove_device(struct mpr_softc *s mpr_dprint(sc, MPR_XINFO, "Completing missed command %p\n", tm); ccb = tm->cm_complete_data; - ccb->ccb_h.status = CAM_DEV_NOT_THERE; + mprsas_set_ccbstatus(ccb, CAM_DEV_NOT_THERE); mprsas_scsiio_complete(sc, tm); } } @@ -726,7 +731,7 @@ mpr_attach_sas(struct mpr_softc *sc) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 16:32:17 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F7D8F78; Thu, 4 Jun 2015 16:32:17 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D8031281; Thu, 4 Jun 2015 16:32:17 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t54GWHWr067986; Thu, 4 Jun 2015 16:32:17 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t54GWHcb067985; Thu, 4 Jun 2015 16:32:17 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201506041632.t54GWHcb067985@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 4 Jun 2015 16:32:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283991 - head/release/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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 16:32:17 -0000 Author: gjb Date: Thu Jun 4 16:32:16 2015 New Revision: 283991 URL: https://svnweb.freebsd.org/changeset/base/283991 Log: Add initial support for building images for the Duovero Gumstix board. Sponsored by: The FreeBSD Foundation Added: head/release/arm/GUMSTIX.conf (contents, props changed) Added: head/release/arm/GUMSTIX.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/arm/GUMSTIX.conf Thu Jun 4 16:32:16 2015 (r283991) @@ -0,0 +1,37 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +EMBEDDEDBUILD=1 +EMBEDDED_TARGET="arm" +EMBEDDED_TARGET_ARCH="armv6" +EMBEDDEDPORTS="sysutils/u-boot-duovero" +KERNEL="GUMSTIX" +WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x88000000" +IMAGE_SIZE="1G" +PART_SCHEME="MBR" +FAT_SIZE="2m" +FAT_TYPE="12" +MD_ARGS="-x 63 -y 255" +NODOC=1 + +arm_install_uboot() { + UBOOT_DIR="/usr/local/share/u-boot/u-boot-duovero" + FATMOUNT="${DESTDIR%${KERNEL}}/fat" + UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" + chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" + chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} + chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} + chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/MLO ${FATMOUNT}/MLO + chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/u-boot.img ${FATMOUNT}/u-boot.img + chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr ${FATMOUNT}/ubldr + chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot + sync + umount_loop ${CHROOTDIR}/${FATMOUNT} + umount_loop ${CHROOTDIR}/${UFSMOUNT} + chroot ${CHROOTDIR} rmdir ${FATMOUNT} + chroot ${CHROOTDIR} rmdir ${UFSMOUNT} + + return 0 +} From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 16:33:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA1C213B; Thu, 4 Jun 2015 16:33:30 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B84671291; Thu, 4 Jun 2015 16:33:30 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t54GXUmh068242; Thu, 4 Jun 2015 16:33:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t54GXUS0068241; Thu, 4 Jun 2015 16:33:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201506041633.t54GXUS0068241@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 4 Jun 2015 16:33:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283992 - head/release/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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 16:33:30 -0000 Author: gjb Date: Thu Jun 4 16:33:29 2015 New Revision: 283992 URL: https://svnweb.freebsd.org/changeset/base/283992 Log: Fix a whitespace nit. Sponsored by: The FreeBSD Foundation Modified: head/release/arm/BEAGLEBONE.conf Modified: head/release/arm/BEAGLEBONE.conf ============================================================================== --- head/release/arm/BEAGLEBONE.conf Thu Jun 4 16:32:16 2015 (r283991) +++ head/release/arm/BEAGLEBONE.conf Thu Jun 4 16:33:29 2015 (r283992) @@ -23,7 +23,7 @@ arm_install_uboot() { chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} - chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/MLO ${FATMOUNT}/MLO + chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/MLO ${FATMOUNT}/MLO chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/u-boot.img ${FATMOUNT}/u-boot.img chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr ${FATMOUNT}/ubldr chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 17:54:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EC4E53A; Thu, 4 Jun 2015 17:54:42 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D021169D; Thu, 4 Jun 2015 17:54:42 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t54Hsg9m018780; Thu, 4 Jun 2015 17:54:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t54HsgON018779; Thu, 4 Jun 2015 17:54:42 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201506041754.t54HsgON018779@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 4 Jun 2015 17:54:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283994 - head/sys/net80211 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 17:54:42 -0000 Author: adrian Date: Thu Jun 4 17:54:41 2015 New Revision: 283994 URL: https://svnweb.freebsd.org/changeset/base/283994 Log: Tag outbound raw 802.11 frames with both the node and an mbuf tag with the transmit params. This allows raw 802.11 frames to be queued in the driver if necessary, rather than requiring it to be direct-dispatched into the hardware. Tested: * ath(4), STA mode * iwn(4), STA mode MFC after: 2 weeks Sponsored by: Norse Corp, Inc. Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Thu Jun 4 17:05:51 2015 (r283993) +++ head/sys/net80211/ieee80211_output.c Thu Jun 4 17:54:41 2015 (r283994) @@ -508,6 +508,25 @@ ieee80211_raw_output(struct ieee80211vap { struct ieee80211com *ic = vap->iv_ic; + /* + * Set node - the caller has taken a reference, so ensure + * that the mbuf has the same node value that + * it would if it were going via the normal path. + */ + m->m_pkthdr.rcvif = (void *)ni; + + /* + * Attempt to add bpf transmit parameters. + * + * For now it's ok to fail; the raw_xmit api still takes + * them as an option. + * + * Later on when ic_raw_xmit() has params removed, + * they'll have to be added - so fail the transmit if + * they can't be. + */ + (void) ieee80211_add_xmit_params(m, params); + return (ic->ic_raw_xmit(ni, m, params)); } From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 19:18:59 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0899FEDB; Thu, 4 Jun 2015 19:18:59 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB8251A4A; Thu, 4 Jun 2015 19:18:58 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t54JIwl4061509; Thu, 4 Jun 2015 19:18:58 GMT (envelope-from pluknet@FreeBSD.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t54JIwFQ061508; Thu, 4 Jun 2015 19:18:58 GMT (envelope-from pluknet@FreeBSD.org) Message-Id: <201506041918.t54JIwFQ061508@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pluknet set sender to pluknet@FreeBSD.org using -f From: Sergey Kandaurov Date: Thu, 4 Jun 2015 19:18:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283997 - head/bin/chmod 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 19:18:59 -0000 Author: pluknet Date: Thu Jun 4 19:18:58 2015 New Revision: 283997 URL: https://svnweb.freebsd.org/changeset/base/283997 Log: Change directory permissions in pre-order. In this order, it won't try to recurse into a directory for which it doesn't have permission, before changing that permission. This follows an existing behavior in other BSDs, linux, OS X. Obtained from: NetBSD Modified: head/bin/chmod/chmod.c Modified: head/bin/chmod/chmod.c ============================================================================== --- head/bin/chmod/chmod.c Thu Jun 4 19:11:56 2015 (r283996) +++ head/bin/chmod/chmod.c Thu Jun 4 19:18:58 2015 (r283997) @@ -162,14 +162,16 @@ done: argv += optind; atflag = AT_SYMLINK_NOFOLLOW; switch (p->fts_info) { - case FTS_D: /* Change it at FTS_DP. */ + case FTS_D: if (!Rflag) fts_set(ftsp, p, FTS_SKIP); - continue; + break; case FTS_DNR: /* Warn, chmod. */ warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); rval = 1; break; + case FTS_DP: /* Already changed at FTS_D. */ + continue; case FTS_ERR: /* Warn, continue. */ case FTS_NS: warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 19:41:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E863F391; Thu, 4 Jun 2015 19:41:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5CA61FAE; Thu, 4 Jun 2015 19:41:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t54JfIMC075475; Thu, 4 Jun 2015 19:41:18 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t54JfGAA075455; Thu, 4 Jun 2015 19:41:16 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506041941.t54JfGAA075455@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 4 Jun 2015 19:41:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283998 - in head/sys: dev/drm dev/drm2 fs/devfs kern 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 19:41:19 -0000 Author: jhb Date: Thu Jun 4 19:41:15 2015 New Revision: 283998 URL: https://svnweb.freebsd.org/changeset/base/283998 Log: Add a new file operations hook for mmap operations. File type-specific logic is now placed in the mmap hook implementation rather than requiring it to be placed in sys/vm/vm_mmap.c. This hook allows new file types to support mmap() as well as potentially allowing mmap() for existing file types that do not currently support any mapping. The vm_mmap() function is now split up into two functions. A new vm_mmap_object() function handles the "back half" of vm_mmap() and accepts a referenced VM object to map rather than a (handle, handle_type) tuple. vm_mmap() is now reduced to converting a (handle, handle_type) tuple to a a VM object and then calling vm_mmap_object() to handle the actual mapping. The vm_mmap() function remains for use by other parts of the kernel (e.g. device drivers and exec) but now only supports mapping vnodes, character devices, and anonymous memory. The mmap() system call invokes vm_mmap_object() directly with a NULL object for anonymous mappings. For mappings using a file descriptor, the descriptors fo_mmap() hook is invoked instead. The fo_mmap() hook is responsible for performing type-specific checks and adjustments to arguments as well as possibly modifying mapping parameters such as flags or the object offset. The fo_mmap() hook routines then call vm_mmap_object() to handle the actual mapping. The fo_mmap() hook is optional. If it is not set, then fo_mmap() will fail with ENODEV. A fo_mmap() hook is implemented for regular files, character devices, and shared memory objects (created via shm_open()). While here, consistently use the VM_PROT_* constants for the vm_prot_t type for the 'prot' variable passed to vm_mmap() and vm_mmap_object() as well as the vm_mmap_vnode() and vm_mmap_cdev() helper routines. Previously some places were using the mmap()-specific PROT_* constants instead. While this happens to work because PROT_xx == VM_PROT_xx, using VM_PROT_* is more correct. Differential Revision: https://reviews.freebsd.org/D2658 Reviewed by: alc (glanced over), kib MFC after: 1 month Sponsored by: Chelsio Modified: head/sys/dev/drm/drm_bufs.c head/sys/dev/drm2/drm_bufs.c head/sys/fs/devfs/devfs_vnops.c head/sys/kern/subr_uio.c head/sys/kern/uipc_shm.c head/sys/kern/vfs_vnops.c head/sys/sys/file.h head/sys/sys/mman.h head/sys/vm/vm_extern.h head/sys/vm/vm_mmap.c Modified: head/sys/dev/drm/drm_bufs.c ============================================================================== --- head/sys/dev/drm/drm_bufs.c Thu Jun 4 19:18:58 2015 (r283997) +++ head/sys/dev/drm/drm_bufs.c Thu Jun 4 19:41:15 2015 (r283998) @@ -1067,12 +1067,12 @@ int drm_mapbufs(struct drm_device *dev, vaddr = round_page((vm_offset_t)vms->vm_daddr + MAXDSIZ); #if __FreeBSD_version >= 600023 - retcode = vm_mmap(&vms->vm_map, &vaddr, size, PROT_READ | PROT_WRITE, - VM_PROT_ALL, MAP_SHARED | MAP_NOSYNC, OBJT_DEVICE, + retcode = vm_mmap(&vms->vm_map, &vaddr, size, VM_PROT_READ | + VM_PROT_WRITE, VM_PROT_ALL, MAP_SHARED | MAP_NOSYNC, OBJT_DEVICE, dev->devnode, foff); #else - retcode = vm_mmap(&vms->vm_map, &vaddr, size, PROT_READ | PROT_WRITE, - VM_PROT_ALL, MAP_SHARED | MAP_NOSYNC, + retcode = vm_mmap(&vms->vm_map, &vaddr, size, VM_PROT_READ | + VM_PROT_WRITE, VM_PROT_ALL, MAP_SHARED | MAP_NOSYNC, SLIST_FIRST(&dev->devnode->si_hlist), foff); #endif if (retcode) Modified: head/sys/dev/drm2/drm_bufs.c ============================================================================== --- head/sys/dev/drm2/drm_bufs.c Thu Jun 4 19:18:58 2015 (r283997) +++ head/sys/dev/drm2/drm_bufs.c Thu Jun 4 19:41:15 2015 (r283998) @@ -1635,12 +1635,12 @@ int drm_mapbufs(struct drm_device *dev, goto done; } retcode = vm_mmap(&vms->vm_map, &virtual, map->size, - PROT_READ | PROT_WRITE, VM_PROT_ALL, + VM_PROT_READ | VM_PROT_WRITE, VM_PROT_ALL, MAP_SHARED | MAP_NOSYNC, OBJT_DEVICE, file_priv->minor->device, token); } else { retcode = vm_mmap(&vms->vm_map, &virtual, dma->byte_count, - PROT_READ | PROT_WRITE, VM_PROT_ALL, + VM_PROT_READ | VM_PROT_WRITE, VM_PROT_ALL, MAP_SHARED | MAP_NOSYNC, OBJT_DEVICE, file_priv->minor->device, 0); } Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Thu Jun 4 19:18:58 2015 (r283997) +++ head/sys/fs/devfs/devfs_vnops.c Thu Jun 4 19:41:15 2015 (r283998) @@ -51,6 +51,7 @@ #include #include #include +#include #include #include #include @@ -71,6 +72,10 @@ static struct fileops devfs_ops_f; #include +#include +#include +#include + static MALLOC_DEFINE(M_CDEVPDATA, "DEVFSP", "Metainfo for cdev-fp data"); struct mtx devfs_de_interlock; @@ -1738,6 +1743,65 @@ devfs_write_f(struct file *fp, struct ui return (error); } +static int +devfs_mmap_f(struct file *fp, vm_map_t map, vm_offset_t *addr, vm_size_t size, + vm_prot_t prot, vm_prot_t cap_maxprot, int flags, vm_ooffset_t foff, + struct thread *td) +{ + struct cdev *dev; + struct cdevsw *dsw; + struct mount *mp; + struct vnode *vp; + struct file *fpop; + vm_object_t object; + vm_prot_t maxprot; + int error, ref; + + vp = fp->f_vnode; + + /* + * Ensure that file and memory protections are + * compatible. + */ + mp = vp->v_mount; + if (mp != NULL && (mp->mnt_flag & MNT_NOEXEC) != 0) + maxprot = VM_PROT_NONE; + else + maxprot = VM_PROT_EXECUTE; + if ((fp->f_flag & FREAD) != 0) + maxprot |= VM_PROT_READ; + else if ((prot & VM_PROT_READ) != 0) + return (EACCES); + + /* + * Character devices always share mappings, so + * require a writable fd for writable mappings. + */ + if ((fp->f_flag & FWRITE) != 0) + maxprot |= VM_PROT_WRITE; + else if ((prot & VM_PROT_WRITE) != 0) + return (EACCES); + maxprot &= cap_maxprot; + + fpop = td->td_fpop; + error = devfs_fp_check(fp, &dev, &dsw, &ref); + if (error != 0) + return (error); + + error = vm_mmap_cdev(td, size, prot, &maxprot, &flags, dev, dsw, &foff, + &object); + td->td_fpop = fpop; + dev_relthread(dev, ref); + if (error != 0) + return (error); + + error = vm_mmap_object(map, addr, size, prot, maxprot, flags, object, + foff, FALSE, td); + if (error != 0) + vm_object_deallocate(object); + return (error); +} + dev_t dev2udev(struct cdev *x) { @@ -1760,6 +1824,7 @@ static struct fileops devfs_ops_f = { .fo_sendfile = vn_sendfile, .fo_seek = vn_seek, .fo_fill_kinfo = vn_fill_kinfo, + .fo_mmap = devfs_mmap_f, .fo_flags = DFLAG_PASSABLE | DFLAG_SEEKABLE }; Modified: head/sys/kern/subr_uio.c ============================================================================== --- head/sys/kern/subr_uio.c Thu Jun 4 19:18:58 2015 (r283997) +++ head/sys/kern/subr_uio.c Thu Jun 4 19:41:15 2015 (r283998) @@ -417,7 +417,7 @@ copyout_map(struct thread *td, vm_offset /* round size up to page boundry */ size = (vm_size_t)round_page(sz); - error = vm_mmap(&vms->vm_map, addr, size, PROT_READ | PROT_WRITE, + error = vm_mmap(&vms->vm_map, addr, size, VM_PROT_READ | VM_PROT_WRITE, VM_PROT_ALL, MAP_PRIVATE | MAP_ANON, OBJT_DEFAULT, NULL, 0); return (error); Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Thu Jun 4 19:18:58 2015 (r283997) +++ head/sys/kern/uipc_shm.c Thu Jun 4 19:41:15 2015 (r283998) @@ -127,6 +127,7 @@ static fo_chmod_t shm_chmod; static fo_chown_t shm_chown; static fo_seek_t shm_seek; static fo_fill_kinfo_t shm_fill_kinfo; +static fo_mmap_t shm_mmap; /* File descriptor operations. */ static struct fileops shm_ops = { @@ -143,6 +144,7 @@ static struct fileops shm_ops = { .fo_sendfile = vn_sendfile, .fo_seek = shm_seek, .fo_fill_kinfo = shm_fill_kinfo, + .fo_mmap = shm_mmap, .fo_flags = DFLAG_PASSABLE | DFLAG_SEEKABLE }; @@ -851,15 +853,37 @@ sys_shm_unlink(struct thread *td, struct return (error); } -/* - * mmap() helper to validate mmap() requests against shm object state - * and give mmap() the vm_object to use for the mapping. - */ int -shm_mmap(struct shmfd *shmfd, vm_size_t objsize, vm_ooffset_t foff, - vm_object_t *obj) +shm_mmap(struct file *fp, vm_map_t map, vm_offset_t *addr, vm_size_t objsize, + vm_prot_t prot, vm_prot_t cap_maxprot, int flags, + vm_ooffset_t foff, struct thread *td) { + struct shmfd *shmfd; + vm_prot_t maxprot; + int error; + + shmfd = fp->f_data; + maxprot = VM_PROT_NONE; + + /* FREAD should always be set. */ + if ((fp->f_flag & FREAD) != 0) + maxprot |= VM_PROT_EXECUTE | VM_PROT_READ; + if ((fp->f_flag & FWRITE) != 0) + maxprot |= VM_PROT_WRITE; + + /* Don't permit shared writable mappings on read-only descriptors. */ + if ((flags & MAP_SHARED) != 0 && + (maxprot & VM_PROT_WRITE) == 0 && + (prot & VM_PROT_WRITE) != 0) + return (EACCES); + maxprot &= cap_maxprot; +#ifdef MAC + error = mac_posixshm_check_mmap(td->td_ucred, shmfd, prot, flags); + if (error != 0) + return (error); +#endif + /* * XXXRW: This validation is probably insufficient, and subject to * sign errors. It should be fixed. @@ -872,7 +896,11 @@ shm_mmap(struct shmfd *shmfd, vm_size_t vfs_timestamp(&shmfd->shm_atime); mtx_unlock(&shm_timestamp_lock); vm_object_reference(shmfd->shm_object); - *obj = shmfd->shm_object; + + error = vm_mmap_object(map, addr, objsize, prot, maxprot, flags, + shmfd->shm_object, foff, FALSE, td); + if (error != 0) + vm_object_deallocate(shmfd->shm_object); return (0); } Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Thu Jun 4 19:18:58 2015 (r283997) +++ head/sys/kern/vfs_vnops.c Thu Jun 4 19:41:15 2015 (r283998) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -80,6 +81,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include static fo_rdwr_t vn_read; static fo_rdwr_t vn_write; @@ -90,6 +92,7 @@ static fo_poll_t vn_poll; static fo_kqfilter_t vn_kqfilter; static fo_stat_t vn_statfile; static fo_close_t vn_closefile; +static fo_mmap_t vn_mmap; struct fileops vnops = { .fo_read = vn_io_fault, @@ -105,6 +108,7 @@ struct fileops vnops = { .fo_sendfile = vn_sendfile, .fo_seek = vn_seek, .fo_fill_kinfo = vn_fill_kinfo, + .fo_mmap = vn_mmap, .fo_flags = DFLAG_PASSABLE | DFLAG_SEEKABLE }; @@ -2362,3 +2366,95 @@ vn_fill_kinfo_vnode(struct vnode *vp, st kif->kf_un.kf_file.kf_file_rdev = va.va_rdev; return (0); } + +int +vn_mmap(struct file *fp, vm_map_t map, vm_offset_t *addr, vm_size_t size, + vm_prot_t prot, vm_prot_t cap_maxprot, int flags, vm_ooffset_t foff, + struct thread *td) +{ +#ifdef HWPMC_HOOKS + struct pmckern_map_in pkm; +#endif + struct mount *mp; + struct vnode *vp; + vm_object_t object; + vm_prot_t maxprot; + boolean_t writecounted; + int error; + +#if defined(COMPAT_FREEBSD7) || defined(COMPAT_FREEBSD6) || \ + defined(COMPAT_FREEBSD5) || defined(COMPAT_FREEBSD4) + /* + * POSIX shared-memory objects are defined to have + * kernel persistence, and are not defined to support + * read(2)/write(2) -- or even open(2). Thus, we can + * use MAP_ASYNC to trade on-disk coherence for speed. + * The shm_open(3) library routine turns on the FPOSIXSHM + * flag to request this behavior. + */ + if ((fp->f_flag & FPOSIXSHM) != 0) + flags |= MAP_NOSYNC; +#endif + vp = fp->f_vnode; + + /* + * Ensure that file and memory protections are + * compatible. Note that we only worry about + * writability if mapping is shared; in this case, + * current and max prot are dictated by the open file. + * XXX use the vnode instead? Problem is: what + * credentials do we use for determination? What if + * proc does a setuid? + */ + mp = vp->v_mount; + if (mp != NULL && (mp->mnt_flag & MNT_NOEXEC) != 0) + maxprot = VM_PROT_NONE; + else + maxprot = VM_PROT_EXECUTE; + if ((fp->f_flag & FREAD) != 0) + maxprot |= VM_PROT_READ; + else if ((prot & VM_PROT_READ) != 0) + return (EACCES); + + /* + * If we are sharing potential changes via MAP_SHARED and we + * are trying to get write permission although we opened it + * without asking for it, bail out. + */ + if ((flags & MAP_SHARED) != 0) { + if ((fp->f_flag & FWRITE) != 0) + maxprot |= VM_PROT_WRITE; + else if ((prot & VM_PROT_WRITE) != 0) + return (EACCES); + } else { + maxprot |= VM_PROT_WRITE; + cap_maxprot |= VM_PROT_WRITE; + } + maxprot &= cap_maxprot; + + writecounted = FALSE; + error = vm_mmap_vnode(td, size, prot, &maxprot, &flags, vp, + &foff, &object, &writecounted); + if (error != 0) + return (error); + error = vm_mmap_object(map, addr, size, prot, maxprot, flags, object, + foff, writecounted, td); + if (error != 0) { + /* + * If this mapping was accounted for in the vnode's + * writecount, then undo that now. + */ + if (writecounted) + vnode_pager_release_writecount(object, 0, size); + vm_object_deallocate(object); + } +#ifdef HWPMC_HOOKS + /* Inform hwpmc(4) if an executable is being mapped. */ + if (error == 0 && (prot & VM_PROT_EXECUTE) != 0) { + pkm.pm_file = vp; + pkm.pm_address = (uintptr_t) addr; + PMC_CALL_HOOK(td, PMC_FN_MMAP, (void *) &pkm); + } +#endif + return (error); +} Modified: head/sys/sys/file.h ============================================================================== --- head/sys/sys/file.h Thu Jun 4 19:18:58 2015 (r283997) +++ head/sys/sys/file.h Thu Jun 4 19:41:15 2015 (r283998) @@ -42,6 +42,7 @@ #include #include #include +#include struct filedesc; struct stat; @@ -115,6 +116,9 @@ typedef int fo_seek_t(struct file *fp, o struct thread *td); typedef int fo_fill_kinfo_t(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp); +typedef int fo_mmap_t(struct file *fp, vm_map_t map, vm_offset_t *addr, + vm_size_t size, vm_prot_t prot, vm_prot_t cap_maxprot, + int flags, vm_ooffset_t foff, struct thread *td); typedef int fo_flags_t; struct fileops { @@ -131,6 +135,7 @@ struct fileops { fo_sendfile_t *fo_sendfile; fo_seek_t *fo_seek; fo_fill_kinfo_t *fo_fill_kinfo; + fo_mmap_t *fo_mmap; fo_flags_t fo_flags; /* DFLAG_* below */ }; @@ -391,6 +396,18 @@ fo_fill_kinfo(struct file *fp, struct ki return ((*fp->f_ops->fo_fill_kinfo)(fp, kif, fdp)); } +static __inline int +fo_mmap(struct file *fp, vm_map_t map, vm_offset_t *addr, vm_size_t size, + vm_prot_t prot, vm_prot_t cap_maxprot, int flags, vm_ooffset_t foff, + struct thread *td) +{ + + if (fp->f_ops->fo_mmap == NULL) + return (ENODEV); + return ((*fp->f_ops->fo_mmap)(fp, map, addr, size, prot, cap_maxprot, + flags, foff, td)); +} + #endif /* _KERNEL */ #endif /* !SYS_FILE_H */ Modified: head/sys/sys/mman.h ============================================================================== --- head/sys/sys/mman.h Thu Jun 4 19:18:58 2015 (r283997) +++ head/sys/sys/mman.h Thu Jun 4 19:41:15 2015 (r283998) @@ -230,8 +230,6 @@ struct shmfd { #endif #ifdef _KERNEL -int shm_mmap(struct shmfd *shmfd, vm_size_t objsize, vm_ooffset_t foff, - vm_object_t *obj); int shm_map(struct file *fp, size_t size, off_t offset, void **memp); int shm_unmap(struct file *fp, void *mem, size_t size); Modified: head/sys/vm/vm_extern.h ============================================================================== --- head/sys/vm/vm_extern.h Thu Jun 4 19:18:58 2015 (r283997) +++ head/sys/vm/vm_extern.h Thu Jun 4 19:41:15 2015 (r283998) @@ -40,6 +40,8 @@ struct vnode; struct vmem; #ifdef _KERNEL +struct cdev; +struct cdevsw; /* These operate on kernel virtual addresses only. */ vm_offset_t kva_alloc(vm_size_t); @@ -81,10 +83,18 @@ int vm_fault_hold(vm_map_t map, vm_offse int fault_flags, vm_page_t *m_hold); int vm_fault_quick_hold_pages(vm_map_t map, vm_offset_t addr, vm_size_t len, vm_prot_t prot, vm_page_t *ma, int max_count); -int vm_forkproc(struct thread *, struct proc *, struct thread *, struct vmspace *, int); +int vm_forkproc(struct thread *, struct proc *, struct thread *, + struct vmspace *, int); void vm_waitproc(struct proc *); -int vm_mmap(vm_map_t, vm_offset_t *, vm_size_t, vm_prot_t, vm_prot_t, int, objtype_t, void *, vm_ooffset_t); +int vm_mmap(vm_map_t, vm_offset_t *, vm_size_t, vm_prot_t, vm_prot_t, int, + objtype_t, void *, vm_ooffset_t); +int vm_mmap_object(vm_map_t, vm_offset_t *, vm_size_t, vm_prot_t, + vm_prot_t, int, vm_object_t, vm_ooffset_t, boolean_t, struct thread *); int vm_mmap_to_errno(int rv); +int vm_mmap_cdev(struct thread *, vm_size_t, vm_prot_t, vm_prot_t *, + int *, struct cdev *, struct cdevsw *, vm_ooffset_t *, vm_object_t *); +int vm_mmap_vnode(struct thread *, vm_size_t, vm_prot_t, vm_prot_t *, int *, + struct vnode *, vm_ooffset_t *, vm_object_t *, boolean_t *); void vm_set_page_size(void); void vm_sync_icache(vm_map_t, vm_offset_t, vm_size_t); typedef int (*pmap_pinit_t)(struct pmap *pmap); Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Thu Jun 4 19:18:58 2015 (r283997) +++ head/sys/vm/vm_mmap.c Thu Jun 4 19:41:15 2015 (r283998) @@ -100,13 +100,6 @@ SYSCTL_INT(_vm, OID_AUTO, old_mlock, CTL #define MAP_32BIT_MAX_ADDR ((vm_offset_t)1 << 31) #endif -static int vm_mmap_vnode(struct thread *, vm_size_t, vm_prot_t, vm_prot_t *, - int *, struct vnode *, vm_ooffset_t *, vm_object_t *, boolean_t *); -static int vm_mmap_cdev(struct thread *, vm_size_t, vm_prot_t, vm_prot_t *, - int *, struct cdev *, vm_ooffset_t *, vm_object_t *); -static int vm_mmap_shm(struct thread *, vm_size_t, vm_prot_t, vm_prot_t *, - int *, struct shmfd *, vm_ooffset_t, vm_object_t *); - #ifndef _SYS_SYSPROTO_H_ struct sbrk_args { int incr; @@ -197,16 +190,10 @@ sys_mmap(td, uap) struct thread *td; struct mmap_args *uap; { -#ifdef HWPMC_HOOKS - struct pmckern_map_in pkm; -#endif struct file *fp; - struct vnode *vp; vm_offset_t addr; vm_size_t size, pageoff; - vm_prot_t cap_maxprot, maxprot; - void *handle; - objtype_t handle_type; + vm_prot_t cap_maxprot; int align, error, flags, prot; off_t pos; struct vmspace *vms = td->td_proc->p_vmspace; @@ -334,14 +321,22 @@ sys_mmap(td, uap) lim_max(td->td_proc, RLIMIT_DATA)); PROC_UNLOCK(td->td_proc); } - if (flags & MAP_ANON) { + if (size == 0) { + /* + * Return success without mapping anything for old + * binaries that request a page-aligned mapping of + * length 0. For modern binaries, this function + * returns an error earlier. + */ + error = 0; + } else if (flags & MAP_ANON) { /* * Mapping blank space is trivial. + * + * This relies on VM_PROT_* matching PROT_*. */ - handle = NULL; - handle_type = OBJT_DEFAULT; - maxprot = VM_PROT_ALL; - cap_maxprot = VM_PROT_ALL; + error = vm_mmap_object(&vms->vm_map, &addr, size, prot, + VM_PROT_ALL, flags, NULL, pos, FALSE, td); } else { /* * Mapping file, get fp for validation and don't let the @@ -366,93 +361,12 @@ sys_mmap(td, uap) error = EINVAL; goto done; } - if (fp->f_type == DTYPE_SHM) { - handle = fp->f_data; - handle_type = OBJT_SWAP; - maxprot = VM_PROT_NONE; - - /* FREAD should always be set. */ - if (fp->f_flag & FREAD) - maxprot |= VM_PROT_EXECUTE | VM_PROT_READ; - if (fp->f_flag & FWRITE) - maxprot |= VM_PROT_WRITE; - goto map; - } - if (fp->f_type != DTYPE_VNODE) { - error = ENODEV; - goto done; - } -#if defined(COMPAT_FREEBSD7) || defined(COMPAT_FREEBSD6) || \ - defined(COMPAT_FREEBSD5) || defined(COMPAT_FREEBSD4) - /* - * POSIX shared-memory objects are defined to have - * kernel persistence, and are not defined to support - * read(2)/write(2) -- or even open(2). Thus, we can - * use MAP_ASYNC to trade on-disk coherence for speed. - * The shm_open(3) library routine turns on the FPOSIXSHM - * flag to request this behavior. - */ - if (fp->f_flag & FPOSIXSHM) - flags |= MAP_NOSYNC; -#endif - vp = fp->f_vnode; - /* - * Ensure that file and memory protections are - * compatible. Note that we only worry about - * writability if mapping is shared; in this case, - * current and max prot are dictated by the open file. - * XXX use the vnode instead? Problem is: what - * credentials do we use for determination? What if - * proc does a setuid? - */ - if (vp->v_mount != NULL && vp->v_mount->mnt_flag & MNT_NOEXEC) - maxprot = VM_PROT_NONE; - else - maxprot = VM_PROT_EXECUTE; - if (fp->f_flag & FREAD) { - maxprot |= VM_PROT_READ; - } else if (prot & PROT_READ) { - error = EACCES; - goto done; - } - /* - * If we are sharing potential changes (either via - * MAP_SHARED or via the implicit sharing of character - * device mappings), and we are trying to get write - * permission although we opened it without asking - * for it, bail out. - */ - if ((flags & MAP_SHARED) != 0) { - if ((fp->f_flag & FWRITE) != 0) { - maxprot |= VM_PROT_WRITE; - } else if ((prot & PROT_WRITE) != 0) { - error = EACCES; - goto done; - } - } else if (vp->v_type != VCHR || (fp->f_flag & FWRITE) != 0) { - maxprot |= VM_PROT_WRITE; - cap_maxprot |= VM_PROT_WRITE; - } - handle = (void *)vp; - handle_type = OBJT_VNODE; - } -map: - td->td_fpop = fp; - maxprot &= cap_maxprot; - /* This relies on VM_PROT_* matching PROT_*. */ - error = vm_mmap(&vms->vm_map, &addr, size, prot, maxprot, - flags, handle_type, handle, pos); - td->td_fpop = NULL; -#ifdef HWPMC_HOOKS - /* inform hwpmc(4) if an executable is being mapped */ - if (error == 0 && handle_type == OBJT_VNODE && - (prot & PROT_EXEC)) { - pkm.pm_file = handle; - pkm.pm_address = (uintptr_t) addr; - PMC_CALL_HOOK(td, PMC_FN_MMAP, (void *) &pkm); + /* This relies on VM_PROT_* matching PROT_*. */ + error = fo_mmap(fp, &vms->vm_map, &addr, size, prot, + cap_maxprot, flags, pos, td); } -#endif + if (error == 0) td->td_retval[0] = (register_t) (addr + pageoff); done: @@ -1311,9 +1225,6 @@ sys_munlock(td, uap) * * Helper function for vm_mmap. Perform sanity check specific for mmap * operations on vnodes. - * - * For VCHR vnodes, the vnode lock is held over the call to - * vm_mmap_cdev() to keep vp->v_rdev valid. */ int vm_mmap_vnode(struct thread *td, vm_size_t objsize, @@ -1360,12 +1271,6 @@ vm_mmap_vnode(struct thread *td, vm_size *writecounted = TRUE; vnode_pager_update_writecount(obj, 0, objsize); } - } else if (vp->v_type == VCHR) { - error = vm_mmap_cdev(td, objsize, prot, maxprotp, flagsp, - vp->v_rdev, foffp, objp); - if (error == 0) - goto mark_atime; - goto done; } else { error = EINVAL; goto done; @@ -1373,13 +1278,14 @@ vm_mmap_vnode(struct thread *td, vm_size if ((error = VOP_GETATTR(vp, &va, cred))) goto done; #ifdef MAC - error = mac_vnode_check_mmap(cred, vp, prot, flags); + /* This relies on VM_PROT_* matching PROT_*. */ + error = mac_vnode_check_mmap(cred, vp, (int)prot, flags); if (error != 0) goto done; #endif if ((flags & MAP_SHARED) != 0) { if ((va.va_flags & (SF_SNAPSHOT|IMMUTABLE|APPEND)) != 0) { - if (prot & PROT_WRITE) { + if (prot & VM_PROT_WRITE) { error = EPERM; goto done; } @@ -1414,7 +1320,6 @@ vm_mmap_vnode(struct thread *td, vm_size *objp = obj; *flagsp = flags; -mark_atime: vfs_mark_atime(vp, cred); done: @@ -1435,21 +1340,18 @@ done: * operations on cdevs. */ int -vm_mmap_cdev(struct thread *td, vm_size_t objsize, - vm_prot_t prot, vm_prot_t *maxprotp, int *flagsp, - struct cdev *cdev, vm_ooffset_t *foff, vm_object_t *objp) +vm_mmap_cdev(struct thread *td, vm_size_t objsize, vm_prot_t prot, + vm_prot_t *maxprotp, int *flagsp, struct cdev *cdev, struct cdevsw *dsw, + vm_ooffset_t *foff, vm_object_t *objp) { vm_object_t obj; - struct cdevsw *dsw; - int error, flags, ref; + int error, flags; flags = *flagsp; - dsw = dev_refthread(cdev, &ref); - if (dsw == NULL) - return (ENXIO); if (dsw->d_flags & D_MMAP_ANON) { - dev_relthread(cdev, ref); + *objp = NULL; + *foff = 0; *maxprotp = VM_PROT_ALL; *flagsp |= MAP_ANON; return (0); @@ -1458,24 +1360,18 @@ vm_mmap_cdev(struct thread *td, vm_size_ * cdevs do not provide private mappings of any kind. */ if ((*maxprotp & VM_PROT_WRITE) == 0 && - (prot & PROT_WRITE) != 0) { - dev_relthread(cdev, ref); + (prot & VM_PROT_WRITE) != 0) return (EACCES); - } - if (flags & (MAP_PRIVATE|MAP_COPY)) { - dev_relthread(cdev, ref); + if (flags & (MAP_PRIVATE|MAP_COPY)) return (EINVAL); - } /* * Force device mappings to be shared. */ flags |= MAP_SHARED; #ifdef MAC_XXX - error = mac_cdev_check_mmap(td->td_ucred, cdev, prot); - if (error != 0) { - dev_relthread(cdev, ref); + error = mac_cdev_check_mmap(td->td_ucred, cdev, (int)prot); + if (error != 0) return (error); - } #endif /* * First, try d_mmap_single(). If that is not implemented @@ -1487,7 +1383,6 @@ vm_mmap_cdev(struct thread *td, vm_size_ * XXX assumes VM_PROT_* == PROT_* */ error = dsw->d_mmap_single(cdev, foff, objsize, objp, (int)prot); - dev_relthread(cdev, ref); if (error != ENODEV) return (error); obj = vm_pager_allocate(OBJT_DEVICE, cdev, objsize, prot, *foff, @@ -1500,59 +1395,89 @@ vm_mmap_cdev(struct thread *td, vm_size_ } /* - * vm_mmap_shm() - * - * MPSAFE + * vm_mmap() * - * Helper function for vm_mmap. Perform sanity check specific for mmap - * operations on shm file descriptors. + * Internal version of mmap used by exec, sys5 shared memory, and + * various device drivers. Handle is either a vnode pointer, a + * character device, or NULL for MAP_ANON. */ int -vm_mmap_shm(struct thread *td, vm_size_t objsize, - vm_prot_t prot, vm_prot_t *maxprotp, int *flagsp, - struct shmfd *shmfd, vm_ooffset_t foff, vm_object_t *objp) +vm_mmap(vm_map_t map, vm_offset_t *addr, vm_size_t size, vm_prot_t prot, + vm_prot_t maxprot, int flags, + objtype_t handle_type, void *handle, + vm_ooffset_t foff) { + vm_object_t object; + struct thread *td = curthread; int error; + boolean_t writecounted; - if ((*flagsp & MAP_SHARED) != 0 && - (*maxprotp & VM_PROT_WRITE) == 0 && - (prot & PROT_WRITE) != 0) - return (EACCES); -#ifdef MAC - error = mac_posixshm_check_mmap(td->td_ucred, shmfd, prot, *flagsp); - if (error != 0) - return (error); -#endif - error = shm_mmap(shmfd, objsize, foff, objp); + if (size == 0) + return (EINVAL); + + size = round_page(size); + writecounted = FALSE; + + /* + * Lookup/allocate object. + */ + switch (handle_type) { + case OBJT_DEVICE: { + struct cdevsw *dsw; + struct cdev *cdev; + int ref; + + cdev = handle; + dsw = dev_refthread(cdev, &ref); + if (dsw == NULL) + return (ENXIO); + error = vm_mmap_cdev(td, size, prot, &maxprot, &flags, cdev, + dsw, &foff, &object); + dev_relthread(cdev, ref); + break; + } + case OBJT_VNODE: + error = vm_mmap_vnode(td, size, prot, &maxprot, &flags, + handle, &foff, &object, &writecounted); + break; + case OBJT_DEFAULT: + if (handle == NULL) { + error = 0; + break; + } + /* FALLTHROUGH */ + default: + error = EINVAL; + break; + } if (error) return (error); - return (0); + + error = vm_mmap_object(map, addr, size, prot, maxprot, flags, object, + foff, writecounted, td); + if (error != 0 && object != NULL) { + /* + * If this mapping was accounted for in the vnode's + * writecount, then undo that now. + */ + if (writecounted) + vnode_pager_release_writecount(object, 0, size); + vm_object_deallocate(object); + } + return (error); } /* - * vm_mmap() - * - * MPSAFE - * - * Internal version of mmap. Currently used by mmap, exec, and sys5 - * shared memory. Handle is either a vnode pointer or NULL for MAP_ANON. + * Internal version of mmap that maps a specific VM object into an + * map. Called by mmap for MAP_ANON, vm_mmap, shm_mmap, and vn_mmap. */ int -vm_mmap(vm_map_t map, vm_offset_t *addr, vm_size_t size, vm_prot_t prot, - vm_prot_t maxprot, int flags, - objtype_t handle_type, void *handle, - vm_ooffset_t foff) +vm_mmap_object(vm_map_t map, vm_offset_t *addr, vm_size_t size, vm_prot_t prot, + vm_prot_t maxprot, int flags, vm_object_t object, vm_ooffset_t foff, + boolean_t writecounted, struct thread *td) { boolean_t fitit; - vm_object_t object = NULL; - struct thread *td = curthread; int docow, error, findspace, rv; - boolean_t writecounted; - - if (size == 0) - return (0); - - size = round_page(size); if (map == &td->td_proc->p_vmspace->vm_map) { PROC_LOCK(td->td_proc); @@ -1586,11 +1511,11 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, /* * We currently can only deal with page aligned file offsets. - * The check is here rather than in the syscall because the - * kernel calls this function internally for other mmaping - * operations (such as in exec) and non-aligned offsets will - * cause pmap inconsistencies...so we want to be sure to - * disallow this in all cases. + * The mmap() system call already enforces this by subtracting + * the page offset from the file offset, but checking here + * catches errors in device drivers (e.g. d_single_mmap() + * callbacks) and other internal mapping requests (such as in + * exec). */ if (foff & PAGE_MASK) return (EINVAL); @@ -1603,44 +1528,11 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, return (EINVAL); fitit = FALSE; } - writecounted = FALSE; - /* - * Lookup/allocate object. - */ - switch (handle_type) { - case OBJT_DEVICE: - error = vm_mmap_cdev(td, size, prot, &maxprot, &flags, - handle, &foff, &object); - break; - case OBJT_VNODE: - error = vm_mmap_vnode(td, size, prot, &maxprot, &flags, - handle, &foff, &object, &writecounted); - break; - case OBJT_SWAP: - error = vm_mmap_shm(td, size, prot, &maxprot, &flags, - handle, foff, &object); - break; - case OBJT_DEFAULT: - if (handle == NULL) { - error = 0; - break; - } - /* FALLTHROUGH */ - default: - error = EINVAL; - break; - } - if (error) - return (error); if (flags & MAP_ANON) { - object = NULL; + if (object != NULL || foff != 0) + return (EINVAL); docow = 0; - /* - * Unnamed anonymous regions always start at 0. - */ - if (handle == 0) - foff = 0; } else if (flags & MAP_PREFAULT_READ) docow = MAP_PREFAULT; else @@ -1693,19 +1585,6 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, VM_MAP_WIRE_USER | ((flags & MAP_STACK) ? VM_MAP_WIRE_HOLESOK : VM_MAP_WIRE_NOHOLES)); } - } else { - /* - * If this mapping was accounted for in the vnode's - * writecount, then undo that now. - */ - if (writecounted) - vnode_pager_release_writecount(object, 0, size); - /* - * Lose the object reference. Will destroy the - * object if it's an unnamed anonymous mapping - * or named anonymous without other references. - */ - vm_object_deallocate(object); } return (vm_mmap_to_errno(rv)); } From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 20:36:21 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 245FCE9; Thu, 4 Jun 2015 20:36:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05F081D6E; Thu, 4 Jun 2015 20:36:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t54KaK96001399; Thu, 4 Jun 2015 20:36:20 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t54KaHMU001382; Thu, 4 Jun 2015 20:36:17 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506042036.t54KaHMU001382@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 4 Jun 2015 20:36:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283999 - head/sys/dev/drm 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 20:36:21 -0000 Author: jhb Date: Thu Jun 4 20:36:16 2015 New Revision: 283999 URL: https://svnweb.freebsd.org/changeset/base/283999 Log: Remove compatibility shims for FreeBSD versions older than 8.0. Modified: head/sys/dev/drm/drmP.h head/sys/dev/drm/drm_agpsupport.c head/sys/dev/drm/drm_bufs.c head/sys/dev/drm/drm_drv.c head/sys/dev/drm/drm_irq.c head/sys/dev/drm/i915_drv.c head/sys/dev/drm/mach64_drv.c head/sys/dev/drm/mga_drv.c head/sys/dev/drm/r128_drv.c head/sys/dev/drm/radeon_drv.c head/sys/dev/drm/savage_drv.c head/sys/dev/drm/sis_drv.c head/sys/dev/drm/tdfx_drv.c Modified: head/sys/dev/drm/drmP.h ============================================================================== --- head/sys/dev/drm/drmP.h Thu Jun 4 19:41:15 2015 (r283998) +++ head/sys/dev/drm/drmP.h Thu Jun 4 20:36:16 2015 (r283999) @@ -51,9 +51,7 @@ struct drm_file; #include #include #include -#if __FreeBSD_version >= 700000 #include -#endif #include #include #include @@ -94,11 +92,7 @@ struct drm_file; #include #include #include -#if __FreeBSD_version >= 800004 #include -#else /* __FreeBSD_version >= 800004 */ -#include -#endif /* __FreeBSD_version >= 800004 */ #include #include #include @@ -227,11 +221,7 @@ enum { #define PAGE_ALIGN(addr) round_page(addr) /* DRM_SUSER returns true if the user is superuser */ -#if __FreeBSD_version >= 700000 #define DRM_SUSER(p) (priv_check(p, PRIV_DRIVER) == 0) -#else -#define DRM_SUSER(p) (suser(p) == 0) -#endif #define DRM_AGP_FIND_DEVICE() agp_find_device() #define DRM_MTRR_WC MDF_WRITECOMBINE #define jiffies ticks Modified: head/sys/dev/drm/drm_agpsupport.c ============================================================================== --- head/sys/dev/drm/drm_agpsupport.c Thu Jun 4 19:41:15 2015 (r283998) +++ head/sys/dev/drm/drm_agpsupport.c Thu Jun 4 20:36:16 2015 (r283999) @@ -38,50 +38,15 @@ __FBSDID("$FreeBSD$"); #include "dev/drm/drmP.h" -#if __FreeBSD_version >= 800004 #include -#else /* __FreeBSD_version >= 800004 */ -#include -#endif /* __FreeBSD_version >= 800004 */ #include /* Returns 1 if AGP or 0 if not. */ static int drm_device_find_capability(struct drm_device *dev, int cap) { -#if __FreeBSD_version >= 602102 return (pci_find_cap(dev->device, cap, NULL) == 0); -#else - /* Code taken from agp.c. IWBNI that was a public interface. */ - u_int32_t status; - u_int8_t ptr, next; - - /* - * Check the CAP_LIST bit of the PCI status register first. - */ - status = pci_read_config(dev->device, PCIR_STATUS, 2); - if (!(status & 0x10)) - return 0; - - /* - * Traverse the capabilities list. - */ - for (ptr = pci_read_config(dev->device, AGP_CAPPTR, 1); - ptr != 0; - ptr = next) { - u_int32_t capid = pci_read_config(dev->device, ptr, 4); - next = AGP_CAPID_GET_NEXT_PTR(capid); - - /* - * If this capability entry ID is cap, then we are done. - */ - if (AGP_CAPID_GET_CAP_ID(capid) == cap) - return 1; - } - - return 0; -#endif } int drm_device_is_agp(struct drm_device *dev) Modified: head/sys/dev/drm/drm_bufs.c ============================================================================== --- head/sys/dev/drm/drm_bufs.c Thu Jun 4 19:41:15 2015 (r283998) +++ head/sys/dev/drm/drm_bufs.c Thu Jun 4 20:36:16 2015 (r283999) @@ -1066,15 +1066,9 @@ int drm_mapbufs(struct drm_device *dev, } vaddr = round_page((vm_offset_t)vms->vm_daddr + MAXDSIZ); -#if __FreeBSD_version >= 600023 retcode = vm_mmap(&vms->vm_map, &vaddr, size, VM_PROT_READ | VM_PROT_WRITE, VM_PROT_ALL, MAP_SHARED | MAP_NOSYNC, OBJT_DEVICE, dev->devnode, foff); -#else - retcode = vm_mmap(&vms->vm_map, &vaddr, size, VM_PROT_READ | - VM_PROT_WRITE, VM_PROT_ALL, MAP_SHARED | MAP_NOSYNC, - SLIST_FIRST(&dev->devnode->si_hlist), foff); -#endif if (retcode) goto done; Modified: head/sys/dev/drm/drm_drv.c ============================================================================== --- head/sys/dev/drm/drm_drv.c Thu Jun 4 19:41:15 2015 (r283998) +++ head/sys/dev/drm/drm_drv.c Thu Jun 4 20:36:16 2015 (r283999) @@ -161,19 +161,8 @@ int drm_probe(device_t kdev, drm_pci_id_ { drm_pci_id_list_t *id_entry; int vendor, device; -#if __FreeBSD_version < 700010 - device_t realdev; - - if (!strcmp(device_get_name(kdev), "drmsub")) - realdev = device_get_parent(kdev); - else - realdev = kdev; - vendor = pci_get_vendor(realdev); - device = pci_get_device(realdev); -#else vendor = pci_get_vendor(kdev); device = pci_get_device(kdev); -#endif if (pci_get_class(kdev) != PCIC_DISPLAY || pci_get_subclass(kdev) != PCIS_DISPLAY_VGA) @@ -200,14 +189,7 @@ int drm_attach(device_t kdev, drm_pci_id unit = device_get_unit(kdev); dev = device_get_softc(kdev); -#if __FreeBSD_version < 700010 - if (!strcmp(device_get_name(kdev), "drmsub")) - dev->device = device_get_parent(kdev); - else - dev->device = kdev; -#else dev->device = kdev; -#endif dev->devnode = make_dev(&drm_cdevsw, 0, DRM_DEV_UID, @@ -216,11 +198,7 @@ int drm_attach(device_t kdev, drm_pci_id "dri/card%d", unit); dev->devnode->si_drv1 = dev; -#if __FreeBSD_version >= 700053 dev->pci_domain = pci_get_domain(dev->device); -#else - dev->pci_domain = 0; -#endif dev->pci_bus = pci_get_bus(dev->device); dev->pci_slot = pci_get_slot(dev->device); dev->pci_func = pci_get_function(dev->device); Modified: head/sys/dev/drm/drm_irq.c ============================================================================== --- head/sys/dev/drm/drm_irq.c Thu Jun 4 19:41:15 2015 (r283998) +++ head/sys/dev/drm/drm_irq.c Thu Jun 4 20:36:16 2015 (r283999) @@ -175,15 +175,9 @@ int drm_irq_install(struct drm_device *d DRM_UNLOCK(); /* Install handler */ -#if __FreeBSD_version >= 700031 retcode = bus_setup_intr(dev->device, dev->irqr, INTR_TYPE_TTY | INTR_MPSAFE, NULL, drm_irq_handler_wrap, dev, &dev->irqh); -#else - retcode = bus_setup_intr(dev->device, dev->irqr, - INTR_TYPE_TTY | INTR_MPSAFE, - drm_irq_handler_wrap, dev, &dev->irqh); -#endif if (retcode != 0) goto err; Modified: head/sys/dev/drm/i915_drv.c ============================================================================== --- head/sys/dev/drm/i915_drv.c Thu Jun 4 19:41:15 2015 (r283998) +++ head/sys/dev/drm/i915_drv.c Thu Jun 4 20:36:16 2015 (r283999) @@ -147,19 +147,11 @@ static device_method_t i915_methods[] = }; static driver_t i915_driver = { -#if __FreeBSD_version >= 700010 "drm", -#else - "drmsub", -#endif i915_methods, sizeof(struct drm_device) }; extern devclass_t drm_devclass; -#if __FreeBSD_version >= 700010 DRIVER_MODULE(i915, vgapci, i915_driver, drm_devclass, 0, 0); -#else -DRIVER_MODULE(i915, agp, i915_driver, drm_devclass, 0, 0); -#endif MODULE_DEPEND(i915, drm, 1, 1, 1); Modified: head/sys/dev/drm/mach64_drv.c ============================================================================== --- head/sys/dev/drm/mach64_drv.c Thu Jun 4 19:41:15 2015 (r283998) +++ head/sys/dev/drm/mach64_drv.c Thu Jun 4 20:36:16 2015 (r283999) @@ -130,9 +130,5 @@ static driver_t mach64_driver = { }; extern devclass_t drm_devclass; -#if __FreeBSD_version >= 700010 DRIVER_MODULE(mach64, vgapci, mach64_driver, drm_devclass, 0, 0); -#else -DRIVER_MODULE(mach64, pci, mach64_driver, drm_devclass, 0, 0); -#endif MODULE_DEPEND(mach64, drm, 1, 1, 1); Modified: head/sys/dev/drm/mga_drv.c ============================================================================== --- head/sys/dev/drm/mga_drv.c Thu Jun 4 19:41:15 2015 (r283998) +++ head/sys/dev/drm/mga_drv.c Thu Jun 4 20:36:16 2015 (r283999) @@ -74,11 +74,7 @@ static int mga_driver_device_is_agp(stru * device is 0x0021 (HB6 Universal PCI-PCI bridge), we reject the * device. */ -#if __FreeBSD_version >= 700010 bus = device_get_parent(device_get_parent(dev->device)); -#else - bus = device_get_parent(dev->device); -#endif if (pci_get_device(dev->device) == 0x0525 && pci_get_vendor(bus) == 0x3388 && pci_get_device(bus) == 0x0021) @@ -167,9 +163,5 @@ static driver_t mga_driver = { }; extern devclass_t drm_devclass; -#if __FreeBSD_version >= 700010 DRIVER_MODULE(mga, vgapci, mga_driver, drm_devclass, 0, 0); -#else -DRIVER_MODULE(mga, pci, mga_driver, drm_devclass, 0, 0); -#endif MODULE_DEPEND(mga, drm, 1, 1, 1); Modified: head/sys/dev/drm/r128_drv.c ============================================================================== --- head/sys/dev/drm/r128_drv.c Thu Jun 4 19:41:15 2015 (r283998) +++ head/sys/dev/drm/r128_drv.c Thu Jun 4 20:36:16 2015 (r283999) @@ -128,9 +128,5 @@ static driver_t r128_driver = { }; extern devclass_t drm_devclass; -#if __FreeBSD_version >= 700010 DRIVER_MODULE(r128, vgapci, r128_driver, drm_devclass, 0, 0); -#else -DRIVER_MODULE(r128, pci, r128_driver, drm_devclass, 0, 0); -#endif MODULE_DEPEND(r128, drm, 1, 1, 1); Modified: head/sys/dev/drm/radeon_drv.c ============================================================================== --- head/sys/dev/drm/radeon_drv.c Thu Jun 4 19:41:15 2015 (r283998) +++ head/sys/dev/drm/radeon_drv.c Thu Jun 4 20:36:16 2015 (r283999) @@ -127,9 +127,5 @@ static driver_t radeon_driver = { }; extern devclass_t drm_devclass; -#if __FreeBSD_version >= 700010 DRIVER_MODULE(radeon, vgapci, radeon_driver, drm_devclass, 0, 0); -#else -DRIVER_MODULE(radeon, pci, radeon_driver, drm_devclass, 0, 0); -#endif MODULE_DEPEND(radeon, drm, 1, 1, 1); Modified: head/sys/dev/drm/savage_drv.c ============================================================================== --- head/sys/dev/drm/savage_drv.c Thu Jun 4 19:41:15 2015 (r283998) +++ head/sys/dev/drm/savage_drv.c Thu Jun 4 20:36:16 2015 (r283999) @@ -113,9 +113,5 @@ static driver_t savage_driver = { }; extern devclass_t drm_devclass; -#if __FreeBSD_version >= 700010 DRIVER_MODULE(savage, vgapci, savage_driver, drm_devclass, 0, 0); -#else -DRIVER_MODULE(savage, pci, savage_driver, drm_devclass, 0, 0); -#endif MODULE_DEPEND(savage, drm, 1, 1, 1); Modified: head/sys/dev/drm/sis_drv.c ============================================================================== --- head/sys/dev/drm/sis_drv.c Thu Jun 4 19:41:15 2015 (r283998) +++ head/sys/dev/drm/sis_drv.c Thu Jun 4 20:36:16 2015 (r283999) @@ -107,9 +107,5 @@ static driver_t sis_driver = { }; extern devclass_t drm_devclass; -#if __FreeBSD_version >= 700010 DRIVER_MODULE(sisdrm, vgapci, sis_driver, drm_devclass, 0, 0); -#else -DRIVER_MODULE(sisdrm, pci, sis_driver, drm_devclass, 0, 0); -#endif MODULE_DEPEND(sisdrm, drm, 1, 1, 1); Modified: head/sys/dev/drm/tdfx_drv.c ============================================================================== --- head/sys/dev/drm/tdfx_drv.c Thu Jun 4 19:41:15 2015 (r283998) +++ head/sys/dev/drm/tdfx_drv.c Thu Jun 4 20:36:16 2015 (r283999) @@ -109,9 +109,5 @@ static driver_t tdfx_driver = { }; extern devclass_t drm_devclass; -#if __FreeBSD_version >= 700010 DRIVER_MODULE(tdfx, vgapci, tdfx_driver, drm_devclass, 0, 0); -#else -DRIVER_MODULE(tdfx, pci, tdfx_driver, drm_devclass, 0, 0); -#endif MODULE_DEPEND(tdfx, drm, 1, 1, 1); From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 21:07:28 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44B5274E; Thu, 4 Jun 2015 21:07:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 261E61487; Thu, 4 Jun 2015 21:07:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t54L7S5X016557; Thu, 4 Jun 2015 21:07:28 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t54L7SXb016556; Thu, 4 Jun 2015 21:07:28 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506042107.t54L7SXb016556@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 4 Jun 2015 21:07:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284000 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 21:07:28 -0000 Author: jhb Date: Thu Jun 4 21:07:27 2015 New Revision: 284000 URL: https://svnweb.freebsd.org/changeset/base/284000 Log: Add a CHILD_REQUIRE macro similar to ATF_REQUIRE for use in child processes of the main test process. Differential Revision: https://reviews.freebsd.org/D2664 Reviewed by: ngie (previous version) Modified: head/tests/sys/kern/ptrace_test.c Modified: head/tests/sys/kern/ptrace_test.c ============================================================================== --- head/tests/sys/kern/ptrace_test.c Thu Jun 4 20:36:16 2015 (r283999) +++ head/tests/sys/kern/ptrace_test.c Thu Jun 4 21:07:27 2015 (r284000) @@ -34,11 +34,33 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include /* + * A variant of ATF_REQUIRE that is suitable for use in child + * processes. This only works if the parent process is tripped up by + * the early exit and fails some requirement itself. + */ +#define CHILD_REQUIRE(exp) do { \ + if (!(exp)) \ + child_fail_require(__FILE__, __LINE__, \ + #exp " not met"); \ + } while (0) + +static void __dead2 +child_fail_require(const char *file, int line, const char *str) +{ + char buf[128]; + + snprintf(buf, sizeof(buf), "%s:%d: %s\n", file, line, str); + write(2, buf, strlen(buf)); + _exit(32); +} + +/* * Verify that a parent debugger process "sees" the exit of a debugged * process exactly once when attached via PT_TRACE_ME. */ @@ -51,7 +73,7 @@ ATF_TC_BODY(ptrace__parent_wait_after_tr ATF_REQUIRE((child = fork()) != -1); if (child == 0) { /* Child process. */ - ATF_REQUIRE(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + CHILD_REQUIRE(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); /* Trigger a stop. */ raise(SIGSTOP); @@ -100,7 +122,7 @@ ATF_TC_BODY(ptrace__parent_wait_after_at close(cpipe[0]); /* Wait for the parent to attach. */ - ATF_REQUIRE(read(cpipe[1], &c, sizeof(c)) == 0); + CHILD_REQUIRE(read(cpipe[1], &c, sizeof(c)) == 0); exit(1); } @@ -154,7 +176,7 @@ ATF_TC_BODY(ptrace__parent_sees_exit_aft close(cpipe[0]); /* Wait for parent to be ready. */ - ATF_REQUIRE(read(cpipe[1], &c, sizeof(c)) == sizeof(c)); + CHILD_REQUIRE(read(cpipe[1], &c, sizeof(c)) == sizeof(c)); exit(1); } @@ -167,25 +189,25 @@ ATF_TC_BODY(ptrace__parent_sees_exit_aft /* Debugger process. */ close(dpipe[0]); - ATF_REQUIRE(ptrace(PT_ATTACH, child, NULL, 0) != -1); + CHILD_REQUIRE(ptrace(PT_ATTACH, child, NULL, 0) != -1); wpid = waitpid(child, &status, 0); - ATF_REQUIRE(wpid == child); - ATF_REQUIRE(WIFSTOPPED(status)); - ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + CHILD_REQUIRE(wpid == child); + CHILD_REQUIRE(WIFSTOPPED(status)); + CHILD_REQUIRE(WSTOPSIG(status) == SIGSTOP); - ATF_REQUIRE(ptrace(PT_CONTINUE, child, (caddr_t)1, 0) != -1); + CHILD_REQUIRE(ptrace(PT_CONTINUE, child, (caddr_t)1, 0) != -1); /* Signal parent that debugger is attached. */ - ATF_REQUIRE(write(dpipe[1], &c, sizeof(c)) == sizeof(c)); + CHILD_REQUIRE(write(dpipe[1], &c, sizeof(c)) == sizeof(c)); /* Wait for parent's failed wait. */ - ATF_REQUIRE(read(dpipe[1], &c, sizeof(c)) == 0); + CHILD_REQUIRE(read(dpipe[1], &c, sizeof(c)) == 0); wpid = waitpid(child, &status, 0); - ATF_REQUIRE(wpid == child); - ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 1); + CHILD_REQUIRE(wpid == child); + CHILD_REQUIRE(WIFEXITED(status)); + CHILD_REQUIRE(WEXITSTATUS(status) == 1); exit(0); } @@ -268,7 +290,7 @@ ATF_TC_BODY(ptrace__parent_sees_exit_aft close(cpipe[0]); /* Wait for parent to be ready. */ - ATF_REQUIRE(read(cpipe[1], &c, sizeof(c)) == sizeof(c)); + CHILD_REQUIRE(read(cpipe[1], &c, sizeof(c)) == sizeof(c)); exit(1); } @@ -284,32 +306,32 @@ ATF_TC_BODY(ptrace__parent_sees_exit_aft * Fork again and drop the debugger parent so that the * debugger is not a child of the main parent. */ - ATF_REQUIRE((fpid = fork()) != -1); + CHILD_REQUIRE((fpid = fork()) != -1); if (fpid != 0) exit(2); /* Debugger process. */ close(dpipe[0]); - ATF_REQUIRE(ptrace(PT_ATTACH, child, NULL, 0) != -1); + CHILD_REQUIRE(ptrace(PT_ATTACH, child, NULL, 0) != -1); wpid = waitpid(child, &status, 0); - ATF_REQUIRE(wpid == child); - ATF_REQUIRE(WIFSTOPPED(status)); - ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + CHILD_REQUIRE(wpid == child); + CHILD_REQUIRE(WIFSTOPPED(status)); + CHILD_REQUIRE(WSTOPSIG(status) == SIGSTOP); - ATF_REQUIRE(ptrace(PT_CONTINUE, child, (caddr_t)1, 0) != -1); + CHILD_REQUIRE(ptrace(PT_CONTINUE, child, (caddr_t)1, 0) != -1); /* Signal parent that debugger is attached. */ - ATF_REQUIRE(write(dpipe[1], &c, sizeof(c)) == sizeof(c)); + CHILD_REQUIRE(write(dpipe[1], &c, sizeof(c)) == sizeof(c)); /* Wait for parent's failed wait. */ - ATF_REQUIRE(read(dpipe[1], &c, sizeof(c)) == sizeof(c)); + CHILD_REQUIRE(read(dpipe[1], &c, sizeof(c)) == sizeof(c)); wpid = waitpid(child, &status, 0); - ATF_REQUIRE(wpid == child); - ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 1); + CHILD_REQUIRE(wpid == child); + CHILD_REQUIRE(WIFEXITED(status)); + CHILD_REQUIRE(WEXITSTATUS(status) == 1); exit(0); } From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 21:54:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F07904EE; Thu, 4 Jun 2015 21:54:46 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE86C101C; Thu, 4 Jun 2015 21:54:46 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t54Lsk2A041534; Thu, 4 Jun 2015 21:54:46 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t54LskQu041533; Thu, 4 Jun 2015 21:54:46 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201506042154.t54LskQu041533@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Thu, 4 Jun 2015 21:54:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284001 - head/lib/libc/string 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 21:54:47 -0000 Author: jilles Date: Thu Jun 4 21:54:46 2015 New Revision: 284001 URL: https://svnweb.freebsd.org/changeset/base/284001 Log: strchr(3): Mdoc fixes. Modified: head/lib/libc/string/strchr.3 Modified: head/lib/libc/string/strchr.3 ============================================================================== --- head/lib/libc/string/strchr.3 Thu Jun 4 21:07:27 2015 (r284000) +++ head/lib/libc/string/strchr.3 Thu Jun 4 21:54:46 2015 (r284001) @@ -113,10 +113,12 @@ and .Fn strrchr conform to .St -isoC . -The +The function .Fn strchrnul -is a GNU extension . -.Sh History +is a +.Tn GNU +extension. +.Sh HISTORY The .Fn strchrnul function first appeared in glibc 2.1.1 and was added in From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 22:11:41 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0769BA29; Thu, 4 Jun 2015 22:11:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE8301506; Thu, 4 Jun 2015 22:11:40 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t54MBea3050303; Thu, 4 Jun 2015 22:11:40 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t54MBeW1050301; Thu, 4 Jun 2015 22:11:40 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201506042211.t54MBeW1050301@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 4 Jun 2015 22:11:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284002 - in stable/10: share/mk 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 22:11:41 -0000 Author: imp Date: Thu Jun 4 22:11:39 2015 New Revision: 284002 URL: https://svnweb.freebsd.org/changeset/base/284002 Log: MFC: Merge more of the dtb machinery Merge 278459,278460,278461,278462 which define DTBDIR and other things needed for install to work. Although the commit in head kinda fixed install_as_user, it's unknown if that works in 10.x (it didn't the last time I tried). Modified: stable/10/share/mk/bsd.own.mk stable/10/sys/conf/dtb.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Thu Jun 4 21:54:46 2015 (r284001) +++ stable/10/share/mk/bsd.own.mk Thu Jun 4 22:11:39 2015 (r284002) @@ -143,6 +143,10 @@ KMODDIR?= /boot/kernel KMODOWN?= ${BINOWN} KMODGRP?= ${BINGRP} KMODMODE?= ${BINMODE} +DTBDIR?= /boot/dtb +DTBOWN?= root +DTBGRP?= wheel +DTBMODE?= 444 LIBDIR?= /usr/lib LIBCOMPATDIR?= /usr/lib/compat @@ -683,7 +687,7 @@ _uid!= id -u USER!= id -un .endif _gid!= id -gn -.for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE +.for x in BIN CONF DOC DTB INFO KMOD LIB MAN NLS SHARE $xOWN= ${USER} $xGRP= ${_gid} .endfor Modified: stable/10/sys/conf/dtb.mk ============================================================================== --- stable/10/sys/conf/dtb.mk Thu Jun 4 21:54:46 2015 (r284001) +++ stable/10/sys/conf/dtb.mk Thu Jun 4 22:11:39 2015 (r284002) @@ -45,7 +45,6 @@ SYSDIR= ${_dir} .PATH: ${SYSDIR}/gnu/dts/${MACHINE} ${SYSDIR}/boot/fdt/dts/${MACHINE} -DTBDIR?=/boot/dtb DTB=${DTS:R:S/$/.dtb/} all: ${DTB} @@ -64,6 +63,10 @@ CLEANFILES+=${_dts:R:S/$/.dtb/} realinstall: _dtbinstall .ORDER: beforeinstall _kmodinstall _dtbinstall: +# Need to create this because installkernel doesn't invoke mtree with BSD.root.mtree +# to make sure the tree is setup properly. This may break ownership of ${DTBDIR} +# for no-root build. + mkdir -p ${DESTDIR}${DTBDIR} .for _dtb in ${DTB} ${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ ${_INSTALLFLAGS} ${_dtb} ${DESTDIR}${DTBDIR} From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 23:07:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41BA163F; Thu, 4 Jun 2015 23:07:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FE9D10CD; Thu, 4 Jun 2015 23:07:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t54N7MnO077960; Thu, 4 Jun 2015 23:07:22 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t54N7M1B077959; Thu, 4 Jun 2015 23:07:22 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201506042307.t54N7M1B077959@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 4 Jun 2015 23:07:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284003 - head/sys/net80211 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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 23:07:22 -0000 Author: adrian Date: Thu Jun 4 23:07:21 2015 New Revision: 284003 URL: https://svnweb.freebsd.org/changeset/base/284003 Log: Some hostap setups may result in raw frames being transmitted with no parameters set. So, don't unconditionally call things. Thanks to jkim@ for pointing this out! MFC after: 2 weeks Sponsored by: Norse Corp, Inc. Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Thu Jun 4 22:11:39 2015 (r284002) +++ head/sys/net80211/ieee80211_output.c Thu Jun 4 23:07:21 2015 (r284003) @@ -525,7 +525,8 @@ ieee80211_raw_output(struct ieee80211vap * they'll have to be added - so fail the transmit if * they can't be. */ - (void) ieee80211_add_xmit_params(m, params); + if (params) + (void) ieee80211_add_xmit_params(m, params); return (ic->ic_raw_xmit(ni, m, params)); } From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 23:11:25 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5050B7C1; Thu, 4 Jun 2015 23:11:25 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EC941277; Thu, 4 Jun 2015 23:11:25 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t54NBPvQ082169; Thu, 4 Jun 2015 23:11:25 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t54NBP7L082168; Thu, 4 Jun 2015 23:11:25 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201506042311.t54NBP7L082168@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 4 Jun 2015 23:11:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284004 - head/release/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.20 Precedence: list List-Id: "SVN commit messages 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, 04 Jun 2015 23:11:25 -0000 Author: gjb Date: Thu Jun 4 23:11:24 2015 New Revision: 284004 URL: https://svnweb.freebsd.org/changeset/base/284004 Log: Make sure /home exists within the DESTDIR before creating the 'freebsd' user account. Sponsored by: The FreeBSD Foundation Modified: head/release/tools/arm.subr Modified: head/release/tools/arm.subr ============================================================================== --- head/release/tools/arm.subr Thu Jun 4 23:07:21 2015 (r284003) +++ head/release/tools/arm.subr Thu Jun 4 23:11:24 2015 (r284004) @@ -82,6 +82,7 @@ arm_create_user() { # and set the default password for the 'root' user to 'root'. chroot ${CHROOTDIR} /usr/sbin/pw -R ${DESTDIR} \ groupadd freebsd -g 1001 + chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/home chroot ${CHROOTDIR} /usr/sbin/pw -R ${DESTDIR} \ useradd freebsd \ -m -M 0755 -w yes -n freebsd -u 1001 -g 1001 -G 0 \ From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 00:28:39 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE7E3CA; Fri, 5 Jun 2015 00:28:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C67E13BB; Fri, 5 Jun 2015 00:28:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t550SdOZ018490; Fri, 5 Jun 2015 00:28:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t550Sd7q018489; Fri, 5 Jun 2015 00:28:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201506050028.t550Sd7q018489@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 5 Jun 2015 00:28:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284005 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 00:28:39 -0000 Author: gjb Date: Fri Jun 5 00:28:38 2015 New Revision: 284005 URL: https://svnweb.freebsd.org/changeset/base/284005 Log: MFC r283919: Remove trailing tabs to avoid spamming stdout with long lines. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile.ec2 Directory Properties: stable/10/ (props changed) Modified: stable/10/release/Makefile.ec2 ============================================================================== --- stable/10/release/Makefile.ec2 Thu Jun 4 23:11:24 2015 (r284004) +++ stable/10/release/Makefile.ec2 Fri Jun 5 00:28:38 2015 (r284005) @@ -51,9 +51,9 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL} @echo "--------------------------------------------------------------" @false .endif - /usr/local/bin/bsdec2-image-upload ${PUBLISH} \ - ${.OBJDIR}/ec2.raw \ - "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \ - "${TYPE} ${REVISION}-${BRANCH}-${TARGET}" \ + /usr/local/bin/bsdec2-image-upload ${PUBLISH} \ + ${.OBJDIR}/ec2.raw \ + "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \ + "${TYPE} ${REVISION}-${BRANCH}-${TARGET}" \ ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} @touch ${.TARGET} From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 00:35:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3DFAD44B; Fri, 5 Jun 2015 00:35:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C59A169A; Fri, 5 Jun 2015 00:35:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t550ZI0G023110; Fri, 5 Jun 2015 00:35:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t550ZICa023109; Fri, 5 Jun 2015 00:35:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201506050035.t550ZICa023109@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 5 Jun 2015 00:35: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: r284006 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 00:35:18 -0000 Author: mav Date: Fri Jun 5 00:35:17 2015 New Revision: 284006 URL: https://svnweb.freebsd.org/changeset/base/284006 Log: MFC r283936: Restore AHCI quirks printing as base16. smh@ at r278034 made it base17, that is somewhat odd. :) Modified: stable/10/sys/dev/ahci/ahci.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ahci/ahci.h ============================================================================== --- stable/10/sys/dev/ahci/ahci.h Fri Jun 5 00:28:38 2015 (r284005) +++ stable/10/sys/dev/ahci/ahci.h Fri Jun 5 00:35:17 2015 (r284006) @@ -576,7 +576,7 @@ enum ahci_err_type { #define AHCI_Q_1MSI 0x00020000 #define AHCI_Q_BIT_STRING \ - "\021" \ + "\020" \ "\001NOFORCE" \ "\002NOPMP" \ "\003NONCQ" \ From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 00:37:47 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E8D6742; Fri, 5 Jun 2015 00:37:47 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D3C91750; Fri, 5 Jun 2015 00:37:47 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t550blUC023528; Fri, 5 Jun 2015 00:37:47 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t550blOm023527; Fri, 5 Jun 2015 00:37:47 GMT (envelope-from np@FreeBSD.org) Message-Id: <201506050037.t550blOm023527@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 5 Jun 2015 00:37:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284007 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 00:37:47 -0000 Author: np Date: Fri Jun 5 00:37:46 2015 New Revision: 284007 URL: https://svnweb.freebsd.org/changeset/base/284007 Log: cxgbe: set the minimum burst size when fetching fl buffers to 128B for netmap rx queues too. This should have gone in as part of r283858. Modified: head/sys/dev/cxgbe/t4_netmap.c Modified: head/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- head/sys/dev/cxgbe/t4_netmap.c Fri Jun 5 00:35:17 2015 (r284006) +++ head/sys/dev/cxgbe/t4_netmap.c Fri Jun 5 00:37:46 2015 (r284007) @@ -297,7 +297,7 @@ alloc_nm_rxq_hwq(struct port_info *pi, s (fl_pad ? F_FW_IQ_CMD_FL0PADEN : 0) | (black_hole == 2 ? F_FW_IQ_CMD_FL0PACKEN : 0)); c.fl0dcaen_to_fl0cidxfthresh = - htobe16(V_FW_IQ_CMD_FL0FBMIN(X_FETCHBURSTMIN_64B) | + htobe16(V_FW_IQ_CMD_FL0FBMIN(X_FETCHBURSTMIN_128B) | V_FW_IQ_CMD_FL0FBMAX(X_FETCHBURSTMAX_512B)); c.fl0size = htobe16(na->num_rx_desc / 8 + spg_len / EQ_ESIZE); c.fl0addr = htobe64(nm_rxq->fl_ba); From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 00:39:38 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A85B9A0E; Fri, 5 Jun 2015 00:39:38 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A898182D; Fri, 5 Jun 2015 00:39:38 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t550dc8a023829; Fri, 5 Jun 2015 00:39:38 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t550dZHM023806; Fri, 5 Jun 2015 00:39:35 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201506050039.t550dZHM023806@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 5 Jun 2015 00:39: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: r284008 - stable/10/bin/pax 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 00:39:38 -0000 Author: delphij Date: Fri Jun 5 00:39:34 2015 New Revision: 284008 URL: https://svnweb.freebsd.org/changeset/base/284008 Log: MFC r283257: Eliminate unneeded includes. Modified: stable/10/bin/pax/ar_subs.c stable/10/bin/pax/buf_subs.c stable/10/bin/pax/cache.c stable/10/bin/pax/cpio.c stable/10/bin/pax/file_subs.c stable/10/bin/pax/gen_subs.c stable/10/bin/pax/getoldopt.c stable/10/bin/pax/pat_rep.c stable/10/bin/pax/pax.c stable/10/bin/pax/sel_subs.c stable/10/bin/pax/tar.c stable/10/bin/pax/tty_subs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/pax/ar_subs.c ============================================================================== --- stable/10/bin/pax/ar_subs.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/ar_subs.c Fri Jun 5 00:39:34 2015 (r284008) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include "pax.h" #include "extern.h" Modified: stable/10/bin/pax/buf_subs.c ============================================================================== --- stable/10/bin/pax/buf_subs.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/buf_subs.c Fri Jun 5 00:39:34 2015 (r284008) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "pax.h" #include "extern.h" Modified: stable/10/bin/pax/cache.c ============================================================================== --- stable/10/bin/pax/cache.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/cache.c Fri Jun 5 00:39:34 2015 (r284008) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "pax.h" #include "cache.h" Modified: stable/10/bin/pax/cpio.c ============================================================================== --- stable/10/bin/pax/cpio.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/cpio.c Fri Jun 5 00:39:34 2015 (r284008) @@ -45,8 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include "pax.h" #include "cpio.h" #include "extern.h" Modified: stable/10/bin/pax/file_subs.c ============================================================================== --- stable/10/bin/pax/file_subs.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/file_subs.c Fri Jun 5 00:39:34 2015 (r284008) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include "pax.h" #include "options.h" #include "extern.h" Modified: stable/10/bin/pax/gen_subs.c ============================================================================== --- stable/10/bin/pax/gen_subs.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/gen_subs.c Fri Jun 5 00:39:34 2015 (r284008) @@ -45,8 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include #include "pax.h" #include "extern.h" Modified: stable/10/bin/pax/getoldopt.c ============================================================================== --- stable/10/bin/pax/getoldopt.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/getoldopt.c Fri Jun 5 00:39:34 2015 (r284008) @@ -19,8 +19,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "pax.h" -#include "extern.h" +int getoldopt(int, char **, const char *); int getoldopt(int argc, char **argv, const char *optstring) Modified: stable/10/bin/pax/pat_rep.c ============================================================================== --- stable/10/bin/pax/pat_rep.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/pat_rep.c Fri Jun 5 00:39:34 2015 (r284008) @@ -43,9 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #ifdef NET2_REGEX #include #else Modified: stable/10/bin/pax/pax.c ============================================================================== --- stable/10/bin/pax/pax.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/pax.c Fri Jun 5 00:39:34 2015 (r284008) @@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include "pax.h" #include "extern.h" static int gen_init(void); Modified: stable/10/bin/pax/sel_subs.c ============================================================================== --- stable/10/bin/pax/sel_subs.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/sel_subs.c Fri Jun 5 00:39:34 2015 (r284008) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "pax.h" #include "sel_subs.h" Modified: stable/10/bin/pax/tar.c ============================================================================== --- stable/10/bin/pax/tar.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/tar.c Fri Jun 5 00:39:34 2015 (r284008) @@ -44,8 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include "pax.h" #include "extern.h" #include "tar.h" Modified: stable/10/bin/pax/tty_subs.c ============================================================================== --- stable/10/bin/pax/tty_subs.c Fri Jun 5 00:37:46 2015 (r284007) +++ stable/10/bin/pax/tty_subs.c Fri Jun 5 00:39:34 2015 (r284008) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "pax.h" #include "extern.h" From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 00:46:51 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 602651D8; Fri, 5 Jun 2015 00:46:51 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 420301D32; Fri, 5 Jun 2015 00:46:51 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t550kpPq028463; Fri, 5 Jun 2015 00:46:51 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t550ko6w028457; Fri, 5 Jun 2015 00:46:50 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201506050046.t550ko6w028457@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Fri, 5 Jun 2015 00:46: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: r284009 - in stable/10: etc/rc.d share/man/man7 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 00:46:51 -0000 Author: cperciva Date: Fri Jun 5 00:46:49 2015 New Revision: 284009 URL: https://svnweb.freebsd.org/changeset/base/284009 Log: MFC r273955,274060,274164: Add /etc/rc.d/growfs script. Added: stable/10/etc/rc.d/growfs - copied, changed from r273955, head/etc/rc.d/growfs stable/10/share/man/man7/growfs.7 - copied unchanged from r273955, head/share/man/man7/growfs.7 Modified: stable/10/etc/rc.d/Makefile stable/10/share/man/man7/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Fri Jun 5 00:39:34 2015 (r284008) +++ stable/10/etc/rc.d/Makefile Fri Jun 5 00:46:49 2015 (r284009) @@ -37,6 +37,7 @@ FILES= DAEMON \ geli \ geli2 \ gptboot \ + growfs \ gssd \ ${_hcsecd} \ hostid \ Copied and modified: stable/10/etc/rc.d/growfs (from r273955, head/etc/rc.d/growfs) ============================================================================== --- head/etc/rc.d/growfs Sun Nov 2 00:11:25 2014 (r273955, copy source) +++ stable/10/etc/rc.d/growfs Fri Jun 5 00:46:49 2015 (r284009) @@ -35,9 +35,7 @@ # and have it work on essentially any size drive. # # TODO: Figure out where this should really be ordered. -# I suspect it should go just after fsck but before mountcritlocal -# but it's hard to tell for sure because of the bug described -# below. +# I suspect it should go just after fsck but before mountcritlocal. # . /etc/rc.subr @@ -49,20 +47,20 @@ rcvar="growfs_enable" growfs_start () { - echo "Growing root partition to fill device" - rootdev=$(df / | tail -n 1 | awk '{ sub("/dev/", "", $1); print $1 }') - if [ x"$rootdev" = x"${rootdev%/*}" ]; then - # raw device - rawdev="$rootdev" - else - rawdev=$(glabel status | awk '$1 == "'"$rootdev"'" { print $3 }') - if [ x"$rawdev" = x"" ]; then - echo "Can't figure out device for: $rootdev" - return + echo "Growing root partition to fill device" + rootdev=$(df / | tail -n 1 | awk '{ sub("/dev/", "", $1); print $1 }') + if [ x"$rootdev" = x"${rootdev%/*}" ]; then + # raw device + rawdev="$rootdev" + else + rawdev=$(glabel status | awk '$1 == "'"$rootdev"'" { print $3 }') + if [ x"$rawdev" = x"" ]; then + echo "Can't figure out device for: $rootdev" + return + fi fi - fi - sysctl -b kern.geom.conftxt | awk ' + sysctl -b kern.geom.conftxt | awk ' { lvl=$1 device[lvl] = $3 @@ -91,7 +89,7 @@ growfs_start () exit 0 } }' dev="$rawdev" - growfs -y /dev/"$rootdev" + growfs -y /dev/"$rootdev" } load_rc_config $name Modified: stable/10/share/man/man7/Makefile ============================================================================== --- stable/10/share/man/man7/Makefile Fri Jun 5 00:39:34 2015 (r284008) +++ stable/10/share/man/man7/Makefile Fri Jun 5 00:46:49 2015 (r284009) @@ -14,6 +14,7 @@ MAN= adding_user.7 \ environ.7 \ ffs.7 \ firewall.7 \ + growfs.7 \ hier.7 \ hostname.7 \ intro.7 \ Copied: stable/10/share/man/man7/growfs.7 (from r273955, head/share/man/man7/growfs.7) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man7/growfs.7 Fri Jun 5 00:46:49 2015 (r284009, copy of r273955, head/share/man/man7/growfs.7) @@ -0,0 +1,64 @@ +.\" Copyright 2014 John-Mark Gurney +.\" 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 November 1, 2014 +.Dt GROWFS 7 +.Os +.Sh NAME +.Nm growfs +.Nd start up script to grow the root file-system. +.Sh DESCRIPTION +The following options in +.Pa /etc/rc.conf +control the behavior of +.Nm : +.Bl -tag -width ".Va growfs_enable" -offset indent +.It Va growfs_enable +.Pq Dq Li NO +If set to +.Dq Li YES , +the first time the machine boots, the root file-system will be automatically +expanded, if possible, to fill up all available space after it. +.El +.Pp +To expand the root file-system with-out rebooting, run the following command: +.Dl % /etc/rc.d/growfs onestart +.Sh IMPLEMENTATION NOTES +The script requires that +.Pa awk +be present and on the path. +This usually means that +.Pa /usr +should be mounted prior to running the script. +.Sh FILES +.Pa /etc/rc.conf +.Sh EXIT STATUS +.Ex -std +.Sh SEE ALSO +.Xr rc.conf 5 +.Sh AUTHORS +The man page and script were written by +.An John-Mark Gurney Aq Mt jmg@FreeBSD.org . From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 02:22:05 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42782BA6; Fri, 5 Jun 2015 02:22:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 310B21431; Fri, 5 Jun 2015 02:22:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t552M563076847; Fri, 5 Jun 2015 02:22:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t552M5UL076846; Fri, 5 Jun 2015 02:22:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201506050222.t552M5UL076846@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 5 Jun 2015 02:22:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284010 - head/release/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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 02:22:05 -0000 Author: gjb Date: Fri Jun 5 02:22:04 2015 New Revision: 284010 URL: https://svnweb.freebsd.org/changeset/base/284010 Log: Work around a potential bug in pw(8) when '-m' is specified. According to the manual page, '-m' should create the user home directory, however rigorous testing suggests it does not, and it is unclear if this is an implementation or expectation issue. Sponsored by: The FreeBSD Foundation Modified: head/release/tools/arm.subr Modified: head/release/tools/arm.subr ============================================================================== --- head/release/tools/arm.subr Fri Jun 5 00:46:49 2015 (r284009) +++ head/release/tools/arm.subr Fri Jun 5 02:22:04 2015 (r284010) @@ -82,7 +82,7 @@ arm_create_user() { # and set the default password for the 'root' user to 'root'. chroot ${CHROOTDIR} /usr/sbin/pw -R ${DESTDIR} \ groupadd freebsd -g 1001 - chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/home + chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/home/freebsd chroot ${CHROOTDIR} /usr/sbin/pw -R ${DESTDIR} \ useradd freebsd \ -m -M 0755 -w yes -n freebsd -u 1001 -g 1001 -G 0 \ From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 02:25:44 2015 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71116D42; Fri, 5 Jun 2015 02:25:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Fri, 5 Jun 2015 02:25:40 +0000 From: Glen Barber To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284010 - head/release/tools Message-ID: <20150605022540.GN1550@hub.FreeBSD.org> References: <201506050222.t552M5UL076846@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lCFQJunhLz1tFGpX" Content-Disposition: inline In-Reply-To: <201506050222.t552M5UL076846@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 X-PEKBAC-Definition: Problem Exists, Keyboard Between Admin/Computer User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 02:25:44 -0000 --lCFQJunhLz1tFGpX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 05, 2015 at 02:22:05AM +0000, Glen Barber wrote: > Author: gjb > Date: Fri Jun 5 02:22:04 2015 > New Revision: 284010 > URL: https://svnweb.freebsd.org/changeset/base/284010 >=20 > Log: > Work around a potential bug in pw(8) when '-m' is specified. > According to the manual page, '-m' should create the user home > directory, however rigorous testing suggests it does not, and > it is unclear if this is an implementation or expectation issue. > =20 MFC after: I figure out WTF is going on here... Glen --lCFQJunhLz1tFGpX Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVcQieAAoJEAMUWKVHj+KTvBQP/i/IBiK2tELVL+JWCOHeab0J eR9iauUzCShlHNe94/Sz12K/jmBDp6WNZDx8MRNNsijR9po0XhJsKR4CUSEvB18K ZgWYd74gqmIqFdpjlrp2Poo3tBr4teecNrZw/4Pc9/yrzIy33LOTabMnx3JM4iN3 vgEuG/JASJc+DeG6DxS9DQitiq4jypL941ILzt2W2iqEyLnawbqinGlsft/6mlMj p1zsve7aZOd8NO32QZ2uiKVRpvbd+aVTb3qiGNGDXp6c0XGGO5waDobamanovjIq bULlyfhIlSoXtoVgJfJyw6bqrMSqJBgDl1otqi5GXTinwuhmeNZShy+L3yWVVMi7 M0hSq0qnzNQrXbzhWLaPdI77t8aYmOZp7lWoAwdKtvE5hZeiSzvJgkvLfgtkBu2K rjXI9LSDNeQhV8XAxJU4GTVIOdRHYXYVQC2cenzFAlS4B8x/WqfsJlboFn/NFAQq UekkRXYI1d8Oj+MTkpdK9LcsjDoYkYDZmZwPgOOGtOkQ5yTvGXlIPNI+jIpZOhOB We3GxajeM3GX/LQWv9CWUiGZz6S1DBs1hNfiA7eAmDb+Ba/jyQbe2u2TNSCW9s7H JvT+Ohskv2N4HdRCUXb7FA9ptWSozBptn1tGV8lcpY9RmsvYYiOl1M07OZHinri3 XgyheJ8RJ32P/0Yw7/uO =ERLO -----END PGP SIGNATURE----- --lCFQJunhLz1tFGpX-- From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 06:06:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1BDE5779; Fri, 5 Jun 2015 06:06:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09D4F168D; Fri, 5 Jun 2015 06:06:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55667RM087503; Fri, 5 Jun 2015 06:06:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55667v4087502; Fri, 5 Jun 2015 06:06:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201506050606.t55667v4087502@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 5 Jun 2015 06:06:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284011 - head/sys/dev/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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 06:06:08 -0000 Author: hselasky Date: Fri Jun 5 06:06:07 2015 New Revision: 284011 URL: https://svnweb.freebsd.org/changeset/base/284011 Log: Don't wait forever for USB data to be flushed. MFC after: 1 week Modified: head/sys/dev/usb/usb_dev.c Modified: head/sys/dev/usb/usb_dev.c ============================================================================== --- head/sys/dev/usb/usb_dev.c Fri Jun 5 02:22:04 2015 (r284010) +++ head/sys/dev/usb/usb_dev.c Fri Jun 5 06:06:07 2015 (r284011) @@ -830,7 +830,8 @@ usb_fifo_close(struct usb_fifo *f, int f (!f->flag_iserror)) { /* wait until all data has been written */ f->flag_sleeping = 1; - err = cv_wait_sig(&f->cv_io, f->priv_mtx); + err = cv_timedwait_sig(&f->cv_io, f->priv_mtx, + USB_MS_TO_TICKS(USB_DEFAULT_TIMEOUT)); if (err) { DPRINTF("signal received\n"); break; From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 06:23:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA8919CB; Fri, 5 Jun 2015 06:23:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B80AC1AA7; Fri, 5 Jun 2015 06:23:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t556N4NF096923; Fri, 5 Jun 2015 06:23:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t556N48w096922; Fri, 5 Jun 2015 06:23:04 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201506050623.t556N48w096922@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 5 Jun 2015 06:23:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284012 - head/sys/dev/pci 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 06:23:04 -0000 Author: hselasky Date: Fri Jun 5 06:23:03 2015 New Revision: 284012 URL: https://svnweb.freebsd.org/changeset/base/284012 Log: Disable VGA PCI interrupts until a chipset driver is loaded for VGA PCI devices. Else unhandled display adapter interrupts might freeze the CPU or consume a lot of CPU. PR: 156596 MFC after: 1 week Modified: head/sys/dev/pci/vga_pci.c Modified: head/sys/dev/pci/vga_pci.c ============================================================================== --- head/sys/dev/pci/vga_pci.c Fri Jun 5 06:06:07 2015 (r284011) +++ head/sys/dev/pci/vga_pci.c Fri Jun 5 06:23:03 2015 (r284012) @@ -126,6 +126,13 @@ vga_pci_is_boot_display(device_t dev) if ((config & (PCIM_CMD_PORTEN | PCIM_CMD_MEMEN)) == 0) return (0); + /* + * Disable interrupts until a chipset driver is loaded for + * this PCI device. Else unhandled display adapter interrupts + * might freeze the CPU. + */ + pci_write_config(dev, PCIR_COMMAND, config | PCIM_CMD_INTxDIS, 2); + /* This video card is the boot display: record its unit number. */ vga_pci_default_unit = unit; device_set_flags(dev, 1); From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 06:46:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A973BD01; Fri, 5 Jun 2015 06:46:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 972021F7D; Fri, 5 Jun 2015 06:46:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t556kCMW007256; Fri, 5 Jun 2015 06:46:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t556kCnv007255; Fri, 5 Jun 2015 06:46:12 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201506050646.t556kCnv007255@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 5 Jun 2015 06:46:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284013 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 06:46:12 -0000 Author: mav Date: Fri Jun 5 06:46:11 2015 New Revision: 284013 URL: https://svnweb.freebsd.org/changeset/base/284013 Log: Allow setting only WWNN or only WWPN. MFC after: 2 weeks Modified: head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Fri Jun 5 06:23:03 2015 (r284012) +++ head/sys/cam/ctl/scsi_ctl.c Fri Jun 5 06:46:11 2015 (r284013) @@ -1657,16 +1657,24 @@ ctlfe_onoffline(void *arg, int online) * down to the SIM. Otherwise, record what the SIM * has reported. */ - if ((bus_softc->port.wwnn != 0) - && (bus_softc->port.wwpn != 0)) { + if (bus_softc->port.wwnn != 0 && bus_softc->port.wwnn + != ccb->knob.xport_specific.fc.wwnn) { ccb->knob.xport_specific.fc.wwnn = - bus_softc->port.wwnn; - ccb->knob.xport_specific.fc.wwpn = - bus_softc->port.wwpn; + bus_softc->port.wwnn; set_wwnn = 1; } else { ctl_port_set_wwns(&bus_softc->port, true, ccb->knob.xport_specific.fc.wwnn, + false, 0); + } + if (bus_softc->port.wwpn != 0 && bus_softc->port.wwpn + != ccb->knob.xport_specific.fc.wwpn) { + ccb->knob.xport_specific.fc.wwpn = + bus_softc->port.wwpn; + set_wwnn = 1; + } else { + ctl_port_set_wwns(&bus_softc->port, + false, 0, true, ccb->knob.xport_specific.fc.wwpn); } #endif /* RANDOM_WWNN */ From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 06:49:09 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35C48E9D; Fri, 5 Jun 2015 06:49:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2380C1F9B; Fri, 5 Jun 2015 06:49:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t556n9xn007674; Fri, 5 Jun 2015 06:49:09 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t556n9LI007673; Fri, 5 Jun 2015 06:49:09 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201506050649.t556n9LI007673@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 5 Jun 2015 06:49:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284014 - head/sys/net80211 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 06:49:09 -0000 Author: adrian Date: Fri Jun 5 06:49:08 2015 New Revision: 284014 URL: https://svnweb.freebsd.org/changeset/base/284014 Log: For now, just default to presenting "found" channels as 11g, not 11b. The intel 7260 driver under development requires this - the scans come in as normal frames but with the frequency provided. The correct method is to have the driver provide flags (so we can determine if it's 11b or 11g); this will have to do in the meantime. Without this, the channel found is 11b, and no ERP (ie "11g") bits are negotiated with the AP. This allows the 7260 in 2ghz mode to operate in 11bg, rather than just 11b. Tested: * intel 7260 driver, 11bg channels Modified: head/sys/net80211/ieee80211.c Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Fri Jun 5 06:46:11 2015 (r284013) +++ head/sys/net80211/ieee80211.c Fri Jun 5 06:49:08 2015 (r284014) @@ -1081,7 +1081,7 @@ ieee80211_lookup_channel_rxstatus(struct /* Determine a band */ /* XXX should be done by the driver? */ if (rxs->c_freq < 3000) { - flags = IEEE80211_CHAN_B; + flags = IEEE80211_CHAN_G; } else { flags = IEEE80211_CHAN_A; } From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 07:17:15 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 019933D9; Fri, 5 Jun 2015 07:17:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2B4E16B7; Fri, 5 Jun 2015 07:17:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t557HEHb022384; Fri, 5 Jun 2015 07:17:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t557HEkI022383; Fri, 5 Jun 2015 07:17:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201506050717.t557HEkI022383@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 5 Jun 2015 07:17: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: r284015 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 07:17:15 -0000 Author: hselasky Date: Fri Jun 5 07:17:14 2015 New Revision: 284015 URL: https://svnweb.freebsd.org/changeset/base/284015 Log: MFC r283922: Fix for control endpoint handling in the DWC OTG driver. The data stage processing is only allowed after the setup complete event has been received. Else a race may occur and the OUT data can be corrupted. While at it ensure resetting a FIFO has the required wait loop. Modified: stable/10/sys/dev/usb/controller/dwc_otg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- stable/10/sys/dev/usb/controller/dwc_otg.c Fri Jun 5 06:49:08 2015 (r284014) +++ stable/10/sys/dev/usb/controller/dwc_otg.c Fri Jun 5 07:17:14 2015 (r284015) @@ -181,6 +181,22 @@ dwc_otg_get_hw_ep_profile(struct usb_dev *ppf = NULL; } +static void +dwc_otg_tx_fifo_reset(struct dwc_otg_softc *sc, uint32_t value) +{ + uint32_t temp; + + /* reset FIFO */ + DWC_OTG_WRITE_4(sc, DOTG_GRSTCTL, value); + + /* wait for reset to complete */ + for (temp = 0; temp != 16; temp++) { + value = DWC_OTG_READ_4(sc, DOTG_GRSTCTL); + if (!(value & (GRSTCTL_TXFFLSH | GRSTCTL_RXFFLSH))) + break; + } +} + static int dwc_otg_init_fifo(struct dwc_otg_softc *sc, uint8_t mode) { @@ -335,12 +351,11 @@ dwc_otg_init_fifo(struct dwc_otg_softc * } /* reset RX FIFO */ - DWC_OTG_WRITE_4(sc, DOTG_GRSTCTL, - GRSTCTL_RXFFLSH); + dwc_otg_tx_fifo_reset(sc, GRSTCTL_RXFFLSH); if (mode != DWC_MODE_OTG) { /* reset all TX FIFOs */ - DWC_OTG_WRITE_4(sc, DOTG_GRSTCTL, + dwc_otg_tx_fifo_reset(sc, GRSTCTL_TXFIFO(0x10) | GRSTCTL_TXFFLSH); } else { @@ -951,15 +966,21 @@ dwc_otg_setup_rx(struct dwc_otg_softc *s if (GRXSTSRD_CHNUM_GET(sc->sc_last_rx_status) != 0) goto not_complete; - if ((sc->sc_last_rx_status & GRXSTSRD_DPID_MASK) != - GRXSTSRD_DPID_DATA0) { + if ((sc->sc_last_rx_status & GRXSTSRD_PKTSTS_MASK) != + GRXSTSRD_STP_DATA) { + if ((sc->sc_last_rx_status & GRXSTSRD_PKTSTS_MASK) != + GRXSTSRD_STP_COMPLETE || td->remainder != 0) { + /* release FIFO */ + dwc_otg_common_rx_ack(sc); + goto not_complete; + } /* release FIFO */ dwc_otg_common_rx_ack(sc); - goto not_complete; + return (0); /* complete */ } - if ((sc->sc_last_rx_status & GRXSTSRD_PKTSTS_MASK) != - GRXSTSRD_STP_DATA) { + if ((sc->sc_last_rx_status & GRXSTSRD_DPID_MASK) != + GRXSTSRD_DPID_DATA0) { /* release FIFO */ dwc_otg_common_rx_ack(sc); goto not_complete; @@ -973,14 +994,6 @@ dwc_otg_setup_rx(struct dwc_otg_softc *s /* get the packet byte count */ count = GRXSTSRD_BCNT_GET(sc->sc_last_rx_status); - /* verify data length */ - if (count != td->remainder) { - DPRINTFN(0, "Invalid SETUP packet " - "length, %d bytes\n", count); - /* release FIFO */ - dwc_otg_common_rx_ack(sc); - goto not_complete; - } if (count != sizeof(req)) { DPRINTFN(0, "Unsupported SETUP packet " "length, %d bytes\n", count); @@ -1006,43 +1019,27 @@ dwc_otg_setup_rx(struct dwc_otg_softc *s } /* don't send any data by default */ - DWC_OTG_WRITE_4(sc, DOTG_DIEPTSIZ(0), - DXEPTSIZ_SET_NPKT(0) | - DXEPTSIZ_SET_NBYTES(0)); - - temp = sc->sc_in_ctl[0]; - - /* enable IN endpoint */ - DWC_OTG_WRITE_4(sc, DOTG_DIEPCTL(0), - temp | DIEPCTL_EPENA); - DWC_OTG_WRITE_4(sc, DOTG_DIEPCTL(0), - temp | DIEPCTL_SNAK); + DWC_OTG_WRITE_4(sc, DOTG_DIEPTSIZ(0), DIEPCTL_EPDIS); + DWC_OTG_WRITE_4(sc, DOTG_DOEPTSIZ(0), DOEPCTL_EPDIS); /* reset IN endpoint buffer */ - DWC_OTG_WRITE_4(sc, DOTG_GRSTCTL, + dwc_otg_tx_fifo_reset(sc, GRSTCTL_TXFIFO(0) | GRSTCTL_TXFFLSH); /* acknowledge RX status */ dwc_otg_common_rx_ack(sc); - return (0); /* complete */ + td->did_stall = 1; not_complete: /* abort any ongoing transfer, before enabling again */ - - temp = sc->sc_out_ctl[0]; - - temp |= DOEPCTL_EPENA | - DOEPCTL_SNAK; - - /* enable OUT endpoint */ - DWC_OTG_WRITE_4(sc, DOTG_DOEPCTL(0), temp); - if (!td->did_stall) { td->did_stall = 1; DPRINTFN(5, "stalling IN and OUT direction\n"); + temp = sc->sc_out_ctl[0]; + /* set stall after enabling endpoint */ DWC_OTG_WRITE_4(sc, DOTG_DOEPCTL(0), temp | DOEPCTL_STALL); @@ -1053,13 +1050,6 @@ not_complete: DWC_OTG_WRITE_4(sc, DOTG_DIEPCTL(0), temp | DIEPCTL_STALL); } - - /* setup number of buffers to receive */ - DWC_OTG_WRITE_4(sc, DOTG_DOEPTSIZ(0), - DXEPTSIZ_SET_MULTI(3) | - DXEPTSIZ_SET_NPKT(1) | - DXEPTSIZ_SET_NBYTES(sizeof(req))); - return (1); /* not complete */ } @@ -1503,7 +1493,9 @@ dwc_otg_data_rx(struct dwc_otg_softc *sc /* check for SETUP packet */ if ((sc->sc_last_rx_status & GRXSTSRD_PKTSTS_MASK) == - GRXSTSRD_STP_DATA) { + GRXSTSRD_STP_DATA || + (sc->sc_last_rx_status & GRXSTSRD_PKTSTS_MASK) == + GRXSTSRD_STP_COMPLETE) { if (td->remainder == 0) { /* * We are actually complete and have @@ -1588,15 +1580,10 @@ dwc_otg_data_rx(struct dwc_otg_softc *sc not_complete: - temp = sc->sc_out_ctl[td->ep_no]; - - temp |= DOEPCTL_EPENA | DOEPCTL_CNAK; - - DWC_OTG_WRITE_4(sc, DOTG_DOEPCTL(td->ep_no), temp); - /* enable SETUP and transfer complete interrupt */ if (td->ep_no == 0) { DWC_OTG_WRITE_4(sc, DOTG_DOEPTSIZ(0), + DXEPTSIZ_SET_MULTI(3) | DXEPTSIZ_SET_NPKT(1) | DXEPTSIZ_SET_NBYTES(td->max_packet_size)); } else { @@ -1605,8 +1592,12 @@ not_complete: DXEPTSIZ_SET_MULTI(1) | DXEPTSIZ_SET_NPKT(4) | DXEPTSIZ_SET_NBYTES(4 * - ((td->max_packet_size + 3) & ~3))); + ((td->max_packet_size + 3) & ~3))); } + temp = sc->sc_out_ctl[td->ep_no]; + DWC_OTG_WRITE_4(sc, DOTG_DOEPCTL(td->ep_no), temp | + DOEPCTL_EPENA | DOEPCTL_CNAK); + return (1); /* not complete */ } @@ -2008,7 +1999,9 @@ repeat: (GRXSTSRD_CHNUM_GET(temp) == 0)) { if ((temp & GRXSTSRD_PKTSTS_MASK) != - GRXSTSRD_STP_DATA) { + GRXSTSRD_STP_DATA && + (temp & GRXSTSRD_PKTSTS_MASK) != + GRXSTSRD_STP_COMPLETE) { /* dump data - wrong direction */ dwc_otg_common_rx_ack(sc); @@ -2213,7 +2206,9 @@ not_complete: (GRXSTSRD_CHNUM_GET(temp) == 0)) { if ((temp & GRXSTSRD_PKTSTS_MASK) == - GRXSTSRD_STP_DATA) { + GRXSTSRD_STP_DATA || + (temp & GRXSTSRD_PKTSTS_MASK) == + GRXSTSRD_STP_COMPLETE) { DPRINTFN(5, "faking complete\n"); /* * Race condition: We are complete! @@ -2638,6 +2633,7 @@ repeat: /* non-data messages we simply skip */ if (temp != GRXSTSRD_STP_DATA && + temp != GRXSTSRD_STP_COMPLETE && temp != GRXSTSRD_OUT_DATA) { dwc_otg_common_rx_ack(sc); goto repeat; @@ -3668,7 +3664,7 @@ dwc_otg_clear_stall_sub_locked(struct dw /* we only reset the transmit FIFO */ if (ep_dir) { - DWC_OTG_WRITE_4(sc, DOTG_GRSTCTL, + dwc_otg_tx_fifo_reset(sc, GRSTCTL_TXFIFO(ep_no) | GRSTCTL_TXFFLSH); From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 07:23:33 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB86269E; Fri, 5 Jun 2015 07:23:33 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7ED2A18CA; Fri, 5 Jun 2015 07:23:33 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t557NXe0027003; Fri, 5 Jun 2015 07:23:33 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t557NXJh027002; Fri, 5 Jun 2015 07:23:33 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506050723.t557NXJh027002@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 5 Jun 2015 07:23: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: r284016 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 07:23:33 -0000 Author: ae Date: Fri Jun 5 07:23:32 2015 New Revision: 284016 URL: https://svnweb.freebsd.org/changeset/base/284016 Log: Rework r281868 to not skip RTM announces for tunneling interfaces. This is direct commit to stable/10. Tested by: tuexen@ Modified: stable/10/sys/netinet6/in6.c Modified: stable/10/sys/netinet6/in6.c ============================================================================== --- stable/10/sys/netinet6/in6.c Fri Jun 5 07:17:14 2015 (r284015) +++ stable/10/sys/netinet6/in6.c Fri Jun 5 07:23:32 2015 (r284016) @@ -155,29 +155,28 @@ in6_ifaddloop(struct ifaddr *ifa) ia = ifa2ia6(ifa); ifp = ifa->ifa_ifp; - if (nd6_need_cache(ifp) == 0) - return; - IF_AFDATA_LOCK(ifp); - ifa->ifa_rtrequest = nd6_rtrequest; - ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR | - LLE_EXCLUSIVE), (struct sockaddr *)&ia->ia_addr); - IF_AFDATA_UNLOCK(ifp); - if (ln != NULL) { - ln->la_expire = 0; /* for IPv6 this means permanent */ - ln->ln_state = ND6_LLINFO_REACHABLE; - /* - * initialize for rtmsg generation - */ - bzero(&gateway, sizeof(gateway)); - gateway.sdl_len = sizeof(gateway); - gateway.sdl_family = AF_LINK; - gateway.sdl_nlen = 0; - gateway.sdl_alen = 6; - memcpy(gateway.sdl_data, &ln->ll_addr.mac_aligned, - sizeof(ln->ll_addr)); - LLE_WUNLOCK(ln); + /* + * initialize for rtmsg generation + */ + bzero(&gateway, sizeof(gateway)); + gateway.sdl_len = sizeof(gateway); + gateway.sdl_family = AF_LINK; + if (nd6_need_cache(ifp) != 0) { + IF_AFDATA_LOCK(ifp); + ifa->ifa_rtrequest = nd6_rtrequest; + ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR | + LLE_EXCLUSIVE), (struct sockaddr *)&ia->ia_addr); + IF_AFDATA_UNLOCK(ifp); + if (ln != NULL) { + ln->la_expire = 0; /* for IPv6 this means permanent */ + ln->ln_state = ND6_LLINFO_REACHABLE; + + gateway.sdl_alen = 6; + memcpy(gateway.sdl_data, &ln->ll_addr.mac_aligned, + sizeof(ln->ll_addr)); + LLE_WUNLOCK(ln); + } } - bzero(&rt, sizeof(rt)); rt.rt_gateway = (struct sockaddr *)&gateway; memcpy(&mask, &ia->ia_prefixmask, sizeof(ia->ia_prefixmask)); From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 07:34:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2B8593D; Fri, 5 Jun 2015 07:34:52 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C67561AE8; Fri, 5 Jun 2015 07:34:52 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t557YqCf032414; Fri, 5 Jun 2015 07:34:52 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t557Yq01032413; Fri, 5 Jun 2015 07:34:52 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506050734.t557Yq01032413@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 5 Jun 2015 07:34:52 +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: r284017 - stable/9/sys/netinet6 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 07:34:53 -0000 Author: ae Date: Fri Jun 5 07:34:52 2015 New Revision: 284017 URL: https://svnweb.freebsd.org/changeset/base/284017 Log: Rework r281869 to not skip RTM announces for tunneling interfaces. This is direct commit to stable/9. Modified: stable/9/sys/netinet6/in6.c Modified: stable/9/sys/netinet6/in6.c ============================================================================== --- stable/9/sys/netinet6/in6.c Fri Jun 5 07:23:32 2015 (r284016) +++ stable/9/sys/netinet6/in6.c Fri Jun 5 07:34:52 2015 (r284017) @@ -154,29 +154,28 @@ in6_ifaddloop(struct ifaddr *ifa) ia = ifa2ia6(ifa); ifp = ifa->ifa_ifp; - if (nd6_need_cache(ifp) == 0) - return; - IF_AFDATA_LOCK(ifp); - ifa->ifa_rtrequest = nd6_rtrequest; - ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR | - LLE_EXCLUSIVE), (struct sockaddr *)&ia->ia_addr); - IF_AFDATA_UNLOCK(ifp); - if (ln != NULL) { - ln->la_expire = 0; /* for IPv6 this means permanent */ - ln->ln_state = ND6_LLINFO_REACHABLE; - /* - * initialize for rtmsg generation - */ - bzero(&gateway, sizeof(gateway)); - gateway.sdl_len = sizeof(gateway); - gateway.sdl_family = AF_LINK; - gateway.sdl_nlen = 0; - gateway.sdl_alen = 6; - memcpy(gateway.sdl_data, &ln->ll_addr.mac_aligned, - sizeof(ln->ll_addr)); - LLE_WUNLOCK(ln); + /* + * initialize for rtmsg generation + */ + bzero(&gateway, sizeof(gateway)); + gateway.sdl_len = sizeof(gateway); + gateway.sdl_family = AF_LINK; + if (nd6_need_cache(ifp) != 0) { + IF_AFDATA_LOCK(ifp); + ifa->ifa_rtrequest = nd6_rtrequest; + ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR | + LLE_EXCLUSIVE), (struct sockaddr *)&ia->ia_addr); + IF_AFDATA_UNLOCK(ifp); + if (ln != NULL) { + ln->la_expire = 0; /* for IPv6 this means permanent */ + ln->ln_state = ND6_LLINFO_REACHABLE; + + gateway.sdl_alen = 6; + memcpy(gateway.sdl_data, &ln->ll_addr.mac_aligned, + sizeof(ln->ll_addr)); + LLE_WUNLOCK(ln); + } } - bzero(&rt, sizeof(rt)); rt.rt_gateway = (struct sockaddr *)&gateway; memcpy(&mask, &ia->ia_prefixmask, sizeof(ia->ia_prefixmask)); From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 08:10:09 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D29F1E62; Fri, 5 Jun 2015 08:10:09 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFC711214; Fri, 5 Jun 2015 08:10:09 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t558A9wl048154; Fri, 5 Jun 2015 08:10:09 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t558A9d0048147; Fri, 5 Jun 2015 08:10:09 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506050810.t558A9d0048147@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 5 Jun 2015 08:10:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284018 - in stable/10/sys: net netinet 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 08:10:10 -0000 Author: ae Date: Fri Jun 5 08:10:08 2015 New Revision: 284018 URL: https://svnweb.freebsd.org/changeset/base/284018 Log: MFC r271918 (by hrs): - Virtualize interface cloner for gre(4). This fixes a panic when destroying a vnet jail which has a gre(4) interface. - Make net.link.gre.max_nesting vnet-local. Modified: stable/10/sys/net/if_gre.c stable/10/sys/net/if_gre.h stable/10/sys/netinet/ip_gre.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_gre.c ============================================================================== --- stable/10/sys/net/if_gre.c Fri Jun 5 07:34:52 2015 (r284017) +++ stable/10/sys/net/if_gre.c Fri Jun 5 08:10:08 2015 (r284018) @@ -102,15 +102,16 @@ struct mtag_gre_nesting { * gre_mtx protects all global variables in if_gre.c. * XXX: gre_softc data not protected yet. */ -struct mtx gre_mtx; +VNET_DEFINE(struct mtx, gre_mtx); +VNET_DEFINE(struct gre_softc_head, gre_softc_list); + static const char grename[] = "gre"; static MALLOC_DEFINE(M_GRE, grename, "Generic Routing Encapsulation"); -struct gre_softc_head gre_softc_list; - static int gre_clone_create(struct if_clone *, int, caddr_t); static void gre_clone_destroy(struct ifnet *); -static struct if_clone *gre_cloner; +static VNET_DEFINE(struct if_clone *, gre_cloner); +#define V_gre_cloner VNET(gre_cloner) static int gre_ioctl(struct ifnet *, u_long, caddr_t); static int gre_output(struct ifnet *, struct mbuf *, @@ -118,8 +119,6 @@ static int gre_output(struct ifnet *, st static int gre_compute_route(struct gre_softc *sc); -static void greattach(void); - #ifdef INET extern struct domain inetdomain; static const struct protosw in_gre_protosw = { @@ -160,26 +159,34 @@ static SYSCTL_NODE(_net_link, IFT_TUNNEL */ #define MAX_GRE_NEST 1 #endif -static int max_gre_nesting = MAX_GRE_NEST; -SYSCTL_INT(_net_link_gre, OID_AUTO, max_nesting, CTLFLAG_RW, - &max_gre_nesting, 0, "Max nested tunnels"); +static VNET_DEFINE(int, max_gre_nesting) = MAX_GRE_NEST; +#define V_max_gre_nesting VNET(max_gre_nesting) +SYSCTL_INT(_net_link_gre, OID_AUTO, max_nesting, CTLFLAG_RW | CTLFLAG_VNET, + &VNET_NAME(max_gre_nesting), 0, "Max nested tunnels"); -/* ARGSUSED */ static void -greattach(void) +vnet_gre_init(const void *unused __unused) { - - mtx_init(&gre_mtx, "gre_mtx", NULL, MTX_DEF); - LIST_INIT(&gre_softc_list); - gre_cloner = if_clone_simple(grename, gre_clone_create, + LIST_INIT(&V_gre_softc_list); + GRE_LIST_LOCK_INIT(); + V_gre_cloner = if_clone_simple(grename, gre_clone_create, gre_clone_destroy, 0); } +VNET_SYSINIT(vnet_gre_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, + vnet_gre_init, NULL); + +static void +vnet_gre_uninit(const void *unused __unused) +{ + + if_clone_detach(V_gre_cloner); + GRE_LIST_LOCK_DESTROY(); +} +VNET_SYSUNINIT(vnet_gre_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, + vnet_gre_uninit, NULL); static int -gre_clone_create(ifc, unit, params) - struct if_clone *ifc; - int unit; - caddr_t params; +gre_clone_create(struct if_clone *ifc, int unit, caddr_t params) { struct gre_softc *sc; @@ -210,21 +217,20 @@ gre_clone_create(ifc, unit, params) sc->key = 0; if_attach(GRE2IFP(sc)); bpfattach(GRE2IFP(sc), DLT_NULL, sizeof(u_int32_t)); - mtx_lock(&gre_mtx); - LIST_INSERT_HEAD(&gre_softc_list, sc, sc_list); - mtx_unlock(&gre_mtx); + GRE_LIST_LOCK(); + LIST_INSERT_HEAD(&V_gre_softc_list, sc, sc_list); + GRE_LIST_UNLOCK(); return (0); } static void -gre_clone_destroy(ifp) - struct ifnet *ifp; +gre_clone_destroy(struct ifnet *ifp) { struct gre_softc *sc = ifp->if_softc; - mtx_lock(&gre_mtx); + GRE_LIST_LOCK(); LIST_REMOVE(sc, sc_list); - mtx_unlock(&gre_mtx); + GRE_LIST_UNLOCK(); #ifdef INET if (sc->encap != NULL) @@ -269,7 +275,7 @@ gre_output(struct ifnet *ifp, struct mbu gt = (struct mtag_gre_nesting *)(mtag + 1); gt->count++; - if (gt->count > min(gt->max,max_gre_nesting)) { + if (gt->count > min(gt->max, V_max_gre_nesting)) { printf("%s: hit maximum recursion limit %u on %s\n", __func__, gt->count - 1, ifp->if_xname); m_freem(m); @@ -301,7 +307,7 @@ gre_output(struct ifnet *ifp, struct mbu * Note: the sysctl does not actually check for saneness, so we * limit the maximum numbers of possible recursions here. */ - max = imin(max_gre_nesting, 256); + max = imin(V_max_gre_nesting, 256); /* If someone sets the sysctl <= 0, we want at least 1. */ max = imax(max, 1); len = sizeof(struct mtag_gre_nesting) + @@ -956,16 +962,12 @@ gremodevent(module_t mod, int type, void switch (type) { case MOD_LOAD: - greattach(); - break; case MOD_UNLOAD: - if_clone_detach(gre_cloner); - mtx_destroy(&gre_mtx); break; default: - return EOPNOTSUPP; + return (EOPNOTSUPP); } - return 0; + return (0); } static moduledata_t gre_mod = { Modified: stable/10/sys/net/if_gre.h ============================================================================== --- stable/10/sys/net/if_gre.h Fri Jun 5 07:34:52 2015 (r284017) +++ stable/10/sys/net/if_gre.h Fri Jun 5 08:10:08 2015 (r284018) @@ -176,8 +176,16 @@ struct mobip_h { #ifdef _KERNEL LIST_HEAD(gre_softc_head, gre_softc); -extern struct mtx gre_mtx; -extern struct gre_softc_head gre_softc_list; +VNET_DECLARE(struct gre_softc_head, gre_softc_list); +#define V_gre_softc_list VNET(gre_softc_list) + +VNET_DECLARE(struct mtx, gre_mtx); +#define V_gre_mtx VNET(gre_mtx) +#define GRE_LIST_LOCK_INIT(x) mtx_init(&V_gre_mtx, "gre_mtx", NULL, \ + MTX_DEF) +#define GRE_LIST_LOCK_DESTROY(x) mtx_destroy(&V_gre_mtx) +#define GRE_LIST_LOCK(x) mtx_lock(&V_gre_mtx) +#define GRE_LIST_UNLOCK(x) mtx_unlock(&V_gre_mtx) u_int16_t gre_in_cksum(u_int16_t *, u_int); #endif /* _KERNEL */ Modified: stable/10/sys/netinet/ip_gre.c ============================================================================== --- stable/10/sys/netinet/ip_gre.c Fri Jun 5 07:34:52 2015 (r284017) +++ stable/10/sys/netinet/ip_gre.c Fri Jun 5 08:10:08 2015 (r284018) @@ -318,18 +318,18 @@ gre_lookup(struct mbuf *m, u_int8_t prot struct ip *ip = mtod(m, struct ip *); struct gre_softc *sc; - mtx_lock(&gre_mtx); - for (sc = LIST_FIRST(&gre_softc_list); sc != NULL; + GRE_LIST_LOCK(); + for (sc = LIST_FIRST(&V_gre_softc_list); sc != NULL; sc = LIST_NEXT(sc, sc_list)) { if ((sc->g_dst.s_addr == ip->ip_src.s_addr) && (sc->g_src.s_addr == ip->ip_dst.s_addr) && (sc->g_proto == proto) && ((GRE2IFP(sc)->if_flags & IFF_UP) != 0)) { - mtx_unlock(&gre_mtx); + GRE_LIST_UNLOCK(); return (sc); } } - mtx_unlock(&gre_mtx); + GRE_LIST_UNLOCK(); return (NULL); } From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 08:23:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BBAC2CD; Fri, 5 Jun 2015 08:23:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68B5416E2; Fri, 5 Jun 2015 08:23:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t558NYJa057232; Fri, 5 Jun 2015 08:23:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t558NYMA057231; Fri, 5 Jun 2015 08:23:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201506050823.t558NYMA057231@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 5 Jun 2015 08:23: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: r284019 - stable/10/sys/x86/iommu 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 08:23:34 -0000 Author: kib Date: Fri Jun 5 08:23:33 2015 New Revision: 284019 URL: https://svnweb.freebsd.org/changeset/base/284019 Log: MFC r283692: Explicitely enable queued invalidation completion interrupt. Modified: stable/10/sys/x86/iommu/intel_qi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/iommu/intel_qi.c ============================================================================== --- stable/10/sys/x86/iommu/intel_qi.c Fri Jun 5 08:10:08 2015 (r284018) +++ stable/10/sys/x86/iommu/intel_qi.c Fri Jun 5 08:23:33 2015 (r284019) @@ -356,6 +356,7 @@ dmar_init_qi(struct dmar_unit *unit) ics = DMAR_ICS_IWC; dmar_write4(unit, DMAR_ICS_REG, ics); } + dmar_enable_qi_intr(unit); DMAR_UNLOCK(unit); return (0); @@ -379,6 +380,7 @@ dmar_fini_qi(struct dmar_unit *unit) dmar_qi_advance_tail(unit); dmar_qi_wait_for_seq(unit, &gseq); /* only after the quisce, disable queue */ + dmar_disable_qi_intr(unit); dmar_disable_qi(unit); KASSERT(unit->inv_seq_waiters == 0, ("dmar%d: waiters on disabled queue", unit->unit)); From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 08:26:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1E5B445; Fri, 5 Jun 2015 08:26:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B032B170A; Fri, 5 Jun 2015 08:26:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t558QdTK057725; Fri, 5 Jun 2015 08:26:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t558QdBQ057724; Fri, 5 Jun 2015 08:26:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201506050826.t558QdBQ057724@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 5 Jun 2015 08:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284020 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 08:26:39 -0000 Author: kib Date: Fri Jun 5 08:26:38 2015 New Revision: 284020 URL: https://svnweb.freebsd.org/changeset/base/284020 Log: MFC r283745: Do not raise priority of the idle thread on singal delivery. Modified: stable/10/sys/kern/kern_sig.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_sig.c ============================================================================== --- stable/10/sys/kern/kern_sig.c Fri Jun 5 08:23:33 2015 (r284019) +++ stable/10/sys/kern/kern_sig.c Fri Jun 5 08:26:38 2015 (r284020) @@ -2371,9 +2371,12 @@ tdsigwakeup(struct thread *td, int sig, thread_lock(td); /* * Bring the priority of a thread up if we want it to get - * killed in this lifetime. + * killed in this lifetime. Be careful to avoid bumping the + * priority of the idle thread, since we still allow to signal + * kernel processes. */ - if (action == SIG_DFL && (prop & SA_KILL) && td->td_priority > PUSER) + if (action == SIG_DFL && (prop & SA_KILL) != 0 && + td->td_priority > PUSER && !TD_IS_IDLETHREAD(td)) sched_prio(td, PUSER); if (TD_ON_SLEEPQ(td)) { /* @@ -2411,7 +2414,7 @@ tdsigwakeup(struct thread *td, int sig, /* * Give low priority threads a better chance to run. */ - if (td->td_priority > PUSER) + if (td->td_priority > PUSER && !TD_IS_IDLETHREAD(td)) sched_prio(td, PUSER); wakeup_swapper = sleepq_abort(td, intrval); From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 08:36:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58B27602; Fri, 5 Jun 2015 08:36:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44A7E1940; Fri, 5 Jun 2015 08:36:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t558aUT9062795; Fri, 5 Jun 2015 08:36:30 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t558aQFM062775; Fri, 5 Jun 2015 08:36:26 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201506050836.t558aQFM062775@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 5 Jun 2015 08:36:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284021 - in stable/10/sys: amd64/amd64 amd64/ia32 dev/pci kern ufs/ffs ufs/ufs x86/iommu 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 08:36:30 -0000 Author: kib Date: Fri Jun 5 08:36:25 2015 New Revision: 284021 URL: https://svnweb.freebsd.org/changeset/base/284021 Log: MFC r283735: Remove several write-only variables. Modified: stable/10/sys/amd64/amd64/pmap.c stable/10/sys/amd64/ia32/ia32_reg.c stable/10/sys/dev/pci/pci.c stable/10/sys/kern/kern_exit.c stable/10/sys/kern/kern_synch.c stable/10/sys/kern/vfs_cluster.c stable/10/sys/kern/vfs_init.c stable/10/sys/ufs/ffs/ffs_softdep.c stable/10/sys/ufs/ffs/ffs_suspend.c stable/10/sys/ufs/ffs/ffs_vfsops.c stable/10/sys/ufs/ffs/ffs_vnops.c stable/10/sys/ufs/ufs/ufs_bmap.c stable/10/sys/ufs/ufs/ufs_dirhash.c stable/10/sys/x86/iommu/busdma_dmar.c stable/10/sys/x86/iommu/intel_idpgtbl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/pmap.c ============================================================================== --- stable/10/sys/amd64/amd64/pmap.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/amd64/amd64/pmap.c Fri Jun 5 08:36:25 2015 (r284021) @@ -4020,7 +4020,6 @@ pmap_promote_pde(pmap_t pmap, pd_entry_t pd_entry_t newpde; pt_entry_t *firstpte, oldpte, pa, *pte; pt_entry_t PG_G, PG_A, PG_M, PG_RW, PG_V; - vm_offset_t oldpteva; vm_page_t mpte; int PG_PTE_CACHE; @@ -4080,10 +4079,9 @@ setpte: if (!atomic_cmpset_long(pte, oldpte, oldpte & ~PG_RW)) goto setpte; oldpte &= ~PG_RW; - oldpteva = (oldpte & PG_FRAME & PDRMASK) | - (va & ~PDRMASK); CTR2(KTR_PMAP, "pmap_promote_pde: protect for va %#lx" - " in pmap %p", oldpteva, pmap); + " in pmap %p", (oldpte & PG_FRAME & PDRMASK) | + (va & ~PDRMASK), pmap); } if ((oldpte & PG_PTE_PROMOTE) != (newpde & PG_PTE_PROMOTE)) { atomic_add_long(&pmap_pde_p_failures, 1); Modified: stable/10/sys/amd64/ia32/ia32_reg.c ============================================================================== --- stable/10/sys/amd64/ia32/ia32_reg.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/amd64/ia32/ia32_reg.c Fri Jun 5 08:36:25 2015 (r284021) @@ -79,11 +79,9 @@ __FBSDID("$FreeBSD$"); int fill_regs32(struct thread *td, struct reg32 *regs) { - struct pcb *pcb; struct trapframe *tp; tp = td->td_frame; - pcb = td->td_pcb; if (tp->tf_flags & TF_HASSEGS) { regs->r_gs = tp->tf_gs; regs->r_fs = tp->tf_fs; @@ -113,18 +111,16 @@ fill_regs32(struct thread *td, struct re int set_regs32(struct thread *td, struct reg32 *regs) { - struct pcb *pcb; struct trapframe *tp; tp = td->td_frame; if (!EFL_SECURE(regs->r_eflags, tp->tf_rflags) || !CS_SECURE(regs->r_cs)) return (EINVAL); - pcb = td->td_pcb; tp->tf_gs = regs->r_gs; tp->tf_fs = regs->r_fs; tp->tf_es = regs->r_es; tp->tf_ds = regs->r_ds; - set_pcb_flags(pcb, PCB_FULL_IRET); + set_pcb_flags(td->td_pcb, PCB_FULL_IRET); tp->tf_flags = TF_HASSEGS; tp->tf_rdi = regs->r_edi; tp->tf_rsi = regs->r_esi; Modified: stable/10/sys/dev/pci/pci.c ============================================================================== --- stable/10/sys/dev/pci/pci.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/dev/pci/pci.c Fri Jun 5 08:36:25 2015 (r284021) @@ -2367,7 +2367,7 @@ pci_set_powerstate_method(device_t dev, struct pci_devinfo *dinfo = device_get_ivars(child); pcicfgregs *cfg = &dinfo->cfg; uint16_t status; - int result, oldstate, highest, delay; + int oldstate, highest, delay; if (cfg->pp.pp_cap == 0) return (EOPNOTSUPP); @@ -2402,7 +2402,6 @@ pci_set_powerstate_method(device_t dev, delay = 0; status = PCI_READ_CONFIG(dev, child, cfg->pp.pp_status, 2) & ~PCIM_PSTAT_DMASK; - result = 0; switch (state) { case PCI_POWERSTATE_D0: status |= PCIM_PSTAT_D0; @@ -2962,7 +2961,6 @@ static void pci_ata_maps(device_t bus, device_t dev, struct resource_list *rl, int force, uint32_t prefetchmask) { - struct resource *r; int rid, type, progif; #if 0 /* if this device supports PCI native addressing use it */ @@ -2985,11 +2983,11 @@ pci_ata_maps(device_t bus, device_t dev, } else { rid = PCIR_BAR(0); resource_list_add(rl, type, rid, 0x1f0, 0x1f7, 8); - r = resource_list_reserve(rl, bus, dev, type, &rid, 0x1f0, + (void)resource_list_reserve(rl, bus, dev, type, &rid, 0x1f0, 0x1f7, 8, 0); rid = PCIR_BAR(1); resource_list_add(rl, type, rid, 0x3f6, 0x3f6, 1); - r = resource_list_reserve(rl, bus, dev, type, &rid, 0x3f6, + (void)resource_list_reserve(rl, bus, dev, type, &rid, 0x3f6, 0x3f6, 1, 0); } if (progif & PCIP_STORAGE_IDE_MODESEC) { @@ -3000,11 +2998,11 @@ pci_ata_maps(device_t bus, device_t dev, } else { rid = PCIR_BAR(2); resource_list_add(rl, type, rid, 0x170, 0x177, 8); - r = resource_list_reserve(rl, bus, dev, type, &rid, 0x170, + (void)resource_list_reserve(rl, bus, dev, type, &rid, 0x170, 0x177, 8, 0); rid = PCIR_BAR(3); resource_list_add(rl, type, rid, 0x376, 0x376, 1); - r = resource_list_reserve(rl, bus, dev, type, &rid, 0x376, + (void)resource_list_reserve(rl, bus, dev, type, &rid, 0x376, 0x376, 1, 0); } pci_add_map(bus, dev, PCIR_BAR(4), rl, force, @@ -3650,7 +3648,6 @@ pci_set_power_children(device_t dev, dev int state) { device_t child, pcib; - struct pci_devinfo *dinfo; int dstate, i; /* @@ -3663,7 +3660,6 @@ pci_set_power_children(device_t dev, dev pcib = device_get_parent(dev); for (i = 0; i < numdevs; i++) { child = devlist[i]; - dinfo = device_get_ivars(child); dstate = state; if (device_is_attached(child) && PCIB_POWER_FOR_SLEEP(pcib, dev, &dstate) == 0) Modified: stable/10/sys/kern/kern_exit.c ============================================================================== --- stable/10/sys/kern/kern_exit.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/kern/kern_exit.c Fri Jun 5 08:36:25 2015 (r284021) @@ -951,12 +951,10 @@ static int proc_to_reap(struct thread *td, struct proc *p, idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *siginfo) { - struct proc *q; struct rusage *rup; sx_assert(&proctree_lock, SA_XLOCKED); - q = td->td_proc; PROC_LOCK(p); switch (idtype) { Modified: stable/10/sys/kern/kern_synch.c ============================================================================== --- stable/10/sys/kern/kern_synch.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/kern/kern_synch.c Fri Jun 5 08:36:25 2015 (r284021) @@ -432,11 +432,9 @@ mi_switch(int flags, struct thread *newt { uint64_t runtime, new_switchtime; struct thread *td; - struct proc *p; td = curthread; /* XXX */ THREAD_LOCK_ASSERT(td, MA_OWNED | MA_NOTRECURSED); - p = td->td_proc; /* XXX */ KASSERT(!TD_ON_RUNQ(td), ("mi_switch: called by old code")); #ifdef INVARIANTS if (!TD_ON_LOCK(td) && !TD_IS_RUNNING(td)) @@ -476,7 +474,7 @@ mi_switch(int flags, struct thread *newt PCPU_INC(cnt.v_swtch); PCPU_SET(switchticks, ticks); CTR4(KTR_PROC, "mi_switch: old thread %ld (td_sched %p, pid %ld, %s)", - td->td_tid, td->td_sched, p->p_pid, td->td_name); + td->td_tid, td->td_sched, td->td_proc->p_pid, td->td_name); #if (KTR_COMPILE & KTR_SCHED) != 0 if (TD_IS_IDLETHREAD(td)) KTR_STATE1(KTR_SCHED, "thread", sched_tdname(td), "idle", @@ -495,7 +493,7 @@ mi_switch(int flags, struct thread *newt "prio:%d", td->td_priority); CTR4(KTR_PROC, "mi_switch: new thread %ld (td_sched %p, pid %ld, %s)", - td->td_tid, td->td_sched, p->p_pid, td->td_name); + td->td_tid, td->td_sched, td->td_proc->p_pid, td->td_name); /* * If the last thread was exiting, finish cleaning it up. Modified: stable/10/sys/kern/vfs_cluster.c ============================================================================== --- stable/10/sys/kern/vfs_cluster.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/kern/vfs_cluster.c Fri Jun 5 08:36:25 2015 (r284021) @@ -310,7 +310,6 @@ static struct buf * cluster_rbuild(struct vnode *vp, u_quad_t filesize, daddr_t lbn, daddr_t blkno, long size, int run, int gbflags, struct buf *fbp) { - struct bufobj *bo; struct buf *bp, *tbp; daddr_t bn; off_t off; @@ -376,7 +375,6 @@ cluster_rbuild(struct vnode *vp, u_quad_ bp->b_npages = 0; inc = btodb(size); - bo = &vp->v_bufobj; for (bn = blkno, i = 0; i < run; ++i, bn += inc) { if (i == 0) { VM_OBJECT_WLOCK(tbp->b_bufobj->bo_object); Modified: stable/10/sys/kern/vfs_init.c ============================================================================== --- stable/10/sys/kern/vfs_init.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/kern/vfs_init.c Fri Jun 5 08:36:25 2015 (r284021) @@ -312,9 +312,7 @@ static int vfs_unregister(struct vfsconf *vfc) { struct vfsconf *vfsp; - int error, i, maxtypenum; - - i = vfc->vfc_typenum; + int error, maxtypenum; vfsconf_lock(); vfsp = vfs_byname_locked(vfc->vfc_name); Modified: stable/10/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_softdep.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/ufs/ffs/ffs_softdep.c Fri Jun 5 08:36:25 2015 (r284021) @@ -4692,12 +4692,10 @@ softdep_setup_dotdot_link(dp, ip) struct inodedep *inodedep; struct jaddref *jaddref; struct vnode *dvp; - struct vnode *vp; KASSERT(MOUNTEDSOFTDEP(UFSTOVFS(dp->i_ump)) != 0, ("softdep_setup_dotdot_link called on non-softdep filesystem")); dvp = ITOV(dp); - vp = ITOV(ip); jaddref = NULL; /* * We don't set MKDIR_PARENT as this is not tied to a mkdir and @@ -7066,7 +7064,6 @@ trunc_dependencies(ip, freeblks, lastlbn struct bufobj *bo; struct vnode *vp; struct buf *bp; - struct fs *fs; int blkoff; /* @@ -7075,7 +7072,6 @@ trunc_dependencies(ip, freeblks, lastlbn * Once they are all there, walk the list and get rid of * any dependencies. */ - fs = ip->i_fs; vp = ITOV(ip); bo = &vp->v_bufobj; BO_LOCK(bo); @@ -9511,12 +9507,10 @@ handle_written_sbdep(sbdep, bp) struct buf *bp; { struct inodedep *inodedep; - struct mount *mp; struct fs *fs; LOCK_OWNED(sbdep->sb_ump); fs = sbdep->sb_fs; - mp = UFSTOVFS(sbdep->sb_ump); /* * If the superblock doesn't match the in-memory list start over. */ Modified: stable/10/sys/ufs/ffs/ffs_suspend.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_suspend.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/ufs/ffs/ffs_suspend.c Fri Jun 5 08:36:25 2015 (r284021) @@ -176,7 +176,6 @@ out: static int ffs_susp_suspend(struct mount *mp) { - struct fs *fs; struct ufsmount *ump; int error; @@ -188,7 +187,6 @@ ffs_susp_suspend(struct mount *mp) return (EBUSY); ump = VFSTOUFS(mp); - fs = ump->um_fs; /* * Make sure the calling thread is permitted to access the mounted Modified: stable/10/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_vfsops.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/ufs/ffs/ffs_vfsops.c Fri Jun 5 08:36:25 2015 (r284021) @@ -1485,7 +1485,7 @@ ffs_sync(mp, waitfor) struct inode *ip; struct ufsmount *ump = VFSTOUFS(mp); struct fs *fs; - int error, count, wait, lockreq, allerror = 0; + int error, count, lockreq, allerror = 0; int suspend; int suspended; int secondary_writes; @@ -1494,7 +1494,6 @@ ffs_sync(mp, waitfor) int softdep_accdeps; struct bufobj *bo; - wait = 0; suspend = 0; suspended = 0; td = curthread; @@ -1516,10 +1515,8 @@ ffs_sync(mp, waitfor) suspend = 1; waitfor = MNT_WAIT; } - if (waitfor == MNT_WAIT) { - wait = 1; + if (waitfor == MNT_WAIT) lockreq = LK_EXCLUSIVE; - } lockreq |= LK_INTERLOCK | LK_SLEEPFAIL; loop: /* Grab snapshot of secondary write counts */ @@ -2023,7 +2020,6 @@ static int ffs_bufwrite(struct buf *bp) { struct buf *newbp; - int oldflags; CTR3(KTR_BUF, "bufwrite(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags); if (bp->b_flags & B_INVAL) { @@ -2031,8 +2027,6 @@ ffs_bufwrite(struct buf *bp) return (0); } - oldflags = bp->b_flags; - if (!BUF_ISLOCKED(bp)) panic("bufwrite: buffer is not busy???"); /* Modified: stable/10/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_vnops.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/ufs/ffs/ffs_vnops.c Fri Jun 5 08:36:25 2015 (r284021) @@ -1407,11 +1407,6 @@ struct vop_openextattr_args { }; */ { - struct inode *ip; - struct fs *fs; - - ip = VTOI(ap->a_vp); - fs = ip->i_fs; if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) return (EOPNOTSUPP); @@ -1435,11 +1430,6 @@ struct vop_closeextattr_args { }; */ { - struct inode *ip; - struct fs *fs; - - ip = VTOI(ap->a_vp); - fs = ip->i_fs; if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) return (EOPNOTSUPP); @@ -1553,13 +1543,11 @@ vop_getextattr { */ { struct inode *ip; - struct fs *fs; u_char *eae, *p; unsigned easize; int error, ealen; ip = VTOI(ap->a_vp); - fs = ip->i_fs; if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) return (EOPNOTSUPP); @@ -1608,14 +1596,12 @@ vop_listextattr { */ { struct inode *ip; - struct fs *fs; u_char *eae, *p, *pe, *pn; unsigned easize; uint32_t ul; int error, ealen; ip = VTOI(ap->a_vp); - fs = ip->i_fs; if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) return (EOPNOTSUPP); Modified: stable/10/sys/ufs/ufs/ufs_bmap.c ============================================================================== --- stable/10/sys/ufs/ufs/ufs_bmap.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/ufs/ufs/ufs_bmap.c Fri Jun 5 08:36:25 2015 (r284021) @@ -114,7 +114,6 @@ ufs_bmaparray(vp, bn, bnp, nbp, runp, ru struct buf *bp; struct ufsmount *ump; struct mount *mp; - struct vnode *devvp; struct indir a[NIADDR+1], *ap; ufs2_daddr_t daddr; ufs_lbn_t metalbn; @@ -125,7 +124,6 @@ ufs_bmaparray(vp, bn, bnp, nbp, runp, ru ip = VTOI(vp); mp = vp->v_mount; ump = VFSTOUFS(mp); - devvp = ump->um_devvp; if (runp) { maxrun = mp->mnt_iosize_max / mp->mnt_stat.f_iosize - 1; Modified: stable/10/sys/ufs/ufs/ufs_dirhash.c ============================================================================== --- stable/10/sys/ufs/ufs/ufs_dirhash.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/ufs/ufs/ufs_dirhash.c Fri Jun 5 08:36:25 2015 (r284021) @@ -189,9 +189,7 @@ ufsdirhash_create(struct inode *ip) struct dirhash *ndh; struct dirhash *dh; struct vnode *vp; - int error; - error = 0; ndh = dh = NULL; vp = ip->i_vnode; for (;;) { @@ -273,11 +271,9 @@ static struct dirhash * ufsdirhash_acquire(struct inode *ip) { struct dirhash *dh; - struct vnode *vp; ASSERT_VOP_ELOCKED(ip->i_vnode, __FUNCTION__); - vp = ip->i_vnode; dh = ip->i_dirhash; if (dh == NULL) return (NULL); Modified: stable/10/sys/x86/iommu/busdma_dmar.c ============================================================================== --- stable/10/sys/x86/iommu/busdma_dmar.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/x86/iommu/busdma_dmar.c Fri Jun 5 08:36:25 2015 (r284021) @@ -815,7 +815,6 @@ dmar_bus_task_dmamap(void *arg, int pend struct bus_dma_tag_dmar *tag; struct bus_dmamap_dmar *map; struct dmar_unit *unit; - struct dmar_ctx *ctx; unit = arg; DMAR_LOCK(unit); @@ -823,7 +822,6 @@ dmar_bus_task_dmamap(void *arg, int pend TAILQ_REMOVE(&unit->delayed_maps, map, delay_link); DMAR_UNLOCK(unit); tag = map->tag; - ctx = map->tag->ctx; map->cansleep = true; map->locked = false; bus_dmamap_load_mem((bus_dma_tag_t)tag, (bus_dmamap_t)map, @@ -844,9 +842,7 @@ dmar_bus_task_dmamap(void *arg, int pend static void dmar_bus_schedule_dmamap(struct dmar_unit *unit, struct bus_dmamap_dmar *map) { - struct dmar_ctx *ctx; - ctx = map->tag->ctx; map->locked = false; DMAR_LOCK(unit); TAILQ_INSERT_TAIL(&unit->delayed_maps, map, delay_link); Modified: stable/10/sys/x86/iommu/intel_idpgtbl.c ============================================================================== --- stable/10/sys/x86/iommu/intel_idpgtbl.c Fri Jun 5 08:26:38 2015 (r284020) +++ stable/10/sys/x86/iommu/intel_idpgtbl.c Fri Jun 5 08:36:25 2015 (r284021) @@ -107,7 +107,7 @@ static void ctx_idmap_nextlvl(struct idpgtbl *tbl, int lvl, vm_pindex_t idx, dmar_gaddr_t addr) { - vm_page_t m, m1; + vm_page_t m1; dmar_pte_t *pte; struct sf_buf *sf; dmar_gaddr_t f, pg_sz; @@ -117,7 +117,7 @@ ctx_idmap_nextlvl(struct idpgtbl *tbl, i VM_OBJECT_ASSERT_LOCKED(tbl->pgtbl_obj); if (addr >= tbl->maxaddr) return; - m = dmar_pgalloc(tbl->pgtbl_obj, idx, DMAR_PGF_OBJL | DMAR_PGF_WAITOK | + (void)dmar_pgalloc(tbl->pgtbl_obj, idx, DMAR_PGF_OBJL | DMAR_PGF_WAITOK | DMAR_PGF_ZERO); base = idx * DMAR_NPTEPG + 1; /* Index of the first child page of idx */ pg_sz = pglvl_page_size(tbl->pglvl, lvl); @@ -597,7 +597,7 @@ ctx_unmap_buf_locked(struct dmar_ctx *ct dmar_pte_t *pte; struct sf_buf *sf; vm_pindex_t idx; - dmar_gaddr_t pg_sz, base1, size1; + dmar_gaddr_t pg_sz; int lvl; DMAR_CTX_ASSERT_PGLOCKED(ctx); @@ -624,8 +624,6 @@ ctx_unmap_buf_locked(struct dmar_ctx *ct KASSERT((flags & ~DMAR_PGF_WAITOK) == 0, ("invalid flags %x", flags)); pg_sz = 0; /* silence gcc */ - base1 = base; - size1 = size; flags |= DMAR_PGF_OBJL; TD_PREP_PINNED_ASSERT; From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 11:37:55 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E258939; Fri, 5 Jun 2015 11:37:55 +0000 (UTC) (envelope-from achim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C9951336; Fri, 5 Jun 2015 11:37:55 +0000 (UTC) (envelope-from achim@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55BbsFs051984; Fri, 5 Jun 2015 11:37:54 GMT (envelope-from achim@FreeBSD.org) Received: (from achim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55BbstN051983; Fri, 5 Jun 2015 11:37:54 GMT (envelope-from achim@FreeBSD.org) Message-Id: <201506051137.t55BbstN051983@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: achim set sender to achim@FreeBSD.org using -f From: Achim Leubner Date: Fri, 5 Jun 2015 11:37:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284022 - head/sys/dev/aic7xxx 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 11:37:55 -0000 Author: achim Date: Fri Jun 5 11:37:54 2015 New Revision: 284022 URL: https://svnweb.freebsd.org/changeset/base/284022 Log: aic7xxx: Do not support device IDs 0x8081, 0x8088 and 0x8089 to avoid conflicts with the new PMC Adaptec controller families supported by aacraid Modified: head/sys/dev/aic7xxx/aic79xx_pci.c Modified: head/sys/dev/aic7xxx/aic79xx_pci.c ============================================================================== --- head/sys/dev/aic7xxx/aic79xx_pci.c Fri Jun 5 08:36:25 2015 (r284021) +++ head/sys/dev/aic7xxx/aic79xx_pci.c Fri Jun 5 11:37:54 2015 (r284022) @@ -93,6 +93,11 @@ ahd_compose_id(u_int device, u_int vendo #define ID_AIC7902_PCI_REV_A4 0x3 #define ID_AIC7902_PCI_REV_B0 0x10 #define SUBID_HP 0x0E11 +#define DEVICE8081 0x8081 +#define DEVICE8088 0x8088 +#define DEVICE8089 0x8089 +#define ADAPTECVENDORID 0x9005 +#define SUBVENDOR9005 0x9005 #define DEVID_9005_HOSTRAID(id) ((id) & 0x80) @@ -292,6 +297,15 @@ ahd_find_pci_device(aic_dev_softc_t pci) device = aic_pci_read_config(pci, PCIR_DEVICE, /*bytes*/2); subvendor = aic_pci_read_config(pci, PCIR_SUBVEND_0, /*bytes*/2); subdevice = aic_pci_read_config(pci, PCIR_SUBDEV_0, /*bytes*/2); + + if ((vendor == ADAPTECVENDORID) && (subvendor == SUBVENDOR9005)) { + if ((device == DEVICE8081) || (device == DEVICE8088) || + (device == DEVICE8089)) { + printf("Controller device ID conflict with PMC Adaptec HBA\n"); + return (NULL); + } + } + full_id = ahd_compose_id(device, vendor, subdevice, From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 15:14:54 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED68EFCB; Fri, 5 Jun 2015 15:14:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB5B218AA; Fri, 5 Jun 2015 15:14:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55FEsSW062155; Fri, 5 Jun 2015 15:14:54 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55FEsMb062154; Fri, 5 Jun 2015 15:14:54 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506051514.t55FEsMb062154@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2015 15:14:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284023 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 15:14:55 -0000 Author: avg Date: Fri Jun 5 15:14:54 2015 New Revision: 284023 URL: https://svnweb.freebsd.org/changeset/base/284023 Log: bhyve/vmrun.sh: support passing disk options same as for bhyve(8) Differential Revision: https://reviews.freebsd.org/D2723 Reviewed by: neel MFC after: 8 days Modified: head/share/examples/bhyve/vmrun.sh Modified: head/share/examples/bhyve/vmrun.sh ============================================================================== --- head/share/examples/bhyve/vmrun.sh Fri Jun 5 11:37:54 2015 (r284022) +++ head/share/examples/bhyve/vmrun.sh Fri Jun 5 15:14:54 2015 (r284023) @@ -104,7 +104,10 @@ while getopts ac:C:d:e:g:hH:iI:m:p:t: c console=${OPTARG} ;; d) - eval "disk_dev${disk_total}=\"${OPTARG}\"" + disk_dev=${OPTARG%%,*} + disk_opts=${OPTARG#${disk_dev}} + eval "disk_dev${disk_total}=\"${disk_dev}\"" + eval "disk_opts${disk_total}=\"${disk_opts}\"" disk_total=$(($disk_total + 1)) ;; e) @@ -237,8 +240,9 @@ while [ 1 ]; do i=0 while [ $i -lt $disk_total ] ; do eval "disk=\$disk_dev${i}" + eval "opts=\$disk_opts${i}" make_and_check_diskdev "${disk}" - devargs="$devargs -s $nextslot:0,virtio-blk,${disk} " + devargs="$devargs -s $nextslot:0,virtio-blk,${disk}${opts} " nextslot=$(($nextslot + 1)) i=$(($i + 1)) done From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 15:16:27 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A57B619E; Fri, 5 Jun 2015 15:16:27 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79B4C18C1; Fri, 5 Jun 2015 15:16:27 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55FGRAw062470; Fri, 5 Jun 2015 15:16:27 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55FGRi0062469; Fri, 5 Jun 2015 15:16:27 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506051516.t55FGRi0062469@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2015 15:16:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284024 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 15:16:27 -0000 Author: avg Date: Fri Jun 5 15:16:26 2015 New Revision: 284024 URL: https://svnweb.freebsd.org/changeset/base/284024 Log: bhyve/vmrun.sh: pass all existing readable disks to bhyveload(8) This is done if the installation mode is not requested or auto-detected. This is useful when a kernel has to be loaded from multiple disks. For example from a RAID-Z pool or a ZFS pool with multiple top level vdevs. Differential Revision: https://reviews.freebsd.org/D2723 Reviewed by: neel MFC after: 8 days Modified: head/share/examples/bhyve/vmrun.sh Modified: head/share/examples/bhyve/vmrun.sh ============================================================================== --- head/share/examples/bhyve/vmrun.sh Fri Jun 5 15:14:54 2015 (r284023) +++ head/share/examples/bhyve/vmrun.sh Fri Jun 5 15:16:26 2015 (r284024) @@ -186,16 +186,16 @@ make_and_check_diskdev() echo "Launching virtual machine \"$vmname\" ..." -virtio_diskdev="$disk_dev0" +first_diskdev="$disk_dev0" ${BHYVECTL} --vm=${vmname} --destroy > /dev/null 2>&1 while [ 1 ]; do - file -s ${virtio_diskdev} | grep "boot sector" > /dev/null + file -s ${first_diskdev} | grep "boot sector" > /dev/null rc=$? if [ $rc -ne 0 ]; then - file -s ${virtio_diskdev} | grep ": Unix Fast File sys" > /dev/null + file -s ${first_diskdev} | grep ": Unix Fast File sys" > /dev/null rc=$? fi if [ $rc -ne 0 ]; then @@ -210,14 +210,22 @@ while [ 1 ]; do echo "is not readable" exit 1 fi - BOOTDISK=${isofile} - installer_opt="-s 31:0,ahci-cd,${BOOTDISK}" + BOOTDISKS="-d ${isofile}" + installer_opt="-s 31:0,ahci-cd,${isofile}" else - BOOTDISK=${virtio_diskdev} + BOOTDISKS="" + i=0 + while [ $i -lt $disk_total ] ; do + eval "disk=\$disk_dev${i}" + if [ -r ${disk} ] ; then + BOOTDISKS="$BOOTDISKS -d ${disk} " + fi + i=$(($i + 1)) + done installer_opt="" fi - ${LOADER} -c ${console} -m ${memsize} -d ${BOOTDISK} ${loader_opt} \ + ${LOADER} -c ${console} -m ${memsize} ${BOOTDISKS} ${loader_opt} \ ${vmname} bhyve_exit=$? if [ $bhyve_exit -ne 0 ]; then From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 15:32:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5878A496; Fri, 5 Jun 2015 15:32:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 468C21D6C; Fri, 5 Jun 2015 15:32:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55FW5lv071703; Fri, 5 Jun 2015 15:32:05 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55FW5Cl071702; Fri, 5 Jun 2015 15:32:05 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506051532.t55FW5Cl071702@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2015 15:32:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284025 - head/sys/boot/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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 15:32:05 -0000 Author: avg Date: Fri Jun 5 15:32:04 2015 New Revision: 284025 URL: https://svnweb.freebsd.org/changeset/base/284025 Log: dnode_read: handle hole blocks in zfs boot code A hole block pointer can be encountered at any level and the hole can cover multiple data blocks, but we are reading the data blocks one by one, so we care only about the current one. PR: 199804 Reported by: Toomas Soome Submitted by: Toomas Soome (earlier version) Tested by: Toomas Soome MFC after: 11 days Modified: head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Fri Jun 5 15:16:26 2015 (r284024) +++ head/sys/boot/zfs/zfsimpl.c Fri Jun 5 15:32:04 2015 (r284025) @@ -1255,6 +1255,10 @@ dnode_read(const spa_t *spa, const dnode ibn = bn >> ((nlevels - i - 1) * ibshift); ibn &= ((1 << ibshift) - 1); bp = indbp[ibn]; + if (BP_IS_HOLE(bp)) { + memset(dnode_cache_buf, 0, bsize); + break; + } rc = zio_read(spa, &bp, dnode_cache_buf); if (rc) return (rc); From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 15:51:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35487A7E; Fri, 5 Jun 2015 15:51:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 081121216; Fri, 5 Jun 2015 15:51:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55FpNGi081548; Fri, 5 Jun 2015 15:51:23 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55FpNAh081547; Fri, 5 Jun 2015 15:51:23 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506051551.t55FpNAh081547@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2015 15:51: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: r284026 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 15:51:24 -0000 Author: avg Date: Fri Jun 5 15:51:23 2015 New Revision: 284026 URL: https://svnweb.freebsd.org/changeset/base/284026 Log: MFC r282766: zfs ioctls: use fget_write / fget_read instead of getf wrapper for fget Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Jun 5 15:32:04 2015 (r284025) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Jun 5 15:51:23 2015 (r284026) @@ -4196,7 +4196,11 @@ zfs_ioc_recv(zfs_cmd_t *zc) return (error); fd = zc->zc_cookie; - fp = getf(fd, cap_rights_init(&rights, CAP_PREAD)); +#ifdef illumos + fp = getf(fd); +#else + fget_read(curthread, fd, cap_rights_init(&rights, CAP_PREAD), &fp); +#endif if (fp == NULL) { nvlist_free(props); return (SET_ERROR(EBADF)); @@ -4442,8 +4446,12 @@ zfs_ioc_send(zfs_cmd_t *zc) file_t *fp; cap_rights_t rights; - fp = getf(zc->zc_cookie, - cap_rights_init(&rights, CAP_WRITE)); +#ifdef illumos + fp = getf(zc->zc_cookie); +#else + fget_write(curthread, zc->zc_cookie, + cap_rights_init(&rights, CAP_WRITE), &fp); +#endif if (fp == NULL) return (SET_ERROR(EBADF)); @@ -5039,7 +5047,12 @@ zfs_ioc_diff(zfs_cmd_t *zc) offset_t off; int error; - fp = getf(zc->zc_cookie, cap_rights_init(&rights, CAP_WRITE)); +#ifdef illumos + fp = getf(zc->zc_cookie); +#else + fget_write(curthread, zc->zc_cookie, + cap_rights_init(&rights, CAP_WRITE), &fp); +#endif if (fp == NULL) return (SET_ERROR(EBADF)); @@ -5404,6 +5417,7 @@ static int zfs_ioc_send_new(const char *snapname, nvlist_t *innvl, nvlist_t *outnvl) { cap_rights_t rights; + file_t *fp; int error; offset_t off; char *fromname = NULL; @@ -5420,7 +5434,11 @@ zfs_ioc_send_new(const char *snapname, n largeblockok = nvlist_exists(innvl, "largeblockok"); embedok = nvlist_exists(innvl, "embedok"); - file_t *fp = getf(fd, cap_rights_init(&rights, CAP_READ)); +#ifdef illumos + file_t *fp = getf(fd); +#else + fget_write(curthread, fd, cap_rights_init(&rights, CAP_WRITE), &fp); +#endif if (fp == NULL) return (SET_ERROR(EBADF)); From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 16:02:08 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 913B8D9C; Fri, 5 Jun 2015 16:02:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E88C15BF; Fri, 5 Jun 2015 16:02:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55G28x7086745; Fri, 5 Jun 2015 16:02:08 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55G28l5086744; Fri, 5 Jun 2015 16:02:08 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506051602.t55G28l5086744@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2015 16:02: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: r284027 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 16:02:08 -0000 Author: avg Date: Fri Jun 5 16:02:07 2015 New Revision: 284027 URL: https://svnweb.freebsd.org/changeset/base/284027 Log: MFC r283524: dsl_dataset_promote_check: ensure that shared snaps do not become too long Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Jun 5 15:51:23 2015 (r284026) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Jun 5 16:02:07 2015 (r284027) @@ -2088,12 +2088,14 @@ dsl_dataset_promote_check(void *arg, dmu int err; uint64_t unused; uint64_t ss_mv_cnt; + size_t max_snap_len; err = promote_hold(ddpa, dp, FTAG); if (err != 0) return (err); hds = ddpa->ddpa_clone; + max_snap_len = MAXNAMELEN - strlen(ddpa->ddpa_clonename) - 1; if (hds->ds_phys->ds_flags & DS_FLAG_NOPROMOTE) { promote_rele(ddpa, FTAG); @@ -2156,6 +2158,10 @@ dsl_dataset_promote_check(void *arg, dmu /* Check that the snapshot name does not conflict */ VERIFY0(dsl_dataset_get_snapname(ds)); + if (strlen(ds->ds_snapname) >= max_snap_len) { + err = SET_ERROR(ENAMETOOLONG); + goto out; + } err = dsl_dataset_snap_lookup(hds, ds->ds_snapname, &val); if (err == 0) { (void) strcpy(ddpa->err_ds, snap->ds->ds_snapname); From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 16:02:25 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA2E4ED2; Fri, 5 Jun 2015 16:02:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96F3815C5; Fri, 5 Jun 2015 16:02:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55G2Pl5086842; Fri, 5 Jun 2015 16:02:25 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55G2Pgi086841; Fri, 5 Jun 2015 16:02:25 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506051602.t55G2Pgi086841@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2015 16:02:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284028 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 16:02:25 -0000 Author: avg Date: Fri Jun 5 16:02:24 2015 New Revision: 284028 URL: https://svnweb.freebsd.org/changeset/base/284028 Log: MFC r283524: dsl_dataset_promote_check: ensure that shared snaps do not become too long Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Jun 5 16:02:07 2015 (r284027) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Jun 5 16:02:24 2015 (r284028) @@ -2161,12 +2161,14 @@ dsl_dataset_promote_check(void *arg, dmu int err; uint64_t unused; uint64_t ss_mv_cnt; + size_t max_snap_len; err = promote_hold(ddpa, dp, FTAG); if (err != 0) return (err); hds = ddpa->ddpa_clone; + max_snap_len = MAXNAMELEN - strlen(ddpa->ddpa_clonename) - 1; if (dsl_dataset_phys(hds)->ds_flags & DS_FLAG_NOPROMOTE) { promote_rele(ddpa, FTAG); @@ -2230,6 +2232,10 @@ dsl_dataset_promote_check(void *arg, dmu /* Check that the snapshot name does not conflict */ VERIFY0(dsl_dataset_get_snapname(ds)); + if (strlen(ds->ds_snapname) >= max_snap_len) { + err = SET_ERROR(ENAMETOOLONG); + goto out; + } err = dsl_dataset_snap_lookup(hds, ds->ds_snapname, &val); if (err == 0) { (void) strcpy(ddpa->err_ds, snap->ds->ds_snapname); From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 16:21:44 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6075BCDD; Fri, 5 Jun 2015 16:21:44 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DA9D19F1; Fri, 5 Jun 2015 16:21:44 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55GLixe095006; Fri, 5 Jun 2015 16:21:44 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55GLiKp095005; Fri, 5 Jun 2015 16:21:44 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201506051621.t55GLiKp095005@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Fri, 5 Jun 2015 16:21:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284029 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 16:21:44 -0000 Author: sbruno Date: Fri Jun 5 16:21:43 2015 New Revision: 284029 URL: https://svnweb.freebsd.org/changeset/base/284029 Log: This change uses a reader count instead of holding the mutex for the interpreter list to avoid the problem of holding a non-sleep lock during a page fault as reported by witness. In addition, it consistently uses memset()/memcpy() instead of bzero()/bcopy() except in the case where bcopy() is required (i.e. overlapping copy). Differential Revision: https://reviews.freebsd.org/D2123 Submitted by: sson MFC after: 2 weeks Relnotes: Yes Modified: head/sys/kern/imgact_binmisc.c Modified: head/sys/kern/imgact_binmisc.c ============================================================================== --- head/sys/kern/imgact_binmisc.c Fri Jun 5 16:02:24 2015 (r284028) +++ head/sys/kern/imgact_binmisc.c Fri Jun 5 16:21:43 2015 (r284029) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013, Stacey D. Son + * Copyright (c) 2013-15, Stacey D. Son * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,6 +41,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include + +#include /** * Miscellaneous binary interpreter image activator. @@ -95,11 +98,68 @@ static SLIST_HEAD(, imgact_binmisc_entry SLIST_HEAD_INITIALIZER(interpreter_list); static int interp_list_entry_count = 0; - +static int interp_list_rcount = 0; static struct mtx interp_list_mtx; int imgact_binmisc_exec(struct image_params *imgp); +static inline void +interp_list_rlock() +{ + + /* Don't use atomic_add() here. We must block if the mutex is held. */ + mtx_lock(&interp_list_mtx); + interp_list_rcount++; + mtx_unlock(&interp_list_mtx); +} + +static inline void +interp_list_runlock() +{ + + /* Decrement the reader count and wake up one writer, if any. */ + atomic_subtract_int(&interp_list_rcount, 1); + if (interp_list_rcount == 0) + wakeup_one(&interp_list_rcount); +} + +static inline void +interp_list_wlock() +{ + + /* Wait until there are no readers. */ + mtx_lock(&interp_list_mtx); + while (interp_list_rcount) + mtx_sleep(&interp_list_rcount, &interp_list_mtx, 0, "IABM", 0); +} + +static inline void +interp_list_wunlock() +{ + + mtx_unlock(&interp_list_mtx); +} + +#define interp_list_assert_rlocked() \ + KASSERT(interp_list_rcount > 0, ("%s: interp_list lock not held " \ + "for read", __func__)) + +#define interp_list_assert_wlocked() mtx_assert(&interp_list_mtx, MA_OWNED) + +#ifdef INVARIANTS +#define interp_list_assert_locked() do { \ + if (interp_list_rcount == 0) \ + mtx_assert(&interp_list_mtx, MA_OWNED); \ + else \ + KASSERT(interp_list_rcount > 0, \ + ("%s: interp_list lock not held", __func__)); \ +} while(0) + +#else /* ! INVARIANTS */ + +#define interp_list_assert_locked() do { \ +} while(0) +#endif /* ! INVARIANTS */ /* * Populate the entry with the information about the interpreter. @@ -111,7 +171,7 @@ imgact_binmisc_populate_interp(char *str char t[IBE_INTERP_LEN_MAX]; char *sp, *tp; - bzero(t, sizeof(t)); + memset(t, 0, sizeof(t)); /* * Normalize interpreter string. Replace white space between args with @@ -152,8 +212,6 @@ imgact_binmisc_new_entry(ximgact_binmisc imgact_binmisc_entry_t *ibe = NULL; size_t namesz = min(strlen(xbe->xbe_name) + 1, IBE_NAME_MAX); - mtx_assert(&interp_list_mtx, MA_NOTOWNED); - ibe = malloc(sizeof(*ibe), M_BINMISC, M_WAITOK|M_ZERO); ibe->ibe_name = malloc(namesz, M_BINMISC, M_WAITOK|M_ZERO); @@ -203,7 +261,7 @@ imgact_binmisc_find_entry(char *name) { imgact_binmisc_entry_t *ibe; - mtx_assert(&interp_list_mtx, MA_OWNED); + interp_list_assert_locked(); SLIST_FOREACH(ibe, &interpreter_list, link) { if (strncmp(name, ibe->ibe_name, IBE_NAME_MAX) == 0) @@ -260,21 +318,21 @@ imgact_binmisc_add_entry(ximgact_binmisc } } - mtx_lock(&interp_list_mtx); - if (imgact_binmisc_find_entry(xbe->xbe_name) != NULL) { - mtx_unlock(&interp_list_mtx); - return (EEXIST); - } - mtx_unlock(&interp_list_mtx); - + /* Preallocate a new entry. */ ibe = imgact_binmisc_new_entry(xbe); if (!ibe) return (ENOMEM); - mtx_lock(&interp_list_mtx); + interp_list_wlock(); + if (imgact_binmisc_find_entry(xbe->xbe_name) != NULL) { + interp_list_wunlock(); + imgact_binmisc_destroy_entry(ibe); + return (EEXIST); + } + SLIST_INSERT_HEAD(&interpreter_list, ibe, link); interp_list_entry_count++; - mtx_unlock(&interp_list_mtx); + interp_list_wunlock(); return (0); } @@ -288,14 +346,14 @@ imgact_binmisc_remove_entry(char *name) { imgact_binmisc_entry_t *ibe; - mtx_lock(&interp_list_mtx); + interp_list_wlock(); if ((ibe = imgact_binmisc_find_entry(name)) == NULL) { - mtx_unlock(&interp_list_mtx); + interp_list_wunlock(); return (ENOENT); } SLIST_REMOVE(&interpreter_list, ibe, imgact_binmisc_entry, link); interp_list_entry_count--; - mtx_unlock(&interp_list_mtx); + interp_list_wunlock(); imgact_binmisc_destroy_entry(ibe); @@ -311,14 +369,14 @@ imgact_binmisc_disable_entry(char *name) { imgact_binmisc_entry_t *ibe; - mtx_lock(&interp_list_mtx); + interp_list_rlock(); if ((ibe = imgact_binmisc_find_entry(name)) == NULL) { - mtx_unlock(&interp_list_mtx); + interp_list_runlock(); return (ENOENT); } - ibe->ibe_flags &= ~IBF_ENABLED; - mtx_unlock(&interp_list_mtx); + atomic_clear_32(&ibe->ibe_flags, IBF_ENABLED); + interp_list_runlock(); return (0); } @@ -332,14 +390,14 @@ imgact_binmisc_enable_entry(char *name) { imgact_binmisc_entry_t *ibe; - mtx_lock(&interp_list_mtx); + interp_list_rlock(); if ((ibe = imgact_binmisc_find_entry(name)) == NULL) { - mtx_unlock(&interp_list_mtx); + interp_list_runlock(); return (ENOENT); } - ibe->ibe_flags |= IBF_ENABLED; - mtx_unlock(&interp_list_mtx); + atomic_set_32(&ibe->ibe_flags, IBF_ENABLED); + interp_list_runlock(); return (0); } @@ -350,9 +408,9 @@ imgact_binmisc_populate_xbe(ximgact_binm { uint32_t i; - mtx_assert(&interp_list_mtx, MA_OWNED); + interp_list_assert_rlocked(); - bzero(xbe, sizeof(*xbe)); + memset(xbe, 0, sizeof(*xbe)); strlcpy(xbe->xbe_name, ibe->ibe_name, IBE_NAME_MAX); /* Copy interpreter string. Replace NULL breaks with space. */ @@ -382,14 +440,14 @@ imgact_binmisc_lookup_entry(char *name, imgact_binmisc_entry_t *ibe; int error = 0; - mtx_lock(&interp_list_mtx); + interp_list_rlock(); if ((ibe = imgact_binmisc_find_entry(name)) == NULL) { - mtx_unlock(&interp_list_mtx); + interp_list_runlock(); return (ENOENT); } error = imgact_binmisc_populate_xbe(xbe, ibe); - mtx_unlock(&interp_list_mtx); + interp_list_runlock(); return (error); } @@ -404,12 +462,12 @@ imgact_binmisc_get_all_entries(struct sy imgact_binmisc_entry_t *ibe; int error = 0, count; - mtx_lock(&interp_list_mtx); + interp_list_rlock(); count = interp_list_entry_count; /* Don't block in malloc() while holding lock. */ xbe = malloc(sizeof(*xbe) * count, M_BINMISC, M_NOWAIT|M_ZERO); if (!xbe) { - mtx_unlock(&interp_list_mtx); + interp_list_runlock(); return (ENOMEM); } @@ -419,7 +477,7 @@ imgact_binmisc_get_all_entries(struct sy if (error) break; } - mtx_unlock(&interp_list_mtx); + interp_list_runlock(); if (!error) error = SYSCTL_OUT(req, xbe, sizeof(*xbe) * count); @@ -556,7 +614,7 @@ imgact_binmisc_find_interpreter(const ch int i; size_t sz; - mtx_assert(&interp_list_mtx, MA_OWNED); + interp_list_assert_rlocked(); SLIST_FOREACH(ibe, &interpreter_list, link) { if (!(IBF_ENABLED & ibe->ibe_flags)) @@ -593,15 +651,15 @@ imgact_binmisc_exec(struct image_params char *s, *d; /* Do we have an interpreter for the given image header? */ - mtx_lock(&interp_list_mtx); + interp_list_rlock(); if ((ibe = imgact_binmisc_find_interpreter(image_header)) == NULL) { - mtx_unlock(&interp_list_mtx); + interp_list_runlock(); return (-1); } /* No interpreter nesting allowed. */ if (imgp->interpreted & IMGACT_BINMISC) { - mtx_unlock(&interp_list_mtx); + interp_list_runlock(); return (ENOEXEC); } @@ -649,7 +707,7 @@ imgact_binmisc_exec(struct image_params default: /* Hmm... This shouldn't happen. */ - mtx_unlock(&interp_list_mtx); + interp_list_runlock(); printf("%s: Unknown macro #%c sequence in " "interpreter string\n", KMOD_NAME, *(s + 1)); error = EINVAL; @@ -660,12 +718,15 @@ imgact_binmisc_exec(struct image_params /* Check to make sure we won't overrun the stringspace. */ if (offset > imgp->args->stringspace) { - mtx_unlock(&interp_list_mtx); + interp_list_runlock(); error = E2BIG; goto done; } - /* Make room for the interpreter */ + /* + * Make room for the interpreter. Doing an overlapping copy so + * bcopy() must be used. + */ bcopy(imgp->args->begin_argv, imgp->args->begin_argv + offset, imgp->args->endp - imgp->args->begin_argv); @@ -720,7 +781,7 @@ imgact_binmisc_exec(struct image_params s++; } *d = '\0'; - mtx_unlock(&interp_list_mtx); + interp_list_runlock(); if (!error) imgp->interpreter_name = imgp->args->begin_argv; @@ -745,13 +806,13 @@ imgact_binmisc_fini(void *arg) imgact_binmisc_entry_t *ibe, *ibe_tmp; /* Free all the interpreters. */ - mtx_lock(&interp_list_mtx); + interp_list_wlock(); SLIST_FOREACH_SAFE(ibe, &interpreter_list, link, ibe_tmp) { SLIST_REMOVE(&interpreter_list, ibe, imgact_binmisc_entry, link); imgact_binmisc_destroy_entry(ibe); } - mtx_unlock(&interp_list_mtx); + interp_list_wunlock(); mtx_destroy(&interp_list_mtx); } From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 16:49:24 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70D87B9A; Fri, 5 Jun 2015 16:49:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4401C1061; Fri, 5 Jun 2015 16:49:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55GnO9k009133; Fri, 5 Jun 2015 16:49:24 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55GnO1A009132; Fri, 5 Jun 2015 16:49:24 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506051649.t55GnO1A009132@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2015 16:49:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r284030 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/ztest 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 16:49:24 -0000 Author: avg Date: Fri Jun 5 16:49:21 2015 New Revision: 284030 URL: https://svnweb.freebsd.org/changeset/base/284030 Log: 5818 zfs {ref}compressratio is incorrect with 4k sector size Author: Matthew Ahrens Reviewed by: George Wilson Reviewed by: Richard Elling Reviewed by: Steven Hartland Reviewed by: Don Brady Approved by: Albert Lee illumos/illumos-gate@81cd5c555f505484180a62ca5a2fbb00d70c57d6 Modified: vendor/illumos/dist/cmd/ztest/ztest.c Changes in other areas also in this revision: Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa_misc.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Modified: vendor/illumos/dist/cmd/ztest/ztest.c ============================================================================== --- vendor/illumos/dist/cmd/ztest/ztest.c Fri Jun 5 16:21:43 2015 (r284029) +++ vendor/illumos/dist/cmd/ztest/ztest.c Fri Jun 5 16:49:21 2015 (r284030) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. */ @@ -967,21 +967,6 @@ ztest_random_spa_version(uint64_t initia return (version); } -/* - * Find the largest ashift used - */ -static uint64_t -ztest_spa_get_ashift() { - uint64_t i; - uint64_t ashift = SPA_MINBLOCKSHIFT; - vdev_t *rvd = ztest_spa->spa_root_vdev; - - for (i = 0; i < rvd->vdev_children; i++) { - ashift = MAX(ashift, rvd->vdev_child[i]->vdev_ashift); - } - return (ashift); -} - static int ztest_random_blocksize(void) { @@ -993,7 +978,7 @@ ztest_random_blocksize(void) int maxbs = SPA_OLD_MAXBLOCKSHIFT; if (spa_maxblocksize(ztest_spa) == SPA_MAXBLOCKSIZE) maxbs = 20; - block_shift = ztest_random(maxbs - ztest_spa_get_ashift() + 1); + block_shift = ztest_random(maxbs - ztest_spa->spa_max_ashift + 1); return (1 << (SPA_MINBLOCKSHIFT + block_shift)); } From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 16:49:23 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA6F4B99; Fri, 5 Jun 2015 16:49:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB84F1060; Fri, 5 Jun 2015 16:49:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55GnNQB009124; Fri, 5 Jun 2015 16:49:23 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55GnM9w009117; Fri, 5 Jun 2015 16:49:22 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506051649.t55GnM9w009117@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2015 16:49:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r284030 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/ztest 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 16:49:24 -0000 Author: avg Date: Fri Jun 5 16:49:21 2015 New Revision: 284030 URL: https://svnweb.freebsd.org/changeset/base/284030 Log: 5818 zfs {ref}compressratio is incorrect with 4k sector size Author: Matthew Ahrens Reviewed by: George Wilson Reviewed by: Richard Elling Reviewed by: Steven Hartland Reviewed by: Don Brady Approved by: Albert Lee illumos/illumos-gate@81cd5c555f505484180a62ca5a2fbb00d70c57d6 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa_misc.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Changes in other areas also in this revision: Modified: vendor/illumos/dist/cmd/ztest/ztest.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c Fri Jun 5 16:21:43 2015 (r284029) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c Fri Jun 5 16:49:21 2015 (r284030) @@ -2195,6 +2195,8 @@ spa_load_impl(spa_t *spa, uint64_t pool_ return (error); ASSERT(spa->spa_root_vdev == rvd); + ASSERT3U(spa->spa_min_ashift, >=, SPA_MINBLOCKSHIFT); + ASSERT3U(spa->spa_max_ashift, <=, SPA_MAXBLOCKSHIFT); if (type != SPA_IMPORT_ASSEMBLE) { ASSERT(spa_guid(spa) == pool_guid); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/spa_misc.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/spa_misc.c Fri Jun 5 16:21:43 2015 (r284029) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/spa_misc.c Fri Jun 5 16:49:21 2015 (r284030) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. */ @@ -648,6 +648,9 @@ spa_add(const char *name, nvlist_t *conf spa->spa_debug = ((zfs_flags & ZFS_DEBUG_SPA) != 0); + spa->spa_min_ashift = INT_MAX; + spa->spa_max_ashift = 0; + /* * As a pool is being created, treat all features as disabled by * setting SPA_FEATURE_DISABLED for all entries in the feature Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h Fri Jun 5 16:21:43 2015 (r284029) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h Fri Jun 5 16:49:21 2015 (r284030) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. */ @@ -150,6 +150,8 @@ struct spa { kcondvar_t spa_evicting_os_cv; /* Objset Eviction Completion */ txg_list_t spa_vdev_txg_list; /* per-txg dirty vdev list */ vdev_t *spa_root_vdev; /* top-level vdev container */ + int spa_min_ashift; /* of vdevs in normal class */ + int spa_max_ashift; /* of vdevs in normal class */ uint64_t spa_config_guid; /* config pool guid */ uint64_t spa_load_guid; /* spa_load initialized guid */ uint64_t spa_last_synced_guid; /* last synced guid */ Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_impl.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_impl.h Fri Jun 5 16:21:43 2015 (r284029) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_impl.h Fri Jun 5 16:49:21 2015 (r284030) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. */ #ifndef _SYS_VDEV_IMPL_H @@ -207,7 +207,7 @@ struct vdev { boolean_t vdev_isl2cache; /* was a l2cache device */ vdev_queue_t vdev_queue; /* I/O deadline schedule queue */ vdev_cache_t vdev_cache; /* physical block cache */ - spa_aux_vdev_t *vdev_aux; /* for l2cache vdevs */ + spa_aux_vdev_t *vdev_aux; /* for l2cache and spares vdevs */ zio_t *vdev_probe_zio; /* root of current probe */ vdev_aux_t vdev_label_aux; /* on-disk aux state */ Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Fri Jun 5 16:21:43 2015 (r284029) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Fri Jun 5 16:49:21 2015 (r284030) @@ -21,8 +21,8 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ #include @@ -184,8 +184,9 @@ vdev_add_child(vdev_t *pvd, vdev_t *cvd) size_t oldsize, newsize; uint64_t id = cvd->vdev_id; vdev_t **newchild; + spa_t *spa = cvd->vdev_spa; - ASSERT(spa_config_held(cvd->vdev_spa, SCL_ALL, RW_WRITER) == SCL_ALL); + ASSERT(spa_config_held(spa, SCL_ALL, RW_WRITER) == SCL_ALL); ASSERT(cvd->vdev_parent == NULL); cvd->vdev_parent = pvd; @@ -1287,6 +1288,17 @@ vdev_open(vdev_t *vd) } /* + * Track the min and max ashift values for normal data devices. + */ + if (vd->vdev_top == vd && vd->vdev_ashift != 0 && + !vd->vdev_islog && vd->vdev_aux == NULL) { + if (vd->vdev_ashift > spa->spa_max_ashift) + spa->spa_max_ashift = vd->vdev_ashift; + if (vd->vdev_ashift < spa->spa_min_ashift) + spa->spa_min_ashift = vd->vdev_ashift; + } + + /* * If a leaf vdev has a DTL, and seems healthy, then kick off a * resilver. But don't do this if we are doing a reopen for a scrub, * since this would just restart the scrub we are already doing. Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Fri Jun 5 16:21:43 2015 (r284029) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Fri Jun 5 16:49:21 2015 (r284030) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2011 Nexenta Systems, Inc. All rights reserved. */ @@ -1178,19 +1178,23 @@ zio_write_bp_init(zio_t *zio) return (ZIO_PIPELINE_CONTINUE); } else { /* - * Round up compressed size to MINBLOCKSIZE and - * zero the tail. + * Round up compressed size up to the ashift + * of the smallest-ashift device, and zero the tail. + * This ensures that the compressed size of the BP + * (and thus compressratio property) are correct, + * in that we charge for the padding used to fill out + * the last sector. */ - size_t rounded = - P2ROUNDUP(psize, (size_t)SPA_MINBLOCKSIZE); - if (rounded > psize) { - bzero((char *)cbuf + psize, rounded - psize); - psize = rounded; - } - if (psize == lsize) { + ASSERT3U(spa->spa_min_ashift, >=, SPA_MINBLOCKSHIFT); + size_t rounded = (size_t)P2ROUNDUP(psize, + 1ULL << spa->spa_min_ashift); + if (rounded >= lsize) { compress = ZIO_COMPRESS_OFF; zio_buf_free(cbuf, lsize); + psize = lsize; } else { + bzero((char *)cbuf + psize, rounded - psize); + psize = rounded; zio_push_transform(zio, cbuf, psize, lsize, NULL); } From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 16:52:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 450F1E69; Fri, 5 Jun 2015 16:52:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32D101282; Fri, 5 Jun 2015 16:52:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55GqOb9013192; Fri, 5 Jun 2015 16:52:24 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55GqOjh013191; Fri, 5 Jun 2015 16:52:24 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506051652.t55GqOjh013191@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2015 16:52:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r284031 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 16:52:24 -0000 Author: avg Date: Fri Jun 5 16:52:23 2015 New Revision: 284031 URL: https://svnweb.freebsd.org/changeset/base/284031 Log: 5515 dataset user hold doesn't reject empty tags Author: Josef 'Jeff' Sipek Reviewed by: Yuri Pankov Reviewed by: Saso Kiselkov Approved by: Matthew Ahrens illumos/illumos-gate@752fd8dabccac68d6d09f82f3bf3561e055e400b Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Fri Jun 5 16:49:21 2015 (r284030) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Fri Jun 5 16:52:23 2015 (r284031) @@ -5132,6 +5132,19 @@ zfs_ioc_hold(const char *pool, nvlist_t return (SET_ERROR(EINVAL)); } + /* make sure the user didn't pass us any invalid (empty) tags */ + for (pair = nvlist_next_nvpair(holds, NULL); pair != NULL; + pair = nvlist_next_nvpair(holds, pair)) { + char *htag; + + error = nvpair_value_string(pair, &htag); + if (error != 0) + return (SET_ERROR(error)); + + if (strlen(htag) == 0) + return (SET_ERROR(EINVAL)); + } + if (nvlist_lookup_int32(args, "cleanup_fd", &cleanup_fd) == 0) { error = zfs_onexit_fd_hold(cleanup_fd, &minor); if (error != 0) From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 16:54:23 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70BAEFB8; Fri, 5 Jun 2015 16:54:23 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com [IPv6:2a00:1450:400c:c05::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 193B11294; Fri, 5 Jun 2015 16:54:23 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by wibut5 with SMTP id ut5so27105851wib.1; Fri, 05 Jun 2015 09:54:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=yyvSAky6sWyXI8u2rDljowf8b2qZyHGen9vwIIX1AF0=; b=T8hfcbRISy3Ict3rxnKFVXAeLlHrymrIcFCy76Ry1lJjU06oBWLNbIp2PnCXcNneAC GKuhoEC3tca1X84Hky0FpEIukq/FrAXQt2IIiy7Ec/EnU+qZdk6NJ3Ln078g2LcNXntD exrh58oWhB4rXt++leoLssiRGBU9PjA/QOKhhicr+nCKcWbja/H6gjWeNoqgV7gTOymf PsHBpLaWUSYIIGFPvg27JypmTEbAaN2w0/YLp8oYa5bZpz5ihyDKxxCkGVv/9F6UZt63 KsQf0y1+VTbyMXMIMusutDa89UOCdBQifKaR1xkhIf0IvJYF9GxV83UZO6LoMkxW2o6o +pCQ== X-Received: by 10.180.105.227 with SMTP id gp3mr19956587wib.56.1433523261452; Fri, 05 Jun 2015 09:54:21 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id r6sm4226612wiy.13.2015.06.05.09.54.19 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 05 Jun 2015 09:54:20 -0700 (PDT) Date: Fri, 5 Jun 2015 18:54:18 +0200 From: Mateusz Guzik To: Sean Bruno Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284029 - head/sys/kern Message-ID: <20150605165417.GA13205@dft-labs.eu> References: <201506051621.t55GLiKp095005@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201506051621.t55GLiKp095005@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 16:54:23 -0000 On Fri, Jun 05, 2015 at 04:21:44PM +0000, Sean Bruno wrote: > Author: sbruno > Date: Fri Jun 5 16:21:43 2015 > New Revision: 284029 > URL: https://svnweb.freebsd.org/changeset/base/284029 > > Log: > This change uses a reader count instead of holding the mutex for the > interpreter list to avoid the problem of holding a non-sleep lock during > a page fault as reported by witness. In addition, it consistently uses > memset()/memcpy() instead of bzero()/bcopy() except in the case where > bcopy() is required (i.e. overlapping copy). What lock was that? If it has to be held, why not use an sx lock? The change looks quite buggy. > > Differential Revision: https://reviews.freebsd.org/D2123 > Submitted by: sson > MFC after: 2 weeks > Relnotes: Yes > > Modified: > head/sys/kern/imgact_binmisc.c > > Modified: head/sys/kern/imgact_binmisc.c > ============================================================================== > --- head/sys/kern/imgact_binmisc.c Fri Jun 5 16:02:24 2015 (r284028) > +++ head/sys/kern/imgact_binmisc.c Fri Jun 5 16:21:43 2015 (r284029) > @@ -1,5 +1,5 @@ > /*- > - * Copyright (c) 2013, Stacey D. Son > + * Copyright (c) 2013-15, Stacey D. Son > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > @@ -41,6 +41,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > + > +#include > > /** > * Miscellaneous binary interpreter image activator. > @@ -95,11 +98,68 @@ static SLIST_HEAD(, imgact_binmisc_entry > SLIST_HEAD_INITIALIZER(interpreter_list); > > static int interp_list_entry_count = 0; > - > +static int interp_list_rcount = 0; > static struct mtx interp_list_mtx; > > int imgact_binmisc_exec(struct image_params *imgp); > > +static inline void > +interp_list_rlock() > +{ > + > + /* Don't use atomic_add() here. We must block if the mutex is held. */ > + mtx_lock(&interp_list_mtx); > + interp_list_rcount++; > + mtx_unlock(&interp_list_mtx); > +} > + > +static inline void > +interp_list_runlock() > +{ > + > + /* Decrement the reader count and wake up one writer, if any. */ > + atomic_subtract_int(&interp_list_rcount, 1); > + if (interp_list_rcount == 0) > + wakeup_one(&interp_list_rcount); > +} > + interp_list_rcount manipulation between these 2 is not safe. This effectively is: A B interp_list_rcount++ atomic_subtract_int(&interp_list_rcount, 1); As such updates can be lost. There is also potential for bonus wakeup. > +static inline void > +interp_list_wlock() > +{ > + > + /* Wait until there are no readers. */ > + mtx_lock(&interp_list_mtx); > + while (interp_list_rcount) > + mtx_sleep(&interp_list_rcount, &interp_list_mtx, 0, "IABM", 0); > +} > + Given that runlock does not take the lock, this func can sleep after wakeup_one() thus blocking the thread with nobody to wake it up. -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 17:02:22 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2113A48E; Fri, 5 Jun 2015 17:02:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E94915AD; Fri, 5 Jun 2015 17:02:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55H2LFe018518; Fri, 5 Jun 2015 17:02:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55H2LFZ018517; Fri, 5 Jun 2015 17:02:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506051702.t55H2LFZ018517@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2015 17:02:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284032 - head/sys/boot/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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 17:02:22 -0000 Author: avg Date: Fri Jun 5 17:02:21 2015 New Revision: 284032 URL: https://svnweb.freebsd.org/changeset/base/284032 Log: dnode_read: fixup r284025, BP_IS_HOLE macro expects a pointer PR: 199804 Reported by: sbruno Pointyhat to: avg MFC after: 10 days X-MFC with: r284025 Modified: head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Fri Jun 5 16:52:23 2015 (r284031) +++ head/sys/boot/zfs/zfsimpl.c Fri Jun 5 17:02:21 2015 (r284032) @@ -1255,7 +1255,7 @@ dnode_read(const spa_t *spa, const dnode ibn = bn >> ((nlevels - i - 1) * ibshift); ibn &= ((1 << ibshift) - 1); bp = indbp[ibn]; - if (BP_IS_HOLE(bp)) { + if (BP_IS_HOLE(&bp)) { memset(dnode_cache_buf, 0, bsize); break; } From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 17:04:51 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 83C7A6F9; Fri, 5 Jun 2015 17:04:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 718A915D5; Fri, 5 Jun 2015 17:04:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55H4p8p019000; Fri, 5 Jun 2015 17:04:51 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55H4pir018999; Fri, 5 Jun 2015 17:04:51 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506051704.t55H4pir018999@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2015 17:04:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r284033 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 17:04:51 -0000 Author: avg Date: Fri Jun 5 17:04:50 2015 New Revision: 284033 URL: https://svnweb.freebsd.org/changeset/base/284033 Log: 5438 zfs_blkptr_verify should continue after zfs_panic_recover Author: Justin Gibbs Reviewed by: George Wilson Reviewed by: Xin LI Approved by: Dan McDonald illumos/illumos-gate@5897eb49ccde82d19214b71984f57935e7e313d1 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Fri Jun 5 17:02:21 2015 (r284032) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Fri Jun 5 17:04:50 2015 (r284033) @@ -643,18 +643,20 @@ zfs_blkptr_verify(spa_t *spa, const blkp zfs_panic_recover("blkptr at %p DVA %u has invalid " "VDEV %llu", bp, i, (longlong_t)vdevid); + continue; } vdev_t *vd = spa->spa_root_vdev->vdev_child[vdevid]; if (vd == NULL) { zfs_panic_recover("blkptr at %p DVA %u has invalid " "VDEV %llu", bp, i, (longlong_t)vdevid); + continue; } if (vd->vdev_ops == &vdev_hole_ops) { zfs_panic_recover("blkptr at %p DVA %u has hole " "VDEV %llu", bp, i, (longlong_t)vdevid); - + continue; } if (vd->vdev_ops == &vdev_missing_ops) { /* From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 17:05:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 283F082A; Fri, 5 Jun 2015 17:05:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 141C815DA; Fri, 5 Jun 2015 17:05:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55H5Crs019150; Fri, 5 Jun 2015 17:05:12 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55H595d019140; Fri, 5 Jun 2015 17:05:09 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506051705.t55H595d019140@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 5 Jun 2015 17:05:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284034 - in stable/10/sys/dev: pccbb pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 17:05:12 -0000 Author: jhb Date: Fri Jun 5 17:05:09 2015 New Revision: 284034 URL: https://svnweb.freebsd.org/changeset/base/284034 Log: MFC 274633,274639,274663,277233-277235,281870,281871,281873,281874: Various fixes for suspend and resume of PCI to PCI and PCI to Cardbus bridges. 274633: Remove stray empty comment. The code is adequately explained in the block comment above, so there's nothing to add here. 274639: Modernize comments about BIOSes being lame since in this detail they aren't lame, the rules changed along the way. Catch up to 1999 or so with the new rules. 274663: Fix typo pointed out by avg@ and Joerg Sonnenberger. Add a clarifying sentence too. 277233: Suspend and resume were the only two functions not to follow the brdev convention here, so fix that. 277234: Move the suspsned and resume functions to the bus attachment. They were accessing PCI config registers, which won't work for the ISA version. 277235: Always enable I/O, memory and dma cycles. Some BIOSes don't enable them, sometimes they are reset for power state transitions or during whatever happens while suspended. Also, it is good practice to always do this. 281870: Cosmetic change: use PCIR_SECLAT_2 rather than PCIR_SECLAT_1. 281871: The minimim grant and maximum latency PCI config registers are only valid for type 0 devices, not type 1 or 2 bridges. Don't read them for bridge devices during bus scans and return an error when attempting to read them as ivars for bridge devices. 281873: Don't explicitly manage power states for PCI-PCI bridge devices in the driver's suspend and resume routines. These have been redundant no-ops since r214065 changed the PCI bus driver to manage power states for all devices (including type 1/2 bridge devices) during suspend and resume. 281874: Update the pci_cfg_save/restore routines to operate on bridge devices (type 1 and type 2) as well as leaf devices (type 0). In particular, this allows the existing PCI bus logic to save and restore capability registers such as MSI and PCI-express work for bridge devices rather than requiring that code to be duplicated in bridge drivers. It also means that bridge drivers no longer need to save and restore basic registers such as the PCI command register or BARs nor manage powerstates for the bridge device. While here, pci_setup_secbus() has been changed to initialize the 'sec' and 'sub' fields in the 'secbus' structure instead of requiring the pcib and pccbb drivers to do this in the NEW_PCIB + PCI_RES_BUS case. Modified: stable/10/sys/dev/pccbb/pccbb.c stable/10/sys/dev/pccbb/pccbb_isa.c stable/10/sys/dev/pccbb/pccbb_pci.c stable/10/sys/dev/pccbb/pccbbvar.h stable/10/sys/dev/pci/pci.c stable/10/sys/dev/pci/pci_pci.c stable/10/sys/dev/pci/pcib_private.h stable/10/sys/dev/pci/pcivar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/pccbb/pccbb.c ============================================================================== --- stable/10/sys/dev/pccbb/pccbb.c Fri Jun 5 17:04:50 2015 (r284033) +++ stable/10/sys/dev/pccbb/pccbb.c Fri Jun 5 17:05:09 2015 (r284034) @@ -996,8 +996,6 @@ cbb_cardbus_reset_power(device_t brdev, * a cardbus bus, so that's the only register we check here. */ if (on && CBB_CARD_PRESENT(cbb_get(sc, CBB_SOCKET_STATE))) { - /* - */ PCI_MASK_CONFIG(brdev, CBBR_BRIDGECTRL, &~CBBM_BRIDGECTRL_RESET, 2); b = pcib_get_bus(child); @@ -1569,57 +1567,6 @@ cbb_write_ivar(device_t brdev, device_t } int -cbb_suspend(device_t self) -{ - int error = 0; - struct cbb_softc *sc = device_get_softc(self); - - error = bus_generic_suspend(self); - if (error != 0) - return (error); - cbb_set(sc, CBB_SOCKET_MASK, 0); /* Quiet hardware */ - sc->cardok = 0; /* Card is bogus now */ - return (0); -} - -int -cbb_resume(device_t self) -{ - int error = 0; - struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(self); - uint32_t tmp; - - /* - * Some BIOSes will not save the BARs for the pci chips, so we - * must do it ourselves. If the BAR is reset to 0 for an I/O - * device, it will read back as 0x1, so no explicit test for - * memory devices are needed. - * - * Note: The PCI bus code should do this automatically for us on - * suspend/resume, but until it does, we have to cope. - */ - pci_write_config(self, CBBR_SOCKBASE, rman_get_start(sc->base_res), 4); - DEVPRINTF((self, "PCI Memory allocated: %08lx\n", - rman_get_start(sc->base_res))); - - sc->chipinit(sc); - - /* reset interrupt -- Do we really need to do this? */ - tmp = cbb_get(sc, CBB_SOCKET_EVENT); - cbb_set(sc, CBB_SOCKET_EVENT, tmp); - - /* CSC Interrupt: Card detect interrupt on */ - cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); - - /* Signal the thread to wakeup. */ - wakeup(&sc->intrhand); - - error = bus_generic_resume(self); - - return (error); -} - -int cbb_child_present(device_t parent, device_t child) { struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(parent); Modified: stable/10/sys/dev/pccbb/pccbb_isa.c ============================================================================== --- stable/10/sys/dev/pccbb/pccbb_isa.c Fri Jun 5 17:04:50 2015 (r284033) +++ stable/10/sys/dev/pccbb/pccbb_isa.c Fri Jun 5 17:05:09 2015 (r284034) @@ -205,13 +205,25 @@ cbb_isa_attach(device_t dev) return (ENOMEM); } +static int +cbb_isa_suspend(device_t dev) +{ + return (0); +} + +static int +cbb_isa_resume(device_t dev) +{ + return (0); +} + static device_method_t cbb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, cbb_isa_probe), DEVMETHOD(device_attach, cbb_isa_attach), DEVMETHOD(device_detach, cbb_detach), - DEVMETHOD(device_suspend, cbb_suspend), - DEVMETHOD(device_resume, cbb_resume), + DEVMETHOD(device_suspend, cbb_isa_suspend), + DEVMETHOD(device_resume, cbb_isa_resume), /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), Modified: stable/10/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- stable/10/sys/dev/pccbb/pccbb_pci.c Fri Jun 5 17:04:50 2015 (r284033) +++ stable/10/sys/dev/pccbb/pccbb_pci.c Fri Jun 5 17:05:09 2015 (r284034) @@ -259,32 +259,6 @@ cbb_pci_probe(device_t brdev) } /* - * Still need this because the pci code only does power for type 0 - * header devices. - */ -static void -cbb_powerstate_d0(device_t dev) -{ - u_int32_t membase, irq; - - if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { - /* Save important PCI config data. */ - membase = pci_read_config(dev, CBBR_SOCKBASE, 4); - irq = pci_read_config(dev, PCIR_INTLINE, 4); - - /* Reset the power state. */ - device_printf(dev, "chip is in D%d power mode " - "-- setting to D0\n", pci_get_powerstate(dev)); - - pci_set_powerstate(dev, PCI_POWERSTATE_D0); - - /* Restore PCI config data. */ - pci_write_config(dev, CBBR_SOCKBASE, membase, 4); - pci_write_config(dev, PCIR_INTLINE, irq, 4); - } -} - -/* * Print out the config space */ static void @@ -321,15 +295,15 @@ cbb_pci_attach(device_t brdev) sc->cbdev = NULL; sc->exca[0].pccarddev = NULL; sc->domain = pci_get_domain(brdev); - sc->bus.sec = pci_read_config(brdev, PCIR_SECBUS_2, 1); - sc->bus.sub = pci_read_config(brdev, PCIR_SUBBUS_2, 1); sc->pribus = pcib_get_bus(parent); #if defined(NEW_PCIB) && defined(PCI_RES_BUS) pci_write_config(brdev, PCIR_PRIBUS_2, sc->pribus, 1); pcib_setup_secbus(brdev, &sc->bus, 1); +#else + sc->bus.sec = pci_read_config(brdev, PCIR_SECBUS_2, 1); + sc->bus.sub = pci_read_config(brdev, PCIR_SUBBUS_2, 1); #endif SLIST_INIT(&sc->rl); - cbb_powerstate_d0(brdev); rid = CBBR_SOCKBASE; sc->base_res = bus_alloc_resource_any(brdev, SYS_RES_MEMORY, &rid, @@ -467,22 +441,17 @@ cbb_chipinit(struct cbb_softc *sc) uint32_t mux, sysctrl, reg; /* Set CardBus latency timer */ - if (pci_read_config(sc->dev, PCIR_SECLAT_1, 1) < 0x20) - pci_write_config(sc->dev, PCIR_SECLAT_1, 0x20, 1); + if (pci_read_config(sc->dev, PCIR_SECLAT_2, 1) < 0x20) + pci_write_config(sc->dev, PCIR_SECLAT_2, 0x20, 1); /* Set PCI latency timer */ if (pci_read_config(sc->dev, PCIR_LATTIMER, 1) < 0x20) pci_write_config(sc->dev, PCIR_LATTIMER, 0x20, 1); - /* Restore bus configuration */ - pci_write_config(sc->dev, PCIR_PRIBUS_2, sc->pribus, 1); - pci_write_config(sc->dev, PCIR_SECBUS_2, sc->bus.sec, 1); - pci_write_config(sc->dev, PCIR_SUBBUS_2, sc->bus.sub, 1); - - /* Enable memory access */ + /* Enable DMA, memory access for this card and I/O acces for children */ pci_enable_busmaster(sc->dev); - /* XXX: This should not be necessary, but some chipsets require it */ - PCI_MASK_CONFIG(sc->dev, PCIR_COMMAND, | PCIM_CMD_PORTEN, 2); + pci_enable_io(sc->dev, SYS_RES_IOPORT); + pci_enable_io(sc->dev, SYS_RES_MEMORY); /* disable Legacy IO */ switch (sc->chipset) { @@ -877,14 +846,64 @@ cbb_write_config(device_t brdev, u_int b b, s, f, reg, val, width); } +static int +cbb_pci_suspend(device_t brdev) +{ + int error = 0; + struct cbb_softc *sc = device_get_softc(brdev); + + error = bus_generic_suspend(brdev); + if (error != 0) + return (error); + cbb_set(sc, CBB_SOCKET_MASK, 0); /* Quiet hardware */ + sc->cardok = 0; /* Card is bogus now */ + return (0); +} + +static int +cbb_pci_resume(device_t brdev) +{ + int error = 0; + struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev); + uint32_t tmp; + + /* + * In the APM and early ACPI era, BIOSes saved the PCI config + * registers. As chips became more complicated, that functionality moved + * into the ACPI code / tables. We must therefore, restore the settings + * we made here to make sure the device come back. Transitions to Dx + * from D0 and back to D0 cause the bridge to lose its config space, so + * all the bus mappings and such are preserved. + * + * The PCI layer handles standard PCI registers like the + * command register and BARs, but cbb-specific registers are + * handled here. + */ + sc->chipinit(sc); + + /* reset interrupt -- Do we really need to do this? */ + tmp = cbb_get(sc, CBB_SOCKET_EVENT); + cbb_set(sc, CBB_SOCKET_EVENT, tmp); + + /* CSC Interrupt: Card detect interrupt on */ + cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); + + /* Signal the thread to wakeup. */ + wakeup(&sc->intrhand); + + error = bus_generic_resume(brdev); + + return (error); +} + static device_method_t cbb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, cbb_pci_probe), DEVMETHOD(device_attach, cbb_pci_attach), DEVMETHOD(device_detach, cbb_detach), DEVMETHOD(device_shutdown, cbb_pci_shutdown), - DEVMETHOD(device_suspend, cbb_suspend), - DEVMETHOD(device_resume, cbb_resume), + DEVMETHOD(device_suspend, cbb_pci_suspend), + DEVMETHOD(device_resume, cbb_pci_resume), /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), Modified: stable/10/sys/dev/pccbb/pccbbvar.h ============================================================================== --- stable/10/sys/dev/pccbb/pccbbvar.h Fri Jun 5 17:04:50 2015 (r284033) +++ stable/10/sys/dev/pccbb/pccbbvar.h Fri Jun 5 17:05:09 2015 (r284034) @@ -134,11 +134,9 @@ int cbb_read_ivar(device_t brdev, device uintptr_t *result); int cbb_release_resource(device_t brdev, device_t child, int type, int rid, struct resource *r); -int cbb_resume(device_t self); int cbb_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep); -int cbb_suspend(device_t self); int cbb_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie); int cbb_write_ivar(device_t brdev, device_t child, int which, Modified: stable/10/sys/dev/pci/pci.c ============================================================================== --- stable/10/sys/dev/pci/pci.c Fri Jun 5 17:04:50 2015 (r284033) +++ stable/10/sys/dev/pci/pci.c Fri Jun 5 17:05:09 2015 (r284034) @@ -585,12 +585,24 @@ pci_hdrtypedata(device_t pcib, int b, in case PCIM_HDRTYPE_NORMAL: cfg->subvendor = REG(PCIR_SUBVEND_0, 2); cfg->subdevice = REG(PCIR_SUBDEV_0, 2); + cfg->mingnt = REG(PCIR_MINGNT, 1); + cfg->maxlat = REG(PCIR_MAXLAT, 1); cfg->nummaps = PCI_MAXMAPS_0; break; case PCIM_HDRTYPE_BRIDGE: + cfg->bridge.br_seclat = REG(PCIR_SECLAT_1, 1); + cfg->bridge.br_subbus = REG(PCIR_SUBBUS_1, 1); + cfg->bridge.br_secbus = REG(PCIR_SECBUS_1, 1); + cfg->bridge.br_pribus = REG(PCIR_PRIBUS_1, 1); + cfg->bridge.br_control = REG(PCIR_BRIDGECTL_1, 2); cfg->nummaps = PCI_MAXMAPS_1; break; case PCIM_HDRTYPE_CARDBUS: + cfg->bridge.br_seclat = REG(PCIR_SECLAT_2, 1); + cfg->bridge.br_subbus = REG(PCIR_SUBBUS_2, 1); + cfg->bridge.br_secbus = REG(PCIR_SECBUS_2, 1); + cfg->bridge.br_pribus = REG(PCIR_PRIBUS_2, 1); + cfg->bridge.br_control = REG(PCIR_BRIDGECTL_2, 2); cfg->subvendor = REG(PCIR_SUBVEND_2, 2); cfg->subdevice = REG(PCIR_SUBDEV_2, 2); cfg->nummaps = PCI_MAXMAPS_2; @@ -637,9 +649,6 @@ pci_read_device(device_t pcib, int d, in cfg->intpin = REG(PCIR_INTPIN, 1); cfg->intline = REG(PCIR_INTLINE, 1); - cfg->mingnt = REG(PCIR_MINGNT, 1); - cfg->maxlat = REG(PCIR_MAXLAT, 1); - cfg->mfdev = (cfg->hdrtype & PCIM_MFDEV) != 0; cfg->hdrtype &= ~PCIM_MFDEV; STAILQ_INIT(&cfg->maps); @@ -4360,9 +4369,17 @@ pci_read_ivar(device_t dev, device_t chi *result = cfg->cachelnsz; break; case PCI_IVAR_MINGNT: + if (cfg->hdrtype != PCIM_HDRTYPE_NORMAL) { + *result = -1; + return (EINVAL); + } *result = cfg->mingnt; break; case PCI_IVAR_MAXLAT: + if (cfg->hdrtype != PCIM_HDRTYPE_NORMAL) { + *result = -1; + return (EINVAL); + } *result = cfg->maxlat; break; case PCI_IVAR_LATTIMER: @@ -4931,16 +4948,6 @@ pci_cfg_restore(device_t dev, struct pci { /* - * Only do header type 0 devices. Type 1 devices are bridges, - * which we know need special treatment. Type 2 devices are - * cardbus bridges which also require special treatment. - * Other types are unknown, and we err on the side of safety - * by ignoring them. - */ - if ((dinfo->cfg.hdrtype & PCIM_HDRTYPE) != PCIM_HDRTYPE_NORMAL) - return; - - /* * Restore the device to full power mode. We must do this * before we restore the registers because moving from D3 to * D0 will cause the chip's BARs and some other registers to @@ -4950,16 +4957,44 @@ pci_cfg_restore(device_t dev, struct pci */ if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) pci_set_powerstate(dev, PCI_POWERSTATE_D0); - pci_restore_bars(dev); pci_write_config(dev, PCIR_COMMAND, dinfo->cfg.cmdreg, 2); pci_write_config(dev, PCIR_INTLINE, dinfo->cfg.intline, 1); pci_write_config(dev, PCIR_INTPIN, dinfo->cfg.intpin, 1); - pci_write_config(dev, PCIR_MINGNT, dinfo->cfg.mingnt, 1); - pci_write_config(dev, PCIR_MAXLAT, dinfo->cfg.maxlat, 1); pci_write_config(dev, PCIR_CACHELNSZ, dinfo->cfg.cachelnsz, 1); pci_write_config(dev, PCIR_LATTIMER, dinfo->cfg.lattimer, 1); pci_write_config(dev, PCIR_PROGIF, dinfo->cfg.progif, 1); pci_write_config(dev, PCIR_REVID, dinfo->cfg.revid, 1); + switch (dinfo->cfg.hdrtype & PCIM_HDRTYPE) { + case PCIM_HDRTYPE_NORMAL: + pci_write_config(dev, PCIR_MINGNT, dinfo->cfg.mingnt, 1); + pci_write_config(dev, PCIR_MAXLAT, dinfo->cfg.maxlat, 1); + break; + case PCIM_HDRTYPE_BRIDGE: + pci_write_config(dev, PCIR_SECLAT_1, + dinfo->cfg.bridge.br_seclat, 1); + pci_write_config(dev, PCIR_SUBBUS_1, + dinfo->cfg.bridge.br_subbus, 1); + pci_write_config(dev, PCIR_SECBUS_1, + dinfo->cfg.bridge.br_secbus, 1); + pci_write_config(dev, PCIR_PRIBUS_1, + dinfo->cfg.bridge.br_pribus, 1); + pci_write_config(dev, PCIR_BRIDGECTL_1, + dinfo->cfg.bridge.br_control, 2); + break; + case PCIM_HDRTYPE_CARDBUS: + pci_write_config(dev, PCIR_SECLAT_2, + dinfo->cfg.bridge.br_seclat, 1); + pci_write_config(dev, PCIR_SUBBUS_2, + dinfo->cfg.bridge.br_subbus, 1); + pci_write_config(dev, PCIR_SECBUS_2, + dinfo->cfg.bridge.br_secbus, 1); + pci_write_config(dev, PCIR_PRIBUS_2, + dinfo->cfg.bridge.br_pribus, 1); + pci_write_config(dev, PCIR_BRIDGECTL_2, + dinfo->cfg.bridge.br_control, 2); + break; + } + pci_restore_bars(dev); /* * Restore extended capabilities for PCI-Express and PCI-X @@ -5028,40 +5063,57 @@ pci_cfg_save(device_t dev, struct pci_de int ps; /* - * Only do header type 0 devices. Type 1 devices are bridges, which - * we know need special treatment. Type 2 devices are cardbus bridges - * which also require special treatment. Other types are unknown, and - * we err on the side of safety by ignoring them. Powering down - * bridges should not be undertaken lightly. - */ - if ((dinfo->cfg.hdrtype & PCIM_HDRTYPE) != PCIM_HDRTYPE_NORMAL) - return; - - /* * Some drivers apparently write to these registers w/o updating our * cached copy. No harm happens if we update the copy, so do so here * so we can restore them. The COMMAND register is modified by the * bus w/o updating the cache. This should represent the normally - * writable portion of the 'defined' part of type 0 headers. In - * theory we also need to save/restore the PCI capability structures - * we know about, but apart from power we don't know any that are - * writable. + * writable portion of the 'defined' part of type 0/1/2 headers. */ - dinfo->cfg.subvendor = pci_read_config(dev, PCIR_SUBVEND_0, 2); - dinfo->cfg.subdevice = pci_read_config(dev, PCIR_SUBDEV_0, 2); dinfo->cfg.vendor = pci_read_config(dev, PCIR_VENDOR, 2); dinfo->cfg.device = pci_read_config(dev, PCIR_DEVICE, 2); dinfo->cfg.cmdreg = pci_read_config(dev, PCIR_COMMAND, 2); dinfo->cfg.intline = pci_read_config(dev, PCIR_INTLINE, 1); dinfo->cfg.intpin = pci_read_config(dev, PCIR_INTPIN, 1); - dinfo->cfg.mingnt = pci_read_config(dev, PCIR_MINGNT, 1); - dinfo->cfg.maxlat = pci_read_config(dev, PCIR_MAXLAT, 1); dinfo->cfg.cachelnsz = pci_read_config(dev, PCIR_CACHELNSZ, 1); dinfo->cfg.lattimer = pci_read_config(dev, PCIR_LATTIMER, 1); dinfo->cfg.baseclass = pci_read_config(dev, PCIR_CLASS, 1); dinfo->cfg.subclass = pci_read_config(dev, PCIR_SUBCLASS, 1); dinfo->cfg.progif = pci_read_config(dev, PCIR_PROGIF, 1); dinfo->cfg.revid = pci_read_config(dev, PCIR_REVID, 1); + switch (dinfo->cfg.hdrtype & PCIM_HDRTYPE) { + case PCIM_HDRTYPE_NORMAL: + dinfo->cfg.subvendor = pci_read_config(dev, PCIR_SUBVEND_0, 2); + dinfo->cfg.subdevice = pci_read_config(dev, PCIR_SUBDEV_0, 2); + dinfo->cfg.mingnt = pci_read_config(dev, PCIR_MINGNT, 1); + dinfo->cfg.maxlat = pci_read_config(dev, PCIR_MAXLAT, 1); + break; + case PCIM_HDRTYPE_BRIDGE: + dinfo->cfg.bridge.br_seclat = pci_read_config(dev, + PCIR_SECLAT_1, 1); + dinfo->cfg.bridge.br_subbus = pci_read_config(dev, + PCIR_SUBBUS_1, 1); + dinfo->cfg.bridge.br_secbus = pci_read_config(dev, + PCIR_SECBUS_1, 1); + dinfo->cfg.bridge.br_pribus = pci_read_config(dev, + PCIR_PRIBUS_1, 1); + dinfo->cfg.bridge.br_control = pci_read_config(dev, + PCIR_BRIDGECTL_1, 2); + break; + case PCIM_HDRTYPE_CARDBUS: + dinfo->cfg.bridge.br_seclat = pci_read_config(dev, + PCIR_SECLAT_2, 1); + dinfo->cfg.bridge.br_subbus = pci_read_config(dev, + PCIR_SUBBUS_2, 1); + dinfo->cfg.bridge.br_secbus = pci_read_config(dev, + PCIR_SECBUS_2, 1); + dinfo->cfg.bridge.br_pribus = pci_read_config(dev, + PCIR_PRIBUS_2, 1); + dinfo->cfg.bridge.br_control = pci_read_config(dev, + PCIR_BRIDGECTL_2, 2); + dinfo->cfg.subvendor = pci_read_config(dev, PCIR_SUBVEND_2, 2); + dinfo->cfg.subdevice = pci_read_config(dev, PCIR_SUBDEV_2, 2); + break; + } if (dinfo->cfg.pcie.pcie_location != 0) pci_cfg_save_pcie(dev, dinfo); Modified: stable/10/sys/dev/pci/pci_pci.c ============================================================================== --- stable/10/sys/dev/pci/pci_pci.c Fri Jun 5 17:04:50 2015 (r284033) +++ stable/10/sys/dev/pci/pci_pci.c Fri Jun 5 17:05:09 2015 (r284034) @@ -549,18 +549,22 @@ void pcib_setup_secbus(device_t dev, struct pcib_secbus *bus, int min_count) { char buf[64]; - int error, rid; + int error, rid, sec_reg; switch (pci_read_config(dev, PCIR_HDRTYPE, 1) & PCIM_HDRTYPE) { case PCIM_HDRTYPE_BRIDGE: + sec_reg = PCIR_SECBUS_1; bus->sub_reg = PCIR_SUBBUS_1; break; case PCIM_HDRTYPE_CARDBUS: + sec_reg = PCIR_SECBUS_2; bus->sub_reg = PCIR_SUBBUS_2; break; default: panic("not a PCI bridge"); } + bus->sec = pci_read_config(dev, sec_reg, 1); + bus->sub = pci_read_config(dev, bus->sub_reg, 1); bus->dev = dev; bus->rman.rm_start = 0; bus->rman.rm_end = PCI_BUSMAX; @@ -845,20 +849,16 @@ pcib_set_mem_decode(struct pcib_softc *s static void pcib_cfg_save(struct pcib_softc *sc) { +#ifndef NEW_PCIB device_t dev; + uint16_t command; dev = sc->dev; - sc->command = pci_read_config(dev, PCIR_COMMAND, 2); - sc->pribus = pci_read_config(dev, PCIR_PRIBUS_1, 1); - sc->bus.sec = pci_read_config(dev, PCIR_SECBUS_1, 1); - sc->bus.sub = pci_read_config(dev, PCIR_SUBBUS_1, 1); - sc->bridgectl = pci_read_config(dev, PCIR_BRIDGECTL_1, 2); - sc->seclat = pci_read_config(dev, PCIR_SECLAT_1, 1); -#ifndef NEW_PCIB - if (sc->command & PCIM_CMD_PORTEN) + command = pci_read_config(dev, PCIR_COMMAND, 2); + if (command & PCIM_CMD_PORTEN) pcib_get_io_decode(sc); - if (sc->command & PCIM_CMD_MEMEN) + if (command & PCIM_CMD_MEMEN) pcib_get_mem_decode(sc); #endif } @@ -870,21 +870,18 @@ static void pcib_cfg_restore(struct pcib_softc *sc) { device_t dev; - +#ifndef NEW_PCIB + uint16_t command; +#endif dev = sc->dev; - pci_write_config(dev, PCIR_COMMAND, sc->command, 2); - pci_write_config(dev, PCIR_PRIBUS_1, sc->pribus, 1); - pci_write_config(dev, PCIR_SECBUS_1, sc->bus.sec, 1); - pci_write_config(dev, PCIR_SUBBUS_1, sc->bus.sub, 1); - pci_write_config(dev, PCIR_BRIDGECTL_1, sc->bridgectl, 2); - pci_write_config(dev, PCIR_SECLAT_1, sc->seclat, 1); #ifdef NEW_PCIB pcib_write_windows(sc, WIN_IO | WIN_MEM | WIN_PMEM); #else - if (sc->command & PCIM_CMD_PORTEN) + command = pci_read_config(dev, PCIR_COMMAND, 2); + if (command & PCIM_CMD_PORTEN) pcib_set_io_decode(sc); - if (sc->command & PCIM_CMD_MEMEN) + if (command & PCIM_CMD_MEMEN) pcib_set_mem_decode(sc); #endif } @@ -918,7 +915,11 @@ pcib_attach_common(device_t dev) * Get current bridge configuration. */ sc->domain = pci_get_domain(dev); - sc->secstat = pci_read_config(dev, PCIR_SECSTAT_1, 2); +#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) + sc->bus.sec = pci_read_config(dev, PCIR_SECBUS_1, 1); + sc->bus.sub = pci_read_config(dev, PCIR_SUBBUS_1, 1); +#endif + sc->bridgectl = pci_read_config(dev, PCIR_BRIDGECTL_1, 2); pcib_cfg_save(sc); /* @@ -1097,32 +1098,15 @@ pcib_attach(device_t dev) int pcib_suspend(device_t dev) { - device_t pcib; - int dstate, error; pcib_cfg_save(device_get_softc(dev)); - error = bus_generic_suspend(dev); - if (error == 0 && pci_do_power_suspend) { - dstate = PCI_POWERSTATE_D3; - pcib = device_get_parent(device_get_parent(dev)); - if (PCIB_POWER_FOR_SLEEP(pcib, dev, &dstate) == 0) - pci_set_powerstate(dev, dstate); - } - return (error); + return (bus_generic_suspend(dev)); } int pcib_resume(device_t dev) { - device_t pcib; - int dstate; - if (pci_do_power_resume) { - pcib = device_get_parent(device_get_parent(dev)); - dstate = PCI_POWERSTATE_D0; - if (PCIB_POWER_FOR_SLEEP(pcib, dev, &dstate) == 0) - pci_set_powerstate(dev, dstate); - } pcib_cfg_restore(device_get_softc(dev)); return (bus_generic_resume(dev)); } Modified: stable/10/sys/dev/pci/pcib_private.h ============================================================================== --- stable/10/sys/dev/pci/pcib_private.h Fri Jun 5 17:04:50 2015 (r284033) +++ stable/10/sys/dev/pci/pcib_private.h Fri Jun 5 17:05:09 2015 (r284034) @@ -106,7 +106,6 @@ struct pcib_softc #define PCIB_DISABLE_MSI 0x2 #define PCIB_DISABLE_MSIX 0x4 #define PCIB_ENABLE_ARI 0x8 - uint16_t command; /* command register */ u_int domain; /* domain number */ u_int pribus; /* primary bus number */ struct pcib_secbus bus; /* secondary bus numbers */ @@ -122,9 +121,7 @@ struct pcib_softc uint32_t iobase; /* base address of port window */ uint32_t iolimit; /* topmost address of port window */ #endif - uint16_t secstat; /* secondary bus status register */ uint16_t bridgectl; /* bridge control register */ - uint8_t seclat; /* secondary bus latency timer */ }; #define PCIB_SUPPORTED_ARI_VER 1 Modified: stable/10/sys/dev/pci/pcivar.h ============================================================================== --- stable/10/sys/dev/pci/pcivar.h Fri Jun 5 17:04:50 2015 (r284033) +++ stable/10/sys/dev/pci/pcivar.h Fri Jun 5 17:05:09 2015 (r284034) @@ -39,6 +39,15 @@ typedef uint64_t pci_addr_t; +/* Config registers for PCI-PCI and PCI-Cardbus bridges. */ +struct pcicfg_bridge { + uint8_t br_seclat; + uint8_t br_subbus; + uint8_t br_secbus; + uint8_t br_pribus; + uint16_t br_control; +}; + /* Interesting values for PCI power management */ struct pcicfg_pp { uint16_t pp_cap; /* PCI power management capabilities */ @@ -179,6 +188,7 @@ typedef struct pcicfg { uint8_t slot; /* config space slot address */ uint8_t func; /* config space function number */ + struct pcicfg_bridge bridge; /* Bridges */ struct pcicfg_pp pp; /* Power management */ struct pcicfg_vpd vpd; /* Vital product data */ struct pcicfg_msi msi; /* PCI MSI */ From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 17:05:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7AA7C964; Fri, 5 Jun 2015 17:05:37 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6880315E2; Fri, 5 Jun 2015 17:05:37 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55H5brm019261; Fri, 5 Jun 2015 17:05:37 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55H5buM019260; Fri, 5 Jun 2015 17:05:37 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506051705.t55H5buM019260@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2015 17:05:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r284035 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 17:05:37 -0000 Author: avg Date: Fri Jun 5 17:05:36 2015 New Revision: 284035 URL: https://svnweb.freebsd.org/changeset/base/284035 Log: 5669 altroot not set in zpool create when specified with -o Author: Xin Li Reviewed by: George Wilson Approved by: Dan McDonald illumos/illumos-gate@c423721f9bcd45c2409ef7b73fc103ac2889f9e9 Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c ============================================================================== --- vendor/illumos/dist/cmd/zpool/zpool_main.c Fri Jun 5 17:05:09 2015 (r284034) +++ vendor/illumos/dist/cmd/zpool/zpool_main.c Fri Jun 5 17:05:36 2015 (r284035) @@ -707,6 +707,8 @@ zpool_do_create(int argc, char **argv) enable_all_pool_feat = B_FALSE; } } + if (zpool_name_to_prop(optarg) == ZPOOL_PROP_ALTROOT) + altroot = propval; break; case 'O': if ((propval = strchr(optarg, '=')) == NULL) { From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 17:06:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0D19B88; Fri, 5 Jun 2015 17:06:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1A3F15FD; Fri, 5 Jun 2015 17:06:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55H6UZD019643; Fri, 5 Jun 2015 17:06:30 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55H6UJ2019642; Fri, 5 Jun 2015 17:06:30 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506051706.t55H6UJ2019642@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2015 17:06:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r284036 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 17:06:31 -0000 Author: avg Date: Fri Jun 5 17:06:29 2015 New Revision: 284036 URL: https://svnweb.freebsd.org/changeset/base/284036 Log: 5961 Fix stack overflow in zfs_create_fs Author: Gleb Smirnoff Reviewed by: Matthew Ahrens Approved by: Dan McDonald illumos/illumos-gate@c701fde6911c957e71b37aac4daf672bd828f4d7 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_znode.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_znode.c Fri Jun 5 17:05:36 2015 (r284035) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_znode.c Fri Jun 5 17:06:29 2015 (r284036) @@ -1723,7 +1723,6 @@ log: void zfs_create_fs(objset_t *os, cred_t *cr, nvlist_t *zplprops, dmu_tx_t *tx) { - zfsvfs_t zfsvfs; uint64_t moid, obj, sa_obj, version; uint64_t sense = ZFS_CASE_SENSITIVE; uint64_t norm = 0; @@ -1731,6 +1730,7 @@ zfs_create_fs(objset_t *os, cred_t *cr, int error; int i; znode_t *rootzp = NULL; + zfsvfs_t *zfsvfs; vnode_t *vp; vattr_t vattr; znode_t *zp; @@ -1817,17 +1817,16 @@ zfs_create_fs(objset_t *os, cred_t *cr, vn_reinit(vp); vp->v_type = VDIR; - bzero(&zfsvfs, sizeof (zfsvfs_t)); - - zfsvfs.z_os = os; - zfsvfs.z_parent = &zfsvfs; - zfsvfs.z_version = version; - zfsvfs.z_use_fuids = USE_FUIDS(version, os); - zfsvfs.z_use_sa = USE_SA(version, os); - zfsvfs.z_norm = norm; + zfsvfs = kmem_zalloc(sizeof (zfsvfs_t), KM_SLEEP); + zfsvfs->z_os = os; + zfsvfs->z_parent = zfsvfs; + zfsvfs->z_version = version; + zfsvfs->z_use_fuids = USE_FUIDS(version, os); + zfsvfs->z_use_sa = USE_SA(version, os); + zfsvfs->z_norm = norm; error = sa_setup(os, sa_obj, zfs_attr_table, ZPL_END, - &zfsvfs.z_attr_table); + &zfsvfs->z_attr_table); ASSERT(error == 0); @@ -1836,16 +1835,16 @@ zfs_create_fs(objset_t *os, cred_t *cr, * insensitive. */ if (sense == ZFS_CASE_INSENSITIVE || sense == ZFS_CASE_MIXED) - zfsvfs.z_norm |= U8_TEXTPREP_TOUPPER; + zfsvfs->z_norm |= U8_TEXTPREP_TOUPPER; - mutex_init(&zfsvfs.z_znodes_lock, NULL, MUTEX_DEFAULT, NULL); - list_create(&zfsvfs.z_all_znodes, sizeof (znode_t), + mutex_init(&zfsvfs->z_znodes_lock, NULL, MUTEX_DEFAULT, NULL); + list_create(&zfsvfs->z_all_znodes, sizeof (znode_t), offsetof(znode_t, z_link_node)); for (i = 0; i != ZFS_OBJ_MTX_SZ; i++) - mutex_init(&zfsvfs.z_hold_mtx[i], NULL, MUTEX_DEFAULT, NULL); + mutex_init(&zfsvfs->z_hold_mtx[i], NULL, MUTEX_DEFAULT, NULL); - rootzp->z_zfsvfs = &zfsvfs; + rootzp->z_zfsvfs = zfsvfs; VERIFY(0 == zfs_acl_ids_create(rootzp, IS_ROOT_NODE, &vattr, cr, NULL, &acl_ids)); zfs_mknode(rootzp, &vattr, tx, cr, IS_ROOT_NODE, &zp, &acl_ids); @@ -1864,12 +1863,13 @@ zfs_create_fs(objset_t *os, cred_t *cr, * Create shares directory */ - error = zfs_create_share_dir(&zfsvfs, tx); + error = zfs_create_share_dir(zfsvfs, tx); ASSERT(error == 0); for (i = 0; i != ZFS_OBJ_MTX_SZ; i++) - mutex_destroy(&zfsvfs.z_hold_mtx[i]); + mutex_destroy(&zfsvfs->z_hold_mtx[i]); + kmem_free(zfsvfs, sizeof (zfsvfs_t)); } #endif /* _KERNEL */ From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 17:07:13 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9010DD6; Fri, 5 Jun 2015 17:07:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D68F31611; Fri, 5 Jun 2015 17:07:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55H7D08020003; Fri, 5 Jun 2015 17:07:13 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55H7DrQ020002; Fri, 5 Jun 2015 17:07:13 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506051707.t55H7DrQ020002@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2015 17:07:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r284037 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 17:07:14 -0000 Author: avg Date: Fri Jun 5 17:07:13 2015 New Revision: 284037 URL: https://svnweb.freebsd.org/changeset/base/284037 Log: 5912 full stream can not be force-received into a dataset if it has a snapshot Author: Andriy Gapon Reviewed by: Paul Dagnelie Approved by: Dan McDonald illumos/illumos-gate@5bae108fe2364722de3aa86e04966a0d33fd027a Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Fri Jun 5 17:06:29 2015 (r284036) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Fri Jun 5 17:07:13 2015 (r284037) @@ -949,10 +949,12 @@ recv_begin_check_existing_impl(dmu_recv_ dsl_dataset_rele(snap, FTAG); } else { - /* if full, most recent snapshot must be $ORIGIN */ - if (dsl_dataset_phys(ds)->ds_prev_snap_txg >= TXG_INITIAL) - return (SET_ERROR(ENODEV)); - drba->drba_snapobj = dsl_dataset_phys(ds)->ds_prev_snap_obj; + /* if full, then must be forced */ + if (!drba->drba_cookie->drc_force) + return (SET_ERROR(EEXIST)); + /* start from $ORIGIN@$ORIGIN, if supported */ + drba->drba_snapobj = dp->dp_origin_snap != NULL ? + dp->dp_origin_snap->ds_object : 0; } return (0); From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 17:07:52 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0378F2C; Fri, 5 Jun 2015 17:07:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDD3F161B; Fri, 5 Jun 2015 17:07:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55H7qPk020194; Fri, 5 Jun 2015 17:07:52 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55H7qip020191; Fri, 5 Jun 2015 17:07:52 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506051707.t55H7qip020191@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2015 17:07:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r284038 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 17:07:52 -0000 Author: avg Date: Fri Jun 5 17:07:51 2015 New Revision: 284038 URL: https://svnweb.freebsd.org/changeset/base/284038 Log: 5870 dmu_recv_end_check() leaks origin_head hold if error happens in drc_force branch Author: Andriy Gapon Reviewed by: Andrew Stormont Approved by: Dan McDonald illumos/illumos-gate@beddaa9ce797b9deaafc22b4f156d23f9b45c32d Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Fri Jun 5 17:07:13 2015 (r284037) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Fri Jun 5 17:07:51 2015 (r284038) @@ -1953,7 +1953,7 @@ dmu_recv_end_check(void *arg, dmu_tx_t * error = dsl_dataset_hold_obj(dp, obj, FTAG, &snap); if (error != 0) - return (error); + break; if (snap->ds_dir != origin_head->ds_dir) error = SET_ERROR(EINVAL); if (error == 0) { @@ -1963,7 +1963,11 @@ dmu_recv_end_check(void *arg, dmu_tx_t * obj = dsl_dataset_phys(snap)->ds_prev_snap_obj; dsl_dataset_rele(snap, FTAG); if (error != 0) - return (error); + break; + } + if (error != 0) { + dsl_dataset_rele(origin_head, FTAG); + return (error); } } error = dsl_dataset_clone_swap_check_impl(drc->drc_ds, From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 17:08:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27642128; Fri, 5 Jun 2015 17:08:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15331162E; Fri, 5 Jun 2015 17:08:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55H8Wmm020424; Fri, 5 Jun 2015 17:08:32 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55H8WA7020423; Fri, 5 Jun 2015 17:08:32 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506051708.t55H8WA7020423@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2015 17:08:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r284039 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 17:08:33 -0000 Author: avg Date: Fri Jun 5 17:08:32 2015 New Revision: 284039 URL: https://svnweb.freebsd.org/changeset/base/284039 Log: 5909 ensure that shared snap names don't become too long after promotion Author: Andriy Gapon Reviewed by: George Wilson Approved by: Dan McDonald illumos/illumos-gate@cb5842f8b0caaad0ed53535bd77042e933fdbafe Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Fri Jun 5 17:07:51 2015 (r284038) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Fri Jun 5 17:08:32 2015 (r284039) @@ -2081,12 +2081,14 @@ dsl_dataset_promote_check(void *arg, dmu int err; uint64_t unused; uint64_t ss_mv_cnt; + size_t max_snap_len; err = promote_hold(ddpa, dp, FTAG); if (err != 0) return (err); hds = ddpa->ddpa_clone; + max_snap_len = MAXNAMELEN - strlen(ddpa->ddpa_clonename) - 1; if (dsl_dataset_phys(hds)->ds_flags & DS_FLAG_NOPROMOTE) { promote_rele(ddpa, FTAG); @@ -2150,6 +2152,10 @@ dsl_dataset_promote_check(void *arg, dmu /* Check that the snapshot name does not conflict */ VERIFY0(dsl_dataset_get_snapname(ds)); + if (strlen(ds->ds_snapname) >= max_snap_len) { + err = SET_ERROR(ENAMETOOLONG); + goto out; + } err = dsl_dataset_snap_lookup(hds, ds->ds_snapname, &val); if (err == 0) { (void) strcpy(ddpa->err_ds, snap->ds->ds_snapname); From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 17:10:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 003F9272; Fri, 5 Jun 2015 17:10:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C80FC163E; Fri, 5 Jun 2015 17:10:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55HA0je020865; Fri, 5 Jun 2015 17:10:00 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55HA0pj020861; Fri, 5 Jun 2015 17:10:00 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506051710.t55HA0pj020861@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2015 17:10:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r284040 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 17:10:01 -0000 Author: avg Date: Fri Jun 5 17:09:59 2015 New Revision: 284040 URL: https://svnweb.freebsd.org/changeset/base/284040 Log: 5946 zfs_ioc_space_snaps must check that firstsnap and lastsnap refer to snapshots Author: Andriy Gapon Reviewed by: Steven Hartland Reviewed by: Matthew Ahrens Approved by: Gordon Ross illumos/illumos-gate@24218bebb460e4015fac2c9f2cec1902eddbcd7b Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Fri Jun 5 17:08:32 2015 (r284039) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Fri Jun 5 17:09:59 2015 (r284040) @@ -821,6 +821,10 @@ dmu_send_estimate(dsl_dataset_t *ds, dsl if (!ds->ds_is_snapshot) return (SET_ERROR(EINVAL)); + /* fromsnap, if provided, must be a snapshot */ + if (fromds != NULL && !fromds->ds_is_snapshot) + return (SET_ERROR(EINVAL)); + /* * fromsnap must be an earlier snapshot from the same fs as tosnap, * or the origin's fs. Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Fri Jun 5 17:08:32 2015 (r284039) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Fri Jun 5 17:09:59 2015 (r284040) @@ -5258,11 +5258,19 @@ zfs_ioc_space_snaps(const char *lastsnap return (error); error = dsl_dataset_hold(dp, lastsnap, FTAG, &new); + if (error == 0 && !new->ds_is_snapshot) { + dsl_dataset_rele(new, FTAG); + error = SET_ERROR(EINVAL); + } if (error != 0) { dsl_pool_rele(dp, FTAG); return (error); } error = dsl_dataset_hold(dp, firstsnap, FTAG, &old); + if (error == 0 && !old->ds_is_snapshot) { + dsl_dataset_rele(old, FTAG); + error = SET_ERROR(EINVAL); + } if (error != 0) { dsl_dataset_rele(new, FTAG); dsl_pool_rele(dp, FTAG); From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 17:15:23 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2BAAC435; Fri, 5 Jun 2015 17:15:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 040DD1853; Fri, 5 Jun 2015 17:15:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) 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 UAA20861; Fri, 05 Jun 2015 20:15:10 +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 1Z0vD3-0005Rn-GD; Fri, 05 Jun 2015 20:15:09 +0300 Message-ID: <5571D8CC.3070301@FreeBSD.org> Date: Fri, 05 Jun 2015 20:13:48 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-vendor@FreeBSD.org Subject: Re: svn commit: r284040 - vendor-sys/illumos/dist/uts/common/fs/zfs References: <201506051710.t55HA0pj020861@svn.freebsd.org> In-Reply-To: <201506051710.t55HA0pj020861@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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 17:15:23 -0000 On 05/06/2015 20:10, Andriy Gapon wrote: > Author: avg > Date: Fri Jun 5 17:09:59 2015 > New Revision: 284040 > URL: https://svnweb.freebsd.org/changeset/base/284040 > > Log: > 5946 zfs_ioc_space_snaps must check that firstsnap and lastsnap refer to snapshots This commit should have also mentioned 5945 zfs_ioc_send_space must ensure that fromsnap refers to a snapshot > Author: Andriy Gapon > Reviewed by: Steven Hartland > Reviewed by: Matthew Ahrens > Approved by: Gordon Ross > > illumos/illumos-gate@24218bebb460e4015fac2c9f2cec1902eddbcd7b > > Modified: > vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c > vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 17:18:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B1FD5CD; Fri, 5 Jun 2015 17:18:11 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28EB8188B; Fri, 5 Jun 2015 17:18:11 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55HIBo8026497; Fri, 5 Jun 2015 17:18:11 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55HIBc3026496; Fri, 5 Jun 2015 17:18:11 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201506051718.t55HIBc3026496@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Fri, 5 Jun 2015 17:18:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284041 - head/contrib/dtc 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 17:18:11 -0000 Author: sbruno Date: Fri Jun 5 17:18:10 2015 New Revision: 284041 URL: https://svnweb.freebsd.org/changeset/base/284041 Log: Silence clang warning about extraneous parenthesis Verified that this exists upstream already: https://git.kernel.org/cgit/utils/dtc/dtc.git/tree/checks.c#n628 Differential Revision: https://reviews.freebsd.org/D913 Reviewed by: imp Modified: head/contrib/dtc/checks.c Modified: head/contrib/dtc/checks.c ============================================================================== --- head/contrib/dtc/checks.c Fri Jun 5 17:09:59 2015 (r284040) +++ head/contrib/dtc/checks.c Fri Jun 5 17:18:10 2015 (r284041) @@ -624,11 +624,11 @@ static void check_avoid_default_addr_siz if (!reg && !ranges) return; - if ((node->parent->addr_cells == -1)) + if (node->parent->addr_cells == -1) FAIL(c, "Relying on default #address-cells value for %s", node->fullpath); - if ((node->parent->size_cells == -1)) + if (node->parent->size_cells == -1) FAIL(c, "Relying on default #size-cells value for %s", node->fullpath); } From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 17:26:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D05A9D4; Fri, 5 Jun 2015 17:26:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B5EF1ABE; Fri, 5 Jun 2015 17:26:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55HQ8Au032100; Fri, 5 Jun 2015 17:26:08 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55HQ8GH032099; Fri, 5 Jun 2015 17:26:08 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506051726.t55HQ8GH032099@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2015 17:26:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r284042 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 17:26:08 -0000 Author: avg Date: Fri Jun 5 17:26:07 2015 New Revision: 284042 URL: https://svnweb.freebsd.org/changeset/base/284042 Log: 1778 Assertion failed: rn->rn_nozpool == B_FALSE, file ../common/libzfs_import.c, line 1077, function zpool_open_func Reviewed by: Matthew Ahrens Reviewed by: George Wilson Reviewed by: Richard Elling Approved by: Gordon Ross Author: Andrew Stormont illumos/illumos-gate@bd0f709169e67f4bd34526e186a7c34f595f0d9b 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 Fri Jun 5 17:18:10 2015 (r284041) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_import.c Fri Jun 5 17:26:07 2015 (r284042) @@ -23,6 +23,7 @@ * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright 2015 RackTop Systems. */ /* @@ -1079,11 +1080,7 @@ zpool_open_func(void *arg) } (void) close(fd); - rn->rn_config = config; - if (config != NULL) { - assert(rn->rn_nozpool == B_FALSE); - } } /* From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 17:45:30 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 519C4548; Fri, 5 Jun 2015 17:45:30 +0000 (UTC) (envelope-from jhb@freebsd.org) 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 2B5591FED; Fri, 5 Jun 2015 17:45:30 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 755A7B915; Fri, 5 Jun 2015 13:45:28 -0400 (EDT) From: John Baldwin To: Sean Bruno Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284029 - head/sys/kern Date: Fri, 05 Jun 2015 12:55:08 -0400 Message-ID: <3940850.1R9GTC4sC6@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.1-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201506051621.t55GLiKp095005@svn.freebsd.org> References: <201506051621.t55GLiKp095005@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, 05 Jun 2015 13:45:28 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 17:45:30 -0000 On Friday, June 05, 2015 04:21:44 PM Sean Bruno wrote: > Author: sbruno > Date: Fri Jun 5 16:21:43 2015 > New Revision: 284029 > URL: https://svnweb.freebsd.org/changeset/base/284029 > > Log: > This change uses a reader count instead of holding the mutex for the > interpreter list to avoid the problem of holding a non-sleep lock during > a page fault as reported by witness. In addition, it consistently uses > memset()/memcpy() instead of bzero()/bcopy() except in the case where > bcopy() is required (i.e. overlapping copy). > > Differential Revision: https://reviews.freebsd.org/D2123 > Submitted by: sson > MFC after: 2 weeks > Relnotes: Yes > > Modified: > head/sys/kern/imgact_binmisc.c > > Modified: head/sys/kern/imgact_binmisc.c > ============================================================================== > --- head/sys/kern/imgact_binmisc.c Fri Jun 5 16:02:24 2015 (r284028) > +++ head/sys/kern/imgact_binmisc.c Fri Jun 5 16:21:43 2015 (r284029) > @@ -1,5 +1,5 @@ > /*- > - * Copyright (c) 2013, Stacey D. Son > + * Copyright (c) 2013-15, Stacey D. Son > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > @@ -41,6 +41,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > + > +#include > > /** > * Miscellaneous binary interpreter image activator. > @@ -95,11 +98,68 @@ static SLIST_HEAD(, imgact_binmisc_entry > SLIST_HEAD_INITIALIZER(interpreter_list); > > static int interp_list_entry_count = 0; > - > +static int interp_list_rcount = 0; This should probably be volatile? > static struct mtx interp_list_mtx; > > int imgact_binmisc_exec(struct image_params *imgp); > > +static inline void > +interp_list_rlock() > +{ > + > + /* Don't use atomic_add() here. We must block if the mutex is held. */ > + mtx_lock(&interp_list_mtx); > + interp_list_rcount++; > + mtx_unlock(&interp_list_mtx); It's not really safe to not use an atomic here but use one in runlock. What happens if the compiler uses separate load - add - store here and another thread does the atomic subtract after the load but before the store? > +} > + > +static inline void > +interp_list_runlock() > +{ > + > + /* Decrement the reader count and wake up one writer, if any. */ > + atomic_subtract_int(&interp_list_rcount, 1); > + if (interp_list_rcount == 0) > + wakeup_one(&interp_list_rcount); Reading the variable after subtract is also racey. You can use atomic_fetchadd() instead (which is what refcount_release does). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 18:16:11 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3ECECB74; Fri, 5 Jun 2015 18:16:11 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D3C31770; Fri, 5 Jun 2015 18:16:11 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55IGBfs056915; Fri, 5 Jun 2015 18:16:11 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55IGBRZ056914; Fri, 5 Jun 2015 18:16:11 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201506051816.t55IGBRZ056914@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Fri, 5 Jun 2015 18:16:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284043 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 18:16:11 -0000 Author: sbruno Date: Fri Jun 5 18:16:10 2015 New Revision: 284043 URL: https://svnweb.freebsd.org/changeset/base/284043 Log: Revert 284029, update imgact_binmisctl.c change mtx to reader count, at the request of the submitter. Will attempt to use an sx_lock for this fix to WITNESS crashes in a later revision. Submitted by: sson Modified: head/sys/kern/imgact_binmisc.c Modified: head/sys/kern/imgact_binmisc.c ============================================================================== --- head/sys/kern/imgact_binmisc.c Fri Jun 5 17:26:07 2015 (r284042) +++ head/sys/kern/imgact_binmisc.c Fri Jun 5 18:16:10 2015 (r284043) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-15, Stacey D. Son + * Copyright (c) 2013, Stacey D. Son * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,9 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include - -#include /** * Miscellaneous binary interpreter image activator. @@ -98,68 +95,11 @@ static SLIST_HEAD(, imgact_binmisc_entry SLIST_HEAD_INITIALIZER(interpreter_list); static int interp_list_entry_count = 0; -static int interp_list_rcount = 0; + static struct mtx interp_list_mtx; int imgact_binmisc_exec(struct image_params *imgp); -static inline void -interp_list_rlock() -{ - - /* Don't use atomic_add() here. We must block if the mutex is held. */ - mtx_lock(&interp_list_mtx); - interp_list_rcount++; - mtx_unlock(&interp_list_mtx); -} - -static inline void -interp_list_runlock() -{ - - /* Decrement the reader count and wake up one writer, if any. */ - atomic_subtract_int(&interp_list_rcount, 1); - if (interp_list_rcount == 0) - wakeup_one(&interp_list_rcount); -} - -static inline void -interp_list_wlock() -{ - - /* Wait until there are no readers. */ - mtx_lock(&interp_list_mtx); - while (interp_list_rcount) - mtx_sleep(&interp_list_rcount, &interp_list_mtx, 0, "IABM", 0); -} - -static inline void -interp_list_wunlock() -{ - - mtx_unlock(&interp_list_mtx); -} - -#define interp_list_assert_rlocked() \ - KASSERT(interp_list_rcount > 0, ("%s: interp_list lock not held " \ - "for read", __func__)) - -#define interp_list_assert_wlocked() mtx_assert(&interp_list_mtx, MA_OWNED) - -#ifdef INVARIANTS -#define interp_list_assert_locked() do { \ - if (interp_list_rcount == 0) \ - mtx_assert(&interp_list_mtx, MA_OWNED); \ - else \ - KASSERT(interp_list_rcount > 0, \ - ("%s: interp_list lock not held", __func__)); \ -} while(0) - -#else /* ! INVARIANTS */ - -#define interp_list_assert_locked() do { \ -} while(0) -#endif /* ! INVARIANTS */ /* * Populate the entry with the information about the interpreter. @@ -171,7 +111,7 @@ imgact_binmisc_populate_interp(char *str char t[IBE_INTERP_LEN_MAX]; char *sp, *tp; - memset(t, 0, sizeof(t)); + bzero(t, sizeof(t)); /* * Normalize interpreter string. Replace white space between args with @@ -212,6 +152,8 @@ imgact_binmisc_new_entry(ximgact_binmisc imgact_binmisc_entry_t *ibe = NULL; size_t namesz = min(strlen(xbe->xbe_name) + 1, IBE_NAME_MAX); + mtx_assert(&interp_list_mtx, MA_NOTOWNED); + ibe = malloc(sizeof(*ibe), M_BINMISC, M_WAITOK|M_ZERO); ibe->ibe_name = malloc(namesz, M_BINMISC, M_WAITOK|M_ZERO); @@ -261,7 +203,7 @@ imgact_binmisc_find_entry(char *name) { imgact_binmisc_entry_t *ibe; - interp_list_assert_locked(); + mtx_assert(&interp_list_mtx, MA_OWNED); SLIST_FOREACH(ibe, &interpreter_list, link) { if (strncmp(name, ibe->ibe_name, IBE_NAME_MAX) == 0) @@ -318,21 +260,21 @@ imgact_binmisc_add_entry(ximgact_binmisc } } - /* Preallocate a new entry. */ - ibe = imgact_binmisc_new_entry(xbe); - if (!ibe) - return (ENOMEM); - - interp_list_wlock(); + mtx_lock(&interp_list_mtx); if (imgact_binmisc_find_entry(xbe->xbe_name) != NULL) { - interp_list_wunlock(); - imgact_binmisc_destroy_entry(ibe); + mtx_unlock(&interp_list_mtx); return (EEXIST); } + mtx_unlock(&interp_list_mtx); + + ibe = imgact_binmisc_new_entry(xbe); + if (!ibe) + return (ENOMEM); + mtx_lock(&interp_list_mtx); SLIST_INSERT_HEAD(&interpreter_list, ibe, link); interp_list_entry_count++; - interp_list_wunlock(); + mtx_unlock(&interp_list_mtx); return (0); } @@ -346,14 +288,14 @@ imgact_binmisc_remove_entry(char *name) { imgact_binmisc_entry_t *ibe; - interp_list_wlock(); + mtx_lock(&interp_list_mtx); if ((ibe = imgact_binmisc_find_entry(name)) == NULL) { - interp_list_wunlock(); + mtx_unlock(&interp_list_mtx); return (ENOENT); } SLIST_REMOVE(&interpreter_list, ibe, imgact_binmisc_entry, link); interp_list_entry_count--; - interp_list_wunlock(); + mtx_unlock(&interp_list_mtx); imgact_binmisc_destroy_entry(ibe); @@ -369,14 +311,14 @@ imgact_binmisc_disable_entry(char *name) { imgact_binmisc_entry_t *ibe; - interp_list_rlock(); + mtx_lock(&interp_list_mtx); if ((ibe = imgact_binmisc_find_entry(name)) == NULL) { - interp_list_runlock(); + mtx_unlock(&interp_list_mtx); return (ENOENT); } - atomic_clear_32(&ibe->ibe_flags, IBF_ENABLED); - interp_list_runlock(); + ibe->ibe_flags &= ~IBF_ENABLED; + mtx_unlock(&interp_list_mtx); return (0); } @@ -390,14 +332,14 @@ imgact_binmisc_enable_entry(char *name) { imgact_binmisc_entry_t *ibe; - interp_list_rlock(); + mtx_lock(&interp_list_mtx); if ((ibe = imgact_binmisc_find_entry(name)) == NULL) { - interp_list_runlock(); + mtx_unlock(&interp_list_mtx); return (ENOENT); } - atomic_set_32(&ibe->ibe_flags, IBF_ENABLED); - interp_list_runlock(); + ibe->ibe_flags |= IBF_ENABLED; + mtx_unlock(&interp_list_mtx); return (0); } @@ -408,9 +350,9 @@ imgact_binmisc_populate_xbe(ximgact_binm { uint32_t i; - interp_list_assert_rlocked(); + mtx_assert(&interp_list_mtx, MA_OWNED); - memset(xbe, 0, sizeof(*xbe)); + bzero(xbe, sizeof(*xbe)); strlcpy(xbe->xbe_name, ibe->ibe_name, IBE_NAME_MAX); /* Copy interpreter string. Replace NULL breaks with space. */ @@ -440,14 +382,14 @@ imgact_binmisc_lookup_entry(char *name, imgact_binmisc_entry_t *ibe; int error = 0; - interp_list_rlock(); + mtx_lock(&interp_list_mtx); if ((ibe = imgact_binmisc_find_entry(name)) == NULL) { - interp_list_runlock(); + mtx_unlock(&interp_list_mtx); return (ENOENT); } error = imgact_binmisc_populate_xbe(xbe, ibe); - interp_list_runlock(); + mtx_unlock(&interp_list_mtx); return (error); } @@ -462,12 +404,12 @@ imgact_binmisc_get_all_entries(struct sy imgact_binmisc_entry_t *ibe; int error = 0, count; - interp_list_rlock(); + mtx_lock(&interp_list_mtx); count = interp_list_entry_count; /* Don't block in malloc() while holding lock. */ xbe = malloc(sizeof(*xbe) * count, M_BINMISC, M_NOWAIT|M_ZERO); if (!xbe) { - interp_list_runlock(); + mtx_unlock(&interp_list_mtx); return (ENOMEM); } @@ -477,7 +419,7 @@ imgact_binmisc_get_all_entries(struct sy if (error) break; } - interp_list_runlock(); + mtx_unlock(&interp_list_mtx); if (!error) error = SYSCTL_OUT(req, xbe, sizeof(*xbe) * count); @@ -614,7 +556,7 @@ imgact_binmisc_find_interpreter(const ch int i; size_t sz; - interp_list_assert_rlocked(); + mtx_assert(&interp_list_mtx, MA_OWNED); SLIST_FOREACH(ibe, &interpreter_list, link) { if (!(IBF_ENABLED & ibe->ibe_flags)) @@ -651,15 +593,15 @@ imgact_binmisc_exec(struct image_params char *s, *d; /* Do we have an interpreter for the given image header? */ - interp_list_rlock(); + mtx_lock(&interp_list_mtx); if ((ibe = imgact_binmisc_find_interpreter(image_header)) == NULL) { - interp_list_runlock(); + mtx_unlock(&interp_list_mtx); return (-1); } /* No interpreter nesting allowed. */ if (imgp->interpreted & IMGACT_BINMISC) { - interp_list_runlock(); + mtx_unlock(&interp_list_mtx); return (ENOEXEC); } @@ -707,7 +649,7 @@ imgact_binmisc_exec(struct image_params default: /* Hmm... This shouldn't happen. */ - interp_list_runlock(); + mtx_unlock(&interp_list_mtx); printf("%s: Unknown macro #%c sequence in " "interpreter string\n", KMOD_NAME, *(s + 1)); error = EINVAL; @@ -718,15 +660,12 @@ imgact_binmisc_exec(struct image_params /* Check to make sure we won't overrun the stringspace. */ if (offset > imgp->args->stringspace) { - interp_list_runlock(); + mtx_unlock(&interp_list_mtx); error = E2BIG; goto done; } - /* - * Make room for the interpreter. Doing an overlapping copy so - * bcopy() must be used. - */ + /* Make room for the interpreter */ bcopy(imgp->args->begin_argv, imgp->args->begin_argv + offset, imgp->args->endp - imgp->args->begin_argv); @@ -781,7 +720,7 @@ imgact_binmisc_exec(struct image_params s++; } *d = '\0'; - interp_list_runlock(); + mtx_unlock(&interp_list_mtx); if (!error) imgp->interpreter_name = imgp->args->begin_argv; @@ -806,13 +745,13 @@ imgact_binmisc_fini(void *arg) imgact_binmisc_entry_t *ibe, *ibe_tmp; /* Free all the interpreters. */ - interp_list_wlock(); + mtx_lock(&interp_list_mtx); SLIST_FOREACH_SAFE(ibe, &interpreter_list, link, ibe_tmp) { SLIST_REMOVE(&interpreter_list, ibe, imgact_binmisc_entry, link); imgact_binmisc_destroy_entry(ibe); } - interp_list_wunlock(); + mtx_unlock(&interp_list_mtx); mtx_destroy(&interp_list_mtx); } From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 20:30:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B97C41C; Fri, 5 Jun 2015 20:30:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A82D177E; Fri, 5 Jun 2015 20:30:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55KUbPX026674; Fri, 5 Jun 2015 20:30:37 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55KUbFc026673; Fri, 5 Jun 2015 20:30:37 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201506052030.t55KUbFc026673@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 5 Jun 2015 20:30:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284044 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 20:30:37 -0000 Author: mav Date: Fri Jun 5 20:30:36 2015 New Revision: 284044 URL: https://svnweb.freebsd.org/changeset/base/284044 Log: Fix wrong function name in error message. MFC after: 3 days Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Fri Jun 5 18:16:10 2015 (r284043) +++ head/sys/cam/ctl/ctl.c Fri Jun 5 20:30:36 2015 (r284044) @@ -5011,9 +5011,9 @@ ctl_disable_lun(struct ctl_be_lun *be_lu lun->lun); mtx_lock(&softc->ctl_lock); if (retval != 0) { - printf("ctl_alloc_lun: FETD %s port %d returned error " + printf("%s: FETD %s port %d returned error " "%d for lun_disable on target %ju lun %jd\n", - port->port_name, port->targ_port, retval, + __func__, port->port_name, port->targ_port, retval, (uintmax_t)lun->target.id, (intmax_t)lun->lun); } } From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 20:38:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4133060F; Fri, 5 Jun 2015 20:38:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F4331954; Fri, 5 Jun 2015 20:38:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55KcNsk030816; Fri, 5 Jun 2015 20:38:23 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55KcNkF030815; Fri, 5 Jun 2015 20:38:23 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506052038.t55KcNkF030815@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 5 Jun 2015 20:38: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: r284045 - in stable: 10/sys/modules/oce 9/sys/modules/oce 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 20:38:23 -0000 Author: jhb Date: Fri Jun 5 20:38:22 2015 New Revision: 284045 URL: https://svnweb.freebsd.org/changeset/base/284045 Log: MFC 281932: Rename the kld for oce(4) to if_oce.ko. ifconfig(8) has special knowledge about kld filenames for network drivers that requires them to follow the pattern of if_. This also fixes the existing documentation in the manpage which says to use if_oce_load=YES in loader.conf. PR: 199095 Modified: stable/10/sys/modules/oce/Makefile Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/modules/oce/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/10/sys/modules/oce/Makefile ============================================================================== --- stable/10/sys/modules/oce/Makefile Fri Jun 5 20:30:36 2015 (r284044) +++ stable/10/sys/modules/oce/Makefile Fri Jun 5 20:38:22 2015 (r284045) @@ -3,7 +3,7 @@ # .PATH: ${.CURDIR}/../../dev/oce -KMOD = oce +KMOD = if_oce SRCS = oce_if.c oce_hw.c oce_mbox.c oce_util.c oce_queue.c oce_sysctl.c SRCS += bus_if.h device_if.h pci_if.h opt_inet.h opt_inet6.h From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 20:38:23 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1B54610; Fri, 5 Jun 2015 20:38:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF98A1955; Fri, 5 Jun 2015 20:38:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55KcNKg030822; Fri, 5 Jun 2015 20:38:23 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55KcN69030821; Fri, 5 Jun 2015 20:38:23 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506052038.t55KcN69030821@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 5 Jun 2015 20:38:23 +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: r284045 - in stable: 10/sys/modules/oce 9/sys/modules/oce 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 20:38:23 -0000 Author: jhb Date: Fri Jun 5 20:38:22 2015 New Revision: 284045 URL: https://svnweb.freebsd.org/changeset/base/284045 Log: MFC 281932: Rename the kld for oce(4) to if_oce.ko. ifconfig(8) has special knowledge about kld filenames for network drivers that requires them to follow the pattern of if_. This also fixes the existing documentation in the manpage which says to use if_oce_load=YES in loader.conf. PR: 199095 Modified: stable/9/sys/modules/oce/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/modules/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/modules/oce/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/modules/oce/Makefile ============================================================================== --- stable/9/sys/modules/oce/Makefile Fri Jun 5 20:30:36 2015 (r284044) +++ stable/9/sys/modules/oce/Makefile Fri Jun 5 20:38:22 2015 (r284045) @@ -3,7 +3,7 @@ # .PATH: ${.CURDIR}/../../dev/oce -KMOD = oce +KMOD = if_oce SRCS = oce_if.c oce_hw.c oce_mbox.c oce_util.c oce_queue.c oce_sysctl.c SRCS += bus_if.h device_if.h pci_if.h opt_inet.h opt_inet6.h From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 21:22:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C4CC6FC; Fri, 5 Jun 2015 21:22:27 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B2071530; Fri, 5 Jun 2015 21:22:27 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55LMRfT056331; Fri, 5 Jun 2015 21:22:27 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55LMR7u056330; Fri, 5 Jun 2015 21:22:27 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201506052122.t55LMR7u056330@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Fri, 5 Jun 2015 21:22:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284046 - head/sys/amd64/vmm 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 21:22:27 -0000 Author: neel Date: Fri Jun 5 21:22:26 2015 New Revision: 284046 URL: https://svnweb.freebsd.org/changeset/base/284046 Log: The 'verify_gla()' function is used to ensure that the effective address after decoding the instruction matches the one provided by hardware. Prior to r283293 'vie->num_valid' used to contain the actual length of the instruction whereas now it contains the maximum instruction length possible. This introduced a bug when calculating a RIP-relative base address. Fix this by using 'vie->num_processed' rather than 'vie->num_valid' as the length of the emulated instruction. Reported and tested by: tychon MFC after: 1 week Modified: head/sys/amd64/vmm/vmm_instruction_emul.c Modified: head/sys/amd64/vmm/vmm_instruction_emul.c ============================================================================== --- head/sys/amd64/vmm/vmm_instruction_emul.c Fri Jun 5 20:38:22 2015 (r284045) +++ head/sys/amd64/vmm/vmm_instruction_emul.c Fri Jun 5 21:22:26 2015 (r284046) @@ -2342,7 +2342,7 @@ verify_gla(struct vm *vm, int cpuid, uin * instruction */ if (vie->base_register == VM_REG_GUEST_RIP) - base += vie->num_valid; + base += vie->num_processed; } idx = 0; From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 21:35:21 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F8D19FB; Fri, 5 Jun 2015 21:35:21 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E2B01787; Fri, 5 Jun 2015 21:35:21 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55LZLM1061701; Fri, 5 Jun 2015 21:35:21 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55LZL8C061700; Fri, 5 Jun 2015 21:35:21 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506052135.t55LZL8C061700@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 5 Jun 2015 21:35:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284047 - head/usr.bin/vgrind 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 21:35:21 -0000 Author: bapt Date: Fri Jun 5 21:35:20 2015 New Revision: 284047 URL: https://svnweb.freebsd.org/changeset/base/284047 Log: Fix typos Modified: head/usr.bin/vgrind/regexp.c Modified: head/usr.bin/vgrind/regexp.c ============================================================================== --- head/usr.bin/vgrind/regexp.c Fri Jun 5 21:22:26 2015 (r284046) +++ head/usr.bin/vgrind/regexp.c Fri Jun 5 21:35:20 2015 (r284047) @@ -91,7 +91,7 @@ STRNCMP(register char *s1, register char * internal format. * * Either meta symbols (\a \d or \p) or character strings or - * operations ( alternation or perenthesizing ) can be + * operations ( alternation or parenthesizing ) can be * specified. Each starts with a descriptor byte. The descriptor * byte has STR set for strings, META set for meta symbols * and OPER set for operations. @@ -110,7 +110,7 @@ STRNCMP(register char *s1, register char * character count * the string * - * operatins := descriptor + * operations := descriptor * symbol * character count */ From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 21:45:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70F78C48; Fri, 5 Jun 2015 21:45:36 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F83719C7; Fri, 5 Jun 2015 21:45:36 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55LjavD066671; Fri, 5 Jun 2015 21:45:36 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55Lja1F066670; Fri, 5 Jun 2015 21:45:36 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506052145.t55Lja1F066670@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 5 Jun 2015 21:45:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284048 - head/usr.bin/vgrind 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 21:45:36 -0000 Author: bapt Date: Fri Jun 5 21:45:35 2015 New Revision: 284048 URL: https://svnweb.freebsd.org/changeset/base/284048 Log: Fix some clang warnings: Add missing headers Add parenthesis when using the result of an assignment as a condition Modified: head/usr.bin/vgrind/vgrindefs.c Modified: head/usr.bin/vgrind/vgrindefs.c ============================================================================== --- head/usr.bin/vgrind/vgrindefs.c Fri Jun 5 21:35:20 2015 (r284047) +++ head/usr.bin/vgrind/vgrindefs.c Fri Jun 5 21:45:35 2015 (r284048) @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); #define MAXHOP 32 /* max number of tc= indirections */ #include +#include +#include #include /* @@ -308,7 +310,7 @@ tdecode(register char *str, char **area) register int c; cp = *area; - while (c = *str++) { + while ((c = *str++)) { if (c == ':' && *(cp-1) != '\\') break; *cp++ = c; From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 22:52:44 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0828E806; Fri, 5 Jun 2015 22:52:44 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4D0C1A36; Fri, 5 Jun 2015 22:52:43 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55MqhPD000864; Fri, 5 Jun 2015 22:52:43 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55MqgOT000856; Fri, 5 Jun 2015 22:52:42 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201506052252.t55MqgOT000856@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Fri, 5 Jun 2015 22:52:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284049 - in head/sys: dev/ixl modules/ixl modules/ixlv 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.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 22:52:44 -0000 Author: jfv Date: Fri Jun 5 22:52:42 2015 New Revision: 284049 URL: https://svnweb.freebsd.org/changeset/base/284049 Log: Update SW4 to the Intel ixl/ixlv drivers. This is primarily a shared code update, with supporting changes in the CORE. Changes for the extended media types, VF driver has virtual channel protocol changes, and some register use corrections. This software change should be coordinated with Firmware updates to your hardware, contact your support channels for that. MFC after: 1 week Added: head/sys/dev/ixl/i40e_devids.h (contents, props changed) Modified: head/sys/dev/ixl/i40e_adminq.c head/sys/dev/ixl/i40e_adminq.h head/sys/dev/ixl/i40e_adminq_cmd.h head/sys/dev/ixl/i40e_common.c head/sys/dev/ixl/i40e_hmc.c head/sys/dev/ixl/i40e_hmc.h head/sys/dev/ixl/i40e_lan_hmc.c head/sys/dev/ixl/i40e_nvm.c head/sys/dev/ixl/i40e_osdep.h head/sys/dev/ixl/i40e_prototype.h head/sys/dev/ixl/i40e_register.h head/sys/dev/ixl/i40e_type.h head/sys/dev/ixl/i40e_virtchnl.h head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/if_ixlv.c head/sys/dev/ixl/ixlv.h head/sys/dev/ixl/ixlvc.c head/sys/modules/ixl/Makefile head/sys/modules/ixlv/Makefile Modified: head/sys/dev/ixl/i40e_adminq.c ============================================================================== --- head/sys/dev/ixl/i40e_adminq.c Fri Jun 5 21:45:35 2015 (r284048) +++ head/sys/dev/ixl/i40e_adminq.c Fri Jun 5 22:52:42 2015 (r284049) @@ -315,8 +315,12 @@ static enum i40e_status_code i40e_config wr32(hw, hw->aq.asq.tail, 0); /* set starting point */ - wr32(hw, hw->aq.asq.len, (hw->aq.num_asq_entries | - I40E_PF_ATQLEN_ATQENABLE_MASK)); + if (!i40e_is_vf(hw)) + wr32(hw, hw->aq.asq.len, (hw->aq.num_asq_entries | + I40E_PF_ATQLEN_ATQENABLE_MASK)); + if (i40e_is_vf(hw)) + wr32(hw, hw->aq.asq.len, (hw->aq.num_asq_entries | + I40E_VF_ATQLEN1_ATQENABLE_MASK)); wr32(hw, hw->aq.asq.bal, I40E_LO_DWORD(hw->aq.asq.desc_buf.pa)); wr32(hw, hw->aq.asq.bah, I40E_HI_DWORD(hw->aq.asq.desc_buf.pa)); @@ -344,8 +348,12 @@ static enum i40e_status_code i40e_config wr32(hw, hw->aq.arq.tail, 0); /* set starting point */ - wr32(hw, hw->aq.arq.len, (hw->aq.num_arq_entries | - I40E_PF_ARQLEN_ARQENABLE_MASK)); + if (!i40e_is_vf(hw)) + wr32(hw, hw->aq.arq.len, (hw->aq.num_arq_entries | + I40E_PF_ARQLEN_ARQENABLE_MASK)); + if (i40e_is_vf(hw)) + wr32(hw, hw->aq.arq.len, (hw->aq.num_arq_entries | + I40E_VF_ARQLEN1_ARQENABLE_MASK)); wr32(hw, hw->aq.arq.bal, I40E_LO_DWORD(hw->aq.arq.desc_buf.pa)); wr32(hw, hw->aq.arq.bah, I40E_HI_DWORD(hw->aq.arq.desc_buf.pa)); @@ -559,6 +567,7 @@ enum i40e_status_code i40e_init_adminq(s { enum i40e_status_code ret_code; u16 eetrack_lo, eetrack_hi; + u16 cfg_ptr, oem_hi, oem_lo; int retry = 0; /* verify input for valid configuration */ if ((hw->aq.num_arq_entries == 0) || @@ -619,6 +628,12 @@ enum i40e_status_code i40e_init_adminq(s i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_LO, &eetrack_lo); i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_HI, &eetrack_hi); hw->nvm.eetrack = (eetrack_hi << 16) | eetrack_lo; + i40e_read_nvm_word(hw, I40E_SR_BOOT_CONFIG_PTR, &cfg_ptr); + i40e_read_nvm_word(hw, (cfg_ptr + I40E_NVM_OEM_VER_OFF), + &oem_hi); + i40e_read_nvm_word(hw, (cfg_ptr + (I40E_NVM_OEM_VER_OFF + 1)), + &oem_lo); + hw->nvm.oem_ver = ((u32)oem_hi << 16) | oem_lo; if (hw->aq.api_maj_ver > I40E_FW_API_VERSION_MAJOR) { ret_code = I40E_ERR_FIRMWARE_API_VERSION; @@ -669,6 +684,9 @@ enum i40e_status_code i40e_shutdown_admi i40e_destroy_spinlock(&hw->aq.asq_spinlock); i40e_destroy_spinlock(&hw->aq.arq_spinlock); + if (hw->nvm_buff.va) + i40e_free_virt_mem(hw, &hw->nvm_buff); + return ret_code; } @@ -688,16 +706,16 @@ u16 i40e_clean_asq(struct i40e_hw *hw) desc = I40E_ADMINQ_DESC(*asq, ntc); details = I40E_ADMINQ_DETAILS(*asq, ntc); + while (rd32(hw, hw->aq.asq.head) != ntc) { i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, - "%s: ntc %d head %d.\n", __FUNCTION__, ntc, - rd32(hw, hw->aq.asq.head)); + "ntc %d head %d.\n", ntc, rd32(hw, hw->aq.asq.head)); if (details->callback) { I40E_ADMINQ_CALLBACK cb_func = (I40E_ADMINQ_CALLBACK)details->callback; - i40e_memcpy(&desc_cb, desc, - sizeof(struct i40e_aq_desc), I40E_DMA_TO_DMA); + i40e_memcpy(&desc_cb, desc, sizeof(struct i40e_aq_desc), + I40E_DMA_TO_DMA); cb_func(hw, &desc_cb); } i40e_memset(desc, 0, sizeof(*desc), I40E_DMA_MEM); @@ -755,6 +773,8 @@ enum i40e_status_code i40e_asq_send_comm u16 retval = 0; u32 val = 0; + hw->aq.asq_last_status = I40E_AQ_RC_OK; + val = rd32(hw, hw->aq.asq.head); if (val >= hw->aq.num_asq_entries) { i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, @@ -912,6 +932,11 @@ enum i40e_status_code i40e_asq_send_comm "AQTX: desc and buffer writeback:\n"); i40e_debug_aq(hw, I40E_DEBUG_AQ_COMMAND, (void *)desc, buff, buff_size); + /* save writeback aq if requested */ + if (details->wb_desc) + i40e_memcpy(details->wb_desc, desc_on_ring, + sizeof(struct i40e_aq_desc), I40E_DMA_TO_NONDMA); + /* update the error if time out occurred */ if ((!cmd_completed) && (!details->async && !details->postpone)) { @@ -971,7 +996,10 @@ enum i40e_status_code i40e_clean_arq_ele i40e_acquire_spinlock(&hw->aq.arq_spinlock); /* set next_to_use to head */ - ntu = (rd32(hw, hw->aq.arq.head) & I40E_PF_ARQH_ARQH_MASK); + if (!i40e_is_vf(hw)) + ntu = (rd32(hw, hw->aq.arq.head) & I40E_PF_ARQH_ARQH_MASK); + if (i40e_is_vf(hw)) + ntu = (rd32(hw, hw->aq.arq.head) & I40E_VF_ARQH1_ARQH_MASK); if (ntu == ntc) { /* nothing to do - shouldn't need to update ring's values */ ret_code = I40E_ERR_ADMIN_QUEUE_NO_WORK; @@ -1040,6 +1068,19 @@ clean_arq_element_out: i40e_release_nvm(hw); hw->aq.nvm_release_on_done = FALSE; } + + switch (hw->nvmupd_state) { + case I40E_NVMUPD_STATE_INIT_WAIT: + hw->nvmupd_state = I40E_NVMUPD_STATE_INIT; + break; + + case I40E_NVMUPD_STATE_WRITE_WAIT: + hw->nvmupd_state = I40E_NVMUPD_STATE_WRITING; + break; + + default: + break; + } } return ret_code; @@ -1051,9 +1092,6 @@ void i40e_resume_aq(struct i40e_hw *hw) hw->aq.asq.next_to_use = 0; hw->aq.asq.next_to_clean = 0; -#if (I40E_VF_ATQLEN_ATQENABLE_MASK != I40E_PF_ATQLEN_ATQENABLE_MASK) -#error I40E_VF_ATQLEN_ATQENABLE_MASK != I40E_PF_ATQLEN_ATQENABLE_MASK -#endif i40e_config_asq_regs(hw); hw->aq.arq.next_to_use = 0; Modified: head/sys/dev/ixl/i40e_adminq.h ============================================================================== --- head/sys/dev/ixl/i40e_adminq.h Fri Jun 5 21:45:35 2015 (r284048) +++ head/sys/dev/ixl/i40e_adminq.h Fri Jun 5 22:52:42 2015 (r284049) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2013-2014, Intel Corporation + Copyright (c) 2013-2015, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -77,6 +77,7 @@ struct i40e_asq_cmd_details { u16 flags_dis; bool async; bool postpone; + struct i40e_aq_desc *wb_desc; }; #define I40E_ADMINQ_DETAILS(R, i) \ Modified: head/sys/dev/ixl/i40e_adminq_cmd.h ============================================================================== --- head/sys/dev/ixl/i40e_adminq_cmd.h Fri Jun 5 21:45:35 2015 (r284048) +++ head/sys/dev/ixl/i40e_adminq_cmd.h Fri Jun 5 22:52:42 2015 (r284049) @@ -42,7 +42,11 @@ */ #define I40E_FW_API_VERSION_MAJOR 0x0001 -#define I40E_FW_API_VERSION_MINOR 0x0002 +#ifdef X722_SUPPORT +#define I40E_FW_API_VERSION_MINOR 0x0003 +#else +#define I40E_FW_API_VERSION_MINOR 0x0004 +#endif struct i40e_aq_desc { __le16 flags; @@ -140,12 +144,7 @@ enum i40e_admin_queue_opc { i40e_aqc_opc_list_func_capabilities = 0x000A, i40e_aqc_opc_list_dev_capabilities = 0x000B, - i40e_aqc_opc_set_cppm_configuration = 0x0103, - i40e_aqc_opc_set_arp_proxy_entry = 0x0104, - i40e_aqc_opc_set_ns_proxy_entry = 0x0105, - /* LAA */ - i40e_aqc_opc_mng_laa = 0x0106, /* AQ obsolete */ i40e_aqc_opc_mac_address_read = 0x0107, i40e_aqc_opc_mac_address_write = 0x0108, @@ -240,6 +239,7 @@ enum i40e_admin_queue_opc { i40e_aqc_opc_nvm_update = 0x0703, i40e_aqc_opc_nvm_config_read = 0x0704, i40e_aqc_opc_nvm_config_write = 0x0705, + i40e_aqc_opc_oem_post_update = 0x0720, /* virtualization commands */ i40e_aqc_opc_send_msg_to_pf = 0x0801, @@ -270,7 +270,12 @@ enum i40e_admin_queue_opc { /* Tunnel commands */ i40e_aqc_opc_add_udp_tunnel = 0x0B00, i40e_aqc_opc_del_udp_tunnel = 0x0B01, - i40e_aqc_opc_tunnel_key_structure = 0x0B10, +#ifdef X722_SUPPORT + i40e_aqc_opc_set_rss_key = 0x0B02, + i40e_aqc_opc_set_rss_lut = 0x0B03, + i40e_aqc_opc_get_rss_key = 0x0B04, + i40e_aqc_opc_get_rss_lut = 0x0B05, +#endif /* Async Events */ i40e_aqc_opc_event_lan_overflow = 0x1001, @@ -282,8 +287,6 @@ enum i40e_admin_queue_opc { i40e_aqc_opc_oem_ocbb_initialize = 0xFE03, /* debug commands */ - i40e_aqc_opc_debug_get_deviceid = 0xFF00, - i40e_aqc_opc_debug_set_mode = 0xFF01, i40e_aqc_opc_debug_read_reg = 0xFF03, i40e_aqc_opc_debug_write_reg = 0xFF04, i40e_aqc_opc_debug_modify_reg = 0xFF07, @@ -517,7 +520,8 @@ struct i40e_aqc_mac_address_read { #define I40E_AQC_SAN_ADDR_VALID 0x20 #define I40E_AQC_PORT_ADDR_VALID 0x40 #define I40E_AQC_WOL_ADDR_VALID 0x80 -#define I40E_AQC_ADDR_VALID_MASK 0xf0 +#define I40E_AQC_MC_MAG_EN_VALID 0x100 +#define I40E_AQC_ADDR_VALID_MASK 0x1F0 u8 reserved[6]; __le32 addr_high; __le32 addr_low; @@ -540,7 +544,9 @@ struct i40e_aqc_mac_address_write { #define I40E_AQC_WRITE_TYPE_LAA_ONLY 0x0000 #define I40E_AQC_WRITE_TYPE_LAA_WOL 0x4000 #define I40E_AQC_WRITE_TYPE_PORT 0x8000 -#define I40E_AQC_WRITE_TYPE_MASK 0xc000 +#define I40E_AQC_WRITE_TYPE_UPDATE_MC_MAG 0xC000 +#define I40E_AQC_WRITE_TYPE_MASK 0xC000 + __le16 mac_sah; __le32 mac_sal; u8 reserved[8]; @@ -834,8 +840,16 @@ struct i40e_aqc_vsi_properties_data { I40E_AQ_VSI_TC_QUE_NUMBER_SHIFT) /* queueing option section */ u8 queueing_opt_flags; +#ifdef X722_SUPPORT +#define I40E_AQ_VSI_QUE_OPT_MULTICAST_UDP_ENA 0x04 +#define I40E_AQ_VSI_QUE_OPT_UNICAST_UDP_ENA 0x08 +#endif #define I40E_AQ_VSI_QUE_OPT_TCP_ENA 0x10 #define I40E_AQ_VSI_QUE_OPT_FCOE_ENA 0x20 +#ifdef X722_SUPPORT +#define I40E_AQ_VSI_QUE_OPT_RSS_LUT_PF 0x00 +#define I40E_AQ_VSI_QUE_OPT_RSS_LUT_VSI 0x40 +#endif u8 queueing_opt_reserved[3]; /* scheduler section */ u8 up_enable_bits; @@ -1076,6 +1090,7 @@ struct i40e_aqc_set_vsi_promiscuous_mode __le16 seid; #define I40E_AQC_VSI_PROM_CMD_SEID_MASK 0x3FF __le16 vlan_tag; +#define I40E_AQC_SET_VSI_VLAN_MASK 0x0FFF #define I40E_AQC_SET_VSI_VLAN_VALID 0x8000 u8 reserved[8]; }; @@ -1725,11 +1740,13 @@ struct i40e_aqc_get_link_status { u8 phy_type; /* i40e_aq_phy_type */ u8 link_speed; /* i40e_aq_link_speed */ u8 link_info; -#define I40E_AQ_LINK_UP 0x01 +#define I40E_AQ_LINK_UP 0x01 /* obsolete */ +#define I40E_AQ_LINK_UP_FUNCTION 0x01 #define I40E_AQ_LINK_FAULT 0x02 #define I40E_AQ_LINK_FAULT_TX 0x04 #define I40E_AQ_LINK_FAULT_RX 0x08 #define I40E_AQ_LINK_FAULT_REMOTE 0x10 +#define I40E_AQ_LINK_UP_PORT 0x20 #define I40E_AQ_MEDIA_AVAILABLE 0x40 #define I40E_AQ_SIGNAL_DETECT 0x80 u8 an_info; @@ -1891,6 +1908,26 @@ struct i40e_aqc_nvm_config_data_immediat I40E_CHECK_STRUCT_LEN(0xc, i40e_aqc_nvm_config_data_immediate_field); +/* OEM Post Update (indirect 0x0720) + * no command data struct used + */ + struct i40e_aqc_nvm_oem_post_update { +#define I40E_AQ_NVM_OEM_POST_UPDATE_EXTERNAL_DATA 0x01 + u8 sel_data; + u8 reserved[7]; +}; + +I40E_CHECK_STRUCT_LEN(0x8, i40e_aqc_nvm_oem_post_update); + +struct i40e_aqc_nvm_oem_post_update_buffer { + u8 str_len; + u8 dev_addr; + __le16 eeprom_addr; + u8 data[36]; +}; + +I40E_CHECK_STRUCT_LEN(0x28, i40e_aqc_nvm_oem_post_update_buffer); + /* Send to PF command (indirect 0x0801) id is only used by PF * Send to VF command (indirect 0x0802) id is only used by PF * Send to Peer PF command (indirect 0x0803) @@ -2064,12 +2101,28 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_star #define I40E_AQC_CEE_APP_ISCSI_MASK (0x7 << I40E_AQC_CEE_APP_ISCSI_SHIFT) #define I40E_AQC_CEE_APP_FIP_SHIFT 0x8 #define I40E_AQC_CEE_APP_FIP_MASK (0x7 << I40E_AQC_CEE_APP_FIP_SHIFT) + #define I40E_AQC_CEE_PG_STATUS_SHIFT 0x0 #define I40E_AQC_CEE_PG_STATUS_MASK (0x7 << I40E_AQC_CEE_PG_STATUS_SHIFT) #define I40E_AQC_CEE_PFC_STATUS_SHIFT 0x3 #define I40E_AQC_CEE_PFC_STATUS_MASK (0x7 << I40E_AQC_CEE_PFC_STATUS_SHIFT) #define I40E_AQC_CEE_APP_STATUS_SHIFT 0x8 #define I40E_AQC_CEE_APP_STATUS_MASK (0x7 << I40E_AQC_CEE_APP_STATUS_SHIFT) +#define I40E_AQC_CEE_FCOE_STATUS_SHIFT 0x8 +#define I40E_AQC_CEE_FCOE_STATUS_MASK (0x7 << I40E_AQC_CEE_FCOE_STATUS_SHIFT) +#define I40E_AQC_CEE_ISCSI_STATUS_SHIFT 0xB +#define I40E_AQC_CEE_ISCSI_STATUS_MASK (0x7 << I40E_AQC_CEE_ISCSI_STATUS_SHIFT) +#define I40E_AQC_CEE_FIP_STATUS_SHIFT 0x10 +#define I40E_AQC_CEE_FIP_STATUS_MASK (0x7 << I40E_AQC_CEE_FIP_STATUS_SHIFT) + +/* struct i40e_aqc_get_cee_dcb_cfg_v1_resp was originally defined with + * word boundary layout issues, which the Linux compilers silently deal + * with by adding padding, making the actual struct larger than designed. + * However, the FW compiler for the NIC is less lenient and complains + * about the struct. Hence, the struct defined here has an extra byte in + * fields reserved3 and reserved4 to directly acknowledge that padding, + * and the new length is used in the length check macro. + */ struct i40e_aqc_get_cee_dcb_cfg_v1_resp { u8 reserved1; u8 oper_num_tc; @@ -2077,9 +2130,9 @@ struct i40e_aqc_get_cee_dcb_cfg_v1_resp u8 reserved2; u8 oper_tc_bw[8]; u8 oper_pfc_en; - u8 reserved3; + u8 reserved3[2]; __le16 oper_app_prio; - u8 reserved4; + u8 reserved4[2]; __le16 tlv_status; }; @@ -2168,6 +2221,48 @@ struct i40e_aqc_del_udp_tunnel_completio }; I40E_CHECK_CMD_LENGTH(i40e_aqc_del_udp_tunnel_completion); +#ifdef X722_SUPPORT + +struct i40e_aqc_get_set_rss_key { +#define I40E_AQC_SET_RSS_KEY_VSI_VALID (0x1 << 15) +#define I40E_AQC_SET_RSS_KEY_VSI_ID_SHIFT 0 +#define I40E_AQC_SET_RSS_KEY_VSI_ID_MASK (0x3FF << \ + I40E_AQC_SET_RSS_KEY_VSI_ID_SHIFT) + __le16 vsi_id; + u8 reserved[6]; + __le32 addr_high; + __le32 addr_low; +}; + +I40E_CHECK_CMD_LENGTH(i40e_aqc_get_set_rss_key); + +struct i40e_aqc_get_set_rss_key_data { + u8 standard_rss_key[0x28]; + u8 extended_hash_key[0xc]; +}; + +I40E_CHECK_STRUCT_LEN(0x34, i40e_aqc_get_set_rss_key_data); + +struct i40e_aqc_get_set_rss_lut { +#define I40E_AQC_SET_RSS_LUT_VSI_VALID (0x1 << 15) +#define I40E_AQC_SET_RSS_LUT_VSI_ID_SHIFT 0 +#define I40E_AQC_SET_RSS_LUT_VSI_ID_MASK (0x3FF << \ + I40E_AQC_SET_RSS_LUT_VSI_ID_SHIFT) + __le16 vsi_id; +#define I40E_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT 0 +#define I40E_AQC_SET_RSS_LUT_TABLE_TYPE_MASK (0x1 << \ + I40E_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT) + +#define I40E_AQC_SET_RSS_LUT_TABLE_TYPE_VSI 0 +#define I40E_AQC_SET_RSS_LUT_TABLE_TYPE_PF 1 + __le16 flags; + u8 reserved[4]; + __le32 addr_high; + __le32 addr_low; +}; + +I40E_CHECK_CMD_LENGTH(i40e_aqc_get_set_rss_lut); +#endif /* tunnel key structure 0x0B10 */ Modified: head/sys/dev/ixl/i40e_common.c ============================================================================== --- head/sys/dev/ixl/i40e_common.c Fri Jun 5 21:45:35 2015 (r284048) +++ head/sys/dev/ixl/i40e_common.c Fri Jun 5 22:52:42 2015 (r284049) @@ -62,9 +62,24 @@ enum i40e_status_code i40e_set_mac_type( case I40E_DEV_ID_QSFP_B: case I40E_DEV_ID_QSFP_C: case I40E_DEV_ID_10G_BASE_T: + case I40E_DEV_ID_10G_BASE_T4: case I40E_DEV_ID_20G_KR2: + case I40E_DEV_ID_20G_KR2_A: hw->mac.type = I40E_MAC_XL710; break; +#ifdef X722_SUPPORT + case I40E_DEV_ID_SFP_X722: + case I40E_DEV_ID_1G_BASE_T_X722: + case I40E_DEV_ID_10G_BASE_T_X722: + hw->mac.type = I40E_MAC_X722; + break; +#endif +#ifdef X722_SUPPORT + case I40E_DEV_ID_X722_VF: + case I40E_DEV_ID_X722_VF_HV: + hw->mac.type = I40E_MAC_X722_VF; + break; +#endif case I40E_DEV_ID_VF: case I40E_DEV_ID_VF_HV: hw->mac.type = I40E_MAC_VF; @@ -83,6 +98,212 @@ enum i40e_status_code i40e_set_mac_type( } /** + * i40e_aq_str - convert AQ err code to a string + * @hw: pointer to the HW structure + * @aq_err: the AQ error code to convert + **/ +char *i40e_aq_str(struct i40e_hw *hw, enum i40e_admin_queue_err aq_err) +{ + switch (aq_err) { + case I40E_AQ_RC_OK: + return "OK"; + case I40E_AQ_RC_EPERM: + return "I40E_AQ_RC_EPERM"; + case I40E_AQ_RC_ENOENT: + return "I40E_AQ_RC_ENOENT"; + case I40E_AQ_RC_ESRCH: + return "I40E_AQ_RC_ESRCH"; + case I40E_AQ_RC_EINTR: + return "I40E_AQ_RC_EINTR"; + case I40E_AQ_RC_EIO: + return "I40E_AQ_RC_EIO"; + case I40E_AQ_RC_ENXIO: + return "I40E_AQ_RC_ENXIO"; + case I40E_AQ_RC_E2BIG: + return "I40E_AQ_RC_E2BIG"; + case I40E_AQ_RC_EAGAIN: + return "I40E_AQ_RC_EAGAIN"; + case I40E_AQ_RC_ENOMEM: + return "I40E_AQ_RC_ENOMEM"; + case I40E_AQ_RC_EACCES: + return "I40E_AQ_RC_EACCES"; + case I40E_AQ_RC_EFAULT: + return "I40E_AQ_RC_EFAULT"; + case I40E_AQ_RC_EBUSY: + return "I40E_AQ_RC_EBUSY"; + case I40E_AQ_RC_EEXIST: + return "I40E_AQ_RC_EEXIST"; + case I40E_AQ_RC_EINVAL: + return "I40E_AQ_RC_EINVAL"; + case I40E_AQ_RC_ENOTTY: + return "I40E_AQ_RC_ENOTTY"; + case I40E_AQ_RC_ENOSPC: + return "I40E_AQ_RC_ENOSPC"; + case I40E_AQ_RC_ENOSYS: + return "I40E_AQ_RC_ENOSYS"; + case I40E_AQ_RC_ERANGE: + return "I40E_AQ_RC_ERANGE"; + case I40E_AQ_RC_EFLUSHED: + return "I40E_AQ_RC_EFLUSHED"; + case I40E_AQ_RC_BAD_ADDR: + return "I40E_AQ_RC_BAD_ADDR"; + case I40E_AQ_RC_EMODE: + return "I40E_AQ_RC_EMODE"; + case I40E_AQ_RC_EFBIG: + return "I40E_AQ_RC_EFBIG"; + } + + snprintf(hw->err_str, sizeof(hw->err_str), "%d", aq_err); + return hw->err_str; +} + +/** + * i40e_stat_str - convert status err code to a string + * @hw: pointer to the HW structure + * @stat_err: the status error code to convert + **/ +char *i40e_stat_str(struct i40e_hw *hw, enum i40e_status_code stat_err) +{ + switch (stat_err) { + case I40E_SUCCESS: + return "OK"; + case I40E_ERR_NVM: + return "I40E_ERR_NVM"; + case I40E_ERR_NVM_CHECKSUM: + return "I40E_ERR_NVM_CHECKSUM"; + case I40E_ERR_PHY: + return "I40E_ERR_PHY"; + case I40E_ERR_CONFIG: + return "I40E_ERR_CONFIG"; + case I40E_ERR_PARAM: + return "I40E_ERR_PARAM"; + case I40E_ERR_MAC_TYPE: + return "I40E_ERR_MAC_TYPE"; + case I40E_ERR_UNKNOWN_PHY: + return "I40E_ERR_UNKNOWN_PHY"; + case I40E_ERR_LINK_SETUP: + return "I40E_ERR_LINK_SETUP"; + case I40E_ERR_ADAPTER_STOPPED: + return "I40E_ERR_ADAPTER_STOPPED"; + case I40E_ERR_INVALID_MAC_ADDR: + return "I40E_ERR_INVALID_MAC_ADDR"; + case I40E_ERR_DEVICE_NOT_SUPPORTED: + return "I40E_ERR_DEVICE_NOT_SUPPORTED"; + case I40E_ERR_MASTER_REQUESTS_PENDING: + return "I40E_ERR_MASTER_REQUESTS_PENDING"; + case I40E_ERR_INVALID_LINK_SETTINGS: + return "I40E_ERR_INVALID_LINK_SETTINGS"; + case I40E_ERR_AUTONEG_NOT_COMPLETE: + return "I40E_ERR_AUTONEG_NOT_COMPLETE"; + case I40E_ERR_RESET_FAILED: + return "I40E_ERR_RESET_FAILED"; + case I40E_ERR_SWFW_SYNC: + return "I40E_ERR_SWFW_SYNC"; + case I40E_ERR_NO_AVAILABLE_VSI: + return "I40E_ERR_NO_AVAILABLE_VSI"; + case I40E_ERR_NO_MEMORY: + return "I40E_ERR_NO_MEMORY"; + case I40E_ERR_BAD_PTR: + return "I40E_ERR_BAD_PTR"; + case I40E_ERR_RING_FULL: + return "I40E_ERR_RING_FULL"; + case I40E_ERR_INVALID_PD_ID: + return "I40E_ERR_INVALID_PD_ID"; + case I40E_ERR_INVALID_QP_ID: + return "I40E_ERR_INVALID_QP_ID"; + case I40E_ERR_INVALID_CQ_ID: + return "I40E_ERR_INVALID_CQ_ID"; + case I40E_ERR_INVALID_CEQ_ID: + return "I40E_ERR_INVALID_CEQ_ID"; + case I40E_ERR_INVALID_AEQ_ID: + return "I40E_ERR_INVALID_AEQ_ID"; + case I40E_ERR_INVALID_SIZE: + return "I40E_ERR_INVALID_SIZE"; + case I40E_ERR_INVALID_ARP_INDEX: + return "I40E_ERR_INVALID_ARP_INDEX"; + case I40E_ERR_INVALID_FPM_FUNC_ID: + return "I40E_ERR_INVALID_FPM_FUNC_ID"; + case I40E_ERR_QP_INVALID_MSG_SIZE: + return "I40E_ERR_QP_INVALID_MSG_SIZE"; + case I40E_ERR_QP_TOOMANY_WRS_POSTED: + return "I40E_ERR_QP_TOOMANY_WRS_POSTED"; + case I40E_ERR_INVALID_FRAG_COUNT: + return "I40E_ERR_INVALID_FRAG_COUNT"; + case I40E_ERR_QUEUE_EMPTY: + return "I40E_ERR_QUEUE_EMPTY"; + case I40E_ERR_INVALID_ALIGNMENT: + return "I40E_ERR_INVALID_ALIGNMENT"; + case I40E_ERR_FLUSHED_QUEUE: + return "I40E_ERR_FLUSHED_QUEUE"; + case I40E_ERR_INVALID_PUSH_PAGE_INDEX: + return "I40E_ERR_INVALID_PUSH_PAGE_INDEX"; + case I40E_ERR_INVALID_IMM_DATA_SIZE: + return "I40E_ERR_INVALID_IMM_DATA_SIZE"; + case I40E_ERR_TIMEOUT: + return "I40E_ERR_TIMEOUT"; + case I40E_ERR_OPCODE_MISMATCH: + return "I40E_ERR_OPCODE_MISMATCH"; + case I40E_ERR_CQP_COMPL_ERROR: + return "I40E_ERR_CQP_COMPL_ERROR"; + case I40E_ERR_INVALID_VF_ID: + return "I40E_ERR_INVALID_VF_ID"; + case I40E_ERR_INVALID_HMCFN_ID: + return "I40E_ERR_INVALID_HMCFN_ID"; + case I40E_ERR_BACKING_PAGE_ERROR: + return "I40E_ERR_BACKING_PAGE_ERROR"; + case I40E_ERR_NO_PBLCHUNKS_AVAILABLE: + return "I40E_ERR_NO_PBLCHUNKS_AVAILABLE"; + case I40E_ERR_INVALID_PBLE_INDEX: + return "I40E_ERR_INVALID_PBLE_INDEX"; + case I40E_ERR_INVALID_SD_INDEX: + return "I40E_ERR_INVALID_SD_INDEX"; + case I40E_ERR_INVALID_PAGE_DESC_INDEX: + return "I40E_ERR_INVALID_PAGE_DESC_INDEX"; + case I40E_ERR_INVALID_SD_TYPE: + return "I40E_ERR_INVALID_SD_TYPE"; + case I40E_ERR_MEMCPY_FAILED: + return "I40E_ERR_MEMCPY_FAILED"; + case I40E_ERR_INVALID_HMC_OBJ_INDEX: + return "I40E_ERR_INVALID_HMC_OBJ_INDEX"; + case I40E_ERR_INVALID_HMC_OBJ_COUNT: + return "I40E_ERR_INVALID_HMC_OBJ_COUNT"; + case I40E_ERR_INVALID_SRQ_ARM_LIMIT: + return "I40E_ERR_INVALID_SRQ_ARM_LIMIT"; + case I40E_ERR_SRQ_ENABLED: + return "I40E_ERR_SRQ_ENABLED"; + case I40E_ERR_ADMIN_QUEUE_ERROR: + return "I40E_ERR_ADMIN_QUEUE_ERROR"; + case I40E_ERR_ADMIN_QUEUE_TIMEOUT: + return "I40E_ERR_ADMIN_QUEUE_TIMEOUT"; + case I40E_ERR_BUF_TOO_SHORT: + return "I40E_ERR_BUF_TOO_SHORT"; + case I40E_ERR_ADMIN_QUEUE_FULL: + return "I40E_ERR_ADMIN_QUEUE_FULL"; + case I40E_ERR_ADMIN_QUEUE_NO_WORK: + return "I40E_ERR_ADMIN_QUEUE_NO_WORK"; + case I40E_ERR_BAD_IWARP_CQE: + return "I40E_ERR_BAD_IWARP_CQE"; + case I40E_ERR_NVM_BLANK_MODE: + return "I40E_ERR_NVM_BLANK_MODE"; + case I40E_ERR_NOT_IMPLEMENTED: + return "I40E_ERR_NOT_IMPLEMENTED"; + case I40E_ERR_PE_DOORBELL_NOT_ENABLED: + return "I40E_ERR_PE_DOORBELL_NOT_ENABLED"; + case I40E_ERR_DIAG_TEST_FAILED: + return "I40E_ERR_DIAG_TEST_FAILED"; + case I40E_ERR_NOT_READY: + return "I40E_ERR_NOT_READY"; + case I40E_NOT_SUPPORTED: + return "I40E_NOT_SUPPORTED"; + case I40E_ERR_FIRMWARE_API_VERSION: + return "I40E_ERR_FIRMWARE_API_VERSION"; + } + + snprintf(hw->err_str, sizeof(hw->err_str), "%d", stat_err); + return hw->err_str; +} + +/** * i40e_debug_aq * @hw: debug mask related to admin queue * @mask: debug mask @@ -154,9 +375,13 @@ void i40e_debug_aq(struct i40e_hw *hw, e bool i40e_check_asq_alive(struct i40e_hw *hw) { if (hw->aq.asq.len) - return !!(rd32(hw, hw->aq.asq.len) & I40E_PF_ATQLEN_ATQENABLE_MASK); - else - return FALSE; + if (!i40e_is_vf(hw)) + return !!(rd32(hw, hw->aq.asq.len) & + I40E_PF_ATQLEN_ATQENABLE_MASK); + if (i40e_is_vf(hw)) + return !!(rd32(hw, hw->aq.asq.len) & + I40E_VF_ATQLEN1_ATQENABLE_MASK); + return FALSE; } /** @@ -184,6 +409,171 @@ enum i40e_status_code i40e_aq_queue_shut return status; } +#ifdef X722_SUPPORT + +/** + * i40e_aq_get_set_rss_lut + * @hw: pointer to the hardware structure + * @vsi_id: vsi fw index + * @pf_lut: for PF table set TRUE, for VSI table set FALSE + * @lut: pointer to the lut buffer provided by the caller + * @lut_size: size of the lut buffer + * @set: set TRUE to set the table, FALSE to get the table + * + * Internal function to get or set RSS look up table + **/ +static enum i40e_status_code i40e_aq_get_set_rss_lut(struct i40e_hw *hw, + u16 vsi_id, bool pf_lut, + u8 *lut, u16 lut_size, + bool set) +{ + enum i40e_status_code status; + struct i40e_aq_desc desc; + struct i40e_aqc_get_set_rss_lut *cmd_resp = + (struct i40e_aqc_get_set_rss_lut *)&desc.params.raw; + + if (set) + i40e_fill_default_direct_cmd_desc(&desc, + i40e_aqc_opc_set_rss_lut); + else + i40e_fill_default_direct_cmd_desc(&desc, + i40e_aqc_opc_get_rss_lut); + + /* Indirect command */ + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); + + cmd_resp->vsi_id = + CPU_TO_LE16((u16)((vsi_id << + I40E_AQC_SET_RSS_LUT_VSI_ID_SHIFT) & + I40E_AQC_SET_RSS_LUT_VSI_ID_MASK)); + cmd_resp->vsi_id |= CPU_TO_LE16((u16)I40E_AQC_SET_RSS_LUT_VSI_VALID); + + if (pf_lut) + cmd_resp->flags |= CPU_TO_LE16((u16) + ((I40E_AQC_SET_RSS_LUT_TABLE_TYPE_PF << + I40E_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT) & + I40E_AQC_SET_RSS_LUT_TABLE_TYPE_MASK)); + else + cmd_resp->flags |= CPU_TO_LE16((u16) + ((I40E_AQC_SET_RSS_LUT_TABLE_TYPE_VSI << + I40E_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT) & + I40E_AQC_SET_RSS_LUT_TABLE_TYPE_MASK)); + + cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_WORD((u64)lut)); + cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)lut)); + + status = i40e_asq_send_command(hw, &desc, lut, lut_size, NULL); + + return status; +} + +/** + * i40e_aq_get_rss_lut + * @hw: pointer to the hardware structure + * @vsi_id: vsi fw index + * @pf_lut: for PF table set TRUE, for VSI table set FALSE + * @lut: pointer to the lut buffer provided by the caller + * @lut_size: size of the lut buffer + * + * get the RSS lookup table, PF or VSI type + **/ +enum i40e_status_code i40e_aq_get_rss_lut(struct i40e_hw *hw, u16 vsi_id, + bool pf_lut, u8 *lut, u16 lut_size) +{ + return i40e_aq_get_set_rss_lut(hw, vsi_id, pf_lut, lut, lut_size, + FALSE); +} + +/** + * i40e_aq_set_rss_lut + * @hw: pointer to the hardware structure + * @vsi_id: vsi fw index + * @pf_lut: for PF table set TRUE, for VSI table set FALSE + * @lut: pointer to the lut buffer provided by the caller + * @lut_size: size of the lut buffer + * + * set the RSS lookup table, PF or VSI type + **/ +enum i40e_status_code i40e_aq_set_rss_lut(struct i40e_hw *hw, u16 vsi_id, + bool pf_lut, u8 *lut, u16 lut_size) +{ + return i40e_aq_get_set_rss_lut(hw, vsi_id, pf_lut, lut, lut_size, TRUE); +} + +/** + * i40e_aq_get_set_rss_key + * @hw: pointer to the hw struct + * @vsi_id: vsi fw index + * @key: pointer to key info struct + * @set: set TRUE to set the key, FALSE to get the key + * + * get the RSS key per VSI + **/ +static enum i40e_status_code i40e_aq_get_set_rss_key(struct i40e_hw *hw, + u16 vsi_id, + struct i40e_aqc_get_set_rss_key_data *key, + bool set) +{ + enum i40e_status_code status; + struct i40e_aq_desc desc; + struct i40e_aqc_get_set_rss_key *cmd_resp = + (struct i40e_aqc_get_set_rss_key *)&desc.params.raw; + u16 key_size = sizeof(struct i40e_aqc_get_set_rss_key_data); + + if (set) + i40e_fill_default_direct_cmd_desc(&desc, + i40e_aqc_opc_set_rss_key); + else + i40e_fill_default_direct_cmd_desc(&desc, + i40e_aqc_opc_get_rss_key); + + /* Indirect command */ + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); + + cmd_resp->vsi_id = + CPU_TO_LE16((u16)((vsi_id << + I40E_AQC_SET_RSS_KEY_VSI_ID_SHIFT) & + I40E_AQC_SET_RSS_KEY_VSI_ID_MASK)); + cmd_resp->vsi_id |= CPU_TO_LE16((u16)I40E_AQC_SET_RSS_KEY_VSI_VALID); + cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_WORD((u64)key)); + cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)key)); + + status = i40e_asq_send_command(hw, &desc, key, key_size, NULL); + + return status; +} + +/** + * i40e_aq_get_rss_key + * @hw: pointer to the hw struct + * @vsi_id: vsi fw index + * @key: pointer to key info struct + * + **/ +enum i40e_status_code i40e_aq_get_rss_key(struct i40e_hw *hw, + u16 vsi_id, + struct i40e_aqc_get_set_rss_key_data *key) +{ + return i40e_aq_get_set_rss_key(hw, vsi_id, key, FALSE); +} + +/** + * i40e_aq_set_rss_key + * @hw: pointer to the hw struct + * @vsi_id: vsi fw index + * @key: pointer to key info struct + * + * set the RSS key per VSI + **/ +enum i40e_status_code i40e_aq_set_rss_key(struct i40e_hw *hw, + u16 vsi_id, + struct i40e_aqc_get_set_rss_key_data *key) +{ + return i40e_aq_get_set_rss_key(hw, vsi_id, key, TRUE); +} +#endif /* X722_SUPPORT */ /* The i40e_ptype_lookup table is used to convert from the 8-bit ptype in the * hardware to a bit-field that can be used by SW to more easily determine the @@ -598,6 +988,9 @@ enum i40e_status_code i40e_init_shared_c switch (hw->mac.type) { case I40E_MAC_XL710: +#ifdef X722_SUPPORT + case I40E_MAC_X722: +#endif break; default: return I40E_ERR_DEVICE_NOT_SUPPORTED; @@ -888,7 +1281,7 @@ enum i40e_status_code i40e_pf_reset(stru grst_del = (rd32(hw, I40E_GLGEN_RSTCTL) & I40E_GLGEN_RSTCTL_GRSTDEL_MASK) >> I40E_GLGEN_RSTCTL_GRSTDEL_SHIFT; - for (cnt = 0; cnt < grst_del + 2; cnt++) { + for (cnt = 0; cnt < grst_del + 10; cnt++) { reg = rd32(hw, I40E_GLGEN_RSTAT); if (!(reg & I40E_GLGEN_RSTAT_DEVSTATE_MASK)) break; @@ -1108,9 +1501,11 @@ u32 i40e_led_get(struct i40e_hw *hw) if (!gpio_val) continue; - /* ignore gpio LED src mode entries related to the activity LEDs */ - current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) >> - I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); + /* ignore gpio LED src mode entries related to the activity + * LEDs + */ + current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) + >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); switch (current_mode) { case I40E_COMBINED_ACTIVITY: case I40E_FILTER_ACTIVITY: @@ -1154,9 +1549,11 @@ void i40e_led_set(struct i40e_hw *hw, u3 if (!gpio_val) continue; - /* ignore gpio LED src mode entries related to the activity LEDs */ - current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) >> - I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); + /* ignore gpio LED src mode entries related to the activity + * LEDs + */ + current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) + >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); switch (current_mode) { case I40E_COMBINED_ACTIVITY: case I40E_FILTER_ACTIVITY: @@ -1175,9 +1572,9 @@ void i40e_led_set(struct i40e_hw *hw, u3 blink = FALSE; if (blink) - gpio_val |= (1 << I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); + gpio_val |= BIT(I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); else - gpio_val &= ~(1 << I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); + gpio_val &= ~BIT(I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); wr32(hw, I40E_GLGEN_GPIO_CTL(i), gpio_val); break; @@ -1329,14 +1726,14 @@ enum i40e_status_code i40e_set_fc(struct *aq_failures |= I40E_SET_FC_AQ_FAIL_SET; } /* Update the link info */ - status = i40e_aq_get_link_info(hw, TRUE, NULL, NULL); + status = i40e_update_link_info(hw); if (status) { /* Wait a little bit (on 40G cards it sometimes takes a really * long time for link to come back from the atomic reset) * and try once more */ i40e_msec_delay(1000); - status = i40e_aq_get_link_info(hw, TRUE, NULL, NULL); + status = i40e_update_link_info(hw); } if (status) *aq_failures |= I40E_SET_FC_AQ_FAIL_UPDATE; @@ -1525,7 +1922,6 @@ aq_get_link_info_exit: return status; } - /** * i40e_aq_set_phy_int_mask * @hw: pointer to the hw struct @@ -1837,6 +2233,74 @@ enum i40e_status_code i40e_aq_set_vsi_mu } /** + * i40e_aq_set_vsi_mc_promisc_on_vlan + * @hw: pointer to the hw struct + * @seid: vsi number + * @enable: set MAC L2 layer unicast promiscuous enable/disable for a given VLAN + * @vid: The VLAN tag filter - capture any multicast packet with this VLAN tag + * @cmd_details: pointer to command details structure or NULL + **/ +enum i40e_status_code i40e_aq_set_vsi_mc_promisc_on_vlan(struct i40e_hw *hw, + u16 seid, bool enable, u16 vid, + struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aq_desc desc; + struct i40e_aqc_set_vsi_promiscuous_modes *cmd = + (struct i40e_aqc_set_vsi_promiscuous_modes *)&desc.params.raw; + enum i40e_status_code status; + u16 flags = 0; + + i40e_fill_default_direct_cmd_desc(&desc, + i40e_aqc_opc_set_vsi_promiscuous_modes); + + if (enable) + flags |= I40E_AQC_SET_VSI_PROMISC_MULTICAST; + + cmd->promiscuous_flags = CPU_TO_LE16(flags); + cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_MULTICAST); + cmd->seid = CPU_TO_LE16(seid); + cmd->vlan_tag = CPU_TO_LE16(vid | I40E_AQC_SET_VSI_VLAN_VALID); + + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); + + return status; +} + +/** + * i40e_aq_set_vsi_uc_promisc_on_vlan + * @hw: pointer to the hw struct + * @seid: vsi number + * @enable: set MAC L2 layer unicast promiscuous enable/disable for a given VLAN + * @vid: The VLAN tag filter - capture any unicast packet with this VLAN tag + * @cmd_details: pointer to command details structure or NULL + **/ +enum i40e_status_code i40e_aq_set_vsi_uc_promisc_on_vlan(struct i40e_hw *hw, + u16 seid, bool enable, u16 vid, + struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aq_desc desc; + struct i40e_aqc_set_vsi_promiscuous_modes *cmd = + (struct i40e_aqc_set_vsi_promiscuous_modes *)&desc.params.raw; + enum i40e_status_code status; + u16 flags = 0; + + i40e_fill_default_direct_cmd_desc(&desc, + i40e_aqc_opc_set_vsi_promiscuous_modes); + + if (enable) + flags |= I40E_AQC_SET_VSI_PROMISC_UNICAST; + + cmd->promiscuous_flags = CPU_TO_LE16(flags); + cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_UNICAST); + cmd->seid = CPU_TO_LE16(seid); + cmd->vlan_tag = CPU_TO_LE16(vid | I40E_AQC_SET_VSI_VLAN_VALID); + + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); + + return status; +} + +/** * i40e_aq_set_vsi_broadcast * @hw: pointer to the hw struct * @seid: vsi number @@ -2067,30 +2531,56 @@ enum i40e_status_code i40e_aq_send_drive /** * i40e_get_link_status - get status of the HW network link * @hw: pointer to the hw struct + * @link_up: pointer to bool (TRUE/FALSE = linkup/linkdown) * - * Returns TRUE if link is up, FALSE if link is down. + * Variable link_up TRUE if link is up, FALSE if link is down. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 23:07:40 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 738BDB07; Fri, 5 Jun 2015 23:07:40 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ie0-x236.google.com (mail-ie0-x236.google.com [IPv6:2607:f8b0:4001:c03::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3BBDD1CBA; Fri, 5 Jun 2015 23:07:40 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by iebgx4 with SMTP id gx4so67372668ieb.0; Fri, 05 Jun 2015 16:07:39 -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=t7o8FO0Gmf8tMpHWHNCUqomg/ANMvYITmSI6vXhcj/o=; b=QXzKuJN9m73LutuJZADs4dQvfiNNxw0ACpRG1QCvRvdTznxZTnp1cUcdqddZIA5y12 ljIGX2JZWIRPgdD+F2aUQQvDqo3wOkqxp9Tob08Ppev6zjliIXWa3adP+epFT3Z93ORb oT6aFRrNHS6DAATjotG81YC2BAv+F8cnMSSKitvKlRCW8wgfgral2aOGZk8PDNuwwabR mkih/Nt412CfnxcNZ1wLuoE8JNRGN+0QW6FpvmiwVkDibYWWx5nZc0X+mvxJLr/Doqbj fykGgF5bRzRUgC5j8pjskIgFozxwzZeOB7CktH6knoJI+JaGytTucOvQeiFAlRNVz6Ej B3hg== MIME-Version: 1.0 X-Received: by 10.50.73.198 with SMTP id n6mr793680igv.32.1433545659643; Fri, 05 Jun 2015 16:07:39 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.38.133 with HTTP; Fri, 5 Jun 2015 16:07:39 -0700 (PDT) In-Reply-To: <201506052252.t55MqgOT000856@svn.freebsd.org> References: <201506052252.t55MqgOT000856@svn.freebsd.org> Date: Fri, 5 Jun 2015 16:07:39 -0700 X-Google-Sender-Auth: 5dJBD28d4yjacoMJYyP24hVGsMI Message-ID: Subject: Re: svn commit: r284049 - in head/sys: dev/ixl modules/ixl modules/ixlv From: Adrian Chadd To: Jack F Vogel Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 23:07:40 -0000 Hi! Is there any public information / firmware on this? Or do we have to have some commercial arrangement with Intel to get the updated firmware? My support channel is "whoever gave me the two ixv 40g nics to test netmap on soon" and I don't think they have firmware. :) Thanks, -adrian On 5 June 2015 at 15:52, Jack F Vogel wrote: > Author: jfv > Date: Fri Jun 5 22:52:42 2015 > New Revision: 284049 > URL: https://svnweb.freebsd.org/changeset/base/284049 > > Log: > Update SW4 to the Intel ixl/ixlv drivers. This is primarily a shared > code update, with supporting changes in the CORE. Changes for the extended > media types, VF driver has virtual channel protocol changes, and some > register use corrections. This software change should be coordinated with > Firmware updates to your hardware, contact your support channels for that. > > MFC after: 1 week > > Added: > head/sys/dev/ixl/i40e_devids.h (contents, props changed) > Modified: > head/sys/dev/ixl/i40e_adminq.c > head/sys/dev/ixl/i40e_adminq.h > head/sys/dev/ixl/i40e_adminq_cmd.h > head/sys/dev/ixl/i40e_common.c > head/sys/dev/ixl/i40e_hmc.c > head/sys/dev/ixl/i40e_hmc.h > head/sys/dev/ixl/i40e_lan_hmc.c > head/sys/dev/ixl/i40e_nvm.c > head/sys/dev/ixl/i40e_osdep.h > head/sys/dev/ixl/i40e_prototype.h > head/sys/dev/ixl/i40e_register.h > head/sys/dev/ixl/i40e_type.h > head/sys/dev/ixl/i40e_virtchnl.h > head/sys/dev/ixl/if_ixl.c > head/sys/dev/ixl/if_ixlv.c > head/sys/dev/ixl/ixlv.h > head/sys/dev/ixl/ixlvc.c > head/sys/modules/ixl/Makefile > head/sys/modules/ixlv/Makefile > > Modified: head/sys/dev/ixl/i40e_adminq.c > ============================================================================== > --- head/sys/dev/ixl/i40e_adminq.c Fri Jun 5 21:45:35 2015 (r284048) > +++ head/sys/dev/ixl/i40e_adminq.c Fri Jun 5 22:52:42 2015 (r284049) > @@ -315,8 +315,12 @@ static enum i40e_status_code i40e_config > wr32(hw, hw->aq.asq.tail, 0); > > /* set starting point */ > - wr32(hw, hw->aq.asq.len, (hw->aq.num_asq_entries | > - I40E_PF_ATQLEN_ATQENABLE_MASK)); > + if (!i40e_is_vf(hw)) > + wr32(hw, hw->aq.asq.len, (hw->aq.num_asq_entries | > + I40E_PF_ATQLEN_ATQENABLE_MASK)); > + if (i40e_is_vf(hw)) > + wr32(hw, hw->aq.asq.len, (hw->aq.num_asq_entries | > + I40E_VF_ATQLEN1_ATQENABLE_MASK)); > wr32(hw, hw->aq.asq.bal, I40E_LO_DWORD(hw->aq.asq.desc_buf.pa)); > wr32(hw, hw->aq.asq.bah, I40E_HI_DWORD(hw->aq.asq.desc_buf.pa)); > > @@ -344,8 +348,12 @@ static enum i40e_status_code i40e_config > wr32(hw, hw->aq.arq.tail, 0); > > /* set starting point */ > - wr32(hw, hw->aq.arq.len, (hw->aq.num_arq_entries | > - I40E_PF_ARQLEN_ARQENABLE_MASK)); > + if (!i40e_is_vf(hw)) > + wr32(hw, hw->aq.arq.len, (hw->aq.num_arq_entries | > + I40E_PF_ARQLEN_ARQENABLE_MASK)); > + if (i40e_is_vf(hw)) > + wr32(hw, hw->aq.arq.len, (hw->aq.num_arq_entries | > + I40E_VF_ARQLEN1_ARQENABLE_MASK)); > wr32(hw, hw->aq.arq.bal, I40E_LO_DWORD(hw->aq.arq.desc_buf.pa)); > wr32(hw, hw->aq.arq.bah, I40E_HI_DWORD(hw->aq.arq.desc_buf.pa)); > > @@ -559,6 +567,7 @@ enum i40e_status_code i40e_init_adminq(s > { > enum i40e_status_code ret_code; > u16 eetrack_lo, eetrack_hi; > + u16 cfg_ptr, oem_hi, oem_lo; > int retry = 0; > /* verify input for valid configuration */ > if ((hw->aq.num_arq_entries == 0) || > @@ -619,6 +628,12 @@ enum i40e_status_code i40e_init_adminq(s > i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_LO, &eetrack_lo); > i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_HI, &eetrack_hi); > hw->nvm.eetrack = (eetrack_hi << 16) | eetrack_lo; > + i40e_read_nvm_word(hw, I40E_SR_BOOT_CONFIG_PTR, &cfg_ptr); > + i40e_read_nvm_word(hw, (cfg_ptr + I40E_NVM_OEM_VER_OFF), > + &oem_hi); > + i40e_read_nvm_word(hw, (cfg_ptr + (I40E_NVM_OEM_VER_OFF + 1)), > + &oem_lo); > + hw->nvm.oem_ver = ((u32)oem_hi << 16) | oem_lo; > > if (hw->aq.api_maj_ver > I40E_FW_API_VERSION_MAJOR) { > ret_code = I40E_ERR_FIRMWARE_API_VERSION; > @@ -669,6 +684,9 @@ enum i40e_status_code i40e_shutdown_admi > i40e_destroy_spinlock(&hw->aq.asq_spinlock); > i40e_destroy_spinlock(&hw->aq.arq_spinlock); > > + if (hw->nvm_buff.va) > + i40e_free_virt_mem(hw, &hw->nvm_buff); > + > return ret_code; > } > > @@ -688,16 +706,16 @@ u16 i40e_clean_asq(struct i40e_hw *hw) > > desc = I40E_ADMINQ_DESC(*asq, ntc); > details = I40E_ADMINQ_DETAILS(*asq, ntc); > + > while (rd32(hw, hw->aq.asq.head) != ntc) { > i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, > - "%s: ntc %d head %d.\n", __FUNCTION__, ntc, > - rd32(hw, hw->aq.asq.head)); > + "ntc %d head %d.\n", ntc, rd32(hw, hw->aq.asq.head)); > > if (details->callback) { > I40E_ADMINQ_CALLBACK cb_func = > (I40E_ADMINQ_CALLBACK)details->callback; > - i40e_memcpy(&desc_cb, desc, > - sizeof(struct i40e_aq_desc), I40E_DMA_TO_DMA); > + i40e_memcpy(&desc_cb, desc, sizeof(struct i40e_aq_desc), > + I40E_DMA_TO_DMA); > cb_func(hw, &desc_cb); > } > i40e_memset(desc, 0, sizeof(*desc), I40E_DMA_MEM); > @@ -755,6 +773,8 @@ enum i40e_status_code i40e_asq_send_comm > u16 retval = 0; > u32 val = 0; > > + hw->aq.asq_last_status = I40E_AQ_RC_OK; > + > val = rd32(hw, hw->aq.asq.head); > if (val >= hw->aq.num_asq_entries) { > i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, > @@ -912,6 +932,11 @@ enum i40e_status_code i40e_asq_send_comm > "AQTX: desc and buffer writeback:\n"); > i40e_debug_aq(hw, I40E_DEBUG_AQ_COMMAND, (void *)desc, buff, buff_size); > > + /* save writeback aq if requested */ > + if (details->wb_desc) > + i40e_memcpy(details->wb_desc, desc_on_ring, > + sizeof(struct i40e_aq_desc), I40E_DMA_TO_NONDMA); > + > /* update the error if time out occurred */ > if ((!cmd_completed) && > (!details->async && !details->postpone)) { > @@ -971,7 +996,10 @@ enum i40e_status_code i40e_clean_arq_ele > i40e_acquire_spinlock(&hw->aq.arq_spinlock); > > /* set next_to_use to head */ > - ntu = (rd32(hw, hw->aq.arq.head) & I40E_PF_ARQH_ARQH_MASK); > + if (!i40e_is_vf(hw)) > + ntu = (rd32(hw, hw->aq.arq.head) & I40E_PF_ARQH_ARQH_MASK); > + if (i40e_is_vf(hw)) > + ntu = (rd32(hw, hw->aq.arq.head) & I40E_VF_ARQH1_ARQH_MASK); > if (ntu == ntc) { > /* nothing to do - shouldn't need to update ring's values */ > ret_code = I40E_ERR_ADMIN_QUEUE_NO_WORK; > @@ -1040,6 +1068,19 @@ clean_arq_element_out: > i40e_release_nvm(hw); > hw->aq.nvm_release_on_done = FALSE; > } > + > + switch (hw->nvmupd_state) { > + case I40E_NVMUPD_STATE_INIT_WAIT: > + hw->nvmupd_state = I40E_NVMUPD_STATE_INIT; > + break; > + > + case I40E_NVMUPD_STATE_WRITE_WAIT: > + hw->nvmupd_state = I40E_NVMUPD_STATE_WRITING; > + break; > + > + default: > + break; > + } > } > > return ret_code; > @@ -1051,9 +1092,6 @@ void i40e_resume_aq(struct i40e_hw *hw) > hw->aq.asq.next_to_use = 0; > hw->aq.asq.next_to_clean = 0; > > -#if (I40E_VF_ATQLEN_ATQENABLE_MASK != I40E_PF_ATQLEN_ATQENABLE_MASK) > -#error I40E_VF_ATQLEN_ATQENABLE_MASK != I40E_PF_ATQLEN_ATQENABLE_MASK > -#endif > i40e_config_asq_regs(hw); > > hw->aq.arq.next_to_use = 0; > > Modified: head/sys/dev/ixl/i40e_adminq.h > ============================================================================== > --- head/sys/dev/ixl/i40e_adminq.h Fri Jun 5 21:45:35 2015 (r284048) > +++ head/sys/dev/ixl/i40e_adminq.h Fri Jun 5 22:52:42 2015 (r284049) > @@ -1,6 +1,6 @@ > /****************************************************************************** > > - Copyright (c) 2013-2014, Intel Corporation > + Copyright (c) 2013-2015, Intel Corporation > All rights reserved. > > Redistribution and use in source and binary forms, with or without > @@ -77,6 +77,7 @@ struct i40e_asq_cmd_details { > u16 flags_dis; > bool async; > bool postpone; > + struct i40e_aq_desc *wb_desc; > }; > > #define I40E_ADMINQ_DETAILS(R, i) \ > > Modified: head/sys/dev/ixl/i40e_adminq_cmd.h > ============================================================================== > --- head/sys/dev/ixl/i40e_adminq_cmd.h Fri Jun 5 21:45:35 2015 (r284048) > +++ head/sys/dev/ixl/i40e_adminq_cmd.h Fri Jun 5 22:52:42 2015 (r284049) > @@ -42,7 +42,11 @@ > */ > > #define I40E_FW_API_VERSION_MAJOR 0x0001 > -#define I40E_FW_API_VERSION_MINOR 0x0002 > +#ifdef X722_SUPPORT > +#define I40E_FW_API_VERSION_MINOR 0x0003 > +#else > +#define I40E_FW_API_VERSION_MINOR 0x0004 > +#endif > > struct i40e_aq_desc { > __le16 flags; > @@ -140,12 +144,7 @@ enum i40e_admin_queue_opc { > i40e_aqc_opc_list_func_capabilities = 0x000A, > i40e_aqc_opc_list_dev_capabilities = 0x000B, > > - i40e_aqc_opc_set_cppm_configuration = 0x0103, > - i40e_aqc_opc_set_arp_proxy_entry = 0x0104, > - i40e_aqc_opc_set_ns_proxy_entry = 0x0105, > - > /* LAA */ > - i40e_aqc_opc_mng_laa = 0x0106, /* AQ obsolete */ > i40e_aqc_opc_mac_address_read = 0x0107, > i40e_aqc_opc_mac_address_write = 0x0108, > > @@ -240,6 +239,7 @@ enum i40e_admin_queue_opc { > i40e_aqc_opc_nvm_update = 0x0703, > i40e_aqc_opc_nvm_config_read = 0x0704, > i40e_aqc_opc_nvm_config_write = 0x0705, > + i40e_aqc_opc_oem_post_update = 0x0720, > > /* virtualization commands */ > i40e_aqc_opc_send_msg_to_pf = 0x0801, > @@ -270,7 +270,12 @@ enum i40e_admin_queue_opc { > /* Tunnel commands */ > i40e_aqc_opc_add_udp_tunnel = 0x0B00, > i40e_aqc_opc_del_udp_tunnel = 0x0B01, > - i40e_aqc_opc_tunnel_key_structure = 0x0B10, > +#ifdef X722_SUPPORT > + i40e_aqc_opc_set_rss_key = 0x0B02, > + i40e_aqc_opc_set_rss_lut = 0x0B03, > + i40e_aqc_opc_get_rss_key = 0x0B04, > + i40e_aqc_opc_get_rss_lut = 0x0B05, > +#endif > > /* Async Events */ > i40e_aqc_opc_event_lan_overflow = 0x1001, > @@ -282,8 +287,6 @@ enum i40e_admin_queue_opc { > i40e_aqc_opc_oem_ocbb_initialize = 0xFE03, > > /* debug commands */ > - i40e_aqc_opc_debug_get_deviceid = 0xFF00, > - i40e_aqc_opc_debug_set_mode = 0xFF01, > i40e_aqc_opc_debug_read_reg = 0xFF03, > i40e_aqc_opc_debug_write_reg = 0xFF04, > i40e_aqc_opc_debug_modify_reg = 0xFF07, > @@ -517,7 +520,8 @@ struct i40e_aqc_mac_address_read { > #define I40E_AQC_SAN_ADDR_VALID 0x20 > #define I40E_AQC_PORT_ADDR_VALID 0x40 > #define I40E_AQC_WOL_ADDR_VALID 0x80 > -#define I40E_AQC_ADDR_VALID_MASK 0xf0 > +#define I40E_AQC_MC_MAG_EN_VALID 0x100 > +#define I40E_AQC_ADDR_VALID_MASK 0x1F0 > u8 reserved[6]; > __le32 addr_high; > __le32 addr_low; > @@ -540,7 +544,9 @@ struct i40e_aqc_mac_address_write { > #define I40E_AQC_WRITE_TYPE_LAA_ONLY 0x0000 > #define I40E_AQC_WRITE_TYPE_LAA_WOL 0x4000 > #define I40E_AQC_WRITE_TYPE_PORT 0x8000 > -#define I40E_AQC_WRITE_TYPE_MASK 0xc000 > +#define I40E_AQC_WRITE_TYPE_UPDATE_MC_MAG 0xC000 > +#define I40E_AQC_WRITE_TYPE_MASK 0xC000 > + > __le16 mac_sah; > __le32 mac_sal; > u8 reserved[8]; > @@ -834,8 +840,16 @@ struct i40e_aqc_vsi_properties_data { > I40E_AQ_VSI_TC_QUE_NUMBER_SHIFT) > /* queueing option section */ > u8 queueing_opt_flags; > +#ifdef X722_SUPPORT > +#define I40E_AQ_VSI_QUE_OPT_MULTICAST_UDP_ENA 0x04 > +#define I40E_AQ_VSI_QUE_OPT_UNICAST_UDP_ENA 0x08 > +#endif > #define I40E_AQ_VSI_QUE_OPT_TCP_ENA 0x10 > #define I40E_AQ_VSI_QUE_OPT_FCOE_ENA 0x20 > +#ifdef X722_SUPPORT > +#define I40E_AQ_VSI_QUE_OPT_RSS_LUT_PF 0x00 > +#define I40E_AQ_VSI_QUE_OPT_RSS_LUT_VSI 0x40 > +#endif > u8 queueing_opt_reserved[3]; > /* scheduler section */ > u8 up_enable_bits; > @@ -1076,6 +1090,7 @@ struct i40e_aqc_set_vsi_promiscuous_mode > __le16 seid; > #define I40E_AQC_VSI_PROM_CMD_SEID_MASK 0x3FF > __le16 vlan_tag; > +#define I40E_AQC_SET_VSI_VLAN_MASK 0x0FFF > #define I40E_AQC_SET_VSI_VLAN_VALID 0x8000 > u8 reserved[8]; > }; > @@ -1725,11 +1740,13 @@ struct i40e_aqc_get_link_status { > u8 phy_type; /* i40e_aq_phy_type */ > u8 link_speed; /* i40e_aq_link_speed */ > u8 link_info; > -#define I40E_AQ_LINK_UP 0x01 > +#define I40E_AQ_LINK_UP 0x01 /* obsolete */ > +#define I40E_AQ_LINK_UP_FUNCTION 0x01 > #define I40E_AQ_LINK_FAULT 0x02 > #define I40E_AQ_LINK_FAULT_TX 0x04 > #define I40E_AQ_LINK_FAULT_RX 0x08 > #define I40E_AQ_LINK_FAULT_REMOTE 0x10 > +#define I40E_AQ_LINK_UP_PORT 0x20 > #define I40E_AQ_MEDIA_AVAILABLE 0x40 > #define I40E_AQ_SIGNAL_DETECT 0x80 > u8 an_info; > @@ -1891,6 +1908,26 @@ struct i40e_aqc_nvm_config_data_immediat > > I40E_CHECK_STRUCT_LEN(0xc, i40e_aqc_nvm_config_data_immediate_field); > > +/* OEM Post Update (indirect 0x0720) > + * no command data struct used > + */ > + struct i40e_aqc_nvm_oem_post_update { > +#define I40E_AQ_NVM_OEM_POST_UPDATE_EXTERNAL_DATA 0x01 > + u8 sel_data; > + u8 reserved[7]; > +}; > + > +I40E_CHECK_STRUCT_LEN(0x8, i40e_aqc_nvm_oem_post_update); > + > +struct i40e_aqc_nvm_oem_post_update_buffer { > + u8 str_len; > + u8 dev_addr; > + __le16 eeprom_addr; > + u8 data[36]; > +}; > + > +I40E_CHECK_STRUCT_LEN(0x28, i40e_aqc_nvm_oem_post_update_buffer); > + > /* Send to PF command (indirect 0x0801) id is only used by PF > * Send to VF command (indirect 0x0802) id is only used by PF > * Send to Peer PF command (indirect 0x0803) > @@ -2064,12 +2101,28 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_star > #define I40E_AQC_CEE_APP_ISCSI_MASK (0x7 << I40E_AQC_CEE_APP_ISCSI_SHIFT) > #define I40E_AQC_CEE_APP_FIP_SHIFT 0x8 > #define I40E_AQC_CEE_APP_FIP_MASK (0x7 << I40E_AQC_CEE_APP_FIP_SHIFT) > + > #define I40E_AQC_CEE_PG_STATUS_SHIFT 0x0 > #define I40E_AQC_CEE_PG_STATUS_MASK (0x7 << I40E_AQC_CEE_PG_STATUS_SHIFT) > #define I40E_AQC_CEE_PFC_STATUS_SHIFT 0x3 > #define I40E_AQC_CEE_PFC_STATUS_MASK (0x7 << I40E_AQC_CEE_PFC_STATUS_SHIFT) > #define I40E_AQC_CEE_APP_STATUS_SHIFT 0x8 > #define I40E_AQC_CEE_APP_STATUS_MASK (0x7 << I40E_AQC_CEE_APP_STATUS_SHIFT) > +#define I40E_AQC_CEE_FCOE_STATUS_SHIFT 0x8 > +#define I40E_AQC_CEE_FCOE_STATUS_MASK (0x7 << I40E_AQC_CEE_FCOE_STATUS_SHIFT) > +#define I40E_AQC_CEE_ISCSI_STATUS_SHIFT 0xB > +#define I40E_AQC_CEE_ISCSI_STATUS_MASK (0x7 << I40E_AQC_CEE_ISCSI_STATUS_SHIFT) > +#define I40E_AQC_CEE_FIP_STATUS_SHIFT 0x10 > +#define I40E_AQC_CEE_FIP_STATUS_MASK (0x7 << I40E_AQC_CEE_FIP_STATUS_SHIFT) > + > +/* struct i40e_aqc_get_cee_dcb_cfg_v1_resp was originally defined with > + * word boundary layout issues, which the Linux compilers silently deal > + * with by adding padding, making the actual struct larger than designed. > + * However, the FW compiler for the NIC is less lenient and complains > + * about the struct. Hence, the struct defined here has an extra byte in > + * fields reserved3 and reserved4 to directly acknowledge that padding, > + * and the new length is used in the length check macro. > + */ > struct i40e_aqc_get_cee_dcb_cfg_v1_resp { > u8 reserved1; > u8 oper_num_tc; > @@ -2077,9 +2130,9 @@ struct i40e_aqc_get_cee_dcb_cfg_v1_resp > u8 reserved2; > u8 oper_tc_bw[8]; > u8 oper_pfc_en; > - u8 reserved3; > + u8 reserved3[2]; > __le16 oper_app_prio; > - u8 reserved4; > + u8 reserved4[2]; > __le16 tlv_status; > }; > > @@ -2168,6 +2221,48 @@ struct i40e_aqc_del_udp_tunnel_completio > }; > > I40E_CHECK_CMD_LENGTH(i40e_aqc_del_udp_tunnel_completion); > +#ifdef X722_SUPPORT > + > +struct i40e_aqc_get_set_rss_key { > +#define I40E_AQC_SET_RSS_KEY_VSI_VALID (0x1 << 15) > +#define I40E_AQC_SET_RSS_KEY_VSI_ID_SHIFT 0 > +#define I40E_AQC_SET_RSS_KEY_VSI_ID_MASK (0x3FF << \ > + I40E_AQC_SET_RSS_KEY_VSI_ID_SHIFT) > + __le16 vsi_id; > + u8 reserved[6]; > + __le32 addr_high; > + __le32 addr_low; > +}; > + > +I40E_CHECK_CMD_LENGTH(i40e_aqc_get_set_rss_key); > + > +struct i40e_aqc_get_set_rss_key_data { > + u8 standard_rss_key[0x28]; > + u8 extended_hash_key[0xc]; > +}; > + > +I40E_CHECK_STRUCT_LEN(0x34, i40e_aqc_get_set_rss_key_data); > + > +struct i40e_aqc_get_set_rss_lut { > +#define I40E_AQC_SET_RSS_LUT_VSI_VALID (0x1 << 15) > +#define I40E_AQC_SET_RSS_LUT_VSI_ID_SHIFT 0 > +#define I40E_AQC_SET_RSS_LUT_VSI_ID_MASK (0x3FF << \ > + I40E_AQC_SET_RSS_LUT_VSI_ID_SHIFT) > + __le16 vsi_id; > +#define I40E_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT 0 > +#define I40E_AQC_SET_RSS_LUT_TABLE_TYPE_MASK (0x1 << \ > + I40E_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT) > + > +#define I40E_AQC_SET_RSS_LUT_TABLE_TYPE_VSI 0 > +#define I40E_AQC_SET_RSS_LUT_TABLE_TYPE_PF 1 > + __le16 flags; > + u8 reserved[4]; > + __le32 addr_high; > + __le32 addr_low; > +}; > + > +I40E_CHECK_CMD_LENGTH(i40e_aqc_get_set_rss_lut); > +#endif > > /* tunnel key structure 0x0B10 */ > > > Modified: head/sys/dev/ixl/i40e_common.c > ============================================================================== > --- head/sys/dev/ixl/i40e_common.c Fri Jun 5 21:45:35 2015 (r284048) > +++ head/sys/dev/ixl/i40e_common.c Fri Jun 5 22:52:42 2015 (r284049) > @@ -62,9 +62,24 @@ enum i40e_status_code i40e_set_mac_type( > case I40E_DEV_ID_QSFP_B: > case I40E_DEV_ID_QSFP_C: > case I40E_DEV_ID_10G_BASE_T: > + case I40E_DEV_ID_10G_BASE_T4: > case I40E_DEV_ID_20G_KR2: > + case I40E_DEV_ID_20G_KR2_A: > hw->mac.type = I40E_MAC_XL710; > break; > +#ifdef X722_SUPPORT > + case I40E_DEV_ID_SFP_X722: > + case I40E_DEV_ID_1G_BASE_T_X722: > + case I40E_DEV_ID_10G_BASE_T_X722: > + hw->mac.type = I40E_MAC_X722; > + break; > +#endif > +#ifdef X722_SUPPORT > + case I40E_DEV_ID_X722_VF: > + case I40E_DEV_ID_X722_VF_HV: > + hw->mac.type = I40E_MAC_X722_VF; > + break; > +#endif > case I40E_DEV_ID_VF: > case I40E_DEV_ID_VF_HV: > hw->mac.type = I40E_MAC_VF; > @@ -83,6 +98,212 @@ enum i40e_status_code i40e_set_mac_type( > } > > /** > + * i40e_aq_str - convert AQ err code to a string > + * @hw: pointer to the HW structure > + * @aq_err: the AQ error code to convert > + **/ > +char *i40e_aq_str(struct i40e_hw *hw, enum i40e_admin_queue_err aq_err) > +{ > + switch (aq_err) { > + case I40E_AQ_RC_OK: > + return "OK"; > + case I40E_AQ_RC_EPERM: > + return "I40E_AQ_RC_EPERM"; > + case I40E_AQ_RC_ENOENT: > + return "I40E_AQ_RC_ENOENT"; > + case I40E_AQ_RC_ESRCH: > + return "I40E_AQ_RC_ESRCH"; > + case I40E_AQ_RC_EINTR: > + return "I40E_AQ_RC_EINTR"; > + case I40E_AQ_RC_EIO: > + return "I40E_AQ_RC_EIO"; > + case I40E_AQ_RC_ENXIO: > + return "I40E_AQ_RC_ENXIO"; > + case I40E_AQ_RC_E2BIG: > + return "I40E_AQ_RC_E2BIG"; > + case I40E_AQ_RC_EAGAIN: > + return "I40E_AQ_RC_EAGAIN"; > + case I40E_AQ_RC_ENOMEM: > + return "I40E_AQ_RC_ENOMEM"; > + case I40E_AQ_RC_EACCES: > + return "I40E_AQ_RC_EACCES"; > + case I40E_AQ_RC_EFAULT: > + return "I40E_AQ_RC_EFAULT"; > + case I40E_AQ_RC_EBUSY: > + return "I40E_AQ_RC_EBUSY"; > + case I40E_AQ_RC_EEXIST: > + return "I40E_AQ_RC_EEXIST"; > + case I40E_AQ_RC_EINVAL: > + return "I40E_AQ_RC_EINVAL"; > + case I40E_AQ_RC_ENOTTY: > + return "I40E_AQ_RC_ENOTTY"; > + case I40E_AQ_RC_ENOSPC: > + return "I40E_AQ_RC_ENOSPC"; > + case I40E_AQ_RC_ENOSYS: > + return "I40E_AQ_RC_ENOSYS"; > + case I40E_AQ_RC_ERANGE: > + return "I40E_AQ_RC_ERANGE"; > + case I40E_AQ_RC_EFLUSHED: > + return "I40E_AQ_RC_EFLUSHED"; > + case I40E_AQ_RC_BAD_ADDR: > + return "I40E_AQ_RC_BAD_ADDR"; > + case I40E_AQ_RC_EMODE: > + return "I40E_AQ_RC_EMODE"; > + case I40E_AQ_RC_EFBIG: > + return "I40E_AQ_RC_EFBIG"; > + } > + > + snprintf(hw->err_str, sizeof(hw->err_str), "%d", aq_err); > + return hw->err_str; > +} > + > +/** > + * i40e_stat_str - convert status err code to a string > + * @hw: pointer to the HW structure > + * @stat_err: the status error code to convert > + **/ > +char *i40e_stat_str(struct i40e_hw *hw, enum i40e_status_code stat_err) > +{ > + switch (stat_err) { > + case I40E_SUCCESS: > + return "OK"; > + case I40E_ERR_NVM: > + return "I40E_ERR_NVM"; > + case I40E_ERR_NVM_CHECKSUM: > + return "I40E_ERR_NVM_CHECKSUM"; > + case I40E_ERR_PHY: > + return "I40E_ERR_PHY"; > + case I40E_ERR_CONFIG: > + return "I40E_ERR_CONFIG"; > + case I40E_ERR_PARAM: > + return "I40E_ERR_PARAM"; > + case I40E_ERR_MAC_TYPE: > + return "I40E_ERR_MAC_TYPE"; > + case I40E_ERR_UNKNOWN_PHY: > + return "I40E_ERR_UNKNOWN_PHY"; > + case I40E_ERR_LINK_SETUP: > + return "I40E_ERR_LINK_SETUP"; > + case I40E_ERR_ADAPTER_STOPPED: > + return "I40E_ERR_ADAPTER_STOPPED"; > + case I40E_ERR_INVALID_MAC_ADDR: > + return "I40E_ERR_INVALID_MAC_ADDR"; > + case I40E_ERR_DEVICE_NOT_SUPPORTED: > + return "I40E_ERR_DEVICE_NOT_SUPPORTED"; > + case I40E_ERR_MASTER_REQUESTS_PENDING: > + return "I40E_ERR_MASTER_REQUESTS_PENDING"; > + case I40E_ERR_INVALID_LINK_SETTINGS: > + return "I40E_ERR_INVALID_LINK_SETTINGS"; > + case I40E_ERR_AUTONEG_NOT_COMPLETE: > + return "I40E_ERR_AUTONEG_NOT_COMPLETE"; > + case I40E_ERR_RESET_FAILED: > + return "I40E_ERR_RESET_FAILED"; > + case I40E_ERR_SWFW_SYNC: > + return "I40E_ERR_SWFW_SYNC"; > + case I40E_ERR_NO_AVAILABLE_VSI: > + return "I40E_ERR_NO_AVAILABLE_VSI"; > + case I40E_ERR_NO_MEMORY: > + return "I40E_ERR_NO_MEMORY"; > + case I40E_ERR_BAD_PTR: > + return "I40E_ERR_BAD_PTR"; > + case I40E_ERR_RING_FULL: > + return "I40E_ERR_RING_FULL"; > + case I40E_ERR_INVALID_PD_ID: > + return "I40E_ERR_INVALID_PD_ID"; > + case I40E_ERR_INVALID_QP_ID: > + return "I40E_ERR_INVALID_QP_ID"; > + case I40E_ERR_INVALID_CQ_ID: > + return "I40E_ERR_INVALID_CQ_ID"; > + case I40E_ERR_INVALID_CEQ_ID: > + return "I40E_ERR_INVALID_CEQ_ID"; > + case I40E_ERR_INVALID_AEQ_ID: > + return "I40E_ERR_INVALID_AEQ_ID"; > + case I40E_ERR_INVALID_SIZE: > + return "I40E_ERR_INVALID_SIZE"; > + case I40E_ERR_INVALID_ARP_INDEX: > + return "I40E_ERR_INVALID_ARP_INDEX"; > + case I40E_ERR_INVALID_FPM_FUNC_ID: > + return "I40E_ERR_INVALID_FPM_FUNC_ID"; > + case I40E_ERR_QP_INVALID_MSG_SIZE: > + return "I40E_ERR_QP_INVALID_MSG_SIZE"; > + case I40E_ERR_QP_TOOMANY_WRS_POSTED: > + return "I40E_ERR_QP_TOOMANY_WRS_POSTED"; > + case I40E_ERR_INVALID_FRAG_COUNT: > + return "I40E_ERR_INVALID_FRAG_COUNT"; > + case I40E_ERR_QUEUE_EMPTY: > + return "I40E_ERR_QUEUE_EMPTY"; > + case I40E_ERR_INVALID_ALIGNMENT: > + return "I40E_ERR_INVALID_ALIGNMENT"; > + case I40E_ERR_FLUSHED_QUEUE: > + return "I40E_ERR_FLUSHED_QUEUE"; > + case I40E_ERR_INVALID_PUSH_PAGE_INDEX: > + return "I40E_ERR_INVALID_PUSH_PAGE_INDEX"; > + case I40E_ERR_INVALID_IMM_DATA_SIZE: > + return "I40E_ERR_INVALID_IMM_DATA_SIZE"; > + case I40E_ERR_TIMEOUT: > + return "I40E_ERR_TIMEOUT"; > + case I40E_ERR_OPCODE_MISMATCH: > + return "I40E_ERR_OPCODE_MISMATCH"; > + case I40E_ERR_CQP_COMPL_ERROR: > + return "I40E_ERR_CQP_COMPL_ERROR"; > + case I40E_ERR_INVALID_VF_ID: > + return "I40E_ERR_INVALID_VF_ID"; > + case I40E_ERR_INVALID_HMCFN_ID: > + return "I40E_ERR_INVALID_HMCFN_ID"; > + case I40E_ERR_BACKING_PAGE_ERROR: > + return "I40E_ERR_BACKING_PAGE_ERROR"; > + case I40E_ERR_NO_PBLCHUNKS_AVAILABLE: > + return "I40E_ERR_NO_PBLCHUNKS_AVAILABLE"; > + case I40E_ERR_INVALID_PBLE_INDEX: > + return "I40E_ERR_INVALID_PBLE_INDEX"; > + case I40E_ERR_INVALID_SD_INDEX: > + return "I40E_ERR_INVALID_SD_INDEX"; > + case I40E_ERR_INVALID_PAGE_DESC_INDEX: > + return "I40E_ERR_INVALID_PAGE_DESC_INDEX"; > + case I40E_ERR_INVALID_SD_TYPE: > + return "I40E_ERR_INVALID_SD_TYPE"; > + case I40E_ERR_MEMCPY_FAILED: > + return "I40E_ERR_MEMCPY_FAILED"; > + case I40E_ERR_INVALID_HMC_OBJ_INDEX: > + return "I40E_ERR_INVALID_HMC_OBJ_INDEX"; > + case I40E_ERR_INVALID_HMC_OBJ_COUNT: > + return "I40E_ERR_INVALID_HMC_OBJ_COUNT"; > + case I40E_ERR_INVALID_SRQ_ARM_LIMIT: > + return "I40E_ERR_INVALID_SRQ_ARM_LIMIT"; > + case I40E_ERR_SRQ_ENABLED: > + return "I40E_ERR_SRQ_ENABLED"; > + case I40E_ERR_ADMIN_QUEUE_ERROR: > + return "I40E_ERR_ADMIN_QUEUE_ERROR"; > + case I40E_ERR_ADMIN_QUEUE_TIMEOUT: > + return "I40E_ERR_ADMIN_QUEUE_TIMEOUT"; > + case I40E_ERR_BUF_TOO_SHORT: > + return "I40E_ERR_BUF_TOO_SHORT"; > + case I40E_ERR_ADMIN_QUEUE_FULL: > + return "I40E_ERR_ADMIN_QUEUE_FULL"; > + case I40E_ERR_ADMIN_QUEUE_NO_WORK: > + return "I40E_ERR_ADMIN_QUEUE_NO_WORK"; > + case I40E_ERR_BAD_IWARP_CQE: > + return "I40E_ERR_BAD_IWARP_CQE"; > + case I40E_ERR_NVM_BLANK_MODE: > + return "I40E_ERR_NVM_BLANK_MODE"; > + case I40E_ERR_NOT_IMPLEMENTED: > + return "I40E_ERR_NOT_IMPLEMENTED"; > + case I40E_ERR_PE_DOORBELL_NOT_ENABLED: > + return "I40E_ERR_PE_DOORBELL_NOT_ENABLED"; > + case I40E_ERR_DIAG_TEST_FAILED: > + return "I40E_ERR_DIAG_TEST_FAILED"; > + case I40E_ERR_NOT_READY: > + return "I40E_ERR_NOT_READY"; > + case I40E_NOT_SUPPORTED: > + return "I40E_NOT_SUPPORTED"; > + case I40E_ERR_FIRMWARE_API_VERSION: > + return "I40E_ERR_FIRMWARE_API_VERSION"; > + } > + > + snprintf(hw->err_str, sizeof(hw->err_str), "%d", stat_err); > + return hw->err_str; > +} > + > +/** > * i40e_debug_aq > * @hw: debug mask related to admin queue > * @mask: debug mask > @@ -154,9 +375,13 @@ void i40e_debug_aq(struct i40e_hw *hw, e > bool i40e_check_asq_alive(struct i40e_hw *hw) > { > if (hw->aq.asq.len) > - return !!(rd32(hw, hw->aq.asq.len) & I40E_PF_ATQLEN_ATQENABLE_MASK); > - else > - return FALSE; > + if (!i40e_is_vf(hw)) > + return !!(rd32(hw, hw->aq.asq.len) & > + I40E_PF_ATQLEN_ATQENABLE_MASK); > + if (i40e_is_vf(hw)) > + return !!(rd32(hw, hw->aq.asq.len) & > + I40E_VF_ATQLEN1_ATQENABLE_MASK); > + return FALSE; > } > > /** > @@ -184,6 +409,171 @@ enum i40e_status_code i40e_aq_queue_shut > > return status; > } > +#ifdef X722_SUPPORT > + > +/** > + * i40e_aq_get_set_rss_lut > + * @hw: pointer to the hardware structure > + * @vsi_id: vsi fw index > + * @pf_lut: for PF table set TRUE, for VSI table set FALSE > + * @lut: pointer to the lut buffer provided by the caller > + * @lut_size: size of the lut buffer > + * @set: set TRUE to set the table, FALSE to get the table > + * > + * Internal function to get or set RSS look up table > + **/ > +static enum i40e_status_code i40e_aq_get_set_rss_lut(struct i40e_hw *hw, > + u16 vsi_id, bool pf_lut, > + u8 *lut, u16 lut_size, > + bool set) > +{ > + enum i40e_status_code status; > + struct i40e_aq_desc desc; > + struct i40e_aqc_get_set_rss_lut *cmd_resp = > + (struct i40e_aqc_get_set_rss_lut *)&desc.params.raw; > + > + if (set) > + i40e_fill_default_direct_cmd_desc(&desc, > + i40e_aqc_opc_set_rss_lut); > + else > + i40e_fill_default_direct_cmd_desc(&desc, > + i40e_aqc_opc_get_rss_lut); > + > + /* Indirect command */ > + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); > + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); > + > + cmd_resp->vsi_id = > + CPU_TO_LE16((u16)((vsi_id << > + I40E_AQC_SET_RSS_LUT_VSI_ID_SHIFT) & > + I40E_AQC_SET_RSS_LUT_VSI_ID_MASK)); > + cmd_resp->vsi_id |= CPU_TO_LE16((u16)I40E_AQC_SET_RSS_LUT_VSI_VALID); > + > + if (pf_lut) > + cmd_resp->flags |= CPU_TO_LE16((u16) > + ((I40E_AQC_SET_RSS_LUT_TABLE_TYPE_PF << > + I40E_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT) & > + I40E_AQC_SET_RSS_LUT_TABLE_TYPE_MASK)); > + else > + cmd_resp->flags |= CPU_TO_LE16((u16) > + ((I40E_AQC_SET_RSS_LUT_TABLE_TYPE_VSI << > + I40E_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT) & > + I40E_AQC_SET_RSS_LUT_TABLE_TYPE_MASK)); > + > + cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_WORD((u64)lut)); > + cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)lut)); > + > + status = i40e_asq_send_command(hw, &desc, lut, lut_size, NULL); > + > + return status; > +} > + > +/** > + * i40e_aq_get_rss_lut > + * @hw: pointer to the hardware structure > + * @vsi_id: vsi fw index > + * @pf_lut: for PF table set TRUE, for VSI table set FALSE > + * @lut: pointer to the lut buffer provided by the caller > + * @lut_size: size of the lut buffer > + * > + * get the RSS lookup table, PF or VSI type > + **/ > +enum i40e_status_code i40e_aq_get_rss_lut(struct i40e_hw *hw, u16 vsi_id, > + bool pf_lut, u8 *lut, u16 lut_size) > +{ > + return i40e_aq_get_set_rss_lut(hw, vsi_id, pf_lut, lut, lut_size, > + FALSE); > +} > + > +/** > + * i40e_aq_set_rss_lut > + * @hw: pointer to the hardware structure > + * @vsi_id: vsi fw index > + * @pf_lut: for PF table set TRUE, for VSI table set FALSE > + * @lut: pointer to the lut buffer provided by the caller > + * @lut_size: size of the lut buffer > + * > + * set the RSS lookup table, PF or VSI type > + **/ > +enum i40e_status_code i40e_aq_set_rss_lut(struct i40e_hw *hw, u16 vsi_id, > + bool pf_lut, u8 *lut, u16 lut_size) > +{ > + return i40e_aq_get_set_rss_lut(hw, vsi_id, pf_lut, lut, lut_size, TRUE); > +} > + > +/** > + * i40e_aq_get_set_rss_key > + * @hw: pointer to the hw struct > + * @vsi_id: vsi fw index > + * @key: pointer to key info struct > + * @set: set TRUE to set the key, FALSE to get the key > + * > + * get the RSS key per VSI > + **/ > +static enum i40e_status_code i40e_aq_get_set_rss_key(struct i40e_hw *hw, > + u16 vsi_id, > + struct i40e_aqc_get_set_rss_key_data *key, > + bool set) > +{ > + enum i40e_status_code status; > + struct i40e_aq_desc desc; > + struct i40e_aqc_get_set_rss_key *cmd_resp = > + (struct i40e_aqc_get_set_rss_key *)&desc.params.raw; > + u16 key_size = sizeof(struct i40e_aqc_get_set_rss_key_data); > + > + if (set) > + i40e_fill_default_direct_cmd_desc(&desc, > + i40e_aqc_opc_set_rss_key); > + else > + i40e_fill_default_direct_cmd_desc(&desc, > + i40e_aqc_opc_get_rss_key); > + > + /* Indirect command */ > + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); > + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); > + > + cmd_resp->vsi_id = > + CPU_TO_LE16((u16)((vsi_id << > + I40E_AQC_SET_RSS_KEY_VSI_ID_SHIFT) & > + I40E_AQC_SET_RSS_KEY_VSI_ID_MASK)); > + cmd_resp->vsi_id |= CPU_TO_LE16((u16)I40E_AQC_SET_RSS_KEY_VSI_VALID); > + cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_WORD((u64)key)); > + cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)key)); > + > + status = i40e_asq_send_command(hw, &desc, key, key_size, NULL); > + > + return status; > +} > + > +/** > + * i40e_aq_get_rss_key > + * @hw: pointer to the hw struct > + * @vsi_id: vsi fw index > + * @key: pointer to key info struct > + * > + **/ > +enum i40e_status_code i40e_aq_get_rss_key(struct i40e_hw *hw, > + u16 vsi_id, > + struct i40e_aqc_get_set_rss_key_data *key) > +{ > + return i40e_aq_get_set_rss_key(hw, vsi_id, key, FALSE); > +} > + > +/** > + * i40e_aq_set_rss_key > + * @hw: pointer to the hw struct > + * @vsi_id: vsi fw index > + * @key: pointer to key info struct > + * > + * set the RSS key per VSI > + **/ > +enum i40e_status_code i40e_aq_set_rss_key(struct i40e_hw *hw, > + u16 vsi_id, > + struct i40e_aqc_get_set_rss_key_data *key) > +{ > + return i40e_aq_get_set_rss_key(hw, vsi_id, key, TRUE); > +} > +#endif /* X722_SUPPORT */ > > /* The i40e_ptype_lookup table is used to convert from the 8-bit ptype in the > * hardware to a bit-field that can be used by SW to more easily determine the > @@ -598,6 +988,9 @@ enum i40e_status_code i40e_init_shared_c > > switch (hw->mac.type) { > case I40E_MAC_XL710: > +#ifdef X722_SUPPORT > + case I40E_MAC_X722: > +#endif > break; > default: > return I40E_ERR_DEVICE_NOT_SUPPORTED; > @@ -888,7 +1281,7 @@ enum i40e_status_code i40e_pf_reset(stru > grst_del = (rd32(hw, I40E_GLGEN_RSTCTL) & > I40E_GLGEN_RSTCTL_GRSTDEL_MASK) >> > I40E_GLGEN_RSTCTL_GRSTDEL_SHIFT; > - for (cnt = 0; cnt < grst_del + 2; cnt++) { > + for (cnt = 0; cnt < grst_del + 10; cnt++) { > reg = rd32(hw, I40E_GLGEN_RSTAT); > if (!(reg & I40E_GLGEN_RSTAT_DEVSTATE_MASK)) > break; > @@ -1108,9 +1501,11 @@ u32 i40e_led_get(struct i40e_hw *hw) > if (!gpio_val) > continue; > > - /* ignore gpio LED src mode entries related to the activity LEDs */ > - current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) >> > - I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); > + /* ignore gpio LED src mode entries related to the activity > + * LEDs > + */ > + current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) > + >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); > switch (current_mode) { > case I40E_COMBINED_ACTIVITY: > case I40E_FILTER_ACTIVITY: > @@ -1154,9 +1549,11 @@ void i40e_led_set(struct i40e_hw *hw, u3 > if (!gpio_val) > continue; > > - /* ignore gpio LED src mode entries related to the activity LEDs */ > - current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) >> > - I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); > + /* ignore gpio LED src mode entries related to the activity > + * LEDs > + */ > + current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) > + >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); > switch (current_mode) { > case I40E_COMBINED_ACTIVITY: > case I40E_FILTER_ACTIVITY: > @@ -1175,9 +1572,9 @@ void i40e_led_set(struct i40e_hw *hw, u3 > blink = FALSE; > > if (blink) > - gpio_val |= (1 << I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); > + gpio_val |= BIT(I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); > else > - gpio_val &= ~(1 << I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); > + gpio_val &= ~BIT(I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); > > wr32(hw, I40E_GLGEN_GPIO_CTL(i), gpio_val); > break; > @@ -1329,14 +1726,14 @@ enum i40e_status_code i40e_set_fc(struct > *aq_failures |= I40E_SET_FC_AQ_FAIL_SET; > } > /* Update the link info */ > - status = i40e_aq_get_link_info(hw, TRUE, NULL, NULL); > + status = i40e_update_link_info(hw); > if (status) { > /* Wait a little bit (on 40G cards it sometimes takes a really > * long time for link to come back from the atomic reset) > * and try once more > */ > i40e_msec_delay(1000); > - status = i40e_aq_get_link_info(hw, TRUE, NULL, NULL); > + status = i40e_update_link_info(hw); > } > if (status) > *aq_failures |= I40E_SET_FC_AQ_FAIL_UPDATE; > @@ -1525,7 +1922,6 @@ aq_get_link_info_exit: > return status; > } > > - > /** > * i40e_aq_set_phy_int_mask > * @hw: pointer to the hw struct > @@ -1837,6 +2233,74 @@ enum i40e_status_code i40e_aq_set_vsi_mu > } > > /** > + * i40e_aq_set_vsi_mc_promisc_on_vlan > + * @hw: pointer to the hw struct > + * @seid: vsi number > + * @enable: set MAC L2 layer unicast promiscuous enable/disable for a given VLAN > + * @vid: The VLAN tag filter - capture any multicast packet with this VLAN tag > + * @cmd_details: pointer to command details structure or NULL > + **/ > +enum i40e_status_code i40e_aq_set_vsi_mc_promisc_on_vlan(struct i40e_hw *hw, > + u16 seid, bool enable, u16 vid, > + struct i40e_asq_cmd_details *cmd_details) > +{ > + struct i40e_aq_desc desc; > + struct i40e_aqc_set_vsi_promiscuous_modes *cmd = > + (struct i40e_aqc_set_vsi_promiscuous_modes *)&desc.params.raw; > + enum i40e_status_code status; > + u16 flags = 0; > + > + i40e_fill_default_direct_cmd_desc(&desc, > + i40e_aqc_opc_set_vsi_promiscuous_modes); > + > + if (enable) > + flags |= I40E_AQC_SET_VSI_PROMISC_MULTICAST; > + > + cmd->promiscuous_flags = CPU_TO_LE16(flags); > + cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_MULTICAST); > + cmd->seid = CPU_TO_LE16(seid); > + cmd->vlan_tag = CPU_TO_LE16(vid | I40E_AQC_SET_VSI_VLAN_VALID); > + > + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); > + > + return status; > +} > + > +/** > + * i40e_aq_set_vsi_uc_promisc_on_vlan > + * @hw: pointer to the hw struct > + * @seid: vsi number > + * @enable: set MAC L2 layer unicast promiscuous enable/disable for a given VLAN > + * @vid: The VLAN tag filter - capture any unicast packet with this VLAN tag > + * @cmd_details: pointer to command details structure or NULL > + **/ > +enum i40e_status_code i40e_aq_set_vsi_uc_promisc_on_vlan(struct i40e_hw *hw, > + u16 seid, bool enable, u16 vid, > + struct i40e_asq_cmd_details *cmd_details) > +{ > + struct i40e_aq_desc desc; > + struct i40e_aqc_set_vsi_promiscuous_modes *cmd = > + (struct i40e_aqc_set_vsi_promiscuous_modes *)&desc.params.raw; > + enum i40e_status_code status; > + u16 flags = 0; > + > + i40e_fill_default_direct_cmd_desc(&desc, > + i40e_aqc_opc_set_vsi_promiscuous_modes); > + > + if (enable) > + flags |= I40E_AQC_SET_VSI_PROMISC_UNICAST; > + > + cmd->promiscuous_flags = CPU_TO_LE16(flags); > + cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_UNICAST); > + cmd->seid = CPU_TO_LE16(seid); > + cmd->vlan_tag = CPU_TO_LE16(vid | I40E_AQC_SET_VSI_VLAN_VALID); > + > + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); > + > + return status; > +} > + > +/** > * i40e_aq_set_vsi_broadcast > * @hw: pointer to the hw struct > * @seid: vsi number > @@ -2067,30 +2531,56 @@ enum i40e_status_code i40e_aq_send_drive > /** > * i40e_get_link_status - get status of the HW network link > * @hw: pointer to the hw struct > + * @link_up: pointer to bool (TRUE/FALSE = linkup/linkdown) > * > - * Returns TRUE if link is up, FALSE if link is down. > + * Variable link_up TRUE if link is up, FALSE if link is down. > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 23:19:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E665D71; Fri, 5 Jun 2015 23:19:48 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 542BD1EEB; Fri, 5 Jun 2015 23:19:47 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: by wifx6 with SMTP id x6so34422514wif.0; Fri, 05 Jun 2015 16:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=1xNbOTciITc741PY8HxaooCxL+4sgHmth+48OVBmRbs=; b=k9sww2uEwA9PFVQlM7i9wTLe8i2vvPdELryx6P8u2MapES5oMHPn7VFsBVj+De0v3l Ui8hgQ1T45gbMlmSpBVld9il77+VWnvNdIFw+N1WiojJDFg3yjWAOJNRAHBeFEUVznfz cDYqWYyvt/JGBDRyuLqjN4ilmZjYZv9SUm2ox0qGj89AEi46U7IA74dCHFaLVKss8N8U 9RKX0CNqpHUaWjKxL4WZWXe9GY0ZCfzy9PFl45clQZmnN8Z8C+iPpnb2A+P2RY4/kWMY k43W7Wohk/9zz+uc97e0AHLamhBrDxTOi4yNF+7kpKY8IlW2qEYinyOMeP5Dd/30I/1Z 1AyQ== MIME-Version: 1.0 X-Received: by 10.180.91.40 with SMTP id cb8mr999148wib.64.1433546385774; Fri, 05 Jun 2015 16:19:45 -0700 (PDT) Received: by 10.194.162.8 with HTTP; Fri, 5 Jun 2015 16:19:45 -0700 (PDT) In-Reply-To: References: <201506052252.t55MqgOT000856@svn.freebsd.org> Date: Fri, 5 Jun 2015 16:19:45 -0700 Message-ID: Subject: Re: svn commit: r284049 - in head/sys: dev/ixl modules/ixl modules/ixlv From: Jack Vogel To: Adrian Chadd Cc: Jack F Vogel , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 05 Jun 2015 23:19:48 -0000 Well, you know me don't you :) Larger customers will have some kind of field engineer to contact, but if anyone here, ahem, doesn't you can work with me to get what you need. Cheers, Jack On Fri, Jun 5, 2015 at 4:07 PM, Adrian Chadd wrote: > Hi! > > Is there any public information / firmware on this? Or do we have to > have some commercial arrangement with Intel to get the updated > firmware? > > My support channel is "whoever gave me the two ixv 40g nics to test > netmap on soon" and I don't think they have firmware. :) > > Thanks, > > > > -adrian > > > On 5 June 2015 at 15:52, Jack F Vogel wrote: > > Author: jfv > > Date: Fri Jun 5 22:52:42 2015 > > New Revision: 284049 > > URL: https://svnweb.freebsd.org/changeset/base/284049 > > > > Log: > > Update SW4 to the Intel ixl/ixlv drivers. This is primarily a shared > > code update, with supporting changes in the CORE. Changes for the > extended > > media types, VF driver has virtual channel protocol changes, and some > > register use corrections. This software change should be coordinated > with > > Firmware updates to your hardware, contact your support channels for > that. > > > > MFC after: 1 week > > > > Added: > > head/sys/dev/ixl/i40e_devids.h (contents, props changed) > > Modified: > > head/sys/dev/ixl/i40e_adminq.c > > head/sys/dev/ixl/i40e_adminq.h > > head/sys/dev/ixl/i40e_adminq_cmd.h > > head/sys/dev/ixl/i40e_common.c > > head/sys/dev/ixl/i40e_hmc.c > > head/sys/dev/ixl/i40e_hmc.h > > head/sys/dev/ixl/i40e_lan_hmc.c > > head/sys/dev/ixl/i40e_nvm.c > > head/sys/dev/ixl/i40e_osdep.h > > head/sys/dev/ixl/i40e_prototype.h > > head/sys/dev/ixl/i40e_register.h > > head/sys/dev/ixl/i40e_type.h > > head/sys/dev/ixl/i40e_virtchnl.h > > head/sys/dev/ixl/if_ixl.c > > head/sys/dev/ixl/if_ixlv.c > > head/sys/dev/ixl/ixlv.h > > head/sys/dev/ixl/ixlvc.c > > head/sys/modules/ixl/Makefile > > head/sys/modules/ixlv/Makefile > > > > Modified: head/sys/dev/ixl/i40e_adminq.c > > > ============================================================================== > > --- head/sys/dev/ixl/i40e_adminq.c Fri Jun 5 21:45:35 2015 > (r284048) > > +++ head/sys/dev/ixl/i40e_adminq.c Fri Jun 5 22:52:42 2015 > (r284049) > > @@ -315,8 +315,12 @@ static enum i40e_status_code i40e_config > > wr32(hw, hw->aq.asq.tail, 0); > > > > /* set starting point */ > > - wr32(hw, hw->aq.asq.len, (hw->aq.num_asq_entries | > > - I40E_PF_ATQLEN_ATQENABLE_MASK)); > > + if (!i40e_is_vf(hw)) > > + wr32(hw, hw->aq.asq.len, (hw->aq.num_asq_entries | > > + > I40E_PF_ATQLEN_ATQENABLE_MASK)); > > + if (i40e_is_vf(hw)) > > + wr32(hw, hw->aq.asq.len, (hw->aq.num_asq_entries | > > + > I40E_VF_ATQLEN1_ATQENABLE_MASK)); > > wr32(hw, hw->aq.asq.bal, I40E_LO_DWORD(hw->aq.asq.desc_buf.pa)); > > wr32(hw, hw->aq.asq.bah, I40E_HI_DWORD(hw->aq.asq.desc_buf.pa)); > > > > @@ -344,8 +348,12 @@ static enum i40e_status_code i40e_config > > wr32(hw, hw->aq.arq.tail, 0); > > > > /* set starting point */ > > - wr32(hw, hw->aq.arq.len, (hw->aq.num_arq_entries | > > - I40E_PF_ARQLEN_ARQENABLE_MASK)); > > + if (!i40e_is_vf(hw)) > > + wr32(hw, hw->aq.arq.len, (hw->aq.num_arq_entries | > > + > I40E_PF_ARQLEN_ARQENABLE_MASK)); > > + if (i40e_is_vf(hw)) > > + wr32(hw, hw->aq.arq.len, (hw->aq.num_arq_entries | > > + > I40E_VF_ARQLEN1_ARQENABLE_MASK)); > > wr32(hw, hw->aq.arq.bal, I40E_LO_DWORD(hw->aq.arq.desc_buf.pa)); > > wr32(hw, hw->aq.arq.bah, I40E_HI_DWORD(hw->aq.arq.desc_buf.pa)); > > > > @@ -559,6 +567,7 @@ enum i40e_status_code i40e_init_adminq(s > > { > > enum i40e_status_code ret_code; > > u16 eetrack_lo, eetrack_hi; > > + u16 cfg_ptr, oem_hi, oem_lo; > > int retry = 0; > > /* verify input for valid configuration */ > > if ((hw->aq.num_arq_entries == 0) || > > @@ -619,6 +628,12 @@ enum i40e_status_code i40e_init_adminq(s > > i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_LO, &eetrack_lo); > > i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_HI, &eetrack_hi); > > hw->nvm.eetrack = (eetrack_hi << 16) | eetrack_lo; > > + i40e_read_nvm_word(hw, I40E_SR_BOOT_CONFIG_PTR, &cfg_ptr); > > + i40e_read_nvm_word(hw, (cfg_ptr + I40E_NVM_OEM_VER_OFF), > > + &oem_hi); > > + i40e_read_nvm_word(hw, (cfg_ptr + (I40E_NVM_OEM_VER_OFF + 1)), > > + &oem_lo); > > + hw->nvm.oem_ver = ((u32)oem_hi << 16) | oem_lo; > > > > if (hw->aq.api_maj_ver > I40E_FW_API_VERSION_MAJOR) { > > ret_code = I40E_ERR_FIRMWARE_API_VERSION; > > @@ -669,6 +684,9 @@ enum i40e_status_code i40e_shutdown_admi > > i40e_destroy_spinlock(&hw->aq.asq_spinlock); > > i40e_destroy_spinlock(&hw->aq.arq_spinlock); > > > > + if (hw->nvm_buff.va) > > + i40e_free_virt_mem(hw, &hw->nvm_buff); > > + > > return ret_code; > > } > > > > @@ -688,16 +706,16 @@ u16 i40e_clean_asq(struct i40e_hw *hw) > > > > desc = I40E_ADMINQ_DESC(*asq, ntc); > > details = I40E_ADMINQ_DETAILS(*asq, ntc); > > + > > while (rd32(hw, hw->aq.asq.head) != ntc) { > > i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, > > - "%s: ntc %d head %d.\n", __FUNCTION__, ntc, > > - rd32(hw, hw->aq.asq.head)); > > + "ntc %d head %d.\n", ntc, rd32(hw, > hw->aq.asq.head)); > > > > if (details->callback) { > > I40E_ADMINQ_CALLBACK cb_func = > > > (I40E_ADMINQ_CALLBACK)details->callback; > > - i40e_memcpy(&desc_cb, desc, > > - sizeof(struct i40e_aq_desc), > I40E_DMA_TO_DMA); > > + i40e_memcpy(&desc_cb, desc, sizeof(struct > i40e_aq_desc), > > + I40E_DMA_TO_DMA); > > cb_func(hw, &desc_cb); > > } > > i40e_memset(desc, 0, sizeof(*desc), I40E_DMA_MEM); > > @@ -755,6 +773,8 @@ enum i40e_status_code i40e_asq_send_comm > > u16 retval = 0; > > u32 val = 0; > > > > + hw->aq.asq_last_status = I40E_AQ_RC_OK; > > + > > val = rd32(hw, hw->aq.asq.head); > > if (val >= hw->aq.num_asq_entries) { > > i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, > > @@ -912,6 +932,11 @@ enum i40e_status_code i40e_asq_send_comm > > "AQTX: desc and buffer writeback:\n"); > > i40e_debug_aq(hw, I40E_DEBUG_AQ_COMMAND, (void *)desc, buff, > buff_size); > > > > + /* save writeback aq if requested */ > > + if (details->wb_desc) > > + i40e_memcpy(details->wb_desc, desc_on_ring, > > + sizeof(struct i40e_aq_desc), > I40E_DMA_TO_NONDMA); > > + > > /* update the error if time out occurred */ > > if ((!cmd_completed) && > > (!details->async && !details->postpone)) { > > @@ -971,7 +996,10 @@ enum i40e_status_code i40e_clean_arq_ele > > i40e_acquire_spinlock(&hw->aq.arq_spinlock); > > > > /* set next_to_use to head */ > > - ntu = (rd32(hw, hw->aq.arq.head) & I40E_PF_ARQH_ARQH_MASK); > > + if (!i40e_is_vf(hw)) > > + ntu = (rd32(hw, hw->aq.arq.head) & > I40E_PF_ARQH_ARQH_MASK); > > + if (i40e_is_vf(hw)) > > + ntu = (rd32(hw, hw->aq.arq.head) & > I40E_VF_ARQH1_ARQH_MASK); > > if (ntu == ntc) { > > /* nothing to do - shouldn't need to update ring's > values */ > > ret_code = I40E_ERR_ADMIN_QUEUE_NO_WORK; > > @@ -1040,6 +1068,19 @@ clean_arq_element_out: > > i40e_release_nvm(hw); > > hw->aq.nvm_release_on_done = FALSE; > > } > > + > > + switch (hw->nvmupd_state) { > > + case I40E_NVMUPD_STATE_INIT_WAIT: > > + hw->nvmupd_state = I40E_NVMUPD_STATE_INIT; > > + break; > > + > > + case I40E_NVMUPD_STATE_WRITE_WAIT: > > + hw->nvmupd_state = I40E_NVMUPD_STATE_WRITING; > > + break; > > + > > + default: > > + break; > > + } > > } > > > > return ret_code; > > @@ -1051,9 +1092,6 @@ void i40e_resume_aq(struct i40e_hw *hw) > > hw->aq.asq.next_to_use = 0; > > hw->aq.asq.next_to_clean = 0; > > > > -#if (I40E_VF_ATQLEN_ATQENABLE_MASK != I40E_PF_ATQLEN_ATQENABLE_MASK) > > -#error I40E_VF_ATQLEN_ATQENABLE_MASK != I40E_PF_ATQLEN_ATQENABLE_MASK > > -#endif > > i40e_config_asq_regs(hw); > > > > hw->aq.arq.next_to_use = 0; > > > > Modified: head/sys/dev/ixl/i40e_adminq.h > > > ============================================================================== > > --- head/sys/dev/ixl/i40e_adminq.h Fri Jun 5 21:45:35 2015 > (r284048) > > +++ head/sys/dev/ixl/i40e_adminq.h Fri Jun 5 22:52:42 2015 > (r284049) > > @@ -1,6 +1,6 @@ > > > /****************************************************************************** > > > > - Copyright (c) 2013-2014, Intel Corporation > > + Copyright (c) 2013-2015, Intel Corporation > > All rights reserved. > > > > Redistribution and use in source and binary forms, with or without > > @@ -77,6 +77,7 @@ struct i40e_asq_cmd_details { > > u16 flags_dis; > > bool async; > > bool postpone; > > + struct i40e_aq_desc *wb_desc; > > }; > > > > #define I40E_ADMINQ_DETAILS(R, i) \ > > > > Modified: head/sys/dev/ixl/i40e_adminq_cmd.h > > > ============================================================================== > > --- head/sys/dev/ixl/i40e_adminq_cmd.h Fri Jun 5 21:45:35 2015 > (r284048) > > +++ head/sys/dev/ixl/i40e_adminq_cmd.h Fri Jun 5 22:52:42 2015 > (r284049) > > @@ -42,7 +42,11 @@ > > */ > > > > #define I40E_FW_API_VERSION_MAJOR 0x0001 > > -#define I40E_FW_API_VERSION_MINOR 0x0002 > > +#ifdef X722_SUPPORT > > +#define I40E_FW_API_VERSION_MINOR 0x0003 > > +#else > > +#define I40E_FW_API_VERSION_MINOR 0x0004 > > +#endif > > > > struct i40e_aq_desc { > > __le16 flags; > > @@ -140,12 +144,7 @@ enum i40e_admin_queue_opc { > > i40e_aqc_opc_list_func_capabilities = 0x000A, > > i40e_aqc_opc_list_dev_capabilities = 0x000B, > > > > - i40e_aqc_opc_set_cppm_configuration = 0x0103, > > - i40e_aqc_opc_set_arp_proxy_entry = 0x0104, > > - i40e_aqc_opc_set_ns_proxy_entry = 0x0105, > > - > > /* LAA */ > > - i40e_aqc_opc_mng_laa = 0x0106, /* AQ obsolete */ > > i40e_aqc_opc_mac_address_read = 0x0107, > > i40e_aqc_opc_mac_address_write = 0x0108, > > > > @@ -240,6 +239,7 @@ enum i40e_admin_queue_opc { > > i40e_aqc_opc_nvm_update = 0x0703, > > i40e_aqc_opc_nvm_config_read = 0x0704, > > i40e_aqc_opc_nvm_config_write = 0x0705, > > + i40e_aqc_opc_oem_post_update = 0x0720, > > > > /* virtualization commands */ > > i40e_aqc_opc_send_msg_to_pf = 0x0801, > > @@ -270,7 +270,12 @@ enum i40e_admin_queue_opc { > > /* Tunnel commands */ > > i40e_aqc_opc_add_udp_tunnel = 0x0B00, > > i40e_aqc_opc_del_udp_tunnel = 0x0B01, > > - i40e_aqc_opc_tunnel_key_structure = 0x0B10, > > +#ifdef X722_SUPPORT > > + i40e_aqc_opc_set_rss_key = 0x0B02, > > + i40e_aqc_opc_set_rss_lut = 0x0B03, > > + i40e_aqc_opc_get_rss_key = 0x0B04, > > + i40e_aqc_opc_get_rss_lut = 0x0B05, > > +#endif > > > > /* Async Events */ > > i40e_aqc_opc_event_lan_overflow = 0x1001, > > @@ -282,8 +287,6 @@ enum i40e_admin_queue_opc { > > i40e_aqc_opc_oem_ocbb_initialize = 0xFE03, > > > > /* debug commands */ > > - i40e_aqc_opc_debug_get_deviceid = 0xFF00, > > - i40e_aqc_opc_debug_set_mode = 0xFF01, > > i40e_aqc_opc_debug_read_reg = 0xFF03, > > i40e_aqc_opc_debug_write_reg = 0xFF04, > > i40e_aqc_opc_debug_modify_reg = 0xFF07, > > @@ -517,7 +520,8 @@ struct i40e_aqc_mac_address_read { > > #define I40E_AQC_SAN_ADDR_VALID 0x20 > > #define I40E_AQC_PORT_ADDR_VALID 0x40 > > #define I40E_AQC_WOL_ADDR_VALID 0x80 > > -#define I40E_AQC_ADDR_VALID_MASK 0xf0 > > +#define I40E_AQC_MC_MAG_EN_VALID 0x100 > > +#define I40E_AQC_ADDR_VALID_MASK 0x1F0 > > u8 reserved[6]; > > __le32 addr_high; > > __le32 addr_low; > > @@ -540,7 +544,9 @@ struct i40e_aqc_mac_address_write { > > #define I40E_AQC_WRITE_TYPE_LAA_ONLY 0x0000 > > #define I40E_AQC_WRITE_TYPE_LAA_WOL 0x4000 > > #define I40E_AQC_WRITE_TYPE_PORT 0x8000 > > -#define I40E_AQC_WRITE_TYPE_MASK 0xc000 > > +#define I40E_AQC_WRITE_TYPE_UPDATE_MC_MAG 0xC000 > > +#define I40E_AQC_WRITE_TYPE_MASK 0xC000 > > + > > __le16 mac_sah; > > __le32 mac_sal; > > u8 reserved[8]; > > @@ -834,8 +840,16 @@ struct i40e_aqc_vsi_properties_data { > > I40E_AQ_VSI_TC_QUE_NUMBER_SHIFT) > > /* queueing option section */ > > u8 queueing_opt_flags; > > +#ifdef X722_SUPPORT > > +#define I40E_AQ_VSI_QUE_OPT_MULTICAST_UDP_ENA 0x04 > > +#define I40E_AQ_VSI_QUE_OPT_UNICAST_UDP_ENA 0x08 > > +#endif > > #define I40E_AQ_VSI_QUE_OPT_TCP_ENA 0x10 > > #define I40E_AQ_VSI_QUE_OPT_FCOE_ENA 0x20 > > +#ifdef X722_SUPPORT > > +#define I40E_AQ_VSI_QUE_OPT_RSS_LUT_PF 0x00 > > +#define I40E_AQ_VSI_QUE_OPT_RSS_LUT_VSI 0x40 > > +#endif > > u8 queueing_opt_reserved[3]; > > /* scheduler section */ > > u8 up_enable_bits; > > @@ -1076,6 +1090,7 @@ struct i40e_aqc_set_vsi_promiscuous_mode > > __le16 seid; > > #define I40E_AQC_VSI_PROM_CMD_SEID_MASK 0x3FF > > __le16 vlan_tag; > > +#define I40E_AQC_SET_VSI_VLAN_MASK 0x0FFF > > #define I40E_AQC_SET_VSI_VLAN_VALID 0x8000 > > u8 reserved[8]; > > }; > > @@ -1725,11 +1740,13 @@ struct i40e_aqc_get_link_status { > > u8 phy_type; /* i40e_aq_phy_type */ > > u8 link_speed; /* i40e_aq_link_speed */ > > u8 link_info; > > -#define I40E_AQ_LINK_UP 0x01 > > +#define I40E_AQ_LINK_UP 0x01 /* obsolete */ > > +#define I40E_AQ_LINK_UP_FUNCTION 0x01 > > #define I40E_AQ_LINK_FAULT 0x02 > > #define I40E_AQ_LINK_FAULT_TX 0x04 > > #define I40E_AQ_LINK_FAULT_RX 0x08 > > #define I40E_AQ_LINK_FAULT_REMOTE 0x10 > > +#define I40E_AQ_LINK_UP_PORT 0x20 > > #define I40E_AQ_MEDIA_AVAILABLE 0x40 > > #define I40E_AQ_SIGNAL_DETECT 0x80 > > u8 an_info; > > @@ -1891,6 +1908,26 @@ struct i40e_aqc_nvm_config_data_immediat > > > > I40E_CHECK_STRUCT_LEN(0xc, i40e_aqc_nvm_config_data_immediate_field); > > > > +/* OEM Post Update (indirect 0x0720) > > + * no command data struct used > > + */ > > + struct i40e_aqc_nvm_oem_post_update { > > +#define I40E_AQ_NVM_OEM_POST_UPDATE_EXTERNAL_DATA 0x01 > > + u8 sel_data; > > + u8 reserved[7]; > > +}; > > + > > +I40E_CHECK_STRUCT_LEN(0x8, i40e_aqc_nvm_oem_post_update); > > + > > +struct i40e_aqc_nvm_oem_post_update_buffer { > > + u8 str_len; > > + u8 dev_addr; > > + __le16 eeprom_addr; > > + u8 data[36]; > > +}; > > + > > +I40E_CHECK_STRUCT_LEN(0x28, i40e_aqc_nvm_oem_post_update_buffer); > > + > > /* Send to PF command (indirect 0x0801) id is only used by PF > > * Send to VF command (indirect 0x0802) id is only used by PF > > * Send to Peer PF command (indirect 0x0803) > > @@ -2064,12 +2101,28 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_star > > #define I40E_AQC_CEE_APP_ISCSI_MASK (0x7 << > I40E_AQC_CEE_APP_ISCSI_SHIFT) > > #define I40E_AQC_CEE_APP_FIP_SHIFT 0x8 > > #define I40E_AQC_CEE_APP_FIP_MASK (0x7 << > I40E_AQC_CEE_APP_FIP_SHIFT) > > + > > #define I40E_AQC_CEE_PG_STATUS_SHIFT 0x0 > > #define I40E_AQC_CEE_PG_STATUS_MASK (0x7 << > I40E_AQC_CEE_PG_STATUS_SHIFT) > > #define I40E_AQC_CEE_PFC_STATUS_SHIFT 0x3 > > #define I40E_AQC_CEE_PFC_STATUS_MASK (0x7 << > I40E_AQC_CEE_PFC_STATUS_SHIFT) > > #define I40E_AQC_CEE_APP_STATUS_SHIFT 0x8 > > #define I40E_AQC_CEE_APP_STATUS_MASK (0x7 << > I40E_AQC_CEE_APP_STATUS_SHIFT) > > +#define I40E_AQC_CEE_FCOE_STATUS_SHIFT 0x8 > > +#define I40E_AQC_CEE_FCOE_STATUS_MASK (0x7 << > I40E_AQC_CEE_FCOE_STATUS_SHIFT) > > +#define I40E_AQC_CEE_ISCSI_STATUS_SHIFT 0xB > > +#define I40E_AQC_CEE_ISCSI_STATUS_MASK (0x7 << > I40E_AQC_CEE_ISCSI_STATUS_SHIFT) > > +#define I40E_AQC_CEE_FIP_STATUS_SHIFT 0x10 > > +#define I40E_AQC_CEE_FIP_STATUS_MASK (0x7 << > I40E_AQC_CEE_FIP_STATUS_SHIFT) > > + > > +/* struct i40e_aqc_get_cee_dcb_cfg_v1_resp was originally defined with > > + * word boundary layout issues, which the Linux compilers silently deal > > + * with by adding padding, making the actual struct larger than > designed. > > + * However, the FW compiler for the NIC is less lenient and complains > > + * about the struct. Hence, the struct defined here has an extra byte > in > > + * fields reserved3 and reserved4 to directly acknowledge that padding, > > + * and the new length is used in the length check macro. > > + */ > > struct i40e_aqc_get_cee_dcb_cfg_v1_resp { > > u8 reserved1; > > u8 oper_num_tc; > > @@ -2077,9 +2130,9 @@ struct i40e_aqc_get_cee_dcb_cfg_v1_resp > > u8 reserved2; > > u8 oper_tc_bw[8]; > > u8 oper_pfc_en; > > - u8 reserved3; > > + u8 reserved3[2]; > > __le16 oper_app_prio; > > - u8 reserved4; > > + u8 reserved4[2]; > > __le16 tlv_status; > > }; > > > > @@ -2168,6 +2221,48 @@ struct i40e_aqc_del_udp_tunnel_completio > > }; > > > > I40E_CHECK_CMD_LENGTH(i40e_aqc_del_udp_tunnel_completion); > > +#ifdef X722_SUPPORT > > + > > +struct i40e_aqc_get_set_rss_key { > > +#define I40E_AQC_SET_RSS_KEY_VSI_VALID (0x1 << 15) > > +#define I40E_AQC_SET_RSS_KEY_VSI_ID_SHIFT 0 > > +#define I40E_AQC_SET_RSS_KEY_VSI_ID_MASK (0x3FF << \ > > + > I40E_AQC_SET_RSS_KEY_VSI_ID_SHIFT) > > + __le16 vsi_id; > > + u8 reserved[6]; > > + __le32 addr_high; > > + __le32 addr_low; > > +}; > > + > > +I40E_CHECK_CMD_LENGTH(i40e_aqc_get_set_rss_key); > > + > > +struct i40e_aqc_get_set_rss_key_data { > > + u8 standard_rss_key[0x28]; > > + u8 extended_hash_key[0xc]; > > +}; > > + > > +I40E_CHECK_STRUCT_LEN(0x34, i40e_aqc_get_set_rss_key_data); > > + > > +struct i40e_aqc_get_set_rss_lut { > > +#define I40E_AQC_SET_RSS_LUT_VSI_VALID (0x1 << 15) > > +#define I40E_AQC_SET_RSS_LUT_VSI_ID_SHIFT 0 > > +#define I40E_AQC_SET_RSS_LUT_VSI_ID_MASK (0x3FF << \ > > + > I40E_AQC_SET_RSS_LUT_VSI_ID_SHIFT) > > + __le16 vsi_id; > > +#define I40E_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT 0 > > +#define I40E_AQC_SET_RSS_LUT_TABLE_TYPE_MASK (0x1 << \ > > + > I40E_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT) > > + > > +#define I40E_AQC_SET_RSS_LUT_TABLE_TYPE_VSI 0 > > +#define I40E_AQC_SET_RSS_LUT_TABLE_TYPE_PF 1 > > + __le16 flags; > > + u8 reserved[4]; > > + __le32 addr_high; > > + __le32 addr_low; > > +}; > > + > > +I40E_CHECK_CMD_LENGTH(i40e_aqc_get_set_rss_lut); > > +#endif > > > > /* tunnel key structure 0x0B10 */ > > > > > > Modified: head/sys/dev/ixl/i40e_common.c > > > ============================================================================== > > --- head/sys/dev/ixl/i40e_common.c Fri Jun 5 21:45:35 2015 > (r284048) > > +++ head/sys/dev/ixl/i40e_common.c Fri Jun 5 22:52:42 2015 > (r284049) > > @@ -62,9 +62,24 @@ enum i40e_status_code i40e_set_mac_type( > > case I40E_DEV_ID_QSFP_B: > > case I40E_DEV_ID_QSFP_C: > > case I40E_DEV_ID_10G_BASE_T: > > + case I40E_DEV_ID_10G_BASE_T4: > > case I40E_DEV_ID_20G_KR2: > > + case I40E_DEV_ID_20G_KR2_A: > > hw->mac.type = I40E_MAC_XL710; > > break; > > +#ifdef X722_SUPPORT > > + case I40E_DEV_ID_SFP_X722: > > + case I40E_DEV_ID_1G_BASE_T_X722: > > + case I40E_DEV_ID_10G_BASE_T_X722: > > + hw->mac.type = I40E_MAC_X722; > > + break; > > +#endif > > +#ifdef X722_SUPPORT > > + case I40E_DEV_ID_X722_VF: > > + case I40E_DEV_ID_X722_VF_HV: > > + hw->mac.type = I40E_MAC_X722_VF; > > + break; > > +#endif > > case I40E_DEV_ID_VF: > > case I40E_DEV_ID_VF_HV: > > hw->mac.type = I40E_MAC_VF; > > @@ -83,6 +98,212 @@ enum i40e_status_code i40e_set_mac_type( > > } > > > > /** > > + * i40e_aq_str - convert AQ err code to a string > > + * @hw: pointer to the HW structure > > + * @aq_err: the AQ error code to convert > > + **/ > > +char *i40e_aq_str(struct i40e_hw *hw, enum i40e_admin_queue_err aq_err) > > +{ > > + switch (aq_err) { > > + case I40E_AQ_RC_OK: > > + return "OK"; > > + case I40E_AQ_RC_EPERM: > > + return "I40E_AQ_RC_EPERM"; > > + case I40E_AQ_RC_ENOENT: > > + return "I40E_AQ_RC_ENOENT"; > > + case I40E_AQ_RC_ESRCH: > > + return "I40E_AQ_RC_ESRCH"; > > + case I40E_AQ_RC_EINTR: > > + return "I40E_AQ_RC_EINTR"; > > + case I40E_AQ_RC_EIO: > > + return "I40E_AQ_RC_EIO"; > > + case I40E_AQ_RC_ENXIO: > > + return "I40E_AQ_RC_ENXIO"; > > + case I40E_AQ_RC_E2BIG: > > + return "I40E_AQ_RC_E2BIG"; > > + case I40E_AQ_RC_EAGAIN: > > + return "I40E_AQ_RC_EAGAIN"; > > + case I40E_AQ_RC_ENOMEM: > > + return "I40E_AQ_RC_ENOMEM"; > > + case I40E_AQ_RC_EACCES: > > + return "I40E_AQ_RC_EACCES"; > > + case I40E_AQ_RC_EFAULT: > > + return "I40E_AQ_RC_EFAULT"; > > + case I40E_AQ_RC_EBUSY: > > + return "I40E_AQ_RC_EBUSY"; > > + case I40E_AQ_RC_EEXIST: > > + return "I40E_AQ_RC_EEXIST"; > > + case I40E_AQ_RC_EINVAL: > > + return "I40E_AQ_RC_EINVAL"; > > + case I40E_AQ_RC_ENOTTY: > > + return "I40E_AQ_RC_ENOTTY"; > > + case I40E_AQ_RC_ENOSPC: > > + return "I40E_AQ_RC_ENOSPC"; > > + case I40E_AQ_RC_ENOSYS: > > + return "I40E_AQ_RC_ENOSYS"; > > + case I40E_AQ_RC_ERANGE: > > + return "I40E_AQ_RC_ERANGE"; > > + case I40E_AQ_RC_EFLUSHED: > > + return "I40E_AQ_RC_EFLUSHED"; > > + case I40E_AQ_RC_BAD_ADDR: > > + return "I40E_AQ_RC_BAD_ADDR"; > > + case I40E_AQ_RC_EMODE: > > + return "I40E_AQ_RC_EMODE"; > > + case I40E_AQ_RC_EFBIG: > > + return "I40E_AQ_RC_EFBIG"; > > + } > > + > > + snprintf(hw->err_str, sizeof(hw->err_str), "%d", aq_err); > > + return hw->err_str; > > +} > > + > > +/** > > + * i40e_stat_str - convert status err code to a string > > + * @hw: pointer to the HW structure > > + * @stat_err: the status error code to convert > > + **/ > > +char *i40e_stat_str(struct i40e_hw *hw, enum i40e_status_code stat_err) > > +{ > > + switch (stat_err) { > > + case I40E_SUCCESS: > > + return "OK"; > > + case I40E_ERR_NVM: > > + return "I40E_ERR_NVM"; > > + case I40E_ERR_NVM_CHECKSUM: > > + return "I40E_ERR_NVM_CHECKSUM"; > > + case I40E_ERR_PHY: > > + return "I40E_ERR_PHY"; > > + case I40E_ERR_CONFIG: > > + return "I40E_ERR_CONFIG"; > > + case I40E_ERR_PARAM: > > + return "I40E_ERR_PARAM"; > > + case I40E_ERR_MAC_TYPE: > > + return "I40E_ERR_MAC_TYPE"; > > + case I40E_ERR_UNKNOWN_PHY: > > + return "I40E_ERR_UNKNOWN_PHY"; > > + case I40E_ERR_LINK_SETUP: > > + return "I40E_ERR_LINK_SETUP"; > > + case I40E_ERR_ADAPTER_STOPPED: > > + return "I40E_ERR_ADAPTER_STOPPED"; > > + case I40E_ERR_INVALID_MAC_ADDR: > > + return "I40E_ERR_INVALID_MAC_ADDR"; > > + case I40E_ERR_DEVICE_NOT_SUPPORTED: > > + return "I40E_ERR_DEVICE_NOT_SUPPORTED"; > > + case I40E_ERR_MASTER_REQUESTS_PENDING: > > + return "I40E_ERR_MASTER_REQUESTS_PENDING"; > > + case I40E_ERR_INVALID_LINK_SETTINGS: > > + return "I40E_ERR_INVALID_LINK_SETTINGS"; > > + case I40E_ERR_AUTONEG_NOT_COMPLETE: > > + return "I40E_ERR_AUTONEG_NOT_COMPLETE"; > > + case I40E_ERR_RESET_FAILED: > > + return "I40E_ERR_RESET_FAILED"; > > + case I40E_ERR_SWFW_SYNC: > > + return "I40E_ERR_SWFW_SYNC"; > > + case I40E_ERR_NO_AVAILABLE_VSI: > > + return "I40E_ERR_NO_AVAILABLE_VSI"; > > + case I40E_ERR_NO_MEMORY: > > + return "I40E_ERR_NO_MEMORY"; > > + case I40E_ERR_BAD_PTR: > > + return "I40E_ERR_BAD_PTR"; > > + case I40E_ERR_RING_FULL: > > + return "I40E_ERR_RING_FULL"; > > + case I40E_ERR_INVALID_PD_ID: > > + return "I40E_ERR_INVALID_PD_ID"; > > + case I40E_ERR_INVALID_QP_ID: > > + return "I40E_ERR_INVALID_QP_ID"; > > + case I40E_ERR_INVALID_CQ_ID: > > + return "I40E_ERR_INVALID_CQ_ID"; > > + case I40E_ERR_INVALID_CEQ_ID: > > + return "I40E_ERR_INVALID_CEQ_ID"; > > + case I40E_ERR_INVALID_AEQ_ID: > > + return "I40E_ERR_INVALID_AEQ_ID"; > > + case I40E_ERR_INVALID_SIZE: > > + return "I40E_ERR_INVALID_SIZE"; > > + case I40E_ERR_INVALID_ARP_INDEX: > > + return "I40E_ERR_INVALID_ARP_INDEX"; > > + case I40E_ERR_INVALID_FPM_FUNC_ID: > > + return "I40E_ERR_INVALID_FPM_FUNC_ID"; > > + case I40E_ERR_QP_INVALID_MSG_SIZE: > > + return "I40E_ERR_QP_INVALID_MSG_SIZE"; > > + case I40E_ERR_QP_TOOMANY_WRS_POSTED: > > + return "I40E_ERR_QP_TOOMANY_WRS_POSTED"; > > + case I40E_ERR_INVALID_FRAG_COUNT: > > + return "I40E_ERR_INVALID_FRAG_COUNT"; > > + case I40E_ERR_QUEUE_EMPTY: > > + return "I40E_ERR_QUEUE_EMPTY"; > > + case I40E_ERR_INVALID_ALIGNMENT: > > + return "I40E_ERR_INVALID_ALIGNMENT"; > > + case I40E_ERR_FLUSHED_QUEUE: > > + return "I40E_ERR_FLUSHED_QUEUE"; > > + case I40E_ERR_INVALID_PUSH_PAGE_INDEX: > > + return "I40E_ERR_INVALID_PUSH_PAGE_INDEX"; > > + case I40E_ERR_INVALID_IMM_DATA_SIZE: > > + return "I40E_ERR_INVALID_IMM_DATA_SIZE"; > > + case I40E_ERR_TIMEOUT: > > + return "I40E_ERR_TIMEOUT"; > > + case I40E_ERR_OPCODE_MISMATCH: > > + return "I40E_ERR_OPCODE_MISMATCH"; > > + case I40E_ERR_CQP_COMPL_ERROR: > > + return "I40E_ERR_CQP_COMPL_ERROR"; > > + case I40E_ERR_INVALID_VF_ID: > > + return "I40E_ERR_INVALID_VF_ID"; > > + case I40E_ERR_INVALID_HMCFN_ID: > > + return "I40E_ERR_INVALID_HMCFN_ID"; > > + case I40E_ERR_BACKING_PAGE_ERROR: > > + return "I40E_ERR_BACKING_PAGE_ERROR"; > > + case I40E_ERR_NO_PBLCHUNKS_AVAILABLE: > > + return "I40E_ERR_NO_PBLCHUNKS_AVAILABLE"; > > + case I40E_ERR_INVALID_PBLE_INDEX: > > + return "I40E_ERR_INVALID_PBLE_INDEX"; > > + case I40E_ERR_INVALID_SD_INDEX: > > + return "I40E_ERR_INVALID_SD_INDEX"; > > + case I40E_ERR_INVALID_PAGE_DESC_INDEX: > > + return "I40E_ERR_INVALID_PAGE_DESC_INDEX"; > > + case I40E_ERR_INVALID_SD_TYPE: > > + return "I40E_ERR_INVALID_SD_TYPE"; > > + case I40E_ERR_MEMCPY_FAILED: > > + return "I40E_ERR_MEMCPY_FAILED"; > > + case I40E_ERR_INVALID_HMC_OBJ_INDEX: > > + return "I40E_ERR_INVALID_HMC_OBJ_INDEX"; > > + case I40E_ERR_INVALID_HMC_OBJ_COUNT: > > + return "I40E_ERR_INVALID_HMC_OBJ_COUNT"; > > + case I40E_ERR_INVALID_SRQ_ARM_LIMIT: > > + return "I40E_ERR_INVALID_SRQ_ARM_LIMIT"; > > + case I40E_ERR_SRQ_ENABLED: > > + return "I40E_ERR_SRQ_ENABLED"; > > + case I40E_ERR_ADMIN_QUEUE_ERROR: > > + return "I40E_ERR_ADMIN_QUEUE_ERROR"; > > + case I40E_ERR_ADMIN_QUEUE_TIMEOUT: > > + return "I40E_ERR_ADMIN_QUEUE_TIMEOUT"; > > + case I40E_ERR_BUF_TOO_SHORT: > > + return "I40E_ERR_BUF_TOO_SHORT"; > > + case I40E_ERR_ADMIN_QUEUE_FULL: > > + return "I40E_ERR_ADMIN_QUEUE_FULL"; > > + case I40E_ERR_ADMIN_QUEUE_NO_WORK: > > + return "I40E_ERR_ADMIN_QUEUE_NO_WORK"; > > + case I40E_ERR_BAD_IWARP_CQE: > > + return "I40E_ERR_BAD_IWARP_CQE"; > > + case I40E_ERR_NVM_BLANK_MODE: > > + return "I40E_ERR_NVM_BLANK_MODE"; > > + case I40E_ERR_NOT_IMPLEMENTED: > > + return "I40E_ERR_NOT_IMPLEMENTED"; > > + case I40E_ERR_PE_DOORBELL_NOT_ENABLED: > > + return "I40E_ERR_PE_DOORBELL_NOT_ENABLED"; > > + case I40E_ERR_DIAG_TEST_FAILED: > > + return "I40E_ERR_DIAG_TEST_FAILED"; > > + case I40E_ERR_NOT_READY: > > + return "I40E_ERR_NOT_READY"; > > + case I40E_NOT_SUPPORTED: > > + return "I40E_NOT_SUPPORTED"; > > + case I40E_ERR_FIRMWARE_API_VERSION: > > + return "I40E_ERR_FIRMWARE_API_VERSION"; > > + } > > + > > + snprintf(hw->err_str, sizeof(hw->err_str), "%d", stat_err); > > + return hw->err_str; > > +} > > + > > +/** > > * i40e_debug_aq > > * @hw: debug mask related to admin queue > > * @mask: debug mask > > @@ -154,9 +375,13 @@ void i40e_debug_aq(struct i40e_hw *hw, e > > bool i40e_check_asq_alive(struct i40e_hw *hw) > > { > > if (hw->aq.asq.len) > > - return !!(rd32(hw, hw->aq.asq.len) & > I40E_PF_ATQLEN_ATQENABLE_MASK); > > - else > > - return FALSE; > > + if (!i40e_is_vf(hw)) > > + return !!(rd32(hw, hw->aq.asq.len) & > > + I40E_PF_ATQLEN_ATQENABLE_MASK); > > + if (i40e_is_vf(hw)) > > + return !!(rd32(hw, hw->aq.asq.len) & > > + I40E_VF_ATQLEN1_ATQENABLE_MASK); > > + return FALSE; > > } > > > > /** > > @@ -184,6 +409,171 @@ enum i40e_status_code i40e_aq_queue_shut > > > > return status; > > } > > +#ifdef X722_SUPPORT > > + > > +/** > > + * i40e_aq_get_set_rss_lut > > + * @hw: pointer to the hardware structure > > + * @vsi_id: vsi fw index > > + * @pf_lut: for PF table set TRUE, for VSI table set FALSE > > + * @lut: pointer to the lut buffer provided by the caller > > + * @lut_size: size of the lut buffer > > + * @set: set TRUE to set the table, FALSE to get the table > > + * > > + * Internal function to get or set RSS look up table > > + **/ > > +static enum i40e_status_code i40e_aq_get_set_rss_lut(struct i40e_hw *hw, > > + u16 vsi_id, bool > pf_lut, > > + u8 *lut, u16 > lut_size, > > + bool set) > > +{ > > + enum i40e_status_code status; > > + struct i40e_aq_desc desc; > > + struct i40e_aqc_get_set_rss_lut *cmd_resp = > > + (struct i40e_aqc_get_set_rss_lut *)&desc.params.raw; > > + > > + if (set) > > + i40e_fill_default_direct_cmd_desc(&desc, > > + > i40e_aqc_opc_set_rss_lut); > > + else > > + i40e_fill_default_direct_cmd_desc(&desc, > > + > i40e_aqc_opc_get_rss_lut); > > + > > + /* Indirect command */ > > + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); > > + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); > > + > > + cmd_resp->vsi_id = > > + CPU_TO_LE16((u16)((vsi_id << > > + > I40E_AQC_SET_RSS_LUT_VSI_ID_SHIFT) & > > + > I40E_AQC_SET_RSS_LUT_VSI_ID_MASK)); > > + cmd_resp->vsi_id |= > CPU_TO_LE16((u16)I40E_AQC_SET_RSS_LUT_VSI_VALID); > > + > > + if (pf_lut) > > + cmd_resp->flags |= CPU_TO_LE16((u16) > > + > ((I40E_AQC_SET_RSS_LUT_TABLE_TYPE_PF << > > + > I40E_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT) & > > + > I40E_AQC_SET_RSS_LUT_TABLE_TYPE_MASK)); > > + else > > + cmd_resp->flags |= CPU_TO_LE16((u16) > > + > ((I40E_AQC_SET_RSS_LUT_TABLE_TYPE_VSI << > > + > I40E_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT) & > > + > I40E_AQC_SET_RSS_LUT_TABLE_TYPE_MASK)); > > + > > + cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_WORD((u64)lut)); > > + cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)lut)); > > + > > + status = i40e_asq_send_command(hw, &desc, lut, lut_size, NULL); > > + > > + return status; > > +} > > + > > +/** > > + * i40e_aq_get_rss_lut > > + * @hw: pointer to the hardware structure > > + * @vsi_id: vsi fw index > > + * @pf_lut: for PF table set TRUE, for VSI table set FALSE > > + * @lut: pointer to the lut buffer provided by the caller > > + * @lut_size: size of the lut buffer > > + * > > + * get the RSS lookup table, PF or VSI type > > + **/ > > +enum i40e_status_code i40e_aq_get_rss_lut(struct i40e_hw *hw, u16 > vsi_id, > > + bool pf_lut, u8 *lut, u16 > lut_size) > > +{ > > + return i40e_aq_get_set_rss_lut(hw, vsi_id, pf_lut, lut, lut_size, > > + FALSE); > > +} > > + > > +/** > > + * i40e_aq_set_rss_lut > > + * @hw: pointer to the hardware structure > > + * @vsi_id: vsi fw index > > + * @pf_lut: for PF table set TRUE, for VSI table set FALSE > > + * @lut: pointer to the lut buffer provided by the caller > > + * @lut_size: size of the lut buffer > > + * > > + * set the RSS lookup table, PF or VSI type > > + **/ > > +enum i40e_status_code i40e_aq_set_rss_lut(struct i40e_hw *hw, u16 > vsi_id, > > + bool pf_lut, u8 *lut, u16 > lut_size) > > +{ > > + return i40e_aq_get_set_rss_lut(hw, vsi_id, pf_lut, lut, > lut_size, TRUE); > > +} > > + > > +/** > > + * i40e_aq_get_set_rss_key > > + * @hw: pointer to the hw struct > > + * @vsi_id: vsi fw index > > + * @key: pointer to key info struct > > + * @set: set TRUE to set the key, FALSE to get the key > > + * > > + * get the RSS key per VSI > > + **/ > > +static enum i40e_status_code i40e_aq_get_set_rss_key(struct i40e_hw *hw, > > + u16 vsi_id, > > + struct > i40e_aqc_get_set_rss_key_data *key, > > + bool set) > > +{ > > + enum i40e_status_code status; > > + struct i40e_aq_desc desc; > > + struct i40e_aqc_get_set_rss_key *cmd_resp = > > + (struct i40e_aqc_get_set_rss_key > *)&desc.params.raw; > > + u16 key_size = sizeof(struct i40e_aqc_get_set_rss_key_data); > > + > > + if (set) > > + i40e_fill_default_direct_cmd_desc(&desc, > > + > i40e_aqc_opc_set_rss_key); > > + else > > + i40e_fill_default_direct_cmd_desc(&desc, > > + > i40e_aqc_opc_get_rss_key); > > + > > + /* Indirect command */ > > + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); > > + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); > > + > > + cmd_resp->vsi_id = > > + CPU_TO_LE16((u16)((vsi_id << > > + > I40E_AQC_SET_RSS_KEY_VSI_ID_SHIFT) & > > + > I40E_AQC_SET_RSS_KEY_VSI_ID_MASK)); > > + cmd_resp->vsi_id |= > CPU_TO_LE16((u16)I40E_AQC_SET_RSS_KEY_VSI_VALID); > > + cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_WORD((u64)key)); > > + cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)key)); > > + > > + status = i40e_asq_send_command(hw, &desc, key, key_size, NULL); > > + > > + return status; > > +} > > + > > +/** > > + * i40e_aq_get_rss_key > > + * @hw: pointer to the hw struct > > + * @vsi_id: vsi fw index > > + * @key: pointer to key info struct > > + * > > + **/ > > +enum i40e_status_code i40e_aq_get_rss_key(struct i40e_hw *hw, > > + u16 vsi_id, > > + struct > i40e_aqc_get_set_rss_key_data *key) > > +{ > > + return i40e_aq_get_set_rss_key(hw, vsi_id, key, FALSE); > > +} > > + > > +/** > > + * i40e_aq_set_rss_key > > + * @hw: pointer to the hw struct > > + * @vsi_id: vsi fw index > > + * @key: pointer to key info struct > > + * > > + * set the RSS key per VSI > > + **/ > > +enum i40e_status_code i40e_aq_set_rss_key(struct i40e_hw *hw, > > + u16 vsi_id, > > + struct > i40e_aqc_get_set_rss_key_data *key) > > +{ > > + return i40e_aq_get_set_rss_key(hw, vsi_id, key, TRUE); > > +} > > +#endif /* X722_SUPPORT */ > > > > /* The i40e_ptype_lookup table is used to convert from the 8-bit ptype > in the > > * hardware to a bit-field that can be used by SW to more easily > determine the > > @@ -598,6 +988,9 @@ enum i40e_status_code i40e_init_shared_c > > > > switch (hw->mac.type) { > > case I40E_MAC_XL710: > > +#ifdef X722_SUPPORT > > + case I40E_MAC_X722: > > +#endif > > break; > > default: > > return I40E_ERR_DEVICE_NOT_SUPPORTED; > > @@ -888,7 +1281,7 @@ enum i40e_status_code i40e_pf_reset(stru > > grst_del = (rd32(hw, I40E_GLGEN_RSTCTL) & > > I40E_GLGEN_RSTCTL_GRSTDEL_MASK) >> > > I40E_GLGEN_RSTCTL_GRSTDEL_SHIFT; > > - for (cnt = 0; cnt < grst_del + 2; cnt++) { > > + for (cnt = 0; cnt < grst_del + 10; cnt++) { > > reg = rd32(hw, I40E_GLGEN_RSTAT); > > if (!(reg & I40E_GLGEN_RSTAT_DEVSTATE_MASK)) > > break; > > @@ -1108,9 +1501,11 @@ u32 i40e_led_get(struct i40e_hw *hw) > > if (!gpio_val) > > continue; > > > > - /* ignore gpio LED src mode entries related to the > activity LEDs */ > > - current_mode = ((gpio_val & > I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) >> > > - I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); > > + /* ignore gpio LED src mode entries related to the > activity > > + * LEDs > > + */ > > + current_mode = ((gpio_val & > I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) > > + >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); > > switch (current_mode) { > > case I40E_COMBINED_ACTIVITY: > > case I40E_FILTER_ACTIVITY: > > @@ -1154,9 +1549,11 @@ void i40e_led_set(struct i40e_hw *hw, u3 > > if (!gpio_val) > > continue; > > > > - /* ignore gpio LED src mode entries related to the > activity LEDs */ > > - current_mode = ((gpio_val & > I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) >> > > - I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); > > + /* ignore gpio LED src mode entries related to the > activity > > + * LEDs > > + */ > > + current_mode = ((gpio_val & > I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) > > + >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); > > switch (current_mode) { > > case I40E_COMBINED_ACTIVITY: > > case I40E_FILTER_ACTIVITY: > > @@ -1175,9 +1572,9 @@ void i40e_led_set(struct i40e_hw *hw, u3 > > blink = FALSE; > > > > if (blink) > > - gpio_val |= (1 << > I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); > > + gpio_val |= > BIT(I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); > > else > > - gpio_val &= ~(1 << > I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); > > + gpio_val &= > ~BIT(I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); > > > > wr32(hw, I40E_GLGEN_GPIO_CTL(i), gpio_val); > > break; > > @@ -1329,14 +1726,14 @@ enum i40e_status_code i40e_set_fc(struct > > *aq_failures |= I40E_SET_FC_AQ_FAIL_SET; > > } > > /* Update the link info */ > > - status = i40e_aq_get_link_info(hw, TRUE, NULL, NULL); > > + status = i40e_update_link_info(hw); > > if (status) { > > /* Wait a little bit (on 40G cards it sometimes takes a > really > > * long time for link to come back from the atomic reset) > > * and try once more > > */ > > i40e_msec_delay(1000); > > - status = i40e_aq_get_link_info(hw, TRUE, NULL, NULL); > > + status = i40e_update_link_info(hw); > > } > > if (status) > > *aq_failures |= I40E_SET_FC_AQ_FAIL_UPDATE; > > @@ -1525,7 +1922,6 @@ aq_get_link_info_exit: > > return status; > > } > > > > - > > /** > > * i40e_aq_set_phy_int_mask > > * @hw: pointer to the hw struct > > @@ -1837,6 +2233,74 @@ enum i40e_status_code i40e_aq_set_vsi_mu > > } > > > > /** > > + * i40e_aq_set_vsi_mc_promisc_on_vlan > > + * @hw: pointer to the hw struct > > + * @seid: vsi number > > + * @enable: set MAC L2 layer unicast promiscuous enable/disable for a > given VLAN > > + * @vid: The VLAN tag filter - capture any multicast packet with this > VLAN tag > > + * @cmd_details: pointer to command details structure or NULL > > + **/ > > +enum i40e_status_code i40e_aq_set_vsi_mc_promisc_on_vlan(struct i40e_hw > *hw, > > + u16 seid, bool enable, u16 vid, > > + struct i40e_asq_cmd_details *cmd_details) > > +{ > > + struct i40e_aq_desc desc; > > + struct i40e_aqc_set_vsi_promiscuous_modes *cmd = > > + (struct i40e_aqc_set_vsi_promiscuous_modes > *)&desc.params.raw; > > + enum i40e_status_code status; > > + u16 flags = 0; > > + > > + i40e_fill_default_direct_cmd_desc(&desc, > > + > i40e_aqc_opc_set_vsi_promiscuous_modes); > > + > > + if (enable) > > + flags |= I40E_AQC_SET_VSI_PROMISC_MULTICAST; > > + > > + cmd->promiscuous_flags = CPU_TO_LE16(flags); > > + cmd->valid_flags = > CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_MULTICAST); > > + cmd->seid = CPU_TO_LE16(seid); > > + cmd->vlan_tag = CPU_TO_LE16(vid | I40E_AQC_SET_VSI_VLAN_VALID); > > + > > + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); > > + > > + return status; > > +} > > + > > +/** > > + * i40e_aq_set_vsi_uc_promisc_on_vlan > > + * @hw: pointer to the hw struct > > + * @seid: vsi number > > + * @enable: set MAC L2 layer unicast promiscuous enable/disable for a > given VLAN > > + * @vid: The VLAN tag filter - capture any unicast packet with this > VLAN tag > > + * @cmd_details: pointer to command details structure or NULL > > + **/ > > +enum i40e_status_code i40e_aq_set_vsi_uc_promisc_on_vlan(struct i40e_hw > *hw, > > + u16 seid, bool enable, u16 vid, > > + struct i40e_asq_cmd_details *cmd_details) > > +{ > > + struct i40e_aq_desc desc; > > + struct i40e_aqc_set_vsi_promiscuous_modes *cmd = > > + (struct i40e_aqc_set_vsi_promiscuous_modes > *)&desc.params.raw; > > + enum i40e_status_code status; > > + u16 flags = 0; > > + > > + i40e_fill_default_direct_cmd_desc(&desc, > > + > i40e_aqc_opc_set_vsi_promiscuous_modes); > > + > > + if (enable) > > + flags |= I40E_AQC_SET_VSI_PROMISC_UNICAST; > > + > > + cmd->promiscuous_flags = CPU_TO_LE16(flags); > > + cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_UNICAST); > > + cmd->seid = CPU_TO_LE16(seid); > > + cmd->vlan_tag = CPU_TO_LE16(vid | I40E_AQC_SET_VSI_VLAN_VALID); > > + > > + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); > > + > > + return status; > > +} > > + > > +/** > > * i40e_aq_set_vsi_broadcast > > * @hw: pointer to the hw struct > > * @seid: vsi number > > @@ -2067,30 +2531,56 @@ enum i40e_status_code i40e_aq_send_drive > > /** > > * i40e_get_link_status - get status of the HW network link > > * @hw: pointer to the hw struct > > + * @link_up: pointer to bool (TRUE/FALSE = linkup/linkdown) > > * > > - * Returns TRUE if link is up, FALSE if link is down. > > + * Variable link_up TRUE if link is up, FALSE if link is down. > > > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > > > From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 01:18:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48CF0F76; Sat, 6 Jun 2015 01:18:29 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 370801A87; Sat, 6 Jun 2015 01:18:29 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t561ITAp078333; Sat, 6 Jun 2015 01:18:29 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t561ITC2078332; Sat, 6 Jun 2015 01:18:29 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201506060118.t561ITC2078332@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Sat, 6 Jun 2015 01:18:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284050 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 01:18:29 -0000 Author: sjg Date: Sat Jun 6 01:18:28 2015 New Revision: 284050 URL: https://svnweb.freebsd.org/changeset/base/284050 Log: Add support for dependent options Reviewed by: imp Modified: head/share/mk/bsd.mkopt.mk Modified: head/share/mk/bsd.mkopt.mk ============================================================================== --- head/share/mk/bsd.mkopt.mk Fri Jun 5 22:52:42 2015 (r284049) +++ head/share/mk/bsd.mkopt.mk Sat Jun 6 01:18:28 2015 (r284050) @@ -70,3 +70,16 @@ MK_${var}:= no .for var in ${BROKEN_OPTIONS} MK_${var}:= no .endfor + +.for vv in ${__DEFAULT_DEPENDENT_OPTIONS} +.if defined(WITH_${vv:H}) && defined(WITHOUT_${vv:H}) +MK_${vv:H}?= no +.elif defined(WITH_${vv:H}) +MK_${vv:H}?= yes +.elif defined(WITHOUT_${vv:H}) +MK_${vv:H}?= no +.else +MK_${vv:H}?= ${MK_${vv:T}} +.endif +.endfor +.undef __DEFAULT_DEPENDENT_OPTIONS From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 06:12:15 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 458A2DE8; Sat, 6 Jun 2015 06:12:15 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32A891E23; Sat, 6 Jun 2015 06:12:15 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t566CFuQ026493; Sat, 6 Jun 2015 06:12:15 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t566CF50026492; Sat, 6 Jun 2015 06:12:15 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201506060612.t566CF50026492@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 6 Jun 2015 06:12:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284051 - head/sys/compat/linux 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 06:12:15 -0000 Author: dchagin Date: Sat Jun 6 06:12:14 2015 New Revision: 284051 URL: https://svnweb.freebsd.org/changeset/base/284051 Log: Finish r283544. In exec case properly detach threads from user space before suicide. Modified: head/sys/compat/linux/linux_emul.c Modified: head/sys/compat/linux/linux_emul.c ============================================================================== --- head/sys/compat/linux/linux_emul.c Sat Jun 6 01:18:28 2015 (r284050) +++ head/sys/compat/linux/linux_emul.c Sat Jun 6 06:12:14 2015 (r284051) @@ -219,6 +219,18 @@ void linux_proc_exec(void *arg __unused, struct proc *p, struct image_params *imgp) { struct thread *td = curthread; + struct thread *othertd; + + /* + * In a case of execing from linux binary properly detach + * other threads from the user space. + */ + if (__predict_false(SV_PROC_ABI(p) == SV_ABI_LINUX)) { + FOREACH_THREAD_IN_PROC(p, othertd) { + if (td != othertd) + (p->p_sysent->sv_thread_detach)(othertd); + } + } /* * In a case of execing to linux binary we create linux From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 09:28:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 840B35CA; Sat, 6 Jun 2015 09:28:43 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F8CB1811; Sat, 6 Jun 2015 09:28:43 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t569ShhJ020879; Sat, 6 Jun 2015 09:28:43 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t569SfjD020849; Sat, 6 Jun 2015 09:28:41 GMT (envelope-from np@FreeBSD.org) Message-Id: <201506060928.t569SfjD020849@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 6 Jun 2015 09:28:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284052 - in stable/10/sys: arm/conf conf dev/cxgbe modules modules/cxgbe/if_cxgbe powerpc/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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 09:28:43 -0000 Author: np Date: Sat Jun 6 09:28:40 2015 New Revision: 284052 URL: https://svnweb.freebsd.org/changeset/base/284052 Log: MFC r276480, r276485, r276498, r277225, r277226, r277227, r277230, r277637, and r283149 (by emaste@). r276485 is the real change here, the rest deal with the fallout of mp_ring's reliance on 64b atomics. Use the incorrectly spelled 'eigth' from struct pkthdr in this branch instead of MFC'ing r261733, which would have renamed the field of a public structure in a -STABLE branch. --- r276480: Temporarily unplug cxgbe(4) from !amd64 builds. r276485: cxgbe(4): major tx rework. a) Front load as much work as possible in if_transmit, before any driver lock or software queue has to get involved. b) Replace buf_ring with a brand new mp_ring (multiproducer ring). This is specifically for the tx multiqueue model where one of the if_transmit producer threads becomes the consumer and other producers carry on as usual. mp_ring is implemented as standalone code and it should be possible to use it in any driver with tx multiqueue. It also has: - the ability to enqueue/dequeue multiple items. This might become significant if packet batching is ever implemented. - an abdication mechanism to allow a thread to give up writing tx descriptors and have another if_transmit thread take over. A thread that's writing tx descriptors can end up doing so for an unbounded time period if a) there are other if_transmit threads continuously feeding the sofware queue, and b) the chip keeps up with whatever the thread is throwing at it. - accurate statistics about interesting events even when the stats come at the expense of additional branches/conditional code. The NIC txq lock is uncontested on the fast path at this point. I've left it there for synchronization with the control events (interface up/down, modload/unload). c) Add support for "type 1" coalescing work request in the normal NIC tx path. This work request is optimized for frames with a single item in the DMA gather list. These are very common when forwarding packets. Note that netmap tx in cxgbe already uses these "type 1" work requests. d) Do not request automatic cidx updates every 32 descriptors. Instead, request updates via bits in individual work requests (still every 32 descriptors approximately). Also, request an automatic final update when the queue idles after activity. This means NIC tx reclaim is still performed lazily but it will catch up quickly as soon as the queue idles. This seems to be the best middle ground and I'll probably do something similar for netmap tx as well. e) Implement a faster tx path for WRQs (used by TOE tx and control queues, _not_ by the normal NIC tx). Allow work requests to be written directly to the hardware descriptor ring if room is available. I will convert t4_tom and iw_cxgbe modules to this faster style gradually. r276498: cxgbe(4): remove buf_ring specific restriction on the txq size. r277225: Make cxgbe(4) buildable with the gcc in base. r277226: Allow cxgbe(4) to be built on i386. Driver attach will succeed only on a subset of i386 systems. r277227: Plug cxgbe(4) back into !powerpc && !arm builds, instead of building it on amd64 only. r277230: Build cxgbe(4) on powerpc64 too. r277637: Make sure the compiler flag to get cxgbe(4) to compile with gcc is used only when gcc is being used. This is what r277225 should have been. Added: stable/10/sys/dev/cxgbe/t4_mp_ring.c - copied, changed from r276485, head/sys/dev/cxgbe/t4_mp_ring.c stable/10/sys/dev/cxgbe/t4_mp_ring.h - copied unchanged from r276485, head/sys/dev/cxgbe/t4_mp_ring.h Modified: stable/10/sys/arm/conf/NOTES stable/10/sys/conf/NOTES stable/10/sys/conf/files stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/t4_l2t.c stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/t4_sge.c stable/10/sys/modules/Makefile stable/10/sys/modules/cxgbe/if_cxgbe/Makefile stable/10/sys/powerpc/conf/NOTES Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/NOTES ============================================================================== --- stable/10/sys/arm/conf/NOTES Sat Jun 6 06:12:14 2015 (r284051) +++ stable/10/sys/arm/conf/NOTES Sat Jun 6 09:28:40 2015 (r284052) @@ -82,6 +82,7 @@ nodevice snake_saver nodevice star_saver nodevice warp_saver +nodevice cxgbe nodevice pcii nodevice snd_cmi nodevice tnt4882 Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Sat Jun 6 06:12:14 2015 (r284051) +++ stable/10/sys/conf/NOTES Sat Jun 6 09:28:40 2015 (r284052) @@ -1907,8 +1907,8 @@ device xmphy # XaQti XMAC II # cas: Sun Cassini/Cassini+ and National Semiconductor DP83065 Saturn # cm: Arcnet SMC COM90c26 / SMC COM90c56 # (and SMC COM90c66 in '56 compatibility mode) adapters. -# cxgbe: Support for PCI express 10Gb/1Gb adapters based on the Chelsio T4 -# (Terminator 4) ASIC. +# cxgb: Chelsio T3 based 1GbE/10GbE PCIe Ethernet adapters. +# cxgbe:Chelsio T4 and T5 based 1GbE/10GbE/40GbE PCIe Ethernet adapters. # dc: Support for PCI fast ethernet adapters based on the DEC/Intel 21143 # and various workalikes including: # the ADMtek AL981 Comet and AN985 Centaur, the ASIX Electronics @@ -2057,6 +2057,7 @@ device bge # Broadcom BCM570xx Gigabit device cas # Sun Cassini/Cassini+ and NS DP83065 Saturn device cxgb # Chelsio T3 10 Gigabit Ethernet device cxgb_t3fw # Chelsio T3 10 Gigabit Ethernet firmware +device cxgbe # Chelsio T4 and T5 1GbE/10GbE/40GbE device dc # DEC/Intel 21143 and various workalikes device et # Agere ET1310 10/100/Gigabit Ethernet device fxp # Intel EtherExpress PRO/100B (82557, 82558) @@ -2085,7 +2086,6 @@ device wb # Winbond W89C840F device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') # PCI Ethernet NICs. -device cxgbe # Chelsio T4 10GbE PCIe adapter device de # DEC/Intel DC21x4x (``Tulip'') device em # Intel Pro/1000 Gigabit Ethernet device igb # Intel Pro/1000 PCIE Gigabit Ethernet Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Sat Jun 6 06:12:14 2015 (r284051) +++ stable/10/sys/conf/files Sat Jun 6 09:28:40 2015 (r284052) @@ -1135,6 +1135,8 @@ dev/cxgb/sys/uipc_mvec.c optional cxgb p compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw \ compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgbe/t4_mp_ring.c optional cxgbe pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe ${GCC_MS_EXTENSIONS}" dev/cxgbe/t4_main.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_netmap.c optional cxgbe pci \ Modified: stable/10/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/10/sys/dev/cxgbe/adapter.h Sat Jun 6 06:12:14 2015 (r284051) +++ stable/10/sys/dev/cxgbe/adapter.h Sat Jun 6 09:28:40 2015 (r284052) @@ -146,7 +146,8 @@ enum { CL_METADATA_SIZE = CACHE_LINE_SIZE, SGE_MAX_WR_NDESC = SGE_MAX_WR_LEN / EQ_ESIZE, /* max WR size in desc */ - TX_SGL_SEGS = 36, + TX_SGL_SEGS = 39, + TX_SGL_SEGS_TSO = 38, TX_WR_FLITS = SGE_MAX_WR_LEN / 8 }; @@ -266,6 +267,7 @@ struct port_info { struct timeval last_refreshed; struct port_stats stats; + u_int tx_parse_error; eventhandler_tag vlan_c; @@ -301,23 +303,9 @@ struct tx_desc { __be64 flit[8]; }; -struct tx_map { - struct mbuf *m; - bus_dmamap_t map; -}; - -/* DMA maps used for tx */ -struct tx_maps { - struct tx_map *maps; - uint32_t map_total; /* # of DMA maps */ - uint32_t map_pidx; /* next map to be used */ - uint32_t map_cidx; /* reclaimed up to this index */ - uint32_t map_avail; /* # of available maps */ -}; - struct tx_sdesc { + struct mbuf *m; /* m_nextpkt linked chain of frames */ uint8_t desc_used; /* # of hardware descriptors used by the WR */ - uint8_t credits; /* NIC txq: # of frames sent out in the WR */ }; @@ -371,16 +359,12 @@ struct sge_iq { enum { EQ_CTRL = 1, EQ_ETH = 2, -#ifdef TCP_OFFLOAD EQ_OFLD = 3, -#endif /* eq flags */ - EQ_TYPEMASK = 7, /* 3 lsbits hold the type */ - EQ_ALLOCATED = (1 << 3), /* firmware resources allocated */ - EQ_DOOMED = (1 << 4), /* about to be destroyed */ - EQ_CRFLUSHED = (1 << 5), /* expecting an update from SGE */ - EQ_STALLED = (1 << 6), /* out of hw descriptors or dmamaps */ + EQ_TYPEMASK = 0x3, /* 2 lsbits hold the type (see above) */ + EQ_ALLOCATED = (1 << 2), /* firmware resources allocated */ + EQ_ENABLED = (1 << 3), /* open for business */ }; /* Listed in order of preference. Update t4_sysctls too if you change these */ @@ -395,32 +379,25 @@ enum {DOORBELL_UDB, DOORBELL_WCWR, DOORB struct sge_eq { unsigned int flags; /* MUST be first */ unsigned int cntxt_id; /* SGE context id for the eq */ - bus_dma_tag_t desc_tag; - bus_dmamap_t desc_map; - char lockname[16]; struct mtx eq_lock; 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 */ uint16_t 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 */ + uint16_t sidx; /* index of the entry with the status page */ uint16_t cidx; /* consumer idx (desc idx) */ uint16_t pidx; /* producer idx (desc idx) */ - uint16_t pending; /* # of descriptors used since last doorbell */ + uint16_t equeqidx; /* EQUEQ last requested at this pidx */ + uint16_t dbidx; /* pidx of the most recent doorbell */ uint16_t iqid; /* iq that gets egr_update for the eq */ uint8_t tx_chan; /* tx channel used by the eq */ - struct task tx_task; - struct callout tx_callout; + volatile u_int equiq; /* EQUIQ outstanding */ - /* stats */ - - uint32_t egr_update; /* # of SGE_EGR_UPDATE notifications for eq */ - uint32_t unstalled; /* recovered from stall */ + bus_dma_tag_t desc_tag; + bus_dmamap_t desc_map; + bus_addr_t ba; /* bus address of descriptor ring */ + char lockname[16]; }; struct sw_zone_info { @@ -492,18 +469,19 @@ struct sge_fl { struct cluster_layout cll_alt; /* alternate refill zone, layout */ }; +struct mp_ring; + /* txq: SGE egress queue + what's needed for Ethernet NIC */ struct sge_txq { struct sge_eq eq; /* MUST be first */ struct ifnet *ifp; /* the interface this txq belongs to */ - bus_dma_tag_t tx_tag; /* tag for transmit buffers */ - struct buf_ring *br; /* tx buffer ring */ + struct mp_ring *r; /* tx software ring */ struct tx_sdesc *sdesc; /* KVA of software descriptor ring */ - struct mbuf *m; /* held up due to temporary resource shortage */ - - struct tx_maps txmaps; + struct sglist *gl; + __be32 cpl_ctrl0; /* for convenience */ + struct task tx_reclaim_task; /* stats for common events first */ uint64_t txcsum; /* # of times hardware assisted with checksum */ @@ -512,13 +490,12 @@ struct sge_txq { uint64_t imm_wrs; /* # of work requests with immediate data */ uint64_t sgl_wrs; /* # of work requests with direct SGL */ uint64_t txpkt_wrs; /* # of txpkt work requests (not coalesced) */ - uint64_t txpkts_wrs; /* # of coalesced tx work requests */ - uint64_t txpkts_pkts; /* # of frames in coalesced tx work requests */ + uint64_t txpkts0_wrs; /* # of type0 coalesced tx work requests */ + uint64_t txpkts1_wrs; /* # of type1 coalesced tx work requests */ + uint64_t txpkts0_pkts; /* # of frames in type0 coalesced tx WRs */ + uint64_t txpkts1_pkts; /* # of frames in type1 coalesced tx WRs */ /* stats for not-that-common events */ - - uint32_t no_dmamap; /* no DMA map to load the mbuf */ - uint32_t no_desc; /* out of hardware descriptors */ } __aligned(CACHE_LINE_SIZE); /* rxq: SGE ingress queue + SGE free list + miscellaneous items */ @@ -567,7 +544,13 @@ struct wrqe { STAILQ_ENTRY(wrqe) link; struct sge_wrq *wrq; int wr_len; - uint64_t wr[] __aligned(16); + char wr[] __aligned(16); +}; + +struct wrq_cookie { + TAILQ_ENTRY(wrq_cookie) link; + int ndesc; + int pidx; }; /* @@ -578,17 +561,32 @@ struct sge_wrq { struct sge_eq eq; /* MUST be first */ struct adapter *adapter; + struct task wrq_tx_task; + + /* Tx desc reserved but WR not "committed" yet. */ + TAILQ_HEAD(wrq_incomplete_wrs , wrq_cookie) incomplete_wrs; - /* List of WRs held up due to lack of tx descriptors */ + /* List of WRs ready to go out as soon as descriptors are available. */ STAILQ_HEAD(, wrqe) wr_list; + u_int nwr_pending; + u_int ndesc_needed; /* stats for common events first */ - uint64_t tx_wrs; /* # of tx work requests */ + uint64_t tx_wrs_direct; /* # of WRs written directly to desc ring. */ + uint64_t tx_wrs_ss; /* # of WRs copied from scratch space. */ + uint64_t tx_wrs_copied; /* # of WRs queued and copied to desc ring. */ /* stats for not-that-common events */ - uint32_t no_desc; /* out of hardware descriptors */ + /* + * Scratch space for work requests that wrap around after reaching the + * status page, and some infomation about the last WR that used it. + */ + uint16_t ss_pidx; + uint16_t ss_len; + uint8_t ss[SGE_MAX_WR_LEN]; + } __aligned(CACHE_LINE_SIZE); @@ -737,7 +735,7 @@ struct adapter { struct sge sge; int lro_timeout; - struct taskqueue *tq[NCHAN]; /* taskqueues that flush data out */ + struct taskqueue *tq[NCHAN]; /* General purpose taskqueues */ struct port_info *port[MAX_NPORTS]; uint8_t chan_map[NCHAN]; @@ -970,12 +968,11 @@ static inline int tx_resume_threshold(struct sge_eq *eq) { - return (eq->qsize / 4); + /* not quite the same as qsize / 4, but this will do. */ + return (eq->sidx / 4); } /* t4_main.c */ -void t4_tx_task(void *, int); -void t4_tx_callout(void *); int t4_os_find_pci_capability(struct adapter *, int); int t4_os_pci_save_state(struct adapter *); int t4_os_pci_restore_state(struct adapter *); @@ -1016,16 +1013,15 @@ int t4_setup_adapter_queues(struct adapt int t4_teardown_adapter_queues(struct adapter *); int t4_setup_port_queues(struct port_info *); int t4_teardown_port_queues(struct port_info *); -int t4_alloc_tx_maps(struct tx_maps *, bus_dma_tag_t, int, int); -void t4_free_tx_maps(struct tx_maps *, bus_dma_tag_t); void t4_intr_all(void *); void t4_intr(void *); void t4_intr_err(void *); void t4_intr_evt(void *); void t4_wrq_tx_locked(struct adapter *, struct sge_wrq *, struct wrqe *); -int t4_eth_tx(struct ifnet *, struct sge_txq *, struct mbuf *); void t4_update_fl_bufsize(struct ifnet *); -int can_resume_tx(struct sge_eq *); +int parse_pkt(struct mbuf **); +void *start_wrq_wr(struct sge_wrq *, int, struct wrq_cookie *); +void commit_wrq_wr(struct sge_wrq *, void *, struct wrq_cookie *); int tnl_cong(struct port_info *); /* t4_tracer.c */ Modified: stable/10/sys/dev/cxgbe/t4_l2t.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_l2t.c Sat Jun 6 06:12:14 2015 (r284051) +++ stable/10/sys/dev/cxgbe/t4_l2t.c Sat Jun 6 09:28:40 2015 (r284052) @@ -112,16 +112,15 @@ found: int t4_write_l2e(struct adapter *sc, struct l2t_entry *e, int sync) { - struct wrqe *wr; + struct wrq_cookie cookie; struct cpl_l2t_write_req *req; int idx = e->idx + sc->vres.l2t.start; mtx_assert(&e->lock, MA_OWNED); - wr = alloc_wrqe(sizeof(*req), &sc->sge.mgmtq); - if (wr == NULL) + req = start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*req), 16), &cookie); + if (req == NULL) return (ENOMEM); - req = wrtod(wr); INIT_TP_WR(req, 0); OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_L2T_WRITE_REQ, idx | @@ -131,7 +130,7 @@ t4_write_l2e(struct adapter *sc, struct req->vlan = htons(e->vlan); memcpy(req->dst_mac, e->dmac, sizeof(req->dst_mac)); - t4_wrq_tx(sc, wr); + commit_wrq_wr(&sc->sge.mgmtq, req, &cookie); if (sync && e->state != L2T_STATE_SWITCHING) e->state = L2T_STATE_SYNC_WRITE; Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Sat Jun 6 06:12:14 2015 (r284051) +++ stable/10/sys/dev/cxgbe/t4_main.c Sat Jun 6 09:28:40 2015 (r284052) @@ -36,6 +36,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #include @@ -66,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include "common/t4_regs_values.h" #include "t4_ioctl.h" #include "t4_l2t.h" +#include "t4_mp_ring.h" /* T4 bus driver interface */ static int t4_probe(device_t); @@ -377,7 +380,8 @@ static void build_medialist(struct port_ static int cxgbe_init_synchronized(struct port_info *); static int cxgbe_uninit_synchronized(struct port_info *); static int setup_intr_handlers(struct adapter *); -static void quiesce_eq(struct adapter *, struct sge_eq *); +static void quiesce_txq(struct adapter *, struct sge_txq *); +static void quiesce_wrq(struct adapter *, struct sge_wrq *); static void quiesce_iq(struct adapter *, struct sge_iq *); static void quiesce_fl(struct adapter *, struct sge_fl *); static int t4_alloc_irq(struct adapter *, struct irq *, int rid, @@ -433,7 +437,6 @@ static int sysctl_tx_rate(SYSCTL_HANDLER static int sysctl_ulprx_la(SYSCTL_HANDLER_ARGS); static int sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS); #endif -static inline void txq_start(struct ifnet *, struct sge_txq *); static uint32_t fconf_to_mode(uint32_t); static uint32_t mode_to_fconf(uint32_t); static uint32_t fspec_to_fconf(struct t4_filter_specification *); @@ -665,6 +668,14 @@ t4_attach(device_t dev) goto done; } +#if defined(__i386__) + if ((cpu_feature & CPUID_CX8) == 0) { + device_printf(dev, "64 bit atomics not available.\n"); + rc = ENOTSUP; + goto done; + } +#endif + /* Prepare the firmware for operation */ rc = prep_firmware(sc); if (rc != 0) @@ -1386,67 +1397,36 @@ cxgbe_transmit(struct ifnet *ifp, struct { struct port_info *pi = ifp->if_softc; struct adapter *sc = pi->adapter; - struct sge_txq *txq = &sc->sge.txq[pi->first_txq]; - struct buf_ring *br; + struct sge_txq *txq; + void *items[1]; int rc; M_ASSERTPKTHDR(m); + MPASS(m->m_nextpkt == NULL); /* not quite ready for this yet */ if (__predict_false(pi->link_cfg.link_ok == 0)) { m_freem(m); return (ENETDOWN); } - /* check if flowid is set */ - if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) - txq += ((m->m_pkthdr.flowid % (pi->ntxq - pi->rsrv_noflowq)) - + pi->rsrv_noflowq); - br = txq->br; - - if (TXQ_TRYLOCK(txq) == 0) { - struct sge_eq *eq = &txq->eq; - - /* - * It is possible that t4_eth_tx finishes up and releases the - * lock between the TRYLOCK above and the drbr_enqueue here. We - * need to make sure that this mbuf doesn't just sit there in - * the drbr. - */ - - rc = drbr_enqueue(ifp, br, m); - if (rc == 0 && callout_pending(&eq->tx_callout) == 0 && - !(eq->flags & EQ_DOOMED)) - callout_reset(&eq->tx_callout, 1, t4_tx_callout, eq); + rc = parse_pkt(&m); + if (__predict_false(rc != 0)) { + MPASS(m == NULL); /* was freed already */ + atomic_add_int(&pi->tx_parse_error, 1); /* rare, atomic is ok */ return (rc); } - /* - * txq->m is the mbuf that is held up due to a temporary shortage of - * resources and it should be put on the wire first. Then what's in - * drbr and finally the mbuf that was just passed in to us. - * - * Return code should indicate the fate of the mbuf that was passed in - * this time. - */ - - TXQ_LOCK_ASSERT_OWNED(txq); - if (drbr_needs_enqueue(ifp, br) || txq->m) { - - /* Queued for transmission. */ - - rc = drbr_enqueue(ifp, br, m); - m = txq->m ? txq->m : drbr_dequeue(ifp, br); - (void) t4_eth_tx(ifp, txq, m); - TXQ_UNLOCK(txq); - return (rc); - } + /* Select a txq. */ + txq = &sc->sge.txq[pi->first_txq]; + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) + txq += ((m->m_pkthdr.flowid % (pi->ntxq - pi->rsrv_noflowq)) + + pi->rsrv_noflowq); - /* Direct transmission. */ - rc = t4_eth_tx(ifp, txq, m); - if (rc != 0 && txq->m) - rc = 0; /* held, will be transmitted soon (hopefully) */ + items[0] = m; + rc = mp_ring_enqueue(txq->r, items, 1, 4096); + if (__predict_false(rc != 0)) + m_freem(m); - TXQ_UNLOCK(txq); return (rc); } @@ -1456,17 +1436,17 @@ cxgbe_qflush(struct ifnet *ifp) struct port_info *pi = ifp->if_softc; struct sge_txq *txq; int i; - struct mbuf *m; /* queues do not exist if !PORT_INIT_DONE. */ if (pi->flags & PORT_INIT_DONE) { for_each_txq(pi, i, txq) { TXQ_LOCK(txq); - m_freem(txq->m); - txq->m = NULL; - while ((m = buf_ring_dequeue_sc(txq->br)) != NULL) - m_freem(m); + txq->eq.flags &= ~EQ_ENABLED; TXQ_UNLOCK(txq); + while (!mp_ring_is_idle(txq->r)) { + mp_ring_check_drainage(txq->r, 0); + pause("qflush", 1); + } } } if_qflush(ifp); @@ -3135,7 +3115,8 @@ cxgbe_init_synchronized(struct port_info { struct adapter *sc = pi->adapter; struct ifnet *ifp = pi->ifp; - int rc = 0; + int rc = 0, i; + struct sge_txq *txq; ASSERT_SYNCHRONIZED_OP(sc); @@ -3164,6 +3145,17 @@ cxgbe_init_synchronized(struct port_info } /* + * Can't fail from this point onwards. Review cxgbe_uninit_synchronized + * if this changes. + */ + + for_each_txq(pi, i, txq) { + TXQ_LOCK(txq); + txq->eq.flags |= EQ_ENABLED; + TXQ_UNLOCK(txq); + } + + /* * The first iq of the first port to come up is used for tracing. */ if (sc->traceq < 0) { @@ -3196,7 +3188,8 @@ cxgbe_uninit_synchronized(struct port_in { struct adapter *sc = pi->adapter; struct ifnet *ifp = pi->ifp; - int rc; + int rc, i; + struct sge_txq *txq; ASSERT_SYNCHRONIZED_OP(sc); @@ -3213,6 +3206,12 @@ cxgbe_uninit_synchronized(struct port_in return (rc); } + for_each_txq(pi, i, txq) { + TXQ_LOCK(txq); + txq->eq.flags &= ~EQ_ENABLED; + TXQ_UNLOCK(txq); + } + clrbit(&sc->open_device_map, pi->port_id); PORT_LOCK(pi); ifp->if_drv_flags &= ~IFF_DRV_RUNNING; @@ -3443,15 +3442,17 @@ port_full_uninit(struct port_info *pi) if (pi->flags & PORT_INIT_DONE) { - /* Need to quiesce queues. XXX: ctrl queues? */ + /* Need to quiesce queues. */ + + quiesce_wrq(sc, &sc->sge.ctrlq[pi->port_id]); for_each_txq(pi, i, txq) { - quiesce_eq(sc, &txq->eq); + quiesce_txq(sc, txq); } #ifdef TCP_OFFLOAD for_each_ofld_txq(pi, i, ofld_txq) { - quiesce_eq(sc, &ofld_txq->eq); + quiesce_wrq(sc, ofld_txq); } #endif @@ -3476,23 +3477,39 @@ port_full_uninit(struct port_info *pi) } static void -quiesce_eq(struct adapter *sc, struct sge_eq *eq) +quiesce_txq(struct adapter *sc, struct sge_txq *txq) { - EQ_LOCK(eq); - eq->flags |= EQ_DOOMED; + struct sge_eq *eq = &txq->eq; + struct sge_qstat *spg = (void *)&eq->desc[eq->sidx]; - /* - * Wait for the response to a credit flush if one's - * pending. - */ - while (eq->flags & EQ_CRFLUSHED) - mtx_sleep(eq, &eq->eq_lock, 0, "crflush", 0); - EQ_UNLOCK(eq); + (void) sc; /* unused */ - callout_drain(&eq->tx_callout); /* XXX: iffy */ - pause("callout", 10); /* Still iffy */ +#ifdef INVARIANTS + TXQ_LOCK(txq); + MPASS((eq->flags & EQ_ENABLED) == 0); + TXQ_UNLOCK(txq); +#endif - taskqueue_drain(sc->tq[eq->tx_chan], &eq->tx_task); + /* Wait for the mp_ring to empty. */ + while (!mp_ring_is_idle(txq->r)) { + mp_ring_check_drainage(txq->r, 0); + pause("rquiesce", 1); + } + + /* Then wait for the hardware to finish. */ + while (spg->cidx != htobe16(eq->pidx)) + pause("equiesce", 1); + + /* Finally, wait for the driver to reclaim all descriptors. */ + while (eq->cidx != eq->pidx) + pause("dquiesce", 1); +} + +static void +quiesce_wrq(struct adapter *sc, struct sge_wrq *wrq) +{ + + /* XXXTX */ } static void @@ -4287,7 +4304,7 @@ cxgbe_refresh_stats(struct adapter *sc, drops = s->tx_drop; for_each_txq(pi, i, txq) - drops += txq->br->br_drops; + drops += counter_u64_fetch(txq->r->drops); ifp->if_snd.ifq_drops = drops; ifp->if_oerrors = s->tx_error_frames; @@ -4818,6 +4835,9 @@ cxgbe_sysctls(struct port_info *pi) oid = SYSCTL_ADD_NODE(ctx, children, OID_AUTO, "stats", CTLFLAG_RD, NULL, "port statistics"); children = SYSCTL_CHILDREN(oid); + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "tx_parse_error", CTLFLAG_RD, + &pi->tx_parse_error, 0, + "# of tx packets with invalid length or # of segments"); #define SYSCTL_ADD_T4_REG64(pi, name, desc, reg) \ SYSCTL_ADD_OID(ctx, children, OID_AUTO, name, \ @@ -5177,8 +5197,7 @@ sysctl_qsize_txq(SYSCTL_HANDLER_ARGS) if (rc != 0 || req->newptr == NULL) return (rc); - /* bufring size must be powerof2 */ - if (qsize < 128 || !powerof2(qsize)) + if (qsize < 128 || qsize > 65536) return (EINVAL); rc = begin_synchronized_op(sc, pi, HOLD_LOCK | SLEEP_OK | INTR_OK, @@ -6876,74 +6895,6 @@ sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS) } #endif -static inline void -txq_start(struct ifnet *ifp, struct sge_txq *txq) -{ - struct buf_ring *br; - struct mbuf *m; - - TXQ_LOCK_ASSERT_OWNED(txq); - - br = txq->br; - m = txq->m ? txq->m : drbr_dequeue(ifp, br); - if (m) - t4_eth_tx(ifp, txq, m); -} - -void -t4_tx_callout(void *arg) -{ - struct sge_eq *eq = arg; - struct adapter *sc; - - if (EQ_TRYLOCK(eq) == 0) - goto reschedule; - - if (eq->flags & EQ_STALLED && !can_resume_tx(eq)) { - EQ_UNLOCK(eq); -reschedule: - if (__predict_true(!(eq->flags && EQ_DOOMED))) - callout_schedule(&eq->tx_callout, 1); - return; - } - - EQ_LOCK_ASSERT_OWNED(eq); - - if (__predict_true((eq->flags & EQ_DOOMED) == 0)) { - - if ((eq->flags & EQ_TYPEMASK) == EQ_ETH) { - struct sge_txq *txq = arg; - struct port_info *pi = txq->ifp->if_softc; - - sc = pi->adapter; - } else { - struct sge_wrq *wrq = arg; - - sc = wrq->adapter; - } - - taskqueue_enqueue(sc->tq[eq->tx_chan], &eq->tx_task); - } - - EQ_UNLOCK(eq); -} - -void -t4_tx_task(void *arg, int count) -{ - struct sge_eq *eq = arg; - - EQ_LOCK(eq); - if ((eq->flags & EQ_TYPEMASK) == EQ_ETH) { - struct sge_txq *txq = arg; - txq_start(txq->ifp, txq); - } else { - struct sge_wrq *wrq = arg; - t4_wrq_tx_locked(wrq->adapter, wrq, NULL); - } - EQ_UNLOCK(eq); -} - static uint32_t fconf_to_mode(uint32_t fconf) { @@ -7373,9 +7324,9 @@ static int set_filter_wr(struct adapter *sc, int fidx) { struct filter_entry *f = &sc->tids.ftid_tab[fidx]; - struct wrqe *wr; struct fw_filter_wr *fwr; unsigned int ftid; + struct wrq_cookie cookie; ASSERT_SYNCHRONIZED_OP(sc); @@ -7394,12 +7345,10 @@ set_filter_wr(struct adapter *sc, int fi ftid = sc->tids.ftid_base + fidx; - wr = alloc_wrqe(sizeof(*fwr), &sc->sge.mgmtq); - if (wr == NULL) + fwr = start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*fwr), 16), &cookie); + if (fwr == NULL) return (ENOMEM); - - fwr = wrtod(wr); - bzero(fwr, sizeof (*fwr)); + bzero(fwr, sizeof(*fwr)); fwr->op_pkd = htobe32(V_FW_WR_OP(FW_FILTER_WR)); fwr->len16_pkd = htobe32(FW_LEN16(*fwr)); @@ -7468,7 +7417,7 @@ set_filter_wr(struct adapter *sc, int fi f->pending = 1; sc->tids.ftids_in_use++; - t4_wrq_tx(sc, wr); + commit_wrq_wr(&sc->sge.mgmtq, fwr, &cookie); return (0); } @@ -7476,22 +7425,21 @@ static int del_filter_wr(struct adapter *sc, int fidx) { struct filter_entry *f = &sc->tids.ftid_tab[fidx]; - struct wrqe *wr; struct fw_filter_wr *fwr; unsigned int ftid; + struct wrq_cookie cookie; ftid = sc->tids.ftid_base + fidx; - wr = alloc_wrqe(sizeof(*fwr), &sc->sge.mgmtq); - if (wr == NULL) + fwr = start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*fwr), 16), &cookie); + if (fwr == NULL) return (ENOMEM); - fwr = wrtod(wr); bzero(fwr, sizeof (*fwr)); t4_mk_filtdelwr(ftid, fwr, sc->sge.fwq.abs_id); f->pending = 1; - t4_wrq_tx(sc, wr); + commit_wrq_wr(&sc->sge.mgmtq, fwr, &cookie); return (0); } @@ -8091,6 +8039,7 @@ t4_ioctl(struct cdev *dev, unsigned long /* MAC stats */ t4_clr_port_stats(sc, pi->tx_chan); + pi->tx_parse_error = 0; if (pi->flags & PORT_INIT_DONE) { struct sge_rxq *rxq; @@ -8113,24 +8062,24 @@ t4_ioctl(struct cdev *dev, unsigned long txq->imm_wrs = 0; txq->sgl_wrs = 0; txq->txpkt_wrs = 0; - txq->txpkts_wrs = 0; - txq->txpkts_pkts = 0; - txq->br->br_drops = 0; - txq->no_dmamap = 0; - txq->no_desc = 0; + txq->txpkts0_wrs = 0; + txq->txpkts1_wrs = 0; + txq->txpkts0_pkts = 0; + txq->txpkts1_pkts = 0; + mp_ring_reset_stats(txq->r); } #ifdef TCP_OFFLOAD /* nothing to clear for each ofld_rxq */ for_each_ofld_txq(pi, i, wrq) { - wrq->tx_wrs = 0; - wrq->no_desc = 0; + wrq->tx_wrs_direct = 0; + wrq->tx_wrs_copied = 0; } #endif wrq = &sc->sge.ctrlq[pi->port_id]; - wrq->tx_wrs = 0; - wrq->no_desc = 0; + wrq->tx_wrs_direct = 0; + wrq->tx_wrs_copied = 0; } break; } Copied and modified: stable/10/sys/dev/cxgbe/t4_mp_ring.c (from r276485, head/sys/dev/cxgbe/t4_mp_ring.c) ============================================================================== --- head/sys/dev/cxgbe/t4_mp_ring.c Wed Dec 31 23:19:16 2014 (r276485, copy source) +++ stable/10/sys/dev/cxgbe/t4_mp_ring.c Sat Jun 6 09:28:40 2015 (r284052) @@ -38,6 +38,11 @@ __FBSDID("$FreeBSD$"); #include "t4_mp_ring.h" +#if defined(__i386__) +#define atomic_cmpset_acq_64 atomic_cmpset_64 +#define atomic_cmpset_rel_64 atomic_cmpset_64 +#endif + union ring_state { struct { uint16_t pidx_head; Copied: stable/10/sys/dev/cxgbe/t4_mp_ring.h (from r276485, head/sys/dev/cxgbe/t4_mp_ring.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/cxgbe/t4_mp_ring.h Sat Jun 6 09:28:40 2015 (r284052, copy of r276485, head/sys/dev/cxgbe/t4_mp_ring.h) @@ -0,0 +1,68 @@ +/*- + * Copyright (c) 2014 Chelsio Communications, Inc. + * All rights reserved. + * Written by: Navdeep Parhar + * + * 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$ + * + */ + +#ifndef __CXGBE_MP_RING_H +#define __CXGBE_MP_RING_H + +#ifndef _KERNEL +#error "no user-serviceable parts inside" +#endif + +struct mp_ring; +typedef u_int (*ring_drain_t)(struct mp_ring *, u_int, u_int); +typedef u_int (*ring_can_drain_t)(struct mp_ring *); + +struct mp_ring { + volatile uint64_t state __aligned(CACHE_LINE_SIZE); + + int size __aligned(CACHE_LINE_SIZE); + void * cookie; + struct malloc_type * mt; + ring_drain_t drain; + ring_can_drain_t can_drain; /* cheap, may be unreliable */ + counter_u64_t enqueues; + counter_u64_t drops; + counter_u64_t starts; + counter_u64_t stalls; + counter_u64_t restarts; /* recovered after stalling */ + counter_u64_t abdications; + + void * volatile items[] __aligned(CACHE_LINE_SIZE); +}; + +int mp_ring_alloc(struct mp_ring **, int, void *, ring_drain_t, + ring_can_drain_t, struct malloc_type *, int); +void mp_ring_free(struct mp_ring *); +int mp_ring_enqueue(struct mp_ring *, void **, int, int); +void mp_ring_check_drainage(struct mp_ring *, int); +void mp_ring_reset_stats(struct mp_ring *); +int mp_ring_is_idle(struct mp_ring *); + +#endif Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Sat Jun 6 06:12:14 2015 (r284051) +++ stable/10/sys/dev/cxgbe/t4_sge.c Sat Jun 6 09:28:40 2015 (r284052) @@ -35,12 +35,12 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include #include #include +#include #include #include #include @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include "common/t4_regs.h" #include "common/t4_regs_values.h" #include "common/t4_msg.h" +#include "t4_mp_ring.h" #ifdef T4_PKT_TIMESTAMP #define RX_COPY_THRESHOLD (MINCLSIZE - 8) @@ -146,19 +147,17 @@ TUNABLE_INT("hw.cxgbe.largest_rx_cluster static int safest_rx_cluster = PAGE_SIZE; TUNABLE_INT("hw.cxgbe.safest_rx_cluster", &safest_rx_cluster); -/* Used to track coalesced tx work request */ struct txpkts { - uint64_t *flitp; /* ptr to flit where next pkt should start */ - uint8_t npkt; /* # of packets in this work request */ - uint8_t nflits; /* # of flits used by this work request */ - uint16_t plen; /* total payload (sum of all packets) */ + u_int wr_type; /* type 0 or type 1 */ + u_int npkt; /* # of packets in this work request */ + u_int plen; /* total payload (sum of all packets) */ + u_int len16; /* # of 16B pieces used by this work request */ }; /* A packet's SGL. This + m_pkthdr has all info needed for tx */ struct sgl { - int nsegs; /* # of segments in the SGL, 0 means imm. tx */ - int nflits; /* # of flits needed for the SGL */ - bus_dma_segment_t seg[TX_SGL_SEGS]; + struct sglist sg; + struct sglist_seg seg[TX_SGL_SEGS]; }; static int service_iq(struct sge_iq *, int); @@ -220,26 +219,31 @@ static void find_best_refill_source(stru static void find_safe_refill_source(struct adapter *, struct sge_fl *); static void add_fl_to_sfl(struct adapter *, struct sge_fl *); -static int get_pkt_sgl(struct sge_txq *, struct mbuf **, struct sgl *, int); -static int free_pkt_sgl(struct sge_txq *, struct sgl *); -static int write_txpkt_wr(struct port_info *, struct sge_txq *, struct mbuf *, - struct sgl *); -static int add_to_txpkts(struct port_info *, struct sge_txq *, struct txpkts *, - struct mbuf *, struct sgl *); -static void write_txpkts_wr(struct sge_txq *, struct txpkts *); -static inline void write_ulp_cpl_sgl(struct port_info *, struct sge_txq *, - struct txpkts *, struct mbuf *, struct sgl *); -static int write_sgl_to_txd(struct sge_eq *, struct sgl *, caddr_t *); +static inline void get_pkt_gl(struct mbuf *, struct sglist *); +static inline u_int txpkt_len16(u_int, u_int); +static inline u_int txpkts0_len16(u_int); +static inline u_int txpkts1_len16(void); +static u_int write_txpkt_wr(struct sge_txq *, struct fw_eth_tx_pkt_wr *, + struct mbuf *, u_int); +static int try_txpkts(struct mbuf *, struct mbuf *, struct txpkts *, u_int); +static int add_to_txpkts(struct mbuf *, struct txpkts *, u_int); +static u_int write_txpkts_wr(struct sge_txq *, struct fw_eth_tx_pkts_wr *, + struct mbuf *, const struct txpkts *, u_int); +static void write_gl_to_txd(struct sge_txq *, struct mbuf *, caddr_t *, int); static inline void copy_to_txd(struct sge_eq *, caddr_t, caddr_t *, int); -static inline void ring_eq_db(struct adapter *, struct sge_eq *); -static inline int reclaimable(struct sge_eq *); -static int reclaim_tx_descs(struct sge_txq *, int, int); -static void write_eqflush_wr(struct sge_eq *); -static __be64 get_flit(bus_dma_segment_t *, int, int); +static inline void ring_eq_db(struct adapter *, struct sge_eq *, u_int); +static inline uint16_t read_hw_cidx(struct sge_eq *); +static inline u_int reclaimable_tx_desc(struct sge_eq *); +static inline u_int total_available_tx_desc(struct sge_eq *); +static u_int reclaim_tx_descs(struct sge_txq *, u_int); +static void tx_reclaim(void *, int); +static __be64 get_flit(struct sglist_seg *, int, int); static int handle_sge_egr_update(struct sge_iq *, const struct rss_header *, struct mbuf *); static int handle_fw_msg(struct sge_iq *, const struct rss_header *, struct mbuf *); +static void wrq_tx_drain(void *, int); +static void drain_wrq_wr_list(struct adapter *, struct sge_wrq *); static int sysctl_uint16(SYSCTL_HANDLER_ARGS); static int sysctl_bufsizes(SYSCTL_HANDLER_ARGS); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 10:28:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 303E7E5D; Sat, 6 Jun 2015 10:28:39 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DED915A5; Sat, 6 Jun 2015 10:28:39 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56AScoL051017; Sat, 6 Jun 2015 10:28:38 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56AScQ0051016; Sat, 6 Jun 2015 10:28:38 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201506061028.t56AScQ0051016@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 6 Jun 2015 10:28:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284053 - head/lib/libc/aarch64/gen 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 10:28:39 -0000 Author: andrew Date: Sat Jun 6 10:28:38 2015 New Revision: 284053 URL: https://svnweb.freebsd.org/changeset/base/284053 Log: Set the correct register when calling sigprocmask in longjmp. Submitted by: Patrick Wildt Obtained from: drahn@bitrig.org Modified: head/lib/libc/aarch64/gen/setjmp.S Modified: head/lib/libc/aarch64/gen/setjmp.S ============================================================================== --- head/lib/libc/aarch64/gen/setjmp.S Sat Jun 6 09:28:40 2015 (r284052) +++ head/lib/libc/aarch64/gen/setjmp.S Sat Jun 6 10:28:38 2015 (r284053) @@ -80,7 +80,7 @@ ENTRY(longjmp) str x1, [sp, #16] /* Restore the signal mask */ - mov x1, #0 /* oset */ + mov x2, #0 /* oset */ add x1, x0, #(_JB_SIGMASK * 8) /* set */ mov x0, #3 /* SIG_BLOCK */ bl sigprocmask From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 11:19:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17603697; Sat, 6 Jun 2015 11:19:22 +0000 (UTC) (envelope-from brnrd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF823104E; Sat, 6 Jun 2015 11:19:21 +0000 (UTC) (envelope-from brnrd@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56BJLqT076267; Sat, 6 Jun 2015 11:19:21 GMT (envelope-from brnrd@FreeBSD.org) Received: (from brnrd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56BJL6o076266; Sat, 6 Jun 2015 11:19:21 GMT (envelope-from brnrd@FreeBSD.org) Message-Id: <201506061119.t56BJL6o076266@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brnrd set sender to brnrd@FreeBSD.org using -f From: Bernard Spil Date: Sat, 6 Jun 2015 11:19:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284054 - head/share/misc 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 11:19:22 -0000 Author: brnrd (ports committer) Date: Sat Jun 6 11:19:21 2015 New Revision: 284054 URL: https://svnweb.freebsd.org/changeset/base/284054 Log: Add myself (brnrd / Bernard Spil) to committers docs - Add myself and vsevolod (mentor) to committers-ports.dot - Add koobs and vsevolod as mentors to committers-ports.dot Submitted by: brnrd@freebsd.org Approved by: vsevolod (mentor), koobs (mentor) Differential Revision: https://reviews.freebsd.org/D2648 Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Sat Jun 6 10:28:38 2015 (r284053) +++ head/share/misc/committers-ports.dot Sat Jun 6 11:19:21 2015 (r284054) @@ -68,6 +68,7 @@ bf [label="Brendan Fabeny\nbf@FreeBSD.or bland [label="Alexander Nedotsukov\nbland@FreeBSD.org\n2003/08/14"] bmah [label="Bruce A. Mah\nbmah@FreeBSD.org\n2000/08/23"] bofh [label="Muhammad Moinur Rahman\nbofh@FreeBSD.org\n2014/12/23"] +brnrd [label="Bernard Spil\nbrnrd@FreeBSD.org\n2015/05/24"] brix [label="Henrik Brix Andersen\nbrix@FreeBSD.org\n2007/10/31"] brooks [label="Brooks Davies\nbrooks@FreeBSD.org\n2004/05/03"] bsam [label="Boris Samorodov\nbsam@FreeBSD.org\n2006/07/20"] @@ -224,6 +225,7 @@ trociny [label="Mikolaj Golub\ntrociny@F uqs [label="Ulrich Spoerlein\nuqs@FreeBSD.org\n2012/01/19"] vd [label="Vasil Dimov\nvd@FreeBSD.org\n2006/01/19"] vg [label="Veniamin Gvozdikov\nvg@FreeBSD.org\n2013/06/11"] +vsevolod [label="Vsevolod Stakhov\nvsevolod@FreeBSD.org\n2005/07/22"] wen [label="Wen Heping\nwen@FreeBSD.org\n2010/12/13"] wg [label="William Grzybowski\nwg@FreeBSD.org\n2013/04/01"] wxs [label="Wesley Shields\nwxs@FreeBSD.org\n2008/01/03"] @@ -404,6 +406,7 @@ knu -> maho knu -> nobutaka knu -> nork +koobs -> brnrd koobs -> kami koobs -> xmj @@ -576,6 +579,8 @@ thierry -> riggs tmclaugh -> itetcu tmclaugh -> xride +vsevolod -> brnrd + wen -> cs wen -> culot wen -> pawel From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 11:42:44 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0B67962; Sat, 6 Jun 2015 11:42:44 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E02D172A; Sat, 6 Jun 2015 11:42:44 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56Bgi2k090145; Sat, 6 Jun 2015 11:42:44 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56BgiwP090144; Sat, 6 Jun 2015 11:42:44 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506061142.t56BgiwP090144@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 6 Jun 2015 11:42:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284055 - head/usr.bin/colrm 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 11:42:44 -0000 Author: bapt Date: Sat Jun 6 11:42:43 2015 New Revision: 284055 URL: https://svnweb.freebsd.org/changeset/base/284055 Log: Fix history: colrm(1) appeared in 1BSD not 3.0BSD Add Author section Obtained from: OpenBSD (change by schwarze@) Modified: head/usr.bin/colrm/colrm.1 Modified: head/usr.bin/colrm/colrm.1 ============================================================================== --- head/usr.bin/colrm/colrm.1 Sat Jun 6 11:19:21 2015 (r284054) +++ head/usr.bin/colrm/colrm.1 Sat Jun 6 11:42:43 2015 (r284055) @@ -28,7 +28,7 @@ .\" @(#)colrm.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd August 4, 2004 +.Dd June 6, 2015 .Dt COLRM 1 .Os .Sh NAME @@ -83,5 +83,10 @@ as described in .Sh HISTORY The .Nm -command appeared in -.Bx 3.0 . +utility first appeared in +.Bx 1 . +.Sh AUTHORS +.An Jeff Schriebman +wrote the original version of +.Nm +in November 1974. From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 11:55:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7681B57; Sat, 6 Jun 2015 11:55:36 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B382F1964; Sat, 6 Jun 2015 11:55:36 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56BtaWi095526; Sat, 6 Jun 2015 11:55:36 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56BtaDm095525; Sat, 6 Jun 2015 11:55:36 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506061155.t56BtaDm095525@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 6 Jun 2015 11:55:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284056 - head/usr.bin/tset 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 11:55:37 -0000 Author: bapt Date: Sat Jun 6 11:55:35 2015 New Revision: 284056 URL: https://svnweb.freebsd.org/changeset/base/284056 Log: Complete documenting the HISTORY of what remains of the 1BSD heritage Obtained from: OpenBSD (by schwarze@) Modified: head/usr.bin/tset/tset.1 Modified: head/usr.bin/tset/tset.1 ============================================================================== --- head/usr.bin/tset/tset.1 Sat Jun 6 11:42:43 2015 (r284055) +++ head/usr.bin/tset/tset.1 Sat Jun 6 11:55:35 2015 (r284056) @@ -28,7 +28,7 @@ .\" @(#)tset.1 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd June 9, 1993 +.Dd June 6, 2015 .Dt TSET 1 .Os .Sh NAME @@ -400,5 +400,22 @@ older terminal interfaces. .Sh HISTORY The .Nm -command appeared in -.Bx 3.0 . +and +.Nm reset +utilities first appeared in +.Bx 1 . +.Sh AUTHORS +.An -nosplit +The original version of +.Nm tset +was written by +.An Eric P. Allman +in October 1977, and +.Nm reset +was originally written by +.An Kurt Shoens . +The current version also contains code by +.An Zeyd M. Ben-Halim , +.An Eric S. Raymond , +and +.An Thomas E. Dickey . From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 11:58:20 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32E75CAC; Sat, 6 Jun 2015 11:58:20 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 210781972; Sat, 6 Jun 2015 11:58:20 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56BwJdF095918; Sat, 6 Jun 2015 11:58:19 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56BwJBF095917; Sat, 6 Jun 2015 11:58:19 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506061158.t56BwJBF095917@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 6 Jun 2015 11:58:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284057 - head/usr.bin/expand 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 11:58:20 -0000 Author: bapt Date: Sat Jun 6 11:58:19 2015 New Revision: 284057 URL: https://svnweb.freebsd.org/changeset/base/284057 Log: Fix history (appeared in 1BSD) Obtained from: OpenBSD (by schwarze@) Modified: head/usr.bin/expand/expand.1 Modified: head/usr.bin/expand/expand.1 ============================================================================== --- head/usr.bin/expand/expand.1 Sat Jun 6 11:55:35 2015 (r284056) +++ head/usr.bin/expand/expand.1 Sat Jun 6 11:58:19 2015 (r284057) @@ -28,7 +28,7 @@ .\" @(#)expand.1 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd October 13, 2006 +.Dd June 6, 2015 .Dt EXPAND 1 .Os .Sh NAME @@ -110,5 +110,5 @@ utilities conform to .Sh HISTORY The .Nm -command appeared in -.Bx 3.0 . +utility first appeared in +.Bx 1 . From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 12:01:36 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01099FD6; Sat, 6 Jun 2015 12:01:35 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E35C61A90; Sat, 6 Jun 2015 12:01:35 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56C1Zki097719; Sat, 6 Jun 2015 12:01:35 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56C1ZgA097718; Sat, 6 Jun 2015 12:01:35 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506061201.t56C1ZgA097718@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 6 Jun 2015 12:01:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284058 - head/usr.bin/fold 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 12:01:36 -0000 Author: bapt Date: Sat Jun 6 12:01:35 2015 New Revision: 284058 URL: https://svnweb.freebsd.org/changeset/base/284058 Log: Complete documenting the HISTORY Obtained from: OpenBSD (by schwarze@) Modified: head/usr.bin/fold/fold.1 Modified: head/usr.bin/fold/fold.1 ============================================================================== --- head/usr.bin/fold/fold.1 Sat Jun 6 11:58:19 2015 (r284057) +++ head/usr.bin/fold/fold.1 Sat Jun 6 12:01:35 2015 (r284058) @@ -28,7 +28,7 @@ .\" @(#)fold.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd December 15, 2006 +.Dd June 6, 2015 .Dt FOLD 1 .Os .Sh NAME @@ -84,6 +84,33 @@ The .Nm utility conforms to .St -p1003.1-2001 . +.Sh HISTORY +The +.Nm +utility first appeared in +.Bx 1 . +It was rewritten for +.Bx 4.3 Reno +to improve speed and modernize style. +The +.Fl b +and +.Fl s +options were added to +.Nx 1.0 +for +.St -p1003.2 +compliance. +.Sh AUTHORS +.An -nosplit +.An Bill Joy +wrote the original version of +.Nm +on June 28, 1977. +.An Kevin Ruddy +rewrote the command in 1990, and +.An J. T. Conklin +added the missing options in 1993. .Sh BUGS If underlining (see .Xr ul 1 ) From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 12:04:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB4D01A1; Sat, 6 Jun 2015 12:04:38 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D913B1BA5; Sat, 6 Jun 2015 12:04:38 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56C4cWr000663; Sat, 6 Jun 2015 12:04:38 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56C4c7m000662; Sat, 6 Jun 2015 12:04:38 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506061204.t56C4c7m000662@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 6 Jun 2015 12:04:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284059 - head/usr.bin/last 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 12:04:39 -0000 Author: bapt Date: Sat Jun 6 12:04:38 2015 New Revision: 284059 URL: https://svnweb.freebsd.org/changeset/base/284059 Log: Fix history, add AUTHORS section Obtained from: OpenBSD (by schwarze@) Modified: head/usr.bin/last/last.1 Modified: head/usr.bin/last/last.1 ============================================================================== --- head/usr.bin/last/last.1 Sat Jun 6 12:01:35 2015 (r284058) +++ head/usr.bin/last/last.1 Sat Jun 6 12:04:38 2015 (r284059) @@ -28,7 +28,7 @@ .\" @(#)last.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd January 21, 2010 +.Dd June 6, 2015 .Dt LAST 1 .Os .Sh NAME @@ -202,10 +202,15 @@ login data base .Xr ac 8 , .Xr lastlogin 8 .Sh HISTORY -A .Nm -utility appeared in -.Bx 3.0 . +utility first appeared in +.Bx 1 . +.Sh AUTHORS +.An -nosplit +The original version was written by +.An Howard P. Katseff ; +.An Keith Bostic +rewrote it in 1986/87 to add functionality and to improve code quality. .Sh BUGS If a login shell should terminate abnormally for some reason, it is likely that a logout record will not be written to the From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 12:08:11 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85ADE314; Sat, 6 Jun 2015 12:08:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72E0A1BCD; Sat, 6 Jun 2015 12:08:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56C8BeZ001207; Sat, 6 Jun 2015 12:08:11 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56C8Bml001206; Sat, 6 Jun 2015 12:08:11 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506061208.t56C8Bml001206@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 6 Jun 2015 12:08:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284060 - head/usr.bin/mkstr 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 12:08:11 -0000 Author: bapt Date: Sat Jun 6 12:08:10 2015 New Revision: 284060 URL: https://svnweb.freebsd.org/changeset/base/284060 Log: Fix HISTORY and add AUTHORS section Obtained from: OpenBSD (by schwarze@) Modified: head/usr.bin/mkstr/mkstr.1 Modified: head/usr.bin/mkstr/mkstr.1 ============================================================================== --- head/usr.bin/mkstr/mkstr.1 Sat Jun 6 12:04:38 2015 (r284059) +++ head/usr.bin/mkstr/mkstr.1 Sat Jun 6 12:08:10 2015 (r284060) @@ -28,7 +28,7 @@ .\" @(#)mkstr.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd November 1, 2002 +.Dd June 6, 2015 .Dt MKSTR 1 .Os .Sh NAME @@ -118,10 +118,16 @@ error(a1, a2, a3, a4) .Xr xstr 1 , .Xr lseek 2 .Sh HISTORY -An +The .Nm -utility appeared in -.Bx 3.0 . +utility first appeared in +.Bx 1 . +.Sh AUTHORS +.An -nosplit +.An Bill Joy +and +.An Chuck Haley , +1977. .Sh BUGS The .Nm From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 12:10:11 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C188474; Sat, 6 Jun 2015 12:10:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A3B11BF5; Sat, 6 Jun 2015 12:10:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56CABRX001584; Sat, 6 Jun 2015 12:10:11 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56CABKi001583; Sat, 6 Jun 2015 12:10:11 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506061210.t56CABKi001583@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 6 Jun 2015 12:10:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284061 - head/usr.bin/colcrt 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 12:10:11 -0000 Author: bapt Date: Sat Jun 6 12:10:10 2015 New Revision: 284061 URL: https://svnweb.freebsd.org/changeset/base/284061 Log: Fix history Modified: head/usr.bin/colcrt/colcrt.1 Modified: head/usr.bin/colcrt/colcrt.1 ============================================================================== --- head/usr.bin/colcrt/colcrt.1 Sat Jun 6 12:08:10 2015 (r284060) +++ head/usr.bin/colcrt/colcrt.1 Sat Jun 6 12:10:10 2015 (r284061) @@ -28,7 +28,7 @@ .\" @(#)colcrt.1 8.1 (Berkeley) 6/30/93 .\" $FreeBSD$ .\" -.Dd July 31, 2004 +.Dd June 6, 2015 .Dt COLCRT 1 .Os .Sh NAME @@ -93,8 +93,8 @@ tbl exum2.n \&| nroff \-ms \&| colcrt \- .Sh HISTORY The .Nm -command appeared in -.Bx 3.0 . +utility first appeared in +.Bx 1 . .Sh BUGS Should fold underlines onto blanks even with the .Sq Fl From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 12:35:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A1457BB; Sat, 6 Jun 2015 12:35:00 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 689D2120C; Sat, 6 Jun 2015 12:35:00 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56CZ0dq015866; Sat, 6 Jun 2015 12:35:00 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56CZ0LP015865; Sat, 6 Jun 2015 12:35:00 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506061235.t56CZ0LP015865@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 6 Jun 2015 12:35:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284062 - head/usr.bin/vtfontcvt 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 12:35:00 -0000 Author: bapt Date: Sat Jun 6 12:34:59 2015 New Revision: 284062 URL: https://svnweb.freebsd.org/changeset/base/284062 Log: Remove WARNS vtfontcvt builds find with clang and gcc with maximum level warning Modified: head/usr.bin/vtfontcvt/Makefile Modified: head/usr.bin/vtfontcvt/Makefile ============================================================================== --- head/usr.bin/vtfontcvt/Makefile Sat Jun 6 12:10:10 2015 (r284061) +++ head/usr.bin/vtfontcvt/Makefile Sat Jun 6 12:34:59 2015 (r284062) @@ -3,6 +3,4 @@ PROG= vtfontcvt MAN8= vtfontcvt.8 -WARNS?= 6 - .include From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 12:39:01 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6217E914; Sat, 6 Jun 2015 12:39:01 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 505741224; Sat, 6 Jun 2015 12:39:01 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56Cd1dv016452; Sat, 6 Jun 2015 12:39:01 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56Cd0U4016445; Sat, 6 Jun 2015 12:39:00 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506061239.t56Cd0U4016445@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 6 Jun 2015 12:39:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284063 - head/usr.bin/mkstr 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 12:39:01 -0000 Author: bapt Date: Sat Jun 6 12:39:00 2015 New Revision: 284063 URL: https://svnweb.freebsd.org/changeset/base/284063 Log: Make global variables static Remove WARNS from Makefile Modified: head/usr.bin/mkstr/Makefile head/usr.bin/mkstr/mkstr.c Modified: head/usr.bin/mkstr/Makefile ============================================================================== --- head/usr.bin/mkstr/Makefile Sat Jun 6 12:34:59 2015 (r284062) +++ head/usr.bin/mkstr/Makefile Sat Jun 6 12:39:00 2015 (r284063) @@ -3,6 +3,4 @@ PROG= mkstr -WARNS?= 2 - .include Modified: head/usr.bin/mkstr/mkstr.c ============================================================================== --- head/usr.bin/mkstr/mkstr.c Sat Jun 6 12:34:59 2015 (r284062) +++ head/usr.bin/mkstr/mkstr.c Sat Jun 6 12:39:00 2015 (r284063) @@ -76,8 +76,8 @@ __FBSDID("$FreeBSD$"); * existing error message file for recompilation of single routines. */ -FILE *mesgread, *mesgwrite; -char name[100], *np; +static FILE *mesgread, *mesgwrite; +static char name[100], *np; void copystr(void); int fgetNUL(char *, int, FILE *); @@ -267,7 +267,7 @@ inithash(void) #define NBUCKETS 511 -struct hash { +static struct hash { long hval; unsigned hpt; struct hash *hnext; From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 12:41:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D77D0A62; Sat, 6 Jun 2015 12:41:26 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADA951341; Sat, 6 Jun 2015 12:41:26 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56CfQ1r018514; Sat, 6 Jun 2015 12:41:26 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56CfQWU018513; Sat, 6 Jun 2015 12:41:26 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506061241.t56CfQWU018513@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 6 Jun 2015 12:41:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284064 - head/usr.bin/rup 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 12:41:26 -0000 Author: bapt Date: Sat Jun 6 12:41:25 2015 New Revision: 284064 URL: https://svnweb.freebsd.org/changeset/base/284064 Log: Bump level WARNINGS to 3 Modified: head/usr.bin/rup/Makefile Modified: head/usr.bin/rup/Makefile ============================================================================== --- head/usr.bin/rup/Makefile Sat Jun 6 12:39:00 2015 (r284063) +++ head/usr.bin/rup/Makefile Sat Jun 6 12:41:25 2015 (r284064) @@ -2,8 +2,7 @@ PROG= rup -WARNS?= 1 - +WARNS?= 3 LIBADD= rpcsvc .include From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 12:43:06 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6298FBB6; Sat, 6 Jun 2015 12:43:06 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50E171498; Sat, 6 Jun 2015 12:43:06 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56Ch6dR020681; Sat, 6 Jun 2015 12:43:06 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56Ch5Fr020678; Sat, 6 Jun 2015 12:43:05 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506061243.t56Ch5Fr020678@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 6 Jun 2015 12:43:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284065 - head/usr.bin/rsh 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 12:43:06 -0000 Author: bapt Date: Sat Jun 6 12:43:05 2015 New Revision: 284065 URL: https://svnweb.freebsd.org/changeset/base/284065 Log: Make global variables static Remove WARNS from Makefile Modified: head/usr.bin/rsh/Makefile head/usr.bin/rsh/rsh.c Modified: head/usr.bin/rsh/Makefile ============================================================================== --- head/usr.bin/rsh/Makefile Sat Jun 6 12:41:25 2015 (r284064) +++ head/usr.bin/rsh/Makefile Sat Jun 6 12:43:05 2015 (r284065) @@ -4,8 +4,6 @@ PROG= rsh CFLAGS+=-I${.CURDIR}/../../libexec/rlogind -WARNS?= 2 - BINOWN= root BINMODE=4555 Modified: head/usr.bin/rsh/rsh.c ============================================================================== --- head/usr.bin/rsh/rsh.c Sat Jun 6 12:41:25 2015 (r284064) +++ head/usr.bin/rsh/rsh.c Sat Jun 6 12:43:05 2015 (r284065) @@ -77,10 +77,10 @@ __FBSDID("$FreeBSD$"); /* * rsh - remote shell */ -int rfd2; +static int rfd2; -int family = PF_UNSPEC; -char rlogin[] = "rlogin"; +static int family = PF_UNSPEC; +static char rlogin[] = "rlogin"; void connect_timeout(int); char *copyargs(char * const *); From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 12:44:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A80F6D02; Sat, 6 Jun 2015 12:44:46 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92DE414A5; Sat, 6 Jun 2015 12:44:46 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56Cikfu020988; Sat, 6 Jun 2015 12:44:46 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56CihN9020959; Sat, 6 Jun 2015 12:44:43 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506061244.t56CihN9020959@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 6 Jun 2015 12:44: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: r284066 - in stable/10: . sbin/ifconfig share/man/man4 sys/conf sys/modules sys/modules/if_gif sys/modules/if_gre sys/modules/if_me sys/net sys/netinet 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 12:44:46 -0000 Author: ae Date: Sat Jun 6 12:44:42 2015 New Revision: 284066 URL: https://svnweb.freebsd.org/changeset/base/284066 Log: MFC r274246: Overhaul if_gre(4). Split it into two modules: if_gre(4) for GRE encapsulation and if_me(4) for minimal encapsulation within IP. gre(4) changes: * convert to if_transmit; * rework locking: protect access to softc with rmlock, protect from concurrent ioctls with sx lock; * correct interface accounting for outgoing datagramms (count only payload size); * implement generic support for using IPv6 as delivery header; * make implementation conform to the RFC 2784 and partially to RFC 2890; * add support for GRE checksums - calculate for outgoing datagramms and check for inconming datagramms; * add support for sending sequence number in GRE header; * remove support of cached routes. This fixes problem, when gre(4) doesn't work at system startup. But this also removes support for having tunnels with the same addresses for inner and outer header. * deprecate support for various GREXXX ioctls, that doesn't used in FreeBSD. Use our standard ioctls for tunnels. me(4): * implementation conform to RFC 2004; * use if_transmit; * use the same locking model as gre(4); PR: 164475 MFC r274289 (by bz): gcc requires variables to be initialised in two places. One of them is correctly used only under the same conditional though. For module builds properly check if the kernel supports INET or INET6, as otherwise various mips kernels without IPv6 support would fail to build. MFC r274964: Add ip_gre.h to ObsoleteFiles.inc. Added: stable/10/share/man/man4/me.4 - copied unchanged from r274246, head/share/man/man4/me.4 stable/10/sys/modules/if_me/ - copied from r274246, head/sys/modules/if_me/ stable/10/sys/net/if_me.c - copied, changed from r274246, head/sys/net/if_me.c stable/10/sys/netinet6/ip6_gre.c - copied, changed from r274246, head/sys/netinet6/ip6_gre.c Deleted: stable/10/sys/netinet/ip_gre.h Modified: stable/10/ObsoleteFiles.inc stable/10/sbin/ifconfig/ifgre.c stable/10/share/man/man4/Makefile stable/10/share/man/man4/gre.4 stable/10/sys/conf/NOTES stable/10/sys/conf/files stable/10/sys/modules/Makefile stable/10/sys/modules/if_gif/Makefile stable/10/sys/modules/if_gre/Makefile stable/10/sys/net/if_gre.c stable/10/sys/net/if_gre.h stable/10/sys/netinet/ip_gre.c stable/10/sys/netinet6/in6_proto.c Directory Properties: stable/10/ (props changed) stable/10/sys/gnu/dts/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Sat Jun 6 12:43:05 2015 (r284065) +++ stable/10/ObsoleteFiles.inc Sat Jun 6 12:44:42 2015 (r284066) @@ -44,6 +44,8 @@ OLD_FILES+=usr/share/man/man9/NDHASGIANT OLD_FILES+=usr/tests/sbin/mdconfig/legacy_test OLD_FILES+=usr/tests/sbin/mdconfig/mdconfig.test OLD_FILES+=usr/tests/sbin/mdconfig/run.pl +# 20141107: overhaul if_gre(4) +OLD_FILES+=usr/include/netinet/ip_gre.h # 20141028: debug files accidentally installed as directory name OLD_FILES+=usr/lib/debug/usr/lib/i18n OLD_FILES+=usr/lib/debug/usr/lib/private Modified: stable/10/sbin/ifconfig/ifgre.c ============================================================================== --- stable/10/sbin/ifconfig/ifgre.c Sat Jun 6 12:43:05 2015 (r284065) +++ stable/10/sbin/ifconfig/ifgre.c Sat Jun 6 12:44:42 2015 (r284066) @@ -23,52 +23,50 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif +#include +__FBSDID("$FreeBSD$"); #include #include #include #include - -#include -#include - -#include #include #include -#include #include +#include #include -#include #include -#include +#include #include -#include #include "ifconfig.h" +#define GREBITS "\020\01ENABLE_CSUM\02ENABLE_SEQ" + static void gre_status(int s); static void gre_status(int s) { - int grekey = 0; + uint32_t opts = 0; - ifr.ifr_data = (caddr_t)&grekey; + ifr.ifr_data = (caddr_t)&opts; if (ioctl(s, GREGKEY, &ifr) == 0) - if (grekey != 0) - printf("\tgrekey: %d\n", grekey); + if (opts != 0) + printf("\tgrekey: 0x%x (%u)\n", opts, opts); + opts = 0; + if (ioctl(s, GREGOPTS, &ifr) != 0 || opts == 0) + return; + printb("\toptions", opts, GREBITS); + putchar('\n'); } static void setifgrekey(const char *val, int dummy __unused, int s, const struct afswtch *afp) { - uint32_t grekey = atol(val); + uint32_t grekey = strtol(val, NULL, 0); strncpy(ifr.ifr_name, name, sizeof (ifr.ifr_name)); ifr.ifr_data = (caddr_t)&grekey; @@ -76,8 +74,35 @@ setifgrekey(const char *val, int dummy _ warn("ioctl (set grekey)"); } +static void +setifgreopts(const char *val, int d, int s, const struct afswtch *afp) +{ + uint32_t opts; + + ifr.ifr_data = (caddr_t)&opts; + if (ioctl(s, GREGOPTS, &ifr) == -1) { + warn("ioctl(GREGOPTS)"); + return; + } + + if (d < 0) + opts &= ~(-d); + else + opts |= d; + + if (ioctl(s, GRESOPTS, &ifr) == -1) { + warn("ioctl(GIFSOPTS)"); + return; + } +} + + static struct cmd gre_cmds[] = { DEF_CMD_ARG("grekey", setifgrekey), + DEF_CMD("enable_csum", GRE_ENABLE_CSUM, setifgreopts), + DEF_CMD("-enable_csum",-GRE_ENABLE_CSUM,setifgreopts), + DEF_CMD("enable_seq", GRE_ENABLE_SEQ, setifgreopts), + DEF_CMD("-enable_seq",-GRE_ENABLE_SEQ, setifgreopts), }; static struct afswtch af_gre = { .af_name = "af_gre", Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Sat Jun 6 12:43:05 2015 (r284065) +++ stable/10/share/man/man4/Makefile Sat Jun 6 12:44:42 2015 (r284066) @@ -250,6 +250,7 @@ MAN= aac.4 \ malo.4 \ mcd.4 \ md.4 \ + me.4 \ mem.4 \ meteor.4 \ mfi.4 \ Modified: stable/10/share/man/man4/gre.4 ============================================================================== --- stable/10/share/man/man4/gre.4 Sat Jun 6 12:43:05 2015 (r284065) +++ stable/10/share/man/man4/gre.4 Sat Jun 6 12:44:42 2015 (r284066) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 20, 2008 +.Dd November 7, 2014 .Dt GRE 4 .Os .Sh NAME @@ -68,163 +68,30 @@ and .Cm destroy subcommands. .Pp -This driver currently supports the following modes of operation: -.Bl -tag -width indent -.It "GRE encapsulation (IP protocol number 47)" -Encapsulated datagrams are -prepended an outer datagram and a GRE header. +This driver corresponds to RFC 2784. +Encapsulated datagrams are prepended an outer datagram and a GRE header. The GRE header specifies the type of the encapsulated datagram and thus allows for tunneling other protocols than IP like e.g.\& AppleTalk. GRE mode is also the default tunnel mode on Cisco routers. -This is also the default mode of operation of the -.Nm -interfaces. -As part of the GRE mode, .Nm also supports Cisco WCCP protocol, both version 1 and version 2. -Since there is no reliable way to distinguish between WCCP versions, it -should be configured manually using the -.Cm link2 -flag. -If the -.Cm link2 -flag is not set (default), then WCCP version 1 is selected. -.It "MOBILE encapsulation (IP protocol number 55)" -Datagrams are -encapsulated into IP, but with a shorter encapsulation. -The original -IP header is modified and the modifications are inserted between the -so modified header and the original payload. -Like -.Xr gif 4 , -only for IP-in-IP encapsulation. -.El .Pp The .Nm -interfaces support a number of -.Xr ioctl 2 Ns s , -such as: -.Bl -tag -width ".Dv GRESADDRS" -.It Dv GRESADDRS -Set the IP address of the local tunnel end. -This is the source address -set by or displayed by -.Xr ifconfig 8 -for the -.Nm -interface. -.It Dv GRESADDRD -Set the IP address of the remote tunnel end. -This is the destination address -set by or displayed by -.Xr ifconfig 8 -for the -.Nm -interface. -.It Dv GREGADDRS -Query the IP address that is set for the local tunnel end. -This is the -address the encapsulation header carries as local address (i.e., the real -address of the tunnel start point). -.It Dv GREGADDRD -Query the IP address that is set for the remote tunnel end. -This is the -address the encapsulated packets are sent to (i.e., the real address of -the remote tunnel endpoint). -.It Dv GRESPROTO -Set the operation mode to the specified IP protocol value. -The -protocol is passed to the interface in -.Po Vt "struct ifreq" Pc Ns Li -> Ns Va ifr_flags . -The operation mode can also be given as -.Pp -.Bl -tag -width ".Cm -link0" -compact -.It Cm link0 -.Dv IPPROTO_GRE -.It Cm -link0 -.Dv IPPROTO_MOBILE -.El -.Pp -to -.Xr ifconfig 8 . -.Pp -The -.Cm link1 -flag is not used to choose encapsulation, but to modify the -internal route search for the remote tunnel endpoint, see the -.Sx BUGS -section below. -.It Dv GREGPROTO -Query operation mode. -.It Dv GRESKEY +interfaces support a number of additional parameters to the +.Xr ifconfig 8 : +.Bl -tag -width "enable_csum" +.It Ar grekey Set the GRE key used for outgoing packets. A value of 0 disables the key option. -.It Dv GREGKEY -Get the GRE key currently used for outgoing packets. -0 means no outgoing key. +.It Ar enable_csum +Enables checksum calculation for outgoing packets. +.It Ar enable_seq +Enables use of sequence number field in the GRE header for outgoing packets. .El -.Pp -Note that the IP addresses of the tunnel endpoints may be the same as the -ones defined with -.Xr ifconfig 8 -for the interface (as if IP is encapsulated), but need not be, as e.g.\& when -encapsulating AppleTalk. .Sh EXAMPLES -Configuration example: -.Bd -literal -Host X-- Host A ----------------tunnel---------- Cisco D------Host E - \\ | - \\ / - +------Host B----------Host C----------+ -.Ed .Pp -On host A -.Pq Fx : -.Bd -literal -offset indent -route add default B -ifconfig greN create -ifconfig greN A D netmask 0xffffffff linkX up -ifconfig greN tunnel A D -route add E D -.Ed -.Pp -On Host D (Cisco): -.Bd -literal -offset indent -Interface TunnelX - ip unnumbered D ! e.g. address from Ethernet interface - tunnel source D ! e.g. address from Ethernet interface - tunnel destination A -ip route C -ip route A mask C -ip route X mask tunnelX -.Ed -.Pp -OR -.Pp -On Host D -.Pq Fx : -.Bd -literal -offset indent -route add default C -ifconfig greN create -ifconfig greN D A -ifconfig greN tunnel D A -.Ed -.Pp -If all goes well, you should see packets flowing ;-) -.Pp -If you want to reach Host A over the tunnel (from Host D (Cisco)), then -you have to have an alias on Host A for e.g.\& the Ethernet interface like: -.Pp -.Dl "ifconfig alias Y" -.Pp -and on the Cisco: -.Pp -.Dl "ip route Y mask tunnelX" -.Pp -A similar setup can be used to create a link between two private networks -(for example in the 192.168 subnet) over the Internet: .Bd -literal 192.168.1.* --- Router A -------tunnel-------- Router B --- 192.168.2.* \\ / @@ -239,29 +106,22 @@ Assuming router A has the (external) IP On router A: .Bd -literal -offset indent ifconfig greN create -ifconfig greN 192.168.1.1 192.168.2.1 link1 -ifconfig greN tunnel A B +ifconfig greN inet 192.168.1.1 192.168.2.1 +ifconfig greN inet tunnel A B route add -net 192.168.2 -netmask 255.255.255.0 192.168.2.1 .Ed .Pp On router B: .Bd -literal -offset indent ifconfig greN create -ifconfig greN 192.168.2.1 192.168.1.1 link1 -ifconfig greN tunnel B A +ifconfig greN inet 192.168.2.1 192.168.1.1 +ifconfig greN inet tunnel B A route add -net 192.168.1 -netmask 255.255.255.0 192.168.1.1 .Ed -.Pp -Note that this is a safe situation where the -.Cm link1 -flag (as discussed in the -.Sx BUGS -section below) may (and probably should) be set. .Sh NOTES The MTU of .Nm interfaces is set to 1476 by default, to match the value used by Cisco routers. -If grekey is set this is lowered to 1472. This may not be an optimal value, depending on the link between the two tunnel endpoints. It can be adjusted via @@ -269,25 +129,8 @@ It can be adjusted via .Pp For correct operation, the .Nm -device needs a route to the destination that is less specific than the -one over the tunnel. -(Basically, there needs to be a route to the decapsulating host that -does not run over the tunnel, as this would be a loop.) -If the addresses are ambiguous, doing the -.Nm ifconfig Cm tunnel -step before the -.Xr ifconfig 8 -call to set the -.Nm -IP addresses will help to find a route outside the tunnel. -.Pp -In order to tell -.Xr ifconfig 8 -to actually mark the interface as -.Dq up , -the keyword -.Cm up -must be given last on its command line. +device needs a route to the decapsulating host that does not run over the tunnel, +as this would be a loop. .Pp The kernel must be set to forward datagrams by setting the .Va net.inet.ip.forwarding @@ -298,41 +141,20 @@ variable to non-zero. .Xr gif 4 , .Xr inet 4 , .Xr ip 4 , +.Xr me 4 , .Xr netintro 4 , -.\" Xr options 4 , .Xr protocols 5 , .Xr ifconfig 8 , .Xr sysctl 8 .Pp -A description of GRE encapsulation can be found in RFC 1701 and RFC 1702. -.Pp -A description of MOBILE encapsulation can be found in RFC 2004. +A description of GRE encapsulation can be found in RFC 2784 and RFC 2890. .Sh AUTHORS -.An Heiko W.Rupp Aq hwr@pilhuhn.de +.An Andrey V. Elsukov Aq Mt ae@FreeBSD.org +.An Heiko W.Rupp Aq Mt hwr@pilhuhn.de .Sh BUGS -The -.Fn compute_route -code in -.Pa if_gre.c -toggles the last bit of the -IP-address to provoke the search for a less specific route than the -one directly over the tunnel to prevent loops. -This is possibly not the best solution. -.Pp -To avoid the address munging described above, turn on the -.Cm link1 -flag on the -.Xr ifconfig 8 -command line. -This implies that the GRE packet destination and the ifconfig remote host -are not the same IP addresses, and that the GRE destination does not route -over the -.Nm -interface itself. .Pp The current implementation uses the key only for outgoing packets. Incoming packets with a different key or without a key will be treated as if they would belong to this interface. .Pp -RFC1701 is not fully supported, however all unsupported features have been -deprecated in RFC2784. +The sequence number field also used only for outgoing packets. Copied: stable/10/share/man/man4/me.4 (from r274246, head/share/man/man4/me.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/me.4 Sat Jun 6 12:44:42 2015 (r284066, copy of r274246, head/share/man/man4/me.4) @@ -0,0 +1,85 @@ +.\" Copyright (c) Andrey V. Elsukov +.\" 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$ +.\" +.Dd November 7, 2014 +.Dt ME 4 +.Os +.Sh NAME +.Nm me +.Nd encapsulating network device +.Sh SYNOPSIS +To compile the +driver into the kernel, place the following line in the kernel +configuration file: +.Bd -ragged -offset indent +.Cd "device me" +.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 +if_me_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +network interface pseudo device encapsulates datagrams +into IP. +These encapsulated datagrams are routed to a destination host, +where they are decapsulated and further routed to their final destination. +.Pp +.Nm +interfaces are dynamically created and destroyed with the +.Xr ifconfig 8 +.Cm create +and +.Cm destroy +subcommands. +.Pp +This driver corresponds to RFC 2004. +Datagrams are encapsulated into IP with a shorter encapsulation. +The original +IP header is modified and the modifications are inserted between the +so modified header and the original payload. +The protocol number 55 is used for outer header. +.Sh NOTES +.Pp +For correct operation, the +.Nm +device needs a route to the decapsulating host that does not run over the tunnel, +as this would be a loop. +.Sh SEE ALSO +.Xr gif 4 , +.Xr gre 4 , +.Xr inet 4 , +.Xr ip 4 , +.Xr netintro 4 , +.Xr protocols 5 , +.Xr ifconfig 8 , +.Xr sysctl 8 +.Sh AUTHORS +.An Andrey V. Elsukov Aq Mt ae@FreeBSD.org Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Sat Jun 6 12:43:05 2015 (r284065) +++ stable/10/sys/conf/NOTES Sat Jun 6 12:44:42 2015 (r284066) @@ -867,12 +867,15 @@ device tun # The `gif' device implements IPv6 over IP4 tunneling, # IPv4 over IPv6 tunneling, IPv4 over IPv4 tunneling and # IPv6 over IPv6 tunneling. -# The `gre' device implements two types of IP4 over IP4 tunneling: -# GRE and MOBILE, as specified in the RFC1701 and RFC2004. +# The `gre' device implements GRE (Generic Routing Encapsulation) tunneling, +# as specified in the RFC 2784 and RFC 2890. +# The `me' device implements Minimal Encapsulation within IPv4 as +# specified in the RFC 2004. # The XBONEHACK option allows the same pair of addresses to be configured on # multiple gif interfaces. device gif device gre +device me options XBONEHACK # The `faith' device captures packets sent to it and diverts them Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Sat Jun 6 12:43:05 2015 (r284065) +++ stable/10/sys/conf/files Sat Jun 6 12:44:42 2015 (r284066) @@ -3224,11 +3224,12 @@ net/if_fddisubr.c optional fddi net/if_fwsubr.c optional fwip net/if_gif.c optional gif inet | gif inet6 | \ netgraph_gif inet | netgraph_gif inet6 -net/if_gre.c optional gre inet +net/if_gre.c optional gre inet | gre inet6 net/if_iso88025subr.c optional token net/if_lagg.c optional lagg net/if_loop.c optional loop net/if_llatbl.c standard +net/if_me.c optional me inet net/if_media.c standard net/if_mib.c standard net/if_spppfr.c optional sppp | netgraph_sppp @@ -3469,6 +3470,7 @@ netinet6/in6_proto.c optional inet6 netinet6/in6_rmx.c optional inet6 netinet6/in6_src.c optional inet6 netinet6/ip6_forward.c optional inet6 +netinet6/ip6_gre.c optional gre inet6 netinet6/ip6_id.c optional inet6 netinet6/ip6_input.c optional inet6 netinet6/ip6_mroute.c optional mrouting inet6 Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Sat Jun 6 12:43:05 2015 (r284065) +++ stable/10/sys/modules/Makefile Sat Jun 6 12:44:42 2015 (r284066) @@ -141,8 +141,9 @@ SUBDIR= \ if_ef \ if_epair \ if_faith \ - if_gif \ + ${_if_gif} \ ${_if_gre} \ + ${_if_me} \ if_lagg \ ${_if_ndis} \ if_stf \ @@ -425,10 +426,12 @@ _random= random defined(ALL_MODULES) _carp= carp _toecore= toecore +_if_gif= if_gif +_if_gre= if_gre .endif .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES) -_if_gre= if_gre +_if_me= if_me .endif .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES) Modified: stable/10/sys/modules/if_gif/Makefile ============================================================================== --- stable/10/sys/modules/if_gif/Makefile Sat Jun 6 12:43:05 2015 (r284065) +++ stable/10/sys/modules/if_gif/Makefile Sat Jun 6 12:44:42 2015 (r284066) @@ -19,7 +19,7 @@ opt_inet6.h: opt_mrouting.h: echo "#define MROUTING 1" > ${.TARGET} .else -OPT_INET6!= cat ${KERNBUILDDIR}/opt_inet6.h +OPT_INET6!= cat ${KERNBUILDDIR}/opt_inet6.h; echo .if empty(OPT_INET6) MK_INET6_SUPPORT= no .endif Modified: stable/10/sys/modules/if_gre/Makefile ============================================================================== --- stable/10/sys/modules/if_gre/Makefile Sat Jun 6 12:43:05 2015 (r284065) +++ stable/10/sys/modules/if_gre/Makefile Sat Jun 6 12:44:42 2015 (r284066) @@ -1,19 +1,36 @@ # $FreeBSD$ +.include .PATH: ${.CURDIR}/../../net ${.CURDIR}/../../netinet ${.CURDIR}/../../netinet6 KMOD= if_gre -SRCS= if_gre.c ip_gre.c opt_inet.h opt_inet6.h opt_atalk.h +SRCS= if_gre.c opt_inet.h opt_inet6.h .if !defined(KERNBUILDDIR) opt_inet.h: echo "#define INET 1" > ${.TARGET} +.if ${MK_INET6_SUPPORT} != "no" opt_inet6.h: echo "#define INET6 1" > ${.TARGET} +.endif +.else +OPT_INET!= cat ${KERNBUILDDIR}/opt_inet.h; echo +.if empty(OPT_INET) +MK_INET_SUPPORT=no +.endif +OPT_INET6!= cat ${KERNBUILDDIR}/opt_inet6.h; echo +.if empty(OPT_INET6) +MK_INET6_SUPPORT=no +.endif +.endif + +.if ${MK_INET_SUPPORT} != "no" +SRCS+= ip_gre.c +.endif -opt_atalk.h: - echo "#define NETATALK 1" > ${.TARGET} +.if ${MK_INET6_SUPPORT} != "no" +SRCS+= ip6_gre.c .endif .include Modified: stable/10/sys/net/if_gre.c ============================================================================== --- stable/10/sys/net/if_gre.c Sat Jun 6 12:43:05 2015 (r284065) +++ stable/10/sys/net/if_gre.c Sat Jun 6 12:44:42 2015 (r284066) @@ -1,8 +1,6 @@ -/* $NetBSD: if_gre.c,v 1.49 2003/12/11 00:22:29 itojun Exp $ */ -/* $FreeBSD$ */ - /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. + * Copyright (c) 2014 Andrey V. Elsukov * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -30,24 +28,20 @@ * 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. + * + * $NetBSD: if_gre.c,v 1.49 2003/12/11 00:22:29 itojun Exp $ */ -/* - * Encapsulate L3 protocols into IP - * See RFC 2784 (successor of RFC 1701 and 1702) for more details. - * If_gre is compatible with Cisco GRE tunnels, so you can - * have a NetBSD box as the other end of a tunnel interface of a Cisco - * router. See gre(4) for more details. - * Also supported: IP in IP encaps (proto 55) as of RFC 2004 - */ +#include +__FBSDID("$FreeBSD$"); -#include "opt_atalk.h" #include "opt_inet.h" #include "opt_inet6.h" #include #include #include +#include #include #include #include @@ -55,94 +49,84 @@ #include #include #include +#include #include #include +#include #include +#include #include #include #include #include +#include #include -#include +#include #include -#ifdef INET #include +#ifdef INET #include #include #include -#include #include -#include -#else -#error "Huh? if_gre without inet?" #endif -#include +#ifdef INET6 +#include +#include +#include +#include +#endif +#include +#include #include -/* - * It is not easy to calculate the right value for a GRE MTU. - * We leave this task to the admin and use the same default that - * other vendors use. - */ -#define GREMTU 1476 - -#define MTAG_COOKIE_GRE 1307983903 -#define MTAG_GRE_NESTING 1 -struct mtag_gre_nesting { - uint16_t count; - uint16_t max; - struct ifnet *ifp[]; -}; - -/* - * gre_mtx protects all global variables in if_gre.c. - * XXX: gre_softc data not protected yet. - */ -VNET_DEFINE(struct mtx, gre_mtx); -VNET_DEFINE(struct gre_softc_head, gre_softc_list); +#include +#include +#define GREMTU 1500 static const char grename[] = "gre"; static MALLOC_DEFINE(M_GRE, grename, "Generic Routing Encapsulation"); +static VNET_DEFINE(struct mtx, gre_mtx); +#define V_gre_mtx VNET(gre_mtx) +#define GRE_LIST_LOCK_INIT(x) mtx_init(&V_gre_mtx, "gre_mtx", NULL, \ + MTX_DEF) +#define GRE_LIST_LOCK_DESTROY(x) mtx_destroy(&V_gre_mtx) +#define GRE_LIST_LOCK(x) mtx_lock(&V_gre_mtx) +#define GRE_LIST_UNLOCK(x) mtx_unlock(&V_gre_mtx) + +static VNET_DEFINE(LIST_HEAD(, gre_softc), gre_softc_list); +#define V_gre_softc_list VNET(gre_softc_list) +static struct sx gre_ioctl_sx; +SX_SYSINIT(gre_ioctl_sx, &gre_ioctl_sx, "gre_ioctl"); static int gre_clone_create(struct if_clone *, int, caddr_t); static void gre_clone_destroy(struct ifnet *); static VNET_DEFINE(struct if_clone *, gre_cloner); #define V_gre_cloner VNET(gre_cloner) +static void gre_qflush(struct ifnet *); +static int gre_transmit(struct ifnet *, struct mbuf *); static int gre_ioctl(struct ifnet *, u_long, caddr_t); static int gre_output(struct ifnet *, struct mbuf *, const struct sockaddr *, struct route *); -static int gre_compute_route(struct gre_softc *sc); +static void gre_updatehdr(struct gre_softc *); +static int gre_set_tunnel(struct ifnet *, struct sockaddr *, + struct sockaddr *); +static void gre_delete_tunnel(struct ifnet *); +int gre_input(struct mbuf **, int *, int); #ifdef INET -extern struct domain inetdomain; -static const struct protosw in_gre_protosw = { - .pr_type = SOCK_RAW, - .pr_domain = &inetdomain, - .pr_protocol = IPPROTO_GRE, - .pr_flags = PR_ATOMIC|PR_ADDR, - .pr_input = gre_input, - .pr_output = (pr_output_t *)rip_output, - .pr_ctlinput = rip_ctlinput, - .pr_ctloutput = rip_ctloutput, - .pr_usrreqs = &rip_usrreqs -}; -static const struct protosw in_mobile_protosw = { - .pr_type = SOCK_RAW, - .pr_domain = &inetdomain, - .pr_protocol = IPPROTO_MOBILE, - .pr_flags = PR_ATOMIC|PR_ADDR, - .pr_input = gre_mobile_input, - .pr_output = (pr_output_t *)rip_output, - .pr_ctlinput = rip_ctlinput, - .pr_ctloutput = rip_ctloutput, - .pr_usrreqs = &rip_usrreqs -}; +extern int in_gre_attach(struct gre_softc *); +extern int in_gre_output(struct mbuf *, int, int); +#endif +#ifdef INET6 +extern int in6_gre_attach(struct gre_softc *); +extern int in6_gre_output(struct mbuf *, int, int); #endif SYSCTL_DECL(_net_link); @@ -159,6 +143,7 @@ static SYSCTL_NODE(_net_link, IFT_TUNNEL */ #define MAX_GRE_NEST 1 #endif + static VNET_DEFINE(int, max_gre_nesting) = MAX_GRE_NEST; #define V_max_gre_nesting VNET(max_gre_nesting) SYSCTL_INT(_net_link_gre, OID_AUTO, max_nesting, CTLFLAG_RW | CTLFLAG_VNET, @@ -191,34 +176,22 @@ gre_clone_create(struct if_clone *ifc, i struct gre_softc *sc; sc = malloc(sizeof(struct gre_softc), M_GRE, M_WAITOK | M_ZERO); - + sc->gre_fibnum = curthread->td_proc->p_fibnum; GRE2IFP(sc) = if_alloc(IFT_TUNNEL); - if (GRE2IFP(sc) == NULL) { - free(sc, M_GRE); - return (ENOSPC); - } - + GRE_LOCK_INIT(sc); GRE2IFP(sc)->if_softc = sc; if_initname(GRE2IFP(sc), grename, unit); - GRE2IFP(sc)->if_snd.ifq_maxlen = ifqmaxlen; - GRE2IFP(sc)->if_addrlen = 0; - GRE2IFP(sc)->if_hdrlen = 24; /* IP + GRE */ - GRE2IFP(sc)->if_mtu = GREMTU; + GRE2IFP(sc)->if_mtu = sc->gre_mtu = GREMTU; GRE2IFP(sc)->if_flags = IFF_POINTOPOINT|IFF_MULTICAST; GRE2IFP(sc)->if_output = gre_output; GRE2IFP(sc)->if_ioctl = gre_ioctl; - sc->g_dst.s_addr = sc->g_src.s_addr = INADDR_ANY; - sc->g_proto = IPPROTO_GRE; - GRE2IFP(sc)->if_flags |= IFF_LINK0; - sc->encap = NULL; - sc->gre_fibnum = curthread->td_proc->p_fibnum; - sc->wccp_ver = WCCP_V1; - sc->key = 0; + GRE2IFP(sc)->if_transmit = gre_transmit; + GRE2IFP(sc)->if_qflush = gre_qflush; if_attach(GRE2IFP(sc)); bpfattach(GRE2IFP(sc), DLT_NULL, sizeof(u_int32_t)); GRE_LIST_LOCK(); - LIST_INSERT_HEAD(&V_gre_softc_list, sc, sc_list); + LIST_INSERT_HEAD(&V_gre_softc_list, sc, gre_list); GRE_LIST_UNLOCK(); return (0); } @@ -226,734 +199,752 @@ gre_clone_create(struct if_clone *ifc, i static void gre_clone_destroy(struct ifnet *ifp) { - struct gre_softc *sc = ifp->if_softc; + struct gre_softc *sc; + sx_xlock(&gre_ioctl_sx); + sc = ifp->if_softc; + gre_delete_tunnel(ifp); GRE_LIST_LOCK(); - LIST_REMOVE(sc, sc_list); + LIST_REMOVE(sc, gre_list); GRE_LIST_UNLOCK(); - -#ifdef INET - if (sc->encap != NULL) - encap_detach(sc->encap); -#endif bpfdetach(ifp); if_detach(ifp); + ifp->if_softc = NULL; + sx_xunlock(&gre_ioctl_sx); + if_free(ifp); + GRE_LOCK_DESTROY(sc); free(sc, M_GRE); } -/* - * The output routine. Takes a packet and encapsulates it in the protocol - * given by sc->g_proto. See also RFC 1701 and RFC 2004 - */ static int -gre_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, - struct route *ro) +gre_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { - int error = 0; - struct gre_softc *sc = ifp->if_softc; - struct greip *gh; - struct ip *ip; - struct m_tag *mtag; - struct mtag_gre_nesting *gt; - size_t len; - u_short gre_ip_id = 0; - uint8_t gre_ip_tos = 0; - u_int16_t etype = 0; - struct mobile_h mob_h; - u_int32_t af; - int extra = 0, max; - - /* - * gre may cause infinite recursion calls when misconfigured. High - * nesting level may cause stack exhaustion. We'll prevent this by - * detecting loops and by introducing upper limit. - */ - mtag = m_tag_locate(m, MTAG_COOKIE_GRE, MTAG_GRE_NESTING, NULL); - if (mtag != NULL) { - struct ifnet **ifp2; - - gt = (struct mtag_gre_nesting *)(mtag + 1); - gt->count++; - if (gt->count > min(gt->max, V_max_gre_nesting)) { - printf("%s: hit maximum recursion limit %u on %s\n", - __func__, gt->count - 1, ifp->if_xname); - m_freem(m); - error = EIO; /* is there better errno? */ - goto end; - } - - ifp2 = gt->ifp; - for (max = gt->count - 1; max > 0; max--) { - if (*ifp2 == ifp) - break; - ifp2++; - } - if (*ifp2 == ifp) { - printf("%s: detected loop with nexting %u on %s\n", - __func__, gt->count-1, ifp->if_xname); - m_freem(m); - error = EIO; /* is there better errno? */ - goto end; - } - *ifp2 = ifp; + GRE_RLOCK_TRACKER; + struct ifreq *ifr = (struct ifreq *)data; + struct sockaddr *src, *dst; + struct gre_softc *sc; +#ifdef INET + struct sockaddr_in *sin = NULL; +#endif +#ifdef INET6 + struct sockaddr_in6 *sin6 = NULL; +#endif + uint32_t opt; + int error; - } else { - /* - * Given that people should NOT increase max_gre_nesting beyond - * their real needs, we allocate once per packet rather than - * allocating an mtag once per passing through gre. - * - * Note: the sysctl does not actually check for saneness, so we - * limit the maximum numbers of possible recursions here. - */ - max = imin(V_max_gre_nesting, 256); - /* If someone sets the sysctl <= 0, we want at least 1. */ - max = imax(max, 1); - len = sizeof(struct mtag_gre_nesting) + - max * sizeof(struct ifnet *); - mtag = m_tag_alloc(MTAG_COOKIE_GRE, MTAG_GRE_NESTING, len, - M_NOWAIT); - if (mtag == NULL) { - m_freem(m); - error = ENOMEM; - goto end; - } - gt = (struct mtag_gre_nesting *)(mtag + 1); - bzero(gt, len); - gt->count = 1; - gt->max = max; - *gt->ifp = ifp; - m_tag_prepend(m, mtag); + switch (cmd) { + case SIOCSIFMTU: + /* XXX: */ + if (ifr->ifr_mtu < 576) + return (EINVAL); + break; + case SIOCSIFADDR: + ifp->if_flags |= IFF_UP; + case SIOCSIFFLAGS: + case SIOCADDMULTI: + case SIOCDELMULTI: + return (0); + case GRESADDRS: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 13:08:32 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7CE93FF5; Sat, 6 Jun 2015 13:08:32 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B23F1902; Sat, 6 Jun 2015 13:08:32 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56D8WsA031581; Sat, 6 Jun 2015 13:08:32 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56D8WnK031579; Sat, 6 Jun 2015 13:08:32 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506061308.t56D8WnK031579@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 6 Jun 2015 13:08:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284067 - head/usr.bin/systat 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 13:08:32 -0000 Author: bapt Date: Sat Jun 6 13:08:31 2015 New Revision: 284067 URL: https://svnweb.freebsd.org/changeset/base/284067 Log: Remove unused variable Modified: head/usr.bin/systat/main.c Modified: head/usr.bin/systat/main.c ============================================================================== --- head/usr.bin/systat/main.c Sat Jun 6 12:44:42 2015 (r284066) +++ head/usr.bin/systat/main.c Sat Jun 6 13:08:31 2015 (r284067) @@ -138,7 +138,6 @@ main(int argc, char **argv) { char errbuf[_POSIX2_LINE_MAX], dummy; size_t size; - double t; struct cmdentry *cmd = NULL; (void) setlocale(LC_ALL, ""); From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 13:08:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A1AD1A2; Sat, 6 Jun 2015 13:08:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 189F51905; Sat, 6 Jun 2015 13:08:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56D8m2c031667; Sat, 6 Jun 2015 13:08:48 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56D8m6P031665; Sat, 6 Jun 2015 13:08:48 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506061308.t56D8m6P031665@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 6 Jun 2015 13:08:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284068 - head/usr.bin/systat 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 13:08:49 -0000 Author: bapt Date: Sat Jun 6 13:08:48 2015 New Revision: 284068 URL: https://svnweb.freebsd.org/changeset/base/284068 Log: Bump WARNS level to 1 Modified: head/usr.bin/systat/Makefile Modified: head/usr.bin/systat/Makefile ============================================================================== --- head/usr.bin/systat/Makefile Sat Jun 6 13:08:31 2015 (r284067) +++ head/usr.bin/systat/Makefile Sat Jun 6 13:08:48 2015 (r284068) @@ -14,7 +14,7 @@ SRCS+= icmp6.c ip6.c CFLAGS+= -DINET6 .endif -WARNS?= 0 +WARNS?= 1 LIBADD= ncursesw m devstat kvm From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 13:09:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFEC62E8; Sat, 6 Jun 2015 13:09:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE83C190E; Sat, 6 Jun 2015 13:09:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56D9ntq031856; Sat, 6 Jun 2015 13:09:49 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56D9n8a031855; Sat, 6 Jun 2015 13:09:49 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506061309.t56D9n8a031855@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 6 Jun 2015 13:09:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284069 - head/usr.bin/keylogin 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 13:09:50 -0000 Author: bapt Date: Sat Jun 6 13:09:49 2015 New Revision: 284069 URL: https://svnweb.freebsd.org/changeset/base/284069 Log: Remove WARNS keylogin build fine with clang and gcc Modified: head/usr.bin/keylogin/Makefile Modified: head/usr.bin/keylogin/Makefile ============================================================================== --- head/usr.bin/keylogin/Makefile Sat Jun 6 13:08:48 2015 (r284068) +++ head/usr.bin/keylogin/Makefile Sat Jun 6 13:09:49 2015 (r284069) @@ -4,6 +4,4 @@ PROG= keylogin LIBADD= rpcsvc -WARNS?= 0 - .include From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 13:13:40 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F68E455; Sat, 6 Jun 2015 13:13:40 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DD771AFA; Sat, 6 Jun 2015 13:13:40 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56DDeex036042; Sat, 6 Jun 2015 13:13:40 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56DDd0W036040; Sat, 6 Jun 2015 13:13:39 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506061313.t56DDd0W036040@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 6 Jun 2015 13:13:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284070 - head/usr.bin/mail 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 13:13:40 -0000 Author: bapt Date: Sat Jun 6 13:13:39 2015 New Revision: 284070 URL: https://svnweb.freebsd.org/changeset/base/284070 Log: Add const to the copyright variable Bump WARNS to level 2 Modified: head/usr.bin/mail/Makefile head/usr.bin/mail/main.c Modified: head/usr.bin/mail/Makefile ============================================================================== --- head/usr.bin/mail/Makefile Sat Jun 6 13:09:49 2015 (r284069) +++ head/usr.bin/mail/Makefile Sat Jun 6 13:13:39 2015 (r284070) @@ -11,7 +11,7 @@ EFILES= mail.rc LINKS= ${BINDIR}/mail ${BINDIR}/Mail ${BINDIR}/mail ${BINDIR}/mailx MLINKS= mail.1 Mail.1 mail.1 mailx.1 -WARNS?= 1 +WARNS?= 2 .PATH: ${.CURDIR}/misc Modified: head/usr.bin/mail/main.c ============================================================================== --- head/usr.bin/mail/main.c Sat Jun 6 13:09:49 2015 (r284069) +++ head/usr.bin/mail/main.c Sat Jun 6 13:13:39 2015 (r284070) @@ -28,7 +28,7 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1980, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 13:20:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD8695DF; Sat, 6 Jun 2015 13:20:02 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC3861B31; Sat, 6 Jun 2015 13:20:02 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56DK2YI037039; Sat, 6 Jun 2015 13:20:02 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56DK2EU037038; Sat, 6 Jun 2015 13:20:02 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506061320.t56DK2EU037038@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 6 Jun 2015 13:20:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284071 - head/libexec/atrun 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 13:20:03 -0000 Author: bapt Date: Sat Jun 6 13:20:02 2015 New Revision: 284071 URL: https://svnweb.freebsd.org/changeset/base/284071 Log: Remove WARNS atrun builds fine with clang and gcc Modified: head/libexec/atrun/Makefile Modified: head/libexec/atrun/Makefile ============================================================================== --- head/libexec/atrun/Makefile Sat Jun 6 13:13:39 2015 (r284070) +++ head/libexec/atrun/Makefile Sat Jun 6 13:20:02 2015 (r284071) @@ -14,7 +14,6 @@ CLEANFILES= ${MAN} CFLAGS+=-I${MAINSRC} -I${.CURDIR} CFLAGS+=-DLOGIN_CAP -DPAM -WARNS?= 2 WFORMAT=0 LIBADD= pam util From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 13:26:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9FD737B3; Sat, 6 Jun 2015 13:26:16 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80A6D1D63; Sat, 6 Jun 2015 13:26:16 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56DQGhM041489; Sat, 6 Jun 2015 13:26:16 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56DQEei041476; Sat, 6 Jun 2015 13:26:14 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506061326.t56DQEei041476@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 6 Jun 2015 13:26: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: r284072 - in stable/10: . sys/net sys/netinet 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 13:26:16 -0000 Author: ae Date: Sat Jun 6 13:26:13 2015 New Revision: 284072 URL: https://svnweb.freebsd.org/changeset/base/284072 Log: MFC r276148: Remove in_gif.h and in6_gif.h files. They only contain function declarations used by gif(4). Instead declare these functions in C files. Also make some variables static. MFC r276215: Extern declarations in C files loses compile-time checking that the functions' calls match their definitions. Move them to header files. Deleted: stable/10/sys/netinet/in_gif.h stable/10/sys/netinet6/in6_gif.h Modified: stable/10/ObsoleteFiles.inc stable/10/sys/net/if_gif.c stable/10/sys/net/if_gif.h stable/10/sys/net/if_gre.c stable/10/sys/net/if_gre.h stable/10/sys/netinet/in_gif.c stable/10/sys/netinet/ip_gre.c stable/10/sys/netinet6/in6_gif.c stable/10/sys/netinet6/ip6_gre.c Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/ObsoleteFiles.inc Sat Jun 6 13:26:13 2015 (r284072) @@ -40,6 +40,9 @@ # 20150506 OLD_FILES+=usr/share/man/man9/NDHASGIANT.9.gz +# 20141223: remove in6_gif.h and in_gif.h +OLD_FILES+=usr/include/netinet/in_gif.h +OLD_FILES+=usr/include/netinet6/in6_gif.h # 20141205: convert sbin/mdconfig/tests to ATF format tests OLD_FILES+=usr/tests/sbin/mdconfig/legacy_test OLD_FILES+=usr/tests/sbin/mdconfig/mdconfig.test Modified: stable/10/sys/net/if_gif.c ============================================================================== --- stable/10/sys/net/if_gif.c Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/net/if_gif.c Sat Jun 6 13:26:13 2015 (r284072) @@ -72,7 +72,6 @@ __FBSDID("$FreeBSD$"); #include #ifdef INET #include -#include #include #endif /* INET */ @@ -85,7 +84,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #endif /* INET6 */ Modified: stable/10/sys/net/if_gif.h ============================================================================== --- stable/10/sys/net/if_gif.h Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/net/if_gif.h Sat Jun 6 13:26:13 2015 (r284072) @@ -111,6 +111,16 @@ void gif_input(struct mbuf *, struct ifn int gif_output(struct ifnet *, struct mbuf *, const struct sockaddr *, struct route *); int gif_encapcheck(const struct mbuf *, int, int, void *); +#ifdef INET +int in_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); +int in_gif_encapcheck(const struct mbuf *, int, int, void *); +int in_gif_attach(struct gif_softc *); +#endif +#ifdef INET6 +int in6_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); +int in6_gif_encapcheck(const struct mbuf *, int, int, void *); +int in6_gif_attach(struct gif_softc *); +#endif #endif /* _KERNEL */ #define GIFGOPTS _IOWR('i', 150, struct ifreq) Modified: stable/10/sys/net/if_gre.c ============================================================================== --- stable/10/sys/net/if_gre.c Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/net/if_gre.c Sat Jun 6 13:26:13 2015 (r284072) @@ -119,16 +119,6 @@ static int gre_set_tunnel(struct ifnet * struct sockaddr *); static void gre_delete_tunnel(struct ifnet *); -int gre_input(struct mbuf **, int *, int); -#ifdef INET -extern int in_gre_attach(struct gre_softc *); -extern int in_gre_output(struct mbuf *, int, int); -#endif -#ifdef INET6 -extern int in6_gre_attach(struct gre_softc *); -extern int in6_gre_output(struct mbuf *, int, int); -#endif - SYSCTL_DECL(_net_link); static SYSCTL_NODE(_net_link, IFT_TUNNEL, gre, CTLFLAG_RW, 0, "Generic Routing Encapsulation"); Modified: stable/10/sys/net/if_gre.h ============================================================================== --- stable/10/sys/net/if_gre.h Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/net/if_gre.h Sat Jun 6 13:26:13 2015 (r284072) @@ -100,6 +100,15 @@ struct gre_softc { #define gre_oip gre_gihdr->gi_ip #define gre_oip6 gre_gi6hdr->gi6_ip6 +int gre_input(struct mbuf **, int *, int); +#ifdef INET +int in_gre_attach(struct gre_softc *); +int in_gre_output(struct mbuf *, int, int); +#endif +#ifdef INET6 +int in6_gre_attach(struct gre_softc *); +int in6_gre_output(struct mbuf *, int, int); +#endif /* * CISCO uses special type for GRE tunnel created as part of WCCP * connection, while in fact those packets are just IPv4 encapsulated Modified: stable/10/sys/netinet/in_gif.c ============================================================================== --- stable/10/sys/netinet/in_gif.c Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/netinet/in_gif.c Sat Jun 6 13:26:13 2015 (r284072) @@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -70,10 +69,11 @@ __FBSDID("$FreeBSD$"); static int gif_validate4(const struct ip *, struct gif_softc *, struct ifnet *); +static int in_gif_input(struct mbuf **, int *, int); static void in_gif_input10(struct mbuf *, int); extern struct domain inetdomain; -struct protosw in_gif_protosw = { +static struct protosw in_gif_protosw = { .pr_type = SOCK_RAW, .pr_domain = &inetdomain, .pr_protocol = 0/* IPPROTO_IPV[46] */, @@ -84,7 +84,8 @@ struct protosw in_gif_protosw = { .pr_usrreqs = &rip_usrreqs }; -VNET_DEFINE(int, ip_gif_ttl) = GIF_TTL; +#define GIF_TTL 30 +static VNET_DEFINE(int, ip_gif_ttl) = GIF_TTL; #define V_ip_gif_ttl VNET(ip_gif_ttl) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_GIF_TTL, gifttl, CTLFLAG_RW, &VNET_NAME(ip_gif_ttl), 0, ""); @@ -143,7 +144,7 @@ in_gif_input10(struct mbuf *m, int off) in_gif_input(&m, &off, proto); } -int +static int in_gif_input(struct mbuf **mp, int *offp, int proto) { struct mbuf *m = *mp; Modified: stable/10/sys/netinet/ip_gre.c ============================================================================== --- stable/10/sys/netinet/ip_gre.c Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/netinet/ip_gre.c Sat Jun 6 13:26:13 2015 (r284072) @@ -73,11 +73,6 @@ __FBSDID("$FreeBSD$"); #include extern struct domain inetdomain; -extern int gre_input(struct mbuf **, int *, int); - -int in_gre_attach(struct gre_softc *); -int in_gre_output(struct mbuf *, int, int); - static void gre_input10(struct mbuf *, int); static const struct protosw in_gre_protosw = { .pr_type = SOCK_RAW, Modified: stable/10/sys/netinet6/in6_gif.c ============================================================================== --- stable/10/sys/netinet6/in6_gif.c Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/netinet6/in6_gif.c Sat Jun 6 13:26:13 2015 (r284072) @@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$"); #ifdef INET6 #include #include -#include #include #endif #include @@ -75,7 +74,8 @@ __FBSDID("$FreeBSD$"); #include -VNET_DEFINE(int, ip6_gif_hlim) = GIF_HLIM; +#define GIF_HLIM 30 +static VNET_DEFINE(int, ip6_gif_hlim) = GIF_HLIM; #define V_ip6_gif_hlim VNET(ip6_gif_hlim) SYSCTL_DECL(_net_inet6_ip6); @@ -84,9 +84,10 @@ SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_ static int gif_validate6(const struct ip6_hdr *, struct gif_softc *, struct ifnet *); +static int in6_gif_input(struct mbuf **, int *, int); extern struct domain inet6domain; -struct ip6protosw in6_gif_protosw = { +static struct ip6protosw in6_gif_protosw = { .pr_type = SOCK_RAW, .pr_domain = &inet6domain, .pr_protocol = 0, /* IPPROTO_IPV[46] */ @@ -145,7 +146,7 @@ in6_gif_output(struct ifnet *ifp, struct return (ip6_output(m, 0, NULL, IPV6_MINMTU, 0, NULL, NULL)); } -int +static int in6_gif_input(struct mbuf **mp, int *offp, int proto) { struct mbuf *m = *mp; Modified: stable/10/sys/netinet6/ip6_gre.c ============================================================================== --- stable/10/sys/netinet6/ip6_gre.c Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/netinet6/ip6_gre.c Sat Jun 6 13:26:13 2015 (r284072) @@ -63,11 +63,6 @@ __FBSDID("$FreeBSD$"); #include extern struct domain inet6domain; -extern int gre_input(struct mbuf **, int *, int); - -int in6_gre_attach(struct gre_softc *); -int in6_gre_output(struct mbuf *, int, int); - struct ip6protosw in6_gre_protosw = { .pr_type = SOCK_RAW, .pr_domain = &inet6domain, From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 13:29:42 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 821CA925; Sat, 6 Jun 2015 13:29:42 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7084C1D72; Sat, 6 Jun 2015 13:29:42 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56DTgb4042001; Sat, 6 Jun 2015 13:29:42 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56DTgdE042000; Sat, 6 Jun 2015 13:29:42 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506061329.t56DTgdE042000@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 6 Jun 2015 13:29:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284073 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 13:29:42 -0000 Author: ae Date: Sat Jun 6 13:29:41 2015 New Revision: 284073 URL: https://svnweb.freebsd.org/changeset/base/284073 Log: MFC r276902,282536: Pass mtag argument into m_tag_locate() to continue the search from the last found mtag. Modified: stable/10/sys/net/if_me.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_me.c ============================================================================== --- stable/10/sys/net/if_me.c Sat Jun 6 13:26:13 2015 (r284072) +++ stable/10/sys/net/if_me.c Sat Jun 6 13:29:41 2015 (r284073) @@ -487,7 +487,7 @@ me_check_nesting(struct ifnet *ifp, stru count = 1; mtag = NULL; - while ((mtag = m_tag_locate(m, MTAG_ME, 0, NULL)) != NULL) { + while ((mtag = m_tag_locate(m, MTAG_ME, 0, mtag)) != NULL) { if (*(struct ifnet **)(mtag + 1) == ifp) { log(LOG_NOTICE, "%s: loop detected\n", ifp->if_xname); return (EIO); From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 13:37:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 412F7B01; Sat, 6 Jun 2015 13:37:14 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DD361F97; Sat, 6 Jun 2015 13:37:14 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56DbE1w046706; Sat, 6 Jun 2015 13:37:14 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56DbCU4046700; Sat, 6 Jun 2015 13:37:12 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506061337.t56DbCU4046700@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 6 Jun 2015 13:37:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284074 - in stable/10: sbin/ifconfig sys/net 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 13:37:14 -0000 Author: ae Date: Sat Jun 6 13:37:11 2015 New Revision: 284074 URL: https://svnweb.freebsd.org/changeset/base/284074 Log: MFC r282809: Add new socket ioctls SIOC[SG]TUNFIB to set FIB number of encapsulated packets on tunnel interfaces. Add support of these ioctls to gre(4), gif(4) and me(4) interfaces. For incoming packets M_SETFIB() should use if_fib value from ifnet structure, use proper value in gre(4) and me(4). Differential Revision: https://reviews.freebsd.org/D2462 Modified: stable/10/sbin/ifconfig/ifconfig.8 stable/10/sbin/ifconfig/iffib.c stable/10/sys/net/if_gif.c stable/10/sys/net/if_gre.c stable/10/sys/net/if_me.c stable/10/sys/sys/sockio.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/10/sbin/ifconfig/ifconfig.8 Sat Jun 6 13:29:41 2015 (r284073) +++ stable/10/sbin/ifconfig/ifconfig.8 Sat Jun 6 13:37:11 2015 (r284074) @@ -321,6 +321,14 @@ using the kernel configuration option, or the .Va net.fibs tunable. +.It Cm tunnelfib Ar fib_number +Specify tunnel FIB. +A FIB +.Ar fib_number +is assigned to all packets encapsulated by tunnel interface, e.g., +.Xr gif 4 +and +.Xr gre 4 . .It Cm ipdst This is used to specify an Internet host who is willing to receive IP packets encapsulating IPX packets bound for a remote network. Modified: stable/10/sbin/ifconfig/iffib.c ============================================================================== --- stable/10/sbin/ifconfig/iffib.c Sat Jun 6 13:29:41 2015 (r284073) +++ stable/10/sbin/ifconfig/iffib.c Sat Jun 6 13:37:11 2015 (r284074) @@ -50,15 +50,15 @@ fib_status(int s) memset(&ifr, 0, sizeof(ifr)); strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); + if (ioctl(s, SIOCGIFFIB, (caddr_t)&ifr) == 0 && + ifr.ifr_fib != RT_DEFAULT_FIB) + printf("\tfib: %u\n", ifr.ifr_fib); - if (ioctl(s, SIOCGIFFIB, (caddr_t)&ifr) < 0) - return; - - /* Ignore if it is the default. */ - if (ifr.ifr_fib == 0) - return; - - printf("\tfib: %u\n", ifr.ifr_fib); + memset(&ifr, 0, sizeof(ifr)); + strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); + if (ioctl(s, SIOCGTUNFIB, (caddr_t)&ifr) == 0 && + ifr.ifr_fib != RT_DEFAULT_FIB) + printf("\ttunnelfib: %u\n", ifr.ifr_fib); } static void @@ -80,8 +80,28 @@ setiffib(const char *val, int dummy __un warn("ioctl (SIOCSIFFIB)"); } +static void +settunfib(const char *val, int dummy __unused, int s, + const struct afswtch *afp) +{ + unsigned long fib; + char *ep; + + fib = strtoul(val, &ep, 0); + if (*ep != '\0' || fib > UINT_MAX) { + warn("fib %s not valid", val); + return; + } + + strncpy(ifr.ifr_name, name, sizeof (ifr.ifr_name)); + ifr.ifr_fib = fib; + if (ioctl(s, SIOCSTUNFIB, (caddr_t)&ifr) < 0) + warn("ioctl (SIOCSTUNFIB)"); +} + static struct cmd fib_cmds[] = { DEF_CMD_ARG("fib", setiffib), + DEF_CMD_ARG("tunnelfib", settunfib), }; static struct afswtch af_fib = { Modified: stable/10/sys/net/if_gif.c ============================================================================== --- stable/10/sys/net/if_gif.c Sat Jun 6 13:29:41 2015 (r284073) +++ stable/10/sys/net/if_gif.c Sat Jun 6 13:37:11 2015 (r284074) @@ -919,6 +919,17 @@ gif_ioctl(struct ifnet *ifp, u_long cmd, #endif } break; + case SIOCGTUNFIB: + ifr->ifr_fib = sc->gif_fibnum; + break; + case SIOCSTUNFIB: + if ((error = priv_check(curthread, PRIV_NET_GIF)) != 0) + break; + if (ifr->ifr_fib >= rt_numfibs) + error = EINVAL; + else + sc->gif_fibnum = ifr->ifr_fib; + break; case GIFGOPTS: options = sc->gif_options; error = copyout(&options, ifr->ifr_data, sizeof(options)); @@ -934,7 +945,6 @@ gif_ioctl(struct ifnet *ifp, u_long cmd, else sc->gif_options = options; break; - default: error = EINVAL; break; Modified: stable/10/sys/net/if_gre.c ============================================================================== --- stable/10/sys/net/if_gre.c Sat Jun 6 13:29:41 2015 (r284073) +++ stable/10/sys/net/if_gre.c Sat Jun 6 13:37:11 2015 (r284074) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef INET @@ -441,6 +442,17 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, #endif } break; + case SIOCGTUNFIB: + ifr->ifr_fib = sc->gre_fibnum; + break; + case SIOCSTUNFIB: + if ((error = priv_check(curthread, PRIV_NET_GRE)) != 0) + break; + if (ifr->ifr_fib >= rt_numfibs) + error = EINVAL; + else + sc->gre_fibnum = ifr->ifr_fib; + break; case GRESKEY: if ((error = priv_check(curthread, PRIV_NET_GRE)) != 0) break; @@ -454,7 +466,8 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, } break; case GREGKEY: - error = copyout(&sc->gre_key, ifr->ifr_data, sizeof(sc->gre_key)); + error = copyout(&sc->gre_key, ifr->ifr_data, + sizeof(sc->gre_key)); break; case GRESOPTS: if ((error = priv_check(curthread, PRIV_NET_GRE)) != 0) @@ -725,7 +738,7 @@ gre_input(struct mbuf **mp, int *offp, i m_adj(m, *offp + hlen); m_clrprotoflags(m); m->m_pkthdr.rcvif = ifp; - M_SETFIB(m, sc->gre_fibnum); + M_SETFIB(m, ifp->if_fib); #ifdef MAC mac_ifnet_create_mbuf(ifp, m); #endif Modified: stable/10/sys/net/if_me.c ============================================================================== --- stable/10/sys/net/if_me.c Sat Jun 6 13:29:41 2015 (r284073) +++ stable/10/sys/net/if_me.c Sat Jun 6 13:37:11 2015 (r284074) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -298,6 +299,17 @@ me_ioctl(struct ifnet *ifp, u_long cmd, if (error != 0) memset(src, 0, sizeof(*src)); break; + case SIOCGTUNFIB: + ifr->ifr_fib = sc->me_fibnum; + break; + case SIOCSTUNFIB: + if ((error = priv_check(curthread, PRIV_NET_GRE)) != 0) + break; + if (ifr->ifr_fib >= rt_numfibs) + error = EINVAL; + else + sc->me_fibnum = ifr->ifr_fib; + break; default: error = EINVAL; break; @@ -463,7 +475,7 @@ me_input(struct mbuf **mp, int *offp, in m_clrprotoflags(m); m->m_pkthdr.rcvif = ifp; m->m_pkthdr.csum_flags |= (CSUM_IP_CHECKED | CSUM_IP_VALID); - M_SETFIB(m, sc->me_fibnum); + M_SETFIB(m, ifp->if_fib); hlen = AF_INET; BPF_MTAP2(ifp, &hlen, sizeof(hlen), m); if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); Modified: stable/10/sys/sys/sockio.h ============================================================================== --- stable/10/sys/sys/sockio.h Sat Jun 6 13:29:41 2015 (r284073) +++ stable/10/sys/sys/sockio.h Sat Jun 6 13:37:11 2015 (r284074) @@ -113,6 +113,9 @@ #define SIOCGIFFIB _IOWR('i', 92, struct ifreq) /* get IF fib */ #define SIOCSIFFIB _IOW('i', 93, struct ifreq) /* set IF fib */ +#define SIOCGTUNFIB _IOWR('i', 94, struct ifreq) /* get tunnel fib */ +#define SIOCSTUNFIB _IOW('i', 95, struct ifreq) /* set tunnel fib */ + #define SIOCSDRVSPEC _IOW('i', 123, struct ifdrv) /* set driver-specific parameters */ #define SIOCGDRVSPEC _IOWR('i', 123, struct ifdrv) /* get driver-specific From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 13:39:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C868DC5E; Sat, 6 Jun 2015 13:39:21 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CA781FB2; Sat, 6 Jun 2015 13:39:21 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56DdLGJ047039; Sat, 6 Jun 2015 13:39:21 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56DdL1C047038; Sat, 6 Jun 2015 13:39:21 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506061339.t56DdL1C047038@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 6 Jun 2015 13:39: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: r284075 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 13:39:21 -0000 Author: ae Date: Sat Jun 6 13:39:20 2015 New Revision: 284075 URL: https://svnweb.freebsd.org/changeset/base/284075 Log: MFC r283897: Add example how to configure gre(4) tunnel with the same inner and outer addresses using multiple FIBs. Modified: stable/10/share/man/man4/gre.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/gre.4 ============================================================================== --- stable/10/share/man/man4/gre.4 Sat Jun 6 13:37:11 2015 (r284074) +++ stable/10/share/man/man4/gre.4 Sat Jun 6 13:39:20 2015 (r284075) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 7, 2014 +.Dd June 2, 2015 .Dt GRE 4 .Os .Sh NAME @@ -118,6 +118,44 @@ ifconfig greN inet 192.168.2.1 192.168.1 ifconfig greN inet tunnel B A route add -net 192.168.1 -netmask 255.255.255.0 192.168.1.1 .Ed +.Pp +In case when internal and external IP addresses are the same, +different routing tables (FIB) should be used. +The default FIB will be applied to IP packets before GRE encapsulation. +After encapsulation GRE interface should set different FIB number to +outgoing packet. +Then different FIB will be applied to such encapsulated packets. +According to this FIB packet should be routed to tunnel endpoint. +.Bd -literal +Host X -- Host A (198.51.100.1) ---tunnel--- Cisco D (203.0.113.1) -- Host E + \\ / + \\ / + +----- Host B ----- Host C -----+ + (198.51.100.254) +.Ed +.Pp +On Host A (FreeBSD): +.Pp +First of multiple FIBs should be configured via loader.conf: +.Bd -literal -offset indent +net.fibs=2 +net.add_addr_allfibs=0 +.Ed +.Pp +Then routes to the gateway and remote tunnel endpoint via this gateway +should be added to the second FIB: +.Bd -literal -offset indent +route add -net 198.51.100.0 -netmask 255.255.255.0 -fib 1 -iface em0 +route add -host 203.0.113.1 -fib 1 198.51.100.254 +.Ed +.Pp +And GRE tunnel should be configured to change FIB for encapsulated packets: +.Bd -literal -offset indent +ifconfig greN create +ifconfig greN inet 198.51.100.1 203.0.113.1 +ifconfig greN inet tunnel 198.51.100.1 203.0.113.1 tunnelfib 1 +.Ed +.Pp .Sh NOTES The MTU of .Nm From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 13:49:55 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E54AA259; Sat, 6 Jun 2015 13:49:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA6F8120D; Sat, 6 Jun 2015 13:49:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56DntZ4052141; Sat, 6 Jun 2015 13:49:55 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56Dnts4052140; Sat, 6 Jun 2015 13:49:55 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506061349.t56Dnts4052140@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 6 Jun 2015 13:49:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284076 - head/sbin/badsect 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 13:49:56 -0000 Author: bapt Date: Sat Jun 6 13:49:54 2015 New Revision: 284076 URL: https://svnweb.freebsd.org/changeset/base/284076 Log: Remove useless WARNS Modified: head/sbin/badsect/Makefile Modified: head/sbin/badsect/Makefile ============================================================================== --- head/sbin/badsect/Makefile Sat Jun 6 13:39:20 2015 (r284075) +++ head/sbin/badsect/Makefile Sat Jun 6 13:49:54 2015 (r284076) @@ -4,6 +4,5 @@ PROG= badsect LIBADD= ufs MAN= badsect.8 -WARNS?= 2 .include From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 14:26:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EEA8B6A3; Sat, 6 Jun 2015 14:26:40 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD0F31AE5; Sat, 6 Jun 2015 14:26:40 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56EQef2071611; Sat, 6 Jun 2015 14:26:40 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56EQer6071610; Sat, 6 Jun 2015 14:26:40 GMT (envelope-from br@FreeBSD.org) Message-Id: <201506061426.t56EQer6071610@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Sat, 6 Jun 2015 14:26:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284077 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 14:26:41 -0000 Author: br Date: Sat Jun 6 14:26:40 2015 New Revision: 284077 URL: https://svnweb.freebsd.org/changeset/base/284077 Log: Include a header required for vtophys(). Modified: head/sys/arm/freescale/imx/imx6_sdma.c Modified: head/sys/arm/freescale/imx/imx6_sdma.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_sdma.c Sat Jun 6 13:49:54 2015 (r284076) +++ head/sys/arm/freescale/imx/imx6_sdma.c Sat Jun 6 14:26:40 2015 (r284077) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 15:51:13 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C97F6E78; Sat, 6 Jun 2015 15:51:13 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABC401DF6; Sat, 6 Jun 2015 15:51:13 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56FpD2O014382; Sat, 6 Jun 2015 15:51:13 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56FpCbX013048; Sat, 6 Jun 2015 15:51:12 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506061551.t56FpCbX013048@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sat, 6 Jun 2015 15:51:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284078 - head/sys/dev/pci 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 15:51:14 -0000 Author: marcel Date: Sat Jun 6 15:51:11 2015 New Revision: 284078 URL: https://svnweb.freebsd.org/changeset/base/284078 Log: Don't return -10000 as the probe priority. That's lower than what BUS_PROBE_HOOVER is. Drivers like proto(4), when compiled into the kernel or preloaded, will render your system useless by virtue of attaching to your PCI busses. Return BUS_PROBE_GENERIC instead. It's just the next priority up from BUS_PROBE_HOOVER. No other meaning has been give to its use. While BUS_PROBE_DEFAULT seems like a better candidate, it's hard not to think that there must be some reason why these drivers return -10000 in the first place. Differential Revision: D2705 Modified: head/sys/dev/pci/eisa_pci.c head/sys/dev/pci/hostb_pci.c head/sys/dev/pci/ignore_pci.c head/sys/dev/pci/isa_pci.c head/sys/dev/pci/pci_pci.c Modified: head/sys/dev/pci/eisa_pci.c ============================================================================== --- head/sys/dev/pci/eisa_pci.c Sat Jun 6 14:26:40 2015 (r284077) +++ head/sys/dev/pci/eisa_pci.c Sat Jun 6 15:51:11 2015 (r284078) @@ -100,7 +100,7 @@ eisab_probe(device_t dev) if (matched) { device_set_desc(dev, "PCI-EISA bridge"); - return(-10000); + return (BUS_PROBE_GENERIC); } return(ENXIO); } Modified: head/sys/dev/pci/hostb_pci.c ============================================================================== --- head/sys/dev/pci/hostb_pci.c Sat Jun 6 14:26:40 2015 (r284077) +++ head/sys/dev/pci/hostb_pci.c Sat Jun 6 15:51:11 2015 (r284078) @@ -63,7 +63,7 @@ pci_hostb_probe(device_t dev) pci_get_subclass(dev) == PCIS_BRIDGE_HOST) { device_set_desc(dev, "Host to PCI bridge"); device_quiet(dev); - return (-10000); + return (BUS_PROBE_GENERIC); } return (ENXIO); } Modified: head/sys/dev/pci/ignore_pci.c ============================================================================== --- head/sys/dev/pci/ignore_pci.c Sat Jun 6 14:26:40 2015 (r284077) +++ head/sys/dev/pci/ignore_pci.c Sat Jun 6 15:51:11 2015 (r284078) @@ -66,7 +66,7 @@ ignore_pci_probe(device_t dev) case 0x10001042ul: /* SMC 37C665 */ device_set_desc(dev, "ignored"); device_quiet(dev); - return(-10000); + return (BUS_PROBE_GENERIC); } return(ENXIO); } Modified: head/sys/dev/pci/isa_pci.c ============================================================================== --- head/sys/dev/pci/isa_pci.c Sat Jun 6 14:26:40 2015 (r284077) +++ head/sys/dev/pci/isa_pci.c Sat Jun 6 15:51:11 2015 (r284078) @@ -154,7 +154,7 @@ isab_pci_probe(device_t dev) if (matched) { device_set_desc(dev, "PCI-ISA bridge"); - return(-10000); + return (BUS_PROBE_GENERIC); } return(ENXIO); } Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Sat Jun 6 14:26:40 2015 (r284077) +++ head/sys/dev/pci/pci_pci.c Sat Jun 6 15:51:11 2015 (r284078) @@ -890,7 +890,7 @@ pcib_probe(device_t dev) if ((pci_get_class(dev) == PCIC_BRIDGE) && (pci_get_subclass(dev) == PCIS_BRIDGE_PCI)) { device_set_desc(dev, "PCI-PCI bridge"); - return(-10000); + return (BUS_PROBE_GENERIC); } return(ENXIO); } From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 16:03:47 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB7F3242; Sat, 6 Jun 2015 16:03:47 +0000 (UTC) (envelope-from jhb@freebsd.org) 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 96AE81098; Sat, 6 Jun 2015 16:03:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 04F61B926; Sat, 6 Jun 2015 12:03:46 -0400 (EDT) From: John Baldwin To: Marcel Moolenaar Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284078 - head/sys/dev/pci Date: Sat, 06 Jun 2015 12:03:38 -0400 Message-ID: <14005803.mtbqcRkBJG@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.1-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201506061551.t56FpCbX013048@svn.freebsd.org> References: <201506061551.t56FpCbX013048@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); Sat, 06 Jun 2015 12:03:46 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 16:03:47 -0000 On Saturday, June 06, 2015 03:51:12 PM Marcel Moolenaar wrote: > Author: marcel > Date: Sat Jun 6 15:51:11 2015 > New Revision: 284078 > URL: https://svnweb.freebsd.org/changeset/base/284078 > > Log: > Don't return -10000 as the probe priority. That's lower than what > BUS_PROBE_HOOVER is. Drivers like proto(4), when compiled into the > kernel or preloaded, will render your system useless by virtue of > attaching to your PCI busses. > > Return BUS_PROBE_GENERIC instead. It's just the next priority up > from BUS_PROBE_HOOVER. No other meaning has been give to its use. > While BUS_PROBE_DEFAULT seems like a better candidate, it's hard > not to think that there must be some reason why these drivers > return -10000 in the first place. BUS_PROBE_DEFAULT would conflict with other drivers that are supposed to override these, such as acpi_pcib_pci which should override pci_pci for PCI-PCI bridges in the ACPI namespace. That driver currently hardcodes -1000 itself. :-/ Then there's pcibios_pcib_probe for the $PIR PCI-PCI bridge driver for when ACPI isn't present. It returns -2000. The MPTable PCI-PCI bridge driver returns -1000 like ACPI. That relative order (ACPI and MPTable are most preferred, then $PIR, then generic PCI-PCI) is important for PCI INTx interrupt routing on x86. In general any platform which knows better how to route INTx interrupts than the swizzle defined for add-on cards that pci_pci uses should override the pci_pci driver via a higher probe value. In this case simply using the stock BUS_PROBE values doesn't quite work since there isn't just DEFAULT/GENERIC, but on x86 you have at least three levels. Also, BUS_PROBE_GENERIC does have a meaning and it is well suited to these drivers. It is for drivers that match large classes of devices rather than specific devices. In PCI terms that would mean a device that matches on class/subclass rather than vendor/device ID (which is true of these bridge drivers. ignore_pci is a different animal). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 16:09:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A6AA3DB; Sat, 6 Jun 2015 16:09:27 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4747310D2; Sat, 6 Jun 2015 16:09:27 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56G9Rcx021339; Sat, 6 Jun 2015 16:09:27 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56G9P66021328; Sat, 6 Jun 2015 16:09:25 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506061609.t56G9P66021328@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sat, 6 Jun 2015 16:09:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284079 - head/sys/dev/proto 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 16:09:27 -0000 Author: marcel Date: Sat Jun 6 16:09:25 2015 New Revision: 284079 URL: https://svnweb.freebsd.org/changeset/base/284079 Log: DMA support part 1: DMA tag create & destroy Create a special resource (= device special file) for management of tags and maps, as well as for mapping memory into the address space. DMA resources are managed using the PROTO_IOC_BUSDMA ioctl. Part 1 implements tag creation, derivation and destruction. Added: head/sys/dev/proto/proto_busdma.c (contents, props changed) head/sys/dev/proto/proto_busdma.h (contents, props changed) Modified: head/sys/dev/proto/proto.h head/sys/dev/proto/proto_bus_pci.c head/sys/dev/proto/proto_core.c head/sys/dev/proto/proto_dev.h Modified: head/sys/dev/proto/proto.h ============================================================================== --- head/sys/dev/proto/proto.h Sat Jun 6 15:51:11 2015 (r284078) +++ head/sys/dev/proto/proto.h Sat Jun 6 16:09:25 2015 (r284079) @@ -33,11 +33,15 @@ #define PROTO_RES_UNUSED 0 #define PROTO_RES_PCICFG 10 +#define PROTO_RES_BUSDMA 11 struct proto_res { int r_type; int r_rid; - struct resource *r_res; + union { + struct resource *res; + void *busdma; + } r_d; u_long r_size; union { void *cookie; Modified: head/sys/dev/proto/proto_bus_pci.c ============================================================================== --- head/sys/dev/proto/proto_bus_pci.c Sat Jun 6 15:51:11 2015 (r284078) +++ head/sys/dev/proto/proto_bus_pci.c Sat Jun 6 16:09:25 2015 (r284079) @@ -87,6 +87,7 @@ proto_pci_attach(device_t dev) sc = device_get_softc(dev); proto_add_resource(sc, PROTO_RES_PCICFG, 0, NULL); + proto_add_resource(sc, PROTO_RES_BUSDMA, 0, NULL); for (bar = 0; bar < PCIR_MAX_BAR_0; bar++) { rid = PCIR_BAR(bar); Added: head/sys/dev/proto/proto_busdma.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/proto/proto_busdma.c Sat Jun 6 16:09:25 2015 (r284079) @@ -0,0 +1,167 @@ +/*- + * Copyright (c) 2015 Marcel Moolenaar + * 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 + +MALLOC_DEFINE(M_PROTO_BUSDMA, "proto_busdma", "DMA management data"); + +static int +proto_busdma_tag_create(struct proto_ioc_busdma *ioc, + struct proto_tag **tag_io, bus_dma_tag_t *busdma_tag_io) +{ + struct proto_tag *tag; + int error; + + error = bus_dma_tag_create(*busdma_tag_io, ioc->u.tag.align, + ioc->u.tag.bndry, ioc->u.tag.maxaddr, BUS_SPACE_MAXADDR, + NULL, NULL, ioc->u.tag.maxsz, ioc->u.tag.nsegs, + ioc->u.tag.maxsegsz, ioc->u.tag.flags, NULL, NULL, + busdma_tag_io); + if (error) + return (error); + + tag = malloc(sizeof(*tag), M_PROTO_BUSDMA, M_WAITOK | M_ZERO); + tag->parent = *tag_io; + tag->busdma_tag = *busdma_tag_io; + *tag_io = tag; + return (0); +} + +static void +proto_busdma_tag_destroy(struct proto_tag *tag) +{ + + bus_dma_tag_destroy(tag->busdma_tag); + free(tag, M_PROTO_BUSDMA); +} + +static struct proto_tag * +proto_busdma_tag_lookup(struct proto_busdma *busdma, u_long key) +{ + struct proto_tag *tag; + + LIST_FOREACH(tag, &busdma->tags, link) { + if ((void *)tag == (void *)key) + return (tag); + } + return (NULL); +} + +struct proto_busdma * +proto_busdma_attach(struct proto_softc *sc) +{ + struct proto_busdma *busdma; + + busdma = malloc(sizeof(*busdma), M_PROTO_BUSDMA, M_WAITOK | M_ZERO); + return (busdma); +} + +int +proto_busdma_detach(struct proto_softc *sc, struct proto_busdma *busdma) +{ + + proto_busdma_cleanup(sc, busdma); + free(busdma, M_PROTO_BUSDMA); + return (0); +} + +int +proto_busdma_cleanup(struct proto_softc *sc, struct proto_busdma *busdma) +{ + struct proto_tag *tag, *tag1; + + LIST_FOREACH_SAFE(tag, &busdma->tags, link, tag1) { + LIST_REMOVE(tag, link); + proto_busdma_tag_destroy(tag); + } + return (0); +} + +int +proto_busdma_ioctl(struct proto_softc *sc, struct proto_busdma *busdma, + struct proto_ioc_busdma *ioc) +{ + struct proto_tag *tag; + bus_dma_tag_t busdma_tag; + int error; + + error = 0; + switch (ioc->request) { + case PROTO_IOC_BUSDMA_TAG_CREATE: + busdma_tag = bus_get_dma_tag(sc->sc_dev); + tag = NULL; + error = proto_busdma_tag_create(ioc, &tag, &busdma_tag); + if (error) + break; + LIST_INSERT_HEAD(&busdma->tags, tag, link); + ioc->key = (uintptr_t)(void *)tag; + break; + case PROTO_IOC_BUSDMA_TAG_DERIVE: + tag = proto_busdma_tag_lookup(busdma, ioc->key); + if (tag == NULL) { + error = EINVAL; + break; + } + busdma_tag = tag->busdma_tag; + error = proto_busdma_tag_create(ioc, &tag, &busdma_tag); + if (error) + break; + LIST_INSERT_HEAD(&busdma->tags, tag, link); + ioc->key = (uintptr_t)(void *)tag; + break; + case PROTO_IOC_BUSDMA_TAG_DESTROY: + tag = proto_busdma_tag_lookup(busdma, ioc->key); + if (tag == NULL) { + error = EINVAL; + break; + } + LIST_REMOVE(tag, link); + proto_busdma_tag_destroy(tag); + break; + default: + error = EINVAL; + break; + } + return (error); +} Added: head/sys/dev/proto/proto_busdma.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/proto/proto_busdma.h Sat Jun 6 16:09:25 2015 (r284079) @@ -0,0 +1,50 @@ +/*- + * Copyright (c) 2015 Marcel Moolenaar + * 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_PROTO_BUSDMA_H_ +#define _DEV_PROTO_BUSDMA_H_ + +struct proto_tag { + LIST_ENTRY(proto_tag) link; + struct proto_tag *parent; + bus_dma_tag_t busdma_tag; +}; + +struct proto_busdma { + LIST_HEAD(,proto_tag) tags; +}; + +struct proto_busdma *proto_busdma_attach(struct proto_softc *); +int proto_busdma_detach(struct proto_softc *, struct proto_busdma *); + +int proto_busdma_cleanup(struct proto_softc *, struct proto_busdma *); + +int proto_busdma_ioctl(struct proto_softc *, struct proto_busdma *, + struct proto_ioc_busdma *); + +#endif /* _DEV_PROTO_BUSDMA_H_ */ Modified: head/sys/dev/proto/proto_core.c ============================================================================== --- head/sys/dev/proto/proto_core.c Sat Jun 6 15:51:11 2015 (r284078) +++ head/sys/dev/proto/proto_core.c Sat Jun 6 16:09:25 2015 (r284079) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include CTASSERT(SYS_RES_IRQ != PROTO_RES_UNUSED && SYS_RES_MEMORY != PROTO_RES_UNUSED && @@ -58,6 +59,9 @@ CTASSERT(SYS_RES_IRQ != PROTO_RES_UNUSED CTASSERT(SYS_RES_IRQ != PROTO_RES_PCICFG && SYS_RES_MEMORY != PROTO_RES_PCICFG && SYS_RES_IOPORT != PROTO_RES_PCICFG); +CTASSERT(SYS_RES_IRQ != PROTO_RES_BUSDMA && + SYS_RES_MEMORY != PROTO_RES_BUSDMA && + SYS_RES_IOPORT != PROTO_RES_BUSDMA); devclass_t proto_devclass; char proto_driver_name[] = "proto"; @@ -97,7 +101,7 @@ proto_add_resource(struct proto_softc *s r = sc->sc_res + sc->sc_rescnt++; r->r_type = type; r->r_rid = rid; - r->r_res = res; + r->r_d.res = res; return (0); } @@ -130,7 +134,7 @@ proto_attach(device_t dev) break; case SYS_RES_MEMORY: case SYS_RES_IOPORT: - r->r_size = rman_get_size(r->r_res); + r->r_size = rman_get_size(r->r_d.res); r->r_u.cdev = make_dev(&proto_devsw, res, 0, 0, 0666, "proto/%s/%02x.%s", device_get_desc(dev), r->r_rid, (r->r_type == SYS_RES_IOPORT) ? "io" : "mem"); @@ -144,6 +148,14 @@ proto_attach(device_t dev) r->r_u.cdev->si_drv1 = sc; r->r_u.cdev->si_drv2 = r; break; + case PROTO_RES_BUSDMA: + r->r_d.busdma = proto_busdma_attach(sc); + r->r_size = 0; /* no read(2) nor write(2) */ + r->r_u.cdev = make_dev(&proto_devsw, res, 0, 0, 0666, + "proto/%s/busdma", device_get_desc(dev)); + r->r_u.cdev->si_drv1 = sc; + r->r_u.cdev->si_drv2 = r; + break; } } return (0); @@ -158,7 +170,7 @@ proto_detach(device_t dev) sc = device_get_softc(dev); - /* Don't detach if we have open device filess. */ + /* Don't detach if we have open device files. */ for (res = 0; res < sc->sc_rescnt; res++) { r = sc->sc_res + res; if (r->r_opened) @@ -170,17 +182,22 @@ proto_detach(device_t dev) switch (r->r_type) { case SYS_RES_IRQ: /* XXX TODO */ + bus_release_resource(dev, r->r_type, r->r_rid, + r->r_d.res); break; case SYS_RES_MEMORY: case SYS_RES_IOPORT: + bus_release_resource(dev, r->r_type, r->r_rid, + r->r_d.res); + destroy_dev(r->r_u.cdev); + break; case PROTO_RES_PCICFG: destroy_dev(r->r_u.cdev); break; - } - if (r->r_res != NULL) { - bus_release_resource(dev, r->r_type, r->r_rid, - r->r_res); - r->r_res = NULL; + case PROTO_RES_BUSDMA: + proto_busdma_detach(sc, r->r_d.busdma); + destroy_dev(r->r_u.cdev); + break; } r->r_type = PROTO_RES_UNUSED; } @@ -207,10 +224,14 @@ static int proto_close(struct cdev *cdev, int fflag, int devtype, struct thread *td) { struct proto_res *r; + struct proto_softc *sc; + sc = cdev->si_drv1; r = cdev->si_drv2; if (!atomic_cmpset_acq_ptr(&r->r_opened, (uintptr_t)td->td_proc, 0UL)) return (ENXIO); + if (r->r_type == PROTO_RES_BUSDMA) + proto_busdma_cleanup(sc, r->r_d.busdma); return (0); } @@ -244,21 +265,21 @@ proto_read(struct cdev *cdev, struct uio switch (width) { case 1: buf.x1[0] = (r->r_type == PROTO_RES_PCICFG) ? - pci_read_config(dev, ofs, 1) : bus_read_1(r->r_res, ofs); + pci_read_config(dev, ofs, 1) : bus_read_1(r->r_d.res, ofs); break; case 2: buf.x2[0] = (r->r_type == PROTO_RES_PCICFG) ? - pci_read_config(dev, ofs, 2) : bus_read_2(r->r_res, ofs); + pci_read_config(dev, ofs, 2) : bus_read_2(r->r_d.res, ofs); break; case 4: buf.x4[0] = (r->r_type == PROTO_RES_PCICFG) ? - pci_read_config(dev, ofs, 4) : bus_read_4(r->r_res, ofs); + pci_read_config(dev, ofs, 4) : bus_read_4(r->r_d.res, ofs); break; #ifndef __i386__ case 8: if (r->r_type == PROTO_RES_PCICFG) return (EINVAL); - buf.x8[0] = bus_read_8(r->r_res, ofs); + buf.x8[0] = bus_read_8(r->r_d.res, ofs); break; #endif default: @@ -305,25 +326,25 @@ proto_write(struct cdev *cdev, struct ui if (r->r_type == PROTO_RES_PCICFG) pci_write_config(dev, ofs, buf.x1[0], 1); else - bus_write_1(r->r_res, ofs, buf.x1[0]); + bus_write_1(r->r_d.res, ofs, buf.x1[0]); break; case 2: if (r->r_type == PROTO_RES_PCICFG) pci_write_config(dev, ofs, buf.x2[0], 2); else - bus_write_2(r->r_res, ofs, buf.x2[0]); + bus_write_2(r->r_d.res, ofs, buf.x2[0]); break; case 4: if (r->r_type == PROTO_RES_PCICFG) pci_write_config(dev, ofs, buf.x4[0], 4); else - bus_write_4(r->r_res, ofs, buf.x4[0]); + bus_write_4(r->r_d.res, ofs, buf.x4[0]); break; #ifndef __i386__ case 8: if (r->r_type == PROTO_RES_PCICFG) return (EINVAL); - bus_write_8(r->r_res, ofs, buf.x8[0]); + bus_write_8(r->r_d.res, ofs, buf.x8[0]); break; #endif default: @@ -338,9 +359,12 @@ proto_ioctl(struct cdev *cdev, u_long cm struct thread *td) { struct proto_ioc_region *region; + struct proto_ioc_busdma *busdma; struct proto_res *r; + struct proto_softc *sc; int error; + sc = cdev->si_drv1; r = cdev->si_drv2; error = 0; @@ -351,7 +375,11 @@ proto_ioctl(struct cdev *cdev, u_long cm if (r->r_type == PROTO_RES_PCICFG) region->address = 0; else - region->address = rman_get_start(r->r_res); + region->address = rman_get_start(r->r_d.res); + break; + case PROTO_IOC_BUSDMA: + busdma = (struct proto_ioc_busdma *)data; + error = proto_busdma_ioctl(sc, r->r_d.busdma, busdma); break; default: error = ENOIOCTL; @@ -376,7 +404,7 @@ proto_mmap(struct cdev *cdev, vm_ooffset return (EACCES); if (offset >= r->r_size) return (EINVAL); - *paddr = rman_get_start(r->r_res) + offset; + *paddr = rman_get_start(r->r_d.res) + offset; #ifndef __sparc64__ *memattr = VM_MEMATTR_UNCACHEABLE; #endif Modified: head/sys/dev/proto/proto_dev.h ============================================================================== --- head/sys/dev/proto/proto_dev.h Sat Jun 6 15:51:11 2015 (r284078) +++ head/sys/dev/proto/proto_dev.h Sat Jun 6 16:09:25 2015 (r284079) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Marcel Moolenaar + * Copyright (c) 2014, 2015 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -40,4 +40,27 @@ struct proto_ioc_region { #define PROTO_IOC_REGION _IOWR(PROTO_IOC_CLASS, 1, struct proto_ioc_region) +struct proto_ioc_busdma { + unsigned int request; +#define PROTO_IOC_BUSDMA_TAG_CREATE 1 +#define PROTO_IOC_BUSDMA_TAG_DERIVE 2 +#define PROTO_IOC_BUSDMA_TAG_DESTROY 3 + unsigned long key; + union { + struct { + unsigned long align; + unsigned long bndry; + unsigned long maxaddr; + unsigned long maxsz; + unsigned long maxsegsz; + unsigned int nsegs; + unsigned int datarate; + unsigned int flags; + } tag; + } u; + unsigned long result; +}; + +#define PROTO_IOC_BUSDMA _IOWR(PROTO_IOC_CLASS, 2, struct proto_ioc_busdma) + #endif /* _DEV_PROTO_H_ */ From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 16:14:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B7F2571; Sat, 6 Jun 2015 16:14:06 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 080CA132B; Sat, 6 Jun 2015 16:14:06 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56GE5ND025634; Sat, 6 Jun 2015 16:14:05 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56GE4SV025621; Sat, 6 Jun 2015 16:14:04 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506061614.t56GE4SV025621@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sat, 6 Jun 2015 16:14:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284080 - in head/tools/bus_space: . C Python 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 16:14:06 -0000 Author: marcel Date: Sat Jun 6 16:14:03 2015 New Revision: 284080 URL: https://svnweb.freebsd.org/changeset/base/284080 Log: Add DMA tag management to the C library and Python binding. Added: head/tools/bus_space/busdma.c (contents, props changed) head/tools/bus_space/busdma.h (contents, props changed) Modified: head/tools/bus_space/C/Makefile head/tools/bus_space/C/lang.c head/tools/bus_space/C/libbus_space.h head/tools/bus_space/Makefile.inc head/tools/bus_space/Python/lang.c Modified: head/tools/bus_space/C/Makefile ============================================================================== --- head/tools/bus_space/C/Makefile Sat Jun 6 16:09:25 2015 (r284079) +++ head/tools/bus_space/C/Makefile Sat Jun 6 16:14:03 2015 (r284080) @@ -3,6 +3,7 @@ LIB= bus_space SHLIB_MAJOR= 0 SRCS= lang.c +INCS= libbus_space.h CFLAGS+= -I${.CURDIR}/.. Modified: head/tools/bus_space/C/lang.c ============================================================================== --- head/tools/bus_space/C/lang.c Sat Jun 6 16:09:25 2015 (r284079) +++ head/tools/bus_space/C/lang.c Sat Jun 6 16:14:03 2015 (r284080) @@ -31,9 +31,10 @@ __FBSDID("$FreeBSD$"); #include #include "bus_space.h" +#include "busdma.h" #include "libbus_space.h" -int +int16_t bus_space_read_1(int rid, long ofs) { uint8_t val; @@ -41,7 +42,7 @@ bus_space_read_1(int rid, long ofs) return ((!bs_read(rid, ofs, &val, sizeof(val))) ? -1 : (int)val); } -int +int32_t bus_space_read_2(int rid, long ofs) { uint16_t val; @@ -98,3 +99,41 @@ bus_space_subregion(int rid, long ofs, l return (bs_subregion(rid, ofs, sz)); } + +int +busdma_tag_create(const char *dev, bus_addr_t align, bus_addr_t bndry, + bus_addr_t maxaddr, bus_size_t maxsz, u_int nsegs, bus_size_t maxsegsz, + u_int datarate, u_int flags, busdma_tag_t *out_p) +{ + int res; + + res = bd_tag_create(dev, align, bndry, maxaddr, maxsz, nsegs, maxsegsz, + datarate, flags); + if (res == -1) + return (errno); + *out_p = res; + return (0); +} + +int +busdma_tag_derive(busdma_tag_t tag, bus_addr_t align, bus_addr_t bndry, + bus_addr_t maxaddr, bus_size_t maxsz, u_int nsegs, bus_size_t maxsegsz, + u_int datarate, u_int flags, busdma_tag_t *out_p) +{ + int res; + + res = bd_tag_derive(tag, align, bndry, maxaddr, maxsz, nsegs, maxsegsz, + datarate, flags); + if (res == -1) + return (errno); + *out_p = res; + return (0); +} + +int +busdma_tag_destroy(busdma_tag_t tag) +{ + + return (bd_tag_destroy(tag)); +} + Modified: head/tools/bus_space/C/libbus_space.h ============================================================================== --- head/tools/bus_space/C/libbus_space.h Sat Jun 6 16:09:25 2015 (r284079) +++ head/tools/bus_space/C/libbus_space.h Sat Jun 6 16:14:03 2015 (r284080) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Marcel Moolenaar + * Copyright (c) 2014, 2015 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,14 +29,28 @@ #ifndef _LIBBUS_SPACE_H_ #define _LIBBUS_SPACE_H_ -int bus_space_map(const char *dev); -int bus_space_read_1(int rid, long ofs); -int bus_space_read_2(int rid, long ofs); +int bus_space_map(const char *dev); +int16_t bus_space_read_1(int rid, long ofs); +int32_t bus_space_read_2(int rid, long ofs); int64_t bus_space_read_4(int rid, long ofs); -int bus_space_subregion(int rid, long ofs, long sz); -int bus_space_unmap(int rid); -int bus_space_write_1(int rid, long ofs, uint8_t val); -int bus_space_write_2(int rid, long ofs, uint16_t val); -int bus_space_write_4(int rid, long ofs, uint32_t val); +int bus_space_subregion(int rid, long ofs, long sz); +int bus_space_unmap(int rid); +int bus_space_write_1(int rid, long ofs, uint8_t val); +int bus_space_write_2(int rid, long ofs, uint16_t val); +int bus_space_write_4(int rid, long ofs, uint32_t val); + +typedef unsigned long bus_addr_t; +typedef unsigned long bus_size_t; +typedef int busdma_tag_t; + +int busdma_tag_create(const char *dev, bus_addr_t align, bus_addr_t bndry, + bus_addr_t maxaddr, bus_size_t maxsz, u_int nsegs, + bus_size_t maxsegsz, u_int datarate, u_int flags, + busdma_tag_t *out_p); +int busdma_tag_derive(busdma_tag_t tag, bus_addr_t align, bus_addr_t bndry, + bus_addr_t maxaddr, bus_size_t maxsz, u_int nsegs, + bus_size_t maxsegsz, u_int datarate, u_int flags, + busdma_tag_t *out_p); +int busdma_tag_destroy(busdma_tag_t tag); #endif /* _LIBBUS_SPACE_H_ */ Modified: head/tools/bus_space/Makefile.inc ============================================================================== --- head/tools/bus_space/Makefile.inc Sat Jun 6 16:09:25 2015 (r284079) +++ head/tools/bus_space/Makefile.inc Sat Jun 6 16:14:03 2015 (r284080) @@ -1,4 +1,4 @@ # $FreeBSD$ .PATH: ${.CURDIR}/.. -SRCS+= bus_space.c +SRCS+= bus_space.c busdma.c Modified: head/tools/bus_space/Python/lang.c ============================================================================== --- head/tools/bus_space/Python/lang.c Sat Jun 6 16:09:25 2015 (r284079) +++ head/tools/bus_space/Python/lang.c Sat Jun 6 16:14:03 2015 (r284080) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include "bus_space.h" +#include "busdma.h" static PyObject * bus_read_1(PyObject *self, PyObject *args) @@ -173,6 +174,58 @@ bus_subregion(PyObject *self, PyObject * return (Py_BuildValue("i", rid)); } +static PyObject * +busdma_tag_create(PyObject *self, PyObject *args) +{ + char *dev; + long align, bndry, maxaddr, maxsz, maxsegsz; + int tid, nsegs, datarate, flags; + + if (!PyArg_ParseTuple(args, "sllllilii", &dev, &align, &bndry, + &maxaddr, &maxsz, &nsegs, &maxsegsz, &datarate, &flags)) + return (NULL); + tid = bd_tag_create(dev, align, bndry, maxaddr, maxsz, nsegs, + maxsegsz, datarate, flags); + if (tid == -1) { + PyErr_SetString(PyExc_IOError, strerror(errno)); + return (NULL); + } + return (Py_BuildValue("i", tid)); +} + +static PyObject * +busdma_tag_derive(PyObject *self, PyObject *args) +{ + long align, bndry, maxaddr, maxsz, maxsegsz; + int ptid, tid, nsegs, datarate, flags; + + if (!PyArg_ParseTuple(args, "illllilii", &ptid, &align, &bndry, + &maxaddr, &maxsz, &nsegs, &maxsegsz, &datarate, &flags)) + return (NULL); + tid = bd_tag_derive(ptid, align, bndry, maxaddr, maxsz, nsegs, + maxsegsz, datarate, flags); + if (tid == -1) { + PyErr_SetString(PyExc_IOError, strerror(errno)); + return (NULL); + } + return (Py_BuildValue("i", tid)); +} + +static PyObject * +busdma_tag_destroy(PyObject *self, PyObject *args) +{ + int error, tid; + + if (!PyArg_ParseTuple(args, "i", &tid)) + return (NULL); + error = bd_tag_destroy(tid); + if (error) { + PyErr_SetString(PyExc_IOError, strerror(error)); + return (NULL); + } + Py_RETURN_NONE; +} + static PyMethodDef bus_space_methods[] = { { "read_1", bus_read_1, METH_VARARGS, "Read a 1-byte data item." }, { "read_2", bus_read_2, METH_VARARGS, "Read a 2-byte data item." }, @@ -192,9 +245,17 @@ static PyMethodDef bus_space_methods[] = { NULL, NULL, 0, NULL } }; +static PyMethodDef busdma_methods[] = { + { "tag_create", busdma_tag_create, METH_VARARGS, "Create a root tag." }, + { "tag_derive", busdma_tag_derive, METH_VARARGS, "Derive a child tag." }, + { "tag_destroy", busdma_tag_destroy, METH_VARARGS, "Destroy a tag." }, + { NULL, NULL, 0, NULL } +}; + PyMODINIT_FUNC initbus_space(void) { Py_InitModule("bus_space", bus_space_methods); + Py_InitModule("busdma", busdma_methods); } Added: head/tools/bus_space/busdma.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/bus_space/busdma.c Sat Jun 6 16:14:03 2015 (r284080) @@ -0,0 +1,218 @@ +/*- + * Copyright (c) 2015 Marcel Moolenaar + * 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 "busdma.h" + +#include "../../sys/dev/proto/proto_dev.h" + +struct tag { + int tid; + u_int refcnt; + int fd; + struct tag *ptag; + u_long key; + u_long align; + u_long bndry; + u_long maxaddr; +}; + +static struct tag **tidtbl = NULL; +static int ntids = 0; + +static struct tag * +tag_alloc(void) +{ + struct tag **newtbl, *tag; + int tid; + + tag = malloc(sizeof(struct tag)); + tag->refcnt = 0; + + for (tid = 0; tid < ntids; tid++) { + if (tidtbl[tid] == 0) + break; + } + if (tid == ntids) { + newtbl = realloc(tidtbl, sizeof(struct tag *) * (ntids + 1)); + if (newtbl == NULL) { + free(tag); + return (NULL); + } + tidtbl = newtbl; + ntids++; + } + tidtbl[tid] = tag; + tag->tid = tid; + return (tag); +} + +static int +tag_free(struct tag *tag) +{ + + tidtbl[tag->tid] = NULL; + free(tag); + return (0); +} + +static struct tag * +tid_lookup(int tid) +{ + struct tag *tag; + + if (tid < 0 || tid >= ntids) { + errno = EINVAL; + return (NULL); + } + tag = tidtbl[tid]; + if (tag->refcnt == 0) { + errno = ENXIO; + return (NULL); + } + return (tag); +} + +struct tag * +bd_tag_new(struct tag *ptag, int fd, u_long align, u_long bndry, + u_long maxaddr, u_long maxsz, u_int nsegs, u_long maxsegsz, + u_int datarate, u_int flags) +{ + struct proto_ioc_busdma ioc; + struct tag *tag; + + tag = tag_alloc(); + if (tag == NULL) + return (NULL); + + memset(&ioc, 0, sizeof(ioc)); + ioc.request = (ptag != NULL) ? PROTO_IOC_BUSDMA_TAG_DERIVE : + PROTO_IOC_BUSDMA_TAG_CREATE; + ioc.key = (ptag != NULL) ? ptag->key : 0; + ioc.u.tag.align = align; + ioc.u.tag.bndry = bndry; + ioc.u.tag.maxaddr = maxaddr; + ioc.u.tag.maxsz = maxsz; + ioc.u.tag.nsegs = nsegs; + ioc.u.tag.maxsegsz = maxsegsz; + ioc.u.tag.datarate = datarate; + ioc.u.tag.flags = flags; + if (ioctl(fd, PROTO_IOC_BUSDMA, &ioc) == -1) { + tag_free(tag); + return (NULL); + } + tag->refcnt = 1; + tag->fd = fd; + tag->ptag = ptag; + tag->key = ioc.key; + tag->align = ioc.u.tag.align; + tag->bndry = ioc.u.tag.bndry; + tag->maxaddr = ioc.u.tag.maxaddr; + return (tag); +} + +int +bd_tag_create(const char *dev, u_long align, u_long bndry, u_long maxaddr, + u_long maxsz, u_int nsegs, u_long maxsegsz, u_int datarate, u_int flags) +{ + struct tag *tag; + int fd; + + fd = open(dev, O_RDWR); + if (fd == -1) + return (-1); + + tag = bd_tag_new(NULL, fd, align, bndry, maxaddr, maxsz, nsegs, + maxsegsz, datarate, flags); + if (tag == NULL) { + close(fd); + return (-1); + } + return (tag->tid); +} + +int +bd_tag_derive(int ptid, u_long align, u_long bndry, u_long maxaddr, + u_long maxsz, u_int nsegs, u_long maxsegsz, u_int datarate, u_int flags) +{ + struct tag *ptag, *tag; + + ptag = tid_lookup(ptid); + if (ptag == NULL) + return (-1); + + tag = bd_tag_new(ptag, ptag->fd, align, bndry, maxaddr, maxsz, nsegs, + maxsegsz, datarate, flags); + if (tag == NULL) + return (-1); + while (ptag != NULL) { + ptag->refcnt++; + ptag = ptag->ptag; + } + return (tag->tid); +} + +int +bd_tag_destroy(int tid) +{ + struct proto_ioc_busdma ioc; + struct tag *ptag, *tag; + + tag = tid_lookup(tid); + if (tag == NULL) + return (errno); + if (tag->refcnt > 1) + return (EBUSY); + + memset(&ioc, 0, sizeof(ioc)); + ioc.request = PROTO_IOC_BUSDMA_TAG_DESTROY; + ioc.key = tag->key; + if (ioctl(tag->fd, PROTO_IOC_BUSDMA, &ioc) == -1) + return (errno); + + ptag = tag->ptag; + if (ptag == NULL) + close(tag->fd); + else { + do { + ptag->refcnt--; + ptag = ptag->ptag; + } while (ptag != NULL); + } + tag_free(tag); + return (0); +} Added: head/tools/bus_space/busdma.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/bus_space/busdma.h Sat Jun 6 16:14:03 2015 (r284080) @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 2015 Marcel Moolenaar + * 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 _TOOLS_BUS_DMA_H_ +#define _TOOLS_BUS_DMA_H_ + +int bd_tag_create(const char *dev, u_long align, u_long bndry, + u_long maxaddr, u_long maxsz, u_int nsegs, u_long maxsegsz, + u_int datarate, u_int flags); +int bd_tag_derive(int tid, u_long align, u_long bndry, u_long maxaddr, + u_long maxsz, u_int nsegs, u_long maxsegsz, u_int datarate, + u_int flags); +int bd_tag_destroy(int tid); + +#endif /* _TOOLS_BUS_DMA_H_ */ From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 16:18:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71F576D5; Sat, 6 Jun 2015 16:18:30 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3940E1346; Sat, 6 Jun 2015 16:18:29 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from [192.168.2.22] (atc.xcllnt.net [50.0.150.213]) (authenticated bits=0) by mail.xcllnt.net (8.14.9/8.14.9) with ESMTP id t56GIMGZ029319 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 6 Jun 2015 09:18:23 -0700 (PDT) (envelope-from marcel@xcllnt.net) Subject: Re: svn commit: r284078 - head/sys/dev/pci Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/signed; boundary="Apple-Mail=_207B226B-160B-4BE9-B25F-24AEBBBAFBC2"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Marcel Moolenaar In-Reply-To: <14005803.mtbqcRkBJG@ralph.baldwin.cx> Date: Sat, 6 Jun 2015 09:18:22 -0700 Cc: Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201506061551.t56FpCbX013048@svn.freebsd.org> <14005803.mtbqcRkBJG@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 16:18:30 -0000 --Apple-Mail=_207B226B-160B-4BE9-B25F-24AEBBBAFBC2 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Jun 6, 2015, at 9:03 AM, John Baldwin wrote: > > On Saturday, June 06, 2015 03:51:12 PM Marcel Moolenaar wrote: >> Author: marcel >> Date: Sat Jun 6 15:51:11 2015 >> New Revision: 284078 >> URL: https://svnweb.freebsd.org/changeset/base/284078 >> >> Log: >> Don't return -10000 as the probe priority. That's lower than what >> BUS_PROBE_HOOVER is. Drivers like proto(4), when compiled into the >> kernel or preloaded, will render your system useless by virtue of >> attaching to your PCI busses. >> >> Return BUS_PROBE_GENERIC instead. It's just the next priority up >> from BUS_PROBE_HOOVER. No other meaning has been give to its use. >> While BUS_PROBE_DEFAULT seems like a better candidate, it's hard >> not to think that there must be some reason why these drivers >> return -10000 in the first place. > > BUS_PROBE_DEFAULT would conflict with other drivers that are supposed to > override these, such as acpi_pcib_pci which should override pci_pci > for PCI-PCI bridges in the ACPI namespace. That driver currently hardcodes > -1000 itself. :-/ Then there's pcibios_pcib_probe for the $PIR PCI-PCI > bridge driver for when ACPI isn't present. It returns -2000. The > MPTable PCI-PCI bridge driver returns -1000 like ACPI. So that means we have a regression. Do you want me to back out or should we just move forward and fix those too. An alternative is to change BUS_PROBE_HOOVER to -100000 and be done with it. Thoughts? -- Marcel Moolenaar marcel@xcllnt.net --Apple-Mail=_207B226B-160B-4BE9-B25F-24AEBBBAFBC2 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 iQIcBAEBCgAGBQJVcx1OAAoJEIda8t8f0tjjCBUQANIz8UAlVPimSGYGez0HRsBm O5UJXOYArWcgNYfJesU5XkJ9eeLstcPtEZfo64S7iCC4hN1KhXIEI5HonlU8b4b5 GzNx4URq4f6yIZ+T1P3Lj354JaMlHrCVzP4fZ748GXB8YZJbaPFOMlZei/A2jKv2 X0ExIVHBLBLnAWtYFLMrtxkb8y2DqnbwcH5twVvD7q+tvne+syBBQCeWJRlA/4jI deWg8YwmbbQMK/c3xkIWE+YiOK/YwV3cbh+lGjokvWk/2SyQkE2XROwIIjE/bTI7 9oWF/HQPHl5HcGqWUNsWQe71whBxq2tQam6WnSk2iHNeKnDh7PSRY0S3fukAUuPI LWMLuMov5duoqumEcU8W+byT4kRIh0bZsXf/AEtrQ3/gwXRwnhNFyyGoAo3Twci9 GA2MJCXo9jZalhilrIg1r7bCR18ha7+LX7yUTH37BiJpB5z+r9jds9XCsm6lUjvV PsosuCmu/dDm7K88xUPwSCaqTWVvI5/T7roHF6+YOIAHW+ERs+qSMBCNttCbEGQJ YOKX37PfoGlaz4zNGOBA/3wiIvSi/Ks9SKBleTNONyA1ibajQhoWl/bgRUiFiIfz e8jOPn/FcqL3il+vLxzctbKRD1uwL8Vq0ogdFkuWGT46FQBNohALkDYXn6YsIdRa 2540SsBJlX5bwhNj7Jx7 =S0AO -----END PGP SIGNATURE----- --Apple-Mail=_207B226B-160B-4BE9-B25F-24AEBBBAFBC2-- From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 16:20:40 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F100A824; Sat, 6 Jun 2015 16:20:39 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEA6D139C; Sat, 6 Jun 2015 16:20:39 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56GKdKF029143; Sat, 6 Jun 2015 16:20:39 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56GKdf8029142; Sat, 6 Jun 2015 16:20:39 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506061620.t56GKdf8029142@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sat, 6 Jun 2015 16:20:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284081 - head/sys/modules/proto 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 16:20:40 -0000 Author: marcel Date: Sat Jun 6 16:20:39 2015 New Revision: 284081 URL: https://svnweb.freebsd.org/changeset/base/284081 Log: Add proto_busdma.c to the module. Modified: head/sys/modules/proto/Makefile Modified: head/sys/modules/proto/Makefile ============================================================================== --- head/sys/modules/proto/Makefile Sat Jun 6 16:14:03 2015 (r284080) +++ head/sys/modules/proto/Makefile Sat Jun 6 16:20:39 2015 (r284081) @@ -5,6 +5,7 @@ KMOD= proto SRCS= \ proto_bus_pci.c \ + proto_busdma.c \ proto_core.c SRCS+= \ From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 16:36:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 014E9AF8; Sat, 6 Jun 2015 16:36:13 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3E0217C7; Sat, 6 Jun 2015 16:36:13 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56GaD2X035921; Sat, 6 Jun 2015 16:36:13 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56GaDK0035920; Sat, 6 Jun 2015 16:36:13 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201506061636.t56GaDK0035920@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 6 Jun 2015 16:36:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284082 - head/sys/fs/unionfs 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 16:36:14 -0000 Author: markj Date: Sat Jun 6 16:36:13 2015 New Revision: 284082 URL: https://svnweb.freebsd.org/changeset/base/284082 Log: unionfs: fix suspendability check bugs - MNTK_SUSPENDABLE is set in mnt_kern_flag, not mnt_flag. - The lower layer of a unionfs mount is read-only, so the mount should be suspendable iff the upper layer is suspendable. - Remove a couple of superfluous comments. Differential Revision: https://reviews.freebsd.org/D2714 Reviewed by: kib, mjg Modified: head/sys/fs/unionfs/union_vfsops.c Modified: head/sys/fs/unionfs/union_vfsops.c ============================================================================== --- head/sys/fs/unionfs/union_vfsops.c Sat Jun 6 16:20:39 2015 (r284081) +++ head/sys/fs/unionfs/union_vfsops.c Sat Jun 6 16:36:13 2015 (r284082) @@ -291,18 +291,11 @@ unionfs_domount(struct mount *mp) } MNT_ILOCK(mp); - /* - * Check mnt_flag - */ if ((ump->um_lowervp->v_mount->mnt_flag & MNT_LOCAL) && (ump->um_uppervp->v_mount->mnt_flag & MNT_LOCAL)) mp->mnt_flag |= MNT_LOCAL; - /* - * Check mnt_kern_flag - */ - if ((ump->um_lowervp->v_mount->mnt_flag & MNTK_SUSPENDABLE) || - (ump->um_uppervp->v_mount->mnt_flag & MNTK_SUSPENDABLE)) + if ((ump->um_uppervp->v_mount->mnt_kern_flag & MNTK_SUSPENDABLE) != 0) mp->mnt_kern_flag |= MNTK_SUSPENDABLE; MNT_IUNLOCK(mp); From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 16:38:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04675C5D; Sat, 6 Jun 2015 16:38:41 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDD4D17E8; Sat, 6 Jun 2015 16:38:40 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56GceMD036274; Sat, 6 Jun 2015 16:38:40 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56Gce9u036273; Sat, 6 Jun 2015 16:38:40 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201506061638.t56Gce9u036273@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 6 Jun 2015 16:38:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284083 - head/sys/dev/nand 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 16:38:41 -0000 Author: jhibbits Date: Sat Jun 6 16:38:40 2015 New Revision: 284083 URL: https://svnweb.freebsd.org/changeset/base/284083 Log: Map the LAW for the RouterBoard's NAND LBC memory. Without creating a LAW entry, any access to the NAND hangs the CPU. The original intent was to add a quirk to map all of the RouterBoard's LBC address space in one shot, which would fix it for both NAND and the CF, and that's probably still in the cards. However, for now, this makes NAND usable without a separate hack. Things left before the RouterBoard can run standalone: * Add partitions to the NAND (not specified by the FDT, which we currently require). * Create a YAFFS partition for the kernel. The Mikrotik boot loader requires a 4MB partition at the beginning of NAND, with a file called 'kernel' in the root. Modified: head/sys/dev/nand/nfc_rb.c Modified: head/sys/dev/nand/nfc_rb.c ============================================================================== --- head/sys/dev/nand/nfc_rb.c Sat Jun 6 16:36:13 2015 (r284082) +++ head/sys/dev/nand/nfc_rb.c Sat Jun 6 16:38:40 2015 (r284083) @@ -49,6 +49,9 @@ __FBSDID("$FreeBSD$"); #include #include + +#include + #include "nfc_if.h" #include "gpio_if.h" @@ -128,6 +131,7 @@ rb_nand_attach(device_t dev) struct rb_nand_softc *sc; phandle_t node; uint32_t ale[2],cle[2],nce[2],rdy[2]; + u_long size,start; int err; sc = device_get_softc(dev); @@ -168,6 +172,14 @@ rb_nand_attach(device_t dev) return (ENXIO); } + start = rman_get_start(sc->sc_mem); + size = rman_get_size(sc->sc_mem); + if (law_enable(OCP85XX_TGTIF_LBC, start, size) != 0) { + bus_release_resource(dev, SYS_RES_MEMORY, sc->rid, sc->sc_mem); + device_printf(dev, "could not allocate local address window.\n"); + return (ENXIO); + } + nand_init(&sc->nand_dev, dev, NAND_ECC_SOFT, 0, 0, NULL, NULL); err = nandbus_create(dev); From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 16:45:59 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2478EF0; Sat, 6 Jun 2015 16:45:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C13321A3C; Sat, 6 Jun 2015 16:45:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56GjxBx041056; Sat, 6 Jun 2015 16:45:59 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56GjxWP041055; Sat, 6 Jun 2015 16:45:59 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201506061645.t56GjxWP041055@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 6 Jun 2015 16:45:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284084 - head/sys/modules 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 16:45:59 -0000 Author: imp Date: Sat Jun 6 16:45:59 2015 New Revision: 284084 URL: https://svnweb.freebsd.org/changeset/base/284084 Log: ix module doesn't compile on i386, so remove it from the build. It can be restored when it builds again. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sat Jun 6 16:38:40 2015 (r284083) +++ head/sys/modules/Makefile Sat Jun 6 16:45:59 2015 (r284084) @@ -512,7 +512,6 @@ _io= io .if ${MK_OFED} != "no" || defined(ALL_MODULES) _ipoib= ipoib .endif -_ix= ix _ixv= ixv _linprocfs= linprocfs _linsysfs= linsysfs @@ -619,6 +618,7 @@ _x86bios= x86bios .endif .if ${MACHINE_CPUARCH} == "amd64" +_ix= ix _ixl= ixl _ixlv= ixlv _linux64= linux64 From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 16:47:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13483AB; Sat, 6 Jun 2015 16:47:47 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8A5B1A49; Sat, 6 Jun 2015 16:47:46 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56GlkNO041384; Sat, 6 Jun 2015 16:47:46 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56GljPD041378; Sat, 6 Jun 2015 16:47:45 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201506061647.t56GljPD041378@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 6 Jun 2015 16:47:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284085 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 16:47:47 -0000 Author: markj Date: Sat Jun 6 16:47:45 2015 New Revision: 284085 URL: https://svnweb.freebsd.org/changeset/base/284085 Log: libdtrace: allow D libraries to declare dependencies on kernel modules The "depends_on module" pragma can be used to declare a dependency on a DTrace module, which for kernel probes corresponds to a KLD. Such dependencies cannot be checked if the KLD is compiled into the kernel. Therefore, allow a module dependency to be satisfied if either a kernel module or a KLD with the specified name is loaded. Differential Revision: https://reviews.freebsd.org/D2653 Reviewed by: gnn, rpaulo Reported by: gnn Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.h head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h Sat Jun 6 16:45:59 2015 (r284084) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h Sat Jun 6 16:47:45 2015 (r284085) @@ -156,6 +156,21 @@ typedef struct dt_module { #define DT_DM_KERNEL 0x2 /* module is associated with a kernel object */ #define DT_DM_PRIMARY 0x4 /* module is a krtld primary kernel object */ +#ifdef __FreeBSD__ +/* + * A representation of a FreeBSD kernel module, used when checking module + * dependencies. This differs from dt_module_t, which refers to a KLD in the + * case of kernel probes. Since modules can be identified regardless of whether + * they've been compiled into the kernel, we use them to identify DTrace + * modules. + */ +typedef struct dt_kmodule { + struct dt_kmodule *dkm_next; /* hash table entry */ + char *dkm_name; /* string name of module */ + dt_module_t *dkm_module; /* corresponding KLD module */ +} dt_kmodule_t; +#endif + typedef struct dt_provmod { char *dp_name; /* name of provider module */ struct dt_provmod *dp_next; /* next module */ @@ -235,6 +250,9 @@ struct dtrace_hdl { dt_idhash_t *dt_tls; /* hash table of thread-local identifiers */ dt_list_t dt_modlist; /* linked list of dt_module_t's */ dt_module_t **dt_mods; /* hash table of dt_module_t's */ +#ifdef __FreeBSD__ + dt_kmodule_t **dt_kmods; /* hash table of dt_kmodule_t's */ +#endif uint_t dt_modbuckets; /* number of module hash buckets */ uint_t dt_nmods; /* number of modules in hash and list */ dt_provmod_t *dt_provmod; /* linked list of provider modules */ Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c Sat Jun 6 16:45:59 2015 (r284084) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c Sat Jun 6 16:47:45 2015 (r284085) @@ -37,6 +37,7 @@ #else #include #include +#include #include #endif @@ -542,6 +543,22 @@ dt_module_lookup_by_ctf(dtrace_hdl_t *dt return (ctfp ? ctf_getspecific(ctfp) : NULL); } +#ifdef __FreeBSD__ +dt_kmodule_t * +dt_kmodule_lookup(dtrace_hdl_t *dtp, const char *name) +{ + uint_t h = dt_strtab_hash(name, NULL) % dtp->dt_modbuckets; + dt_kmodule_t *dkmp; + + for (dkmp = dtp->dt_kmods[h]; dkmp != NULL; dkmp = dkmp->dkm_next) { + if (strcmp(dkmp->dkm_name, name) == 0) + return (dkmp); + } + + return (NULL); +} +#endif + static int dt_module_load_sect(dtrace_hdl_t *dtp, dt_module_t *dmp, ctf_sect_t *ctsp) { @@ -1124,6 +1141,12 @@ dt_module_update(dtrace_hdl_t *dtp, stru char fname[MAXPATHLEN]; struct stat64 st; int fd, err, bits; +#ifdef __FreeBSD__ + struct module_stat ms; + dt_kmodule_t *dkmp; + uint_t h; + int modid; +#endif dt_module_t *dmp; const char *s; @@ -1270,6 +1293,33 @@ dt_module_update(dtrace_hdl_t *dtp, stru if (dmp->dm_info.objfs_info_primary) dmp->dm_flags |= DT_DM_PRIMARY; +#ifdef __FreeBSD__ + ms.version = sizeof(ms); + for (modid = kldfirstmod(k_stat->id); modid > 0; + modid = modnext(modid)) { + if (modstat(modid, &ms) != 0) { + dt_dprintf("modstat failed for id %d in %s: %s\n", + modid, k_stat->name, strerror(errno)); + continue; + } + if (dt_kmodule_lookup(dtp, ms.name) != NULL) + continue; + + dkmp = malloc(sizeof (*dkmp)); + if (dkmp == NULL) { + dt_dprintf("failed to allocate memory\n"); + dt_module_destroy(dtp, dmp); + return; + } + + h = dt_strtab_hash(ms.name, NULL) % dtp->dt_modbuckets; + dkmp->dkm_next = dtp->dt_kmods[h]; + dkmp->dkm_name = strdup(ms.name); + dkmp->dkm_module = dmp; + dtp->dt_kmods[h] = dkmp; + } +#endif + dt_dprintf("opened %d-bit module %s (%s) [%d]\n", bits, dmp->dm_name, dmp->dm_file, dmp->dm_modid); } Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.h Sat Jun 6 16:45:59 2015 (r284084) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.h Sat Jun 6 16:47:45 2015 (r284085) @@ -44,6 +44,10 @@ extern void dt_module_destroy(dtrace_hdl extern dt_module_t *dt_module_lookup_by_name(dtrace_hdl_t *, const char *); extern dt_module_t *dt_module_lookup_by_ctf(dtrace_hdl_t *, ctf_file_t *); +#ifdef __FreeBSD__ +extern dt_kmodule_t *dt_kmodule_lookup(dtrace_hdl_t *, const char *); +#endif + extern int dt_module_hasctf(dtrace_hdl_t *, dt_module_t *); extern ctf_file_t *dt_module_getctf(dtrace_hdl_t *, dt_module_t *); extern dt_ident_t *dt_module_extern(dtrace_hdl_t *, dt_module_t *, Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Sat Jun 6 16:45:59 2015 (r284084) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Sat Jun 6 16:47:45 2015 (r284085) @@ -1178,6 +1178,9 @@ alloc: #endif dtp->dt_modbuckets = _dtrace_strbuckets; dtp->dt_mods = calloc(dtp->dt_modbuckets, sizeof (dt_module_t *)); +#ifdef __FreeBSD__ + dtp->dt_kmods = calloc(dtp->dt_modbuckets, sizeof (dt_module_t *)); +#endif dtp->dt_provbuckets = _dtrace_strbuckets; dtp->dt_provs = calloc(dtp->dt_provbuckets, sizeof (dt_provider_t *)); dt_proc_hash_create(dtp); @@ -1199,6 +1202,7 @@ alloc: if (dtp->dt_mods == NULL || dtp->dt_provs == NULL || dtp->dt_procs == NULL || dtp->dt_ld_path == NULL || #ifdef __FreeBSD__ + dtp->dt_kmods == NULL || dtp->dt_objcopy_path == NULL || #endif dtp->dt_cpp_path == NULL || dtp->dt_cpp_argv == NULL) @@ -1621,6 +1625,10 @@ dtrace_close(dtrace_hdl_t *dtp) dtrace_prog_t *pgp; dt_xlator_t *dxp; dt_dirpath_t *dirp; +#ifdef __FreeBSD__ + dt_kmodule_t *dkm; + uint_t h; +#endif int i; if (dtp->dt_procs != NULL) @@ -1648,6 +1656,15 @@ dtrace_close(dtrace_hdl_t *dtp) if (dtp->dt_tls != NULL) dt_idhash_destroy(dtp->dt_tls); +#ifdef __FreeBSD__ + for (h = 0; h < dtp->dt_modbuckets; h++) + while ((dkm = dtp->dt_kmods[h]) != NULL) { + dtp->dt_kmods[h] = dkm->dkm_next; + free(dkm->dkm_name); + free(dkm); + } +#endif + while ((dmp = dt_list_next(&dtp->dt_modlist)) != NULL) dt_module_destroy(dtp, dmp); @@ -1697,6 +1714,9 @@ dtrace_close(dtrace_hdl_t *dtp) #endif free(dtp->dt_mods); +#ifdef __FreeBSD__ + free(dtp->dt_kmods); +#endif free(dtp->dt_provs); free(dtp); } Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c Sat Jun 6 16:45:59 2015 (r284084) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c Sat Jun 6 16:47:45 2015 (r284085) @@ -278,6 +278,14 @@ dt_pragma_depends(const char *prname, dt } else if (strcmp(cnp->dn_string, "module") == 0) { dt_module_t *mp = dt_module_lookup_by_name(dtp, nnp->dn_string); found = mp != NULL && dt_module_getctf(dtp, mp) != NULL; +#ifdef __FreeBSD__ + if (!found) { + dt_kmodule_t *dkmp = dt_kmodule_lookup(dtp, + nnp->dn_string); + found = dkmp != NULL && + dt_module_getctf(dtp, dkmp->dkm_module) != NULL; + } +#endif } else if (strcmp(cnp->dn_string, "library") == 0) { if (yypcb->pcb_cflags & DTRACE_C_CTL) { assert(dtp->dt_filetag != NULL); From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 17:04:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3995B3F1; Sat, 6 Jun 2015 17:04:38 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B36D1E9C; Sat, 6 Jun 2015 17:04:38 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56H4bIc051015; Sat, 6 Jun 2015 17:04:37 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56H4a4E051007; Sat, 6 Jun 2015 17:04:36 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506061704.t56H4a4E051007@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sat, 6 Jun 2015 17:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284086 - head/sys/dev/pci 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 17:04:38 -0000 Author: marcel Date: Sat Jun 6 17:04:36 2015 New Revision: 284086 URL: https://svnweb.freebsd.org/changeset/base/284086 Log: Revert previous change. The magical constants can't be changed (easily) without having to go to other drivers to change the magical return values. This wouldn't be so bad if there were proper defines for these constants. In particular dev/acpica/acpi_pcib_pci.c returns -1000 as the probe priority and it's expected that this driver gets to attach over the common PCI bus drivers. Modified: head/sys/dev/pci/eisa_pci.c head/sys/dev/pci/hostb_pci.c head/sys/dev/pci/ignore_pci.c head/sys/dev/pci/isa_pci.c head/sys/dev/pci/pci_pci.c Modified: head/sys/dev/pci/eisa_pci.c ============================================================================== --- head/sys/dev/pci/eisa_pci.c Sat Jun 6 16:47:45 2015 (r284085) +++ head/sys/dev/pci/eisa_pci.c Sat Jun 6 17:04:36 2015 (r284086) @@ -100,7 +100,7 @@ eisab_probe(device_t dev) if (matched) { device_set_desc(dev, "PCI-EISA bridge"); - return (BUS_PROBE_GENERIC); + return(-10000); } return(ENXIO); } Modified: head/sys/dev/pci/hostb_pci.c ============================================================================== --- head/sys/dev/pci/hostb_pci.c Sat Jun 6 16:47:45 2015 (r284085) +++ head/sys/dev/pci/hostb_pci.c Sat Jun 6 17:04:36 2015 (r284086) @@ -63,7 +63,7 @@ pci_hostb_probe(device_t dev) pci_get_subclass(dev) == PCIS_BRIDGE_HOST) { device_set_desc(dev, "Host to PCI bridge"); device_quiet(dev); - return (BUS_PROBE_GENERIC); + return (-10000); } return (ENXIO); } Modified: head/sys/dev/pci/ignore_pci.c ============================================================================== --- head/sys/dev/pci/ignore_pci.c Sat Jun 6 16:47:45 2015 (r284085) +++ head/sys/dev/pci/ignore_pci.c Sat Jun 6 17:04:36 2015 (r284086) @@ -66,7 +66,7 @@ ignore_pci_probe(device_t dev) case 0x10001042ul: /* SMC 37C665 */ device_set_desc(dev, "ignored"); device_quiet(dev); - return (BUS_PROBE_GENERIC); + return(-10000); } return(ENXIO); } Modified: head/sys/dev/pci/isa_pci.c ============================================================================== --- head/sys/dev/pci/isa_pci.c Sat Jun 6 16:47:45 2015 (r284085) +++ head/sys/dev/pci/isa_pci.c Sat Jun 6 17:04:36 2015 (r284086) @@ -154,7 +154,7 @@ isab_pci_probe(device_t dev) if (matched) { device_set_desc(dev, "PCI-ISA bridge"); - return (BUS_PROBE_GENERIC); + return(-10000); } return(ENXIO); } Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Sat Jun 6 16:47:45 2015 (r284085) +++ head/sys/dev/pci/pci_pci.c Sat Jun 6 17:04:36 2015 (r284086) @@ -890,7 +890,7 @@ pcib_probe(device_t dev) if ((pci_get_class(dev) == PCIC_BRIDGE) && (pci_get_subclass(dev) == PCIS_BRIDGE_PCI)) { device_set_desc(dev, "PCI-PCI bridge"); - return (BUS_PROBE_GENERIC); + return(-10000); } return(ENXIO); } From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 17:08:07 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 981B3548; Sat, 6 Jun 2015 17:08:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86D061EB2; Sat, 6 Jun 2015 17:08:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56H87re051532; Sat, 6 Jun 2015 17:08:07 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56H87b8051531; Sat, 6 Jun 2015 17:08:07 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201506061708.t56H87b8051531@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 6 Jun 2015 17:08:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284087 - head/sys/modules 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 17:08:07 -0000 Author: imp Date: Sat Jun 6 17:08:06 2015 New Revision: 284087 URL: https://svnweb.freebsd.org/changeset/base/284087 Log: Turns out amd64 is hit too by ix. When it works, turn it back on. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sat Jun 6 17:04:36 2015 (r284086) +++ head/sys/modules/Makefile Sat Jun 6 17:08:06 2015 (r284087) @@ -618,7 +618,6 @@ _x86bios= x86bios .endif .if ${MACHINE_CPUARCH} == "amd64" -_ix= ix _ixl= ixl _ixlv= ixlv _linux64= linux64 From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 17:08:27 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E9B9685; Sat, 6 Jun 2015 17:08:27 +0000 (UTC) (envelope-from jhb@freebsd.org) 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 479441EB8; Sat, 6 Jun 2015 17:08:27 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B0046B93A; Sat, 6 Jun 2015 13:08:25 -0400 (EDT) From: John Baldwin To: Marcel Moolenaar Cc: Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284078 - head/sys/dev/pci Date: Sat, 06 Jun 2015 13:08:16 -0400 Message-ID: <5117505.v1AmJczBtP@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.1-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: References: <201506061551.t56FpCbX013048@svn.freebsd.org> <14005803.mtbqcRkBJG@ralph.baldwin.cx> 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); Sat, 06 Jun 2015 13:08:25 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 17:08:27 -0000 On Saturday, June 06, 2015 09:18:22 AM Marcel Moolenaar wrote: > > > On Jun 6, 2015, at 9:03 AM, John Baldwin wrote: > > > > On Saturday, June 06, 2015 03:51:12 PM Marcel Moolenaar wrote: > >> Author: marcel > >> Date: Sat Jun 6 15:51:11 2015 > >> New Revision: 284078 > >> URL: https://svnweb.freebsd.org/changeset/base/284078 > >> > >> Log: > >> Don't return -10000 as the probe priority. That's lower than what > >> BUS_PROBE_HOOVER is. Drivers like proto(4), when compiled into the > >> kernel or preloaded, will render your system useless by virtue of > >> attaching to your PCI busses. > >> > >> Return BUS_PROBE_GENERIC instead. It's just the next priority up > >> from BUS_PROBE_HOOVER. No other meaning has been give to its use. > >> While BUS_PROBE_DEFAULT seems like a better candidate, it's hard > >> not to think that there must be some reason why these drivers > >> return -10000 in the first place. > > > > BUS_PROBE_DEFAULT would conflict with other drivers that are supposed to > > override these, such as acpi_pcib_pci which should override pci_pci > > for PCI-PCI bridges in the ACPI namespace. That driver currently hardcodes > > -1000 itself. :-/ Then there's pcibios_pcib_probe for the $PIR PCI-PCI > > bridge driver for when ACPI isn't present. It returns -2000. The > > MPTable PCI-PCI bridge driver returns -1000 like ACPI. > > So that means we have a regression. Do you want me to back out > or should we just move forward and fix those too. Yeah, I just now realized this. If you can fix this quickly it's probably ok to just fix it vs backing it out and committing a larger change. For the x86 PCI bridge drivers, I think you can probably use BUS_PROBE_DEFAULT for ACPI and MPTable and BUS_PROBE_LOW_PRIORITY for the pcibios one. However, I haven't looked at other platforms. I believe there are some other PCI-PCI bridge drivers kicking around (for OFW on sparc64 and powerpc at least, not sure if there are others). It might be fine to lower HOOVER as well, but it's probably worth it to fix all drivers to use one of the BUS_PROBE constants (perhaps with an offset like 'BUS_PROBE_GENERIC - 10 or some such') rather than magic values. Unfortunately sweeping all device_probe calls is likely to be a bit tedious. :-/ -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 17:15:25 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 010F2991; Sat, 6 Jun 2015 17:15:24 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C532E10BB; Sat, 6 Jun 2015 17:15:24 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from [192.168.2.22] (atc.xcllnt.net [50.0.150.213]) (authenticated bits=0) by mail.xcllnt.net (8.14.9/8.14.9) with ESMTP id t56HFN2t029628 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 6 Jun 2015 10:15:24 -0700 (PDT) (envelope-from marcel@xcllnt.net) Subject: Re: svn commit: r284078 - head/sys/dev/pci Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/signed; boundary="Apple-Mail=_FBE037D9-E3C9-4A6D-9C9A-5524928D5E16"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Marcel Moolenaar In-Reply-To: <5117505.v1AmJczBtP@ralph.baldwin.cx> Date: Sat, 6 Jun 2015 10:15:23 -0700 Cc: Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <683C7AD0-A2E7-4EA8-8F98-D1D52F40C073@xcllnt.net> References: <201506061551.t56FpCbX013048@svn.freebsd.org> <14005803.mtbqcRkBJG@ralph.baldwin.cx> <5117505.v1AmJczBtP@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 17:15:25 -0000 --Apple-Mail=_FBE037D9-E3C9-4A6D-9C9A-5524928D5E16 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 6, 2015, at 10:08 AM, John Baldwin wrote: >=20 > On Saturday, June 06, 2015 09:18:22 AM Marcel Moolenaar wrote: >>=20 >>> On Jun 6, 2015, at 9:03 AM, John Baldwin wrote: >>>=20 >>> On Saturday, June 06, 2015 03:51:12 PM Marcel Moolenaar wrote: >>>> Author: marcel >>>> Date: Sat Jun 6 15:51:11 2015 >>>> New Revision: 284078 >>>> URL: https://svnweb.freebsd.org/changeset/base/284078 >>>>=20 >>>> Log: >>>> Don't return -10000 as the probe priority. That's lower than what >>>> BUS_PROBE_HOOVER is. Drivers like proto(4), when compiled into the >>>> kernel or preloaded, will render your system useless by virtue of >>>> attaching to your PCI busses. >>>>=20 >>>> Return BUS_PROBE_GENERIC instead. It's just the next priority up >>>> from BUS_PROBE_HOOVER. No other meaning has been give to its use. >>>> While BUS_PROBE_DEFAULT seems like a better candidate, it's hard >>>> not to think that there must be some reason why these drivers >>>> return -10000 in the first place. >>>=20 >>> BUS_PROBE_DEFAULT would conflict with other drivers that are = supposed to >>> override these, such as acpi_pcib_pci which should override pci_pci >>> for PCI-PCI bridges in the ACPI namespace. That driver currently = hardcodes >>> -1000 itself. :-/ Then there's pcibios_pcib_probe for the $PIR = PCI-PCI >>> bridge driver for when ACPI isn't present. It returns -2000. The >>> MPTable PCI-PCI bridge driver returns -1000 like ACPI. >>=20 >> So that means we have a regression. Do you want me to back out >> or should we just move forward and fix those too. >=20 > Yeah, I just now realized this. If you can fix this quickly it's = probably ok > to just fix it vs backing it out and committing a larger change. I opted to back it out. I searched for all drivers that use BUS_PROBE_HOOVER and it=E2=80=99s exactly one: proto(4). That=E2=80=99s = a lot easier then finding all drivers that return some negative value that has some relation to PCI busses... I=E2=80=99m just going to change BUS_PROBE_HOOVER to -1000000 instead. In follow-up rounds we can change magical constants to defines to make the whole pecking order more obvious/visible. -- Marcel Moolenaar marcel@xcllnt.net --Apple-Mail=_FBE037D9-E3C9-4A6D-9C9A-5524928D5E16 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 iQIcBAEBCgAGBQJVcyqrAAoJEIda8t8f0tjjfU4P/iy/9ndUZZSrzUucN3QeaeMs n3Clkr02dE0e6PFNiJat8ENfB/oE+CUiFiqzR+3Fr9DAerPmrWsnVaF0U7jpgJd5 YSMS9y32h93Rng0fnB2w1UMU3UTqNp0m2ulc8tSz69igMAq65rfHEPnIIW5z/CAq pne41DLIqWDCam73MUao+BsPfSPy/9A4MBSYEvJyVQfa4UHXJkdMYqEIidz9ps0T 2AWI0nzpoJd5p04EAqWD86FYt/DKP3tigmBKv0kkrf/Dn5AprcjWFeIAQDa1rLHs MjMP6jaKf81m9lf3XMzmz93m5GItapwLHmlUK8rkX19BvfQgSXyJYIgYtDDBU0i2 c4aJorl8Zes6Ovk2gThYVAgZb4Lw4J6YZdqSvdBH9j5ok8j91SOgrnROzmaBmuIu /jKt6xhK6SwyhsZpSSSt0g9oO+l5eYXQmUJ2J88fKrm5X3eGOC5OzJucHCh/NuoL rC9y42o+bm7pcSmhww959+rrFYulYs673OgTdYT+ldvY7vwFN18qE1iYmtXZNVo5 XQReKjbyfnopc5DJrtiA4ra9v3Ikr1Ca8xN4hM+UTRJiJkTbYnUTJJ/HjY5Hk1rV 4Rb1kWqLhYCchLGvCNKh/F7alJ7LE2DIKkLPTaEuWEi+BAhyRasrZZhccdJxz9Em dysTP8MaNoP3TZtdJ7kz =AG/H -----END PGP SIGNATURE----- --Apple-Mail=_FBE037D9-E3C9-4A6D-9C9A-5524928D5E16-- From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 17:21:27 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87E4DC27; Sat, 6 Jun 2015 17:21:27 +0000 (UTC) (envelope-from jhb@freebsd.org) 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 650B311E3; Sat, 6 Jun 2015 17:21:27 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7D552B93C; Sat, 6 Jun 2015 13:21:26 -0400 (EDT) From: John Baldwin To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284087 - head/sys/modules Date: Sat, 06 Jun 2015 13:19:27 -0400 Message-ID: <2201763.WufPS8uA2S@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.1-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201506061708.t56H87b8051531@svn.freebsd.org> References: <201506061708.t56H87b8051531@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); Sat, 06 Jun 2015 13:21:26 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 17:21:27 -0000 On Saturday, June 06, 2015 05:08:07 PM Warner Losh wrote: > Author: imp > Date: Sat Jun 6 17:08:06 2015 > New Revision: 284087 > URL: https://svnweb.freebsd.org/changeset/base/284087 > > Log: > Turns out amd64 is hit too by ix. When it works, turn it back on. Can you post your errors? It builds fine for me and Jenkins hasn't been reporting any build errors since yesterday afternoon/evening. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 17:21:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0586CC25; Sat, 6 Jun 2015 17:21:27 +0000 (UTC) (envelope-from jhb@freebsd.org) 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 D2A5311E2; Sat, 6 Jun 2015 17:21:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E2A5AB939; Sat, 6 Jun 2015 13:21:25 -0400 (EDT) From: John Baldwin To: Marcel Moolenaar Cc: Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284078 - head/sys/dev/pci Date: Sat, 06 Jun 2015 13:21:21 -0400 Message-ID: <9581407.amWtf3FX4v@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.1-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <683C7AD0-A2E7-4EA8-8F98-D1D52F40C073@xcllnt.net> References: <201506061551.t56FpCbX013048@svn.freebsd.org> <5117505.v1AmJczBtP@ralph.baldwin.cx> <683C7AD0-A2E7-4EA8-8F98-D1D52F40C073@xcllnt.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Sat, 06 Jun 2015 13:21:26 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 17:21:27 -0000 On Saturday, June 06, 2015 10:15:23 AM Marcel Moolenaar wrote: >=20 > > On Jun 6, 2015, at 10:08 AM, John Baldwin wrote: > >=20 > > On Saturday, June 06, 2015 09:18:22 AM Marcel Moolenaar wrote: > >>=20 > >>> On Jun 6, 2015, at 9:03 AM, John Baldwin wrote:= > >>>=20 > >>> On Saturday, June 06, 2015 03:51:12 PM Marcel Moolenaar wrote: > >>>> Author: marcel > >>>> Date: Sat Jun 6 15:51:11 2015 > >>>> New Revision: 284078 > >>>> URL: https://svnweb.freebsd.org/changeset/base/284078 > >>>>=20 > >>>> Log: > >>>> Don't return -10000 as the probe priority. That's lower than wha= t > >>>> BUS_PROBE_HOOVER is. Drivers like proto(4), when compiled into t= he > >>>> kernel or preloaded, will render your system useless by virtue o= f > >>>> attaching to your PCI busses. > >>>>=20 > >>>> Return BUS_PROBE_GENERIC instead. It's just the next priority up= > >>>> from BUS_PROBE_HOOVER. No other meaning has been give to its use= . > >>>> While BUS_PROBE_DEFAULT seems like a better candidate, it's hard= > >>>> not to think that there must be some reason why these drivers > >>>> return -10000 in the first place. > >>>=20 > >>> BUS_PROBE_DEFAULT would conflict with other drivers that are supp= osed to > >>> override these, such as acpi_pcib_pci which should override pci_p= ci > >>> for PCI-PCI bridges in the ACPI namespace. That driver currently= hardcodes > >>> -1000 itself. :-/ Then there's pcibios_pcib_probe for the $PIR P= CI-PCI > >>> bridge driver for when ACPI isn't present. It returns -2000. Th= e > >>> MPTable PCI-PCI bridge driver returns -1000 like ACPI. > >>=20 > >> So that means we have a regression. Do you want me to back out > >> or should we just move forward and fix those too. > >=20 > > Yeah, I just now realized this. If you can fix this quickly it's p= robably ok > > to just fix it vs backing it out and committing a larger change. >=20 > I opted to back it out. I searched for all drivers that use > BUS_PROBE_HOOVER and it=E2=80=99s exactly one: proto(4). That=E2=80=99= s a lot > easier then finding all drivers that return some negative > value that has some relation to PCI busses... >=20 > I=E2=80=99m just going to change BUS_PROBE_HOOVER to -1000000 instead= . > In follow-up rounds we can change magical constants to defines > to make the whole pecking order more obvious/visible. Ok. --=20 John Baldwin From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 17:25:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67CA1F2D; Sat, 6 Jun 2015 17:25:46 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 563041344; Sat, 6 Jun 2015 17:25:46 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56HPkhq061033; Sat, 6 Jun 2015 17:25:46 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56HPkmf061032; Sat, 6 Jun 2015 17:25:46 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506061725.t56HPkmf061032@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sat, 6 Jun 2015 17:25:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284088 - head/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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 17:25:46 -0000 Author: marcel Date: Sat Jun 6 17:25:45 2015 New Revision: 284088 URL: https://svnweb.freebsd.org/changeset/base/284088 Log: Change BUS_PROBE_HOOVER from -500 to -1000000. We have PCI bus drivers return -1000 and -10000 to establish a pecking order and we don't want catch-all or match-all drivers to attach instead of them. With this change poto(4) can be compiled into the kernel (or preloaded from the loader), without impact. Modified: head/sys/sys/bus.h Modified: head/sys/sys/bus.h ============================================================================== --- head/sys/sys/bus.h Sat Jun 6 17:08:06 2015 (r284087) +++ head/sys/sys/bus.h Sat Jun 6 17:25:45 2015 (r284088) @@ -612,7 +612,7 @@ void bus_data_generation_update(void); #define BUS_PROBE_DEFAULT (-20) /* Base OS default driver */ #define BUS_PROBE_LOW_PRIORITY (-40) /* Older, less desirable drivers */ #define BUS_PROBE_GENERIC (-100) /* generic driver for dev */ -#define BUS_PROBE_HOOVER (-500) /* Generic dev for all devs on bus */ +#define BUS_PROBE_HOOVER (-1000000) /* Driver for any dev on bus */ #define BUS_PROBE_NOWILDCARD (-2000000000) /* No wildcard device matches */ /** From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 18:00:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74A3D304; Sat, 6 Jun 2015 18:00:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 612C41A68; Sat, 6 Jun 2015 18:00:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56I0cUv079043; Sat, 6 Jun 2015 18:00:38 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56I0aWC078910; Sat, 6 Jun 2015 18:00:36 GMT (envelope-from np@FreeBSD.org) Message-Id: <201506061800.t56I0aWC078910@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 6 Jun 2015 18:00: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: r284089 - in stable/10/sys/dev/cxgbe: . iw_cxgbe tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 18:00:38 -0000 Author: np Date: Sat Jun 6 18:00:36 2015 New Revision: 284089 URL: https://svnweb.freebsd.org/changeset/base/284089 Log: MFC r278239 and r278374. r278239: cxgbe(4): reserve id for iSCSI upper layer driver. r278374: cxgbe(4): tidy up some of the interaction between the Upper Layer Drivers (ULDs) and the base if_cxgbe driver. Track the per-adapter activation of ULDs in a new "active_ulds" field. This was done pretty arbitrarily before this change -- via TOM_INIT_DONE in adapter->flags for TOM, and the (1 << MAX_NPORTS) bit in adapter->offload_map for iWARP. iWARP and hw-accelerated iSCSI rely on the TOE (supported by the TOM ULD). The rules are: a) If the iWARP and/or iSCSI ULDs are available when TOE is enabled then iWARP and/or iSCSI are enabled too. b) When the iWARP and iSCSI modules are loaded they go looking for adapters with TOE enabled and enable themselves on that adapter. c) You cannot deactivate or unload the TOM module from underneath iWARP or iSCSI. Any such attempt will fail with EBUSY. Modified: stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/iw_cxgbe/device.c stable/10/sys/dev/cxgbe/offload.h stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/tom/t4_listen.c stable/10/sys/dev/cxgbe/tom/t4_tom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/10/sys/dev/cxgbe/adapter.h Sat Jun 6 17:25:45 2015 (r284088) +++ stable/10/sys/dev/cxgbe/adapter.h Sat Jun 6 18:00:36 2015 (r284089) @@ -186,7 +186,7 @@ enum { /* INTR_DIRECT = (1 << 2), No longer used. */ MASTER_PF = (1 << 3), ADAP_SYSCTL_CTX = (1 << 4), - TOM_INIT_DONE = (1 << 5), + /* TOM_INIT_DONE= (1 << 5), No longer used */ BUF_PACKING_OK = (1 << 6), CXGBE_BUSY = (1 << 9), @@ -751,7 +751,8 @@ struct adapter { uint16_t doorbells; int open_device_map; #ifdef TCP_OFFLOAD - int offload_map; + int offload_map; /* ports with IFCAP_TOE enabled */ + int active_ulds; /* ULDs activated on this adapter */ #endif int flags; Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/device.c ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/device.c Sat Jun 6 17:25:45 2015 (r284088) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/device.c Sat Jun 6 18:00:36 2015 (r284089) @@ -213,7 +213,7 @@ c4iw_activate(struct adapter *sc) ASSERT_SYNCHRONIZED_OP(sc); - if (isset(&sc->offload_map, MAX_NPORTS)) { + if (uld_active(sc, ULD_IWARP)) { KASSERT(0, ("%s: RDMA already eanbled on sc %p", __func__, sc)); return (0); } @@ -265,9 +265,9 @@ c4iw_activate_all(struct adapter *sc, vo if (begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4iwact") != 0) return; - if (!isset(&sc->offload_map, MAX_NPORTS) && - t4_activate_uld(sc, ULD_IWARP) == 0) - setbit(&sc->offload_map, MAX_NPORTS); + /* Activate iWARP if any port on this adapter has IFCAP_TOE enabled. */ + if (sc->offload_map && !uld_active(sc, ULD_IWARP)) + (void) t4_activate_uld(sc, ULD_IWARP); end_synchronized_op(sc, 0); } @@ -279,9 +279,8 @@ c4iw_deactivate_all(struct adapter *sc, if (begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4iwdea") != 0) return; - if (isset(&sc->offload_map, MAX_NPORTS) && - t4_deactivate_uld(sc, ULD_IWARP) == 0) - clrbit(&sc->offload_map, MAX_NPORTS); + if (uld_active(sc, ULD_IWARP)) + (void) t4_deactivate_uld(sc, ULD_IWARP); end_synchronized_op(sc, 0); } Modified: stable/10/sys/dev/cxgbe/offload.h ============================================================================== --- stable/10/sys/dev/cxgbe/offload.h Sat Jun 6 17:25:45 2015 (r284088) +++ stable/10/sys/dev/cxgbe/offload.h Sat Jun 6 18:00:36 2015 (r284089) @@ -127,8 +127,10 @@ struct t4_virt_res { #ifdef TCP_OFFLOAD enum { - ULD_TOM = 1, - ULD_IWARP = 2, + ULD_TOM = 0, + ULD_IWARP, + ULD_ISCSI, + ULD_MAX = ULD_ISCSI }; struct adapter; @@ -155,5 +157,6 @@ int t4_unregister_uld(struct uld_info *) int t4_activate_uld(struct adapter *, int); int t4_deactivate_uld(struct adapter *, int); void t4_iscsi_init(struct ifnet *, unsigned int, const unsigned int *); +int uld_active(struct adapter *, int); #endif #endif Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Sat Jun 6 17:25:45 2015 (r284088) +++ stable/10/sys/dev/cxgbe/t4_main.c Sat Jun 6 18:00:36 2015 (r284089) @@ -7057,7 +7057,7 @@ set_filter_mode(struct adapter *sc, uint } #ifdef TCP_OFFLOAD - if (sc->offload_map) { + if (uld_active(sc, ULD_TOM)) { rc = EBUSY; goto done; } @@ -8142,7 +8142,7 @@ toe_capability(struct port_info *pi, int if (isset(&sc->offload_map, pi->port_id)) return (0); - if (!(sc->flags & TOM_INIT_DONE)) { + if (!uld_active(sc, ULD_TOM)) { rc = t4_activate_uld(sc, ULD_TOM); if (rc == EAGAIN) { log(LOG_WARNING, @@ -8153,16 +8153,22 @@ toe_capability(struct port_info *pi, int return (rc); KASSERT(sc->tom_softc != NULL, ("%s: TOM activated but softc NULL", __func__)); - KASSERT(sc->flags & TOM_INIT_DONE, + KASSERT(uld_active(sc, ULD_TOM), ("%s: TOM activated but flag not set", __func__)); } + /* Activate iWARP and iSCSI too, if the modules are loaded. */ + if (!uld_active(sc, ULD_IWARP)) + (void) t4_activate_uld(sc, ULD_IWARP); + if (!uld_active(sc, ULD_ISCSI)) + (void) t4_activate_uld(sc, ULD_ISCSI); + setbit(&sc->offload_map, pi->port_id); } else { if (!isset(&sc->offload_map, pi->port_id)) return (0); - KASSERT(sc->flags & TOM_INIT_DONE, + KASSERT(uld_active(sc, ULD_TOM), ("%s: TOM never initialized?", __func__)); clrbit(&sc->offload_map, pi->port_id); } @@ -8222,11 +8228,15 @@ done: int t4_activate_uld(struct adapter *sc, int id) { - int rc = EAGAIN; + int rc; struct uld_info *ui; ASSERT_SYNCHRONIZED_OP(sc); + if (id < 0 || id > ULD_MAX) + return (EINVAL); + rc = EAGAIN; /* kldoad the module with this ULD and try again. */ + sx_slock(&t4_uld_list_lock); SLIST_FOREACH(ui, &t4_uld_list, link) { @@ -8234,16 +8244,18 @@ t4_activate_uld(struct adapter *sc, int if (!(sc->flags & FULL_INIT_DONE)) { rc = adapter_full_init(sc); if (rc != 0) - goto done; + break; } rc = ui->activate(sc); - if (rc == 0) + if (rc == 0) { + setbit(&sc->active_ulds, id); ui->refcount++; - goto done; + } + break; } } -done: + sx_sunlock(&t4_uld_list_lock); return (rc); @@ -8252,26 +8264,41 @@ done: int t4_deactivate_uld(struct adapter *sc, int id) { - int rc = EINVAL; + int rc; struct uld_info *ui; ASSERT_SYNCHRONIZED_OP(sc); + if (id < 0 || id > ULD_MAX) + return (EINVAL); + rc = ENXIO; + sx_slock(&t4_uld_list_lock); SLIST_FOREACH(ui, &t4_uld_list, link) { if (ui->uld_id == id) { rc = ui->deactivate(sc); - if (rc == 0) + if (rc == 0) { + clrbit(&sc->active_ulds, id); ui->refcount--; - goto done; + } + break; } } -done: + sx_sunlock(&t4_uld_list_lock); return (rc); } + +int +uld_active(struct adapter *sc, int uld_id) +{ + + MPASS(uld_id >= 0 && uld_id <= ULD_MAX); + + return (isset(&sc->active_ulds, uld_id)); +} #endif /* Modified: stable/10/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_listen.c Sat Jun 6 17:25:45 2015 (r284088) +++ stable/10/sys/dev/cxgbe/tom/t4_listen.c Sat Jun 6 18:00:36 2015 (r284089) @@ -523,7 +523,7 @@ t4_listen_start(struct toedev *tod, stru goto done; } - KASSERT(sc->flags & TOM_INIT_DONE, + KASSERT(uld_active(sc, ULD_TOM), ("%s: TOM not initialized", __func__)); #endif Modified: stable/10/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_tom.c Sat Jun 6 17:25:45 2015 (r284088) +++ stable/10/sys/dev/cxgbe/tom/t4_tom.c Sat Jun 6 18:00:36 2015 (r284089) @@ -745,7 +745,7 @@ update_clip(struct adapter *sc, void *ar if (begin_synchronized_op(sc, NULL, HOLD_LOCK, "t4tomuc")) return; - if (sc->flags & TOM_INIT_DONE) + if (uld_active(sc, ULD_TOM)) update_clip_table(sc, sc->tom_softc); end_synchronized_op(sc, LOCK_HELD); @@ -1024,7 +1024,6 @@ t4_tom_activate(struct adapter *sc) TOEDEV(sc->port[i]->ifp) = &td->tod; sc->tom_softc = td; - sc->flags |= TOM_INIT_DONE; register_toedev(sc->tom_softc); done: @@ -1047,6 +1046,9 @@ t4_tom_deactivate(struct adapter *sc) if (sc->offload_map != 0) return (EBUSY); /* at least one port has IFCAP_TOE enabled */ + if (uld_active(sc, ULD_IWARP) || uld_active(sc, ULD_ISCSI)) + return (EBUSY); /* both iWARP and iSCSI rely on the TOE. */ + mtx_lock(&td->toep_list_lock); if (!TAILQ_EMPTY(&td->toep_list)) rc = EBUSY; @@ -1067,7 +1069,6 @@ t4_tom_deactivate(struct adapter *sc) unregister_toedev(sc->tom_softc); free_tom_data(sc, td); sc->tom_softc = NULL; - sc->flags &= ~TOM_INIT_DONE; } return (rc); @@ -1121,7 +1122,7 @@ tom_uninit(struct adapter *sc, void *arg return; /* Try to free resources (works only if no port has IFCAP_TOE) */ - if (sc->flags & TOM_INIT_DONE) + if (uld_active(sc, ULD_TOM)) t4_deactivate_uld(sc, ULD_TOM); end_synchronized_op(sc, 0); From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 18:03:39 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E94B1482; Sat, 6 Jun 2015 18:03:38 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D06B91C18; Sat, 6 Jun 2015 18:03:38 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56I3cLj080520; Sat, 6 Jun 2015 18:03:38 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56I3buw080506; Sat, 6 Jun 2015 18:03:37 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201506061803.t56I3buw080506@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Jun 2015 18:03:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284090 - in stable/10/sys/gnu/dts: . arm include/dt-bindings/arm include/dt-bindings/clk include/dt-bindings/clock include/dt-bindings/dma include/dt-bindings/gpio include/dt-bindings/... 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 18:03:39 -0000 Author: ian Date: Sat Jun 6 18:03:36 2015 New Revision: 284090 URL: https://svnweb.freebsd.org/changeset/base/284090 Log: MFC r279385, r279902, r281412: Merge latest dts files (commit c8c1b3a77934768c7f7a4a9c10140c8bec529059) from the git tree. File names with commas in them cause issues for freebsd-update. We don't actually use these files at the moment, so eliminate them until we actually do. In the mean time, freebsd-update will be updated to eliminate the issues. The GNU Amlogic DTS files have some errors (e.g. bad register address, bad IRQ, etc) which are fixed by this patch. Added: stable/10/sys/gnu/dts/arm/aks-cdu.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/aks-cdu.dts stable/10/sys/gnu/dts/arm/am335x-base0033.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am335x-base0033.dts stable/10/sys/gnu/dts/arm/am335x-bone-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/am335x-bone-common.dtsi stable/10/sys/gnu/dts/arm/am335x-bone.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am335x-bone.dts stable/10/sys/gnu/dts/arm/am335x-boneblack.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am335x-boneblack.dts stable/10/sys/gnu/dts/arm/am335x-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am335x-evm.dts stable/10/sys/gnu/dts/arm/am335x-evmsk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am335x-evmsk.dts stable/10/sys/gnu/dts/arm/am335x-igep0033.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/am335x-igep0033.dtsi stable/10/sys/gnu/dts/arm/am335x-lxm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am335x-lxm.dts stable/10/sys/gnu/dts/arm/am335x-nano.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am335x-nano.dts stable/10/sys/gnu/dts/arm/am335x-pepper.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am335x-pepper.dts stable/10/sys/gnu/dts/arm/am33xx-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/am33xx-clocks.dtsi stable/10/sys/gnu/dts/arm/am33xx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/am33xx.dtsi stable/10/sys/gnu/dts/arm/am3517-craneboard.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am3517-craneboard.dts stable/10/sys/gnu/dts/arm/am3517-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am3517-evm.dts stable/10/sys/gnu/dts/arm/am3517.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/am3517.dtsi stable/10/sys/gnu/dts/arm/am3517_mt_ventoux.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am3517_mt_ventoux.dts stable/10/sys/gnu/dts/arm/am35xx-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/am35xx-clocks.dtsi stable/10/sys/gnu/dts/arm/am4372.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/am4372.dtsi stable/10/sys/gnu/dts/arm/am437x-gp-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am437x-gp-evm.dts stable/10/sys/gnu/dts/arm/am437x-idk-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am437x-idk-evm.dts stable/10/sys/gnu/dts/arm/am437x-sk-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am437x-sk-evm.dts stable/10/sys/gnu/dts/arm/am43x-epos-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am43x-epos-evm.dts stable/10/sys/gnu/dts/arm/am43xx-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/am43xx-clocks.dtsi stable/10/sys/gnu/dts/arm/am57xx-beagle-x15.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/am57xx-beagle-x15.dts stable/10/sys/gnu/dts/arm/arm-realview-pb1176.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/arm-realview-pb1176.dts stable/10/sys/gnu/dts/arm/armada-370-db.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-370-db.dts stable/10/sys/gnu/dts/arm/armada-370-mirabox.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-370-mirabox.dts stable/10/sys/gnu/dts/arm/armada-370-netgear-rn102.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-370-netgear-rn102.dts stable/10/sys/gnu/dts/arm/armada-370-netgear-rn104.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-370-netgear-rn104.dts stable/10/sys/gnu/dts/arm/armada-370-rd.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-370-rd.dts stable/10/sys/gnu/dts/arm/armada-370-synology-ds213j.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-370-synology-ds213j.dts stable/10/sys/gnu/dts/arm/armada-370-xp.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-370-xp.dtsi stable/10/sys/gnu/dts/arm/armada-370.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-370.dtsi stable/10/sys/gnu/dts/arm/armada-375-db.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-375-db.dts stable/10/sys/gnu/dts/arm/armada-375.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-375.dtsi stable/10/sys/gnu/dts/arm/armada-380.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-380.dtsi stable/10/sys/gnu/dts/arm/armada-385-db-ap.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-385-db-ap.dts stable/10/sys/gnu/dts/arm/armada-385.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-385.dtsi stable/10/sys/gnu/dts/arm/armada-388-db.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-388-db.dts stable/10/sys/gnu/dts/arm/armada-388-gp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-388-gp.dts stable/10/sys/gnu/dts/arm/armada-388-rd.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-388-rd.dts stable/10/sys/gnu/dts/arm/armada-388.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-388.dtsi stable/10/sys/gnu/dts/arm/armada-38x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-38x.dtsi stable/10/sys/gnu/dts/arm/armada-xp-axpwifiap.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp-axpwifiap.dts stable/10/sys/gnu/dts/arm/armada-xp-db.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp-db.dts stable/10/sys/gnu/dts/arm/armada-xp-gp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp-gp.dts stable/10/sys/gnu/dts/arm/armada-xp-lenovo-ix4-300d.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp-lenovo-ix4-300d.dts stable/10/sys/gnu/dts/arm/armada-xp-matrix.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp-matrix.dts stable/10/sys/gnu/dts/arm/armada-xp-mv78230.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp-mv78230.dtsi stable/10/sys/gnu/dts/arm/armada-xp-mv78260.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp-mv78260.dtsi stable/10/sys/gnu/dts/arm/armada-xp-mv78460.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp-mv78460.dtsi stable/10/sys/gnu/dts/arm/armada-xp-netgear-rn2120.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp-netgear-rn2120.dts stable/10/sys/gnu/dts/arm/armada-xp-openblocks-ax3-4.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp-openblocks-ax3-4.dts stable/10/sys/gnu/dts/arm/armada-xp-synology-ds414.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp-synology-ds414.dts stable/10/sys/gnu/dts/arm/armada-xp.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armada-xp.dtsi stable/10/sys/gnu/dts/arm/armv7-m.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/armv7-m.dtsi stable/10/sys/gnu/dts/arm/at91-sama5d4ek.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/at91-sama5d4ek.dts stable/10/sys/gnu/dts/arm/at91sam9xe.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/at91sam9xe.dtsi stable/10/sys/gnu/dts/arm/atlas6-evb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/atlas6-evb.dts stable/10/sys/gnu/dts/arm/atlas6.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/atlas6.dtsi stable/10/sys/gnu/dts/arm/atlas7-evb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/atlas7-evb.dts stable/10/sys/gnu/dts/arm/atlas7.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/atlas7.dtsi stable/10/sys/gnu/dts/arm/axm5516-cpus.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/axm5516-cpus.dtsi stable/10/sys/gnu/dts/arm/axp209.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/axp209.dtsi stable/10/sys/gnu/dts/arm/bcm-cygnus-clock.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm-cygnus-clock.dtsi stable/10/sys/gnu/dts/arm/bcm-cygnus.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm-cygnus.dtsi stable/10/sys/gnu/dts/arm/bcm11351.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm11351.dtsi stable/10/sys/gnu/dts/arm/bcm21664-garnet.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm21664-garnet.dts stable/10/sys/gnu/dts/arm/bcm21664.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm21664.dtsi stable/10/sys/gnu/dts/arm/bcm28155-ap.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm28155-ap.dts stable/10/sys/gnu/dts/arm/bcm2835-rpi-b-plus.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm2835-rpi-b-plus.dts stable/10/sys/gnu/dts/arm/bcm2835-rpi-b.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm2835-rpi-b.dts stable/10/sys/gnu/dts/arm/bcm2835-rpi.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm2835-rpi.dtsi stable/10/sys/gnu/dts/arm/bcm2835.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm2835.dtsi stable/10/sys/gnu/dts/arm/bcm4708-buffalo-wzr-1750dhp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm4708-buffalo-wzr-1750dhp.dts stable/10/sys/gnu/dts/arm/bcm4708-luxul-xwc-1000.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm4708-luxul-xwc-1000.dts stable/10/sys/gnu/dts/arm/bcm4708-netgear-r6250.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm4708-netgear-r6250.dts stable/10/sys/gnu/dts/arm/bcm4708-netgear-r6300-v2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm4708-netgear-r6300-v2.dts stable/10/sys/gnu/dts/arm/bcm4708.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm4708.dtsi stable/10/sys/gnu/dts/arm/bcm47081-asus-rt-n18u.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm47081-asus-rt-n18u.dts stable/10/sys/gnu/dts/arm/bcm47081-buffalo-wzr-600dhp2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm47081-buffalo-wzr-600dhp2.dts stable/10/sys/gnu/dts/arm/bcm47081-buffalo-wzr-900dhp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm47081-buffalo-wzr-900dhp.dts stable/10/sys/gnu/dts/arm/bcm47081.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm47081.dtsi stable/10/sys/gnu/dts/arm/bcm5301x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm5301x.dtsi stable/10/sys/gnu/dts/arm/bcm59056.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm59056.dtsi stable/10/sys/gnu/dts/arm/bcm63138.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm63138.dtsi stable/10/sys/gnu/dts/arm/bcm7445-bcm97445svmb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm7445-bcm97445svmb.dts stable/10/sys/gnu/dts/arm/bcm7445.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm7445.dtsi stable/10/sys/gnu/dts/arm/bcm911360_entphn.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm911360_entphn.dts stable/10/sys/gnu/dts/arm/bcm911360k.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm911360k.dts stable/10/sys/gnu/dts/arm/bcm958300k.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm958300k.dts stable/10/sys/gnu/dts/arm/bcm963138dvt.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/bcm963138dvt.dts stable/10/sys/gnu/dts/arm/berlin2-sony-nsz-gs7.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/berlin2-sony-nsz-gs7.dts stable/10/sys/gnu/dts/arm/berlin2.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/berlin2.dtsi stable/10/sys/gnu/dts/arm/berlin2cd-google-chromecast.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/berlin2cd-google-chromecast.dts stable/10/sys/gnu/dts/arm/berlin2cd.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/berlin2cd.dtsi stable/10/sys/gnu/dts/arm/berlin2q-marvell-dmp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/berlin2q-marvell-dmp.dts stable/10/sys/gnu/dts/arm/berlin2q.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/berlin2q.dtsi stable/10/sys/gnu/dts/arm/cros-adc-thermistors.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/cros-adc-thermistors.dtsi stable/10/sys/gnu/dts/arm/cros-ec-keyboard.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/cros-ec-keyboard.dtsi stable/10/sys/gnu/dts/arm/cx92755.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/cx92755.dtsi stable/10/sys/gnu/dts/arm/cx92755_equinox.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/cx92755_equinox.dts stable/10/sys/gnu/dts/arm/da850-enbw-cmc.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/da850-enbw-cmc.dts stable/10/sys/gnu/dts/arm/da850-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/da850-evm.dts stable/10/sys/gnu/dts/arm/da850.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/da850.dtsi stable/10/sys/gnu/dts/arm/dm8168-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/dm8168-evm.dts stable/10/sys/gnu/dts/arm/dm816x-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/dm816x-clocks.dtsi stable/10/sys/gnu/dts/arm/dm816x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/dm816x.dtsi stable/10/sys/gnu/dts/arm/dove-cm-a510.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/dove-cm-a510.dts stable/10/sys/gnu/dts/arm/dove-cubox-es.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/dove-cubox-es.dts stable/10/sys/gnu/dts/arm/dove-cubox.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/dove-cubox.dts stable/10/sys/gnu/dts/arm/dove-d2plug.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/dove-d2plug.dts stable/10/sys/gnu/dts/arm/dove-d3plug.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/dove-d3plug.dts stable/10/sys/gnu/dts/arm/dove-dove-db.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/dove-dove-db.dts stable/10/sys/gnu/dts/arm/dove.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/dove.dtsi stable/10/sys/gnu/dts/arm/dra7-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/dra7-evm.dts stable/10/sys/gnu/dts/arm/dra7.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/dra7.dtsi stable/10/sys/gnu/dts/arm/dra72-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/dra72-evm.dts stable/10/sys/gnu/dts/arm/dra72x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/dra72x.dtsi stable/10/sys/gnu/dts/arm/dra74x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/dra74x.dtsi stable/10/sys/gnu/dts/arm/dra7xx-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/dra7xx-clocks.dtsi stable/10/sys/gnu/dts/arm/ea3250.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ea3250.dts stable/10/sys/gnu/dts/arm/ecx-2000.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ecx-2000.dts stable/10/sys/gnu/dts/arm/ecx-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ecx-common.dtsi stable/10/sys/gnu/dts/arm/efm32gg-dk3750.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/efm32gg-dk3750.dts stable/10/sys/gnu/dts/arm/efm32gg.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/efm32gg.dtsi stable/10/sys/gnu/dts/arm/elpida_ecb240abacn.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/elpida_ecb240abacn.dtsi stable/10/sys/gnu/dts/arm/emev2-kzm9d.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/emev2-kzm9d.dts stable/10/sys/gnu/dts/arm/emev2.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/emev2.dtsi stable/10/sys/gnu/dts/arm/exynos3250-monk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos3250-monk.dts stable/10/sys/gnu/dts/arm/exynos3250-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos3250-pinctrl.dtsi stable/10/sys/gnu/dts/arm/exynos3250-rinato.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos3250-rinato.dts stable/10/sys/gnu/dts/arm/exynos3250.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos3250.dtsi stable/10/sys/gnu/dts/arm/exynos4.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4.dtsi stable/10/sys/gnu/dts/arm/exynos4210-origen.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4210-origen.dts stable/10/sys/gnu/dts/arm/exynos4210-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4210-pinctrl.dtsi stable/10/sys/gnu/dts/arm/exynos4210-smdkv310.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4210-smdkv310.dts stable/10/sys/gnu/dts/arm/exynos4210-trats.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4210-trats.dts stable/10/sys/gnu/dts/arm/exynos4210-universal_c210.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4210-universal_c210.dts stable/10/sys/gnu/dts/arm/exynos4210.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4210.dtsi stable/10/sys/gnu/dts/arm/exynos4212.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4212.dtsi stable/10/sys/gnu/dts/arm/exynos4412-odroid-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4412-odroid-common.dtsi stable/10/sys/gnu/dts/arm/exynos4412-odroidu3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4412-odroidu3.dts stable/10/sys/gnu/dts/arm/exynos4412-odroidx.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4412-odroidx.dts stable/10/sys/gnu/dts/arm/exynos4412-odroidx2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4412-odroidx2.dts stable/10/sys/gnu/dts/arm/exynos4412-origen.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4412-origen.dts stable/10/sys/gnu/dts/arm/exynos4412-smdk4412.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4412-smdk4412.dts stable/10/sys/gnu/dts/arm/exynos4412-tiny4412.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4412-tiny4412.dts stable/10/sys/gnu/dts/arm/exynos4412-trats2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4412-trats2.dts stable/10/sys/gnu/dts/arm/exynos4412.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4412.dtsi stable/10/sys/gnu/dts/arm/exynos4415-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4415-pinctrl.dtsi stable/10/sys/gnu/dts/arm/exynos4415.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4415.dtsi stable/10/sys/gnu/dts/arm/exynos4x12-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4x12-pinctrl.dtsi stable/10/sys/gnu/dts/arm/exynos4x12.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos4x12.dtsi stable/10/sys/gnu/dts/arm/exynos5.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5.dtsi stable/10/sys/gnu/dts/arm/exynos5250-arndale.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5250-arndale.dts stable/10/sys/gnu/dts/arm/exynos5250-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5250-pinctrl.dtsi stable/10/sys/gnu/dts/arm/exynos5250-smdk5250.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5250-smdk5250.dts stable/10/sys/gnu/dts/arm/exynos5250-spring.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5250-spring.dts stable/10/sys/gnu/dts/arm/exynos5250.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5250.dtsi stable/10/sys/gnu/dts/arm/exynos5260-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5260-pinctrl.dtsi stable/10/sys/gnu/dts/arm/exynos5260-xyref5260.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5260-xyref5260.dts stable/10/sys/gnu/dts/arm/exynos5260.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5260.dtsi stable/10/sys/gnu/dts/arm/exynos5410-smdk5410.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5410-smdk5410.dts stable/10/sys/gnu/dts/arm/exynos5410.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5410.dtsi stable/10/sys/gnu/dts/arm/exynos5420-arndale-octa.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5420-arndale-octa.dts stable/10/sys/gnu/dts/arm/exynos5420-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5420-pinctrl.dtsi stable/10/sys/gnu/dts/arm/exynos5420-smdk5420.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5420-smdk5420.dts stable/10/sys/gnu/dts/arm/exynos5420.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5420.dtsi stable/10/sys/gnu/dts/arm/exynos5422-odroidxu3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5422-odroidxu3.dts stable/10/sys/gnu/dts/arm/exynos5440-sd5v1.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5440-sd5v1.dts stable/10/sys/gnu/dts/arm/exynos5440-ssdk5440.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5440-ssdk5440.dts stable/10/sys/gnu/dts/arm/exynos5440.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5440.dtsi stable/10/sys/gnu/dts/arm/exynos5800.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/exynos5800.dtsi stable/10/sys/gnu/dts/arm/hi3620-hi4511.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/hi3620-hi4511.dts stable/10/sys/gnu/dts/arm/hi3620.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/hi3620.dtsi stable/10/sys/gnu/dts/arm/highbank.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/highbank.dts stable/10/sys/gnu/dts/arm/hip01-ca9x2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/hip01-ca9x2.dts stable/10/sys/gnu/dts/arm/hip01.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/hip01.dtsi stable/10/sys/gnu/dts/arm/hip04-d01.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/hip04-d01.dts stable/10/sys/gnu/dts/arm/hip04.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/hip04.dtsi stable/10/sys/gnu/dts/arm/hisi-x5hd2-dkb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/hisi-x5hd2-dkb.dts stable/10/sys/gnu/dts/arm/hisi-x5hd2.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/hisi-x5hd2.dtsi stable/10/sys/gnu/dts/arm/imx1-ads.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx1-ads.dts stable/10/sys/gnu/dts/arm/imx1-apf9328.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx1-apf9328.dts stable/10/sys/gnu/dts/arm/imx1-pinfunc.h - copied unchanged from r279385, head/sys/gnu/dts/arm/imx1-pinfunc.h stable/10/sys/gnu/dts/arm/imx1.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx1.dtsi stable/10/sys/gnu/dts/arm/imx23-evk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx23-evk.dts stable/10/sys/gnu/dts/arm/imx23-olinuxino.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx23-olinuxino.dts stable/10/sys/gnu/dts/arm/imx23-pinfunc.h - copied unchanged from r279385, head/sys/gnu/dts/arm/imx23-pinfunc.h stable/10/sys/gnu/dts/arm/imx23-stmp378x_devb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx23-stmp378x_devb.dts stable/10/sys/gnu/dts/arm/imx23.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx23.dtsi stable/10/sys/gnu/dts/arm/imx25-eukrea-cpuimx25.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx25-eukrea-cpuimx25.dtsi stable/10/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts stable/10/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts stable/10/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts stable/10/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard.dts stable/10/sys/gnu/dts/arm/imx25-karo-tx25.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx25-karo-tx25.dts stable/10/sys/gnu/dts/arm/imx25-pdk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx25-pdk.dts stable/10/sys/gnu/dts/arm/imx25-pinfunc.h - copied unchanged from r279385, head/sys/gnu/dts/arm/imx25-pinfunc.h stable/10/sys/gnu/dts/arm/imx25.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx25.dtsi stable/10/sys/gnu/dts/arm/imx27-apf27.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx27-apf27.dts stable/10/sys/gnu/dts/arm/imx27-apf27dev.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx27-apf27dev.dts stable/10/sys/gnu/dts/arm/imx27-eukrea-cpuimx27.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx27-eukrea-cpuimx27.dtsi stable/10/sys/gnu/dts/arm/imx27-eukrea-mbimxsd27-baseboard.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx27-eukrea-mbimxsd27-baseboard.dts stable/10/sys/gnu/dts/arm/imx27-pdk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx27-pdk.dts stable/10/sys/gnu/dts/arm/imx27-phytec-phycard-s-rdk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx27-phytec-phycard-s-rdk.dts stable/10/sys/gnu/dts/arm/imx27-phytec-phycard-s-som.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx27-phytec-phycard-s-som.dtsi stable/10/sys/gnu/dts/arm/imx27-phytec-phycore-rdk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx27-phytec-phycore-rdk.dts stable/10/sys/gnu/dts/arm/imx27-phytec-phycore-som.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx27-phytec-phycore-som.dtsi stable/10/sys/gnu/dts/arm/imx27-pinfunc.h - copied unchanged from r279385, head/sys/gnu/dts/arm/imx27-pinfunc.h stable/10/sys/gnu/dts/arm/imx27.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx27.dtsi stable/10/sys/gnu/dts/arm/imx28-apf28.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-apf28.dts stable/10/sys/gnu/dts/arm/imx28-apf28dev.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-apf28dev.dts stable/10/sys/gnu/dts/arm/imx28-apx4devkit.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-apx4devkit.dts stable/10/sys/gnu/dts/arm/imx28-cfa10036.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-cfa10036.dts stable/10/sys/gnu/dts/arm/imx28-cfa10037.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-cfa10037.dts stable/10/sys/gnu/dts/arm/imx28-cfa10049.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-cfa10049.dts stable/10/sys/gnu/dts/arm/imx28-cfa10055.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-cfa10055.dts stable/10/sys/gnu/dts/arm/imx28-cfa10056.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-cfa10056.dts stable/10/sys/gnu/dts/arm/imx28-cfa10057.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-cfa10057.dts stable/10/sys/gnu/dts/arm/imx28-cfa10058.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-cfa10058.dts stable/10/sys/gnu/dts/arm/imx28-duckbill.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-duckbill.dts stable/10/sys/gnu/dts/arm/imx28-eukrea-mbmx283lc.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-eukrea-mbmx283lc.dts stable/10/sys/gnu/dts/arm/imx28-eukrea-mbmx287lc.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-eukrea-mbmx287lc.dts stable/10/sys/gnu/dts/arm/imx28-eukrea-mbmx28lc.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-eukrea-mbmx28lc.dtsi stable/10/sys/gnu/dts/arm/imx28-evk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-evk.dts stable/10/sys/gnu/dts/arm/imx28-m28.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-m28.dtsi stable/10/sys/gnu/dts/arm/imx28-m28cu3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-m28cu3.dts stable/10/sys/gnu/dts/arm/imx28-m28evk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-m28evk.dts stable/10/sys/gnu/dts/arm/imx28-pinfunc.h - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-pinfunc.h stable/10/sys/gnu/dts/arm/imx28-sps1.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-sps1.dts stable/10/sys/gnu/dts/arm/imx28-tx28.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28-tx28.dts stable/10/sys/gnu/dts/arm/imx28.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx28.dtsi stable/10/sys/gnu/dts/arm/imx31-bug.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx31-bug.dts stable/10/sys/gnu/dts/arm/imx31.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx31.dtsi stable/10/sys/gnu/dts/arm/imx35-eukrea-cpuimx35.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx35-eukrea-cpuimx35.dtsi stable/10/sys/gnu/dts/arm/imx35-eukrea-mbimxsd35-baseboard.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx35-eukrea-mbimxsd35-baseboard.dts stable/10/sys/gnu/dts/arm/imx35-pdk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx35-pdk.dts stable/10/sys/gnu/dts/arm/imx35-pinfunc.h - copied unchanged from r279385, head/sys/gnu/dts/arm/imx35-pinfunc.h stable/10/sys/gnu/dts/arm/imx35.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx35.dtsi stable/10/sys/gnu/dts/arm/imx50-evk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx50-evk.dts stable/10/sys/gnu/dts/arm/imx50-pinfunc.h - copied unchanged from r279385, head/sys/gnu/dts/arm/imx50-pinfunc.h stable/10/sys/gnu/dts/arm/imx50.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx50.dtsi stable/10/sys/gnu/dts/arm/imx6dl-gw552x.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6dl-gw552x.dts stable/10/sys/gnu/dts/arm/imx6dl-udoo.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6dl-udoo.dts stable/10/sys/gnu/dts/arm/imx6q-gw552x.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6q-gw552x.dts stable/10/sys/gnu/dts/arm/imx6q-hummingboard.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6q-hummingboard.dts stable/10/sys/gnu/dts/arm/imx6q-tbs2910.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6q-tbs2910.dts stable/10/sys/gnu/dts/arm/imx6qdl-gw552x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6qdl-gw552x.dtsi stable/10/sys/gnu/dts/arm/imx6qdl-hummingboard.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6qdl-hummingboard.dtsi stable/10/sys/gnu/dts/arm/imx6qdl-microsom-ar8035.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6qdl-microsom-ar8035.dtsi stable/10/sys/gnu/dts/arm/imx6qdl-microsom.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6qdl-microsom.dtsi stable/10/sys/gnu/dts/arm/imx6qdl-phytec-pbab01.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6qdl-phytec-pbab01.dtsi stable/10/sys/gnu/dts/arm/imx6qdl-udoo.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6qdl-udoo.dtsi stable/10/sys/gnu/dts/arm/imx6sx-pinfunc.h - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6sx-pinfunc.h stable/10/sys/gnu/dts/arm/imx6sx-sabreauto.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/imx6sx-sabreauto.dts stable/10/sys/gnu/dts/arm/integrator.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/integrator.dtsi stable/10/sys/gnu/dts/arm/integratorap.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/integratorap.dts stable/10/sys/gnu/dts/arm/integratorcp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/integratorcp.dts stable/10/sys/gnu/dts/arm/k2e-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/k2e-clocks.dtsi stable/10/sys/gnu/dts/arm/k2e-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/k2e-evm.dts stable/10/sys/gnu/dts/arm/k2e.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/k2e.dtsi stable/10/sys/gnu/dts/arm/k2hk-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/k2hk-clocks.dtsi stable/10/sys/gnu/dts/arm/k2hk-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/k2hk-evm.dts stable/10/sys/gnu/dts/arm/k2hk.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/k2hk.dtsi stable/10/sys/gnu/dts/arm/k2l-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/k2l-clocks.dtsi stable/10/sys/gnu/dts/arm/k2l-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/k2l-evm.dts stable/10/sys/gnu/dts/arm/k2l.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/k2l.dtsi stable/10/sys/gnu/dts/arm/keystone-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/keystone-clocks.dtsi stable/10/sys/gnu/dts/arm/keystone.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/keystone.dtsi stable/10/sys/gnu/dts/arm/kirkwood-6192.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-6192.dtsi stable/10/sys/gnu/dts/arm/kirkwood-6281.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-6281.dtsi stable/10/sys/gnu/dts/arm/kirkwood-6282.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-6282.dtsi stable/10/sys/gnu/dts/arm/kirkwood-98dx4122.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-98dx4122.dtsi stable/10/sys/gnu/dts/arm/kirkwood-b3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-b3.dts stable/10/sys/gnu/dts/arm/kirkwood-blackarmor-nas220.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-blackarmor-nas220.dts stable/10/sys/gnu/dts/arm/kirkwood-cloudbox.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-cloudbox.dts stable/10/sys/gnu/dts/arm/kirkwood-d2net.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-d2net.dts stable/10/sys/gnu/dts/arm/kirkwood-db-88f6281.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-db-88f6281.dts stable/10/sys/gnu/dts/arm/kirkwood-db-88f6282.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-db-88f6282.dts stable/10/sys/gnu/dts/arm/kirkwood-db.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-db.dtsi stable/10/sys/gnu/dts/arm/kirkwood-dir665.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-dir665.dts stable/10/sys/gnu/dts/arm/kirkwood-dns320.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-dns320.dts stable/10/sys/gnu/dts/arm/kirkwood-dns325.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-dns325.dts stable/10/sys/gnu/dts/arm/kirkwood-dnskw.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-dnskw.dtsi stable/10/sys/gnu/dts/arm/kirkwood-dockstar.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-dockstar.dts stable/10/sys/gnu/dts/arm/kirkwood-dreamplug.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-dreamplug.dts stable/10/sys/gnu/dts/arm/kirkwood-ds109.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds109.dts stable/10/sys/gnu/dts/arm/kirkwood-ds110jv10.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds110jv10.dts stable/10/sys/gnu/dts/arm/kirkwood-ds111.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds111.dts stable/10/sys/gnu/dts/arm/kirkwood-ds112.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds112.dts stable/10/sys/gnu/dts/arm/kirkwood-ds209.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds209.dts stable/10/sys/gnu/dts/arm/kirkwood-ds210.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds210.dts stable/10/sys/gnu/dts/arm/kirkwood-ds212.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds212.dts stable/10/sys/gnu/dts/arm/kirkwood-ds212j.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds212j.dts stable/10/sys/gnu/dts/arm/kirkwood-ds409.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds409.dts stable/10/sys/gnu/dts/arm/kirkwood-ds409slim.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds409slim.dts stable/10/sys/gnu/dts/arm/kirkwood-ds411.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds411.dts stable/10/sys/gnu/dts/arm/kirkwood-ds411j.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds411j.dts stable/10/sys/gnu/dts/arm/kirkwood-ds411slim.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ds411slim.dts stable/10/sys/gnu/dts/arm/kirkwood-goflexnet.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-goflexnet.dts stable/10/sys/gnu/dts/arm/kirkwood-guruplug-server-plus.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-guruplug-server-plus.dts stable/10/sys/gnu/dts/arm/kirkwood-ib62x0.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ib62x0.dts stable/10/sys/gnu/dts/arm/kirkwood-iconnect.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-iconnect.dts stable/10/sys/gnu/dts/arm/kirkwood-iomega_ix2_200.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-iomega_ix2_200.dts stable/10/sys/gnu/dts/arm/kirkwood-is2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-is2.dts stable/10/sys/gnu/dts/arm/kirkwood-km_common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-km_common.dtsi stable/10/sys/gnu/dts/arm/kirkwood-km_fixedeth.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-km_fixedeth.dts stable/10/sys/gnu/dts/arm/kirkwood-km_kirkwood.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-km_kirkwood.dts stable/10/sys/gnu/dts/arm/kirkwood-laplug.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-laplug.dts stable/10/sys/gnu/dts/arm/kirkwood-lschlv2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-lschlv2.dts stable/10/sys/gnu/dts/arm/kirkwood-lsxhl.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-lsxhl.dts stable/10/sys/gnu/dts/arm/kirkwood-lsxl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-lsxl.dtsi stable/10/sys/gnu/dts/arm/kirkwood-mplcec4.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-mplcec4.dts stable/10/sys/gnu/dts/arm/kirkwood-mv88f6281gtw-ge.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-mv88f6281gtw-ge.dts stable/10/sys/gnu/dts/arm/kirkwood-net2big.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-net2big.dts stable/10/sys/gnu/dts/arm/kirkwood-net5big.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-net5big.dts stable/10/sys/gnu/dts/arm/kirkwood-netgear_readynas_duo_v2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-netgear_readynas_duo_v2.dts stable/10/sys/gnu/dts/arm/kirkwood-netgear_readynas_nv+_v2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-netgear_readynas_nv+_v2.dts stable/10/sys/gnu/dts/arm/kirkwood-netxbig.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-netxbig.dtsi stable/10/sys/gnu/dts/arm/kirkwood-ns2-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ns2-common.dtsi stable/10/sys/gnu/dts/arm/kirkwood-ns2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ns2.dts stable/10/sys/gnu/dts/arm/kirkwood-ns2lite.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ns2lite.dts stable/10/sys/gnu/dts/arm/kirkwood-ns2max.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ns2max.dts stable/10/sys/gnu/dts/arm/kirkwood-ns2mini.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ns2mini.dts stable/10/sys/gnu/dts/arm/kirkwood-nsa310.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-nsa310.dts stable/10/sys/gnu/dts/arm/kirkwood-nsa310a.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-nsa310a.dts stable/10/sys/gnu/dts/arm/kirkwood-nsa320.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-nsa320.dts stable/10/sys/gnu/dts/arm/kirkwood-nsa3x0-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-nsa3x0-common.dtsi stable/10/sys/gnu/dts/arm/kirkwood-openblocks_a6.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-openblocks_a6.dts stable/10/sys/gnu/dts/arm/kirkwood-openblocks_a7.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-openblocks_a7.dts stable/10/sys/gnu/dts/arm/kirkwood-openrd-base.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-openrd-base.dts stable/10/sys/gnu/dts/arm/kirkwood-openrd-client.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-openrd-client.dts stable/10/sys/gnu/dts/arm/kirkwood-openrd-ultimate.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-openrd-ultimate.dts stable/10/sys/gnu/dts/arm/kirkwood-openrd.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-openrd.dtsi stable/10/sys/gnu/dts/arm/kirkwood-pogo_e02.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-pogo_e02.dts stable/10/sys/gnu/dts/arm/kirkwood-rd88f6192.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-rd88f6192.dts stable/10/sys/gnu/dts/arm/kirkwood-rd88f6281-a.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-rd88f6281-a.dts stable/10/sys/gnu/dts/arm/kirkwood-rd88f6281-z0.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-rd88f6281-z0.dts stable/10/sys/gnu/dts/arm/kirkwood-rd88f6281.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-rd88f6281.dtsi stable/10/sys/gnu/dts/arm/kirkwood-rs212.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-rs212.dts stable/10/sys/gnu/dts/arm/kirkwood-rs409.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-rs409.dts stable/10/sys/gnu/dts/arm/kirkwood-rs411.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-rs411.dts stable/10/sys/gnu/dts/arm/kirkwood-sheevaplug-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-sheevaplug-common.dtsi stable/10/sys/gnu/dts/arm/kirkwood-sheevaplug-esata.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-sheevaplug-esata.dts stable/10/sys/gnu/dts/arm/kirkwood-sheevaplug.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-sheevaplug.dts stable/10/sys/gnu/dts/arm/kirkwood-synology.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-synology.dtsi stable/10/sys/gnu/dts/arm/kirkwood-t5325.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-t5325.dts stable/10/sys/gnu/dts/arm/kirkwood-topkick.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-topkick.dts stable/10/sys/gnu/dts/arm/kirkwood-ts219-6281.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ts219-6281.dts stable/10/sys/gnu/dts/arm/kirkwood-ts219-6282.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ts219-6282.dts stable/10/sys/gnu/dts/arm/kirkwood-ts219.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ts219.dtsi stable/10/sys/gnu/dts/arm/kirkwood-ts419-6281.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ts419-6281.dts stable/10/sys/gnu/dts/arm/kirkwood-ts419-6282.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ts419-6282.dts stable/10/sys/gnu/dts/arm/kirkwood-ts419.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood-ts419.dtsi stable/10/sys/gnu/dts/arm/kirkwood.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/kirkwood.dtsi stable/10/sys/gnu/dts/arm/lpc32xx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/lpc32xx.dtsi stable/10/sys/gnu/dts/arm/ls1021a-qds.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ls1021a-qds.dts stable/10/sys/gnu/dts/arm/ls1021a-twr.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ls1021a-twr.dts stable/10/sys/gnu/dts/arm/ls1021a.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ls1021a.dtsi stable/10/sys/gnu/dts/arm/meson.dtsi - copied, changed from r279385, head/sys/gnu/dts/arm/meson.dtsi stable/10/sys/gnu/dts/arm/meson6-atv1200.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/meson6-atv1200.dts stable/10/sys/gnu/dts/arm/meson6.dtsi - copied, changed from r279385, head/sys/gnu/dts/arm/meson6.dtsi stable/10/sys/gnu/dts/arm/meson8.dtsi - copied, changed from r279385, head/sys/gnu/dts/arm/meson8.dtsi stable/10/sys/gnu/dts/arm/moxart-uc7112lx.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/moxart-uc7112lx.dts stable/10/sys/gnu/dts/arm/moxart.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/moxart.dtsi stable/10/sys/gnu/dts/arm/mt6589-aquaris5.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/mt6589-aquaris5.dts stable/10/sys/gnu/dts/arm/mt6589.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/mt6589.dtsi stable/10/sys/gnu/dts/arm/mt6592-evb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/mt6592-evb.dts stable/10/sys/gnu/dts/arm/mt6592.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/mt6592.dtsi stable/10/sys/gnu/dts/arm/mt8127-moose.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/mt8127-moose.dts stable/10/sys/gnu/dts/arm/mt8127.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/mt8127.dtsi stable/10/sys/gnu/dts/arm/mt8135-evbp1.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/mt8135-evbp1.dts stable/10/sys/gnu/dts/arm/mt8135.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/mt8135.dtsi stable/10/sys/gnu/dts/arm/mxs-pinfunc.h - copied unchanged from r279385, head/sys/gnu/dts/arm/mxs-pinfunc.h stable/10/sys/gnu/dts/arm/nspire-classic.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/nspire-classic.dtsi stable/10/sys/gnu/dts/arm/nspire-clp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/nspire-clp.dts stable/10/sys/gnu/dts/arm/nspire-cx.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/nspire-cx.dts stable/10/sys/gnu/dts/arm/nspire-tp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/nspire-tp.dts stable/10/sys/gnu/dts/arm/nspire.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/nspire.dtsi stable/10/sys/gnu/dts/arm/omap-gpmc-smsc911x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap-gpmc-smsc911x.dtsi stable/10/sys/gnu/dts/arm/omap-gpmc-smsc9221.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap-gpmc-smsc9221.dtsi stable/10/sys/gnu/dts/arm/omap-zoom-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap-zoom-common.dtsi stable/10/sys/gnu/dts/arm/omap2.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap2.dtsi stable/10/sys/gnu/dts/arm/omap2420-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap2420-clocks.dtsi stable/10/sys/gnu/dts/arm/omap2420-h4.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap2420-h4.dts stable/10/sys/gnu/dts/arm/omap2420-n800.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap2420-n800.dts stable/10/sys/gnu/dts/arm/omap2420-n810-wimax.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap2420-n810-wimax.dts stable/10/sys/gnu/dts/arm/omap2420-n810.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap2420-n810.dts stable/10/sys/gnu/dts/arm/omap2420-n8x0-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap2420-n8x0-common.dtsi stable/10/sys/gnu/dts/arm/omap2420.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap2420.dtsi stable/10/sys/gnu/dts/arm/omap2430-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap2430-clocks.dtsi stable/10/sys/gnu/dts/arm/omap2430-sdp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap2430-sdp.dts stable/10/sys/gnu/dts/arm/omap2430.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap2430.dtsi stable/10/sys/gnu/dts/arm/omap24xx-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap24xx-clocks.dtsi stable/10/sys/gnu/dts/arm/omap3-beagle-xm-ab.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-beagle-xm-ab.dts stable/10/sys/gnu/dts/arm/omap3-beagle-xm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-beagle-xm.dts stable/10/sys/gnu/dts/arm/omap3-beagle.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-beagle.dts stable/10/sys/gnu/dts/arm/omap3-cm-t3517.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-cm-t3517.dts stable/10/sys/gnu/dts/arm/omap3-cm-t3530.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-cm-t3530.dts stable/10/sys/gnu/dts/arm/omap3-cm-t3730.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-cm-t3730.dts stable/10/sys/gnu/dts/arm/omap3-cm-t3x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-cm-t3x.dtsi stable/10/sys/gnu/dts/arm/omap3-cm-t3x30.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-cm-t3x30.dtsi stable/10/sys/gnu/dts/arm/omap3-devkit8000.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-devkit8000.dts stable/10/sys/gnu/dts/arm/omap3-evm-37xx.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-evm-37xx.dts stable/10/sys/gnu/dts/arm/omap3-evm-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-evm-common.dtsi stable/10/sys/gnu/dts/arm/omap3-evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-evm.dts stable/10/sys/gnu/dts/arm/omap3-gta04.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-gta04.dtsi stable/10/sys/gnu/dts/arm/omap3-gta04a3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-gta04a3.dts stable/10/sys/gnu/dts/arm/omap3-gta04a4.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-gta04a4.dts stable/10/sys/gnu/dts/arm/omap3-gta04a5.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-gta04a5.dts stable/10/sys/gnu/dts/arm/omap3-ha-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-ha-common.dtsi stable/10/sys/gnu/dts/arm/omap3-ha-lcd.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-ha-lcd.dts stable/10/sys/gnu/dts/arm/omap3-ha.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-ha.dts stable/10/sys/gnu/dts/arm/omap3-igep.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-igep.dtsi stable/10/sys/gnu/dts/arm/omap3-igep0020-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-igep0020-common.dtsi stable/10/sys/gnu/dts/arm/omap3-igep0020-rev-f.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-igep0020-rev-f.dts stable/10/sys/gnu/dts/arm/omap3-igep0020.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-igep0020.dts stable/10/sys/gnu/dts/arm/omap3-igep0030-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-igep0030-common.dtsi stable/10/sys/gnu/dts/arm/omap3-igep0030-rev-g.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-igep0030-rev-g.dts stable/10/sys/gnu/dts/arm/omap3-igep0030.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-igep0030.dts stable/10/sys/gnu/dts/arm/omap3-ldp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-ldp.dts stable/10/sys/gnu/dts/arm/omap3-lilly-a83x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-lilly-a83x.dtsi stable/10/sys/gnu/dts/arm/omap3-lilly-dbb056.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-lilly-dbb056.dts stable/10/sys/gnu/dts/arm/omap3-n9.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-n9.dts stable/10/sys/gnu/dts/arm/omap3-n900.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-n900.dts stable/10/sys/gnu/dts/arm/omap3-n950-n9.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-n950-n9.dtsi stable/10/sys/gnu/dts/arm/omap3-n950.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-n950.dts stable/10/sys/gnu/dts/arm/omap3-overo-alto35-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-alto35-common.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-alto35.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-alto35.dts stable/10/sys/gnu/dts/arm/omap3-overo-base.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-base.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-chestnut43-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-chestnut43-common.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-chestnut43.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-chestnut43.dts stable/10/sys/gnu/dts/arm/omap3-overo-common-dvi.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-common-dvi.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-common-lcd35.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-common-lcd35.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-common-lcd43.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-common-lcd43.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-common-peripherals.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-common-peripherals.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-gallop43-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-gallop43-common.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-gallop43.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-gallop43.dts stable/10/sys/gnu/dts/arm/omap3-overo-palo43-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-palo43-common.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-palo43.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-palo43.dts stable/10/sys/gnu/dts/arm/omap3-overo-storm-alto35.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-storm-alto35.dts stable/10/sys/gnu/dts/arm/omap3-overo-storm-chestnut43.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-storm-chestnut43.dts stable/10/sys/gnu/dts/arm/omap3-overo-storm-gallop43.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-storm-gallop43.dts stable/10/sys/gnu/dts/arm/omap3-overo-storm-palo43.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-storm-palo43.dts stable/10/sys/gnu/dts/arm/omap3-overo-storm-summit.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-storm-summit.dts stable/10/sys/gnu/dts/arm/omap3-overo-storm-tobi.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-storm-tobi.dts stable/10/sys/gnu/dts/arm/omap3-overo-storm.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-storm.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-summit-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-summit-common.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-summit.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-summit.dts stable/10/sys/gnu/dts/arm/omap3-overo-tobi-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-tobi-common.dtsi stable/10/sys/gnu/dts/arm/omap3-overo-tobi.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo-tobi.dts stable/10/sys/gnu/dts/arm/omap3-overo.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-overo.dtsi stable/10/sys/gnu/dts/arm/omap3-panel-sharp-ls037v7dw01.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-panel-sharp-ls037v7dw01.dtsi stable/10/sys/gnu/dts/arm/omap3-sb-t35.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-sb-t35.dtsi stable/10/sys/gnu/dts/arm/omap3-sbc-t3517.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-sbc-t3517.dts stable/10/sys/gnu/dts/arm/omap3-sbc-t3530.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-sbc-t3530.dts stable/10/sys/gnu/dts/arm/omap3-sbc-t3730.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-sbc-t3730.dts stable/10/sys/gnu/dts/arm/omap3-tao3530.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-tao3530.dtsi stable/10/sys/gnu/dts/arm/omap3-thunder.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-thunder.dts stable/10/sys/gnu/dts/arm/omap3-zoom3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3-zoom3.dts stable/10/sys/gnu/dts/arm/omap3.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3.dtsi stable/10/sys/gnu/dts/arm/omap3430-sdp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3430-sdp.dts stable/10/sys/gnu/dts/arm/omap3430es1-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3430es1-clocks.dtsi stable/10/sys/gnu/dts/arm/omap34xx-hs.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap34xx-hs.dtsi stable/10/sys/gnu/dts/arm/omap34xx-omap36xx-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap34xx-omap36xx-clocks.dtsi stable/10/sys/gnu/dts/arm/omap34xx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap34xx.dtsi stable/10/sys/gnu/dts/arm/omap36xx-am35xx-omap3430es2plus-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap36xx-am35xx-omap3430es2plus-clocks.dtsi stable/10/sys/gnu/dts/arm/omap36xx-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap36xx-clocks.dtsi stable/10/sys/gnu/dts/arm/omap36xx-hs.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap36xx-hs.dtsi stable/10/sys/gnu/dts/arm/omap36xx-omap3430es2plus-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap36xx-omap3430es2plus-clocks.dtsi stable/10/sys/gnu/dts/arm/omap36xx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap36xx.dtsi stable/10/sys/gnu/dts/arm/omap3xxx-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap3xxx-clocks.dtsi stable/10/sys/gnu/dts/arm/omap4-cpu-thermal.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-cpu-thermal.dtsi stable/10/sys/gnu/dts/arm/omap4-duovero-parlor.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-duovero-parlor.dts stable/10/sys/gnu/dts/arm/omap4-duovero.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-duovero.dtsi stable/10/sys/gnu/dts/arm/omap4-panda-a4.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-panda-a4.dts stable/10/sys/gnu/dts/arm/omap4-panda-common.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-panda-common.dtsi stable/10/sys/gnu/dts/arm/omap4-panda-es.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-panda-es.dts stable/10/sys/gnu/dts/arm/omap4-panda.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-panda.dts stable/10/sys/gnu/dts/arm/omap4-sdp-es23plus.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-sdp-es23plus.dts stable/10/sys/gnu/dts/arm/omap4-sdp.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-sdp.dts stable/10/sys/gnu/dts/arm/omap4-var-dvk-om44.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-var-dvk-om44.dts stable/10/sys/gnu/dts/arm/omap4-var-om44customboard.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-var-om44customboard.dtsi stable/10/sys/gnu/dts/arm/omap4-var-som-om44-wlan.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-var-som-om44-wlan.dtsi stable/10/sys/gnu/dts/arm/omap4-var-som-om44.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-var-som-om44.dtsi stable/10/sys/gnu/dts/arm/omap4-var-stk-om44.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4-var-stk-om44.dts stable/10/sys/gnu/dts/arm/omap4.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4.dtsi stable/10/sys/gnu/dts/arm/omap443x-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap443x-clocks.dtsi stable/10/sys/gnu/dts/arm/omap443x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap443x.dtsi stable/10/sys/gnu/dts/arm/omap4460.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap4460.dtsi stable/10/sys/gnu/dts/arm/omap446x-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap446x-clocks.dtsi stable/10/sys/gnu/dts/arm/omap44xx-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap44xx-clocks.dtsi stable/10/sys/gnu/dts/arm/omap5-cm-t54.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap5-cm-t54.dts stable/10/sys/gnu/dts/arm/omap5-core-thermal.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap5-core-thermal.dtsi stable/10/sys/gnu/dts/arm/omap5-gpu-thermal.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap5-gpu-thermal.dtsi stable/10/sys/gnu/dts/arm/omap5-sbc-t54.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap5-sbc-t54.dts stable/10/sys/gnu/dts/arm/omap5-uevm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/omap5-uevm.dts stable/10/sys/gnu/dts/arm/omap5.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap5.dtsi stable/10/sys/gnu/dts/arm/omap54xx-clocks.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/omap54xx-clocks.dtsi stable/10/sys/gnu/dts/arm/orion5x-lacie-d2-network.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/orion5x-lacie-d2-network.dts stable/10/sys/gnu/dts/arm/orion5x-lacie-ethernet-disk-mini-v2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/orion5x-lacie-ethernet-disk-mini-v2.dts stable/10/sys/gnu/dts/arm/orion5x-maxtor-shared-storage-2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/orion5x-maxtor-shared-storage-2.dts stable/10/sys/gnu/dts/arm/orion5x-mv88f5182.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/orion5x-mv88f5182.dtsi stable/10/sys/gnu/dts/arm/orion5x-rd88f5182-nas.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/orion5x-rd88f5182-nas.dts stable/10/sys/gnu/dts/arm/orion5x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/orion5x.dtsi stable/10/sys/gnu/dts/arm/phy3250.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/phy3250.dts stable/10/sys/gnu/dts/arm/picoxcell-pc3x2.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/picoxcell-pc3x2.dtsi stable/10/sys/gnu/dts/arm/picoxcell-pc3x3.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/picoxcell-pc3x3.dtsi stable/10/sys/gnu/dts/arm/picoxcell-pc7302-pc3x2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/picoxcell-pc7302-pc3x2.dts stable/10/sys/gnu/dts/arm/picoxcell-pc7302-pc3x3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/picoxcell-pc7302-pc3x3.dts stable/10/sys/gnu/dts/arm/prima2-evb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/prima2-evb.dts stable/10/sys/gnu/dts/arm/prima2.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/prima2.dtsi stable/10/sys/gnu/dts/arm/pxa27x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/pxa27x.dtsi stable/10/sys/gnu/dts/arm/pxa2xx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/pxa2xx.dtsi stable/10/sys/gnu/dts/arm/pxa3xx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/pxa3xx.dtsi stable/10/sys/gnu/dts/arm/r7s72100-genmai.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/r7s72100-genmai.dts stable/10/sys/gnu/dts/arm/r7s72100.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/r7s72100.dtsi stable/10/sys/gnu/dts/arm/r8a73a4-ape6evm-reference.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a73a4-ape6evm-reference.dts stable/10/sys/gnu/dts/arm/r8a73a4-ape6evm.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a73a4-ape6evm.dts stable/10/sys/gnu/dts/arm/r8a73a4.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a73a4.dtsi stable/10/sys/gnu/dts/arm/r8a7740-armadillo800eva.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7740-armadillo800eva.dts stable/10/sys/gnu/dts/arm/r8a7740.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7740.dtsi stable/10/sys/gnu/dts/arm/r8a7778-bockw-reference.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7778-bockw-reference.dts stable/10/sys/gnu/dts/arm/r8a7778-bockw.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7778-bockw.dts stable/10/sys/gnu/dts/arm/r8a7778.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7778.dtsi stable/10/sys/gnu/dts/arm/r8a7779-marzen.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7779-marzen.dts stable/10/sys/gnu/dts/arm/r8a7779.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7779.dtsi stable/10/sys/gnu/dts/arm/r8a7790-lager.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7790-lager.dts stable/10/sys/gnu/dts/arm/r8a7790.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7790.dtsi stable/10/sys/gnu/dts/arm/r8a7791-henninger.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7791-henninger.dts stable/10/sys/gnu/dts/arm/r8a7791-koelsch.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7791-koelsch.dts stable/10/sys/gnu/dts/arm/r8a7791.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7791.dtsi stable/10/sys/gnu/dts/arm/r8a7794-alt.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7794-alt.dts stable/10/sys/gnu/dts/arm/r8a7794.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a7794.dtsi stable/10/sys/gnu/dts/arm/r8a77xx-aa104xd12-panel.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/r8a77xx-aa104xd12-panel.dtsi stable/10/sys/gnu/dts/arm/rk3066a-bqcurie2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3066a-bqcurie2.dts stable/10/sys/gnu/dts/arm/rk3066a-marsboard.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3066a-marsboard.dts stable/10/sys/gnu/dts/arm/rk3066a-rayeager.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3066a-rayeager.dts stable/10/sys/gnu/dts/arm/rk3066a.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3066a.dtsi stable/10/sys/gnu/dts/arm/rk3188-radxarock.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3188-radxarock.dts stable/10/sys/gnu/dts/arm/rk3188.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3188.dtsi stable/10/sys/gnu/dts/arm/rk3288-evb-act8846.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3288-evb-act8846.dts stable/10/sys/gnu/dts/arm/rk3288-evb-rk808.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3288-evb-rk808.dts stable/10/sys/gnu/dts/arm/rk3288-evb.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3288-evb.dtsi stable/10/sys/gnu/dts/arm/rk3288-firefly-beta.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3288-firefly-beta.dts stable/10/sys/gnu/dts/arm/rk3288-firefly.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3288-firefly.dts stable/10/sys/gnu/dts/arm/rk3288-firefly.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3288-firefly.dtsi stable/10/sys/gnu/dts/arm/rk3288-thermal.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3288-thermal.dtsi stable/10/sys/gnu/dts/arm/rk3288.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3288.dtsi stable/10/sys/gnu/dts/arm/rk3xxx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/rk3xxx.dtsi stable/10/sys/gnu/dts/arm/s3c2416-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/s3c2416-pinctrl.dtsi stable/10/sys/gnu/dts/arm/s3c2416-smdk2416.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/s3c2416-smdk2416.dts stable/10/sys/gnu/dts/arm/s3c2416.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/s3c2416.dtsi stable/10/sys/gnu/dts/arm/s3c24xx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/s3c24xx.dtsi stable/10/sys/gnu/dts/arm/s5pv210-aquila.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/s5pv210-aquila.dts stable/10/sys/gnu/dts/arm/s5pv210-goni.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/s5pv210-goni.dts stable/10/sys/gnu/dts/arm/s5pv210-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/s5pv210-pinctrl.dtsi stable/10/sys/gnu/dts/arm/s5pv210-smdkc110.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/s5pv210-smdkc110.dts stable/10/sys/gnu/dts/arm/s5pv210-smdkv210.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/s5pv210-smdkv210.dts stable/10/sys/gnu/dts/arm/s5pv210-torbreck.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/s5pv210-torbreck.dts stable/10/sys/gnu/dts/arm/s5pv210.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/s5pv210.dtsi stable/10/sys/gnu/dts/arm/sama5d4.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sama5d4.dtsi stable/10/sys/gnu/dts/arm/samsung_k3pe0e000b.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/samsung_k3pe0e000b.dtsi stable/10/sys/gnu/dts/arm/sh7372-mackerel.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sh7372-mackerel.dts stable/10/sys/gnu/dts/arm/sh7372.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sh7372.dtsi stable/10/sys/gnu/dts/arm/sh73a0-kzm9g-reference.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sh73a0-kzm9g-reference.dts stable/10/sys/gnu/dts/arm/sh73a0-kzm9g.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sh73a0-kzm9g.dts stable/10/sys/gnu/dts/arm/sh73a0.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sh73a0.dtsi stable/10/sys/gnu/dts/arm/spear1310-evb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/spear1310-evb.dts stable/10/sys/gnu/dts/arm/spear1310.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/spear1310.dtsi stable/10/sys/gnu/dts/arm/spear1340-evb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/spear1340-evb.dts stable/10/sys/gnu/dts/arm/spear1340.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/spear1340.dtsi stable/10/sys/gnu/dts/arm/spear13xx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/spear13xx.dtsi stable/10/sys/gnu/dts/arm/spear300-evb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/spear300-evb.dts stable/10/sys/gnu/dts/arm/spear300.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/spear300.dtsi stable/10/sys/gnu/dts/arm/spear310-evb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/spear310-evb.dts stable/10/sys/gnu/dts/arm/spear310.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/spear310.dtsi stable/10/sys/gnu/dts/arm/spear320-evb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/spear320-evb.dts stable/10/sys/gnu/dts/arm/spear320-hmi.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/spear320-hmi.dts stable/10/sys/gnu/dts/arm/spear320.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/spear320.dtsi stable/10/sys/gnu/dts/arm/spear3xx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/spear3xx.dtsi stable/10/sys/gnu/dts/arm/spear600-evb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/spear600-evb.dts stable/10/sys/gnu/dts/arm/spear600.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/spear600.dtsi stable/10/sys/gnu/dts/arm/st-pincfg.h - copied unchanged from r279385, head/sys/gnu/dts/arm/st-pincfg.h stable/10/sys/gnu/dts/arm/ste-ccu8540-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-ccu8540-pinctrl.dtsi stable/10/sys/gnu/dts/arm/ste-ccu8540.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-ccu8540.dts stable/10/sys/gnu/dts/arm/ste-ccu9540.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-ccu9540.dts stable/10/sys/gnu/dts/arm/ste-dbx5x0.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-dbx5x0.dtsi stable/10/sys/gnu/dts/arm/ste-href-ab8500.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-href-ab8500.dtsi stable/10/sys/gnu/dts/arm/ste-href-ab8505.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-href-ab8505.dtsi stable/10/sys/gnu/dts/arm/ste-href-family-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-href-family-pinctrl.dtsi stable/10/sys/gnu/dts/arm/ste-href-stuib.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-href-stuib.dtsi stable/10/sys/gnu/dts/arm/ste-href-tvk1281618.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-href-tvk1281618.dtsi stable/10/sys/gnu/dts/arm/ste-href.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-href.dtsi stable/10/sys/gnu/dts/arm/ste-hrefprev60-stuib.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-hrefprev60-stuib.dts stable/10/sys/gnu/dts/arm/ste-hrefprev60-tvk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-hrefprev60-tvk.dts stable/10/sys/gnu/dts/arm/ste-hrefprev60.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-hrefprev60.dtsi stable/10/sys/gnu/dts/arm/ste-hrefv60plus-stuib.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-hrefv60plus-stuib.dts stable/10/sys/gnu/dts/arm/ste-hrefv60plus-tvk.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-hrefv60plus-tvk.dts stable/10/sys/gnu/dts/arm/ste-hrefv60plus.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-hrefv60plus.dtsi stable/10/sys/gnu/dts/arm/ste-nomadik-nhk15.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-nomadik-nhk15.dts stable/10/sys/gnu/dts/arm/ste-nomadik-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-nomadik-pinctrl.dtsi stable/10/sys/gnu/dts/arm/ste-nomadik-s8815.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-nomadik-s8815.dts stable/10/sys/gnu/dts/arm/ste-nomadik-stn8815.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-nomadik-stn8815.dtsi stable/10/sys/gnu/dts/arm/ste-snowball.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-snowball.dts stable/10/sys/gnu/dts/arm/ste-u300.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/ste-u300.dts stable/10/sys/gnu/dts/arm/stih407-b2120.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/stih407-b2120.dts stable/10/sys/gnu/dts/arm/stih407-clock.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih407-clock.dtsi stable/10/sys/gnu/dts/arm/stih407-family.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih407-family.dtsi stable/10/sys/gnu/dts/arm/stih407-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih407-pinctrl.dtsi stable/10/sys/gnu/dts/arm/stih407.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih407.dtsi stable/10/sys/gnu/dts/arm/stih410-b2120.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/stih410-b2120.dts stable/10/sys/gnu/dts/arm/stih410-clock.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih410-clock.dtsi stable/10/sys/gnu/dts/arm/stih410-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih410-pinctrl.dtsi stable/10/sys/gnu/dts/arm/stih410.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih410.dtsi stable/10/sys/gnu/dts/arm/stih415-b2000.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/stih415-b2000.dts stable/10/sys/gnu/dts/arm/stih415-b2020.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/stih415-b2020.dts stable/10/sys/gnu/dts/arm/stih415-clock.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih415-clock.dtsi stable/10/sys/gnu/dts/arm/stih415-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih415-pinctrl.dtsi stable/10/sys/gnu/dts/arm/stih415.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih415.dtsi stable/10/sys/gnu/dts/arm/stih416-b2000.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/stih416-b2000.dts stable/10/sys/gnu/dts/arm/stih416-b2020.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/stih416-b2020.dts stable/10/sys/gnu/dts/arm/stih416-b2020e.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/stih416-b2020e.dts stable/10/sys/gnu/dts/arm/stih416-clock.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih416-clock.dtsi stable/10/sys/gnu/dts/arm/stih416-pinctrl.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih416-pinctrl.dtsi stable/10/sys/gnu/dts/arm/stih416.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih416.dtsi stable/10/sys/gnu/dts/arm/stih418-b2199.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/stih418-b2199.dts stable/10/sys/gnu/dts/arm/stih418-clock.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih418-clock.dtsi stable/10/sys/gnu/dts/arm/stih418.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih418.dtsi stable/10/sys/gnu/dts/arm/stih41x-b2000.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih41x-b2000.dtsi stable/10/sys/gnu/dts/arm/stih41x-b2020.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih41x-b2020.dtsi stable/10/sys/gnu/dts/arm/stih41x-b2020x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih41x-b2020x.dtsi stable/10/sys/gnu/dts/arm/stih41x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stih41x.dtsi stable/10/sys/gnu/dts/arm/stihxxx-b2120.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/stihxxx-b2120.dtsi stable/10/sys/gnu/dts/arm/sun4i-a10-a1000.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-a1000.dts stable/10/sys/gnu/dts/arm/sun4i-a10-ba10-tvbox.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-ba10-tvbox.dts stable/10/sys/gnu/dts/arm/sun4i-a10-chuwi-v7-cw0825.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-chuwi-v7-cw0825.dts stable/10/sys/gnu/dts/arm/sun4i-a10-cubieboard.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-cubieboard.dts stable/10/sys/gnu/dts/arm/sun4i-a10-hackberry.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-hackberry.dts stable/10/sys/gnu/dts/arm/sun4i-a10-hyundai-a7hd.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-hyundai-a7hd.dts stable/10/sys/gnu/dts/arm/sun4i-a10-inet97fv2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-inet97fv2.dts stable/10/sys/gnu/dts/arm/sun4i-a10-marsboard.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-marsboard.dts stable/10/sys/gnu/dts/arm/sun4i-a10-mini-xplus.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-mini-xplus.dts stable/10/sys/gnu/dts/arm/sun4i-a10-mk802.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-mk802.dts stable/10/sys/gnu/dts/arm/sun4i-a10-mk802ii.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-mk802ii.dts stable/10/sys/gnu/dts/arm/sun4i-a10-olinuxino-lime.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-olinuxino-lime.dts stable/10/sys/gnu/dts/arm/sun4i-a10-pcduino.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10-pcduino.dts stable/10/sys/gnu/dts/arm/sun4i-a10.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sun4i-a10.dtsi stable/10/sys/gnu/dts/arm/sun5i-a10s-mk802.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun5i-a10s-mk802.dts stable/10/sys/gnu/dts/arm/sun5i-a10s-olinuxino-micro.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun5i-a10s-olinuxino-micro.dts stable/10/sys/gnu/dts/arm/sun5i-a10s-r7-tv-dongle.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun5i-a10s-r7-tv-dongle.dts stable/10/sys/gnu/dts/arm/sun5i-a10s.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sun5i-a10s.dtsi stable/10/sys/gnu/dts/arm/sun5i-a13-hsg-h702.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun5i-a13-hsg-h702.dts stable/10/sys/gnu/dts/arm/sun5i-a13-olinuxino-micro.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun5i-a13-olinuxino-micro.dts stable/10/sys/gnu/dts/arm/sun5i-a13-olinuxino.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun5i-a13-olinuxino.dts stable/10/sys/gnu/dts/arm/sun5i-a13.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sun5i-a13.dtsi stable/10/sys/gnu/dts/arm/sun6i-a31-app4-evb1.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun6i-a31-app4-evb1.dts stable/10/sys/gnu/dts/arm/sun6i-a31-colombus.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun6i-a31-colombus.dts stable/10/sys/gnu/dts/arm/sun6i-a31-hummingbird.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun6i-a31-hummingbird.dts stable/10/sys/gnu/dts/arm/sun6i-a31-m9.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun6i-a31-m9.dts stable/10/sys/gnu/dts/arm/sun6i-a31.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sun6i-a31.dtsi stable/10/sys/gnu/dts/arm/sun6i-a31s-cs908.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun6i-a31s-cs908.dts stable/10/sys/gnu/dts/arm/sun6i-a31s.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sun6i-a31s.dtsi stable/10/sys/gnu/dts/arm/sun7i-a20-bananapi.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20-bananapi.dts stable/10/sys/gnu/dts/arm/sun7i-a20-bananapro.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20-bananapro.dts stable/10/sys/gnu/dts/arm/sun7i-a20-cubieboard2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20-cubieboard2.dts stable/10/sys/gnu/dts/arm/sun7i-a20-cubietruck.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20-cubietruck.dts stable/10/sys/gnu/dts/arm/sun7i-a20-hummingbird.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20-hummingbird.dts stable/10/sys/gnu/dts/arm/sun7i-a20-i12-tvbox.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20-i12-tvbox.dts stable/10/sys/gnu/dts/arm/sun7i-a20-m3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20-m3.dts stable/10/sys/gnu/dts/arm/sun7i-a20-olinuxino-lime.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20-olinuxino-lime.dts stable/10/sys/gnu/dts/arm/sun7i-a20-olinuxino-lime2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20-olinuxino-lime2.dts stable/10/sys/gnu/dts/arm/sun7i-a20-olinuxino-micro.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20-olinuxino-micro.dts stable/10/sys/gnu/dts/arm/sun7i-a20-pcduino3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20-pcduino3.dts stable/10/sys/gnu/dts/arm/sun7i-a20.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sun7i-a20.dtsi stable/10/sys/gnu/dts/arm/sun8i-a23-ippo-q8h-v1.2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun8i-a23-ippo-q8h-v1.2.dts stable/10/sys/gnu/dts/arm/sun8i-a23-ippo-q8h-v5.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun8i-a23-ippo-q8h-v5.dts stable/10/sys/gnu/dts/arm/sun8i-a23.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sun8i-a23.dtsi stable/10/sys/gnu/dts/arm/sun9i-a80-optimus.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/sun9i-a80-optimus.dts stable/10/sys/gnu/dts/arm/sun9i-a80.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sun9i-a80.dtsi stable/10/sys/gnu/dts/arm/sunxi-common-regulators.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/sunxi-common-regulators.dtsi stable/10/sys/gnu/dts/arm/tegra114-dalmore.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra114-dalmore.dts stable/10/sys/gnu/dts/arm/tegra114-roth.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra114-roth.dts stable/10/sys/gnu/dts/arm/tegra114-tn7.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra114-tn7.dts stable/10/sys/gnu/dts/arm/tegra114.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra114.dtsi stable/10/sys/gnu/dts/arm/tegra124-jetson-tk1.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra124-jetson-tk1.dts stable/10/sys/gnu/dts/arm/tegra124-nyan-big.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra124-nyan-big.dts stable/10/sys/gnu/dts/arm/tegra124-venice2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra124-venice2.dts stable/10/sys/gnu/dts/arm/tegra124.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra124.dtsi stable/10/sys/gnu/dts/arm/tegra20-colibri-512.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-colibri-512.dtsi stable/10/sys/gnu/dts/arm/tegra20-harmony.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-harmony.dts stable/10/sys/gnu/dts/arm/tegra20-iris-512.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-iris-512.dts stable/10/sys/gnu/dts/arm/tegra20-medcom-wide.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-medcom-wide.dts stable/10/sys/gnu/dts/arm/tegra20-paz00.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-paz00.dts stable/10/sys/gnu/dts/arm/tegra20-plutux.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-plutux.dts stable/10/sys/gnu/dts/arm/tegra20-seaboard.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-seaboard.dts stable/10/sys/gnu/dts/arm/tegra20-tamonten.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-tamonten.dtsi stable/10/sys/gnu/dts/arm/tegra20-tec.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-tec.dts stable/10/sys/gnu/dts/arm/tegra20-trimslice.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-trimslice.dts stable/10/sys/gnu/dts/arm/tegra20-ventana.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-ventana.dts stable/10/sys/gnu/dts/arm/tegra20-whistler.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20-whistler.dts stable/10/sys/gnu/dts/arm/tegra20.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra20.dtsi stable/10/sys/gnu/dts/arm/tegra30-apalis-eval.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra30-apalis-eval.dts stable/10/sys/gnu/dts/arm/tegra30-apalis.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra30-apalis.dtsi stable/10/sys/gnu/dts/arm/tegra30-beaver.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra30-beaver.dts stable/10/sys/gnu/dts/arm/tegra30-cardhu-a02.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra30-cardhu-a02.dts stable/10/sys/gnu/dts/arm/tegra30-cardhu-a04.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra30-cardhu-a04.dts stable/10/sys/gnu/dts/arm/tegra30-cardhu.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra30-cardhu.dtsi stable/10/sys/gnu/dts/arm/tegra30-colibri-eval-v3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra30-colibri-eval-v3.dts stable/10/sys/gnu/dts/arm/tegra30-colibri.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra30-colibri.dtsi stable/10/sys/gnu/dts/arm/tegra30.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tegra30.dtsi stable/10/sys/gnu/dts/arm/tps6507x.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tps6507x.dtsi stable/10/sys/gnu/dts/arm/tps65217.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tps65217.dtsi stable/10/sys/gnu/dts/arm/tps65910.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/tps65910.dtsi stable/10/sys/gnu/dts/arm/twl4030.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/twl4030.dtsi stable/10/sys/gnu/dts/arm/twl4030_omap3.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/twl4030_omap3.dtsi stable/10/sys/gnu/dts/arm/twl6030.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/twl6030.dtsi stable/10/sys/gnu/dts/arm/twl6030_omap4.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/twl6030_omap4.dtsi stable/10/sys/gnu/dts/arm/usb_a9g20-dab-mmx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/usb_a9g20-dab-mmx.dtsi stable/10/sys/gnu/dts/arm/versatile-ab.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/versatile-ab.dts stable/10/sys/gnu/dts/arm/versatile-pb.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/versatile-pb.dts stable/10/sys/gnu/dts/arm/vexpress-v2m-rs1.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/vexpress-v2m-rs1.dtsi stable/10/sys/gnu/dts/arm/vexpress-v2m.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/vexpress-v2m.dtsi stable/10/sys/gnu/dts/arm/vexpress-v2p-ca15-tc1.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/vexpress-v2p-ca15-tc1.dts stable/10/sys/gnu/dts/arm/vexpress-v2p-ca15_a7.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/vexpress-v2p-ca15_a7.dts stable/10/sys/gnu/dts/arm/vexpress-v2p-ca5s.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/vexpress-v2p-ca5s.dts stable/10/sys/gnu/dts/arm/vexpress-v2p-ca9.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/vexpress-v2p-ca9.dts stable/10/sys/gnu/dts/arm/vf-colibri-eval-v3.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/vf-colibri-eval-v3.dtsi stable/10/sys/gnu/dts/arm/vf-colibri.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/vf-colibri.dtsi stable/10/sys/gnu/dts/arm/vf500-colibri-eval-v3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/vf500-colibri-eval-v3.dts stable/10/sys/gnu/dts/arm/vf500-colibri.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/vf500-colibri.dtsi stable/10/sys/gnu/dts/arm/vf500.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/vf500.dtsi stable/10/sys/gnu/dts/arm/vf610-colibri-eval-v3.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/vf610-colibri-eval-v3.dts stable/10/sys/gnu/dts/arm/vf610-colibri.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/vf610-colibri.dtsi stable/10/sys/gnu/dts/arm/vf610-cosmic.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/vf610-cosmic.dts stable/10/sys/gnu/dts/arm/vf610-pinfunc.h - copied unchanged from r279385, head/sys/gnu/dts/arm/vf610-pinfunc.h stable/10/sys/gnu/dts/arm/vf610-twr.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/vf610-twr.dts stable/10/sys/gnu/dts/arm/vfxxx.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/vfxxx.dtsi stable/10/sys/gnu/dts/arm/vt8500-bv07.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/vt8500-bv07.dts stable/10/sys/gnu/dts/arm/vt8500.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/vt8500.dtsi stable/10/sys/gnu/dts/arm/wm8505-ref.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/wm8505-ref.dts stable/10/sys/gnu/dts/arm/wm8505.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/wm8505.dtsi stable/10/sys/gnu/dts/arm/wm8650-mid.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/wm8650-mid.dts stable/10/sys/gnu/dts/arm/wm8650.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/wm8650.dtsi stable/10/sys/gnu/dts/arm/wm8750-apc8750.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/wm8750-apc8750.dts stable/10/sys/gnu/dts/arm/wm8750.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/wm8750.dtsi stable/10/sys/gnu/dts/arm/wm8850-w70v2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/wm8850-w70v2.dts stable/10/sys/gnu/dts/arm/wm8850.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/wm8850.dtsi stable/10/sys/gnu/dts/arm/xenvm-4.2.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/xenvm-4.2.dts stable/10/sys/gnu/dts/arm/zynq-7000.dtsi - copied unchanged from r279385, head/sys/gnu/dts/arm/zynq-7000.dtsi stable/10/sys/gnu/dts/arm/zynq-parallella.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/zynq-parallella.dts stable/10/sys/gnu/dts/arm/zynq-zc702.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/zynq-zc702.dts stable/10/sys/gnu/dts/arm/zynq-zc706.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/zynq-zc706.dts stable/10/sys/gnu/dts/arm/zynq-zed.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/zynq-zed.dts stable/10/sys/gnu/dts/arm/zynq-zybo.dts - copied unchanged from r279385, head/sys/gnu/dts/arm/zynq-zybo.dts stable/10/sys/gnu/dts/include/dt-bindings/arm/ - copied from r279385, head/sys/gnu/dts/include/dt-bindings/arm/ stable/10/sys/gnu/dts/include/dt-bindings/clock/exynos4415.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/clock/exynos4415.h stable/10/sys/gnu/dts/include/dt-bindings/clock/exynos7-clk.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/clock/exynos7-clk.h stable/10/sys/gnu/dts/include/dt-bindings/clock/pxa-clock.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/clock/pxa-clock.h stable/10/sys/gnu/dts/include/dt-bindings/clock/r8a7740-clock.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/clock/r8a7740-clock.h stable/10/sys/gnu/dts/include/dt-bindings/clock/r8a7794-clock.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/clock/r8a7794-clock.h stable/10/sys/gnu/dts/include/dt-bindings/clock/sh73a0-clock.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/clock/sh73a0-clock.h stable/10/sys/gnu/dts/include/dt-bindings/clock/stih407-clks.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/clock/stih407-clks.h stable/10/sys/gnu/dts/include/dt-bindings/clock/stih410-clks.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/clock/stih410-clks.h stable/10/sys/gnu/dts/include/dt-bindings/clock/stih418-clks.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/clock/stih418-clks.h stable/10/sys/gnu/dts/include/dt-bindings/clock/tegra124-car-common.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/clock/tegra124-car-common.h stable/10/sys/gnu/dts/include/dt-bindings/dma/sun4i-a10.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/dma/sun4i-a10.h stable/10/sys/gnu/dts/include/dt-bindings/gpio/meson8-gpio.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/gpio/meson8-gpio.h stable/10/sys/gnu/dts/include/dt-bindings/input/ti-drv260x.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/input/ti-drv260x.h stable/10/sys/gnu/dts/include/dt-bindings/interrupt-controller/mips-gic.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/interrupt-controller/mips-gic.h stable/10/sys/gnu/dts/include/dt-bindings/memory/ - copied from r279385, head/sys/gnu/dts/include/dt-bindings/memory/ stable/10/sys/gnu/dts/include/dt-bindings/mfd/qcom-rpm.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/mfd/qcom-rpm.h stable/10/sys/gnu/dts/include/dt-bindings/phy/phy.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/phy/phy.h stable/10/sys/gnu/dts/include/dt-bindings/pinctrl/sun4i-a10.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/pinctrl/sun4i-a10.h stable/10/sys/gnu/dts/include/dt-bindings/reset-controller/stih407-resets.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/reset-controller/stih407-resets.h stable/10/sys/gnu/dts/include/dt-bindings/sound/cs35l32.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/sound/cs35l32.h stable/10/sys/gnu/dts/include/dt-bindings/sound/samsung-i2s.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/sound/samsung-i2s.h stable/10/sys/gnu/dts/include/dt-bindings/thermal/tegra124-soctherm.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/thermal/tegra124-soctherm.h stable/10/sys/gnu/dts/include/dt-bindings/thermal/thermal_exynos.h - copied unchanged from r279385, head/sys/gnu/dts/include/dt-bindings/thermal/thermal_exynos.h Deleted: stable/10/sys/gnu/dts/include/dt-bindings/clock/lsi,axm5516-clks.h stable/10/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-apq8084.h stable/10/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-ipq806x.h stable/10/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8660.h stable/10/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8960.h stable/10/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8974.h stable/10/sys/gnu/dts/include/dt-bindings/clock/qcom,mmcc-apq8084.h stable/10/sys/gnu/dts/include/dt-bindings/clock/qcom,mmcc-msm8960.h stable/10/sys/gnu/dts/include/dt-bindings/clock/qcom,mmcc-msm8974.h stable/10/sys/gnu/dts/include/dt-bindings/clock/samsung,s3c64xx-clock.h stable/10/sys/gnu/dts/include/dt-bindings/reset/ stable/10/sys/gnu/dts/include/dt-bindings/soc/ Modified: stable/10/sys/gnu/dts/arm/at91rm9200.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91rm9200ek.dts (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9260.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9261.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9263.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9g20.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9g20ek_common.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9g45.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9m10g45ek.dts (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9n12.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9n12ek.dts (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9rl.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9x25.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9x35.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9x5.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9x5_can.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9x5_usart3.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/at91sam9x5ek.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/ethernut5.dts (contents, props changed) stable/10/sys/gnu/dts/arm/imx51-apf51dev.dts (contents, props changed) stable/10/sys/gnu/dts/arm/imx51-babbage.dts (contents, props changed) stable/10/sys/gnu/dts/arm/imx51.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx53-qsrb.dts (contents, props changed) stable/10/sys/gnu/dts/arm/imx53-smd.dts (contents, props changed) stable/10/sys/gnu/dts/arm/imx53.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6dl-hummingboard.dts (contents, props changed) stable/10/sys/gnu/dts/arm/imx6dl.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6q-gw5400-a.dts (contents, props changed) stable/10/sys/gnu/dts/arm/imx6q-udoo.dts (contents, props changed) stable/10/sys/gnu/dts/arm/imx6q.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6qdl-cubox-i.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6qdl-gw51xx.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6qdl-gw52xx.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6qdl-gw53xx.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6qdl-gw54xx.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6qdl-nitrogen6x.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6qdl-phytec-pfla02.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6qdl-rex.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6qdl-sabrelite.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6qdl-sabresd.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6qdl.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6sl-evk.dts (contents, props changed) stable/10/sys/gnu/dts/arm/imx6sl.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/imx6sx-sdb.dts (contents, props changed) stable/10/sys/gnu/dts/arm/imx6sx.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/sama5d3.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/sama5d31.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/sama5d33.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/sama5d34.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/sama5d35.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/sama5d36.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/sama5d3_can.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/sama5d3xcm.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/sama5d3xmb.dtsi (contents, props changed) stable/10/sys/gnu/dts/arm/vf610.dtsi (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/exynos3250.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/exynos4.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/exynos5420.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/hix5hd2-clock.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/imx5-clock.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/imx6qdl-clock.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/imx6sl-clock.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/imx6sx-clock.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/r8a7790-clock.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/r8a7791-clock.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/rk3188-cru-common.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/rk3288-cru.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/tegra114-car.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/tegra124-car.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/tegra20-car.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/vf610-clock.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/dma/at91.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/interrupt-controller/arm-gic.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/pinctrl/at91.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/pinctrl/dra.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/pinctrl/omap.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/pinctrl/rockchip.h (contents, props changed) stable/10/sys/gnu/dts/include/dt-bindings/thermal/thermal.h (contents, props changed) Directory Properties: stable/10/ (props changed) stable/10/sys/gnu/dts/ (props changed) stable/10/sys/gnu/dts/FreeBSD-list (props changed) stable/10/sys/gnu/dts/FreeBSD-upgrade (props changed) stable/10/sys/gnu/dts/arm/animeo_ip.dts (props changed) stable/10/sys/gnu/dts/arm/at91-ariag25.dts (props changed) stable/10/sys/gnu/dts/arm/at91-cosino.dtsi (props changed) stable/10/sys/gnu/dts/arm/at91-cosino_mega2560.dts (props changed) stable/10/sys/gnu/dts/arm/at91-foxg20.dts (props changed) stable/10/sys/gnu/dts/arm/at91-qil_a9260.dts (props changed) stable/10/sys/gnu/dts/arm/at91-sama5d3_xplained.dts (props changed) stable/10/sys/gnu/dts/arm/at91rm9200_pqfp.dtsi (props changed) stable/10/sys/gnu/dts/arm/at91sam9261ek.dts (props changed) stable/10/sys/gnu/dts/arm/at91sam9263ek.dts (props changed) stable/10/sys/gnu/dts/arm/at91sam9g15.dtsi (props changed) stable/10/sys/gnu/dts/arm/at91sam9g15ek.dts (props changed) stable/10/sys/gnu/dts/arm/at91sam9g20ek.dts (props changed) stable/10/sys/gnu/dts/arm/at91sam9g20ek_2mmc.dts (props changed) stable/10/sys/gnu/dts/arm/at91sam9g25.dtsi (props changed) stable/10/sys/gnu/dts/arm/at91sam9g25ek.dts (props changed) stable/10/sys/gnu/dts/arm/at91sam9g35.dtsi (props changed) stable/10/sys/gnu/dts/arm/at91sam9g35ek.dts (props changed) stable/10/sys/gnu/dts/arm/at91sam9rlek.dts (props changed) stable/10/sys/gnu/dts/arm/at91sam9x25ek.dts (props changed) stable/10/sys/gnu/dts/arm/at91sam9x35ek.dts (props changed) stable/10/sys/gnu/dts/arm/at91sam9x5_isi.dtsi (props changed) stable/10/sys/gnu/dts/arm/at91sam9x5_lcd.dtsi (props changed) stable/10/sys/gnu/dts/arm/at91sam9x5_macb0.dtsi (props changed) stable/10/sys/gnu/dts/arm/at91sam9x5_macb1.dtsi (props changed) stable/10/sys/gnu/dts/arm/at91sam9x5cm.dtsi (props changed) stable/10/sys/gnu/dts/arm/evk-pro3.dts (props changed) stable/10/sys/gnu/dts/arm/ge863-pro3.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx51-apf51.dts (props changed) stable/10/sys/gnu/dts/arm/imx51-digi-connectcore-jsk.dts (props changed) stable/10/sys/gnu/dts/arm/imx51-digi-connectcore-som.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx51-eukrea-cpuimx51.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx51-eukrea-mbimxsd51-baseboard.dts (props changed) stable/10/sys/gnu/dts/arm/imx51-pinfunc.h (props changed) stable/10/sys/gnu/dts/arm/imx53-ard.dts (props changed) stable/10/sys/gnu/dts/arm/imx53-evk.dts (props changed) stable/10/sys/gnu/dts/arm/imx53-m53.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx53-m53evk.dts (props changed) stable/10/sys/gnu/dts/arm/imx53-mba53.dts (props changed) stable/10/sys/gnu/dts/arm/imx53-pinfunc.h (props changed) stable/10/sys/gnu/dts/arm/imx53-qsb-common.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx53-qsb.dts (props changed) stable/10/sys/gnu/dts/arm/imx53-tqma53.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx53-tx53-x03x.dts (props changed) stable/10/sys/gnu/dts/arm/imx53-tx53-x13x.dts (props changed) stable/10/sys/gnu/dts/arm/imx53-tx53.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx53-voipac-bsb.dts (props changed) stable/10/sys/gnu/dts/arm/imx53-voipac-dmm-668.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx6dl-aristainetos_4.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-aristainetos_7.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-cubox-i.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-dfi-fs700-m60.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-gw51xx.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-gw52xx.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-gw53xx.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-gw54xx.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-nitrogen6x.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-phytec-pbab01.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-phytec-pfla02.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx6dl-pinfunc.h (props changed) stable/10/sys/gnu/dts/arm/imx6dl-rex-basic.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-riotboard.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-sabreauto.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-sabrelite.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-sabresd.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-tx6dl-comtft.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-tx6u-801x.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-tx6u-811x.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-wandboard-revb1.dts (props changed) stable/10/sys/gnu/dts/arm/imx6dl-wandboard.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-arm2.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-cm-fx6.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-cubox-i.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-dfi-fs700-m60.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-dmo-edmqmx6.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-gk802.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-gw51xx.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-gw52xx.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-gw53xx.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-gw54xx.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-nitrogen6x.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-phytec-pbab01.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-phytec-pfla02.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx6q-pinfunc.h (props changed) stable/10/sys/gnu/dts/arm/imx6q-rex-pro.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-sabreauto.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-sabrelite.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-sabresd.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-sbc6x.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-tx6q-1010-comtft.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-tx6q-1010.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-tx6q-1020-comtft.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-tx6q-1020.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-tx6q-1110.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-wandboard-revb1.dts (props changed) stable/10/sys/gnu/dts/arm/imx6q-wandboard.dts (props changed) stable/10/sys/gnu/dts/arm/imx6qdl-aristainetos.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx6qdl-dfi-fs700-m60.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx6qdl-sabreauto.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx6qdl-tx6.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx6qdl-wandboard-revb1.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx6qdl-wandboard-revc1.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx6qdl-wandboard.dtsi (props changed) stable/10/sys/gnu/dts/arm/imx6sl-pinfunc.h (props changed) stable/10/sys/gnu/dts/arm/kizbox.dts (props changed) stable/10/sys/gnu/dts/arm/mpa1600.dts (props changed) stable/10/sys/gnu/dts/arm/pm9g45.dts (props changed) stable/10/sys/gnu/dts/arm/sama5d31ek.dts (props changed) stable/10/sys/gnu/dts/arm/sama5d33ek.dts (props changed) stable/10/sys/gnu/dts/arm/sama5d34ek.dts (props changed) stable/10/sys/gnu/dts/arm/sama5d35ek.dts (props changed) stable/10/sys/gnu/dts/arm/sama5d36ek.dts (props changed) stable/10/sys/gnu/dts/arm/sama5d3_emac.dtsi (props changed) stable/10/sys/gnu/dts/arm/sama5d3_gmac.dtsi (props changed) stable/10/sys/gnu/dts/arm/sama5d3_lcd.dtsi (props changed) stable/10/sys/gnu/dts/arm/sama5d3_mci2.dtsi (props changed) stable/10/sys/gnu/dts/arm/sama5d3_tcb1.dtsi (props changed) stable/10/sys/gnu/dts/arm/sama5d3_uart.dtsi (props changed) stable/10/sys/gnu/dts/arm/sama5d3xdm.dtsi (props changed) stable/10/sys/gnu/dts/arm/skeleton.dtsi (props changed) stable/10/sys/gnu/dts/arm/skeleton64.dtsi (props changed) stable/10/sys/gnu/dts/arm/tny_a9260.dts (props changed) stable/10/sys/gnu/dts/arm/tny_a9260_common.dtsi (props changed) stable/10/sys/gnu/dts/arm/tny_a9263.dts (props changed) stable/10/sys/gnu/dts/arm/tny_a9g20.dts (props changed) stable/10/sys/gnu/dts/arm/usb_a9260.dts (props changed) stable/10/sys/gnu/dts/arm/usb_a9260_common.dtsi (props changed) stable/10/sys/gnu/dts/arm/usb_a9263.dts (props changed) stable/10/sys/gnu/dts/arm/usb_a9g20.dts (props changed) stable/10/sys/gnu/dts/arm/usb_a9g20_common.dtsi (props changed) stable/10/sys/gnu/dts/arm/usb_a9g20_lpw.dts (props changed) stable/10/sys/gnu/dts/include/dt-bindings/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clk/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clk/at91.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clk/exynos-audss-clk.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clk/ti-dra7-atl.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/at91.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/bcm21664.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/bcm281xx.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/berlin2.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/berlin2q.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/clps711x-clock.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/efm32-cmu.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/exynos-audss-clk.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/exynos5250.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/exynos5260-clk.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/exynos5410.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/exynos5440.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/hi3620-clock.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/hip04-clock.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/imx1-clock.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/imx21-clock.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/imx27-clock.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/mpc512x-clock.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/r7s72100-clock.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/r8a7779-clock.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/rk3066a-cru.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/rk3188-cru.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/s3c2410.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/s3c2412.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/s3c2443.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/s5pv210-audss.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/s5pv210.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/stih415-clks.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/stih416-clks.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/clock/tegra30-car.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/dma/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/dma/nbpfaxi.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/gpio/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/gpio/gpio.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/gpio/tegra-gpio.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/input/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/input/input.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/interrupt-controller/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/interrupt-controller/irq.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/mfd/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/mfd/as3722.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/mfd/dbx500-prcmu.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/mfd/palmas.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/phy/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/phy/phy-miphy365x.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/pinctrl/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/pinctrl/am33xx.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/pinctrl/am43xx.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/pinctrl/nomadik.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/pinctrl/pinctrl-tegra-xusb.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/pinctrl/pinctrl-tegra.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/pwm/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/pwm/pwm.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/reset-controller/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/reset-controller/stih415-resets.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/reset-controller/stih416-resets.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/sound/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/sound/fsl-imx-audmux.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/sound/tlv320aic31xx-micbias.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/spmi/ (props changed) stable/10/sys/gnu/dts/include/dt-bindings/spmi/spmi.h (props changed) stable/10/sys/gnu/dts/include/dt-bindings/thermal/ (props changed) Copied: stable/10/sys/gnu/dts/arm/aks-cdu.dts (from r279385, head/sys/gnu/dts/arm/aks-cdu.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/gnu/dts/arm/aks-cdu.dts Sat Jun 6 18:03:36 2015 (r284090, copy of r279385, head/sys/gnu/dts/arm/aks-cdu.dts) @@ -0,0 +1,119 @@ +/* + * aks-cdu.dts - Device Tree file for AK signal CDU + * + * Copyright (C) 2012 AK signal Brno a.s. + * 2012 Jiri Prchal + * + * Licensed under GPLv2 or later. + */ + +/dts-v1/; + +#include "ge863-pro3.dtsi" + +/ { + chosen { + bootargs = "console=ttyS0,115200 ubi.mtd=4 root=ubi0:rootfs rootfstype=ubifs"; + }; + + clocks { + slow_xtal { + clock-frequency = <32768>; + }; + }; + + ahb { + apb { + usart0: serial@fffb0000 { + status = "okay"; + }; + + usart1: serial@fffb4000 { + status = "okay"; + linux,rs485-enabled-at-boot-time; + rs485-rts-delay = <0 0>; + }; + + usart2: serial@fffb8000 { + status = "okay"; + linux,rs485-enabled-at-boot-time; + rs485-rts-delay = <0 0>; + }; + + usart3: serial@fffd0000 { + status = "okay"; + linux,rs485-enabled-at-boot-time; + rs485-rts-delay = <0 0>; + }; + + macb0: ethernet@fffc4000 { + phy-mode = "rmii"; + status = "okay"; + }; + + usb1: gadget@fffa4000 { + atmel,vbus-gpio = <&pioC 15 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; + }; + + usb0: ohci@00500000 { + num-ports = <2>; + status = "okay"; + }; + + nand0: nand@40000000 { + nand-bus-width = <8>; + nand-ecc-mode = "soft"; + nand-on-flash-bbt; + status = "okay"; + + bootstrap@0 { + label = "bootstrap"; + reg = <0x0 0x40000>; + }; + + uboot@40000 { + label = "uboot"; + reg = <0x40000 0x80000>; + }; + ubootenv@c0000 { + label = "ubootenv"; + reg = <0xc0000 0x40000>; + }; + kernel@100000 { + label = "kernel"; + reg = <0x100000 0x400000>; + }; + rootfs@500000 { + label = "rootfs"; + reg = <0x500000 0x7b00000>; + }; + }; + }; + + leds { + compatible = "gpio-leds"; + + red { + gpios = <&pioC 10 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "none"; + }; + + green { + gpios = <&pioA 5 GPIO_ACTIVE_LOW>; + linux,default-trigger = "none"; + default-state = "on"; + }; + + yellow { + gpios = <&pioB 20 GPIO_ACTIVE_LOW>; + linux,default-trigger = "none"; + }; + + blue { + gpios = <&pioB 21 GPIO_ACTIVE_LOW>; + linux,default-trigger = "none"; + }; + }; +}; Copied: stable/10/sys/gnu/dts/arm/am335x-base0033.dts (from r279385, head/sys/gnu/dts/arm/am335x-base0033.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/gnu/dts/arm/am335x-base0033.dts Sat Jun 6 18:03:36 2015 (r284090, copy of r279385, head/sys/gnu/dts/arm/am335x-base0033.dts) @@ -0,0 +1,95 @@ +/* + * am335x-base0033.dts - Device Tree file for IGEP AQUILA EXPANSION + * + * Copyright (C) 2013 ISEE 2007 SL - http://www.isee.biz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include "am335x-igep0033.dtsi" + +/ { + model = "IGEP COM AM335x on AQUILA Expansion"; + compatible = "isee,am335x-base0033", "isee,am335x-igep0033", "ti,am33xx"; + + hdmi { + compatible = "ti,tilcdc,slave"; + i2c = <&i2c0>; + pinctrl-names = "default", "off"; + pinctrl-0 = <&nxp_hdmi_pins>; + pinctrl-1 = <&nxp_hdmi_off_pins>; + status = "okay"; + }; + + leds_base { + pinctrl-names = "default"; + pinctrl-0 = <&leds_base_pins>; + + compatible = "gpio-leds"; + + led@0 { + label = "base:red:user"; + gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>; /* gpio1_21 */ + default-state = "off"; + }; + + led@1 { + label = "base:green:user"; + gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>; /* gpio2_0 */ + default-state = "off"; + }; + }; +}; + +&am33xx_pinmux { + nxp_hdmi_pins: pinmux_nxp_hdmi_pins { + pinctrl-single,pins = < + 0x1b0 (PIN_OUTPUT | MUX_MODE3) /* xdma_event_intr0.clkout1 */ + 0xa0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data0 */ + 0xa4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data1 */ + 0xa8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data2 */ + 0xac (PIN_OUTPUT | MUX_MODE0) /* lcd_data3 */ + 0xb0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data4 */ + 0xb4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data5 */ + 0xb8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data6 */ + 0xbc (PIN_OUTPUT | MUX_MODE0) /* lcd_data7 */ + 0xc0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data8 */ + 0xc4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data9 */ + 0xc8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data10 */ + 0xcc (PIN_OUTPUT | MUX_MODE0) /* lcd_data11 */ + 0xd0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data12 */ + 0xd4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data13 */ + 0xd8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data14 */ + 0xdc (PIN_OUTPUT | MUX_MODE0) /* lcd_data15 */ + 0xe0 (PIN_OUTPUT | MUX_MODE0) /* lcd_vsync */ + 0xe4 (PIN_OUTPUT | MUX_MODE0) /* lcd_hsync */ + 0xe8 (PIN_OUTPUT | MUX_MODE0) /* lcd_pclk */ + 0xec (PIN_OUTPUT | MUX_MODE0) /* lcd_ac_bias_en */ + >; + }; + nxp_hdmi_off_pins: pinmux_nxp_hdmi_off_pins { + pinctrl-single,pins = < + 0x1b0 (PIN_OUTPUT | MUX_MODE3) /* xdma_event_intr0.clkout1 */ + >; + }; + + leds_base_pins: pinmux_leds_base_pins { + pinctrl-single,pins = < + 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */ + 0x88 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_csn3.gpio2_0 */ + >; + }; +}; + +&lcdc { + status = "okay"; +}; + +&i2c0 { + eeprom: eeprom@50 { + compatible = "at,24c256"; + reg = <0x50>; + }; +}; Copied: stable/10/sys/gnu/dts/arm/am335x-bone-common.dtsi (from r279385, head/sys/gnu/dts/arm/am335x-bone-common.dtsi) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/gnu/dts/arm/am335x-bone-common.dtsi Sat Jun 6 18:03:36 2015 (r284090, copy of r279385, head/sys/gnu/dts/arm/am335x-bone-common.dtsi) @@ -0,0 +1,302 @@ +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/ { + cpus { + cpu@0 { + cpu0-supply = <&dcdc2_reg>; + }; + }; + + memory { + device_type = "memory"; + reg = <0x80000000 0x10000000>; /* 256 MB */ + }; + + leds { + pinctrl-names = "default"; + pinctrl-0 = <&user_leds_s0>; + + compatible = "gpio-leds"; + + led@2 { + label = "beaglebone:green:heartbeat"; + gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + default-state = "off"; + }; + + led@3 { + label = "beaglebone:green:mmc0"; + gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "mmc0"; + default-state = "off"; + }; + + led@4 { + label = "beaglebone:green:usr2"; + gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "cpu0"; + default-state = "off"; + }; + + led@5 { + label = "beaglebone:green:usr3"; + gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "mmc1"; + default-state = "off"; + }; + }; + + vmmcsd_fixed: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "vmmcsd_fixed"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; +}; + +&am33xx_pinmux { + pinctrl-names = "default"; + pinctrl-0 = <&clkout2_pin>; + + user_leds_s0: user_leds_s0 { + pinctrl-single,pins = < + 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */ + 0x58 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a6.gpio1_22 */ + 0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a7.gpio1_23 */ + 0x60 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a8.gpio1_24 */ + >; + }; + + i2c0_pins: pinmux_i2c0_pins { + pinctrl-single,pins = < + 0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ + 0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ + >; + }; + + uart0_pins: pinmux_uart0_pins { + pinctrl-single,pins = < + 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ + 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ + >; + }; + + clkout2_pin: pinmux_clkout2_pin { + pinctrl-single,pins = < + 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */ + >; + }; + + cpsw_default: cpsw_default { + pinctrl-single,pins = < + /* Slave 1 */ + 0x110 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxerr.mii1_rxerr */ + 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txen.mii1_txen */ + 0x118 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxdv.mii1_rxdv */ + 0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd3.mii1_txd3 */ + 0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd2.mii1_txd2 */ + 0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd1.mii1_txd1 */ + 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd0.mii1_txd0 */ + 0x12c (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_txclk.mii1_txclk */ + 0x130 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxclk.mii1_rxclk */ + 0x134 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd3.mii1_rxd3 */ + 0x138 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd2.mii1_rxd2 */ + 0x13c (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd1.mii1_rxd1 */ + 0x140 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd0.mii1_rxd0 */ + >; + }; + + cpsw_sleep: cpsw_sleep { + pinctrl-single,pins = < + /* Slave 1 reset value */ + 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7) + >; + }; + + davinci_mdio_default: davinci_mdio_default { + pinctrl-single,pins = < + /* MDIO */ + 0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ + 0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ + >; + }; + + davinci_mdio_sleep: davinci_mdio_sleep { + pinctrl-single,pins = < + /* MDIO reset value */ + 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7) + >; + }; + + mmc1_pins: pinmux_mmc1_pins { + pinctrl-single,pins = < + 0x160 (PIN_INPUT | MUX_MODE7) /* GPIO0_6 */ + >; + }; + + emmc_pins: pinmux_emmc_pins { + pinctrl-single,pins = < + 0x80 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */ + 0x84 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */ + 0x00 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */ + 0x04 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */ + 0x08 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */ + 0x0c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */ + 0x10 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */ + 0x14 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */ + 0x18 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */ + 0x1c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */ + >; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins>; + + status = "okay"; +}; + +&usb { + status = "okay"; +}; + +&usb_ctrl_mod { + status = "okay"; +}; + +&usb0_phy { + status = "okay"; +}; + +&usb1_phy { + status = "okay"; +}; + +&usb0 { + status = "okay"; +}; + +&usb1 { + status = "okay"; + dr_mode = "host"; +}; + +&cppi41dma { + status = "okay"; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + + status = "okay"; + clock-frequency = <400000>; + + tps: tps@24 { + reg = <0x24>; + }; + +}; + +/include/ "tps65217.dtsi" + +&tps { + regulators { + dcdc1_reg: regulator@0 { + regulator-name = "vdds_dpr"; + regulator-always-on; + }; + + dcdc2_reg: regulator@1 { + /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */ + regulator-name = "vdd_mpu"; + regulator-min-microvolt = <925000>; + regulator-max-microvolt = <1325000>; + regulator-boot-on; + regulator-always-on; + }; + + dcdc3_reg: regulator@2 { + /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */ + regulator-name = "vdd_core"; + regulator-min-microvolt = <925000>; + regulator-max-microvolt = <1150000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo1_reg: regulator@3 { + regulator-name = "vio,vrtc,vdds"; + regulator-always-on; + }; + + ldo2_reg: regulator@4 { + regulator-name = "vdd_3v3aux"; + regulator-always-on; + }; + + ldo3_reg: regulator@5 { + regulator-name = "vdd_1v8"; + regulator-always-on; + }; + + ldo4_reg: regulator@6 { + regulator-name = "vdd_3v3a"; + regulator-always-on; + }; + }; +}; + +&cpsw_emac0 { + phy_id = <&davinci_mdio>, <0>; + phy-mode = "mii"; +}; + +&cpsw_emac1 { + phy_id = <&davinci_mdio>, <1>; + phy-mode = "mii"; +}; + +&mac { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&cpsw_default>; + pinctrl-1 = <&cpsw_sleep>; + status = "okay"; +}; + +&davinci_mdio { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&davinci_mdio_default>; + pinctrl-1 = <&davinci_mdio_sleep>; + status = "okay"; +}; + +&mmc1 { + status = "okay"; + bus-width = <0x4>; + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins>; + cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; + cd-inverted; +}; Copied: stable/10/sys/gnu/dts/arm/am335x-bone.dts (from r279385, head/sys/gnu/dts/arm/am335x-bone.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/gnu/dts/arm/am335x-bone.dts Sat Jun 6 18:03:36 2015 (r284090, copy of r279385, head/sys/gnu/dts/arm/am335x-bone.dts) @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +/dts-v1/; + +#include "am33xx.dtsi" +#include "am335x-bone-common.dtsi" + +/ { + model = "TI AM335x BeagleBone"; + compatible = "ti,am335x-bone", "ti,am33xx"; +}; + +&ldo3_reg { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; +}; + +&mmc1 { + vmmc-supply = <&ldo3_reg>; +}; + +&sham { + status = "okay"; +}; + +&aes { + status = "okay"; +}; Copied: stable/10/sys/gnu/dts/arm/am335x-boneblack.dts (from r279385, head/sys/gnu/dts/arm/am335x-boneblack.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/gnu/dts/arm/am335x-boneblack.dts Sat Jun 6 18:03:36 2015 (r284090, copy of r279385, head/sys/gnu/dts/arm/am335x-boneblack.dts) @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +/dts-v1/; + +#include "am33xx.dtsi" +#include "am335x-bone-common.dtsi" + +/ { + model = "TI AM335x BeagleBone Black"; + compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; +}; + +&ldo3_reg { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; +}; + +&mmc1 { + vmmc-supply = <&vmmcsd_fixed>; +}; + +&mmc2 { + vmmc-supply = <&vmmcsd_fixed>; + pinctrl-names = "default"; + pinctrl-0 = <&emmc_pins>; + bus-width = <8>; + status = "okay"; +}; + +&am33xx_pinmux { + nxp_hdmi_bonelt_pins: nxp_hdmi_bonelt_pins { + pinctrl-single,pins = < + 0x1b0 0x03 /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */ + 0xa0 0x08 /* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xa4 0x08 /* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xa8 0x08 /* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xac 0x08 /* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xb0 0x08 /* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xb4 0x08 /* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xb8 0x08 /* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xbc 0x08 /* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xc0 0x08 /* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xc4 0x08 /* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xc8 0x08 /* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xcc 0x08 /* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xd0 0x08 /* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xd4 0x08 /* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xd8 0x08 /* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xdc 0x08 /* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ + 0xe0 0x00 /* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ + 0xe4 0x00 /* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ + 0xe8 0x00 /* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ + 0xec 0x00 /* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ + >; + }; + nxp_hdmi_bonelt_off_pins: nxp_hdmi_bonelt_off_pins { + pinctrl-single,pins = < + 0x1b0 0x03 /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */ + >; + }; +}; + +&lcdc { + status = "okay"; +}; + +/ { + hdmi { + compatible = "ti,tilcdc,slave"; + i2c = <&i2c0>; + pinctrl-names = "default", "off"; + pinctrl-0 = <&nxp_hdmi_bonelt_pins>; + pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>; + status = "okay"; + }; +}; + +&rtc { + system-power-controller; +}; Copied: stable/10/sys/gnu/dts/arm/am335x-evm.dts (from r279385, head/sys/gnu/dts/arm/am335x-evm.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/gnu/dts/arm/am335x-evm.dts Sat Jun 6 18:03:36 2015 (r284090, copy of r279385, head/sys/gnu/dts/arm/am335x-evm.dts) @@ -0,0 +1,680 @@ +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +/dts-v1/; + +#include "am33xx.dtsi" + +/ { + model = "TI AM335x EVM"; + compatible = "ti,am335x-evm", "ti,am33xx"; + + cpus { + cpu@0 { + cpu0-supply = <&vdd1_reg>; + }; + }; + + memory { + device_type = "memory"; + reg = <0x80000000 0x10000000>; /* 256 MB */ + }; + + vbat: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "vbat"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-boot-on; + }; + + lis3_reg: fixedregulator@1 { + compatible = "regulator-fixed"; + regulator-name = "lis3_reg"; + regulator-boot-on; + }; + + matrix_keypad: matrix_keypad@0 { + compatible = "gpio-matrix-keypad"; + debounce-delay-ms = <5>; + col-scan-delay-us = <2>; + + row-gpios = <&gpio1 25 GPIO_ACTIVE_HIGH /* Bank1, pin25 */ + &gpio1 26 GPIO_ACTIVE_HIGH /* Bank1, pin26 */ + &gpio1 27 GPIO_ACTIVE_HIGH>; /* Bank1, pin27 */ + + col-gpios = <&gpio1 21 GPIO_ACTIVE_HIGH /* Bank1, pin21 */ + &gpio1 22 GPIO_ACTIVE_HIGH>; /* Bank1, pin22 */ + + linux,keymap = <0x0000008b /* MENU */ + 0x0100009e /* BACK */ + 0x02000069 /* LEFT */ + 0x0001006a /* RIGHT */ + 0x0101001c /* ENTER */ + 0x0201006c>; /* DOWN */ + }; + + gpio_keys: volume_keys@0 { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + autorepeat; + + switch@9 { + label = "volume-up"; + linux,code = <115>; + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + gpio-key,wakeup; + }; + + switch@10 { + label = "volume-down"; + linux,code = <114>; + gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; + gpio-key,wakeup; + }; + }; + + backlight { + compatible = "pwm-backlight"; + pwms = <&ecap0 0 50000 0>; + brightness-levels = <0 51 53 56 62 75 101 152 255>; + default-brightness-level = <8>; + }; + + panel { + compatible = "ti,tilcdc,panel"; + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&lcd_pins_s0>; + panel-info { + ac-bias = <255>; + ac-bias-intrpt = <0>; + dma-burst-sz = <16>; + bpp = <32>; + fdd = <0x80>; + sync-edge = <0>; + sync-ctrl = <1>; + raster-order = <0>; + fifo-th = <0>; + }; + + display-timings { + 800x480p62 { + clock-frequency = <30000000>; + hactive = <800>; + vactive = <480>; + hfront-porch = <39>; + hback-porch = <39>; + hsync-len = <47>; + vback-porch = <29>; + vfront-porch = <13>; + vsync-len = <2>; + hsync-active = <1>; + vsync-active = <1>; + }; + }; + }; + + sound { + compatible = "ti,da830-evm-audio"; + ti,model = "AM335x-EVM"; + ti,audio-codec = <&tlv320aic3106>; + ti,mcasp-controller = <&mcasp1>; + ti,codec-clock-rate = <12000000>; + ti,audio-routing = + "Headphone Jack", "HPLOUT", + "Headphone Jack", "HPROUT", + "LINE1L", "Line In", + "LINE1R", "Line In"; + }; +}; + +&am33xx_pinmux { + pinctrl-names = "default"; + pinctrl-0 = <&matrix_keypad_s0 &volume_keys_s0 &clkout2_pin>; + + matrix_keypad_s0: matrix_keypad_s0 { + pinctrl-single,pins = < + 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */ + 0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a6.gpio1_22 */ + 0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_a9.gpio1_25 */ + 0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_a10.gpio1_26 */ + 0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_a11.gpio1_27 */ + >; + }; + + volume_keys_s0: volume_keys_s0 { + pinctrl-single,pins = < + 0x150 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* spi0_sclk.gpio0_2 */ + 0x154 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* spi0_d0.gpio0_3 */ + >; + }; + + i2c0_pins: pinmux_i2c0_pins { + pinctrl-single,pins = < + 0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ + 0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ + >; + }; + + i2c1_pins: pinmux_i2c1_pins { + pinctrl-single,pins = < + 0x158 (PIN_INPUT_PULLUP | MUX_MODE2) /* spi0_d1.i2c1_sda */ + 0x15c (PIN_INPUT_PULLUP | MUX_MODE2) /* spi0_cs0.i2c1_scl */ + >; + }; + + uart0_pins: pinmux_uart0_pins { + pinctrl-single,pins = < + 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ + 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ + >; + }; + + clkout2_pin: pinmux_clkout2_pin { + pinctrl-single,pins = < + 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */ + >; + }; + + nandflash_pins_s0: nandflash_pins_s0 { + pinctrl-single,pins = < + 0x0 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad0.gpmc_ad0 */ + 0x4 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad1.gpmc_ad1 */ + 0x8 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad2.gpmc_ad2 */ + 0xc (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad3.gpmc_ad3 */ + 0x10 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad4.gpmc_ad4 */ + 0x14 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad5.gpmc_ad5 */ + 0x18 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad6.gpmc_ad6 */ + 0x1c (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad7.gpmc_ad7 */ + 0x70 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wait0.gpmc_wait0 */ + 0x74 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_wpn.gpio0_30 */ + 0x7c (PIN_OUTPUT | MUX_MODE0) /* gpmc_csn0.gpmc_csn0 */ + 0x90 (PIN_OUTPUT | MUX_MODE0) /* gpmc_advn_ale.gpmc_advn_ale */ + 0x94 (PIN_OUTPUT | MUX_MODE0) /* gpmc_oen_ren.gpmc_oen_ren */ + 0x98 (PIN_OUTPUT | MUX_MODE0) /* gpmc_wen.gpmc_wen */ + 0x9c (PIN_OUTPUT | MUX_MODE0) /* gpmc_be0n_cle.gpmc_be0n_cle */ + >; + }; + + ecap0_pins: backlight_pins { + pinctrl-single,pins = < + 0x164 0x0 /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */ + >; + }; + + cpsw_default: cpsw_default { + pinctrl-single,pins = < + /* Slave 1 */ + 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_tctl */ + 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxdv.rgmii1_rctl */ + 0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd3.rgmii1_td3 */ + 0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd2.rgmii1_td2 */ + 0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td1 */ + 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td0 */ + 0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rgmii1_tclk */ + 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxclk.rgmii1_rclk */ + 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd3.rgmii1_rd3 */ + 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd2.rgmii1_rd2 */ + 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd1.rgmii1_rd1 */ + 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd0.rgmii1_rd0 */ + >; + }; + + cpsw_sleep: cpsw_sleep { + pinctrl-single,pins = < + /* Slave 1 reset value */ + 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7) + >; + }; + + davinci_mdio_default: davinci_mdio_default { + pinctrl-single,pins = < + /* MDIO */ + 0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ + 0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ + >; + }; + + davinci_mdio_sleep: davinci_mdio_sleep { + pinctrl-single,pins = < + /* MDIO reset value */ + 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7) + 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7) + >; + }; + + mmc1_pins: pinmux_mmc1_pins { + pinctrl-single,pins = < + 0x160 (PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */ + >; + }; + + lcd_pins_s0: lcd_pins_s0 { + pinctrl-single,pins = < + 0x20 (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad8.lcd_data23 */ + 0x24 (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad9.lcd_data22 */ + 0x28 (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad10.lcd_data21 */ + 0x2c (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad11.lcd_data20 */ + 0x30 (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad12.lcd_data19 */ + 0x34 (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad13.lcd_data18 */ + 0x38 (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad14.lcd_data17 */ + 0x3c (PIN_OUTPUT | MUX_MODE1) /* gpmc_ad15.lcd_data16 */ + 0xa0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data0.lcd_data0 */ + 0xa4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data1.lcd_data1 */ + 0xa8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data2.lcd_data2 */ + 0xac (PIN_OUTPUT | MUX_MODE0) /* lcd_data3.lcd_data3 */ + 0xb0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data4.lcd_data4 */ + 0xb4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data5.lcd_data5 */ + 0xb8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data6.lcd_data6 */ + 0xbc (PIN_OUTPUT | MUX_MODE0) /* lcd_data7.lcd_data7 */ + 0xc0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data8.lcd_data8 */ + 0xc4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data9.lcd_data9 */ + 0xc8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data10.lcd_data10 */ + 0xcc (PIN_OUTPUT | MUX_MODE0) /* lcd_data11.lcd_data11 */ + 0xd0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data12.lcd_data12 */ + 0xd4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data13.lcd_data13 */ + 0xd8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data14.lcd_data14 */ + 0xdc (PIN_OUTPUT | MUX_MODE0) /* lcd_data15.lcd_data15 */ + 0xe0 (PIN_OUTPUT | MUX_MODE0) /* lcd_vsync.lcd_vsync */ + 0xe4 (PIN_OUTPUT | MUX_MODE0) /* lcd_hsync.lcd_hsync */ + 0xe8 (PIN_OUTPUT | MUX_MODE0) /* lcd_pclk.lcd_pclk */ + 0xec (PIN_OUTPUT | MUX_MODE0) /* lcd_ac_bias_en.lcd_ac_bias_en */ + >; + }; + + am335x_evm_audio_pins: am335x_evm_audio_pins { + pinctrl-single,pins = < + 0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_crs.mcasp1_aclkx */ + 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rxerr.mcasp1_fsx */ + 0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */ + 0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */ + >; + }; + + dcan1_pins_default: dcan1_pins_default { + pinctrl-single,pins = < + 0x168 (PIN_OUTPUT | MUX_MODE2) /* uart0_ctsn.d_can1_tx */ + 0x16c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* uart0_rtsn.d_can1_rx */ + >; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins>; + + status = "okay"; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + + status = "okay"; + clock-frequency = <400000>; + + tps: tps@2d { + reg = <0x2d>; + }; +}; + +&usb { + status = "okay"; +}; + +&usb_ctrl_mod { + status = "okay"; +}; + +&usb0_phy { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 18:21:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D6BAFA6; Sat, 6 Jun 2015 18:21:17 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B07D1F66; Sat, 6 Jun 2015 18:21:17 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56ILHV3090417; Sat, 6 Jun 2015 18:21:17 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56ILH3L090416; Sat, 6 Jun 2015 18:21:17 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201506061821.t56ILH3L090416@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Jun 2015 18:21: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: r284091 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 18:21:17 -0000 Author: ian Date: Sat Jun 6 18:21:16 2015 New Revision: 284091 URL: https://svnweb.freebsd.org/changeset/base/284091 Log: MFC r278458, r278519: Pass MODULES_EXTRA to the modules build. While I'm here, also always pass WITHOUT_MODULES down. There's no need to make this conditional. Properly quote EXTRA_MODULES and WITHOUT_MODULES to ensure that they are passed down properly when there's more than one. Modified: stable/10/sys/conf/kern.pre.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/kern.pre.mk ============================================================================== --- stable/10/sys/conf/kern.pre.mk Sat Jun 6 18:03:36 2015 (r284090) +++ stable/10/sys/conf/kern.pre.mk Sat Jun 6 18:21:16 2015 (r284091) @@ -182,15 +182,13 @@ SYSTEM_DEP+= ${LDSCRIPT} MKMODULESENV+= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR} MKMODULESENV+= MACHINE_CPUARCH=${MACHINE_CPUARCH} +MKMODULESENV+= MODULES_EXTRA="${MODULES_EXTRA}" WITHOUT_MODULES="${WITHOUT_MODULES}" .if (${KERN_IDENT} == LINT) MKMODULESENV+= ALL_MODULES=LINT .endif .if defined(MODULES_OVERRIDE) MKMODULESENV+= MODULES_OVERRIDE="${MODULES_OVERRIDE}" .endif -.if defined(WITHOUT_MODULES) -MKMODULESENV+= WITHOUT_MODULES="${WITHOUT_MODULES}" -.endif .if defined(DEBUG) MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" .endif From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 18:31:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3493E424; Sat, 6 Jun 2015 18:31:29 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 088531293; Sat, 6 Jun 2015 18:31:29 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56IVS11097867; Sat, 6 Jun 2015 18:31:28 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56IVSRQ097866; Sat, 6 Jun 2015 18:31:28 GMT (envelope-from np@FreeBSD.org) Message-Id: <201506061831.t56IVSRQ097866@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 6 Jun 2015 18:31:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284092 - stable/10/sys/dev/cxgbe/tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 18:31:29 -0000 Author: np Date: Sat Jun 6 18:31:28 2015 New Revision: 284092 URL: https://svnweb.freebsd.org/changeset/base/284092 Log: MFC r280878: cxgbe/tom: return rx credits promptly if the socket buffer's low water mark cannot be reached because the window advertised to the peer isn't wide enough. While here, tweak the normal credit return too. Modified: stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Sat Jun 6 18:21:16 2015 (r284091) +++ stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Sat Jun 6 18:31:28 2015 (r284092) @@ -390,19 +390,17 @@ t4_rcvd(struct toedev *tod, struct tcpcb toep->rx_credits += toep->sb_cc - sb->sb_cc; toep->sb_cc = sb->sb_cc; } - credits = toep->rx_credits; - SOCKBUF_UNLOCK(sb); - - if (credits > 0 && - (credits + 16384 >= tp->rcv_wnd || credits >= 15 * 1024)) { + if (toep->rx_credits > 0 && + (tp->rcv_wnd <= 32 * 1024 || toep->rx_credits >= 64 * 1024 || + (toep->rx_credits >= 16 * 1024 && tp->rcv_wnd <= 128 * 1024) || + toep->sb_cc + tp->rcv_wnd < sb->sb_lowat)) { - credits = send_rx_credits(sc, toep, credits); - SOCKBUF_LOCK(sb); + credits = send_rx_credits(sc, toep, toep->rx_credits); toep->rx_credits -= credits; - SOCKBUF_UNLOCK(sb); tp->rcv_wnd += credits; tp->rcv_adv += credits; } + SOCKBUF_UNLOCK(sb); } /* @@ -1618,6 +1616,14 @@ do_rx_data(struct sge_iq *iq, const stru toep->rx_credits += toep->sb_cc - sb->sb_cc; sbappendstream_locked(sb, m); toep->sb_cc = sb->sb_cc; + if (toep->rx_credits > 0 && toep->sb_cc + tp->rcv_wnd < sb->sb_lowat) { + int credits; + + credits = send_rx_credits(sc, toep, toep->rx_credits); + toep->rx_credits -= credits; + tp->rcv_wnd += credits; + tp->rcv_adv += credits; + } sorwakeup_locked(so); SOCKBUF_UNLOCK_ASSERT(sb); From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 18:46:38 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8465C9AC; Sat, 6 Jun 2015 18:46:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71E3F164F; Sat, 6 Jun 2015 18:46:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56Ikcpb003629; Sat, 6 Jun 2015 18:46:38 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56Ikcd7003626; Sat, 6 Jun 2015 18:46:38 GMT (envelope-from np@FreeBSD.org) Message-Id: <201506061846.t56Ikcd7003626@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 6 Jun 2015 18:46:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284093 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 18:46:38 -0000 Author: np Date: Sat Jun 6 18:46:37 2015 New Revision: 284093 URL: https://svnweb.freebsd.org/changeset/base/284093 Log: MFC r283858 and r284007. r283858: cxgbe: set minimum burst size when fetching freelist buffers to 128B. r284007: cxgbe: set the minimum burst size when fetching fl buffers to 128B for netmap rx queues too. This should have gone in as part of r283858. Modified: stable/10/sys/dev/cxgbe/t4_netmap.c stable/10/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_netmap.c Sat Jun 6 18:31:28 2015 (r284092) +++ stable/10/sys/dev/cxgbe/t4_netmap.c Sat Jun 6 18:46:37 2015 (r284093) @@ -297,7 +297,7 @@ alloc_nm_rxq_hwq(struct port_info *pi, s (fl_pad ? F_FW_IQ_CMD_FL0PADEN : 0) | (black_hole == 2 ? F_FW_IQ_CMD_FL0PACKEN : 0)); c.fl0dcaen_to_fl0cidxfthresh = - htobe16(V_FW_IQ_CMD_FL0FBMIN(X_FETCHBURSTMIN_64B) | + htobe16(V_FW_IQ_CMD_FL0FBMIN(X_FETCHBURSTMIN_128B) | V_FW_IQ_CMD_FL0FBMAX(X_FETCHBURSTMAX_512B)); c.fl0size = htobe16(na->num_rx_desc / 8 + spg_len / EQ_ESIZE); c.fl0addr = htobe64(nm_rxq->fl_ba); Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Sat Jun 6 18:31:28 2015 (r284092) +++ stable/10/sys/dev/cxgbe/t4_sge.c Sat Jun 6 18:46:37 2015 (r284093) @@ -2660,7 +2660,7 @@ alloc_iq_fl(struct port_info *pi, struct F_FW_IQ_CMD_FL0CONGEN); } c.fl0dcaen_to_fl0cidxfthresh = - htobe16(V_FW_IQ_CMD_FL0FBMIN(X_FETCHBURSTMIN_64B) | + htobe16(V_FW_IQ_CMD_FL0FBMIN(X_FETCHBURSTMIN_128B) | V_FW_IQ_CMD_FL0FBMAX(X_FETCHBURSTMAX_512B)); c.fl0size = htobe16(fl->qsize); c.fl0addr = htobe64(fl->ba); From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 18:49:04 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79AF2B1A; Sat, 6 Jun 2015 18:49:04 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BF98165E; Sat, 6 Jun 2015 18:49:04 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56In4po003986; Sat, 6 Jun 2015 18:49:04 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56In3of003978; Sat, 6 Jun 2015 18:49:03 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201506061849.t56In3of003978@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Jun 2015 18:49:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284094 - in stable/10/sys: arm/conf modules modules/dtb/imx6 modules/dtb/rpi 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 18:49:04 -0000 Author: ian Date: Sat Jun 6 18:49:02 2015 New Revision: 284094 URL: https://svnweb.freebsd.org/changeset/base/284094 Log: MFC r278338, r278340, r278458, r278519: Create a module to install the Raspberry Pi dtb files. Pull in the rpi.dts -> rpi.dtb module (dtb/rpi) and have it install rpi.dtb in /boot/dtb by default. Add a module to build the dtb files for all supported imx6 systems. Remove imx6s-wandboard.dts, there is no such file. Added: stable/10/sys/modules/dtb/imx6/ - copied from r279551, head/sys/modules/dtb/imx6/ stable/10/sys/modules/dtb/rpi/ - copied from r278338, head/sys/modules/dtb/rpi/ Modified: stable/10/sys/arm/conf/IMX6 stable/10/sys/arm/conf/RPI-B stable/10/sys/modules/Makefile stable/10/sys/modules/dtb/imx6/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/IMX6 ============================================================================== --- stable/10/sys/arm/conf/IMX6 Sat Jun 6 18:46:37 2015 (r284093) +++ stable/10/sys/arm/conf/IMX6 Sat Jun 6 18:49:02 2015 (r284094) @@ -153,6 +153,7 @@ device u3g # USB modems # Flattened Device Tree options FDT # Configure using FDT/DTB data +makeoptions MODULES_EXTRA=dtb/imx6 # SoC-specific devices device ffec # Freescale Fast Ethernet Controller Modified: stable/10/sys/arm/conf/RPI-B ============================================================================== --- stable/10/sys/arm/conf/RPI-B Sat Jun 6 18:46:37 2015 (r284093) +++ stable/10/sys/arm/conf/RPI-B Sat Jun 6 18:49:02 2015 (r284094) @@ -138,4 +138,5 @@ options FDT # Configure using FDT/DTB # Note: DTB is normally loaded and modified by RPi boot loader, then # handed to kernel via U-Boot and ubldr. #options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=rpi.dts +#makeoptions FDT_DTS_FILE=rpi.dts +makeoptions MODULES_EXTRA=dtb/rpi Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Sat Jun 6 18:46:37 2015 (r284093) +++ stable/10/sys/modules/Makefile Sat Jun 6 18:49:02 2015 (r284094) @@ -894,6 +894,8 @@ _zfs= zfs SUBDIR=${MODULES_OVERRIDE} .endif +SUBDIR+=${MODULES_EXTRA} + .for reject in ${WITHOUT_MODULES} SUBDIR:= ${SUBDIR:N${reject}} .endfor Modified: stable/10/sys/modules/dtb/imx6/Makefile ============================================================================== --- head/sys/modules/dtb/imx6/Makefile Mon Mar 2 22:12:56 2015 (r279551) +++ stable/10/sys/modules/dtb/imx6/Makefile Sat Jun 6 18:49:02 2015 (r284094) @@ -5,8 +5,7 @@ DTS= \ imx6q-cubox-i.dts \ imx6dl-hummingboard.dts \ imx6q-hummingboard.dts \ - imx6q-wandboard.dts \ imx6dl-wandboard.dts \ - imx6s-wandboard.dts + imx6q-wandboard.dts .include From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 19:09:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F292E18; Sat, 6 Jun 2015 19:09:37 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x22c.google.com (mail-ig0-x22c.google.com [IPv6:2607:f8b0:4001:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 18B891AAA; Sat, 6 Jun 2015 19:09:37 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igbpi8 with SMTP id pi8so37175537igb.1; Sat, 06 Jun 2015 12:09:36 -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=CJfq6wAIB8ALDoxAZRQBLOudewHQFB/bw1/rgWLXIqk=; b=NQ4spwC4Jx+JCs1urc/ra0uPYFSCVS8zsh4CHiympBZWlVLBCm7xy+VLoefuatGBQM LKEaS4pKrLe34zKMH3tDiB6A2nb6ovP0cAUGXi8cjC8j5bymL2jAhURTjnwBQ933Uo09 oJBLhI9wCv7BXcFDwTbF6MvwzML8XjUzuw8/Z1lx3hVyWnCgT4Yn+DHcW1wyAhppI3LQ CeOQPE9si8//QKwL0zlQ+UzLbMQNxAUBFcYu7LDEpMUM1j7NDP96C+HVgDSm6JJpAAU1 1V7V2fR/LlyGHLktVw3N7L7U9dHubkrWXpDi0NYYq90dDU+i0lpdPaghg2FRz1bIPNIg WWBA== MIME-Version: 1.0 X-Received: by 10.50.114.9 with SMTP id jc9mr4766834igb.49.1433617776490; Sat, 06 Jun 2015 12:09:36 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.38.133 with HTTP; Sat, 6 Jun 2015 12:09:36 -0700 (PDT) In-Reply-To: <201506061320.t56DK2EU037038@svn.freebsd.org> References: <201506061320.t56DK2EU037038@svn.freebsd.org> Date: Sat, 6 Jun 2015 12:09:36 -0700 X-Google-Sender-Auth: GXo4OeYPH3nGrKshsBJ9A8kkLU0 Message-ID: Subject: Re: svn commit: r284071 - head/libexec/atrun From: Adrian Chadd To: Baptiste Daroussin Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 19:09:37 -0000 bad bapt, bad bapt. -------------------------------------------------------------- >>> stage 4.4: building everything -------------------------------------------------------------- ===> lib (all) ===> libexec (all) ===> libexec/atrun (all) => lib/csu (all) ===> lib/csu/mips (all) cc1: warnings being treated as errors /usr/home/adrian/work/freebsd/head-embedded-2/src/libexec/atrun/atrun.c: In function 'run_file': /usr/home/adrian/work/freebsd/head-embedded-2/src/libexec/atrun/atrun.c:241: warning: comparison between signed and unsigned /usr/home/adrian/work/freebsd/head-embedded-2/src/libexec/atrun/atrun.c:245: warning: comparison between signed and unsigned -adrian On 6 June 2015 at 06:20, Baptiste Daroussin wrote: > Author: bapt > Date: Sat Jun 6 13:20:02 2015 > New Revision: 284071 > URL: https://svnweb.freebsd.org/changeset/base/284071 > > Log: > Remove WARNS atrun builds fine with clang and gcc > > Modified: > head/libexec/atrun/Makefile > > Modified: head/libexec/atrun/Makefile > ============================================================================== > --- head/libexec/atrun/Makefile Sat Jun 6 13:13:39 2015 (r284070) > +++ head/libexec/atrun/Makefile Sat Jun 6 13:20:02 2015 (r284071) > @@ -14,7 +14,6 @@ CLEANFILES= ${MAN} > CFLAGS+=-I${MAINSRC} -I${.CURDIR} > CFLAGS+=-DLOGIN_CAP -DPAM > > -WARNS?= 2 > WFORMAT=0 > > LIBADD= pam util > From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 19:15:09 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5512B10B; Sat, 6 Jun 2015 19:15:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42CC31CDE; Sat, 6 Jun 2015 19:15:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56JF9E5018268; Sat, 6 Jun 2015 19:15:09 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56JF9Rq018267; Sat, 6 Jun 2015 19:15:09 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201506061915.t56JF9Rq018267@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 6 Jun 2015 19:15:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284095 - head/libexec/atrun 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 19:15:09 -0000 Author: adrian Date: Sat Jun 6 19:15:08 2015 New Revision: 284095 URL: https://svnweb.freebsd.org/changeset/base/284095 Log: Re-introduce this - it doesn't compile clean on a mips target (eg CARAMBOLA2.) Modified: head/libexec/atrun/Makefile Modified: head/libexec/atrun/Makefile ============================================================================== --- head/libexec/atrun/Makefile Sat Jun 6 18:49:02 2015 (r284094) +++ head/libexec/atrun/Makefile Sat Jun 6 19:15:08 2015 (r284095) @@ -14,6 +14,7 @@ CLEANFILES= ${MAN} CFLAGS+=-I${MAINSRC} -I${.CURDIR} CFLAGS+=-DLOGIN_CAP -DPAM +WARNS?= 2 WFORMAT=0 LIBADD= pam util From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 19:15:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 18DD7248; Sat, 6 Jun 2015 19:15:49 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 060D11CE2; Sat, 6 Jun 2015 19:15:49 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56JFmZ5018394; Sat, 6 Jun 2015 19:15:48 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56JFmDU018393; Sat, 6 Jun 2015 19:15:48 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201506061915.t56JFmDU018393@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Jun 2015 19:15: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: r284096 - in stable/10/sys: arm/conf modules/dtb/am335x 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 19:15:49 -0000 Author: ian Date: Sat Jun 6 19:15:48 2015 New Revision: 284096 URL: https://svnweb.freebsd.org/changeset/base/284096 Log: MFC r279824, r279827, r279825: Add a dtb module for AM335x systems (just Beaglebone right now). Remove the static DTB config and instead build modules/dtb/am335x. Also, remove WITHOUT_MODULES="ahc" which was added long ago to work around build problems that have long since been fixed correctly. Revert accidentally commited modules/Makefile file from r279824. Added: stable/10/sys/modules/dtb/am335x/ - copied from r279824, head/sys/modules/dtb/am335x/ Modified: stable/10/sys/arm/conf/BEAGLEBONE Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/BEAGLEBONE ============================================================================== --- stable/10/sys/arm/conf/BEAGLEBONE Sat Jun 6 19:15:08 2015 (r284095) +++ stable/10/sys/arm/conf/BEAGLEBONE Sat Jun 6 19:15:48 2015 (r284096) @@ -25,7 +25,7 @@ ident BEAGLEBONE include "../ti/am335x/std.am335x" -makeoptions WITHOUT_MODULES="ahc" +makeoptions MODULES_EXTRA="dtb/am335x" options HZ=100 options SCHED_4BSD # 4BSD scheduler @@ -158,5 +158,3 @@ device usfs # Flattened Device Tree options FDT # Configure using FDT/DTB data -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=beaglebone.dts From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 19:43:42 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64AE26E2; Sat, 6 Jun 2015 19:43:42 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3922C1396; Sat, 6 Jun 2015 19:43:42 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56JhgTb032978; Sat, 6 Jun 2015 19:43:42 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56Jhg7L032977; Sat, 6 Jun 2015 19:43:42 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506061943.t56Jhg7L032977@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 6 Jun 2015 19:43:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284097 - head/usr.bin/mkstr 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 19:43:42 -0000 Author: bapt Date: Sat Jun 6 19:43:41 2015 New Revision: 284097 URL: https://svnweb.freebsd.org/changeset/base/284097 Log: Readd the warning level gcc 4.2 still complains Modified: head/usr.bin/mkstr/Makefile Modified: head/usr.bin/mkstr/Makefile ============================================================================== --- head/usr.bin/mkstr/Makefile Sat Jun 6 19:15:48 2015 (r284096) +++ head/usr.bin/mkstr/Makefile Sat Jun 6 19:43:41 2015 (r284097) @@ -3,4 +3,6 @@ PROG= mkstr +WARNS?= 2 + .include From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 19:47:06 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF4DB8F4; Sat, 6 Jun 2015 19:47:06 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8543C13BE; Sat, 6 Jun 2015 19:47:06 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wibut5 with SMTP id ut5so49782683wib.1; Sat, 06 Jun 2015 12:47:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=znOlqRGrM/ZLPyD3Tbetb9R9KjYHfE0R/yvPIa62eZg=; b=KOTIj8XVE8teIPbw2HN0gLkhpDqDTpUgv1YtSeU9Xv0ckyOY/GUd3sRr2G/sTSMrbZ lL7GiPrsR7iRDCS9Rp0WsSBindFUQC0aqBvWalf+zNlklw2NubmaqN+XMpqZc4g4Hmd5 SnLhco2FmBWW+HOp6kJkIs9p5F0bk3LFdIobtuif+vs4VODsQwltbVXKzGOAiyH1+NHn Wzm/V1P+4M2/5dPcbwYzU6ceMod5YIySXft6sH/TFY/cZcQZlt8l/GK9KL349E4ksetw 8FT8BOTNNKKtRzwJqS352xWfFdOrXElpEofGMhqlfi6fBGLrjLhXAoNfn5lcTHbqGTFL e8cA== X-Received: by 10.194.235.100 with SMTP id ul4mr17112423wjc.33.1433620025124; Sat, 06 Jun 2015 12:47:05 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id u7sm3828714wif.3.2015.06.06.12.47.03 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Jun 2015 12:47:04 -0700 (PDT) Sender: Baptiste Daroussin Date: Sat, 6 Jun 2015 21:47:02 +0200 From: Baptiste Daroussin To: Adrian Chadd Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r284071 - head/libexec/atrun Message-ID: <20150606194700.GA61276@ivaldir.etoilebsd.net> References: <201506061320.t56DK2EU037038@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+QahgC5+KEYLbs62" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 19:47:07 -0000 --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jun 06, 2015 at 12:09:36PM -0700, Adrian Chadd wrote: > bad bapt, bad bapt. >=20 Yeah I forgot bloody gcc 4.2 does yell at things a more recent gcc does not= yell at... I fixed another one I have buildworld finishing on mips now Best regards, Bapt --+QahgC5+KEYLbs62 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlVzTjQACgkQ8kTtMUmk6Ey0DgCfdHLI2RJiiKOv3r7lqt5fa3uO kHsAoK7gMNdPZJZgprf+92yuoYNWUqxk =jhIe -----END PGP SIGNATURE----- --+QahgC5+KEYLbs62-- From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 19:50:47 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73F98BBD; Sat, 6 Jun 2015 19:50:47 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ie0-x22f.google.com (mail-ie0-x22f.google.com [IPv6:2607:f8b0:4001:c03::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C79E14EB; Sat, 6 Jun 2015 19:50:47 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by ieclw1 with SMTP id lw1so77165776iec.3; Sat, 06 Jun 2015 12:50:46 -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=OPKce2eKYyIwt2Are+gEvH67XDlIzzhwL9HUHqDiY5Q=; b=iRRBh1BVBSWENWfJNAttpxcuKHMnmy+RFYCio3Jg3/6PZ5jOUteMxhchjQzj4YES74 eIbuzj8jvTBE8/hZLrSmU1Syp70wMKJVB2oULrSlBxA46kB3kecr6bEgkSBZkGuxa95S JxmHFvLp1B1lo3NlfYkbcVqT+x2k61QZ/ieWpL1/oa6zGaMDpgrGigT+ViLc+38h552E 75GIdIdg0WbqmXDLweZ6JdIpKsKiQEmSrVt7tu5R+BNexwGwndKdOey662VIRny4biyF vye3QyIfmMMsvDOALsHpFVKL3SWZNbWJ3SXMPV87jKJxjV6GbhFpsapYdiDZq75HbkEG I28A== MIME-Version: 1.0 X-Received: by 10.50.97.105 with SMTP id dz9mr4897931igb.49.1433620246511; Sat, 06 Jun 2015 12:50:46 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.38.133 with HTTP; Sat, 6 Jun 2015 12:50:46 -0700 (PDT) In-Reply-To: <20150606194700.GA61276@ivaldir.etoilebsd.net> References: <201506061320.t56DK2EU037038@svn.freebsd.org> <20150606194700.GA61276@ivaldir.etoilebsd.net> Date: Sat, 6 Jun 2015 12:50:46 -0700 X-Google-Sender-Auth: _wkhWmrS8p2tLnpfeGA3MHPl3HI Message-ID: Subject: Re: svn commit: r284071 - head/libexec/atrun From: Adrian Chadd To: Baptiste Daroussin Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 19:50:47 -0000 Sweet, thanks! -a On 6 June 2015 at 12:47, Baptiste Daroussin wrote: > On Sat, Jun 06, 2015 at 12:09:36PM -0700, Adrian Chadd wrote: >> bad bapt, bad bapt. >> > Yeah I forgot bloody gcc 4.2 does yell at things a more recent gcc does not yell > at... > > I fixed another one I have buildworld finishing on mips now > > Best regards, > Bapt From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 20:01:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46F8EEAD; Sat, 6 Jun 2015 20:01:07 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34E4F16DB; Sat, 6 Jun 2015 20:01:07 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56K17dU040195; Sat, 6 Jun 2015 20:01:07 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56K17Dk040194; Sat, 6 Jun 2015 20:01:07 GMT (envelope-from np@FreeBSD.org) Message-Id: <201506062001.t56K17Dk040194@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 6 Jun 2015 20:01:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284098 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 20:01:07 -0000 Author: np Date: Sat Jun 6 20:01:06 2015 New Revision: 284098 URL: https://svnweb.freebsd.org/changeset/base/284098 Log: MFC r259150 (by adrian@) and r283864. r259150: Print out the full PCIe link negotiation during dmesg. I found this useful when checking whether a NIC is in a PCIE 3.0 8x slot or not. r283864: cxgbe: no need to display the per-lane GT/s rating of the pcie link. Modified: stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Sat Jun 6 19:43:41 2015 (r284097) +++ stable/10/sys/dev/cxgbe/t4_main.c Sat Jun 6 20:01:06 2015 (r284098) @@ -906,9 +906,9 @@ t4_attach(device_t dev) } device_printf(dev, - "PCIe x%d, %d ports, %d %s interrupt%s, %d eq, %d iq\n", - sc->params.pci.width, sc->params.nports, sc->intr_count, - sc->intr_type == INTR_MSIX ? "MSI-X" : + "PCIe gen%d x%d, %d ports, %d %s interrupt%s, %d eq, %d iq\n", + sc->params.pci.speed, sc->params.pci.width, sc->params.nports, + sc->intr_count, sc->intr_type == INTR_MSIX ? "MSI-X" : (sc->intr_type == INTR_MSI ? "MSI" : "INTx"), sc->intr_count > 1 ? "s" : "", sc->sge.neq, sc->sge.niq); From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 20:14:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BA18378; Sat, 6 Jun 2015 20:14:59 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2940A1A31; Sat, 6 Jun 2015 20:14:59 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56KExcH047997; Sat, 6 Jun 2015 20:14:59 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56KExfb047996; Sat, 6 Jun 2015 20:14:59 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201506062014.t56KExfb047996@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Jun 2015 20:14: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: r284099 - stable/10/sys/netinet 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 20:14:59 -0000 Author: ian Date: Sat Jun 6 20:14:58 2015 New Revision: 284099 URL: https://svnweb.freebsd.org/changeset/base/284099 Log: MFC r279236: Change struct attribute to avoid aligned operations mismatch Previous __alignment(4) allowed compiler to assume that operations are performed on aligned region. On ARM processor, this led to alignment fault Modified: stable/10/sys/netinet/ip.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/ip.h ============================================================================== --- stable/10/sys/netinet/ip.h Sat Jun 6 20:01:06 2015 (r284098) +++ stable/10/sys/netinet/ip.h Sat Jun 6 20:14:58 2015 (r284099) @@ -67,7 +67,7 @@ struct ip { u_char ip_p; /* protocol */ u_short ip_sum; /* checksum */ struct in_addr ip_src,ip_dst; /* source and dest address */ -} __packed __aligned(4); +} __packed __aligned(2); #define IP_MAXPACKET 65535 /* maximum packet size */ From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 20:37:43 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 530928C6; Sat, 6 Jun 2015 20:37:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FE2A1F2F; Sat, 6 Jun 2015 20:37:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56KbhQ3058569; Sat, 6 Jun 2015 20:37:43 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56KbfsP058560; Sat, 6 Jun 2015 20:37:41 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506062037.t56KbfsP058560@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 6 Jun 2015 20:37:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284100 - in stable: 10/sys/vm 9/sys/vm 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 20:37:43 -0000 Author: jhb Date: Sat Jun 6 20:37:40 2015 New Revision: 284100 URL: https://svnweb.freebsd.org/changeset/base/284100 Log: MFC 261811,282660,282706: Place VM objects on the object list when created and never remove them. 261811: Fix function name in KASSERT(). 282660: Place VM objects on the object list when created and never remove them. This is ok since objects come from a NOFREE zone and allows objects to be locked while traversing the object list without triggering a LOR. Ensure that objects on the list are marked DEAD while free or stillborn, and that they have a refcount of zero. This required updating most of the pagers to explicitly mark an object as dead when deallocating it. (Only the vnode pager did this previously.) 282706: Satisfy vm_object uma zone destructor requirements after r282660 when vnode object creation raced. Modified: stable/10/sys/vm/default_pager.c stable/10/sys/vm/device_pager.c stable/10/sys/vm/phys_pager.c stable/10/sys/vm/sg_pager.c stable/10/sys/vm/swap_pager.c stable/10/sys/vm/vm_meter.c stable/10/sys/vm/vm_object.c stable/10/sys/vm/vnode_pager.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/vm/default_pager.c stable/9/sys/vm/device_pager.c stable/9/sys/vm/phys_pager.c stable/9/sys/vm/sg_pager.c stable/9/sys/vm/swap_pager.c stable/9/sys/vm/vm_meter.c stable/9/sys/vm/vm_object.c stable/9/sys/vm/vnode_pager.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/vm/default_pager.c ============================================================================== --- stable/10/sys/vm/default_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/10/sys/vm/default_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -113,6 +113,7 @@ default_pager_dealloc(object) /* * OBJT_DEFAULT objects have no special resources allocated to them. */ + object->type = OBJT_DEAD; } /* Modified: stable/10/sys/vm/device_pager.c ============================================================================== --- stable/10/sys/vm/device_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/10/sys/vm/device_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -252,6 +252,8 @@ dev_pager_dealloc(object) != NULL) dev_pager_free_page(object, m); } + object->handle = NULL; + object->type = OBJT_DEAD; } static int Modified: stable/10/sys/vm/phys_pager.c ============================================================================== --- stable/10/sys/vm/phys_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/10/sys/vm/phys_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -131,6 +131,8 @@ phys_pager_dealloc(vm_object_t object) mtx_unlock(&phys_pager_mtx); VM_OBJECT_WLOCK(object); } + object->handle = NULL; + object->type = OBJT_DEAD; } /* Modified: stable/10/sys/vm/sg_pager.c ============================================================================== --- stable/10/sys/vm/sg_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/10/sys/vm/sg_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -130,6 +130,8 @@ sg_pager_dealloc(vm_object_t object) sg = object->handle; sglist_free(sg); + object->handle = NULL; + object->type = OBJT_DEAD; } static int Modified: stable/10/sys/vm/swap_pager.c ============================================================================== --- stable/10/sys/vm/swap_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/10/sys/vm/swap_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -693,6 +693,8 @@ swap_pager_dealloc(vm_object_t object) * if paging is still in progress on some objects. */ swp_pager_meta_free_all(object); + object->handle = NULL; + object->type = OBJT_DEAD; } /************************************************************************ Modified: stable/10/sys/vm/vm_meter.c ============================================================================== --- stable/10/sys/vm/vm_meter.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/10/sys/vm/vm_meter.c Sat Jun 6 20:37:40 2015 (r284100) @@ -111,14 +111,7 @@ vmtotal(SYSCTL_HANDLER_ARGS) */ mtx_lock(&vm_object_list_mtx); TAILQ_FOREACH(object, &vm_object_list, object_list) { - if (!VM_OBJECT_TRYWLOCK(object)) { - /* - * Avoid a lock-order reversal. Consequently, - * the reported number of active pages may be - * greater than the actual number. - */ - continue; - } + VM_OBJECT_WLOCK(object); vm_object_clear_flag(object, OBJ_ACTIVE); VM_OBJECT_WUNLOCK(object); } @@ -196,10 +189,9 @@ vmtotal(SYSCTL_HANDLER_ARGS) mtx_lock(&vm_object_list_mtx); TAILQ_FOREACH(object, &vm_object_list, object_list) { /* - * Perform unsynchronized reads on the object to avoid - * a lock-order reversal. In this case, the lack of - * synchronization should not impair the accuracy of - * the reported statistics. + * Perform unsynchronized reads on the object. In + * this case, the lack of synchronization should not + * impair the accuracy of the reported statistics. */ if ((object->flags & OBJ_FICTITIOUS) != 0) { /* Modified: stable/10/sys/vm/vm_object.c ============================================================================== --- stable/10/sys/vm/vm_object.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/10/sys/vm/vm_object.c Sat Jun 6 20:37:40 2015 (r284100) @@ -166,6 +166,8 @@ vm_object_zdtor(void *mem, int size, voi vm_object_t object; object = (vm_object_t)mem; + KASSERT(object->ref_count == 0, + ("object %p ref_count = %d", object, object->ref_count)); KASSERT(TAILQ_EMPTY(&object->memq), ("object %p has resident pages in its memq", object)); KASSERT(vm_radix_is_empty(&object->rtree), @@ -187,6 +189,9 @@ vm_object_zdtor(void *mem, int size, voi KASSERT(object->shadow_count == 0, ("object %p shadow_count = %d", object, object->shadow_count)); + KASSERT(object->type == OBJT_DEAD, + ("object %p has non-dead type %d", + object, object->type)); } #endif @@ -200,6 +205,8 @@ vm_object_zinit(void *mem, int size, int rw_init_flags(&object->lock, "vm object", RW_DUPOK); /* These are true for any object that has been freed */ + object->type = OBJT_DEAD; + object->ref_count = 0; object->rtree.rt_root = 0; object->rtree.rt_flags = 0; object->paging_in_progress = 0; @@ -207,6 +214,10 @@ vm_object_zinit(void *mem, int size, int object->shadow_count = 0; object->cache.rt_root = 0; object->cache.rt_flags = 0; + + mtx_lock(&vm_object_list_mtx); + TAILQ_INSERT_TAIL(&vm_object_list, object, object_list); + mtx_unlock(&vm_object_list_mtx); return (0); } @@ -253,10 +264,6 @@ _vm_object_allocate(objtype_t type, vm_p #if VM_NRESERVLEVEL > 0 LIST_INIT(&object->rvq); #endif - - mtx_lock(&vm_object_list_mtx); - TAILQ_INSERT_TAIL(&vm_object_list, object, object_list); - mtx_unlock(&vm_object_list_mtx); } /* @@ -672,20 +679,9 @@ vm_object_destroy(vm_object_t object) { /* - * Remove the object from the global object list. - */ - mtx_lock(&vm_object_list_mtx); - TAILQ_REMOVE(&vm_object_list, object, object_list); - mtx_unlock(&vm_object_list_mtx); - - /* * Release the allocation charge. */ if (object->cred != NULL) { - KASSERT(object->type == OBJT_DEFAULT || - object->type == OBJT_SWAP, - ("vm_object_terminate: non-swap obj %p has cred", - object)); swap_release_by_cred(object->charge, object->cred); object->charge = 0; crfree(object->cred); @@ -790,6 +786,10 @@ vm_object_terminate(vm_object_t object) if (__predict_false(!vm_object_cache_is_empty(object))) vm_page_cache_free(object, 0, 0); + KASSERT(object->cred == NULL || object->type == OBJT_DEFAULT || + object->type == OBJT_SWAP, + ("%s: non-swap obj %p has cred", __func__, object)); + /* * Let the pager know object is dead. */ @@ -1805,6 +1805,8 @@ vm_object_collapse(vm_object_t object) KASSERT(backing_object->ref_count == 1, ( "backing_object %p was somehow re-referenced during collapse!", backing_object)); + backing_object->type = OBJT_DEAD; + backing_object->ref_count = 0; VM_OBJECT_WUNLOCK(backing_object); vm_object_destroy(backing_object); Modified: stable/10/sys/vm/vnode_pager.c ============================================================================== --- stable/10/sys/vm/vnode_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/10/sys/vm/vnode_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -227,6 +227,12 @@ retry: * Object has been created while we were sleeping */ VI_UNLOCK(vp); + VM_OBJECT_WLOCK(object); + KASSERT(object->ref_count == 1, + ("leaked ref %p %d", object, object->ref_count)); + object->type = OBJT_DEAD; + object->ref_count = 0; + VM_OBJECT_WUNLOCK(object); vm_object_destroy(object); goto retry; } From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 20:37:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 140A99B5; Sat, 6 Jun 2015 20:37:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E812B1F32; Sat, 6 Jun 2015 20:37:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56KbjaY058595; Sat, 6 Jun 2015 20:37:45 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56KbhP2058576; Sat, 6 Jun 2015 20:37:43 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506062037.t56KbhP2058576@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 6 Jun 2015 20:37: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: r284100 - in stable: 10/sys/vm 9/sys/vm 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 20:37:46 -0000 Author: jhb Date: Sat Jun 6 20:37:40 2015 New Revision: 284100 URL: https://svnweb.freebsd.org/changeset/base/284100 Log: MFC 261811,282660,282706: Place VM objects on the object list when created and never remove them. 261811: Fix function name in KASSERT(). 282660: Place VM objects on the object list when created and never remove them. This is ok since objects come from a NOFREE zone and allows objects to be locked while traversing the object list without triggering a LOR. Ensure that objects on the list are marked DEAD while free or stillborn, and that they have a refcount of zero. This required updating most of the pagers to explicitly mark an object as dead when deallocating it. (Only the vnode pager did this previously.) 282706: Satisfy vm_object uma zone destructor requirements after r282660 when vnode object creation raced. Modified: stable/9/sys/vm/default_pager.c stable/9/sys/vm/device_pager.c stable/9/sys/vm/phys_pager.c stable/9/sys/vm/sg_pager.c stable/9/sys/vm/swap_pager.c stable/9/sys/vm/vm_meter.c stable/9/sys/vm/vm_object.c stable/9/sys/vm/vnode_pager.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/vm/default_pager.c stable/10/sys/vm/device_pager.c stable/10/sys/vm/phys_pager.c stable/10/sys/vm/sg_pager.c stable/10/sys/vm/swap_pager.c stable/10/sys/vm/vm_meter.c stable/10/sys/vm/vm_object.c stable/10/sys/vm/vnode_pager.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/vm/default_pager.c ============================================================================== --- stable/9/sys/vm/default_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/9/sys/vm/default_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -113,6 +113,7 @@ default_pager_dealloc(object) /* * OBJT_DEFAULT objects have no special resources allocated to them. */ + object->type = OBJT_DEAD; } /* Modified: stable/9/sys/vm/device_pager.c ============================================================================== --- stable/9/sys/vm/device_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/9/sys/vm/device_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -249,6 +249,8 @@ dev_pager_dealloc(object) != NULL) dev_pager_free_page(object, m); } + object->handle = NULL; + object->type = OBJT_DEAD; } static int Modified: stable/9/sys/vm/phys_pager.c ============================================================================== --- stable/9/sys/vm/phys_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/9/sys/vm/phys_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -129,6 +129,8 @@ phys_pager_dealloc(vm_object_t object) mtx_unlock(&phys_pager_mtx); VM_OBJECT_LOCK(object); } + object->handle = NULL; + object->type = OBJT_DEAD; } /* Modified: stable/9/sys/vm/sg_pager.c ============================================================================== --- stable/9/sys/vm/sg_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/9/sys/vm/sg_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -128,6 +128,8 @@ sg_pager_dealloc(vm_object_t object) sg = object->handle; sglist_free(sg); + object->handle = NULL; + object->type = OBJT_DEAD; } static int Modified: stable/9/sys/vm/swap_pager.c ============================================================================== --- stable/9/sys/vm/swap_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/9/sys/vm/swap_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -685,6 +685,8 @@ swap_pager_dealloc(vm_object_t object) * if paging is still in progress on some objects. */ swp_pager_meta_free_all(object); + object->handle = NULL; + object->type = OBJT_DEAD; } /************************************************************************ Modified: stable/9/sys/vm/vm_meter.c ============================================================================== --- stable/9/sys/vm/vm_meter.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/9/sys/vm/vm_meter.c Sat Jun 6 20:37:40 2015 (r284100) @@ -110,14 +110,7 @@ vmtotal(SYSCTL_HANDLER_ARGS) */ mtx_lock(&vm_object_list_mtx); TAILQ_FOREACH(object, &vm_object_list, object_list) { - if (!VM_OBJECT_TRYLOCK(object)) { - /* - * Avoid a lock-order reversal. Consequently, - * the reported number of active pages may be - * greater than the actual number. - */ - continue; - } + VM_OBJECT_LOCK(object); vm_object_clear_flag(object, OBJ_ACTIVE); VM_OBJECT_UNLOCK(object); } @@ -195,10 +188,9 @@ vmtotal(SYSCTL_HANDLER_ARGS) mtx_lock(&vm_object_list_mtx); TAILQ_FOREACH(object, &vm_object_list, object_list) { /* - * Perform unsynchronized reads on the object to avoid - * a lock-order reversal. In this case, the lack of - * synchronization should not impair the accuracy of - * the reported statistics. + * Perform unsynchronized reads on the object. In + * this case, the lack of synchronization should not + * impair the accuracy of the reported statistics. */ if (object->type == OBJT_DEVICE || object->type == OBJT_SG) { /* Modified: stable/9/sys/vm/vm_object.c ============================================================================== --- stable/9/sys/vm/vm_object.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/9/sys/vm/vm_object.c Sat Jun 6 20:37:40 2015 (r284100) @@ -164,6 +164,8 @@ vm_object_zdtor(void *mem, int size, voi vm_object_t object; object = (vm_object_t)mem; + KASSERT(object->ref_count == 0, + ("object %p ref_count = %d", object, object->ref_count)); KASSERT(TAILQ_EMPTY(&object->memq), ("object %p has resident pages", object)); @@ -184,6 +186,9 @@ vm_object_zdtor(void *mem, int size, voi KASSERT(object->shadow_count == 0, ("object %p shadow_count = %d", object, object->shadow_count)); + KASSERT(object->type == OBJT_DEAD, + ("object %p has non-dead type %d", + object, object->type)); } #endif @@ -197,9 +202,15 @@ vm_object_zinit(void *mem, int size, int VM_OBJECT_LOCK_INIT(object, "standard object"); /* These are true for any object that has been freed */ + object->type = OBJT_DEAD; + object->ref_count = 0; object->paging_in_progress = 0; object->resident_page_count = 0; object->shadow_count = 0; + + mtx_lock(&vm_object_list_mtx); + TAILQ_INSERT_TAIL(&vm_object_list, object, object_list); + mtx_unlock(&vm_object_list_mtx); return (0); } @@ -229,10 +240,6 @@ _vm_object_allocate(objtype_t type, vm_p LIST_INIT(&object->rvq); #endif object->cache = NULL; - - mtx_lock(&vm_object_list_mtx); - TAILQ_INSERT_TAIL(&vm_object_list, object, object_list); - mtx_unlock(&vm_object_list_mtx); } /* @@ -641,20 +648,9 @@ vm_object_destroy(vm_object_t object) { /* - * Remove the object from the global object list. - */ - mtx_lock(&vm_object_list_mtx); - TAILQ_REMOVE(&vm_object_list, object, object_list); - mtx_unlock(&vm_object_list_mtx); - - /* * Release the allocation charge. */ if (object->cred != NULL) { - KASSERT(object->type == OBJT_DEFAULT || - object->type == OBJT_SWAP, - ("vm_object_terminate: non-swap obj %p has cred", - object)); swap_release_by_cred(object->charge, object->cred); object->charge = 0; crfree(object->cred); @@ -760,6 +756,10 @@ vm_object_terminate(vm_object_t object) if (__predict_false(object->cache != NULL)) vm_page_cache_free(object, 0, 0); + KASSERT(object->cred == NULL || object->type == OBJT_DEFAULT || + object->type == OBJT_SWAP, + ("%s: non-swap obj %p has cred", __func__, object)); + /* * Let the pager know object is dead. */ @@ -1749,6 +1749,8 @@ vm_object_collapse(vm_object_t object) KASSERT(backing_object->ref_count == 1, ( "backing_object %p was somehow re-referenced during collapse!", backing_object)); + backing_object->type = OBJT_DEAD; + backing_object->ref_count = 0; VM_OBJECT_UNLOCK(backing_object); vm_object_destroy(backing_object); Modified: stable/9/sys/vm/vnode_pager.c ============================================================================== --- stable/9/sys/vm/vnode_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/9/sys/vm/vnode_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -231,6 +231,12 @@ retry: * Object has been created while we were sleeping */ VI_UNLOCK(vp); + VM_OBJECT_LOCK(object); + KASSERT(object->ref_count == 1, + ("leaked ref %p %d", object, object->ref_count)); + object->type = OBJT_DEAD; + object->ref_count = 0; + VM_OBJECT_UNLOCK(object); vm_object_destroy(object); goto retry; } From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 20:54:42 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C6FACA2; Sat, 6 Jun 2015 20:54:42 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6005D141A; Sat, 6 Jun 2015 20:54:42 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56KsgNR067938; Sat, 6 Jun 2015 20:54:42 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56Ksggh067937; Sat, 6 Jun 2015 20:54:42 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201506062054.t56Ksggh067937@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 6 Jun 2015 20:54:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284101 - stable/10/sys/fs/nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 20:54:42 -0000 Author: rmacklem Date: Sat Jun 6 20:54:41 2015 New Revision: 284101 URL: https://svnweb.freebsd.org/changeset/base/284101 Log: MFC: r283330 The NFS client generated directory block(s) with d_fileno == 0 so that it would not return less data than requested. Since returning less directory data than requested is not a problem for FreeBSD and even UFS no longer returns directory structures with d_fileno == 0, this patch stops the client from doing this. Although entries with d_fileno == 0 should not be a problem, the man pages no longer document that these entries should be ignored, so there was a concern that these entries might be an issue in the future. Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clrpcops.c Sat Jun 6 20:37:40 2015 (r284100) +++ stable/10/sys/fs/nfsclient/nfs_clrpcops.c Sat Jun 6 20:54:41 2015 (r284101) @@ -3070,25 +3070,6 @@ nfsrpc_readdir(vnode_t vp, struct uio *u *eofp = eof; } - /* - * Add extra empty records to any remaining DIRBLKSIZ chunks. - */ - while (uio_uio_resid(uiop) > 0 && ((size_t)(uio_uio_resid(uiop))) != tresid) { - dp = (struct dirent *) CAST_DOWN(caddr_t, uio_iov_base(uiop)); - dp->d_type = DT_UNKNOWN; - dp->d_fileno = 0; - dp->d_namlen = 0; - dp->d_name[0] = '\0'; - tl = (u_int32_t *)&dp->d_name[4]; - *tl++ = cookie.lval[0]; - *tl = cookie.lval[1]; - dp->d_reclen = DIRBLKSIZ; - uio_iov_base_add(uiop, DIRBLKSIZ); - uio_iov_len_add(uiop, -(DIRBLKSIZ)); - uio_uio_resid_add(uiop, -(DIRBLKSIZ)); - uiop->uio_offset += DIRBLKSIZ; - } - nfsmout: if (nd->nd_mrep != NULL) mbuf_freem(nd->nd_mrep); @@ -3563,25 +3544,6 @@ nfsrpc_readdirplus(vnode_t vp, struct ui *eofp = eof; } - /* - * Add extra empty records to any remaining DIRBLKSIZ chunks. - */ - while (uio_uio_resid(uiop) > 0 && uio_uio_resid(uiop) != tresid) { - dp = (struct dirent *)uio_iov_base(uiop); - dp->d_type = DT_UNKNOWN; - dp->d_fileno = 0; - dp->d_namlen = 0; - dp->d_name[0] = '\0'; - tl = (u_int32_t *)&dp->d_name[4]; - *tl++ = cookie.lval[0]; - *tl = cookie.lval[1]; - dp->d_reclen = DIRBLKSIZ; - uio_iov_base_add(uiop, DIRBLKSIZ); - uio_iov_len_add(uiop, -(DIRBLKSIZ)); - uio_uio_resid_add(uiop, -(DIRBLKSIZ)); - uiop->uio_offset += DIRBLKSIZ; - } - nfsmout: if (nd->nd_mrep != NULL) mbuf_freem(nd->nd_mrep); From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 21:11:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C0A5EEF; Sat, 6 Jun 2015 21:11:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A6BC175B; Sat, 6 Jun 2015 21:11:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56LBIVk075378; Sat, 6 Jun 2015 21:11:18 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56LBHct075091; Sat, 6 Jun 2015 21:11:17 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201506062111.t56LBHct075091@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 6 Jun 2015 21:11:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284102 - head/release/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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 21:11:18 -0000 Author: gjb Date: Sat Jun 6 21:11:17 2015 New Revision: 284102 URL: https://svnweb.freebsd.org/changeset/base/284102 Log: Set the correct UBLDR_LOADADDR for the Wandboard and Cubox/Hummingboard images. Submitted by: ian MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/arm/CUBOX-HUMMINGBOARD.conf head/release/arm/WANDBOARD.conf Modified: head/release/arm/CUBOX-HUMMINGBOARD.conf ============================================================================== --- head/release/arm/CUBOX-HUMMINGBOARD.conf Sat Jun 6 20:54:41 2015 (r284101) +++ head/release/arm/CUBOX-HUMMINGBOARD.conf Sat Jun 6 21:11:17 2015 (r284102) @@ -8,7 +8,7 @@ EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-cubox-hummingboard" KERNEL="IMX6" -WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x11000000" +WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x12000000" IMAGE_SIZE="1G" PART_SCHEME="MBR" FAT_SIZE="50m -b 16384" Modified: head/release/arm/WANDBOARD.conf ============================================================================== --- head/release/arm/WANDBOARD.conf Sat Jun 6 20:54:41 2015 (r284101) +++ head/release/arm/WANDBOARD.conf Sat Jun 6 21:11:17 2015 (r284102) @@ -8,7 +8,7 @@ EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-wandboard" KERNEL="IMX6" -WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x11000000" +WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x12000000" IMAGE_SIZE="1G" PART_SCHEME="MBR" FAT_SIZE="50m -b 16384" From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 21:52:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 868355D3; Sat, 6 Jun 2015 21:52:47 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73C2F133A; Sat, 6 Jun 2015 21:52:47 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56LqlKC096734; Sat, 6 Jun 2015 21:52:47 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56LqlOl096733; Sat, 6 Jun 2015 21:52:47 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201506062152.t56LqlOl096733@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 6 Jun 2015 21:52:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284103 - head/sys/arm64/arm64 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 21:52:47 -0000 Author: andrew Date: Sat Jun 6 21:52:46 2015 New Revision: 284103 URL: https://svnweb.freebsd.org/changeset/base/284103 Log: Rework exception entry to help with DTrace. We now store the stack pointer before adjusting it to store any registers. This is needed as DTrace may need to adjust the kernel stack pointer, and previously the new stack pointer would have needed to be checked incase it was changed. Modified: head/sys/arm64/arm64/exception.S Modified: head/sys/arm64/arm64/exception.S ============================================================================== --- head/sys/arm64/arm64/exception.S Sat Jun 6 21:11:17 2015 (r284102) +++ head/sys/arm64/arm64/exception.S Sat Jun 6 21:52:46 2015 (r284103) @@ -33,6 +33,9 @@ __FBSDID("$FreeBSD$"); .text .macro save_registers el +.if \el == 1 + mov x18, sp +.endif stp x28, x29, [sp, #-16]! stp x26, x27, [sp, #-16]! stp x24, x25, [sp, #-16]! @@ -51,22 +54,20 @@ __FBSDID("$FreeBSD$"); mrs x10, elr_el1 mrs x11, spsr_el1 .if \el == 0 - mrs x12, sp_el0 -.else - mov x12, sp + mrs x18, sp_el0 .endif stp x10, x11, [sp, #-16]! - stp x12, lr, [sp, #-16]! + stp x18, lr, [sp, #-16]! mrs x18, tpidr_el1 .endm .macro restore_registers el - ldp x12, lr, [sp], #16 + msr daifset, #2 /* Disable interrupts, x18 may change + * in the interrupt exception handler */ + ldp x18, lr, [sp], #16 ldp x10, x11, [sp], #16 .if \el == 0 - msr sp_el0, x12 -.else - mov sp, x12 + msr sp_el0, x18 .endif msr spsr_el1, x11 msr elr_el1, x10 @@ -89,6 +90,10 @@ __FBSDID("$FreeBSD$"); ldp x24, x25, [sp], #16 ldp x26, x27, [sp], #16 ldp x28, x29, [sp], #16 +.if \el == 1 + mov sp, x18 + mrs x18, tpidr_el1 +.endif .endm .macro do_ast From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 22:03:26 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2903B7F9; Sat, 6 Jun 2015 22:03:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1575815F8; Sat, 6 Jun 2015 22:03:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t56M3PVf001916; Sat, 6 Jun 2015 22:03:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t56M3ONo001911; Sat, 6 Jun 2015 22:03:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201506062203.t56M3ONo001911@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 6 Jun 2015 22:03:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284104 - in head/sys: amd64/amd64 amd64/include 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.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 22:03:26 -0000 Author: kib Date: Sat Jun 6 22:03:24 2015 New Revision: 284104 URL: https://svnweb.freebsd.org/changeset/base/284104 Log: Update print_INTEL_TLB() by the tag values from the Intel SDM rev. 55. The modern CPUs cache and TLB descriptions looked quite questionable without the update, e.g. Haswell i7 4770S reported: Data TLB: 4 KB pages, 4-way set associative, 64 entries L2 cache: 256 kbytes, 8-way associative, 64 bytes/line After the update, the report is: Data TLB: 1 GByte pages, 4-way set associative, 4 entries Data TLB: 4 KB pages, 4-way set associative, 64 entries Instruction TLB: 2M/4M pages, fully associative, 8 entries Instruction TLB: 4KByte pages, 8-way set associative, 64 entries 64-Byte prefetching Shared 2nd-Level TLB: 4 KByte/2MByte pages, 8-way associative, 1024 entries L2 cache: 256 kbytes, 8-way associative, 64 bytes/line Some tags were apparently removed from the table 3-21, Vol. 2A. Keep them around, but add a comment stating the removal. Update the format line for cpu_stdext_feature according to the bits from the SDM rev.55. It appears that Haswells do not store %cs and %ds values in the FPU save area. Store content of the %ecx register from the CPUID leaf 0x7 subleaf 0 as cpu_stdext_feature2 and print defined bits from it, again acording to SDM rev. 55. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/initcpu.c head/sys/amd64/include/md_var.h head/sys/i386/i386/initcpu.c head/sys/i386/include/md_var.h head/sys/x86/x86/identcpu.c Modified: head/sys/amd64/amd64/initcpu.c ============================================================================== --- head/sys/amd64/amd64/initcpu.c Sat Jun 6 21:52:46 2015 (r284103) +++ head/sys/amd64/amd64/initcpu.c Sat Jun 6 22:03:24 2015 (r284104) @@ -74,6 +74,7 @@ u_int cpu_fxsr; /* SSE enabled */ u_int cpu_mxcsr_mask; /* Valid bits in mxcsr */ u_int cpu_clflush_line_size = 32; u_int cpu_stdext_feature; +u_int cpu_stdext_feature2; u_int cpu_max_ext_state_size; u_int cpu_mon_mwait_flags; /* MONITOR/MWAIT flags (CPUID.05H.ECX) */ u_int cpu_mon_min_size; /* MONITOR minimum range size, bytes */ Modified: head/sys/amd64/include/md_var.h ============================================================================== --- head/sys/amd64/include/md_var.h Sat Jun 6 21:52:46 2015 (r284103) +++ head/sys/amd64/include/md_var.h Sat Jun 6 22:03:24 2015 (r284104) @@ -49,6 +49,7 @@ extern u_int via_feature_rng; extern u_int via_feature_xcrypt; extern u_int cpu_clflush_line_size; extern u_int cpu_stdext_feature; +extern u_int cpu_stdext_feature2; extern u_int cpu_fxsr; extern u_int cpu_high; extern u_int cpu_id; Modified: head/sys/i386/i386/initcpu.c ============================================================================== --- head/sys/i386/i386/initcpu.c Sat Jun 6 21:52:46 2015 (r284103) +++ head/sys/i386/i386/initcpu.c Sat Jun 6 22:03:24 2015 (r284104) @@ -102,6 +102,7 @@ u_int cpu_mxcsr_mask; /* Valid bits in #endif u_int cpu_clflush_line_size = 32; u_int cpu_stdext_feature; +u_int cpu_stdext_feature2; u_int cpu_max_ext_state_size; u_int cpu_mon_mwait_flags; /* MONITOR/MWAIT flags (CPUID.05H.ECX) */ u_int cpu_mon_min_size; /* MONITOR minimum range size, bytes */ Modified: head/sys/i386/include/md_var.h ============================================================================== --- head/sys/i386/include/md_var.h Sat Jun 6 21:52:46 2015 (r284103) +++ head/sys/i386/include/md_var.h Sat Jun 6 22:03:24 2015 (r284104) @@ -49,6 +49,7 @@ extern u_int via_feature_rng; extern u_int via_feature_xcrypt; extern u_int cpu_clflush_line_size; extern u_int cpu_stdext_feature; +extern u_int cpu_stdext_feature2; extern u_int cpu_fxsr; extern u_int cpu_high; extern u_int cpu_id; Modified: head/sys/x86/x86/identcpu.c ============================================================================== --- head/sys/x86/x86/identcpu.c Sat Jun 6 21:52:46 2015 (r284103) +++ head/sys/x86/x86/identcpu.c Sat Jun 6 22:03:24 2015 (r284104) @@ -903,6 +903,9 @@ printcpuinfo(void) "\013INVPCID" /* Restricted Transactional Memory */ "\014RTM" + "\015PQM" + "\016NFPUSG" + "\020PQE" /* Intel Memory Protection Extensions */ "\017MPX" /* AVX512 Foundation */ @@ -922,6 +925,16 @@ printcpuinfo(void) ); } + if (cpu_stdext_feature2 != 0) { + printf("\n Structured Extended Features2=0x%b", + cpu_stdext_feature2, + "\020" + "\001PREFETCHWT1" + "\004PKU" + "\005OSPKE" + ); + } + if ((cpu_feature2 & CPUID2_XSAVE) != 0) { cpuid_count(0xd, 0x1, regs); if (regs[0] != 0) { @@ -1357,6 +1370,7 @@ identify_cpu(void) cpu_stdext_disable = 0; TUNABLE_INT_FETCH("hw.cpu_stdext_disable", &cpu_stdext_disable); cpu_stdext_feature &= ~cpu_stdext_disable; + cpu_stdext_feature2 = regs[2]; } #ifdef __i386__ @@ -1701,18 +1715,39 @@ print_INTEL_TLB(u_int data) case 0x8: printf("1st-level instruction cache: 16 KB, 4-way set associative, 32 byte line size\n"); break; + case 0x9: + printf("1st-level instruction cache: 32 KB, 4-way set associative, 64 byte line size\n"); + break; case 0xa: printf("1st-level data cache: 8 KB, 2-way set associative, 32 byte line size\n"); break; + case 0xb: + printf("Instruction TLB: 4 MByte pages, 4-way set associative, 4 entries\n"); + break; case 0xc: printf("1st-level data cache: 16 KB, 4-way set associative, 32 byte line size\n"); break; + case 0xd: + printf("1st-level data cache: 16 KBytes, 4-way set associative, 64 byte line size"); + break; + case 0xe: + printf("1st-level data cache: 24 KBytes, 6-way set associative, 64 byte line size\n"); + break; + case 0x1d: + printf("2nd-level cache: 128 KBytes, 2-way set associative, 64 byte line size\n"); + break; + case 0x21: + printf("2nd-level cache: 256 KBytes, 8-way set associative, 64 byte line size\n"); + break; case 0x22: printf("3rd-level cache: 512 KB, 4-way set associative, sectored cache, 64 byte line size\n"); break; case 0x23: printf("3rd-level cache: 1 MB, 8-way set associative, sectored cache, 64 byte line size\n"); break; + case 0x24: + printf("2nd-level cache: 1 MBytes, 16-way set associative, 64 byte line size\n"); + break; case 0x25: printf("3rd-level cache: 2 MB, 8-way set associative, sectored cache, 64 byte line size\n"); break; @@ -1725,13 +1760,13 @@ print_INTEL_TLB(u_int data) case 0x30: printf("1st-level instruction cache: 32 KB, 8-way set associative, 64 byte line size\n"); break; - case 0x39: + case 0x39: /* De-listed in SDM rev. 54 */ printf("2nd-level cache: 128 KB, 4-way set associative, sectored cache, 64 byte line size\n"); break; - case 0x3b: + case 0x3b: /* De-listed in SDM rev. 54 */ printf("2nd-level cache: 128 KB, 2-way set associative, sectored cache, 64 byte line size\n"); break; - case 0x3c: + case 0x3c: /* De-listed in SDM rev. 54 */ printf("2nd-level cache: 256 KB, 4-way set associative, sectored cache, 64 byte line size\n"); break; case 0x41: @@ -1755,6 +1790,34 @@ print_INTEL_TLB(u_int data) case 0x47: printf("3rd-level cache: 8 MB, 8-way set associative, 64 byte line size\n"); break; + case 0x48: + printf("2nd-level cache: 3MByte, 12-way set associative, 64 byte line size\n"); + break; + case 0x49: + if (CPUID_TO_FAMILY(cpu_id) == 0xf && + CPUID_TO_MODEL(cpu_id) == 0x6) + printf("3rd-level cache: 4MB, 16-way set associative, 64-byte line size\n"); + else + printf("2nd-level cache: 4 MByte, 16-way set associative, 64 byte line size"); + break; + case 0x4a: + printf("3rd-level cache: 6MByte, 12-way set associative, 64 byte line size\n"); + break; + case 0x4b: + printf("3rd-level cache: 8MByte, 16-way set associative, 64 byte line size\n"); + break; + case 0x4c: + printf("3rd-level cache: 12MByte, 12-way set associative, 64 byte line size\n"); + break; + case 0x4d: + printf("3rd-level cache: 16MByte, 16-way set associative, 64 byte line size\n"); + break; + case 0x4e: + printf("2nd-level cache: 6MByte, 24-way set associative, 64 byte line size\n"); + break; + case 0x4f: + printf("Instruction TLB: 4 KByte pages, 32 entries\n"); + break; case 0x50: printf("Instruction TLB: 4 KB, 2 MB or 4 MB pages, fully associative, 64 entries\n"); break; @@ -1764,6 +1827,21 @@ print_INTEL_TLB(u_int data) case 0x52: printf("Instruction TLB: 4 KB, 2 MB or 4 MB pages, fully associative, 256 entries\n"); break; + case 0x55: + printf("Instruction TLB: 2-MByte or 4-MByte pages, fully associative, 7 entries\n"); + break; + case 0x56: + printf("Data TLB0: 4 MByte pages, 4-way set associative, 16 entries\n"); + break; + case 0x57: + printf("Data TLB0: 4 KByte pages, 4-way associative, 16 entries\n"); + break; + case 0x59: + printf("Data TLB0: 4 KByte pages, fully associative, 16 entries\n"); + break; + case 0x5a: + printf("Data TLB0: 2-MByte or 4 MByte pages, 4-way set associative, 32 entries\n"); + break; case 0x5b: printf("Data TLB: 4 KB or 4 MB pages, fully associative, 64 entries\n"); break; @@ -1776,6 +1854,12 @@ print_INTEL_TLB(u_int data) case 0x60: printf("1st-level data cache: 16 KB, 8-way set associative, sectored cache, 64 byte line size\n"); break; + case 0x61: + printf("Instruction TLB: 4 KByte pages, fully associative, 48 entries\n"); + break; + case 0x63: + printf("Data TLB: 1 GByte pages, 4-way set associative, 4 entries\n"); + break; case 0x66: printf("1st-level data cache: 8 KB, 4-way set associative, sectored cache, 64 byte line size\n"); break; @@ -1794,6 +1878,9 @@ print_INTEL_TLB(u_int data) case 0x72: printf("Trace cache: 32K-uops, 8-way set associative\n"); break; + case 0x76: + printf("Instruction TLB: 2M/4M pages, fully associative, 8 entries\n"); + break; case 0x78: printf("2nd-level cache: 1 MB, 4-way set associative, 64-byte line size\n"); break; @@ -1815,6 +1902,9 @@ print_INTEL_TLB(u_int data) case 0x7f: printf("2nd-level cache: 512-KB, 2-way set associative, 64-byte line size\n"); break; + case 0x80: + printf("2nd-level cache: 512 KByte, 8-way set associative, 64-byte line size\n"); + break; case 0x82: printf("2nd-level cache: 256 KB, 8-way set associative, 32 byte line size\n"); break; @@ -1833,12 +1923,99 @@ print_INTEL_TLB(u_int data) case 0x87: printf("2nd-level cache: 1 MB, 8-way set associative, 64 byte line size\n"); break; + case 0xa0: + printf("DTLB: 4k pages, fully associative, 32 entries\n"); + break; case 0xb0: printf("Instruction TLB: 4 KB Pages, 4-way set associative, 128 entries\n"); break; + case 0xb1: + printf("Instruction TLB: 2M pages, 4-way, 8 entries or 4M pages, 4-way, 4 entries\n"); + break; + case 0xb2: + printf("Instruction TLB: 4KByte pages, 4-way set associative, 64 entries\n"); + break; case 0xb3: printf("Data TLB: 4 KB Pages, 4-way set associative, 128 entries\n"); break; + case 0xb4: + printf("Data TLB1: 4 KByte pages, 4-way associative, 256 entries\n"); + break; + case 0xb5: + printf("Instruction TLB: 4KByte pages, 8-way set associative, 64 entries\n"); + break; + case 0xb6: + printf("Instruction TLB: 4KByte pages, 8-way set associative, 128 entries\n"); + break; + case 0xba: + printf("Data TLB1: 4 KByte pages, 4-way associative, 64 entries\n"); + break; + case 0xc0: + printf("Data TLB: 4 KByte and 4 MByte pages, 4-way associative, 8 entries\n"); + break; + case 0xc1: + printf("Shared 2nd-Level TLB: 4 KByte/2MByte pages, 8-way associative, 1024 entries\n"); + break; + case 0xc2: + printf("DTLB: 4 KByte/2 MByte pages, 4-way associative, 16 entries\n"); + break; + case 0xc3: + printf("Shared 2nd-Level TLB: 4 KByte /2 MByte pages, 6-way associative, 1536 entries. Also 1GBbyte pages, 4-way, 16 entries\n"); + break; + case 0xca: + printf("Shared 2nd-Level TLB: 4 KByte pages, 4-way associative, 512 entries\n"); + break; + case 0xd0: + printf("3rd-level cache: 512 KByte, 4-way set associative, 64 byte line size\n"); + break; + case 0xd1: + printf("3rd-level cache: 1 MByte, 4-way set associative, 64 byte line size\n"); + break; + case 0xd2: + printf("3rd-level cache: 2 MByte, 4-way set associative, 64 byte line size\n"); + break; + case 0xd6: + printf("3rd-level cache: 1 MByte, 8-way set associative, 64 byte line size\n"); + break; + case 0xd7: + printf("3rd-level cache: 2 MByte, 8-way set associative, 64 byte line size\n"); + break; + case 0xd8: + printf("3rd-level cache: 4 MByte, 8-way set associative, 64 byte line size\n"); + break; + case 0xdc: + printf("3rd-level cache: 1.5 MByte, 12-way set associative, 64 byte line size\n"); + break; + case 0xdd: + printf("3rd-level cache: 3 MByte, 12-way set associative, 64 byte line size\n"); + break; + case 0xde: + printf("3rd-level cache: 6 MByte, 12-way set associative, 64 byte line size\n"); + break; + case 0xe2: + printf("3rd-level cache: 2 MByte, 16-way set associative, 64 byte line size\n"); + break; + case 0xe3: + printf("3rd-level cache: 4 MByte, 16-way set associative, 64 byte line size\n"); + break; + case 0xe4: + printf("3rd-level cache: 8 MByte, 16-way set associative, 64 byte line size\n"); + break; + case 0xea: + printf("3rd-level cache: 12MByte, 24-way set associative, 64 byte line size\n"); + break; + case 0xeb: + printf("3rd-level cache: 18MByte, 24-way set associative, 64 byte line size\n"); + break; + case 0xec: + printf("3rd-level cache: 24MByte, 24-way set associative, 64 byte line size\n"); + break; + case 0xf0: + printf("64-Byte prefetching\n"); + break; + case 0xf1: + printf("128-Byte prefetching\n"); + break; } } From owner-svn-src-all@FreeBSD.ORG Sat Jun 6 22:03:39 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4328A934 for ; Sat, 6 Jun 2015 22:03:39 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f174.google.com (mail-ie0-f174.google.com [209.85.223.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E03715FA for ; Sat, 6 Jun 2015 22:03:38 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by iebmu5 with SMTP id mu5so42635391ieb.1 for ; Sat, 06 Jun 2015 15:03:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=VVBszvsg0c1S/tncf5C4CmMJG+Vb8Ebxg8TUPyVBsIE=; b=LYVfzSXMBFD/Z635+X4ZCM47rpF+SVjv+HbxVvVTlNXcZeqWhPF/g96A8aIYmy6WsU reYtwsFVfOhdAZD3H3eDYBhbuqYB22EemDuNPl0QhysH7RKwhZnleYD1Mc5xtNaDMyGb evlCG/KLaaMARJdtoEHT2PB+B1ZKTVzjLsukKPOGen3MPsIj+a1/gNZ+gjcUn+rf3JPJ eAKulQvC3bu89DanUoSH1BHphavju50ZjgDxWGMsOC9xj0Af8dIqRvQNkV1r/zdyL4MC hzJhpES/vrCKXcp2T2/9kNxdT2O68IKyFYnFgShr3tzP4VCtXLy9mcm8lDAiuRwSXyLF 8lXw== X-Gm-Message-State: ALoCoQnCY/Bn0OjMIl4sAzrCkcOWc2XgdH7gcqrbV+gt0Mgs429Ob6WntyKlNtuCJVLy/PWNUYiq X-Received: by 10.50.27.6 with SMTP id p6mr5332823igg.46.1433628218061; Sat, 06 Jun 2015 15:03:38 -0700 (PDT) Received: from netflix-mac-wired.bsdimp.com ([50.253.99.174]) by mx.google.com with ESMTPSA id l6sm1774437igx.10.2015.06.06.15.03.37 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 06 Jun 2015 15:03:37 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r284087 - head/sys/modules Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/signed; boundary="Apple-Mail=_4BCCFAE0-A4AB-4F6E-85F9-17A13E52726B"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Warner Losh In-Reply-To: <2201763.WufPS8uA2S@ralph.baldwin.cx> Date: Sat, 6 Jun 2015 16:03:35 -0600 Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <7599E3D2-B8D8-46E1-BF28-0E8AE20DA73E@bsdimp.com> References: <201506061708.t56H87b8051531@svn.freebsd.org> <2201763.WufPS8uA2S@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 06 Jun 2015 22:03:39 -0000 --Apple-Mail=_4BCCFAE0-A4AB-4F6E-85F9-17A13E52726B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 6, 2015, at 11:19 AM, John Baldwin wrote: >=20 > On Saturday, June 06, 2015 05:08:07 PM Warner Losh wrote: >> Author: imp >> Date: Sat Jun 6 17:08:06 2015 >> New Revision: 284087 >> URL: https://svnweb.freebsd.org/changeset/base/284087 >>=20 >> Log: >> Turns out amd64 is hit too by ix. When it works, turn it back on. >=20 > Can you post your errors? It builds fine for me and Jenkins hasn't = been > reporting any build errors since yesterday afternoon/evening. Will do. it was very consistent, even after refreshing my tree. I=E2=80=99= ll investigate more. Warner --Apple-Mail=_4BCCFAE0-A4AB-4F6E-85F9-17A13E52726B 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 iQIcBAEBCgAGBQJVc244AAoJEGwc0Sh9sBEA4aUP/3+JHBu8RJFJQvzit4qFIeCN hAOag6qv+vXh7dGAoBPtSSveMSjRAQks8MHTsHc95bX8nnL57aOGrz6s+dmIdOnk H/ZN9kvXLIJdQMG+f8n2QK/Q9kMGJOccrp69IOP7ya4k8NC72qzdldNH1huO48ou jnwYsBJDRKYdpQplH7JI67dx/9M31X7XgSD1xERdPB1G5oh7qOGrFkXtUW3erOXW DciLEjc6IjqZbHnCT1+OhV0oCx3eA6jPT3EVr2tb+aeonrzd81uo/HfbTNwYPCY3 E5qcTJSy5/0HgGgAKPKcNq3P3sZj3cvmc2sxJLoaUEmYCYmU8D9RF09xkIamta/5 hGQfFG0JCVkVcXR8Gn8kEKtKpLgmbkAIn2BZtM6vmxnJDKIPEFDjsm2tGWpGmkkd oPn+TYsjrPk2A2SLYiyfVNpsHXf+Z7Ljqf6nZuZKD9Sgd9ypF40bET1w94U9GIrA vMGrJafGJ7AU0/GGVvdTseswgyw7AyPzgtpmk0uX52ZhbEyBqf1JNbJz8YqYu64r tSL8xbrSxOARdF+yHZ9Pxnu44slRrKSja5LYWBxwp4r3j/MJfnIPw6dEANAw8iQm YE7Kirk7xjqv7mF6Z/BhEItSlafqIgESRZxH3mY35MFRIbH50lz2o/O7evzpFBGm uCWHJfaKW6yu+rjcsyVf =JULJ -----END PGP SIGNATURE----- --Apple-Mail=_4BCCFAE0-A4AB-4F6E-85F9-17A13E52726B--