From owner-svn-src-stable@FreeBSD.ORG Sun Apr 11 15:17:53 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5337E106566C; Sun, 11 Apr 2010 15:17:53 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 432408FC0A; Sun, 11 Apr 2010 15:17:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3BFHrlB034206; Sun, 11 Apr 2010 15:17:53 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BFHrAU034204; Sun, 11 Apr 2010 15:17:53 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201004111517.o3BFHrAU034204@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 11 Apr 2010 15:17:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206478 - stable/8/sbin/ipfw X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Apr 2010 15:17:53 -0000 Author: ume Date: Sun Apr 11 15:17:52 2010 New Revision: 206478 URL: http://svn.freebsd.org/changeset/base/206478 Log: MFC r206266: Set net.inet6.ip6.fw.enable as well. Modified: stable/8/sbin/ipfw/ipfw2.c Directory Properties: stable/8/sbin/ipfw/ (props changed) Modified: stable/8/sbin/ipfw/ipfw2.c ============================================================================== --- stable/8/sbin/ipfw/ipfw2.c Sun Apr 11 13:51:20 2010 (r206477) +++ stable/8/sbin/ipfw/ipfw2.c Sun Apr 11 15:17:52 2010 (r206478) @@ -1740,6 +1740,8 @@ ipfw_sysctl_handler(char *av[], int whic } else if (_substrcmp(*av, "firewall") == 0) { sysctlbyname("net.inet.ip.fw.enable", NULL, 0, &which, sizeof(which)); + sysctlbyname("net.inet6.ip6.fw.enable", NULL, 0, + &which, sizeof(which)); } else if (_substrcmp(*av, "one_pass") == 0) { sysctlbyname("net.inet.ip.fw.one_pass", NULL, 0, &which, sizeof(which)); From owner-svn-src-stable@FreeBSD.ORG Mon Apr 12 20:53:17 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8903C106564A; Mon, 12 Apr 2010 20:53:17 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 773FE8FC13; Mon, 12 Apr 2010 20:53:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3CKrHF0037332; Mon, 12 Apr 2010 20:53:17 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CKrHK9037330; Mon, 12 Apr 2010 20:53:17 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004122053.o3CKrHK9037330@svn.freebsd.org> From: Andriy Gapon Date: Mon, 12 Apr 2010 20:53:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206502 - stable/8/sys/fs/msdosfs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2010 20:53:17 -0000 Author: avg Date: Mon Apr 12 20:53:17 2010 New Revision: 206502 URL: http://svn.freebsd.org/changeset/base/206502 Log: MFC r206098: mountmsdosfs: reject too high value of bytes per cluster Modified: stable/8/sys/fs/msdosfs/msdosfs_vfsops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/msdosfs/msdosfs_vfsops.c ============================================================================== --- stable/8/sys/fs/msdosfs/msdosfs_vfsops.c Mon Apr 12 18:28:08 2010 (r206501) +++ stable/8/sys/fs/msdosfs/msdosfs_vfsops.c Mon Apr 12 20:53:17 2010 (r206502) @@ -580,6 +580,7 @@ mountmsdosfs(struct vnode *devvp, struct || (pmp->pm_BytesPerSec & (pmp->pm_BytesPerSec - 1)) || (pmp->pm_HugeSectors == 0) || (pmp->pm_FATsecs == 0) + || (SecPerClust * pmp->pm_BlkPerSec > MAXBSIZE / DEV_BSIZE) ) { error = EINVAL; goto error_exit; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 12 20:54:56 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBDF1106566B; Mon, 12 Apr 2010 20:54:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA01C8FC14; Mon, 12 Apr 2010 20:54:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3CKsuAU037742; Mon, 12 Apr 2010 20:54:56 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CKsuh3037740; Mon, 12 Apr 2010 20:54:56 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004122054.o3CKsuh3037740@svn.freebsd.org> From: Andriy Gapon Date: Mon, 12 Apr 2010 20:54:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206503 - stable/7/sys/fs/msdosfs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2010 20:54:56 -0000 Author: avg Date: Mon Apr 12 20:54:56 2010 New Revision: 206503 URL: http://svn.freebsd.org/changeset/base/206503 Log: MFC r206098: mountmsdosfs: reject too high value of bytes per cluster Modified: stable/7/sys/fs/msdosfs/msdosfs_vfsops.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/fs/msdosfs/msdosfs_vfsops.c ============================================================================== --- stable/7/sys/fs/msdosfs/msdosfs_vfsops.c Mon Apr 12 20:53:17 2010 (r206502) +++ stable/7/sys/fs/msdosfs/msdosfs_vfsops.c Mon Apr 12 20:54:56 2010 (r206503) @@ -558,6 +558,7 @@ mountmsdosfs(struct vnode *devvp, struct || (pmp->pm_BytesPerSec & (pmp->pm_BytesPerSec - 1)) || (pmp->pm_HugeSectors == 0) || (pmp->pm_FATsecs == 0) + || (SecPerClust * pmp->pm_BlkPerSec > MAXBSIZE / DEV_BSIZE) ) { error = EINVAL; goto error_exit; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 12 21:04:36 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A6F6106566C; Mon, 12 Apr 2010 21:04:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EC2F8FC1B; Mon, 12 Apr 2010 21:04:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3CL4aBK039925; Mon, 12 Apr 2010 21:04:36 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CL4a2g039920; Mon, 12 Apr 2010 21:04:36 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004122104.o3CL4a2g039920@svn.freebsd.org> From: Andriy Gapon Date: Mon, 12 Apr 2010 21:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206504 - stable/8/usr.bin/indent X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2010 21:04:36 -0000 Author: avg Date: Mon Apr 12 21:04:35 2010 New Revision: 206504 URL: http://svn.freebsd.org/changeset/base/206504 Log: MFC r205989: indent(1): new option, -ta, to treat all *_t identifiers as types Modified: stable/8/usr.bin/indent/args.c stable/8/usr.bin/indent/indent.1 stable/8/usr.bin/indent/indent_globs.h stable/8/usr.bin/indent/lexi.c Directory Properties: stable/8/usr.bin/indent/ (props changed) Modified: stable/8/usr.bin/indent/args.c ============================================================================== --- stable/8/usr.bin/indent/args.c Mon Apr 12 20:54:56 2010 (r206503) +++ stable/8/usr.bin/indent/args.c Mon Apr 12 21:04:35 2010 (r206504) @@ -157,6 +157,7 @@ struct pro { {"sc", PRO_BOOL, true, ON, &star_comment_cont}, {"sob", PRO_BOOL, false, ON, &swallow_optional_blanklines}, {"st", PRO_SPECIAL, 0, STDIN, 0}, + {"ta", PRO_BOOL, false, ON, &auto_typedefs}, {"troff", PRO_BOOL, false, ON, &troff}, {"ut", PRO_BOOL, true, ON, &use_tabs}, {"v", PRO_BOOL, false, ON, &verbose}, Modified: stable/8/usr.bin/indent/indent.1 ============================================================================== --- stable/8/usr.bin/indent/indent.1 Mon Apr 12 20:54:56 2010 (r206503) +++ stable/8/usr.bin/indent/indent.1 Mon Apr 12 21:04:35 2010 (r206504) @@ -80,6 +80,7 @@ .Op Fl sob | Fl nsob .Ek .Op Fl \&st +.Op Fl \&ta .Op Fl troff .Op Fl ut | Fl nut .Op Fl v | Fl \&nv @@ -377,6 +378,9 @@ Default: Causes .Nm to take its input from stdin and put its output to stdout. +.It Fl ta +Automatically add all identifiers ending in "_t" to the list +of type keywords. .It Fl T Ns Ar typename Adds .Ar typename Modified: stable/8/usr.bin/indent/indent_globs.h ============================================================================== --- stable/8/usr.bin/indent/indent_globs.h Mon Apr 12 20:54:56 2010 (r206503) +++ stable/8/usr.bin/indent/indent_globs.h Mon Apr 12 21:04:35 2010 (r206504) @@ -204,6 +204,8 @@ int function_brace_split; /* split f * brace onto separate lines */ int use_tabs; /* set true to use tabs for spacing, * false uses all spaces */ +int auto_typedefs; /* set true to recognize identifiers + * ending in "_t" like typedefs */ /* -troff font state information */ Modified: stable/8/usr.bin/indent/lexi.c ============================================================================== --- stable/8/usr.bin/indent/lexi.c Mon Apr 12 20:54:56 2010 (r206503) +++ stable/8/usr.bin/indent/lexi.c Mon Apr 12 21:04:35 2010 (r206504) @@ -249,6 +249,17 @@ lexi(void) last_code = ident; /* Remember that this is the code we will * return */ + if (auto_typedefs) { + const char *q = s_token; + /* Check if we have an "_t" in the end */ + if (q[0] && q[1] && + (strcmp(q + strlen(q) - 2, "_t") == 0)) { + ps.its_a_keyword = true; + ps.last_u_d = true; + goto found_auto_typedef; + } + } + /* * This loop will check if the token is a keyword. */ @@ -285,6 +296,7 @@ lexi(void) /* FALLTHROUGH */ case 4: /* one of the declaration keywords */ + found_auto_typedef: if (ps.p_l_follow) { ps.cast_mask |= (1 << ps.p_l_follow) & ~ps.sizeof_mask; break; /* inside parens: cast, param list or sizeof */ From owner-svn-src-stable@FreeBSD.ORG Mon Apr 12 21:05:36 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCF78106567C; Mon, 12 Apr 2010 21:05:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B06408FC21; Mon, 12 Apr 2010 21:05:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3CL5anu040182; Mon, 12 Apr 2010 21:05:36 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CL5aRI040177; Mon, 12 Apr 2010 21:05:36 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004122105.o3CL5aRI040177@svn.freebsd.org> From: Andriy Gapon Date: Mon, 12 Apr 2010 21:05:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206505 - stable/7/usr.bin/indent X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2010 21:05:37 -0000 Author: avg Date: Mon Apr 12 21:05:36 2010 New Revision: 206505 URL: http://svn.freebsd.org/changeset/base/206505 Log: MFC r205989: indent(1): new option, -ta, to treat all *_t identifiers as types Modified: stable/7/usr.bin/indent/args.c stable/7/usr.bin/indent/indent.1 stable/7/usr.bin/indent/indent_globs.h stable/7/usr.bin/indent/lexi.c Directory Properties: stable/7/usr.bin/indent/ (props changed) Modified: stable/7/usr.bin/indent/args.c ============================================================================== --- stable/7/usr.bin/indent/args.c Mon Apr 12 21:04:35 2010 (r206504) +++ stable/7/usr.bin/indent/args.c Mon Apr 12 21:05:36 2010 (r206505) @@ -157,6 +157,7 @@ struct pro { {"sc", PRO_BOOL, true, ON, &star_comment_cont}, {"sob", PRO_BOOL, false, ON, &swallow_optional_blanklines}, {"st", PRO_SPECIAL, 0, STDIN, 0}, + {"ta", PRO_BOOL, false, ON, &auto_typedefs}, {"troff", PRO_BOOL, false, ON, &troff}, {"ut", PRO_BOOL, true, ON, &use_tabs}, {"v", PRO_BOOL, false, ON, &verbose}, Modified: stable/7/usr.bin/indent/indent.1 ============================================================================== --- stable/7/usr.bin/indent/indent.1 Mon Apr 12 21:04:35 2010 (r206504) +++ stable/7/usr.bin/indent/indent.1 Mon Apr 12 21:05:36 2010 (r206505) @@ -80,6 +80,7 @@ .Op Fl sob | Fl nsob .Ek .Op Fl \&st +.Op Fl \&ta .Op Fl troff .Op Fl ut | Fl nut .Op Fl v | Fl \&nv @@ -377,6 +378,9 @@ Default: Causes .Nm to take its input from stdin and put its output to stdout. +.It Fl ta +Automatically add all identifiers ending in "_t" to the list +of type keywords. .It Fl T Ns Ar typename Adds .Ar typename Modified: stable/7/usr.bin/indent/indent_globs.h ============================================================================== --- stable/7/usr.bin/indent/indent_globs.h Mon Apr 12 21:04:35 2010 (r206504) +++ stable/7/usr.bin/indent/indent_globs.h Mon Apr 12 21:05:36 2010 (r206505) @@ -204,6 +204,8 @@ int function_brace_split; /* split f * brace onto separate lines */ int use_tabs; /* set true to use tabs for spacing, * false uses all spaces */ +int auto_typedefs; /* set true to recognize identifiers + * ending in "_t" like typedefs */ /* -troff font state information */ Modified: stable/7/usr.bin/indent/lexi.c ============================================================================== --- stable/7/usr.bin/indent/lexi.c Mon Apr 12 21:04:35 2010 (r206504) +++ stable/7/usr.bin/indent/lexi.c Mon Apr 12 21:05:36 2010 (r206505) @@ -249,6 +249,17 @@ lexi(void) last_code = ident; /* Remember that this is the code we will * return */ + if (auto_typedefs) { + const char *q = s_token; + /* Check if we have an "_t" in the end */ + if (q[0] && q[1] && + (strcmp(q + strlen(q) - 2, "_t") == 0)) { + ps.its_a_keyword = true; + ps.last_u_d = true; + goto found_auto_typedef; + } + } + /* * This loop will check if the token is a keyword. */ @@ -285,6 +296,7 @@ lexi(void) /* FALLTHROUGH */ case 4: /* one of the declaration keywords */ + found_auto_typedef: if (ps.p_l_follow) { ps.cast_mask |= (1 << ps.p_l_follow) & ~ps.sizeof_mask; break; /* inside parens: cast, param list or sizeof */ From owner-svn-src-stable@FreeBSD.ORG Mon Apr 12 21:07:58 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDCB7106564A; Mon, 12 Apr 2010 21:07:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC7578FC13; Mon, 12 Apr 2010 21:07:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3CL7whX040755; Mon, 12 Apr 2010 21:07:58 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CL7wFF040753; Mon, 12 Apr 2010 21:07:58 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004122107.o3CL7wFF040753@svn.freebsd.org> From: Andriy Gapon Date: Mon, 12 Apr 2010 21:07:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206506 - stable/8/sys/ufs/ffs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2010 21:07:58 -0000 Author: avg Date: Mon Apr 12 21:07:58 2010 New Revision: 206506 URL: http://svn.freebsd.org/changeset/base/206506 Log: MFC r206128: ffs_mount: remove redundant assignment of to devvp.v_bufobj Modified: stable/8/sys/ufs/ffs/ffs_vfsops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/8/sys/ufs/ffs/ffs_vfsops.c Mon Apr 12 21:05:36 2010 (r206505) +++ stable/8/sys/ufs/ffs/ffs_vfsops.c Mon Apr 12 21:07:58 2010 (r206506) @@ -650,7 +650,6 @@ ffs_mountfs(devvp, mp, td) if (mp->mnt_iosize_max > MAXPHYS) mp->mnt_iosize_max = MAXPHYS; - devvp->v_bufobj.bo_private = cp; devvp->v_bufobj.bo_ops = &ffs_ops; fs = NULL; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 12 21:09:13 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D2B11065672; Mon, 12 Apr 2010 21:09:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7BC928FC16; Mon, 12 Apr 2010 21:09:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3CL9Dq9041072; Mon, 12 Apr 2010 21:09:13 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CL9D4p041070; Mon, 12 Apr 2010 21:09:13 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004122109.o3CL9D4p041070@svn.freebsd.org> From: Andriy Gapon Date: Mon, 12 Apr 2010 21:09:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206507 - stable/7/sys/ufs/ffs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2010 21:09:13 -0000 Author: avg Date: Mon Apr 12 21:09:13 2010 New Revision: 206507 URL: http://svn.freebsd.org/changeset/base/206507 Log: MFC r206128: ffs_mount: remove redundant assignment to devvp.v_bufobj Modified: stable/7/sys/ufs/ffs/ffs_vfsops.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/7/sys/ufs/ffs/ffs_vfsops.c Mon Apr 12 21:07:58 2010 (r206506) +++ stable/7/sys/ufs/ffs/ffs_vfsops.c Mon Apr 12 21:09:13 2010 (r206507) @@ -649,7 +649,6 @@ ffs_mountfs(devvp, mp, td) if (mp->mnt_iosize_max > MAXPHYS) mp->mnt_iosize_max = MAXPHYS; - devvp->v_bufobj.bo_private = cp; devvp->v_bufobj.bo_ops = &ffs_ops; fs = NULL; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 12 21:12:03 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74DA7106566C; Mon, 12 Apr 2010 21:12:03 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 634AA8FC08; Mon, 12 Apr 2010 21:12:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3CLC39Y041796; Mon, 12 Apr 2010 21:12:03 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CLC30K041793; Mon, 12 Apr 2010 21:12:03 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004122112.o3CLC30K041793@svn.freebsd.org> From: Andriy Gapon Date: Mon, 12 Apr 2010 21:12:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206508 - stable/8/lib/libc/db/hash X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2010 21:12:03 -0000 Author: avg Date: Mon Apr 12 21:12:03 2010 New Revision: 206508 URL: http://svn.freebsd.org/changeset/base/206508 Log: MFC r206178: ibc/db/hash: cap auto-tuned block size Modified: stable/8/lib/libc/db/hash/hash.c stable/8/lib/libc/db/hash/hash.h Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/db/hash/hash.c ============================================================================== --- stable/8/lib/libc/db/hash/hash.c Mon Apr 12 21:09:13 2010 (r206507) +++ stable/8/lib/libc/db/hash/hash.c Mon Apr 12 21:12:03 2010 (r206508) @@ -293,6 +293,8 @@ init_hash(HTAB *hashp, const char *file, if (stat(file, &statbuf)) return (NULL); hashp->BSIZE = statbuf.st_blksize; + if (hashp->BSIZE > MAX_BSIZE) + hashp->BSIZE = MAX_BSIZE; hashp->BSHIFT = __log2(hashp->BSIZE); } Modified: stable/8/lib/libc/db/hash/hash.h ============================================================================== --- stable/8/lib/libc/db/hash/hash.h Mon Apr 12 21:09:13 2010 (r206507) +++ stable/8/lib/libc/db/hash/hash.h Mon Apr 12 21:12:03 2010 (r206508) @@ -118,7 +118,7 @@ typedef struct htab { /* Memory reside /* * Constants */ -#define MAX_BSIZE 65536 /* 2^16 */ +#define MAX_BSIZE 32768 /* 2^15 but should be 65536 */ #define MIN_BUFFERS 6 #define MINHDRSIZE 512 #define DEF_BUFSIZE 65536 /* 64 K */ From owner-svn-src-stable@FreeBSD.ORG Mon Apr 12 21:13:03 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68C2A106566C; Mon, 12 Apr 2010 21:13:03 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 577E78FC1C; Mon, 12 Apr 2010 21:13:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3CLD31W042075; Mon, 12 Apr 2010 21:13:03 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CLD3ht042072; Mon, 12 Apr 2010 21:13:03 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004122113.o3CLD3ht042072@svn.freebsd.org> From: Andriy Gapon Date: Mon, 12 Apr 2010 21:13:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206509 - stable/7/lib/libc/db/hash X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2010 21:13:03 -0000 Author: avg Date: Mon Apr 12 21:13:03 2010 New Revision: 206509 URL: http://svn.freebsd.org/changeset/base/206509 Log: MFC r206178: ibc/db/hash: cap auto-tuned block size Modified: stable/7/lib/libc/db/hash/hash.c stable/7/lib/libc/db/hash/hash.h Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/db/hash/hash.c ============================================================================== --- stable/7/lib/libc/db/hash/hash.c Mon Apr 12 21:12:03 2010 (r206508) +++ stable/7/lib/libc/db/hash/hash.c Mon Apr 12 21:13:03 2010 (r206509) @@ -309,6 +309,8 @@ init_hash(hashp, file, info) if (stat(file, &statbuf)) return (NULL); hashp->BSIZE = statbuf.st_blksize; + if (hashp->BSIZE > MAX_BSIZE) + hashp->BSIZE = MAX_BSIZE; hashp->BSHIFT = __log2(hashp->BSIZE); } Modified: stable/7/lib/libc/db/hash/hash.h ============================================================================== --- stable/7/lib/libc/db/hash/hash.h Mon Apr 12 21:12:03 2010 (r206508) +++ stable/7/lib/libc/db/hash/hash.h Mon Apr 12 21:13:03 2010 (r206509) @@ -118,7 +118,7 @@ typedef struct htab { /* Memory reside /* * Constants */ -#define MAX_BSIZE 65536 /* 2^16 */ +#define MAX_BSIZE 32768 /* 2^15 but should be 65536 */ #define MIN_BUFFERS 6 #define MINHDRSIZE 512 #define DEF_BUFSIZE 65536 /* 64 K */ From owner-svn-src-stable@FreeBSD.ORG Mon Apr 12 21:18:58 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E24741065677; Mon, 12 Apr 2010 21:18:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B63FE8FC1D; Mon, 12 Apr 2010 21:18:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3CLIwrc043475; Mon, 12 Apr 2010 21:18:58 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CLIw5R043473; Mon, 12 Apr 2010 21:18:58 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004122118.o3CLIw5R043473@svn.freebsd.org> From: Andriy Gapon Date: Mon, 12 Apr 2010 21:18:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206510 - stable/8/share/examples/indent X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2010 21:18:59 -0000 Author: avg Date: Mon Apr 12 21:18:58 2010 New Revision: 206510 URL: http://svn.freebsd.org/changeset/base/206510 Log: MFC r206102,206103,206175,206176: add example indent.pro file Added: stable/8/share/examples/indent/ - copied from r206102, head/share/examples/indent/ Modified: stable/8/share/examples/indent/indent.pro Directory Properties: stable/8/share/examples/ (props changed) Modified: stable/8/share/examples/indent/indent.pro ============================================================================== --- head/share/examples/indent/indent.pro Fri Apr 2 16:06:46 2010 (r206102) +++ stable/8/share/examples/indent/indent.pro Mon Apr 12 21:18:58 2010 (r206510) @@ -1,122 +1,11 @@ -TFILE --T__sighandler_t --Tblist_t --Tblmeta_t --Tboolean_t --Tbus_addr_t --Tbus_dma_segment_t --Tbus_dma_tag_t --Tbus_dmamap_t --Tbus_size_t --Tbus_space_handle_t --Tc_db_sym_t --Tc_linker_sym_t --Tcaddr_t --Tclock_t --Tcomp_t --Tctor_t --Td_close_t --Td_ioctl_t --Td_open_t --Td_thread_t --Tdaddr_t --Tdb_addr_t --Tdb_expr_t --Tdb_sym_t --Tdev_t --Tdevice_t --Tdriver_intr_t --Tdriver_t --Tdumper_t --Telf_file_t -Tfd_mask -Tfd_set --Tfixpt_t --Tgid_t --Tin_addr_t --Tino_t --Tint16_t --Tint32_t --Tint64_t --Tint8_t --Tintmax_t --Tintptr_t --Tkey_t --Tkobj_class_t --Tkobj_t --Tlinker_file_t -Tlinker_sym_tT --Tlinker_symval_t --Tmode_t --Tmodeventhand_t --Tmodeventtype_t --Tmodspecific_t --Tmoduledata_t --Tnetisr_t --Tng_ID_t --Tnlink_t --Toff_t --Tpd_entry_t --Tpid_t --Tpmap_t --Tpoll_handler_t --Tpps_params_t --Tprfpregset_t --Tprpsinfo_t --Tprstatus_t --Tpt_entry_t --Tqaddr_t --Tquad_t --Tregister_t --Trlim_t --Tsa_family_t --Tsemid_t --Tsiginfo_t --Tsigset_t --Tsize_t --Tsocklen_t --Tspeed_t --Tssize_t --Tstack_t --Tsy_call_t --Tsysinit_cfunc_t --Ttime_t -Tu_char --Tu_daddr_t -Tu_int --Tu_int16_t --Tu_int32_t --Tu_int64_t --Tu_int8_t -Tu_long --Tu_quad_t -Tu_short --Tudev_t --Tufs1_daddr_t --Tufs2_daddr_t --Tuid_t --Tuint16_t --Tuint32_t --Tuint64_t --Tuint8_t --Tuintfptr_t --Tuintmax_t --Tuintptr_t --Tuma_slab_t --Tuma_zone_t --Tuoff_t --Tv_caddr_t --Tvaddr_t --Tvm_map_t --Tvm_object_t --Tvm_offset_t --Tvm_ooffset_t --Tvm_paddr_t --Tvm_page_t --Tvm_pindex_t --Tvm_size_t --Tvop_t --Txdrproc_t -TTAILQ_HEAD -TTAILQ_ENTRY -TLIST_HEAD @@ -125,5 +14,33 @@ -TSTAILQ_ENTRY -TSLIST_HEAD -TSLIST_ENTRY --bad -bap -nbbb -nbc -br -nbs -c41 -cd41 -cdb -ce -ci4 -cli0 -d0 -di8 -ndj --ei -nfc1 -nfcb -i8 -ip8 -l79 -lc77 -ldi0 -nlp -npcs -psl -sc -nsob -nv +-bad +-bap +-nbbb +-nbc +-br +-nbs +-c41 +-cd41 +-cdb +-ce +-ci4 +-cli0 +-d0 +-di8 +-ndj +-ei +-nfc1 +-nfcb +-i8 +-ip8 +-l79 +-lc77 +-ldi0 +-nlp +-npcs +-psl +-sc +-nsob +-ta +-nv From owner-svn-src-stable@FreeBSD.ORG Mon Apr 12 21:29:04 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2B01106564A; Mon, 12 Apr 2010 21:29:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 969818FC1B; Mon, 12 Apr 2010 21:29:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3CLT4J3045871; Mon, 12 Apr 2010 21:29:04 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CLT4nE045869; Mon, 12 Apr 2010 21:29:04 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004122129.o3CLT4nE045869@svn.freebsd.org> From: Andriy Gapon Date: Mon, 12 Apr 2010 21:29:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206511 - stable/7/share/examples/indent X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2010 21:29:04 -0000 Author: avg Date: Mon Apr 12 21:29:04 2010 New Revision: 206511 URL: http://svn.freebsd.org/changeset/base/206511 Log: MFC r206102,206103,206175,206176: add example indent.pro file Added: stable/7/share/examples/indent/ - copied from r206102, head/share/examples/indent/ Modified: stable/7/share/examples/indent/indent.pro Directory Properties: stable/7/share/examples/ (props changed) Modified: stable/7/share/examples/indent/indent.pro ============================================================================== --- head/share/examples/indent/indent.pro Fri Apr 2 16:06:46 2010 (r206102) +++ stable/7/share/examples/indent/indent.pro Mon Apr 12 21:29:04 2010 (r206511) @@ -1,122 +1,11 @@ -TFILE --T__sighandler_t --Tblist_t --Tblmeta_t --Tboolean_t --Tbus_addr_t --Tbus_dma_segment_t --Tbus_dma_tag_t --Tbus_dmamap_t --Tbus_size_t --Tbus_space_handle_t --Tc_db_sym_t --Tc_linker_sym_t --Tcaddr_t --Tclock_t --Tcomp_t --Tctor_t --Td_close_t --Td_ioctl_t --Td_open_t --Td_thread_t --Tdaddr_t --Tdb_addr_t --Tdb_expr_t --Tdb_sym_t --Tdev_t --Tdevice_t --Tdriver_intr_t --Tdriver_t --Tdumper_t --Telf_file_t -Tfd_mask -Tfd_set --Tfixpt_t --Tgid_t --Tin_addr_t --Tino_t --Tint16_t --Tint32_t --Tint64_t --Tint8_t --Tintmax_t --Tintptr_t --Tkey_t --Tkobj_class_t --Tkobj_t --Tlinker_file_t -Tlinker_sym_tT --Tlinker_symval_t --Tmode_t --Tmodeventhand_t --Tmodeventtype_t --Tmodspecific_t --Tmoduledata_t --Tnetisr_t --Tng_ID_t --Tnlink_t --Toff_t --Tpd_entry_t --Tpid_t --Tpmap_t --Tpoll_handler_t --Tpps_params_t --Tprfpregset_t --Tprpsinfo_t --Tprstatus_t --Tpt_entry_t --Tqaddr_t --Tquad_t --Tregister_t --Trlim_t --Tsa_family_t --Tsemid_t --Tsiginfo_t --Tsigset_t --Tsize_t --Tsocklen_t --Tspeed_t --Tssize_t --Tstack_t --Tsy_call_t --Tsysinit_cfunc_t --Ttime_t -Tu_char --Tu_daddr_t -Tu_int --Tu_int16_t --Tu_int32_t --Tu_int64_t --Tu_int8_t -Tu_long --Tu_quad_t -Tu_short --Tudev_t --Tufs1_daddr_t --Tufs2_daddr_t --Tuid_t --Tuint16_t --Tuint32_t --Tuint64_t --Tuint8_t --Tuintfptr_t --Tuintmax_t --Tuintptr_t --Tuma_slab_t --Tuma_zone_t --Tuoff_t --Tv_caddr_t --Tvaddr_t --Tvm_map_t --Tvm_object_t --Tvm_offset_t --Tvm_ooffset_t --Tvm_paddr_t --Tvm_page_t --Tvm_pindex_t --Tvm_size_t --Tvop_t --Txdrproc_t -TTAILQ_HEAD -TTAILQ_ENTRY -TLIST_HEAD @@ -125,5 +14,33 @@ -TSTAILQ_ENTRY -TSLIST_HEAD -TSLIST_ENTRY --bad -bap -nbbb -nbc -br -nbs -c41 -cd41 -cdb -ce -ci4 -cli0 -d0 -di8 -ndj --ei -nfc1 -nfcb -i8 -ip8 -l79 -lc77 -ldi0 -nlp -npcs -psl -sc -nsob -nv +-bad +-bap +-nbbb +-nbc +-br +-nbs +-c41 +-cd41 +-cdb +-ce +-ci4 +-cli0 +-d0 +-di8 +-ndj +-ei +-nfc1 +-nfcb +-i8 +-ip8 +-l79 +-lc77 +-ldi0 +-nlp +-npcs +-psl +-sc +-nsob +-ta +-nv From owner-svn-src-stable@FreeBSD.ORG Mon Apr 12 21:37:28 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B825E106564A; Mon, 12 Apr 2010 21:37:28 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5D448FC13; Mon, 12 Apr 2010 21:37:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3CLbSLF047826; Mon, 12 Apr 2010 21:37:28 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CLbSB1047821; Mon, 12 Apr 2010 21:37:28 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201004122137.o3CLbSB1047821@svn.freebsd.org> From: Fabien Thomas Date: Mon, 12 Apr 2010 21:37:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206513 - stable/8/usr.sbin/pmcstat X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2010 21:37:28 -0000 Author: fabient Date: Mon Apr 12 21:37:28 2010 New Revision: 206513 URL: http://svn.freebsd.org/changeset/base/206513 Log: MFC r206090: Improve "top" header by: - Display sample received per PMCs (or merged PMCs). - Display percentage vs all samples Modified: stable/8/usr.sbin/pmcstat/pmcpl_callgraph.c stable/8/usr.sbin/pmcstat/pmcpl_calltree.c stable/8/usr.sbin/pmcstat/pmcstat_log.c stable/8/usr.sbin/pmcstat/pmcstat_log.h Directory Properties: stable/8/usr.sbin/pmcstat/ (props changed) Modified: stable/8/usr.sbin/pmcstat/pmcpl_callgraph.c ============================================================================== --- stable/8/usr.sbin/pmcstat/pmcpl_callgraph.c Mon Apr 12 21:33:06 2010 (r206512) +++ stable/8/usr.sbin/pmcstat/pmcpl_callgraph.c Mon Apr 12 21:37:28 2010 (r206513) @@ -341,6 +341,7 @@ pmcpl_cg_process(struct pmcstat_process parent = pmcstat_cgnode_hash_lookup_pc(pp, pmcid, pc, usermode); if (parent == NULL) { pmcstat_stats.ps_callchain_dubious_frames++; + pmcr->pr_dubious_frames++; return; } Modified: stable/8/usr.sbin/pmcstat/pmcpl_calltree.c ============================================================================== --- stable/8/usr.sbin/pmcstat/pmcpl_calltree.c Mon Apr 12 21:33:06 2010 (r206512) +++ stable/8/usr.sbin/pmcstat/pmcpl_calltree.c Mon Apr 12 21:37:28 2010 (r206513) @@ -403,6 +403,10 @@ pmcpl_ct_node_dumptop(int pmcin, struct &pmcin, pmcpl_ct_arc_compare); for (i = 0; i < ct->pct_narc; i++) { + /* Skip this arc if there is no sample at all. */ + if (PMCPL_CT_SAMPLE(pmcin, + &ct->pct_arc[i].pcta_samples) == 0) + continue; if (PMCPL_CT_SAMPLEP(pmcin, &ct->pct_arc[i].pcta_samples) > pmcstat_threshold) { if (pmcpl_ct_node_dumptop(pmcin, @@ -516,6 +520,10 @@ pmcpl_ct_topdisplay(void) x = y = 0; for (i = 0; i < pmcpl_ct_root->pct_narc; i++) { + /* Skip this arc if there is no sample at all. */ + if (PMCPL_CT_SAMPLE(pmcin, + &pmcpl_ct_root->pct_arc[i].pcta_samples) == 0) + continue; if (pmcpl_ct_node_dumptop(pmcin, pmcpl_ct_root->pct_arc[i].pcta_child, &rsamples, x, &y, pmcstat_displayheight - 2)) { @@ -693,6 +701,7 @@ pmcpl_ct_process(struct pmcstat_process } if (n-- == 0) { pmcstat_stats.ps_callchain_dubious_frames++; + pmcr->pr_dubious_frames++; return; } Modified: stable/8/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- stable/8/usr.sbin/pmcstat/pmcstat_log.c Mon Apr 12 21:33:06 2010 (r206512) +++ stable/8/usr.sbin/pmcstat/pmcstat_log.c Mon Apr 12 21:37:28 2010 (r206513) @@ -247,6 +247,7 @@ static int pmcstat_string_compute_hash(c static void pmcstat_string_initialize(void); static int pmcstat_string_lookup_hash(pmcstat_interned_string _is); static void pmcstat_string_shutdown(void); +static void pmcstat_stats_reset(void); /* * A simple implementation of interned strings. Each interned string @@ -274,6 +275,21 @@ int pmcstat_npmcs; */ int pmcstat_pause; +static void +pmcstat_stats_reset(void) +{ + struct pmcstat_pmcrecord *pr; + + /* Flush PMCs stats. */ + LIST_FOREACH(pr, &pmcstat_pmcs, pr_next) { + pr->pr_samples = 0; + pr->pr_dubious_frames = 0; + } + + /* Flush global stats. */ + bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); +} + /* * Compute a 'hash' value for a string. */ @@ -1009,6 +1025,8 @@ pmcstat_pmcid_add(pmc_id_t pmcid, pmcsta pr->pr_pmcid = pmcid; pr->pr_pmcname = ps; pr->pr_pmcin = pmcstat_npmcs++; + pr->pr_samples = 0; + pr->pr_dubious_frames = 0; pr->pr_merge = prm == NULL ? pr : prm; LIST_INSERT_HEAD(&pmcstat_pmcs, pr, pr_next); @@ -1387,6 +1405,7 @@ pmcstat_analyze_log(void) /* Get PMC record. */ pmcr = pmcstat_lookup_pmcid(ev.pl_u.pl_s.pl_pmcid); assert(pmcr != NULL); + pmcr->pr_samples++; /* * Call the plugins processing @@ -1420,6 +1439,7 @@ pmcstat_analyze_log(void) /* Get PMC record. */ pmcr = pmcstat_lookup_pmcid(ev.pl_u.pl_cc.pl_pmcid); assert(pmcr != NULL); + pmcr->pr_samples++; /* * Call the plugins processing @@ -1787,32 +1807,46 @@ pmcstat_process_log(void) static void pmcstat_refresh_top(void) { + int v_attrs; + float v; char pmcname[40]; - const char *s; + struct pmcstat_pmcrecord *pmcpr; /* If in pause mode do not refresh display. */ if (pmcstat_pause) return; /* Wait until PMC pop in the log. */ - s = pmcstat_pmcindex_to_name(pmcstat_pmcinfilter); - if (s == NULL) + pmcpr = pmcstat_pmcindex_to_pmcr(pmcstat_pmcinfilter); + if (pmcpr == NULL) return; /* Format PMC name. */ if (pmcstat_mergepmc) - snprintf(pmcname, sizeof(pmcname), "[%s]", s); + snprintf(pmcname, sizeof(pmcname), "[%s]", + pmcstat_string_unintern(pmcpr->pr_pmcname)); else snprintf(pmcname, sizeof(pmcname), "%s.%d", - s, pmcstat_pmcinfilter); + pmcstat_string_unintern(pmcpr->pr_pmcname), + pmcstat_pmcinfilter); + + /* Format samples count. */ + if (pmcstat_stats.ps_samples_total > 0) + v = (pmcpr->pr_samples * 100.0) / + pmcstat_stats.ps_samples_total; + else + v = 0.; + v_attrs = PMCSTAT_ATTRPERCENT(v); PMCSTAT_PRINTBEGIN(); - PMCSTAT_PRINTW("PMC: %s Samples: %u processed, %u invalid\n\n", + PMCSTAT_PRINTW("PMC: %s Samples: %u ", pmcname, - pmcstat_stats.ps_samples_total, - pmcstat_stats.ps_samples_unknown_offset + - pmcstat_stats.ps_samples_indeterminable + - pmcstat_stats.ps_callchain_dubious_frames); + pmcpr->pr_samples); + PMCSTAT_ATTRON(v_attrs); + PMCSTAT_PRINTW("(%.1f%%) ", v); + PMCSTAT_ATTROFF(v_attrs); + PMCSTAT_PRINTW(", %u unresolved\n\n", + pmcpr->pr_dubious_frames); if (plugins[args.pa_plugin].pl_topdisplay != NULL) plugins[args.pa_plugin].pl_topdisplay(); PMCSTAT_PRINTEND(); @@ -1879,7 +1913,7 @@ pmcstat_keypress_log(void) */ if (plugins[args.pa_plugin].pl_shutdown != NULL) plugins[args.pa_plugin].pl_shutdown(NULL); - bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); + pmcstat_stats_reset(); if (plugins[args.pa_plugin].pl_init != NULL) plugins[args.pa_plugin].pl_init(); @@ -1900,7 +1934,7 @@ pmcstat_keypress_log(void) } while (plugins[args.pa_plugin].pl_topdisplay == NULL); /* Open new plugin. */ - bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); + pmcstat_stats_reset(); if (plugins[args.pa_plugin].pl_init != NULL) plugins[args.pa_plugin].pl_init(); wprintw(w, "switching to plugin %s", @@ -1949,7 +1983,7 @@ pmcstat_display_log(void) if (args.pa_topmode == PMCSTAT_TOP_DELTA) { if (plugins[args.pa_plugin].pl_shutdown != NULL) plugins[args.pa_plugin].pl_shutdown(NULL); - bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); + pmcstat_stats_reset(); if (plugins[args.pa_plugin].pl_init != NULL) plugins[args.pa_plugin].pl_init(); } Modified: stable/8/usr.sbin/pmcstat/pmcstat_log.h ============================================================================== --- stable/8/usr.sbin/pmcstat/pmcstat_log.h Mon Apr 12 21:33:06 2010 (r206512) +++ stable/8/usr.sbin/pmcstat/pmcstat_log.h Mon Apr 12 21:37:28 2010 (r206513) @@ -146,6 +146,8 @@ struct pmcstat_pmcrecord { pmc_id_t pr_pmcid; int pr_pmcin; pmcstat_interned_string pr_pmcname; + int pr_samples; + int pr_dubious_frames; struct pmcstat_pmcrecord *pr_merge; }; extern LIST_HEAD(pmcstat_pmcs, pmcstat_pmcrecord) pmcstat_pmcs; /* PMC list */ From owner-svn-src-stable@FreeBSD.ORG Mon Apr 12 21:42:01 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92A64106566C; Mon, 12 Apr 2010 21:42:01 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 805A88FC08; Mon, 12 Apr 2010 21:42:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3CLg1qp048874; Mon, 12 Apr 2010 21:42:01 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CLg1LI048869; Mon, 12 Apr 2010 21:42:01 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201004122142.o3CLg1LI048869@svn.freebsd.org> From: Fabien Thomas Date: Mon, 12 Apr 2010 21:42:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206514 - stable/7/usr.sbin/pmcstat X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2010 21:42:01 -0000 Author: fabient Date: Mon Apr 12 21:42:01 2010 New Revision: 206514 URL: http://svn.freebsd.org/changeset/base/206514 Log: MFC r206090: Improve "top" header by: - Display sample received per PMCs (or merged PMCs). - Display percentage vs all samples Modified: stable/7/usr.sbin/pmcstat/pmcpl_callgraph.c stable/7/usr.sbin/pmcstat/pmcpl_calltree.c stable/7/usr.sbin/pmcstat/pmcstat_log.c stable/7/usr.sbin/pmcstat/pmcstat_log.h Directory Properties: stable/7/usr.sbin/pmcstat/ (props changed) Modified: stable/7/usr.sbin/pmcstat/pmcpl_callgraph.c ============================================================================== --- stable/7/usr.sbin/pmcstat/pmcpl_callgraph.c Mon Apr 12 21:37:28 2010 (r206513) +++ stable/7/usr.sbin/pmcstat/pmcpl_callgraph.c Mon Apr 12 21:42:01 2010 (r206514) @@ -341,6 +341,7 @@ pmcpl_cg_process(struct pmcstat_process parent = pmcstat_cgnode_hash_lookup_pc(pp, pmcid, pc, usermode); if (parent == NULL) { pmcstat_stats.ps_callchain_dubious_frames++; + pmcr->pr_dubious_frames++; return; } Modified: stable/7/usr.sbin/pmcstat/pmcpl_calltree.c ============================================================================== --- stable/7/usr.sbin/pmcstat/pmcpl_calltree.c Mon Apr 12 21:37:28 2010 (r206513) +++ stable/7/usr.sbin/pmcstat/pmcpl_calltree.c Mon Apr 12 21:42:01 2010 (r206514) @@ -403,6 +403,10 @@ pmcpl_ct_node_dumptop(int pmcin, struct &pmcin, pmcpl_ct_arc_compare); for (i = 0; i < ct->pct_narc; i++) { + /* Skip this arc if there is no sample at all. */ + if (PMCPL_CT_SAMPLE(pmcin, + &ct->pct_arc[i].pcta_samples) == 0) + continue; if (PMCPL_CT_SAMPLEP(pmcin, &ct->pct_arc[i].pcta_samples) > pmcstat_threshold) { if (pmcpl_ct_node_dumptop(pmcin, @@ -516,6 +520,10 @@ pmcpl_ct_topdisplay(void) x = y = 0; for (i = 0; i < pmcpl_ct_root->pct_narc; i++) { + /* Skip this arc if there is no sample at all. */ + if (PMCPL_CT_SAMPLE(pmcin, + &pmcpl_ct_root->pct_arc[i].pcta_samples) == 0) + continue; if (pmcpl_ct_node_dumptop(pmcin, pmcpl_ct_root->pct_arc[i].pcta_child, &rsamples, x, &y, pmcstat_displayheight - 2)) { @@ -693,6 +701,7 @@ pmcpl_ct_process(struct pmcstat_process } if (n-- == 0) { pmcstat_stats.ps_callchain_dubious_frames++; + pmcr->pr_dubious_frames++; return; } Modified: stable/7/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- stable/7/usr.sbin/pmcstat/pmcstat_log.c Mon Apr 12 21:37:28 2010 (r206513) +++ stable/7/usr.sbin/pmcstat/pmcstat_log.c Mon Apr 12 21:42:01 2010 (r206514) @@ -247,6 +247,7 @@ static int pmcstat_string_compute_hash(c static void pmcstat_string_initialize(void); static int pmcstat_string_lookup_hash(pmcstat_interned_string _is); static void pmcstat_string_shutdown(void); +static void pmcstat_stats_reset(void); /* * A simple implementation of interned strings. Each interned string @@ -274,6 +275,21 @@ int pmcstat_npmcs; */ int pmcstat_pause; +static void +pmcstat_stats_reset(void) +{ + struct pmcstat_pmcrecord *pr; + + /* Flush PMCs stats. */ + LIST_FOREACH(pr, &pmcstat_pmcs, pr_next) { + pr->pr_samples = 0; + pr->pr_dubious_frames = 0; + } + + /* Flush global stats. */ + bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); +} + /* * Compute a 'hash' value for a string. */ @@ -1009,6 +1025,8 @@ pmcstat_pmcid_add(pmc_id_t pmcid, pmcsta pr->pr_pmcid = pmcid; pr->pr_pmcname = ps; pr->pr_pmcin = pmcstat_npmcs++; + pr->pr_samples = 0; + pr->pr_dubious_frames = 0; pr->pr_merge = prm == NULL ? pr : prm; LIST_INSERT_HEAD(&pmcstat_pmcs, pr, pr_next); @@ -1387,6 +1405,7 @@ pmcstat_analyze_log(void) /* Get PMC record. */ pmcr = pmcstat_lookup_pmcid(ev.pl_u.pl_s.pl_pmcid); assert(pmcr != NULL); + pmcr->pr_samples++; /* * Call the plugins processing @@ -1420,6 +1439,7 @@ pmcstat_analyze_log(void) /* Get PMC record. */ pmcr = pmcstat_lookup_pmcid(ev.pl_u.pl_cc.pl_pmcid); assert(pmcr != NULL); + pmcr->pr_samples++; /* * Call the plugins processing @@ -1787,32 +1807,46 @@ pmcstat_process_log(void) static void pmcstat_refresh_top(void) { + int v_attrs; + float v; char pmcname[40]; - const char *s; + struct pmcstat_pmcrecord *pmcpr; /* If in pause mode do not refresh display. */ if (pmcstat_pause) return; /* Wait until PMC pop in the log. */ - s = pmcstat_pmcindex_to_name(pmcstat_pmcinfilter); - if (s == NULL) + pmcpr = pmcstat_pmcindex_to_pmcr(pmcstat_pmcinfilter); + if (pmcpr == NULL) return; /* Format PMC name. */ if (pmcstat_mergepmc) - snprintf(pmcname, sizeof(pmcname), "[%s]", s); + snprintf(pmcname, sizeof(pmcname), "[%s]", + pmcstat_string_unintern(pmcpr->pr_pmcname)); else snprintf(pmcname, sizeof(pmcname), "%s.%d", - s, pmcstat_pmcinfilter); + pmcstat_string_unintern(pmcpr->pr_pmcname), + pmcstat_pmcinfilter); + + /* Format samples count. */ + if (pmcstat_stats.ps_samples_total > 0) + v = (pmcpr->pr_samples * 100.0) / + pmcstat_stats.ps_samples_total; + else + v = 0.; + v_attrs = PMCSTAT_ATTRPERCENT(v); PMCSTAT_PRINTBEGIN(); - PMCSTAT_PRINTW("PMC: %s Samples: %u processed, %u invalid\n\n", + PMCSTAT_PRINTW("PMC: %s Samples: %u ", pmcname, - pmcstat_stats.ps_samples_total, - pmcstat_stats.ps_samples_unknown_offset + - pmcstat_stats.ps_samples_indeterminable + - pmcstat_stats.ps_callchain_dubious_frames); + pmcpr->pr_samples); + PMCSTAT_ATTRON(v_attrs); + PMCSTAT_PRINTW("(%.1f%%) ", v); + PMCSTAT_ATTROFF(v_attrs); + PMCSTAT_PRINTW(", %u unresolved\n\n", + pmcpr->pr_dubious_frames); if (plugins[args.pa_plugin].pl_topdisplay != NULL) plugins[args.pa_plugin].pl_topdisplay(); PMCSTAT_PRINTEND(); @@ -1879,7 +1913,7 @@ pmcstat_keypress_log(void) */ if (plugins[args.pa_plugin].pl_shutdown != NULL) plugins[args.pa_plugin].pl_shutdown(NULL); - bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); + pmcstat_stats_reset(); if (plugins[args.pa_plugin].pl_init != NULL) plugins[args.pa_plugin].pl_init(); @@ -1900,7 +1934,7 @@ pmcstat_keypress_log(void) } while (plugins[args.pa_plugin].pl_topdisplay == NULL); /* Open new plugin. */ - bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); + pmcstat_stats_reset(); if (plugins[args.pa_plugin].pl_init != NULL) plugins[args.pa_plugin].pl_init(); wprintw(w, "switching to plugin %s", @@ -1949,7 +1983,7 @@ pmcstat_display_log(void) if (args.pa_topmode == PMCSTAT_TOP_DELTA) { if (plugins[args.pa_plugin].pl_shutdown != NULL) plugins[args.pa_plugin].pl_shutdown(NULL); - bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); + pmcstat_stats_reset(); if (plugins[args.pa_plugin].pl_init != NULL) plugins[args.pa_plugin].pl_init(); } Modified: stable/7/usr.sbin/pmcstat/pmcstat_log.h ============================================================================== --- stable/7/usr.sbin/pmcstat/pmcstat_log.h Mon Apr 12 21:37:28 2010 (r206513) +++ stable/7/usr.sbin/pmcstat/pmcstat_log.h Mon Apr 12 21:42:01 2010 (r206514) @@ -146,6 +146,8 @@ struct pmcstat_pmcrecord { pmc_id_t pr_pmcid; int pr_pmcin; pmcstat_interned_string pr_pmcname; + int pr_samples; + int pr_dubious_frames; struct pmcstat_pmcrecord *pr_merge; }; extern LIST_HEAD(pmcstat_pmcs, pmcstat_pmcrecord) pmcstat_pmcs; /* PMC list */ From owner-svn-src-stable@FreeBSD.ORG Tue Apr 13 00:20:40 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EDC81065686; Tue, 13 Apr 2010 00:20:40 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E7EF8FC15; Tue, 13 Apr 2010 00:20:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3D0Kecb085190; Tue, 13 Apr 2010 00:20:40 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D0Ke20085188; Tue, 13 Apr 2010 00:20:40 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201004130020.o3D0Ke20085188@svn.freebsd.org> From: Ed Maste Date: Tue, 13 Apr 2010 00:20:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206533 - stable/7/sys/dev/aac X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 00:20:40 -0000 Author: emaste Date: Tue Apr 13 00:20:40 2010 New Revision: 206533 URL: http://svn.freebsd.org/changeset/base/206533 Log: MFC r201758: Remove extraneous semicolons, no functional changes. Modified: stable/7/sys/dev/aac/aac.c Modified: stable/7/sys/dev/aac/aac.c ============================================================================== --- stable/7/sys/dev/aac/aac.c Mon Apr 12 23:47:29 2010 (r206532) +++ stable/7/sys/dev/aac/aac.c Tue Apr 13 00:20:40 2010 (r206533) @@ -530,7 +530,7 @@ aac_alloc(struct aac_softc *sc) 0, /* flags */ NULL, NULL, /* No locking needed */ &sc->aac_fib_dmat)) { - device_printf(sc->aac_dev, "can't allocate FIB DMA tag\n");; + device_printf(sc->aac_dev, "can't allocate FIB DMA tag\n"); return (ENOMEM); } From owner-svn-src-stable@FreeBSD.ORG Tue Apr 13 00:48:54 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8DF0106564A; Tue, 13 Apr 2010 00:48:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A6A688FC13; Tue, 13 Apr 2010 00:48:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3D0msJN091569; Tue, 13 Apr 2010 00:48:54 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D0msej091565; Tue, 13 Apr 2010 00:48:54 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004130048.o3D0msej091565@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Apr 2010 00:48:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206535 - in stable/8/usr.sbin: . dumpcis makefs makefs/ffs mfiutil rpcbind X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 00:48:54 -0000 Author: imp Date: Tue Apr 13 00:48:54 2010 New Revision: 206535 URL: http://svn.freebsd.org/changeset/base/206535 Log: MFC r203710: When you have multiple addresses on the same network on different interfaces (such as when you are part of a carp pool), and you run rpcbind -h to restrict which interfaces have rpc services, rpcbind can none-the-less return addresses that aren't in the -h list. This patch enforces the rule that when you specify -h on the command line, then services returned from rpcbind must be to one of the addresses listed in -h, or be a loopback address (since localhost is implicit when running -h). The root cause of this is the assumption in addrmerge that there can be only one interface that matches a given network IP address. This turns out not to be the case. To retain historical behavior, I didn't try to fix the routine to prefer the address that the request came into, since I didn't know the side effects that might cause in the normal case. My quick analysis suggests that it wouldn't be a problem, but since this code is tricky I opted for the more conservative patch of only restricting the reply when -h is in effect. Hence, this change will have no effect when you are running rpcbind without -h. Reviewed by: alfred@ Sponsored by: iX Systems MFC after: 2 weeks Modified: stable/8/usr.sbin/rpcbind/rpcbind.c stable/8/usr.sbin/rpcbind/rpcbind.h stable/8/usr.sbin/rpcbind/util.c Directory Properties: stable/8/usr.sbin/ (props changed) stable/8/usr.sbin/Makefile (props changed) stable/8/usr.sbin/acpi/ (props changed) stable/8/usr.sbin/arp/ (props changed) stable/8/usr.sbin/bsnmpd/ (props changed) stable/8/usr.sbin/burncd/ (props changed) stable/8/usr.sbin/cdcontrol/ (props changed) stable/8/usr.sbin/chown/ (props changed) stable/8/usr.sbin/cpucontrol/ (props changed) stable/8/usr.sbin/crashinfo/ (props changed) stable/8/usr.sbin/cron/ (props changed) stable/8/usr.sbin/crunch/examples/ (props changed) stable/8/usr.sbin/cxgbtool/ (props changed) stable/8/usr.sbin/diskinfo/ (props changed) stable/8/usr.sbin/dumpcis/cardinfo.h (props changed) stable/8/usr.sbin/dumpcis/cis.h (props changed) stable/8/usr.sbin/faithd/ (props changed) stable/8/usr.sbin/freebsd-update/ (props changed) stable/8/usr.sbin/inetd/ (props changed) stable/8/usr.sbin/iostat/ (props changed) stable/8/usr.sbin/jail/ (props changed) stable/8/usr.sbin/jls/ (props changed) stable/8/usr.sbin/lpr/ (props changed) stable/8/usr.sbin/makefs/ffs/ffs_bswap.c (props changed) stable/8/usr.sbin/makefs/ffs/ffs_subr.c (props changed) stable/8/usr.sbin/makefs/ffs/ufs_bswap.h (props changed) stable/8/usr.sbin/makefs/getid.c (props changed) stable/8/usr.sbin/mergemaster/ (props changed) stable/8/usr.sbin/mfiutil/mfiutil.8 (props changed) stable/8/usr.sbin/mptutil/ (props changed) stable/8/usr.sbin/ndp/ (props changed) stable/8/usr.sbin/newsyslog/ (props changed) stable/8/usr.sbin/ntp/ (props changed) stable/8/usr.sbin/pmcstat/ (props changed) stable/8/usr.sbin/powerd/ (props changed) stable/8/usr.sbin/ppp/ (props changed) stable/8/usr.sbin/pstat/ (props changed) stable/8/usr.sbin/rpc.umntall/ (props changed) stable/8/usr.sbin/rtsold/ (props changed) stable/8/usr.sbin/service/ (props changed) stable/8/usr.sbin/sysinstall/ (props changed) stable/8/usr.sbin/syslogd/ (props changed) stable/8/usr.sbin/traceroute/ (props changed) stable/8/usr.sbin/traceroute6/ (props changed) stable/8/usr.sbin/usbconfig/ (props changed) stable/8/usr.sbin/vidcontrol/ (props changed) stable/8/usr.sbin/wpa/ (props changed) stable/8/usr.sbin/ypserv/ (props changed) stable/8/usr.sbin/zic/ (props changed) Modified: stable/8/usr.sbin/rpcbind/rpcbind.c ============================================================================== --- stable/8/usr.sbin/rpcbind/rpcbind.c Tue Apr 13 00:33:07 2010 (r206534) +++ stable/8/usr.sbin/rpcbind/rpcbind.c Tue Apr 13 00:48:54 2010 (r206535) @@ -92,6 +92,7 @@ int oldstyle_local = 0; int verboselog = 0; char **hosts = NULL; +struct sockaddr **bound_sa; int ipv6_only = 0; int nhosts = 0; int on = 1; @@ -119,6 +120,7 @@ static void rbllist_add(rpcprog_t, rpcve struct netbuf *); static void terminate(int); static void parseargs(int, char *[]); +static void update_bound_sa(void); int main(int argc, char *argv[]) @@ -130,6 +132,8 @@ main(int argc, char *argv[]) parseargs(argc, argv); + update_bound_sa(); + /* Check that another rpcbind isn't already running. */ if ((rpcbindlockfd = (open(RPCBINDDLOCK, O_RDONLY|O_CREAT, 0444))) == -1) @@ -323,8 +327,7 @@ init_transport(struct netconfig *nconf) * If no hosts were specified, just bind to INADDR_ANY. * Otherwise make sure 127.0.0.1 is added to the list. */ - nhostsbak = nhosts; - nhostsbak++; + nhostsbak = nhosts + 1; hosts = realloc(hosts, nhostsbak * sizeof(char *)); if (nhostsbak == 1) hosts[0] = "*"; @@ -657,6 +660,75 @@ error: return (1); } +/* + * Create the list of addresses that we're bound to. Normally, this + * list is empty because we're listening on the wildcard address + * (nhost == 0). If -h is specified on the command line, then + * bound_sa will have a list of the addresses that the program binds + * to specifically. This function takes that list and converts them to + * struct sockaddr * and stores them in bound_sa. + */ +static void +update_bound_sa(void) +{ + struct addrinfo hints, *res = NULL; + int i; + + if (nhosts == 0) + return; + bound_sa = malloc(sizeof(*bound_sa) * nhosts); + memset(&hints, 0, sizeof(hints)); + hints.ai_family = PF_UNSPEC; + for (i = 0; i < nhosts; i++) { + if (getaddrinfo(hosts[i], NULL, &hints, &res) != 0) + continue; + bound_sa[i] = malloc(res->ai_addrlen); + memcpy(bound_sa[i], res->ai_addr, res->ai_addrlen); + } +} + +/* + * Match the sa against the list of addresses we've bound to. If + * we've not specifically bound to anything, we match everything. + * Otherwise, if the IPv4 or IPv6 address matches one of the addresses + * in bound_sa, we return true. If not, we return false. + */ +int +listen_addr(const struct sockaddr *sa) +{ + int i; + + /* + * If nhosts == 0, then there were no -h options on the + * command line, so all addresses are addresses we're + * listening to. + */ + if (nhosts == 0) + return 1; + for (i = 0; i < nhosts; i++) { + if (bound_sa[i] == NULL || + sa->sa_family != bound_sa[i]->sa_family) + continue; + switch (sa->sa_family) { + case AF_INET: + if (memcmp(&SA2SINADDR(sa), &SA2SINADDR(bound_sa[i]), + sizeof(struct in_addr)) == 0) + return (1); + break; +#ifdef INET6 + case AF_INET6: + if (memcmp(&SA2SIN6ADDR(sa), &SA2SIN6ADDR(bound_sa[i]), + sizeof(struct in6_addr)) == 0) + return (1); + break; +#endif + default: + break; + } + } + return (0); +} + static void rbllist_add(rpcprog_t prog, rpcvers_t vers, struct netconfig *nconf, struct netbuf *addr) Modified: stable/8/usr.sbin/rpcbind/rpcbind.h ============================================================================== --- stable/8/usr.sbin/rpcbind/rpcbind.h Tue Apr 13 00:33:07 2010 (r206534) +++ stable/8/usr.sbin/rpcbind/rpcbind.h Tue Apr 13 00:48:54 2010 (r206535) @@ -134,6 +134,7 @@ void read_warmstart(void); char *addrmerge(struct netbuf *caller, char *serv_uaddr, char *clnt_uaddr, char *netid); +int listen_addr(const struct sockaddr *sa); void network_init(void); struct sockaddr *local_sa(int); @@ -141,4 +142,12 @@ struct sockaddr *local_sa(int); #define RPCB_ALLVERS 0 #define RPCB_ONEVERS 1 +/* To convert a struct sockaddr to IPv4 or IPv6 address */ +#define SA2SIN(sa) ((struct sockaddr_in *)(sa)) +#define SA2SINADDR(sa) (SA2SIN(sa)->sin_addr) +#ifdef INET6 +#define SA2SIN6(sa) ((struct sockaddr_in6 *)(sa)) +#define SA2SIN6ADDR(sa) (SA2SIN6(sa)->sin6_addr) +#endif + #endif /* rpcbind_h */ Modified: stable/8/usr.sbin/rpcbind/util.c ============================================================================== --- stable/8/usr.sbin/rpcbind/util.c Tue Apr 13 00:33:07 2010 (r206534) +++ stable/8/usr.sbin/rpcbind/util.c Tue Apr 13 00:48:54 2010 (r206535) @@ -58,13 +58,6 @@ #include "rpcbind.h" -#define SA2SIN(sa) ((struct sockaddr_in *)(sa)) -#define SA2SINADDR(sa) (SA2SIN(sa)->sin_addr) -#ifdef INET6 -#define SA2SIN6(sa) ((struct sockaddr_in6 *)(sa)) -#define SA2SIN6ADDR(sa) (SA2SIN6(sa)->sin6_addr) -#endif - static struct sockaddr_in *local_in4; #ifdef INET6 static struct sockaddr_in6 *local_in6; @@ -176,9 +169,13 @@ addrmerge(struct netbuf *caller, char *s goto freeit; /* - * Loop through all interfaces. For each interface, see if the - * network portion of its address is equal to that of the client. - * If so, we have found the interface that we want to use. + * Loop through all interfaces. For each interface, see if it + * is either the loopback interface (which we always listen + * on) or is one of the addresses the program bound to (the + * wildcard by default, or a subset if -h is specified) and + * the network portion of its address is equal to that of the + * client. If so, we have found the interface that we want to + * use. */ bestif = NULL; for (ifap = ifp; ifap != NULL; ifap = ifap->ifa_next) { @@ -189,6 +186,9 @@ addrmerge(struct netbuf *caller, char *s !(ifap->ifa_flags & IFF_UP)) continue; + if (!(ifap->ifa_flags & IFF_LOOPBACK) && !listen_addr(ifsa)) + continue; + switch (hint_sa->sa_family) { case AF_INET: /* From owner-svn-src-stable@FreeBSD.ORG Tue Apr 13 00:57:55 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E1D8106566B; Tue, 13 Apr 2010 00:57:55 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 415F68FC08; Tue, 13 Apr 2010 00:57:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3D0vsm9093656; Tue, 13 Apr 2010 00:57:54 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D0vsZg093654; Tue, 13 Apr 2010 00:57:54 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004130057.o3D0vsZg093654@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Apr 2010 00:57:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206537 - stable/8/tools/tools/nanobsd X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 00:57:55 -0000 Author: imp Date: Tue Apr 13 00:57:54 2010 New Revision: 206537 URL: http://svn.freebsd.org/changeset/base/206537 Log: MFC 205980: Stop hard coding i386 as the arch for the build. Instead, default to the processor we're running on. Also, supply amd64 version of create_diskimage that's the same as i386's. # didn't fix the confusion between using the processor for this and using # the machine (which would be more appropriate). NANO_ARCH smashes the two # together right now. MFC after: 7 days Modified: stable/8/tools/tools/nanobsd/nanobsd.sh Directory Properties: stable/8/tools/tools/nanobsd/ (props changed) Modified: stable/8/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- stable/8/tools/tools/nanobsd/nanobsd.sh Tue Apr 13 00:55:11 2010 (r206536) +++ stable/8/tools/tools/nanobsd/nanobsd.sh Tue Apr 13 00:57:54 2010 (r206537) @@ -134,7 +134,7 @@ PPLEVEL=3 ####################################################################### # Not a variable at this time -NANO_ARCH=i386 +NANO_ARCH=`uname -p` ####################################################################### # @@ -238,6 +238,9 @@ install_etc ( ) ( ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} distribution \ DESTDIR=${NANO_WORLDDIR} \ > ${NANO_OBJ}/_.etc 2>&1 + # make.conf doesn't get created by default, but some ports need it + # so they can spam it. + cp /dev/null ${NANO_WORLDDIR}/etc/make.conf ) install_kernel ( ) ( @@ -497,6 +500,11 @@ create_i386_diskimage ( ) ( ) > ${NANO_OBJ}/_.di 2>&1 ) +# i386 and amd64 are identical for disk images +create_amd64_diskimage ( ) ( + create_i386_diskimage +) + last_orders () ( # Redefine this function with any last orders you may have # after the build completed, for instance to copy the finished From owner-svn-src-stable@FreeBSD.ORG Tue Apr 13 01:02:20 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E2AE106566C; Tue, 13 Apr 2010 01:02:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 62E698FC13; Tue, 13 Apr 2010 01:02:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3D12KBW094696; Tue, 13 Apr 2010 01:02:20 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D12KKd094693; Tue, 13 Apr 2010 01:02:20 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004130102.o3D12KKd094693@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Apr 2010 01:02:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206538 - stable/8/usr.bin/sed X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 01:02:20 -0000 Author: imp Date: Tue Apr 13 01:02:20 2010 New Revision: 206538 URL: http://svn.freebsd.org/changeset/base/206538 Log: MFC: 205992 Make -r mean exactly the same thing as -E for increased compatibility with GNU sed. MFC after: 7 days Modified: stable/8/usr.bin/sed/main.c stable/8/usr.bin/sed/sed.1 Directory Properties: stable/8/usr.bin/ (props changed) stable/8/usr.bin/awk/ (props changed) stable/8/usr.bin/calendar/ (props changed) stable/8/usr.bin/catman/ (props changed) stable/8/usr.bin/comm/ (props changed) stable/8/usr.bin/cpio/ (props changed) stable/8/usr.bin/csup/ (props changed) stable/8/usr.bin/fetch/ (props changed) stable/8/usr.bin/find/ (props changed) stable/8/usr.bin/finger/ (props changed) stable/8/usr.bin/fstat/ (props changed) stable/8/usr.bin/gcore/ (props changed) stable/8/usr.bin/gzip/ (props changed) stable/8/usr.bin/hexdump/ (props changed) stable/8/usr.bin/indent/ (props changed) stable/8/usr.bin/kdump/ (props changed) stable/8/usr.bin/locale/ (props changed) stable/8/usr.bin/look/ (props changed) stable/8/usr.bin/makewhatis/ (props changed) stable/8/usr.bin/netstat/ (props changed) stable/8/usr.bin/perror/ (props changed) stable/8/usr.bin/procstat/ (props changed) stable/8/usr.bin/script/ (props changed) stable/8/usr.bin/systat/ (props changed) stable/8/usr.bin/tftp/ (props changed) stable/8/usr.bin/touch/ (props changed) stable/8/usr.bin/truss/ (props changed) stable/8/usr.bin/unifdef/ (props changed) stable/8/usr.bin/uniq/ (props changed) stable/8/usr.bin/vmstat/ (props changed) stable/8/usr.bin/w/ (props changed) stable/8/usr.bin/whois/ (props changed) stable/8/usr.bin/xlint/ (props changed) Modified: stable/8/usr.bin/sed/main.c ============================================================================== --- stable/8/usr.bin/sed/main.c Tue Apr 13 00:57:54 2010 (r206537) +++ stable/8/usr.bin/sed/main.c Tue Apr 13 01:02:20 2010 (r206538) @@ -130,8 +130,9 @@ main(int argc, char *argv[]) fflag = 0; inplace = NULL; - while ((c = getopt(argc, argv, "EI:ae:f:i:ln")) != -1) + while ((c = getopt(argc, argv, "EI:ae:f:i:lnr")) != -1) switch (c) { + case 'r': /* Gnu sed compat */ case 'E': rflags = REG_EXTENDED; break; Modified: stable/8/usr.bin/sed/sed.1 ============================================================================== --- stable/8/usr.bin/sed/sed.1 Tue Apr 13 00:57:54 2010 (r206537) +++ stable/8/usr.bin/sed/sed.1 Tue Apr 13 01:02:20 2010 (r206538) @@ -39,11 +39,11 @@ .Nd stream editor .Sh SYNOPSIS .Nm -.Op Fl Ealn +.Op Fl Ealnr .Ar command .Op Ar .Nm -.Op Fl Ealn +.Op Fl Ealnr .Op Fl e Ar command .Op Fl f Ar command_file .Op Fl I Ar extension @@ -144,6 +144,10 @@ all of the commands have been applied to The .Fl n option suppresses this behavior. +.It Fl r +Same as +.Fl E +for compatibility with GNU sed. .El .Pp The form of a From owner-svn-src-stable@FreeBSD.ORG Tue Apr 13 01:04:11 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C96C106564A; Tue, 13 Apr 2010 01:04:11 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6AFF28FC12; Tue, 13 Apr 2010 01:04:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3D14BO0095154; Tue, 13 Apr 2010 01:04:11 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D14BJt095151; Tue, 13 Apr 2010 01:04:11 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004130104.o3D14BJt095151@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Apr 2010 01:04:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206539 - stable/8/tools/tools/nanobsd/gateworks X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 01:04:11 -0000 Author: imp Date: Tue Apr 13 01:04:11 2010 New Revision: 206539 URL: http://svn.freebsd.org/changeset/base/206539 Log: MFC: 205994 Two fixes: (1) We don't need a custom install_kernel. We can install without symbols by adding INSTALL_NODEBUG (which likely should be WITHOUT_KERNEL_SYMBOLS_FILE, or something shorter) to CONF_INSTALL (2) for make buildenv stage, use NANO_MAKE_CONF_BUILD rather than the non-existant NANO_MAKE_CONF. MFC after: 7 days Modified: stable/8/tools/tools/nanobsd/gateworks/common Directory Properties: stable/8/tools/tools/nanobsd/ (props changed) Modified: stable/8/tools/tools/nanobsd/gateworks/common ============================================================================== --- stable/8/tools/tools/nanobsd/gateworks/common Tue Apr 13 01:02:20 2010 (r206538) +++ stable/8/tools/tools/nanobsd/gateworks/common Tue Apr 13 01:04:11 2010 (r206539) @@ -37,7 +37,7 @@ NANO_CUSTOMIZE="$NANO_CUSTOMIZE cust_ins buildenv() { cd ${NANO_SRC} - env TARGET_ARCH=${NANO_ARCH} __MAKE_CONF=${NANO_MAKE_CONF} \ + env TARGET_ARCH=${NANO_ARCH} __MAKE_CONF=${NANO_MAKE_CONF_BUILD} \ DESTDIR=${NANO_WORLDDIR} make buildenv } @@ -146,22 +146,9 @@ WITHOUT_TCSH=true CONF_INSTALL="$CONF_BUILD WITHOUT_TOOLCHAIN=true WITHOUT_INSTALLLIB=true +INSTALL_NODEBUG=true " -# NB: override to suppress install of kernel.symbols -install_kernel() -{ - pprint 2 "install kernel" - pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.ik" - - cd ${NANO_SRC} - env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} installkernel \ - INSTALL_NODEBUG=true \ - DESTDIR=${NANO_WORLDDIR} \ - __MAKE_CONF=${NANO_MAKE_CONF} KERNCONF=`basename ${NANO_KERNEL}` \ - > ${MAKEOBJDIRPREFIX}/_.ik 2>&1 -} - # NB: override to force / on s1 instead of s1a setup_nanobsd_etc() { From owner-svn-src-stable@FreeBSD.ORG Tue Apr 13 01:22:17 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95665106564A; Tue, 13 Apr 2010 01:22:17 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 843CE8FC12; Tue, 13 Apr 2010 01:22:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3D0tCEQ093011; Tue, 13 Apr 2010 00:55:12 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D0tCL1093009; Tue, 13 Apr 2010 00:55:12 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004130055.o3D0tCL1093009@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Apr 2010 00:55:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206536 - stable/8/sys/sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 01:22:17 -0000 Author: imp Date: Tue Apr 13 00:55:11 2010 New Revision: 206536 URL: http://svn.freebsd.org/changeset/base/206536 Log: MFC 205838: Mark the vtoc.h structure as packed so that it is the right size and layout on arm. MFC after: 7 days Modified: stable/8/sys/sys/vtoc.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sys/vtoc.h ============================================================================== --- stable/8/sys/sys/vtoc.h Tue Apr 13 00:48:54 2010 (r206535) +++ stable/8/sys/sys/vtoc.h Tue Apr 13 00:55:11 2010 (r206536) @@ -97,7 +97,7 @@ struct vtoc8 { } map[VTOC8_NPARTS]; uint16_t magic; uint16_t cksum; -}; +} __packed; #ifdef CTASSERT CTASSERT(sizeof(struct vtoc8) == 512); From owner-svn-src-stable@FreeBSD.ORG Tue Apr 13 06:01:25 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 671AB1065670; Tue, 13 Apr 2010 06:01:25 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 54CBB8FC0A; Tue, 13 Apr 2010 06:01:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3D61PCH060992; Tue, 13 Apr 2010 06:01:25 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D61PYS060991; Tue, 13 Apr 2010 06:01:25 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201004130601.o3D61PYS060991@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 13 Apr 2010 06:01:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206542 - stable/8/lib/libc/posix1e X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 06:01:25 -0000 Author: trasz Date: Tue Apr 13 06:01:24 2010 New Revision: 206542 URL: http://svn.freebsd.org/changeset/base/206542 Log: MFC r205796: Make acl_to_text_np(3) not crash on long group or user names in NFSv4 ACLs. PR: amd64/145091 Modified: stable/8/lib/libc/posix1e/acl_to_text_nfs4.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/posix1e/acl_to_text_nfs4.c ============================================================================== --- stable/8/lib/libc/posix1e/acl_to_text_nfs4.c Tue Apr 13 03:10:38 2010 (r206541) +++ stable/8/lib/libc/posix1e/acl_to_text_nfs4.c Tue Apr 13 06:01:24 2010 (r206542) @@ -167,7 +167,7 @@ format_additional_id(char *str, size_t s static int format_entry(char *str, size_t size, const acl_entry_t entry, int flags) { - size_t off = 0, padding_length, maximum_who_field_length = 18; + size_t off = 0, min_who_field_length = 18; acl_permset_t permset; acl_flagset_t flagset; int error, len; @@ -188,12 +188,9 @@ format_entry(char *str, size_t size, con if (error) return (error); len = strlen(buf); - padding_length = maximum_who_field_length - len; - if (padding_length > 0) { - memset(str, ' ', padding_length); - off += padding_length; - } - off += snprintf(str + off, size - off, "%s:", buf); + if (len < min_who_field_length) + len = min_who_field_length; + off += snprintf(str + off, size - off, "%*s:", len, buf); error = _nfs4_format_access_mask(buf, sizeof(buf), *permset, flags & ACL_TEXT_VERBOSE); From owner-svn-src-stable@FreeBSD.ORG Tue Apr 13 06:05:16 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 505571065670; Tue, 13 Apr 2010 06:05:16 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C9908FC16; Tue, 13 Apr 2010 06:05:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3D65GLk061872; Tue, 13 Apr 2010 06:05:16 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D65GbG061870; Tue, 13 Apr 2010 06:05:16 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201004130605.o3D65GbG061870@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 13 Apr 2010 06:05:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206543 - stable/8/usr.bin/calendar/calendars X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 06:05:16 -0000 Author: trasz Date: Tue Apr 13 06:05:15 2010 New Revision: 206543 URL: http://svn.freebsd.org/changeset/base/206543 Log: MFC r205853: Add myself. Modified: stable/8/usr.bin/calendar/calendars/calendar.freebsd Directory Properties: stable/8/usr.bin/calendar/ (props changed) Modified: stable/8/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- stable/8/usr.bin/calendar/calendars/calendar.freebsd Tue Apr 13 06:01:24 2010 (r206542) +++ stable/8/usr.bin/calendar/calendars/calendar.freebsd Tue Apr 13 06:05:15 2010 (r206543) @@ -107,6 +107,7 @@ 04/03 Tong Liu born in Beijing, People's Republic of China, 1981 04/03 Gabor Pali born in Kunhegyes, Hungary, 1982 04/05 Stacey Son born in Burley, Idaho, United States. 1967 +04/07 Edward Tomasz Napierala born in Wolsztyn, Poland, 1981 04/08 Jordan K. Hubbard born in Honolulu, Hawaii, United States, 1963 04/09 Ceri Davies born in Haverfordwest, Pembrokeshire, United Kingdom, 1976 04/11 Bruce A. Mah born in Fresno, California, United States, 1969 From owner-svn-src-stable@FreeBSD.ORG Tue Apr 13 10:23:03 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82AEF1065672; Tue, 13 Apr 2010 10:23:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 70A2E8FC1B; Tue, 13 Apr 2010 10:23:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3DAN3Fj019382; Tue, 13 Apr 2010 10:23:03 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DAN3Nv019378; Tue, 13 Apr 2010 10:23:03 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004131023.o3DAN3Nv019378@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 13 Apr 2010 10:23:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206554 - in stable/8/sys/amd64: amd64 include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 10:23:03 -0000 Author: kib Date: Tue Apr 13 10:23:03 2010 New Revision: 206554 URL: http://svn.freebsd.org/changeset/base/206554 Log: MFC r206459: Handle a case when non-canonical address is loaded into the fsbase or gsbase MSR. Modified: stable/8/sys/amd64/amd64/exception.S stable/8/sys/amd64/amd64/trap.c stable/8/sys/amd64/include/md_var.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/amd64/exception.S ============================================================================== --- stable/8/sys/amd64/amd64/exception.S Tue Apr 13 10:12:58 2010 (r206553) +++ stable/8/sys/amd64/amd64/exception.S Tue Apr 13 10:23:03 2010 (r206554) @@ -668,7 +668,8 @@ ld_fs: movw %ax,%fs movl $MSR_FSBASE,%ecx movl PCB_FSBASE(%r8),%eax movl PCB_FSBASE+4(%r8),%edx - wrmsr + .globl ld_fsbase +ld_fsbase: wrmsr 1: /* Restore %gs and gsbase */ movw TF_GS(%rsp),%si @@ -685,7 +686,8 @@ ld_gs: movw %si,%gs movl $MSR_KGSBASE,%ecx movl PCB_GSBASE(%r8),%eax movl PCB_GSBASE+4(%r8),%edx - wrmsr + .globl ld_gsbase +ld_gsbase: wrmsr 1: .globl ld_es ld_es: movw TF_ES(%rsp),%es .globl ld_ds @@ -798,6 +800,30 @@ gs_load_fault: call trap movw $KUG32SEL,TF_GS(%rsp) jmp doreti + + ALIGN_TEXT + .globl fsbase_load_fault +fsbase_load_fault: + movl $T_PROTFLT,TF_TRAPNO(%rsp) + movq %rsp, %rdi + call trap + movq PCPU(CURTHREAD),%r8 + movq TD_PCB(%r8),%r8 + movq $0,PCB_FSBASE(%r8) + jmp doreti + + ALIGN_TEXT + .globl gsbase_load_fault +gsbase_load_fault: + popfq + movl $T_PROTFLT,TF_TRAPNO(%rsp) + movq %rsp, %rdi + call trap + movq PCPU(CURTHREAD),%r8 + movq TD_PCB(%r8),%r8 + movq $0,PCB_GSBASE(%r8) + jmp doreti + #ifdef HWPMC_HOOKS ENTRY(end_exceptions) #endif Modified: stable/8/sys/amd64/amd64/trap.c ============================================================================== --- stable/8/sys/amd64/amd64/trap.c Tue Apr 13 10:12:58 2010 (r206553) +++ stable/8/sys/amd64/amd64/trap.c Tue Apr 13 10:23:03 2010 (r206554) @@ -563,6 +563,14 @@ trap(struct trapframe *frame) frame->tf_gs = _ugssel; goto out; } + if (frame->tf_rip == (long)ld_gsbase) { + frame->tf_rip = (long)gsbase_load_fault; + goto out; + } + if (frame->tf_rip == (long)ld_fsbase) { + frame->tf_rip = (long)fsbase_load_fault; + goto out; + } if (PCPU_GET(curpcb)->pcb_onfault != NULL) { frame->tf_rip = (long)PCPU_GET(curpcb)->pcb_onfault; Modified: stable/8/sys/amd64/include/md_var.h ============================================================================== --- stable/8/sys/amd64/include/md_var.h Tue Apr 13 10:12:58 2010 (r206553) +++ stable/8/sys/amd64/include/md_var.h Tue Apr 13 10:23:03 2010 (r206554) @@ -83,10 +83,14 @@ void ld_ds(void) __asm(__STRING(ld_ds)); void ld_es(void) __asm(__STRING(ld_es)); void ld_fs(void) __asm(__STRING(ld_fs)); void ld_gs(void) __asm(__STRING(ld_gs)); +void ld_fsbase(void) __asm(__STRING(ld_fsbase)); +void ld_gsbase(void) __asm(__STRING(ld_gsbase)); void ds_load_fault(void) __asm(__STRING(ds_load_fault)); void es_load_fault(void) __asm(__STRING(es_load_fault)); void fs_load_fault(void) __asm(__STRING(fs_load_fault)); void gs_load_fault(void) __asm(__STRING(gs_load_fault)); +void fsbase_load_fault(void) __asm(__STRING(fsbase_load_fault)); +void gsbase_load_fault(void) __asm(__STRING(gsbase_load_fault)); void dump_add_page(vm_paddr_t); void dump_drop_page(vm_paddr_t); void initializecpu(void); From owner-svn-src-stable@FreeBSD.ORG Tue Apr 13 18:46:18 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5719106566B; Tue, 13 Apr 2010 18:46:18 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C30878FC08; Tue, 13 Apr 2010 18:46:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3DIkIxq033434; Tue, 13 Apr 2010 18:46:18 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DIkIT1033428; Tue, 13 Apr 2010 18:46:18 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201004131846.o3DIkIT1033428@svn.freebsd.org> From: Ed Maste Date: Tue, 13 Apr 2010 18:46:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206559 - stable/8/usr.sbin/config X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 18:46:19 -0000 Author: emaste Date: Tue Apr 13 18:46:18 2010 New Revision: 206559 URL: http://svn.freebsd.org/changeset/base/206559 Log: MFC r205880 by ru: - Handle calloc() allocation failures. - Fixed a comment. - 2 -> EXIT_FAILURE in some places. - errx() -> err() where appropriate. PR: 144644 Submitted by: Garrett Cooper Also fix endinclude() prototype to avoid compiler warning. Modified: stable/8/usr.sbin/config/config.y stable/8/usr.sbin/config/lang.l stable/8/usr.sbin/config/main.c stable/8/usr.sbin/config/mkmakefile.c stable/8/usr.sbin/config/mkoptions.c Directory Properties: stable/8/usr.sbin/config/ (props changed) Modified: stable/8/usr.sbin/config/config.y ============================================================================== --- stable/8/usr.sbin/config/config.y Tue Apr 13 15:55:18 2010 (r206558) +++ stable/8/usr.sbin/config/config.y Tue Apr 13 18:46:18 2010 (r206559) @@ -166,6 +166,8 @@ Config_spec: CPU Save_id { struct cputype *cp = (struct cputype *)calloc(1, sizeof (struct cputype)); + if (cp == NULL) + err(EXIT_FAILURE, "calloc"); cp->cpu_name = $2; SLIST_INSERT_HEAD(&cputype, cp, cpu_next); } | @@ -197,6 +199,8 @@ Config_spec: struct hint *hint; hint = (struct hint *)calloc(1, sizeof (struct hint)); + if (hint == NULL) + err(EXIT_FAILURE, "calloc"); hint->hint_name = $2; STAILQ_INSERT_TAIL(&hints, hint, hint_next); hintmode = 1; @@ -331,6 +335,8 @@ newfile(char *name) struct files_name *nl; nl = (struct files_name *) calloc(1, sizeof *nl); + if (nl == NULL) + err(EXIT_FAILURE, "calloc"); nl->f_name = name; STAILQ_INSERT_TAIL(&fntab, nl, f_next); } @@ -364,6 +370,8 @@ newdev(char *name) } np = (struct device *) calloc(1, sizeof *np); + if (np == NULL) + err(EXIT_FAILURE, "calloc"); np->d_name = name; STAILQ_INSERT_TAIL(&dtab, np, d_next); } @@ -422,6 +430,8 @@ newopt(struct opt_head *list, char *name } op = (struct opt *)calloc(1, sizeof (struct opt)); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = name; op->op_ownfile = 0; op->op_value = value; Modified: stable/8/usr.sbin/config/lang.l ============================================================================== --- stable/8/usr.sbin/config/lang.l Tue Apr 13 15:55:18 2010 (r206558) +++ stable/8/usr.sbin/config/lang.l Tue Apr 13 18:46:18 2010 (r206559) @@ -33,6 +33,7 @@ #include #include +#include #include #include "y.tab.h" #include "config.h" @@ -220,6 +221,8 @@ cfgfile_add(const char *fname) struct cfgfile *cf; cf = calloc(1, sizeof(*cf)); + if (cf == NULL) + err(EXIT_FAILURE, "calloc"); assert(cf != NULL); asprintf(&cf->cfg_path, "%s", fname); STAILQ_INSERT_TAIL(&cfgfiles, cf, cfg_next); @@ -285,7 +288,7 @@ include(const char *fname, int ateof) * Terminate the most recent inclusion. */ static int -endinclude() +endinclude(void) { struct incl *in; int ateof; Modified: stable/8/usr.sbin/config/main.c ============================================================================== --- stable/8/usr.sbin/config/main.c Tue Apr 13 15:55:18 2010 (r206558) +++ stable/8/usr.sbin/config/main.c Tue Apr 13 18:46:18 2010 (r206559) @@ -120,7 +120,7 @@ main(int argc, char **argv) if (*destdir == '\0') strlcpy(destdir, optarg, sizeof(destdir)); else - errx(2, "directory already set"); + errx(EXIT_FAILURE, "directory already set"); break; case 'g': debugging++; @@ -175,7 +175,7 @@ main(int argc, char **argv) if (mkdir(p, 0777)) err(2, "%s", p); } else if (!S_ISDIR(buf.st_mode)) - errx(2, "%s isn't a directory", p); + errx(EXIT_FAILURE, "%s isn't a directory", p); SLIST_INIT(&cputype); SLIST_INIT(&mkopt); @@ -256,7 +256,7 @@ get_srcdir(void) int i; if (realpath("../..", srcdir) == NULL) - errx(2, "Unable to find root of source tree"); + err(EXIT_FAILURE, "Unable to find root of source tree"); if ((pwd = getenv("PWD")) != NULL && *pwd == '/' && (pwd = strdup(pwd)) != NULL) { /* Remove the last two path components. */ @@ -513,7 +513,7 @@ configfile(void) } sbuf_finish(sb); /* - * We print first part of the tamplate, replace our tag with + * We print first part of the template, replace our tag with * configuration files content and later continue writing our * template. */ @@ -650,6 +650,8 @@ remember(const char *file) } } hl = calloc(1, sizeof(*hl)); + if (hl == NULL) + err(EXIT_FAILURE, "calloc"); hl->h_name = s; hl->h_next = htab; htab = hl; @@ -671,19 +673,19 @@ kernconfdump(const char *file) r = open(file, O_RDONLY); if (r == -1) - errx(EXIT_FAILURE, "Couldn't open file '%s'", file); + err(EXIT_FAILURE, "Couldn't open file '%s'", file); error = fstat(r, &st); if (error == -1) - errx(EXIT_FAILURE, "fstat() failed"); + err(EXIT_FAILURE, "fstat() failed"); if (S_ISDIR(st.st_mode)) errx(EXIT_FAILURE, "'%s' is a directory", file); fp = fdopen(r, "r"); if (fp == NULL) - errx(EXIT_FAILURE, "fdopen() failed"); + err(EXIT_FAILURE, "fdopen() failed"); osz = 1024; o = calloc(1, osz); if (o == NULL) - errx(EXIT_FAILURE, "Couldn't allocate memory"); + err(EXIT_FAILURE, "Couldn't allocate memory"); /* ELF note section header. */ asprintf(&cmd, "/usr/bin/elfdump -c %s | grep -A 5 kern_conf" "| tail -2 | cut -d ' ' -f 2 | paste - - -", file); @@ -703,7 +705,7 @@ kernconfdump(const char *file) "INCLUDE_CONFIG_FILE", file); r = fseek(fp, off, SEEK_CUR); if (r != 0) - errx(EXIT_FAILURE, "fseek() failed"); + err(EXIT_FAILURE, "fseek() failed"); for (i = 0; i < size - 1; i++) { r = fgetc(fp); if (r == EOF) Modified: stable/8/usr.sbin/config/mkmakefile.c ============================================================================== --- stable/8/usr.sbin/config/mkmakefile.c Tue Apr 13 15:55:18 2010 (r206558) +++ stable/8/usr.sbin/config/mkmakefile.c Tue Apr 13 18:46:18 2010 (r206559) @@ -98,6 +98,8 @@ new_fent(void) struct file_list *fp; fp = (struct file_list *) calloc(1, sizeof *fp); + if (fp == NULL) + err(EXIT_FAILURE, "calloc"); STAILQ_INSERT_TAIL(&ftab, fp, f_next); return (fp); } Modified: stable/8/usr.sbin/config/mkoptions.c ============================================================================== --- stable/8/usr.sbin/config/mkoptions.c Tue Apr 13 15:55:18 2010 (r206558) +++ stable/8/usr.sbin/config/mkoptions.c Tue Apr 13 18:46:18 2010 (r206559) @@ -70,6 +70,8 @@ options(void) /* Fake the cpu types as options. */ SLIST_FOREACH(cp, &cputype, cpu_next) { op = (struct opt *)calloc(1, sizeof(*op)); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = ns(cp->cpu_name); SLIST_INSERT_HEAD(&opt, op, op_next); } @@ -84,6 +86,8 @@ options(void) /* Fake MAXUSERS as an option. */ op = (struct opt *)calloc(1, sizeof(*op)); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = ns("MAXUSERS"); snprintf(buf, sizeof(buf), "%d", maxusers); op->op_value = ns(buf); @@ -199,6 +203,8 @@ do_option(char *name) tidy++; } else { op = (struct opt *) calloc(1, sizeof *op); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = inw; op->op_value = invalue; SLIST_INSERT_HEAD(&op_head, op, op_next); @@ -225,6 +231,8 @@ do_option(char *name) if (value && !seen) { /* New option appears */ op = (struct opt *) calloc(1, sizeof *op); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = ns(name); op->op_value = value ? ns(value) : NULL; SLIST_INSERT_HEAD(&op_head, op, op_next); @@ -336,6 +344,8 @@ next: } po = (struct opt_list *) calloc(1, sizeof *po); + if (po == NULL) + err(EXIT_FAILURE, "calloc"); po->o_name = this; po->o_file = val; SLIST_INSERT_HEAD(&otab, po, o_next); From owner-svn-src-stable@FreeBSD.ORG Tue Apr 13 19:43:17 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5663A106566C; Tue, 13 Apr 2010 19:43:17 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 44A3A8FC18; Tue, 13 Apr 2010 19:43:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3DJhHGO046060; Tue, 13 Apr 2010 19:43:17 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DJhHJm046058; Tue, 13 Apr 2010 19:43:17 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <201004131943.o3DJhHJm046058@svn.freebsd.org> From: Nick Hibma Date: Tue, 13 Apr 2010 19:43:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206561 - stable/7/sys/dev/usb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 19:43:17 -0000 Author: n_hibma Date: Tue Apr 13 19:43:16 2010 New Revision: 206561 URL: http://svn.freebsd.org/changeset/base/206561 Log: Make the list of allocated ports dynamic. The Option GTM382 has 10 serial ports (yes, 10, it has a built in GPS and other stuff) and we need to access the last one for PPP access to the card. Other ports are HSO (Option specific protocol; see Linux driver). Reviewed by: thompsa Modified: stable/7/sys/dev/usb/u3g.c Modified: stable/7/sys/dev/usb/u3g.c ============================================================================== --- stable/7/sys/dev/usb/u3g.c Tue Apr 13 18:53:39 2010 (r206560) +++ stable/7/sys/dev/usb/u3g.c Tue Apr 13 19:43:16 2010 (r206561) @@ -58,10 +58,8 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, &u3gdebug, 0, "u3g debug level"); #define DPRINTF(x...) if (u3gdebug) device_printf(sc->sc_dev, ##x) -#define U3G_MAXPORTS 6 - struct u3g_softc { - struct ucom_softc sc_ucom[U3G_MAXPORTS]; + struct ucom_softc *sc_ucom; device_t sc_dev; usbd_device_handle sc_udev; u_int8_t sc_speed; @@ -254,9 +252,8 @@ u3g_attach(device_t self) sc->sc_init = u3g_dev_type->init; sc->sc_speed = u3g_dev_type->speed; - sprintf(devnamefmt,"U%d.%%d", device_get_unit(self)); int portno = 0; - for (i = 0; i < uaa->nifaces && portno < U3G_MAXPORTS; i++) { + for (i = 0; i < uaa->nifaces; i++) { DPRINTF("Interface %d of %d, %sin use\n", i, uaa->nifaces, (uaa->ifaces[i]? "not ":"")); @@ -279,7 +276,7 @@ u3g_attach(device_t self) int bulkin_no = -1, bulkout_no = -1; int claim_iface = 0; - for (n = 0; n < id->bNumEndpoints && portno < U3G_MAXPORTS; n++) { + for (n = 0; n < id->bNumEndpoints; n++) { ed = usbd_interface2endpoint_descriptor(uaa->ifaces[i], n); DPRINTF(" Endpoint %d of %d%s\n", n, id->bNumEndpoints, @@ -298,6 +295,7 @@ u3g_attach(device_t self) * the bulk-in and bulk-out endpoints appear in pairs. */ if (bulkin_no != -1 && bulkout_no != -1) { + sc->sc_ucom = realloc(sc->sc_ucom, (portno+1)*sizeof(struct ucom_softc), M_USBDEV, M_WAITOK); struct ucom_softc *ucom = &sc->sc_ucom[portno]; ucom->sc_dev = self; @@ -318,13 +316,6 @@ u3g_attach(device_t self) portno, i, ucom->sc_bulkin_no, ucom->sc_bulkout_no); -#if __FreeBSD_version < 700000 - ucom_attach_tty(ucom, MINOR_CALLOUT, devnamefmt, portno); -#elif __FreeBSD_version < 800000 - ucom_attach_tty(ucom, TS_CALLOUT, devnamefmt, portno); -#else - ucom_attach_tty(ucom, devnamefmt, portno); -#endif claim_iface = 1; portno++; @@ -336,6 +327,19 @@ u3g_attach(device_t self) } sc->sc_numports = portno; + sprintf(devnamefmt,"U%d.%%d", device_get_unit(self)); + for (portno = 0; portno < sc->sc_numports; portno++) { + struct ucom_softc *ucom = &sc->sc_ucom[portno]; + +#if __FreeBSD_version < 700000 + ucom_attach_tty(ucom, MINOR_CALLOUT, devnamefmt, portno); +#elif __FreeBSD_version < 800000 + ucom_attach_tty(ucom, TS_CALLOUT, devnamefmt, portno); +#else + ucom_attach_tty(ucom, devnamefmt, portno); +#endif + } + device_printf(self, "configured %d serial ports (%s)\n", sc->sc_numports, devnamefmt); return 0; @@ -357,6 +361,9 @@ u3g_detach(device_t self) } } + if (sc->sc_ucom) + free(sc->sc_ucom, M_USBDEV); + return 0; } From owner-svn-src-stable@FreeBSD.ORG Tue Apr 13 20:33:35 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33116106566C; Tue, 13 Apr 2010 20:33:35 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 089048FC1A; Tue, 13 Apr 2010 20:33:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3DKXYUo057447; Tue, 13 Apr 2010 20:33:34 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DKXYBL057446; Tue, 13 Apr 2010 20:33:34 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201004132033.o3DKXYBL057446@svn.freebsd.org> From: Doug Barton Date: Tue, 13 Apr 2010 20:33:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206564 - in stable/8/etc: . mtree X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 20:33:35 -0000 Author: dougb Date: Tue Apr 13 20:33:34 2010 New Revision: 206564 URL: http://svn.freebsd.org/changeset/base/206564 Log: Pull mergeinfo from r201203 up into the etc directory Modified: Directory Properties: stable/8/etc/ (props changed) stable/8/etc/mtree/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Tue Apr 13 20:36:54 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC86B1065673; Tue, 13 Apr 2010 20:36:54 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB0758FC13; Tue, 13 Apr 2010 20:36:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3DKascU058231; Tue, 13 Apr 2010 20:36:54 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DKasKA058229; Tue, 13 Apr 2010 20:36:54 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201004132036.o3DKasKA058229@svn.freebsd.org> From: Doug Barton Date: Tue, 13 Apr 2010 20:36:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206565 - stable/8/etc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 20:36:54 -0000 Author: dougb Date: Tue Apr 13 20:36:54 2010 New Revision: 206565 URL: http://svn.freebsd.org/changeset/base/206565 Log: MFC r206248: Change where we nap so that if pwait(1) returns but kill -0 still sees a zombie we don't print an endless string of the same pid number until the zombie exits. While I'm here, local'ize the variables that this function uses. Modified: stable/8/etc/rc.subr Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/rc.subr ============================================================================== --- stable/8/etc/rc.subr Tue Apr 13 20:33:34 2010 (r206564) +++ stable/8/etc/rc.subr Tue Apr 13 20:36:54 2010 (r206565) @@ -372,6 +372,8 @@ _find_processes() # wait_for_pids() { + local _list _prefix _nlist _j + _list="$@" if [ -z "$_list" ]; then return @@ -382,6 +384,7 @@ wait_for_pids() for _j in $_list; do if kill -0 $_j 2>/dev/null; then _nlist="${_nlist}${_nlist:+ }$_j" + [ -n "$_prefix" ] && sleep 1 fi done if [ -z "$_nlist" ]; then @@ -390,7 +393,7 @@ wait_for_pids() _list=$_nlist echo -n ${_prefix:-"Waiting for PIDS: "}$_list _prefix=", " - pwait $_list 2>/dev/null || sleep 2 + pwait $_list 2>/dev/null done if [ -n "$_prefix" ]; then echo "." From owner-svn-src-stable@FreeBSD.ORG Tue Apr 13 20:44:18 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 295081065673; Tue, 13 Apr 2010 20:44:18 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 160348FC1E; Tue, 13 Apr 2010 20:44:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3DKiHsk059931; Tue, 13 Apr 2010 20:44:17 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DKiGmG059926; Tue, 13 Apr 2010 20:44:16 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201004132044.o3DKiGmG059926@svn.freebsd.org> From: Doug Barton Date: Tue, 13 Apr 2010 20:44:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206566 - in stable/8/games/fortune: . datfiles X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 20:44:18 -0000 Author: dougb Date: Tue Apr 13 20:44:16 2010 New Revision: 206566 URL: http://svn.freebsd.org/changeset/base/206566 Log: MFC r205995: Massive cleanup and synchronization with other *BSDs Modified: stable/8/games/fortune/Notes stable/8/games/fortune/datfiles/fortunes stable/8/games/fortune/datfiles/fortunes-o.real stable/8/games/fortune/datfiles/fortunes.sp.ok stable/8/games/fortune/datfiles/limerick stable/8/games/fortune/datfiles/startrek stable/8/games/fortune/datfiles/zippy Directory Properties: stable/8/games/fortune/ (props changed) stable/8/games/fortune/datfiles/ (props changed) Modified: stable/8/games/fortune/Notes ============================================================================== --- stable/8/games/fortune/Notes Tue Apr 13 20:36:54 2010 (r206565) +++ stable/8/games/fortune/Notes Tue Apr 13 20:44:16 2010 (r206566) @@ -19,13 +19,13 @@ Warning: /usr/share/games/fortune. A fortune file has two parts: the source file (which contains the fortunes themselves) and the data file which describes the fortunes. The data file always has the same name as the fortune file -with the string ".dat" concatenated, i.e. "fort" is the standard fortune -database, and "fort.dat" is the data file which describes it. See +with the string ".dat" concatenated, i.e. "fortunes" is the standard fortune +database, and "fortunes.dat" is the data file which describes it. See strfile(8) for more information on creating the data files. Fortunes are split into potentially offensive and not potentially offensive parts. The offensive version of a file has the same name as the -non-offensive version with "-o" concatenated, i.e. "fort" is the standard -fortune database, and "fort-o" is the standard offensive database. The +non-offensive version with "-o" concatenated, i.e. "fortunes" is the standard +fortune database, and "fortunes-o" is the standard offensive database. The fortune program automatically assumes that any file with a name ending in "-o" is potentially offensive, and should therefore only be displayed if explicitly requested, either with the -o option or by specifying a file name @@ -42,10 +42,10 @@ MUST be in the potentially offensive dat explicit language (see George Carlin's recent updated list) MUST be in the potentially offensive database. Political and religious opinions are often sequestered in the potentially offensive section as well. Anything which -assumes as a world view blatantly racist, mysogynist (sexist), or homophobic +assumes as a world view blatantly racist, misogynist (sexist), or homophobic ideas should not be in either, since they are not really funny unless *you* -are racist, mysogynist, or homophobic. - The point of this is that people have should have a reasonable +are racist, misogynist, or homophobic. + The point of this is that people should have a reasonable expectation that, should they just run "fortune", they will not be offended. We know that some people take offense at anything, but normal people do have opinions, too, and have a right not to have their sensibilities offended by @@ -53,7 +53,7 @@ a program which is supposed to be entert -o" or "fortune -a" are saying, in effect, that they are willing to have their sensibilities tweaked. However, they should not have their personal worth seriously (i.e., not in jest) assaulted. Jokes which depend for their -humor on racist, mysogynist, or homophobic stereotypes *do* seriously +humor on racist, misogynist, or homophobic stereotypes *do* seriously assault individual personal worth, and in a general entertainment medium we should be able to get by without it. Modified: stable/8/games/fortune/datfiles/fortunes ============================================================================== --- stable/8/games/fortune/datfiles/fortunes Tue Apr 13 20:36:54 2010 (r206565) +++ stable/8/games/fortune/datfiles/fortunes Tue Apr 13 20:44:16 2010 (r206566) @@ -368,8 +368,10 @@ OR'd together, outta sight! Double bucky, I'd like a whole word of Double bucky, I'm happy I heard of Double bucky, I'd like a whole word of you! - - -- (C) 1978 by Guy L. Steele, Jr. + -- Guy L. Steele, Jr., (C) 1978 + (to Nicholas Wirth, who suggested that an extra bit + be added to terminal codes on 36-bit machines for use + by screen editors.) % Hard Copies and Chmod @@ -834,7 +836,7 @@ would like on it. "Here lies an honest lawyer. "Sorry, but I can't do that," replied the stonecutter. "In this state, it's against the law to bury two people in the same grave. However, -I could put ``here lies an honest lawyer'', if that would be okay." +I could put `here lies an honest lawyer', if that would be okay." "But that won't let people know who it is" protested the lawyer. "Certainly will," retorted the stonecutter. "people will read it and exclaim, "That's Strange!" @@ -1146,7 +1148,7 @@ strings of pearls. The spirit and inten throughout. There should be neither too little nor too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity. - A program should follow the 'Law of Least Astonishment'. What is this + A program should follow the "Law of Least Astonishment." What is this law? It is simply that the program should always respond to the user in the way that astonishes him least. A program, no matter how complex, should act as a single unit. The @@ -1161,7 +1163,7 @@ program. conference and then returned to report to his manager, saying: "What sort of programmers work for other companies? They behaved badly and were unconcerned with appearances. Their hair was long and unkempt and their -clothes were wrinkled and old. They crashed out hospitality suites and they +clothes were wrinkled and old. They crashed our hospitality suites and they made rude noises during my presentation." The manager said: "I should have never sent you to the conference. Those programmers live beyond the physical world. They consider life absurd, @@ -1466,7 +1468,7 @@ generalizable. The general tendency is to over-design the second system, using all the ideas and frills that were cautiously sidetracked on the first one. The result, as Ovid says, is a "big pile". - -- Frederick Brooks, "The Mythical Man Month" + -- Frederick Brooks, Jr., "The Mythical Man-Month" % An eighty-year-old woman is rocking away the afternoon on her porch when she sees an old, tarnished lamp sitting near the steps. She @@ -1513,7 +1515,7 @@ over canoe frames, for my people need tr and we offer you a chance to kill yourself with our ceremonial knife." The Englishman accepts the knife and yells, "God Save the Queen", while plunging the knife into his heart. - The Frenchman removes the knife from the fallen body, and yells, + The Frenchman removes the knife from the fallen body, and yells, "Vive la France", while plunging the knife into his heart. The American removes the knife from the fallen body, and yells, while stabbing himself all over his body, "Here's your lousy canoe!" @@ -1562,7 +1564,7 @@ a postcard?" "The curious incident of the stable dog in the nighttime." "But the dog did nothing in the nighttime." "That was the curious incident." - -- A. Conan Doyle, "Silver Blaze" + -- Sir Arthur Conan Doyle, "Silver Blaze" % Approaching the gates of the monastery, Hakuin found Ken the Zen preaching to a group of disciples. @@ -1609,8 +1611,8 @@ Los Angeles fainted from hyperoxygenatio under the exhaust of a bus until he revived. % Before he became a hermit, Zarathud was a young Priest, and - took great delight in making fools of his opponents in front of -his followers. +took great delight in making fools of his opponents in front of his +followers. One day Zarathud took his students to a pleasant pasture and there he confronted The Sacred Chao while She was contentedly grazing. "Tell me, you dumb beast," demanded the Priest in his @@ -1626,7 +1628,7 @@ Chinese ideogram for NO-THING.) and finds himself no wiser than before," Bokonon tells us. "He is full of murderous resentment of people who are ignorant without having come by their ignorance the hard way." - -- Kurt Vonnegut, "Cat's Cradle" + -- Kurt Vonnegut, Jr., "Cat's Cradle" % Bubba, Jim Bob, and Leroy were fishing out on the lake last November, and, when Bubba tipped his head back to empty the Jim Beam, he fell out of the @@ -1694,7 +1696,7 @@ way I ought to go from here?" the Cat. "I don't care much where--" said Alice. "Then it doesn't matter which way you go," said the Cat. - -- Lewis Carroll + -- Lewis Carroll, "Alice's Adventures in Wonderland" (1865) % Concerning the war in Vietnam, Senator George Aiken of Vermont noted in January, 1966, "I'm not very keen for doves or hawks. I think we need more @@ -1877,7 +1879,7 @@ how to be excellent: "In Search of Excel So the Cleaning Personnel Don't Steal It", etc. -- Dave Barry, "In Search of Excellence" % - Exxon's 'Universe of Energy' tends to the peculiar rather than the + Exxon's "Universe of Energy" tends to the peculiar rather than the humorous ... After [an incomprehensible film montage about wind and sun and rain and strip mines and] two or three minutes of mechanical confusion, the seats locomote through a short tunnel filled with clock-work dinosaurs. @@ -1923,9 +1925,9 @@ of events, there lurks a singular, sinis "MINE! HA-HA!" % "Found it," the Mouse replied rather crossly: -"of course you know what 'it' means." +"of course you know what `it' means." - "I know what 'it' means well enough, when I find a thing," + "I know what `it' means well enough, when I find a thing," said the Duck: "it's generally a frog or a worm. The question is, what did the archbishop find?" @@ -1937,15 +1939,15 @@ such as a "pride of lions" or a "gaggle One of the professors noticed a group of prostitutes down the block, and posed the question, "What name would be given to that group?" The four fell into silence for a moment, as they pondered the possibilities... - At last, one spoke: "How about 'a Jam of Tarts'?" The others nodded + At last, one spoke: "How about `a Jam of Tarts'?" The others nodded in acknowledgment as they continued to consider the problem. A second -professor spoke: "I'd suggest 'an Essay of Trollops.'" Again, the others -nodded. A third spoke: "I propose 'a Flourish of Strumpets.'" +professor spoke: "I'd suggest `an Essay of Trollops.'" Again, the others +nodded. A third spoke: "I propose `a Flourish of Strumpets.'" They continued their walk in silence, until the first professor remarked to the remaining professor, who was the most senior and learned of the four, "You haven't suggested a name for our ladies. What are your thoughts?" - Replied the fourth professor, "'An Anthology of Prose.'" + Replied the fourth professor, "`An Anthology of Prose.'" % Fred noticed his roommate had a black eye upon returning from a dance. "What happened?" @@ -1958,12 +1960,11 @@ and sarcastic?" "Of course not," said a sympathetic friend. "Well," retorted Frank, "neither would Jennifer." % - "Gee, Mudhead, everyone at More Science High has an + "Gee, Mudhead, everyone at Morse Science High has an extracurricular activity except you." "Well, gee, doesn't Louise count?" "Only to ten, Mudhead." - - -- Firesign Theater + -- The Firesign Theatre % "Gentlemen of the jury," said the defense attorney, now beginning to warm to his summation, "the real question here before you is, shall this @@ -2261,7 +2262,7 @@ each other up: the floor.) S-word. Excuse me. Look, Bob, I'm going to have to get back to you. Bob: Fine. - -- Dave Barry + -- Dave Barry, "$#$%#^%!^%&@%@!" % "I don't know what you mean by `glory,'" Alice said Humpty Dumpty smiled contemptuously. "Of course you don't -- @@ -2276,7 +2277,9 @@ less." so many different things." "The question is," said Humpty Dumpty, "which is to be master-- that's all." - -- Lewis Carroll, "Through the Looking Glass" + -- Lewis Carroll, + "Through the Looking-Glass, + and What Alice Found There" (1871) % I for one cannot protest the recent M.T.A. fare hike and the accompanying promises that this would in no way improve service. For @@ -2328,7 +2331,7 @@ operation - namely, to remove those irri "And then he will be sane?" "Then he will be perfectly sane, and a quite admirable citizen." "Thank heaven for science!" said old Yacob. - -- H.G. Wells, "The Country of the Blind" + -- H. G. Wells, "The Country of the Blind" % "I keep seeing spots in front of my eyes." "Did you ever see a doctor?" @@ -2403,7 +2406,7 @@ more simply -- `Never imagine yourself n might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise.'" - -- Lewis Carroll, "Alice in Wonderland" + -- Lewis Carroll, "Alice's Adventures in Wonderland" (1865) % I said, "Preacher, give me strength for round 5." He said, "What you need is to grow up, son." @@ -2567,7 +2570,7 @@ man. Mud-as-man alone could speak. "Certainly," said man. "Then I leave it to you to think of one for all of this," said God. And He went away. - -- Kurt Vonnegut, "Between Time and Timbuktu" + -- Kurt Vonnegut, Jr., "Between Time and Timbuktu" % In the beginning there was data. The data was without form and null, and darkness was upon the face of the console; and the Spirit of @@ -2815,7 +2818,7 @@ guzzled in one gulp and then smashed on the man stuffed the broken bottle in his mouth, munched broken glass and smacked his lips with relish. "Can I, ah, uh, get you another, sir?" the drifter stammered. - "Naw, I gotta git outa here, boy," the man grunted. "Big Mike's + "Naw, I gotta git outta here, boy," the man grunted. "Big Mike's a-comin'." % Love's Drug @@ -3002,7 +3005,7 @@ confirm who I am. -- Captain Freedom % Old Barlow was a crossing-tender at a junction where an express train -demolished an automobile and it's occupants. Being the chief witness, his +demolished an automobile and its occupants. Being the chief witness, his testimony was vitally important. Barlow explained that the night was dark, and he waved his lantern frantically, but the driver of the car paid no attention to the signal. @@ -3072,7 +3075,7 @@ and it was very juicy. I stood up and t when my mother at the kitchen window called my name in a sharp voice. I had to decide quickly. I decided. A rotten Big Boy hitting the target is a memorable sound, like a fat -man doing a belly-flop. With a whoop and a yell the tomatoe came after +man doing a belly-flop. With a whoop and a yell the tomatoee came after me faster than I knew she could run, and grabbed my shirt and was about to brain me when Mother called her name in a sharp voice. And my sister, who was a good person, obeyed and let go -- and burst into tears. I guess she knew that @@ -3164,7 +3167,7 @@ biggest, strongest fish he had ever caug until, finally, he managed to bring it to the surface. Looking of the edge of the boat, he saw the head of this huge fish breaking the surface. Smiling with pride, he reached over the edge to pull the fish up. Unfortunately, he -accidently caught his watch on the edge, and, before he knew it, there was a +accidentally caught his watch on the edge, and, before he knew it, there was a snap, and his watch tumbled into the water next to the fish with a loud "sploosh!" Distracted by this shiny object, the fish made a sudden lunge, simultaneously snapping the line, and swallowing the watch. Sadly, the @@ -3539,12 +3542,14 @@ know." "An uncomfortable sort of age. Now if you'd asked MY advice, I'd have said 'Leave off at seven' -- but it's too late now." "I never ask advice about growing," Alice said indignantly. - "Too proud?" the other enquired. + "Too proud?" the other enquired. Alice felt even more indignant at this suggestion. "I mean," she said, "that one can't help growing older." "ONE can't, perhaps," said Humpty Dumpty; "but TWO can. With proper assistance, you might have left off at seven." - -- Lewis Carroll, "Through the Looking-Glass" + -- Lewis Carroll, + "Through the Looking-Glass, + and What Alice Found There" (1871) % Several students were asked to prove that all odd integers are prime. The first student to try to do this was a math student. "Hmmm... @@ -3732,7 +3737,7 @@ she'd been she said she'd spent the nigh % "That's right; the upper-case shift works fine on the screen, but they're not coming out on the damn printer... Hold? Sure, I'll hold." - -- e.e. cummings last service call + -- e. e. cummings last service call % "The best thing for being sad," replied Merlin, beginning to puff and blow, "is to learn something. That's the only thing that never fails. @@ -3907,7 +3912,7 @@ married! You're a sadist, that's what!" THE LESSER-KNOWN PROGRAMMING LANGUAGES #2: RENE Named after the famous French philosopher and mathematician Rene -DesCartes, RENE is a language used for artificial intelligence. The +Descartes, RENE is a language used for artificial intelligence. The language is being developed at the Chicago Center of Machine Politics and Programming under a grant from the Jane Byrne Victory Fund. A spokesman described the language as "Just as great as dis [sic] city of @@ -4030,7 +4035,9 @@ called 'Ways and Means': but that's onl time completely bewildered. "I was coming to that," the Knight said. "The song really is "A-sitting on a Gate": and the tune's my own invention." - --Lewis Carroll, "Through the Looking Glass" + -- Lewis Carroll, + "Through the Looking-Glass, + and What Alice Found There" (1871) % The only real game in the world, I think, is baseball... You've got to start way down, at the bottom, when you're six or seven years @@ -4065,7 +4072,8 @@ blocks of wood. Opaque, like black pool "The pyramid is opening!" "Which one?" "The one with the ever-widening hole in it!" - -- Firesign Theater, "How Can You Be In Two Places At + -- The Firesign Theatre, + "How Can You Be In Two Places At Once When You're Not Anywhere At All" % The salesman and the system analyst took off to spend a weekend in the @@ -4157,8 +4165,8 @@ make sure that they are Earthlings. The when some guy goes bananas, the cops rope off a sixteen block area around him and call a shrink from the medical school who stands atop a patrol car with a megaphone and shouts, "OK! THIS! ALL! STARTED! WHEN! YOU! WERE! -THREE! YEARS! OLD! ON! ACCOUNT! OF! YOUR MOTHER! RIGHT? SO! LET'S! -TALK! ABOUT! IT!" Down here they don't waste that kind of time. The LAPD +THREE! YEARS! OLD! ON! ACCOUNT! OF! YOUR MOTHER! RIGHT? SO! LET'S! +TALK! ABOUT! IT!" Down here they don't waste that kind of time. The LAPD has SWAT teams composed of guys who make Darth Vader look like Mr. Peepers. Before they go to bust a bookie joint they mortar it first. -- M. Christensen, "A Portland Innocent in LA" @@ -4270,7 +4278,7 @@ you the Widow Miffin?" a small boy asked "Oh, no?" replied the little boy. "Wait 'til you see what they're carrying upstairs!" % - There was a mad scientist (a mad... social... scientist) who kidnaped + There was a mad scientist (a mad... social... scientist) who kidnapped three colleagues, an engineer, a physicist, and a mathematician, and locked each of them in separate cells with plenty of canned food and water but no can opener. @@ -4282,13 +4290,13 @@ and escaped. off the tin cans by throwing them against the wall. She was developing a good pitching arm and a new quantum theory. The mathematician had stacked the unopened cans into a surprising -solution to the kissing problem; his dessicated corpse was propped calmly +solution to the kissing problem; his desiccated corpse was propped calmly against a wall, and this was inscribed on the floor: Theorem: If I can't open these cans, I'll die. Proof: assume the opposite... % There was once a programmer who was attached to the court of the -warlord Wu. The warlord asked the programmer: "Which is easier to design: +warlord of Wu. The warlord asked the programmer: "Which is easier to design: an accounting package or an operating system?" "An operating system," replied the programmer. The warlord uttered an exclamation of disbelief. "Surely an @@ -4328,7 +4336,7 @@ demands from him more than his utmost st sinew and brain and hope and fear and dreams -- and still calls for more. They are fools that think otherwise. No great effort was ever bought. No painting, no music, no poem, no cathedral in stone, no church, no state was -ever raised into being for payment of any kind. No parthenon, no Thermopylae +ever raised into being for payment of any kind. No Parthenon, no Thermopylae was ever built or fought for pay or glory; no Bukhara sacked, or China ground beneath Mongol heel, for loot or power alone. The payment for doing these things was itself the doing of them. @@ -4393,14 +4401,14 @@ be as easily led to beauty as to uglines relations, to joy as to bitterness, be said to be suffering from Hunter Thompson's disease. I don't have it this morning. It comes and goes. This morning I don't have Hunter Thompson's disease. - -- Kurt Vonnegut Jr. on Dr. Hunter S. Thompson: Excerpt + -- Kurt Vonnegut, Jr. on Dr. Hunter S. Thompson: Excerpt from "A Political Disease", Vonnegut's review of "Fear and Loathing: On the Campaign Trail '72" % - To A Quick Young Fox + To A Quick Young Fox: Why jog exquisite bulk, fond crazy vamp, Daft buxom jonquil, zephyr's gawky vice? -Guy fed by work, quiz Jove's xanthic lamp-- +Guy fed by work, quiz Jove's xanthic lamp -- Zow! Qualms by deja vu gyp fox-kin thrice. -- Lazy Dog % @@ -4565,7 +4573,7 @@ let him lie there all night." "Don't worry about that. They have a guard station in front of the White House that's open 24 hours a day. The guards would recognize Colson... and by that time of course his wife would have called the cops and reported -that a bunch of thugs had kidnaped him." +that a bunch of thugs had kidnapped him." "Wouldn't it be a little kinder if you drove about four more blocks and stopped at a phone box to ring the hospital and say, 'Would you mind going around to the front of the White House? There's a naked man lying outside @@ -4574,7 +4582,7 @@ in the street, bleeding to death...'" "It would be quite a story for the newspapers, wouldn't it?" "Yeah, I think it's safe to say we'd see some headlines on that one." -- Hunter S. Thompson, talking to R. Steadman on C. Colson, - ex-Marine captain, now born again, of Watergate fame. + ex-Marine captain, now born again, of Watergate fame. % "Well, it's garish, ugly, and derelicts have used it for a toilet. The rides are dilapidated to the point of being lethal, and could easily @@ -4593,7 +4601,7 @@ an End-user of Very Little Brain, and lo "Well, that was a piece of cake, eh K-9?" "Piece of cake, Master? Radial slice of baked confection ... coefficient of relevance to Key of Time: zero." - -- Dr. Who + -- "Doctor Who" % "We're running out of adjectives to describe our situation. We had crisis, then we went into chaos, and now what do we call this?" said @@ -4691,7 +4699,7 @@ ever happened to me... the most dreadful "Well, it's a highly technical, sensitive instrument we use in computer repair. Being a layman, you probably can't grasp exactly what it does. We call it a two-by-four." - -- Jeff MacNelley, "Shoe" + -- Jeff MacNelly, "Shoe" % "When I drink, *everybody* drinks!" a man shouted to the assembled bar patrons. A loud general cheer went up. After downing his @@ -4860,14 +4868,14 @@ There, that ought to patch it. Dist it "The famous scientific criminal, as famous among crooks as --" "My blushes, Watson," Holmes murmured, in a deprecating voice. "I was about to say 'as he is unknown to the public.'" - -- A. Conan Doyle, "The Valley of Fear" + -- Sir Arthur Conan Doyle, "The Valley of Fear" % "You know, it's at times like this when I'm trapped in a Vogon airlock with a man from Betelgeuse and about to die of asphyxiation in deep space that I really wish I'd listened to what my mother told me when I was young!" "Why, what did she tell you?" - "I don't know, I didn't listen." + "I don't know, I didn't listen!" -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" % "You mean, if you allow the master to be uncivil, to treat you @@ -5076,7 +5084,7 @@ please communicate them by one of the fo ARPA: WastebasketSLMHQ.ARPA UUCP: [berkeley, seismo, harpo]!fubar!thekid!slmhq!wastebasket - Non-network sites: Federal Express to: + Non-network sites: Federal Express to: Wastebasket Room NE43-926 Copernicus, The Moon, 12345-6789 @@ -5223,7 +5231,7 @@ III. Any body passing through solid matt 8. Babes in Boyland 9. Santa's Magic Lap 10. Hot Buttered Elves - -- David Letterman's "Top Ten Christmas Movies in Times + -- David Letterman, "Top Ten Christmas Movies in Times Square" % ... A booming voice says, "Wrong, cretin!", and you notice that you @@ -5337,7 +5345,7 @@ other's private parts. ... computer hardware progress is so fast. No other technology since civilization began has seen six orders of magnitude in performance-price gain in 30 years. - -- Fred Brooks + -- Frederick Brooks, Jr. % ... [concerning quotation marks] even if we *_d_i_d* quote anybody in this business, it probably would be gibberish. @@ -5350,8 +5358,6 @@ introduction of Christianity, have been yet we have not advanced one inch towards uniformity. -- Thomas Jefferson, "Notes on Virginia" % - Eat drink and be merry, for tomorrow they may make it illegal. -% <<<<< EVACUATION ROUTE <<<<< % ... "fire" does not matter, "earth" and "air" and "water" do not matter. @@ -5440,14 +5446,14 @@ legally ... impeccable! -- Individuals who make their abode in vitreous edifices would be well advised to refrain from catapulting projectiles. -- Neophyte's serendipity. --- Exclusive dedication to necessitious chores without interludes of hedonistic +-- Exclusive dedication to necessitous chores without interludes of hedonistic diversion renders John a hebetudinous fellow. -- A revolving concretion of earthy or mineral matter accumulates no congeries of small, green bryophytic plant. -- Abstention from any aleatory undertaking precludes a potential escalation of a lucrative nature. -- Missiles of ligneous or osteal consistency have the potential of fracturing - osseous structure, but appelations will eternally remain innocuous. + osseous structure, but appellations will eternally remain innocuous. % ** MAXIMUM TERMINALS ACTIVE. TRY AGAIN LATER ** % @@ -5492,7 +5498,7 @@ their C programs. -- Robert Firth % ... Our second completely true news item was sent to me by Mr. H. Boyce -Connell Jr. of Atlanta, Ga., where he is involved in a law firm. One +Connell, Jr. of Atlanta, Ga., where he is involved in a law firm. One thing I like about the South is, folks there care about tradition. If somebody gets handed a name like "H. Boyce," he hangs on to it, puts it on his legal stationery, even passes it to his son, rather than do what @@ -5519,7 +5525,7 @@ awareness of the great goals for Man and galled saucepan does not reach 212 degrees Fahrenheit. % ... so long as the people do not care to exercise their freedom, those -who wish to tyrranize will do so; for tyrants are active and ardent, +who wish to tyrannize will do so; for tyrants are active and ardent, and will devote themselves in the name of any number of gods, religious and otherwise, to put shackles upon sleeping men. -- Voltarine de Cleyre @@ -5596,13 +5602,13 @@ cleanersayingIllgetyoumyprettyandyourlit % ... this is an awesome sight. The entire rebel resistance buried under six million hardbound copies of "The Naked Lunch." - -- The Firesign Theater + -- The Firesign Theatre % ... though his invention worked superbly -- his theory was a crock of sewage from beginning to end. -- Vernor Vinge, "The Peace War" % - U X + U X e dUdX, e dX, cosine, secant, tangent, sine, 3.14159... % * UNIX is a Trademark of Bell Laboratories. @@ -5647,7 +5653,7 @@ into doubt. % ... when fits of creativity run strong, more than one programmer or writer has been known to abandon the desktop for the more spacious floor. - -- Fred Brooks + -- Frederick Brooks, Jr. % ... which reminds me of the Carrot family: Ma Carrot, Pa Carrot, and Baby Carrot. One fine spring day they decided to go out for a picnic. They all @@ -5708,20 +5714,20 @@ QED: A sheet of paper is a lazy dog. 10. The city does not employ so called "Wallet Inspectors". -- David Letterman, "Top Ten New York City Pedestrian Tips" % -[1] Alexander the Great was a great general. -[2] Great generals are forewarned. -[3] Forewarned is forearmed. -[4] Four is an even number. -[5] Four is certainly an odd number of arms for a man to have. -[6] The only number that is both even and odd is infinity. +(1) Alexander the Great was a great general. +(2) Great generals are forewarned. +(3) Forewarned is forearmed. +(4) Four is an even number. +(5) Four is certainly an odd number of arms for a man to have. +(6) The only number that is both even and odd is infinity. Therefore, Alexander the Great had an infinite number of arms. % -[1] Alexander the Great was a great general. -[2] Great generals are forewarned. -[3] Forewarned is forearmed. -[4] Four is an even number. -[5] Four is certainly an odd number of arms for a man to have. -[6] The only number that is both even and odd is infinity. +(1) Alexander the Great was a great general. +(2) Great generals are forewarned. +(3) Forewarned is forearmed. +(4) Four is an even number. +(5) Four is certainly an odd number of arms for a man to have. +(6) The only number that is both even and odd is infinity. Therefore, all horses are black. % 1. Avoid fried meats which angry up the blood. @@ -5792,7 +5798,7 @@ you have to (always catch the buyer hung 2. I, David Letterman, will never rent out my farm again. 1. We are stardust. We are golden. We are going to look really stupid to future generations. - -- David Letterman, Top Ten Lessons of Woodstock + -- David Letterman, "Top Ten Lessons of Woodstock" % 10 Reasons Why a Beer is Better Than a Woman: @@ -5801,8 +5807,8 @@ you have to (always catch the buyer hung 3. A beer doesn't think baseball is stupid simply because the guys spit. 4. A beer doesn't give a [expletive deleted] if you keep a bunch of other beers on the side. - 5. A beer will not call you a sexist pig if you say "doberman" instead of - "doberperson". + 5. A beer will not call you a sexist pig if you say "Doberman" instead of + "Doberperson." 6. A beer won't get a job as a DJ and play 5 straight hours of lesbian folk music on yer fave radio station. 7. A beer understands why The Three Stooges are funny. @@ -5820,7 +5826,7 @@ FF buckets of bits on the bus FF buckets of bits on the bus FF buckets of bits Take one down, short it to ground -FE buckets of bits on the bus... +FE buckets of bits on the bus ad infinitum... % @@ -5932,13 +5938,13 @@ It isn't just a good idea, it's the law! What 20th Century U.S. President was almost impeached and what office did he later hold? % -3 syncs represent the trinity - init, the child and the eternal zombie +3 syncs represent the trinity -- init, the child and the eternal zombie process. In doing 3, you're paying homage to each and I think such traditions are important in this shallow, mercurial business we find ourselves in. -- Jordan K. Hubbard % -$3,000,000. +$3,000,000 % 355/113 -- Not the famous irrational number PI, but an incredible simulation. @@ -6050,7 +6056,7 @@ A beautiful woman is a blessing from Hea -- Kipling % A beautiful woman is a picture which drives all beholders nobly mad. - -- Emerson + -- Ralph Waldo Emerson % A beer delayed is a beer denied. % @@ -6067,7 +6073,7 @@ A billion hours ago man had not yet walk A billion dollars ago was late yesterday afternoon at the U.S. Treasury. % A biologist, a statistician, a mathematician and a computer scientist are on -a photo-safari in Africa. As they're driving along the savanna in their +a photo-safari in Africa. As they're driving along the savannah in their jeep, they stop and scout the horizon with their binoculars. The biologist: "Look! A herd of zebras! And there's a white zebra! @@ -6203,7 +6209,7 @@ invariably sat silent. The monk had alr and a moonlit night. One day he brought to Tortue a piece of string, and asked the same question. In reply, the Grand Tortue grasped the loop between his feet and, with a few simple manipulations, created a complex -string which he proferred wordlessly to the monk. At that moment, the monk +string which he proffered wordlessly to the monk. At that moment, the monk was enlightened. From then on, the monk did not bother Tortue. Instead, he made string after @@ -6261,9 +6267,10 @@ A city is a large community where people % A clash of doctrine is not a disaster - it is an opportunity. % -A classic is something that everyone wants to have read +A classic is something that everybody wants to have read and nobody wants to read. - -- Mark Twain, "The Disappearance of Literature" + -- Mark Twain quoting Professor Winchester, + "The Disappearance of Literature" % A clever prophet makes sure of the event first. % @@ -6438,7 +6445,7 @@ damned things is ample. A couch is as good as a chair. % A countryman between two lawyers is like a fish between two cats. - -- Ben Franklin + -- Benjamin Franklin % A couple of young fellers were fishing at their special pond off the beaten track when out of the bushes jumped the Game Warden. Immediately, @@ -6535,7 +6542,7 @@ A diplomatic husband said to his wife, " your birthday when you never look any older?" % A diplomat's life consists of three things: protocol, Geritol, and alcohol. - -- Adlai Stevenson + -- Adlai E. Stevenson % A distraught patient phoned her doctor's office. "Was it true," the woman inquired, "that the medication the doctor had prescribed was for the rest @@ -6544,7 +6551,7 @@ of her life?" the woman proceeded bravely on. "Well, I'm wondering, then, how serious my condition is. This prescription is marked `NO REFILLS'". % -A diva who specializes in risque arias is an off-coloratura soprano. +A diva who specializes in risqu'e arias is an off-coloratura soprano. % A doctor calls his patient to give him the results of his tests. "I have some bad news," says the doctor, "and some worse news." The bad news is @@ -6708,7 +6715,7 @@ dimension strictly exceeds the topologic -- Mandelbrot, "The Fractal Geometry of Nature" % A free society is one where it is safe to be unpopular. - -- Adlai Stevenson + -- Adlai E. Stevenson % A freelancer is one who gets paid by the word -- per piece or perhaps. -- Robert Benchley @@ -6728,11 +6735,11 @@ lawyers more than he hates his wife. A friend with weed is a friend indeed. % A full belly makes a dull brain. - -- Ben Franklin + -- Benjamin Franklin [and the local candy machine man. Ed] % -A 'full' life in my experience is usually full only of other +A "full" life in my experience is usually full only of other people's demands. % A furore Normanorum libera nos, O Domine! @@ -6782,7 +6789,7 @@ A gift of a flower will soon be made to A girl and a boy bump into each other -- surely an accident. A girl and a boy bump and her handkerchief drops -- surely another accident. But when a girl gives a boy a dead squid -- *_t_h_a_t _h_a_d _t_o _m_e_a_n _s_o_m_e_t_h_i_n_g*. - -- S. Morganstern, "The Silent Gondoliers" + -- S. Morgenstern, "The Silent Gondoliers" % A girl with a future avoids the man with a past. -- Evan Esar, "The Humor of Humor" @@ -6847,7 +6854,7 @@ then asks the backhoe operator for direc A GOOD WAY TO THREATEN somebody is to light a stick of dynamite. Then you call the guy and hold the burning fuse to the phone. "Hear that?" you say. "That's dynamite, baby." - -- Jack Handey, The New Mexican, 1988 + -- Jack Handey, "The New Mexican" (1988) % A gossip is one who talks to you about others, a bore is one who talks to you about himself; and a brilliant conversationalist is one who talks to @@ -6867,7 +6874,7 @@ to take it all away. A grammarian's life is always intense. % A great empire, like a great cake, is most easily diminished at the edges. - -- Ben Franklin + -- Benjamin Franklin % A great many people think they are thinking when they are merely rearranging their prejudices. @@ -6883,7 +6890,7 @@ indicating two directions at once. Full bushy black moustache and, at their corners, sank into little folds filled with disapproval and potato chip crumbs. In the shadow under the green visor of the cap Ignatius J. Reilly's supercilious blue and yellow eyes looked down -upon the other people waiting under the clock at the D.H. Holmes department +upon the other people waiting under the clock at the D. H. Holmes department store, studying the crowd of people for signs of bad taste in dress. Several of the outfits, Ignatius noticed, were new enough and expensive enough to be properly considered offenses against taste and decency. Possession of @@ -6981,19 +6988,19 @@ Stormtroopers, who can't hit the broad s -- Tom Galloway % A is for Amy who fell down the stairs, B is for Basil assaulted by bears. -C is for Clair who wasted away, D is for Desmond thrown out of the sleigh. +C is for Clara who wasted away, D is for Desmond thrown out of the sleigh. E is for Ernest who choked on a peach, F is for Fanny, sucked dry by a leech. G is for George, smothered under a rug, H is for Hector, done in by a thug. I is for Ida who drowned in the lake, J is for James who took lye, by mistake. K is for Kate who was struck with an axe, L is for Leo who swallowed some tacks. -M is for Maud who was swept out to sea, N is for Nevil who died of ennui. +M is for Maud who was swept out to sea, N is for Neville who died of ennui. O is for Olive, run through with an awl, P is for Prue, trampled flat in a brawl -Q is for Quinton who sank in a mire, R is for Rhoda, consumed by a fire. -S is for Susan who parished of fits, T is for Titas who flew into bits. +Q is for Quentin who sank in a mire, R is for Rhoda, consumed by a fire. +S is for Susan who parished of fits, T is for Titus who flew into bits. U is for Una who slipped down a drain, V is for Victor, squashed under a train. -W is for Winie, embedded in ice, X is for Xercies, devoured by mice. -Y is for Yoric whose head was bashed in, Z is for Zilla who drank too much gin. - -- Edward Gorey "The Gastly Crumb Tines" +W is for Winnie, embedded in ice, X is for Xerxes, devoured by mice. +Y is for Yorick whose head was bashed in, Z is for Zillah who drank too much gin. + -- Edward Gorey, "The Gashlycrumb Tinies" % A is for Apple. -- Hester Pryne @@ -7077,7 +7084,7 @@ The lady, indignant, removed her ear. % A language that doesn't affect the way you think about programming is not worth knowing. - -- Alan Perlis + -- Alan J. Perlis % A language that doesn't have everything is actually easier to program in than some that do. @@ -7138,7 +7145,7 @@ A lie in time saves nine. % A lie is an abomination unto the Lord and a very present help in time of trouble. - -- Adlai Stevenson + -- Adlai E. Stevenson % A life lived in fear is a life half lived. % @@ -7160,10 +7167,10 @@ And the clean ones so seldom are comical % A LISP programmer knows the value of everything, but the cost of nothing. - -- Alan Perlis + -- Alan J. Perlis % A list is only as strong as its weakest link. - -- Don Knuth + -- Donald E. Knuth % A little experience often upsets a lot of theory. % @@ -7171,7 +7178,7 @@ A little inaccuracy saves a world of exp -- C. E. Ayres % A little inaccuracy sometimes saves tons of explanation. - -- H. H. Munro, "Saki" + -- H. H. Munroe a.k.a. Saki, "The Square Egg" (1924) % A little kid went up to Santa and asked him, "Santa, you know when I'm bad right?" And Santa says, "Yes, I do." The little kid then asks, "And you @@ -7185,7 +7192,7 @@ those software systems that have excited the products of one or a few designing minds, great designers. Consider Unix, APL, Pascal, Modula, the Smalltalk interface, even Fortran; and contrast them with Cobol, PL/I, Algol, MVS/370, and MS-DOS. - -- Fred Brooks + -- Frederick Brooks, Jr. % A little word of doubtful number, A foe to rest and peaceful slumber. @@ -7208,7 +7215,7 @@ A lot of people are afraid of heights. -- Steven Wright % A lot of people I know believe in positive thinking, -and so do I. I believe everything positively stinks. +and so do I. I believe everything positively stinks. -- Lew Col % A lover without indiscretion is no lover at all. @@ -7228,7 +7235,7 @@ a beautiful woman. Somewhere, somebody' % A man always remembers his first love with special tenderness, but after that begins to bunch them. - -- Mencken + -- H. L. Mencken % A man arrived home early to find his wife in the arms of his best friend, who swore how much they were in love. To quiet the enraged husband, the @@ -7288,7 +7295,7 @@ staggers up to the door and confronts th "I'm sorry, sir, ties required." % A man is known by the company he organizes. - -- A. Bierce + -- Ambrose Bierce % A man is like a rusty wheel on a rusty cart, He sings his song as he rattles along and then he falls apart. @@ -7366,7 +7373,7 @@ Tell, me who is buried here?" "My wife's first husband." % A man who cannot seduce men cannot save them either. - -- Soren Kierkegaard + -- S. A. Kierkegaard (1813-1855) % A man who carries a cat by its tail learns something he can learn in no other way. @@ -7444,7 +7451,7 @@ but to protect the writer. % A method of solution is perfect if we can foresee from the start, and even prove, that following that method we shall attain our aim. - -- Leibnitz + -- Gottfried Wilhelm Leibniz % A Mexican newspaper reports that bored Royal Air Force pilots stationed on the Falkland Islands have devised what they consider a marvelous new @@ -7454,28 +7461,24 @@ along it at the water's edge. Perhaps t heads in unison watching the planes go by, and when the pilots turn around and fly back, the birds turn their heads in the opposite direction, like spectators at a slow-motion tennis match. Then, the -paper reports "The pilots fly out to sea and directly to the penguin +paper reports, "The pilots fly out to sea and directly to the penguin colony and overfly it. Heads go up, up, up, and ten thousand penguins fall over gently onto their backs. - -- Audobon Society Magazine - -2001-02-02, from http://news.bbc.co.uk: + -- Audubon Society Magazine -For five weeks, a team from the British Antarctic Survey (BAS) -monitored 1,000 king penguins on the island of South Georgia as -Lynx helicopters passed overhead. - -"Not one king penguin fell over when the helicopters came over," -said team leader Dr Richard Stone. - -"As the aircraft approached, the birds went quiet and stopped +[From the BBC, 2001-02-02: + For five weeks, a team from the British Antarctic Survey (BAS) +monitored 1,000 king penguins on the island of South Georgia as Lynx +helicopters passed overhead. + "Not one king penguin fell over when the helicopters came over," +said team leader Dr. Richard Stone. + "As the aircraft approached, the birds went quiet and stopped calling to each other, and adolescent birds that were not associated with nests began walking away from the noise. Pure animal instinct, really." - -The conclusion, said Dr Stone, is that flights over 305 metres -(1,000 feet) caused "only minor and transitory ecological effects" -on king penguins. + The conclusion, said Dr. Stone, is that flights over 305 metres +(1,000 feet) caused "only minor and transitory ecological effects" on +king penguins.] % A mighty creature is the germ, Though smaller than the pachyderm. @@ -7613,7 +7616,7 @@ A nickel ain't worth a dime anymore. % A "No" uttered from deepest conviction is better and greater than a "Yes" merely uttered to please, or what is worse, to avoid trouble. - -- Mahatma Ghandi + -- Mahatma Gandhi % A novice of the temple once approached the Chief Priest with a question. @@ -7684,12 +7687,12 @@ A person who has something looks at all % A person who is more than casually interested in computers should be well schooled in machine language, since it is a fundamental part of a computer. - -- Donald Knuth + -- Donald E. Knuth % A pessimist is a man who has been compelled to live with an optimist. -- Elbert Hubbard % -A physicist is an atoms way of knowing about atoms. +A physicist is an atom's way of knowing about atoms. -- George Wald % A pickup with three guys in it pulls into the lumber yard. One of the men @@ -7756,7 +7759,7 @@ paycheck?" % A political man can have as his aim the realization of freedom, but he has no means to realize it other than through violence. - -- Jean Paul Sartre + -- Jean-Paul Sartre % A possum must be himself, and being himself he is honest. -- Walt Kelly @@ -7764,7 +7767,7 @@ A possum must be himself, and being hims A pound of salt will not sweeten a single cup of tea. % A power so great, it can only be used for Good or Evil! - -- Firesign Theatre, "The Giant Rat of Summatra" + -- The Firesign Theatre, "The Giant Rat of Sumatra" % A "practical joker" deserves applause for his wit according to its quality. Bastinado is about right. For exceptional wit one might grant keelhauling. @@ -7777,7 +7780,7 @@ A prediction is worth twenty explanation A pretty foot is one of the greatest gifts of nature... please send me your last pair of shoes, already worn out in dancing... so I can have something of yours to press against my heart. - -- Goethe + -- Johann Wolfgang von Goethe % A pretty woman can do anything; an ugly woman must do everything. % @@ -7831,7 +7834,7 @@ when its programs require attention to t % A prohibitionist is the sort of man one wouldn't care to drink with -- even if he drank. - -- Mencken + -- H. L. Mencken % A prominent broadcaster, on a big-game safari in Africa, was taken to a watering hole where the life of the jungle could be observed. As he @@ -8019,7 +8022,7 @@ die and a new generation grows up that i % A sect or party is an elegant incognito devised to save a man from the vexation of thinking. - -- Ralph Waldo Emerson, Journals, 1831 + -- Ralph Waldo Emerson, "Journals" (1831) % A sense of desolation and uncertainty, of futility, of the baselessness of aspirations, of the vanity of endeavor, and a thirst for a life giving @@ -8197,7 +8200,7 @@ Lord of the Rings LITE(tm) Some guys take a long vacation to throw a ring into a volcano. Hamlet LITE(tm) - -- by Wm. Shakespeare + -- by William Shakespeare A college student on vacation with family problems, a screwy girl-friend and a mother who won't act her age. @@ -8210,7 +8213,7 @@ A Tale of Two Cities LITE(tm) lady who knits. Crime and Punishment LITE(tm) - -- by Fyodor Dostoevski + -- by Fyodor Dostoyevsky A man sends a nasty letter to a pawnbroker, but later *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue Apr 13 20:47:13 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 994D8106564A; Tue, 13 Apr 2010 20:47:13 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85D288FC1C; Tue, 13 Apr 2010 20:47:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3DKlDso060620; Tue, 13 Apr 2010 20:47:13 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DKlB2l060616; Tue, 13 Apr 2010 20:47:11 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201004132047.o3DKlB2l060616@svn.freebsd.org> From: Doug Barton Date: Tue, 13 Apr 2010 20:47:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206567 - in stable/7/games/fortune: . datfiles X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 20:47:13 -0000 Author: dougb Date: Tue Apr 13 20:47:11 2010 New Revision: 206567 URL: http://svn.freebsd.org/changeset/base/206567 Log: MFC r205995: Massive cleanup and synchronization with other *BSDs Modified: stable/7/games/fortune/Notes stable/7/games/fortune/datfiles/fortunes stable/7/games/fortune/datfiles/fortunes-o.real stable/7/games/fortune/datfiles/fortunes.sp.ok stable/7/games/fortune/datfiles/limerick stable/7/games/fortune/datfiles/startrek stable/7/games/fortune/datfiles/zippy Directory Properties: stable/7/games/fortune/ (props changed) stable/7/games/fortune/datfiles/ (props changed) stable/7/games/fortune/datfiles/freebsd-tips (props changed) stable/7/games/fortune/fortune/ (props changed) Modified: stable/7/games/fortune/Notes ============================================================================== --- stable/7/games/fortune/Notes Tue Apr 13 20:44:16 2010 (r206566) +++ stable/7/games/fortune/Notes Tue Apr 13 20:47:11 2010 (r206567) @@ -19,13 +19,13 @@ Warning: /usr/share/games/fortune. A fortune file has two parts: the source file (which contains the fortunes themselves) and the data file which describes the fortunes. The data file always has the same name as the fortune file -with the string ".dat" concatenated, i.e. "fort" is the standard fortune -database, and "fort.dat" is the data file which describes it. See +with the string ".dat" concatenated, i.e. "fortunes" is the standard fortune +database, and "fortunes.dat" is the data file which describes it. See strfile(8) for more information on creating the data files. Fortunes are split into potentially offensive and not potentially offensive parts. The offensive version of a file has the same name as the -non-offensive version with "-o" concatenated, i.e. "fort" is the standard -fortune database, and "fort-o" is the standard offensive database. The +non-offensive version with "-o" concatenated, i.e. "fortunes" is the standard +fortune database, and "fortunes-o" is the standard offensive database. The fortune program automatically assumes that any file with a name ending in "-o" is potentially offensive, and should therefore only be displayed if explicitly requested, either with the -o option or by specifying a file name @@ -42,10 +42,10 @@ MUST be in the potentially offensive dat explicit language (see George Carlin's recent updated list) MUST be in the potentially offensive database. Political and religious opinions are often sequestered in the potentially offensive section as well. Anything which -assumes as a world view blatantly racist, mysogynist (sexist), or homophobic +assumes as a world view blatantly racist, misogynist (sexist), or homophobic ideas should not be in either, since they are not really funny unless *you* -are racist, mysogynist, or homophobic. - The point of this is that people have should have a reasonable +are racist, misogynist, or homophobic. + The point of this is that people should have a reasonable expectation that, should they just run "fortune", they will not be offended. We know that some people take offense at anything, but normal people do have opinions, too, and have a right not to have their sensibilities offended by @@ -53,7 +53,7 @@ a program which is supposed to be entert -o" or "fortune -a" are saying, in effect, that they are willing to have their sensibilities tweaked. However, they should not have their personal worth seriously (i.e., not in jest) assaulted. Jokes which depend for their -humor on racist, mysogynist, or homophobic stereotypes *do* seriously +humor on racist, misogynist, or homophobic stereotypes *do* seriously assault individual personal worth, and in a general entertainment medium we should be able to get by without it. Modified: stable/7/games/fortune/datfiles/fortunes ============================================================================== --- stable/7/games/fortune/datfiles/fortunes Tue Apr 13 20:44:16 2010 (r206566) +++ stable/7/games/fortune/datfiles/fortunes Tue Apr 13 20:47:11 2010 (r206567) @@ -368,8 +368,10 @@ OR'd together, outta sight! Double bucky, I'd like a whole word of Double bucky, I'm happy I heard of Double bucky, I'd like a whole word of you! - - -- (C) 1978 by Guy L. Steele, Jr. + -- Guy L. Steele, Jr., (C) 1978 + (to Nicholas Wirth, who suggested that an extra bit + be added to terminal codes on 36-bit machines for use + by screen editors.) % Hard Copies and Chmod @@ -834,7 +836,7 @@ would like on it. "Here lies an honest lawyer. "Sorry, but I can't do that," replied the stonecutter. "In this state, it's against the law to bury two people in the same grave. However, -I could put ``here lies an honest lawyer'', if that would be okay." +I could put `here lies an honest lawyer', if that would be okay." "But that won't let people know who it is" protested the lawyer. "Certainly will," retorted the stonecutter. "people will read it and exclaim, "That's Strange!" @@ -1146,7 +1148,7 @@ strings of pearls. The spirit and inten throughout. There should be neither too little nor too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity. - A program should follow the 'Law of Least Astonishment'. What is this + A program should follow the "Law of Least Astonishment." What is this law? It is simply that the program should always respond to the user in the way that astonishes him least. A program, no matter how complex, should act as a single unit. The @@ -1161,7 +1163,7 @@ program. conference and then returned to report to his manager, saying: "What sort of programmers work for other companies? They behaved badly and were unconcerned with appearances. Their hair was long and unkempt and their -clothes were wrinkled and old. They crashed out hospitality suites and they +clothes were wrinkled and old. They crashed our hospitality suites and they made rude noises during my presentation." The manager said: "I should have never sent you to the conference. Those programmers live beyond the physical world. They consider life absurd, @@ -1466,7 +1468,7 @@ generalizable. The general tendency is to over-design the second system, using all the ideas and frills that were cautiously sidetracked on the first one. The result, as Ovid says, is a "big pile". - -- Frederick Brooks, "The Mythical Man Month" + -- Frederick Brooks, Jr., "The Mythical Man-Month" % An eighty-year-old woman is rocking away the afternoon on her porch when she sees an old, tarnished lamp sitting near the steps. She @@ -1513,7 +1515,7 @@ over canoe frames, for my people need tr and we offer you a chance to kill yourself with our ceremonial knife." The Englishman accepts the knife and yells, "God Save the Queen", while plunging the knife into his heart. - The Frenchman removes the knife from the fallen body, and yells, + The Frenchman removes the knife from the fallen body, and yells, "Vive la France", while plunging the knife into his heart. The American removes the knife from the fallen body, and yells, while stabbing himself all over his body, "Here's your lousy canoe!" @@ -1562,7 +1564,7 @@ a postcard?" "The curious incident of the stable dog in the nighttime." "But the dog did nothing in the nighttime." "That was the curious incident." - -- A. Conan Doyle, "Silver Blaze" + -- Sir Arthur Conan Doyle, "Silver Blaze" % Approaching the gates of the monastery, Hakuin found Ken the Zen preaching to a group of disciples. @@ -1609,8 +1611,8 @@ Los Angeles fainted from hyperoxygenatio under the exhaust of a bus until he revived. % Before he became a hermit, Zarathud was a young Priest, and - took great delight in making fools of his opponents in front of -his followers. +took great delight in making fools of his opponents in front of his +followers. One day Zarathud took his students to a pleasant pasture and there he confronted The Sacred Chao while She was contentedly grazing. "Tell me, you dumb beast," demanded the Priest in his @@ -1626,7 +1628,7 @@ Chinese ideogram for NO-THING.) and finds himself no wiser than before," Bokonon tells us. "He is full of murderous resentment of people who are ignorant without having come by their ignorance the hard way." - -- Kurt Vonnegut, "Cat's Cradle" + -- Kurt Vonnegut, Jr., "Cat's Cradle" % Bubba, Jim Bob, and Leroy were fishing out on the lake last November, and, when Bubba tipped his head back to empty the Jim Beam, he fell out of the @@ -1694,7 +1696,7 @@ way I ought to go from here?" the Cat. "I don't care much where--" said Alice. "Then it doesn't matter which way you go," said the Cat. - -- Lewis Carroll + -- Lewis Carroll, "Alice's Adventures in Wonderland" (1865) % Concerning the war in Vietnam, Senator George Aiken of Vermont noted in January, 1966, "I'm not very keen for doves or hawks. I think we need more @@ -1877,7 +1879,7 @@ how to be excellent: "In Search of Excel So the Cleaning Personnel Don't Steal It", etc. -- Dave Barry, "In Search of Excellence" % - Exxon's 'Universe of Energy' tends to the peculiar rather than the + Exxon's "Universe of Energy" tends to the peculiar rather than the humorous ... After [an incomprehensible film montage about wind and sun and rain and strip mines and] two or three minutes of mechanical confusion, the seats locomote through a short tunnel filled with clock-work dinosaurs. @@ -1923,9 +1925,9 @@ of events, there lurks a singular, sinis "MINE! HA-HA!" % "Found it," the Mouse replied rather crossly: -"of course you know what 'it' means." +"of course you know what `it' means." - "I know what 'it' means well enough, when I find a thing," + "I know what `it' means well enough, when I find a thing," said the Duck: "it's generally a frog or a worm. The question is, what did the archbishop find?" @@ -1937,15 +1939,15 @@ such as a "pride of lions" or a "gaggle One of the professors noticed a group of prostitutes down the block, and posed the question, "What name would be given to that group?" The four fell into silence for a moment, as they pondered the possibilities... - At last, one spoke: "How about 'a Jam of Tarts'?" The others nodded + At last, one spoke: "How about `a Jam of Tarts'?" The others nodded in acknowledgment as they continued to consider the problem. A second -professor spoke: "I'd suggest 'an Essay of Trollops.'" Again, the others -nodded. A third spoke: "I propose 'a Flourish of Strumpets.'" +professor spoke: "I'd suggest `an Essay of Trollops.'" Again, the others +nodded. A third spoke: "I propose `a Flourish of Strumpets.'" They continued their walk in silence, until the first professor remarked to the remaining professor, who was the most senior and learned of the four, "You haven't suggested a name for our ladies. What are your thoughts?" - Replied the fourth professor, "'An Anthology of Prose.'" + Replied the fourth professor, "`An Anthology of Prose.'" % Fred noticed his roommate had a black eye upon returning from a dance. "What happened?" @@ -1958,12 +1960,11 @@ and sarcastic?" "Of course not," said a sympathetic friend. "Well," retorted Frank, "neither would Jennifer." % - "Gee, Mudhead, everyone at More Science High has an + "Gee, Mudhead, everyone at Morse Science High has an extracurricular activity except you." "Well, gee, doesn't Louise count?" "Only to ten, Mudhead." - - -- Firesign Theater + -- The Firesign Theatre % "Gentlemen of the jury," said the defense attorney, now beginning to warm to his summation, "the real question here before you is, shall this @@ -2261,7 +2262,7 @@ each other up: the floor.) S-word. Excuse me. Look, Bob, I'm going to have to get back to you. Bob: Fine. - -- Dave Barry + -- Dave Barry, "$#$%#^%!^%&@%@!" % "I don't know what you mean by `glory,'" Alice said Humpty Dumpty smiled contemptuously. "Of course you don't -- @@ -2276,7 +2277,9 @@ less." so many different things." "The question is," said Humpty Dumpty, "which is to be master-- that's all." - -- Lewis Carroll, "Through the Looking Glass" + -- Lewis Carroll, + "Through the Looking-Glass, + and What Alice Found There" (1871) % I for one cannot protest the recent M.T.A. fare hike and the accompanying promises that this would in no way improve service. For @@ -2328,7 +2331,7 @@ operation - namely, to remove those irri "And then he will be sane?" "Then he will be perfectly sane, and a quite admirable citizen." "Thank heaven for science!" said old Yacob. - -- H.G. Wells, "The Country of the Blind" + -- H. G. Wells, "The Country of the Blind" % "I keep seeing spots in front of my eyes." "Did you ever see a doctor?" @@ -2403,7 +2406,7 @@ more simply -- `Never imagine yourself n might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise.'" - -- Lewis Carroll, "Alice in Wonderland" + -- Lewis Carroll, "Alice's Adventures in Wonderland" (1865) % I said, "Preacher, give me strength for round 5." He said, "What you need is to grow up, son." @@ -2567,7 +2570,7 @@ man. Mud-as-man alone could speak. "Certainly," said man. "Then I leave it to you to think of one for all of this," said God. And He went away. - -- Kurt Vonnegut, "Between Time and Timbuktu" + -- Kurt Vonnegut, Jr., "Between Time and Timbuktu" % In the beginning there was data. The data was without form and null, and darkness was upon the face of the console; and the Spirit of @@ -2815,7 +2818,7 @@ guzzled in one gulp and then smashed on the man stuffed the broken bottle in his mouth, munched broken glass and smacked his lips with relish. "Can I, ah, uh, get you another, sir?" the drifter stammered. - "Naw, I gotta git outa here, boy," the man grunted. "Big Mike's + "Naw, I gotta git outta here, boy," the man grunted. "Big Mike's a-comin'." % Love's Drug @@ -3002,7 +3005,7 @@ confirm who I am. -- Captain Freedom % Old Barlow was a crossing-tender at a junction where an express train -demolished an automobile and it's occupants. Being the chief witness, his +demolished an automobile and its occupants. Being the chief witness, his testimony was vitally important. Barlow explained that the night was dark, and he waved his lantern frantically, but the driver of the car paid no attention to the signal. @@ -3072,7 +3075,7 @@ and it was very juicy. I stood up and t when my mother at the kitchen window called my name in a sharp voice. I had to decide quickly. I decided. A rotten Big Boy hitting the target is a memorable sound, like a fat -man doing a belly-flop. With a whoop and a yell the tomatoe came after +man doing a belly-flop. With a whoop and a yell the tomatoee came after me faster than I knew she could run, and grabbed my shirt and was about to brain me when Mother called her name in a sharp voice. And my sister, who was a good person, obeyed and let go -- and burst into tears. I guess she knew that @@ -3164,7 +3167,7 @@ biggest, strongest fish he had ever caug until, finally, he managed to bring it to the surface. Looking of the edge of the boat, he saw the head of this huge fish breaking the surface. Smiling with pride, he reached over the edge to pull the fish up. Unfortunately, he -accidently caught his watch on the edge, and, before he knew it, there was a +accidentally caught his watch on the edge, and, before he knew it, there was a snap, and his watch tumbled into the water next to the fish with a loud "sploosh!" Distracted by this shiny object, the fish made a sudden lunge, simultaneously snapping the line, and swallowing the watch. Sadly, the @@ -3539,12 +3542,14 @@ know." "An uncomfortable sort of age. Now if you'd asked MY advice, I'd have said 'Leave off at seven' -- but it's too late now." "I never ask advice about growing," Alice said indignantly. - "Too proud?" the other enquired. + "Too proud?" the other enquired. Alice felt even more indignant at this suggestion. "I mean," she said, "that one can't help growing older." "ONE can't, perhaps," said Humpty Dumpty; "but TWO can. With proper assistance, you might have left off at seven." - -- Lewis Carroll, "Through the Looking-Glass" + -- Lewis Carroll, + "Through the Looking-Glass, + and What Alice Found There" (1871) % Several students were asked to prove that all odd integers are prime. The first student to try to do this was a math student. "Hmmm... @@ -3732,7 +3737,7 @@ she'd been she said she'd spent the nigh % "That's right; the upper-case shift works fine on the screen, but they're not coming out on the damn printer... Hold? Sure, I'll hold." - -- e.e. cummings last service call + -- e. e. cummings last service call % "The best thing for being sad," replied Merlin, beginning to puff and blow, "is to learn something. That's the only thing that never fails. @@ -3907,7 +3912,7 @@ married! You're a sadist, that's what!" THE LESSER-KNOWN PROGRAMMING LANGUAGES #2: RENE Named after the famous French philosopher and mathematician Rene -DesCartes, RENE is a language used for artificial intelligence. The +Descartes, RENE is a language used for artificial intelligence. The language is being developed at the Chicago Center of Machine Politics and Programming under a grant from the Jane Byrne Victory Fund. A spokesman described the language as "Just as great as dis [sic] city of @@ -4030,7 +4035,9 @@ called 'Ways and Means': but that's onl time completely bewildered. "I was coming to that," the Knight said. "The song really is "A-sitting on a Gate": and the tune's my own invention." - --Lewis Carroll, "Through the Looking Glass" + -- Lewis Carroll, + "Through the Looking-Glass, + and What Alice Found There" (1871) % The only real game in the world, I think, is baseball... You've got to start way down, at the bottom, when you're six or seven years @@ -4065,7 +4072,8 @@ blocks of wood. Opaque, like black pool "The pyramid is opening!" "Which one?" "The one with the ever-widening hole in it!" - -- Firesign Theater, "How Can You Be In Two Places At + -- The Firesign Theatre, + "How Can You Be In Two Places At Once When You're Not Anywhere At All" % The salesman and the system analyst took off to spend a weekend in the @@ -4157,8 +4165,8 @@ make sure that they are Earthlings. The when some guy goes bananas, the cops rope off a sixteen block area around him and call a shrink from the medical school who stands atop a patrol car with a megaphone and shouts, "OK! THIS! ALL! STARTED! WHEN! YOU! WERE! -THREE! YEARS! OLD! ON! ACCOUNT! OF! YOUR MOTHER! RIGHT? SO! LET'S! -TALK! ABOUT! IT!" Down here they don't waste that kind of time. The LAPD +THREE! YEARS! OLD! ON! ACCOUNT! OF! YOUR MOTHER! RIGHT? SO! LET'S! +TALK! ABOUT! IT!" Down here they don't waste that kind of time. The LAPD has SWAT teams composed of guys who make Darth Vader look like Mr. Peepers. Before they go to bust a bookie joint they mortar it first. -- M. Christensen, "A Portland Innocent in LA" @@ -4270,7 +4278,7 @@ you the Widow Miffin?" a small boy asked "Oh, no?" replied the little boy. "Wait 'til you see what they're carrying upstairs!" % - There was a mad scientist (a mad... social... scientist) who kidnaped + There was a mad scientist (a mad... social... scientist) who kidnapped three colleagues, an engineer, a physicist, and a mathematician, and locked each of them in separate cells with plenty of canned food and water but no can opener. @@ -4282,13 +4290,13 @@ and escaped. off the tin cans by throwing them against the wall. She was developing a good pitching arm and a new quantum theory. The mathematician had stacked the unopened cans into a surprising -solution to the kissing problem; his dessicated corpse was propped calmly +solution to the kissing problem; his desiccated corpse was propped calmly against a wall, and this was inscribed on the floor: Theorem: If I can't open these cans, I'll die. Proof: assume the opposite... % There was once a programmer who was attached to the court of the -warlord Wu. The warlord asked the programmer: "Which is easier to design: +warlord of Wu. The warlord asked the programmer: "Which is easier to design: an accounting package or an operating system?" "An operating system," replied the programmer. The warlord uttered an exclamation of disbelief. "Surely an @@ -4328,7 +4336,7 @@ demands from him more than his utmost st sinew and brain and hope and fear and dreams -- and still calls for more. They are fools that think otherwise. No great effort was ever bought. No painting, no music, no poem, no cathedral in stone, no church, no state was -ever raised into being for payment of any kind. No parthenon, no Thermopylae +ever raised into being for payment of any kind. No Parthenon, no Thermopylae was ever built or fought for pay or glory; no Bukhara sacked, or China ground beneath Mongol heel, for loot or power alone. The payment for doing these things was itself the doing of them. @@ -4393,14 +4401,14 @@ be as easily led to beauty as to uglines relations, to joy as to bitterness, be said to be suffering from Hunter Thompson's disease. I don't have it this morning. It comes and goes. This morning I don't have Hunter Thompson's disease. - -- Kurt Vonnegut Jr. on Dr. Hunter S. Thompson: Excerpt + -- Kurt Vonnegut, Jr. on Dr. Hunter S. Thompson: Excerpt from "A Political Disease", Vonnegut's review of "Fear and Loathing: On the Campaign Trail '72" % - To A Quick Young Fox + To A Quick Young Fox: Why jog exquisite bulk, fond crazy vamp, Daft buxom jonquil, zephyr's gawky vice? -Guy fed by work, quiz Jove's xanthic lamp-- +Guy fed by work, quiz Jove's xanthic lamp -- Zow! Qualms by deja vu gyp fox-kin thrice. -- Lazy Dog % @@ -4565,7 +4573,7 @@ let him lie there all night." "Don't worry about that. They have a guard station in front of the White House that's open 24 hours a day. The guards would recognize Colson... and by that time of course his wife would have called the cops and reported -that a bunch of thugs had kidnaped him." +that a bunch of thugs had kidnapped him." "Wouldn't it be a little kinder if you drove about four more blocks and stopped at a phone box to ring the hospital and say, 'Would you mind going around to the front of the White House? There's a naked man lying outside @@ -4574,7 +4582,7 @@ in the street, bleeding to death...'" "It would be quite a story for the newspapers, wouldn't it?" "Yeah, I think it's safe to say we'd see some headlines on that one." -- Hunter S. Thompson, talking to R. Steadman on C. Colson, - ex-Marine captain, now born again, of Watergate fame. + ex-Marine captain, now born again, of Watergate fame. % "Well, it's garish, ugly, and derelicts have used it for a toilet. The rides are dilapidated to the point of being lethal, and could easily @@ -4593,7 +4601,7 @@ an End-user of Very Little Brain, and lo "Well, that was a piece of cake, eh K-9?" "Piece of cake, Master? Radial slice of baked confection ... coefficient of relevance to Key of Time: zero." - -- Dr. Who + -- "Doctor Who" % "We're running out of adjectives to describe our situation. We had crisis, then we went into chaos, and now what do we call this?" said @@ -4691,7 +4699,7 @@ ever happened to me... the most dreadful "Well, it's a highly technical, sensitive instrument we use in computer repair. Being a layman, you probably can't grasp exactly what it does. We call it a two-by-four." - -- Jeff MacNelley, "Shoe" + -- Jeff MacNelly, "Shoe" % "When I drink, *everybody* drinks!" a man shouted to the assembled bar patrons. A loud general cheer went up. After downing his @@ -4860,14 +4868,14 @@ There, that ought to patch it. Dist it "The famous scientific criminal, as famous among crooks as --" "My blushes, Watson," Holmes murmured, in a deprecating voice. "I was about to say 'as he is unknown to the public.'" - -- A. Conan Doyle, "The Valley of Fear" + -- Sir Arthur Conan Doyle, "The Valley of Fear" % "You know, it's at times like this when I'm trapped in a Vogon airlock with a man from Betelgeuse and about to die of asphyxiation in deep space that I really wish I'd listened to what my mother told me when I was young!" "Why, what did she tell you?" - "I don't know, I didn't listen." + "I don't know, I didn't listen!" -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" % "You mean, if you allow the master to be uncivil, to treat you @@ -5076,7 +5084,7 @@ please communicate them by one of the fo ARPA: WastebasketSLMHQ.ARPA UUCP: [berkeley, seismo, harpo]!fubar!thekid!slmhq!wastebasket - Non-network sites: Federal Express to: + Non-network sites: Federal Express to: Wastebasket Room NE43-926 Copernicus, The Moon, 12345-6789 @@ -5223,7 +5231,7 @@ III. Any body passing through solid matt 8. Babes in Boyland 9. Santa's Magic Lap 10. Hot Buttered Elves - -- David Letterman's "Top Ten Christmas Movies in Times + -- David Letterman, "Top Ten Christmas Movies in Times Square" % ... A booming voice says, "Wrong, cretin!", and you notice that you @@ -5337,7 +5345,7 @@ other's private parts. ... computer hardware progress is so fast. No other technology since civilization began has seen six orders of magnitude in performance-price gain in 30 years. - -- Fred Brooks + -- Frederick Brooks, Jr. % ... [concerning quotation marks] even if we *_d_i_d* quote anybody in this business, it probably would be gibberish. @@ -5350,8 +5358,6 @@ introduction of Christianity, have been yet we have not advanced one inch towards uniformity. -- Thomas Jefferson, "Notes on Virginia" % - Eat drink and be merry, for tomorrow they may make it illegal. -% <<<<< EVACUATION ROUTE <<<<< % ... "fire" does not matter, "earth" and "air" and "water" do not matter. @@ -5440,14 +5446,14 @@ legally ... impeccable! -- Individuals who make their abode in vitreous edifices would be well advised to refrain from catapulting projectiles. -- Neophyte's serendipity. --- Exclusive dedication to necessitious chores without interludes of hedonistic +-- Exclusive dedication to necessitous chores without interludes of hedonistic diversion renders John a hebetudinous fellow. -- A revolving concretion of earthy or mineral matter accumulates no congeries of small, green bryophytic plant. -- Abstention from any aleatory undertaking precludes a potential escalation of a lucrative nature. -- Missiles of ligneous or osteal consistency have the potential of fracturing - osseous structure, but appelations will eternally remain innocuous. + osseous structure, but appellations will eternally remain innocuous. % ** MAXIMUM TERMINALS ACTIVE. TRY AGAIN LATER ** % @@ -5492,7 +5498,7 @@ their C programs. -- Robert Firth % ... Our second completely true news item was sent to me by Mr. H. Boyce -Connell Jr. of Atlanta, Ga., where he is involved in a law firm. One +Connell, Jr. of Atlanta, Ga., where he is involved in a law firm. One thing I like about the South is, folks there care about tradition. If somebody gets handed a name like "H. Boyce," he hangs on to it, puts it on his legal stationery, even passes it to his son, rather than do what @@ -5519,7 +5525,7 @@ awareness of the great goals for Man and galled saucepan does not reach 212 degrees Fahrenheit. % ... so long as the people do not care to exercise their freedom, those -who wish to tyrranize will do so; for tyrants are active and ardent, +who wish to tyrannize will do so; for tyrants are active and ardent, and will devote themselves in the name of any number of gods, religious and otherwise, to put shackles upon sleeping men. -- Voltarine de Cleyre @@ -5596,13 +5602,13 @@ cleanersayingIllgetyoumyprettyandyourlit % ... this is an awesome sight. The entire rebel resistance buried under six million hardbound copies of "The Naked Lunch." - -- The Firesign Theater + -- The Firesign Theatre % ... though his invention worked superbly -- his theory was a crock of sewage from beginning to end. -- Vernor Vinge, "The Peace War" % - U X + U X e dUdX, e dX, cosine, secant, tangent, sine, 3.14159... % * UNIX is a Trademark of Bell Laboratories. @@ -5647,7 +5653,7 @@ into doubt. % ... when fits of creativity run strong, more than one programmer or writer has been known to abandon the desktop for the more spacious floor. - -- Fred Brooks + -- Frederick Brooks, Jr. % ... which reminds me of the Carrot family: Ma Carrot, Pa Carrot, and Baby Carrot. One fine spring day they decided to go out for a picnic. They all @@ -5708,20 +5714,20 @@ QED: A sheet of paper is a lazy dog. 10. The city does not employ so called "Wallet Inspectors". -- David Letterman, "Top Ten New York City Pedestrian Tips" % -[1] Alexander the Great was a great general. -[2] Great generals are forewarned. -[3] Forewarned is forearmed. -[4] Four is an even number. -[5] Four is certainly an odd number of arms for a man to have. -[6] The only number that is both even and odd is infinity. +(1) Alexander the Great was a great general. +(2) Great generals are forewarned. +(3) Forewarned is forearmed. +(4) Four is an even number. +(5) Four is certainly an odd number of arms for a man to have. +(6) The only number that is both even and odd is infinity. Therefore, Alexander the Great had an infinite number of arms. % -[1] Alexander the Great was a great general. -[2] Great generals are forewarned. -[3] Forewarned is forearmed. -[4] Four is an even number. -[5] Four is certainly an odd number of arms for a man to have. -[6] The only number that is both even and odd is infinity. +(1) Alexander the Great was a great general. +(2) Great generals are forewarned. +(3) Forewarned is forearmed. +(4) Four is an even number. +(5) Four is certainly an odd number of arms for a man to have. +(6) The only number that is both even and odd is infinity. Therefore, all horses are black. % 1. Avoid fried meats which angry up the blood. @@ -5792,7 +5798,7 @@ you have to (always catch the buyer hung 2. I, David Letterman, will never rent out my farm again. 1. We are stardust. We are golden. We are going to look really stupid to future generations. - -- David Letterman, Top Ten Lessons of Woodstock + -- David Letterman, "Top Ten Lessons of Woodstock" % 10 Reasons Why a Beer is Better Than a Woman: @@ -5801,8 +5807,8 @@ you have to (always catch the buyer hung 3. A beer doesn't think baseball is stupid simply because the guys spit. 4. A beer doesn't give a [expletive deleted] if you keep a bunch of other beers on the side. - 5. A beer will not call you a sexist pig if you say "doberman" instead of - "doberperson". + 5. A beer will not call you a sexist pig if you say "Doberman" instead of + "Doberperson." 6. A beer won't get a job as a DJ and play 5 straight hours of lesbian folk music on yer fave radio station. 7. A beer understands why The Three Stooges are funny. @@ -5820,7 +5826,7 @@ FF buckets of bits on the bus FF buckets of bits on the bus FF buckets of bits Take one down, short it to ground -FE buckets of bits on the bus... +FE buckets of bits on the bus ad infinitum... % @@ -5932,13 +5938,13 @@ It isn't just a good idea, it's the law! What 20th Century U.S. President was almost impeached and what office did he later hold? % -3 syncs represent the trinity - init, the child and the eternal zombie +3 syncs represent the trinity -- init, the child and the eternal zombie process. In doing 3, you're paying homage to each and I think such traditions are important in this shallow, mercurial business we find ourselves in. -- Jordan K. Hubbard % -$3,000,000. +$3,000,000 % 355/113 -- Not the famous irrational number PI, but an incredible simulation. @@ -6050,7 +6056,7 @@ A beautiful woman is a blessing from Hea -- Kipling % A beautiful woman is a picture which drives all beholders nobly mad. - -- Emerson + -- Ralph Waldo Emerson % A beer delayed is a beer denied. % @@ -6067,7 +6073,7 @@ A billion hours ago man had not yet walk A billion dollars ago was late yesterday afternoon at the U.S. Treasury. % A biologist, a statistician, a mathematician and a computer scientist are on -a photo-safari in Africa. As they're driving along the savanna in their +a photo-safari in Africa. As they're driving along the savannah in their jeep, they stop and scout the horizon with their binoculars. The biologist: "Look! A herd of zebras! And there's a white zebra! @@ -6203,7 +6209,7 @@ invariably sat silent. The monk had alr and a moonlit night. One day he brought to Tortue a piece of string, and asked the same question. In reply, the Grand Tortue grasped the loop between his feet and, with a few simple manipulations, created a complex -string which he proferred wordlessly to the monk. At that moment, the monk +string which he proffered wordlessly to the monk. At that moment, the monk was enlightened. From then on, the monk did not bother Tortue. Instead, he made string after @@ -6261,9 +6267,10 @@ A city is a large community where people % A clash of doctrine is not a disaster - it is an opportunity. % -A classic is something that everyone wants to have read +A classic is something that everybody wants to have read and nobody wants to read. - -- Mark Twain, "The Disappearance of Literature" + -- Mark Twain quoting Professor Winchester, + "The Disappearance of Literature" % A clever prophet makes sure of the event first. % @@ -6438,7 +6445,7 @@ damned things is ample. A couch is as good as a chair. % A countryman between two lawyers is like a fish between two cats. - -- Ben Franklin + -- Benjamin Franklin % A couple of young fellers were fishing at their special pond off the beaten track when out of the bushes jumped the Game Warden. Immediately, @@ -6535,7 +6542,7 @@ A diplomatic husband said to his wife, " your birthday when you never look any older?" % A diplomat's life consists of three things: protocol, Geritol, and alcohol. - -- Adlai Stevenson + -- Adlai E. Stevenson % A distraught patient phoned her doctor's office. "Was it true," the woman inquired, "that the medication the doctor had prescribed was for the rest @@ -6544,7 +6551,7 @@ of her life?" the woman proceeded bravely on. "Well, I'm wondering, then, how serious my condition is. This prescription is marked `NO REFILLS'". % -A diva who specializes in risque arias is an off-coloratura soprano. +A diva who specializes in risqu'e arias is an off-coloratura soprano. % A doctor calls his patient to give him the results of his tests. "I have some bad news," says the doctor, "and some worse news." The bad news is @@ -6708,7 +6715,7 @@ dimension strictly exceeds the topologic -- Mandelbrot, "The Fractal Geometry of Nature" % A free society is one where it is safe to be unpopular. - -- Adlai Stevenson + -- Adlai E. Stevenson % A freelancer is one who gets paid by the word -- per piece or perhaps. -- Robert Benchley @@ -6728,11 +6735,11 @@ lawyers more than he hates his wife. A friend with weed is a friend indeed. % A full belly makes a dull brain. - -- Ben Franklin + -- Benjamin Franklin [and the local candy machine man. Ed] % -A 'full' life in my experience is usually full only of other +A "full" life in my experience is usually full only of other people's demands. % A furore Normanorum libera nos, O Domine! @@ -6782,7 +6789,7 @@ A gift of a flower will soon be made to A girl and a boy bump into each other -- surely an accident. A girl and a boy bump and her handkerchief drops -- surely another accident. But when a girl gives a boy a dead squid -- *_t_h_a_t _h_a_d _t_o _m_e_a_n _s_o_m_e_t_h_i_n_g*. - -- S. Morganstern, "The Silent Gondoliers" + -- S. Morgenstern, "The Silent Gondoliers" % A girl with a future avoids the man with a past. -- Evan Esar, "The Humor of Humor" @@ -6847,7 +6854,7 @@ then asks the backhoe operator for direc A GOOD WAY TO THREATEN somebody is to light a stick of dynamite. Then you call the guy and hold the burning fuse to the phone. "Hear that?" you say. "That's dynamite, baby." - -- Jack Handey, The New Mexican, 1988 + -- Jack Handey, "The New Mexican" (1988) % A gossip is one who talks to you about others, a bore is one who talks to you about himself; and a brilliant conversationalist is one who talks to @@ -6867,7 +6874,7 @@ to take it all away. A grammarian's life is always intense. % A great empire, like a great cake, is most easily diminished at the edges. - -- Ben Franklin + -- Benjamin Franklin % A great many people think they are thinking when they are merely rearranging their prejudices. @@ -6883,7 +6890,7 @@ indicating two directions at once. Full bushy black moustache and, at their corners, sank into little folds filled with disapproval and potato chip crumbs. In the shadow under the green visor of the cap Ignatius J. Reilly's supercilious blue and yellow eyes looked down -upon the other people waiting under the clock at the D.H. Holmes department +upon the other people waiting under the clock at the D. H. Holmes department store, studying the crowd of people for signs of bad taste in dress. Several of the outfits, Ignatius noticed, were new enough and expensive enough to be properly considered offenses against taste and decency. Possession of @@ -6981,19 +6988,19 @@ Stormtroopers, who can't hit the broad s -- Tom Galloway % A is for Amy who fell down the stairs, B is for Basil assaulted by bears. -C is for Clair who wasted away, D is for Desmond thrown out of the sleigh. +C is for Clara who wasted away, D is for Desmond thrown out of the sleigh. E is for Ernest who choked on a peach, F is for Fanny, sucked dry by a leech. G is for George, smothered under a rug, H is for Hector, done in by a thug. I is for Ida who drowned in the lake, J is for James who took lye, by mistake. K is for Kate who was struck with an axe, L is for Leo who swallowed some tacks. -M is for Maud who was swept out to sea, N is for Nevil who died of ennui. +M is for Maud who was swept out to sea, N is for Neville who died of ennui. O is for Olive, run through with an awl, P is for Prue, trampled flat in a brawl -Q is for Quinton who sank in a mire, R is for Rhoda, consumed by a fire. -S is for Susan who parished of fits, T is for Titas who flew into bits. +Q is for Quentin who sank in a mire, R is for Rhoda, consumed by a fire. +S is for Susan who parished of fits, T is for Titus who flew into bits. U is for Una who slipped down a drain, V is for Victor, squashed under a train. -W is for Winie, embedded in ice, X is for Xercies, devoured by mice. -Y is for Yoric whose head was bashed in, Z is for Zilla who drank too much gin. - -- Edward Gorey "The Gastly Crumb Tines" +W is for Winnie, embedded in ice, X is for Xerxes, devoured by mice. +Y is for Yorick whose head was bashed in, Z is for Zillah who drank too much gin. + -- Edward Gorey, "The Gashlycrumb Tinies" % A is for Apple. -- Hester Pryne @@ -7077,7 +7084,7 @@ The lady, indignant, removed her ear. % A language that doesn't affect the way you think about programming is not worth knowing. - -- Alan Perlis + -- Alan J. Perlis % A language that doesn't have everything is actually easier to program in than some that do. @@ -7138,7 +7145,7 @@ A lie in time saves nine. % A lie is an abomination unto the Lord and a very present help in time of trouble. - -- Adlai Stevenson + -- Adlai E. Stevenson % A life lived in fear is a life half lived. % @@ -7160,10 +7167,10 @@ And the clean ones so seldom are comical % A LISP programmer knows the value of everything, but the cost of nothing. - -- Alan Perlis + -- Alan J. Perlis % A list is only as strong as its weakest link. - -- Don Knuth + -- Donald E. Knuth % A little experience often upsets a lot of theory. % @@ -7171,7 +7178,7 @@ A little inaccuracy saves a world of exp -- C. E. Ayres % A little inaccuracy sometimes saves tons of explanation. - -- H. H. Munro, "Saki" + -- H. H. Munroe a.k.a. Saki, "The Square Egg" (1924) % A little kid went up to Santa and asked him, "Santa, you know when I'm bad right?" And Santa says, "Yes, I do." The little kid then asks, "And you @@ -7185,7 +7192,7 @@ those software systems that have excited the products of one or a few designing minds, great designers. Consider Unix, APL, Pascal, Modula, the Smalltalk interface, even Fortran; and contrast them with Cobol, PL/I, Algol, MVS/370, and MS-DOS. - -- Fred Brooks + -- Frederick Brooks, Jr. % A little word of doubtful number, A foe to rest and peaceful slumber. @@ -7208,7 +7215,7 @@ A lot of people are afraid of heights. -- Steven Wright % A lot of people I know believe in positive thinking, -and so do I. I believe everything positively stinks. +and so do I. I believe everything positively stinks. -- Lew Col % A lover without indiscretion is no lover at all. @@ -7228,7 +7235,7 @@ a beautiful woman. Somewhere, somebody' % A man always remembers his first love with special tenderness, but after that begins to bunch them. - -- Mencken + -- H. L. Mencken % A man arrived home early to find his wife in the arms of his best friend, who swore how much they were in love. To quiet the enraged husband, the @@ -7288,7 +7295,7 @@ staggers up to the door and confronts th "I'm sorry, sir, ties required." % A man is known by the company he organizes. - -- A. Bierce + -- Ambrose Bierce % A man is like a rusty wheel on a rusty cart, He sings his song as he rattles along and then he falls apart. @@ -7366,7 +7373,7 @@ Tell, me who is buried here?" "My wife's first husband." % A man who cannot seduce men cannot save them either. - -- Soren Kierkegaard + -- S. A. Kierkegaard (1813-1855) % A man who carries a cat by its tail learns something he can learn in no other way. @@ -7444,7 +7451,7 @@ but to protect the writer. % A method of solution is perfect if we can foresee from the start, and even prove, that following that method we shall attain our aim. - -- Leibnitz + -- Gottfried Wilhelm Leibniz % A Mexican newspaper reports that bored Royal Air Force pilots stationed on the Falkland Islands have devised what they consider a marvelous new @@ -7454,28 +7461,24 @@ along it at the water's edge. Perhaps t heads in unison watching the planes go by, and when the pilots turn around and fly back, the birds turn their heads in the opposite direction, like spectators at a slow-motion tennis match. Then, the -paper reports "The pilots fly out to sea and directly to the penguin +paper reports, "The pilots fly out to sea and directly to the penguin colony and overfly it. Heads go up, up, up, and ten thousand penguins fall over gently onto their backs. - -- Audobon Society Magazine - -2001-02-02, from http://news.bbc.co.uk: + -- Audubon Society Magazine -For five weeks, a team from the British Antarctic Survey (BAS) -monitored 1,000 king penguins on the island of South Georgia as -Lynx helicopters passed overhead. - -"Not one king penguin fell over when the helicopters came over," -said team leader Dr Richard Stone. - -"As the aircraft approached, the birds went quiet and stopped +[From the BBC, 2001-02-02: + For five weeks, a team from the British Antarctic Survey (BAS) +monitored 1,000 king penguins on the island of South Georgia as Lynx +helicopters passed overhead. + "Not one king penguin fell over when the helicopters came over," +said team leader Dr. Richard Stone. + "As the aircraft approached, the birds went quiet and stopped calling to each other, and adolescent birds that were not associated with nests began walking away from the noise. Pure animal instinct, really." - -The conclusion, said Dr Stone, is that flights over 305 metres -(1,000 feet) caused "only minor and transitory ecological effects" -on king penguins. + The conclusion, said Dr. Stone, is that flights over 305 metres +(1,000 feet) caused "only minor and transitory ecological effects" on +king penguins.] % A mighty creature is the germ, Though smaller than the pachyderm. @@ -7613,7 +7616,7 @@ A nickel ain't worth a dime anymore. % A "No" uttered from deepest conviction is better and greater than a "Yes" merely uttered to please, or what is worse, to avoid trouble. - -- Mahatma Ghandi + -- Mahatma Gandhi % A novice of the temple once approached the Chief Priest with a question. @@ -7684,12 +7687,12 @@ A person who has something looks at all % A person who is more than casually interested in computers should be well schooled in machine language, since it is a fundamental part of a computer. - -- Donald Knuth + -- Donald E. Knuth % A pessimist is a man who has been compelled to live with an optimist. -- Elbert Hubbard % -A physicist is an atoms way of knowing about atoms. +A physicist is an atom's way of knowing about atoms. -- George Wald % A pickup with three guys in it pulls into the lumber yard. One of the men @@ -7756,7 +7759,7 @@ paycheck?" % A political man can have as his aim the realization of freedom, but he has no means to realize it other than through violence. - -- Jean Paul Sartre + -- Jean-Paul Sartre % A possum must be himself, and being himself he is honest. -- Walt Kelly @@ -7764,7 +7767,7 @@ A possum must be himself, and being hims A pound of salt will not sweeten a single cup of tea. % A power so great, it can only be used for Good or Evil! - -- Firesign Theatre, "The Giant Rat of Summatra" + -- The Firesign Theatre, "The Giant Rat of Sumatra" % A "practical joker" deserves applause for his wit according to its quality. Bastinado is about right. For exceptional wit one might grant keelhauling. @@ -7777,7 +7780,7 @@ A prediction is worth twenty explanation A pretty foot is one of the greatest gifts of nature... please send me your last pair of shoes, already worn out in dancing... so I can have something of yours to press against my heart. - -- Goethe + -- Johann Wolfgang von Goethe % A pretty woman can do anything; an ugly woman must do everything. % @@ -7831,7 +7834,7 @@ when its programs require attention to t % A prohibitionist is the sort of man one wouldn't care to drink with -- even if he drank. - -- Mencken + -- H. L. Mencken % A prominent broadcaster, on a big-game safari in Africa, was taken to a watering hole where the life of the jungle could be observed. As he @@ -8019,7 +8022,7 @@ die and a new generation grows up that i % A sect or party is an elegant incognito devised to save a man from the vexation of thinking. - -- Ralph Waldo Emerson, Journals, 1831 + -- Ralph Waldo Emerson, "Journals" (1831) % A sense of desolation and uncertainty, of futility, of the baselessness of aspirations, of the vanity of endeavor, and a thirst for a life giving @@ -8197,7 +8200,7 @@ Lord of the Rings LITE(tm) Some guys take a long vacation to throw a ring into a volcano. Hamlet LITE(tm) - -- by Wm. Shakespeare + -- by William Shakespeare A college student on vacation with family problems, a screwy girl-friend and a mother who won't act her age. @@ -8210,7 +8213,7 @@ A Tale of Two Cities LITE(tm) lady who knits. Crime and Punishment LITE(tm) - -- by Fyodor Dostoevski + -- by Fyodor Dostoyevsky A man sends a nasty letter to a pawnbroker, but later *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed Apr 14 00:50:19 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 226BD1065777; Wed, 14 Apr 2010 00:50:19 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D3D18FC18; Wed, 14 Apr 2010 00:50:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3E0oIDQ014873; Wed, 14 Apr 2010 00:50:18 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3E0oIGB014871; Wed, 14 Apr 2010 00:50:18 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004140050.o3E0oIGB014871@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 14 Apr 2010 00:50:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206575 - stable/8/sys/dev/msk X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 00:50:19 -0000 Author: yongari Date: Wed Apr 14 00:50:18 2010 New Revision: 206575 URL: http://svn.freebsd.org/changeset/base/206575 Log: MFC r206364: Partial revert r204545. Just relying on status LE ownership of status block seems to cause poor performance. Always read current status index register first and then check status ownership as we had before. Accessing status index register seems to trigger immediate status update if controller have pending status updates. Reported by: Andre Albsmeier siemens dot com> Tested by: Andre Albsmeier siemens dot com> Modified: stable/8/sys/dev/msk/if_msk.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/msk/if_msk.c ============================================================================== --- stable/8/sys/dev/msk/if_msk.c Wed Apr 14 00:50:09 2010 (r206574) +++ stable/8/sys/dev/msk/if_msk.c Wed Apr 14 00:50:18 2010 (r206575) @@ -3327,6 +3327,9 @@ msk_handle_events(struct msk_softc *sc) uint32_t control, status; int cons, len, port, rxprog; + if (sc->msk_stat_cons == CSR_READ_2(sc, STAT_PUT_IDX)) + return (0); + /* Sync status LEs. */ bus_dmamap_sync(sc->msk_stat_tag, sc->msk_stat_map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); @@ -3407,7 +3410,7 @@ msk_handle_events(struct msk_softc *sc) if (rxput[MSK_PORT_B] > 0) msk_rxput(sc->msk_if[MSK_PORT_B]); - return (rxprog > sc->msk_process_limit ? EAGAIN : 0); + return (sc->msk_stat_cons != CSR_READ_2(sc, STAT_PUT_IDX)); } static void From owner-svn-src-stable@FreeBSD.ORG Wed Apr 14 01:09:15 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 277E5106566B; Wed, 14 Apr 2010 01:09:15 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 171FC8FC08; Wed, 14 Apr 2010 01:09:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3E19ECX019174; Wed, 14 Apr 2010 01:09:14 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3E19EwI019172; Wed, 14 Apr 2010 01:09:14 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004140109.o3E19EwI019172@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 14 Apr 2010 01:09:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206576 - stable/7/sys/dev/msk X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 01:09:15 -0000 Author: yongari Date: Wed Apr 14 01:09:14 2010 New Revision: 206576 URL: http://svn.freebsd.org/changeset/base/206576 Log: MFC r206364: Partial revert r204545. Just relying on status LE ownership of status block seems to cause poor performance. Always read current status index register first and then check status ownership as we had before. Accessing status index register seems to trigger immediate status update if controller have pending status updates. Reported by: Andre Albsmeier siemens dot com> Tested by: Andre Albsmeier siemens dot com> Modified: stable/7/sys/dev/msk/if_msk.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Wed Apr 14 00:50:18 2010 (r206575) +++ stable/7/sys/dev/msk/if_msk.c Wed Apr 14 01:09:14 2010 (r206576) @@ -3327,6 +3327,9 @@ msk_handle_events(struct msk_softc *sc) uint32_t control, status; int cons, len, port, rxprog; + if (sc->msk_stat_cons == CSR_READ_2(sc, STAT_PUT_IDX)) + return (0); + /* Sync status LEs. */ bus_dmamap_sync(sc->msk_stat_tag, sc->msk_stat_map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); @@ -3407,7 +3410,7 @@ msk_handle_events(struct msk_softc *sc) if (rxput[MSK_PORT_B] > 0) msk_rxput(sc->msk_if[MSK_PORT_B]); - return (rxprog > sc->msk_process_limit ? EAGAIN : 0); + return (sc->msk_stat_cons != CSR_READ_2(sc, STAT_PUT_IDX)); } static void From owner-svn-src-stable@FreeBSD.ORG Wed Apr 14 01:12:24 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3E81106564A; Wed, 14 Apr 2010 01:12:24 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 932988FC1E; Wed, 14 Apr 2010 01:12:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3E1COMt019934; Wed, 14 Apr 2010 01:12:24 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3E1CO4c019931; Wed, 14 Apr 2010 01:12:24 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004140112.o3E1CO4c019931@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 14 Apr 2010 01:12:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206577 - in stable/8/sys: dev/re pci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 01:12:24 -0000 Author: yongari Date: Wed Apr 14 01:12:24 2010 New Revision: 206577 URL: http://svn.freebsd.org/changeset/base/206577 Log: MFC r206433: Add preliminary support for 8168E/8111E PCIe controller. While I'm here simplify device description string. Tested by: Michael Beckmann < michael <> apfel dot de > Modified: stable/8/sys/dev/re/if_re.c stable/8/sys/pci/if_rlreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/re/if_re.c ============================================================================== --- stable/8/sys/dev/re/if_re.c Wed Apr 14 01:09:14 2010 (r206576) +++ stable/8/sys/dev/re/if_re.c Wed Apr 14 01:12:24 2010 (r206577) @@ -174,8 +174,7 @@ static struct rl_type re_devs[] = { { RT_VENDORID, RT_DEVICEID_8101E, 0, "RealTek 8101E/8102E/8102EL/8103E PCIe 10/100baseTX" }, { RT_VENDORID, RT_DEVICEID_8168, 0, - "RealTek 8168/8168B/8168C/8168CP/8168D/8168DP/" - "8111B/8111C/8111CP/8111DP PCIe Gigabit Ethernet" }, + "RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169, 0, "RealTek 8169/8169S/8169SB(L)/8110S/8110SB(L) Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169SC, 0, @@ -220,6 +219,7 @@ static struct rl_hwrev re_hwrevs[] = { { RL_HWREV_8168CP, RL_8169, "8168CP/8111CP"}, { RL_HWREV_8168D, RL_8169, "8168D/8111D"}, { RL_HWREV_8168DP, RL_8169, "8168DP/8111DP"}, + { RL_HWREV_8168E, RL_8169, "8168E/8111E"}, { 0, 0, NULL } }; @@ -1310,6 +1310,11 @@ re_attach(device_t dev) */ sc->rl_flags |= RL_FLAG_NOJUMBO; break; + case RL_HWREV_8168E: + sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PHYWAKE_PM | + RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | + RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_NOJUMBO; + break; case RL_HWREV_8169_8110SB: case RL_HWREV_8169_8110SBL: case RL_HWREV_8169_8110SC: @@ -1393,6 +1398,8 @@ re_attach(device_t dev) } /* Take PHY out of power down mode. */ + if ((sc->rl_flags & RL_FLAG_PHYWAKE_PM) != 0) + CSR_WRITE_1(sc, RL_PMCH, CSR_READ_1(sc, RL_PMCH) | 0x80); if ((sc->rl_flags & RL_FLAG_PHYWAKE) != 0) { re_gmii_writereg(dev, 1, 0x1f, 0); re_gmii_writereg(dev, 1, 0x0e, 0); @@ -3135,6 +3142,9 @@ re_setwol(struct rl_softc *sc) v |= RL_CFG5_WOL_LANWAKE; CSR_WRITE_1(sc, RL_CFG5, v); + if ((ifp->if_capenable & IFCAP_WOL) != 0 && + (sc->rl_flags & RL_FLAG_PHYWAKE_PM) != 0) + CSR_WRITE_1(sc, RL_PMCH, CSR_READ_1(sc, RL_PMCH) & ~0x80); /* * It seems that hardware resets its link speed to 100Mbps in * power down mode so switching to 100Mbps in driver is not Modified: stable/8/sys/pci/if_rlreg.h ============================================================================== --- stable/8/sys/pci/if_rlreg.h Wed Apr 14 01:09:14 2010 (r206576) +++ stable/8/sys/pci/if_rlreg.h Wed Apr 14 01:12:24 2010 (r206577) @@ -133,6 +133,7 @@ #define RL_GMEDIASTAT 0x006C /* 8 bits */ #define RL_MACDBG 0x006D /* 8 bits, 8168C SPIN2 only */ #define RL_GPIO 0x006E /* 8 bits, 8168C SPIN2 only */ +#define RL_PMCH 0x006F /* 8 bits */ #define RL_MAXRXPKTLEN 0x00DA /* 16 bits, chip multiplies by 8 */ #define RL_GTXSTART 0x0038 /* 8 bits */ @@ -162,6 +163,7 @@ #define RL_HWREV_8102EL_SPIN1 0x24c00000 #define RL_HWREV_8168D 0x28000000 #define RL_HWREV_8168DP 0x28800000 +#define RL_HWREV_8168E 0x2C000000 #define RL_HWREV_8168_SPIN1 0x30000000 #define RL_HWREV_8100E 0x30800000 #define RL_HWREV_8101E 0x34000000 @@ -884,6 +886,7 @@ struct rl_softc { uint32_t rl_flags; #define RL_FLAG_MSI 0x0001 #define RL_FLAG_AUTOPAD 0x0002 +#define RL_FLAG_PHYWAKE_PM 0x0004 #define RL_FLAG_PHYWAKE 0x0008 #define RL_FLAG_NOJUMBO 0x0010 #define RL_FLAG_PAR 0x0020 From owner-svn-src-stable@FreeBSD.ORG Wed Apr 14 01:14:41 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 089B2106566B; Wed, 14 Apr 2010 01:14:41 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EBC5D8FC16; Wed, 14 Apr 2010 01:14:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3E1Eej5020478; Wed, 14 Apr 2010 01:14:40 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3E1EeGL020475; Wed, 14 Apr 2010 01:14:40 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004140114.o3E1EeGL020475@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 14 Apr 2010 01:14:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206578 - in stable/7/sys: dev/re pci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 01:14:41 -0000 Author: yongari Date: Wed Apr 14 01:14:40 2010 New Revision: 206578 URL: http://svn.freebsd.org/changeset/base/206578 Log: MFC r206433: Add preliminary support for 8168E/8111E PCIe controller. While I'm here simplify device description string. Tested by: Michael Beckmann < michael <> apfel dot de > Modified: stable/7/sys/dev/re/if_re.c stable/7/sys/pci/if_rlreg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Wed Apr 14 01:12:24 2010 (r206577) +++ stable/7/sys/dev/re/if_re.c Wed Apr 14 01:14:40 2010 (r206578) @@ -174,8 +174,7 @@ static struct rl_type re_devs[] = { { RT_VENDORID, RT_DEVICEID_8101E, 0, "RealTek 8101E/8102E/8102EL/8103E PCIe 10/100baseTX" }, { RT_VENDORID, RT_DEVICEID_8168, 0, - "RealTek 8168/8168B/8168C/8168CP/8168D/8168DP/" - "8111B/8111C/8111CP/8111DP PCIe Gigabit Ethernet" }, + "RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169, 0, "RealTek 8169/8169S/8169SB(L)/8110S/8110SB(L) Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169SC, 0, @@ -220,6 +219,7 @@ static struct rl_hwrev re_hwrevs[] = { { RL_HWREV_8168CP, RL_8169, "8168CP/8111CP"}, { RL_HWREV_8168D, RL_8169, "8168D/8111D"}, { RL_HWREV_8168DP, RL_8169, "8168DP/8111DP"}, + { RL_HWREV_8168E, RL_8169, "8168E/8111E"}, { 0, 0, NULL } }; @@ -1311,6 +1311,11 @@ re_attach(device_t dev) */ sc->rl_flags |= RL_FLAG_NOJUMBO; break; + case RL_HWREV_8168E: + sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PHYWAKE_PM | + RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | + RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_NOJUMBO; + break; case RL_HWREV_8169_8110SB: case RL_HWREV_8169_8110SBL: case RL_HWREV_8169_8110SC: @@ -1394,6 +1399,8 @@ re_attach(device_t dev) } /* Take PHY out of power down mode. */ + if ((sc->rl_flags & RL_FLAG_PHYWAKE_PM) != 0) + CSR_WRITE_1(sc, RL_PMCH, CSR_READ_1(sc, RL_PMCH) | 0x80); if ((sc->rl_flags & RL_FLAG_PHYWAKE) != 0) { re_gmii_writereg(dev, 1, 0x1f, 0); re_gmii_writereg(dev, 1, 0x0e, 0); @@ -3129,6 +3136,9 @@ re_setwol(struct rl_softc *sc) v |= RL_CFG5_WOL_LANWAKE; CSR_WRITE_1(sc, RL_CFG5, v); + if ((ifp->if_capenable & IFCAP_WOL) != 0 && + (sc->rl_flags & RL_FLAG_PHYWAKE_PM) != 0) + CSR_WRITE_1(sc, RL_PMCH, CSR_READ_1(sc, RL_PMCH) & ~0x80); /* * It seems that hardware resets its link speed to 100Mbps in * power down mode so switching to 100Mbps in driver is not Modified: stable/7/sys/pci/if_rlreg.h ============================================================================== --- stable/7/sys/pci/if_rlreg.h Wed Apr 14 01:12:24 2010 (r206577) +++ stable/7/sys/pci/if_rlreg.h Wed Apr 14 01:14:40 2010 (r206578) @@ -133,6 +133,7 @@ #define RL_GMEDIASTAT 0x006C /* 8 bits */ #define RL_MACDBG 0x006D /* 8 bits, 8168C SPIN2 only */ #define RL_GPIO 0x006E /* 8 bits, 8168C SPIN2 only */ +#define RL_PMCH 0x006F /* 8 bits */ #define RL_MAXRXPKTLEN 0x00DA /* 16 bits, chip multiplies by 8 */ #define RL_GTXSTART 0x0038 /* 8 bits */ @@ -162,6 +163,7 @@ #define RL_HWREV_8102EL_SPIN1 0x24c00000 #define RL_HWREV_8168D 0x28000000 #define RL_HWREV_8168DP 0x28800000 +#define RL_HWREV_8168E 0x2C000000 #define RL_HWREV_8168_SPIN1 0x30000000 #define RL_HWREV_8100E 0x30800000 #define RL_HWREV_8101E 0x34000000 @@ -857,6 +859,7 @@ struct rl_softc { uint32_t rl_flags; #define RL_FLAG_MSI 0x0001 #define RL_FLAG_AUTOPAD 0x0002 +#define RL_FLAG_PHYWAKE_PM 0x0004 #define RL_FLAG_PHYWAKE 0x0008 #define RL_FLAG_NOJUMBO 0x0010 #define RL_FLAG_PAR 0x0020 From owner-svn-src-stable@FreeBSD.ORG Wed Apr 14 01:22:34 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E192106564A; Wed, 14 Apr 2010 01:22:34 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DE8F8FC15; Wed, 14 Apr 2010 01:22:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3E1MYeV022270; Wed, 14 Apr 2010 01:22:34 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3E1MXbC022268; Wed, 14 Apr 2010 01:22:34 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004140122.o3E1MXbC022268@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 14 Apr 2010 01:22:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206579 - stable/8/sys/pci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 01:22:34 -0000 Author: yongari Date: Wed Apr 14 01:22:33 2010 New Revision: 206579 URL: http://svn.freebsd.org/changeset/base/206579 Log: MFC r206436: Consistently use capital letters. Modified: stable/8/sys/pci/if_rlreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/pci/if_rlreg.h ============================================================================== --- stable/8/sys/pci/if_rlreg.h Wed Apr 14 01:14:40 2010 (r206578) +++ stable/8/sys/pci/if_rlreg.h Wed Apr 14 01:22:33 2010 (r206579) @@ -160,7 +160,7 @@ #define RL_HWREV_8169_8110SB 0x10000000 #define RL_HWREV_8169_8110SC 0x18000000 #define RL_HWREV_8102EL 0x24800000 -#define RL_HWREV_8102EL_SPIN1 0x24c00000 +#define RL_HWREV_8102EL_SPIN1 0x24C00000 #define RL_HWREV_8168D 0x28000000 #define RL_HWREV_8168DP 0x28800000 #define RL_HWREV_8168E 0x2C000000 @@ -182,7 +182,7 @@ #define RL_HWREV_8139C 0x74000000 #define RL_HWREV_8139D 0x74400000 #define RL_HWREV_8139CPLUS 0x74800000 -#define RL_HWREV_8101 0x74c00000 +#define RL_HWREV_8101 0x74C00000 #define RL_HWREV_8100 0x78800000 #define RL_HWREV_8169_8110SBL 0x7CC00000 #define RL_HWREV_8169_8110SCE 0x98000000 From owner-svn-src-stable@FreeBSD.ORG Wed Apr 14 01:24:09 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C1DF106566C; Wed, 14 Apr 2010 01:24:09 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C0628FC15; Wed, 14 Apr 2010 01:24:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3E1O9GH022727; Wed, 14 Apr 2010 01:24:09 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3E1O9pi022725; Wed, 14 Apr 2010 01:24:09 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004140124.o3E1O9pi022725@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 14 Apr 2010 01:24:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206581 - stable/7/sys/pci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 01:24:09 -0000 Author: yongari Date: Wed Apr 14 01:24:09 2010 New Revision: 206581 URL: http://svn.freebsd.org/changeset/base/206581 Log: MFC r206436: Consistently use capital letters. Modified: stable/7/sys/pci/if_rlreg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/pci/if_rlreg.h ============================================================================== --- stable/7/sys/pci/if_rlreg.h Wed Apr 14 01:23:00 2010 (r206580) +++ stable/7/sys/pci/if_rlreg.h Wed Apr 14 01:24:09 2010 (r206581) @@ -160,7 +160,7 @@ #define RL_HWREV_8169_8110SB 0x10000000 #define RL_HWREV_8169_8110SC 0x18000000 #define RL_HWREV_8102EL 0x24800000 -#define RL_HWREV_8102EL_SPIN1 0x24c00000 +#define RL_HWREV_8102EL_SPIN1 0x24C00000 #define RL_HWREV_8168D 0x28000000 #define RL_HWREV_8168DP 0x28800000 #define RL_HWREV_8168E 0x2C000000 @@ -182,7 +182,7 @@ #define RL_HWREV_8139C 0x74000000 #define RL_HWREV_8139D 0x74400000 #define RL_HWREV_8139CPLUS 0x74800000 -#define RL_HWREV_8101 0x74c00000 +#define RL_HWREV_8101 0x74C00000 #define RL_HWREV_8100 0x78800000 #define RL_HWREV_8169_8110SBL 0x7CC00000 #define RL_HWREV_8169_8110SCE 0x98000000 From owner-svn-src-stable@FreeBSD.ORG Wed Apr 14 03:13:02 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 758981065673; Wed, 14 Apr 2010 03:13:02 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 625AD8FC08; Wed, 14 Apr 2010 03:13:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3E3D29W047045; Wed, 14 Apr 2010 03:13:02 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3E3D2O6047038; Wed, 14 Apr 2010 03:13:02 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201004140313.o3E3D2O6047038@svn.freebsd.org> From: Rick Macklem Date: Wed, 14 Apr 2010 03:13:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206585 - in stable/8/sys/fs: nfs nfsserver X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 03:13:02 -0000 Author: rmacklem Date: Wed Apr 14 03:13:02 2010 New Revision: 206585 URL: http://svn.freebsd.org/changeset/base/206585 Log: MFC: r205941 This patch should fix handling of byte range locks locally on the server for the experimental nfs server. When enabled by setting vfs.newnfs.locallocks_enable to non-zero, the experimental nfs server will now acquire byte range locks on the file on behalf of NFSv4 clients, such that lock conflicts between the NFSv4 clients and processes running locally on the server, will be recognized and handled correctly. Modified: stable/8/sys/fs/nfs/nfs_commonport.c stable/8/sys/fs/nfs/nfs_commonsubs.c stable/8/sys/fs/nfs/nfs_var.h stable/8/sys/fs/nfs/nfsport.h stable/8/sys/fs/nfs/nfsrvstate.h stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/nfs/nfs_commonport.c ============================================================================== --- stable/8/sys/fs/nfs/nfs_commonport.c Wed Apr 14 01:57:53 2010 (r206584) +++ stable/8/sys/fs/nfs/nfs_commonport.c Wed Apr 14 03:13:02 2010 (r206585) @@ -82,7 +82,8 @@ SYSCTL_STRING(_vfs_newnfs, OID_AUTO, cal */ MALLOC_DEFINE(M_NEWNFSRVCACHE, "NFSD srvcache", "NFSD Server Request Cache"); MALLOC_DEFINE(M_NEWNFSDCLIENT, "NFSD V4client", "NFSD V4 Client Id"); -MALLOC_DEFINE(M_NEWNFSDSTATE, "NFSD V4state", "NFSD V4 State (Openowner, Open, Lockowner, Delegation"); +MALLOC_DEFINE(M_NEWNFSDSTATE, "NFSD V4state", + "NFSD V4 State (Openowner, Open, Lockowner, Delegation"); MALLOC_DEFINE(M_NEWNFSDLOCK, "NFSD V4lock", "NFSD V4 byte range lock"); MALLOC_DEFINE(M_NEWNFSDLOCKFILE, "NFSD lckfile", "NFSD Open/Lock file"); MALLOC_DEFINE(M_NEWNFSSTRING, "NFSD string", "NFSD V4 long string"); @@ -97,7 +98,10 @@ MALLOC_DEFINE(M_NEWNFSCLLOCKOWNER, "NFSC MALLOC_DEFINE(M_NEWNFSCLLOCK, "NFSCL lck", "NFSCL Lock"); MALLOC_DEFINE(M_NEWNFSV4NODE, "NEWNFSnode", "New nfs vnode"); MALLOC_DEFINE(M_NEWNFSDIRECTIO, "NEWdirectio", "New nfs Direct IO buffer"); -MALLOC_DEFINE(M_NEWNFSDIROFF, "Newnfscl_diroff", "New NFS directory offset data"); +MALLOC_DEFINE(M_NEWNFSDIROFF, "NFSCL diroffdiroff", + "New NFS directory offset data"); +MALLOC_DEFINE(M_NEWNFSDROLLBACK, "NFSD rollback", + "New NFS local lock rollback"); /* * Definition of mutex locks. Modified: stable/8/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- stable/8/sys/fs/nfs/nfs_commonsubs.c Wed Apr 14 01:57:53 2010 (r206584) +++ stable/8/sys/fs/nfs/nfs_commonsubs.c Wed Apr 14 03:13:02 2010 (r206585) @@ -1835,6 +1835,19 @@ nfsv4_getref(struct nfsv4lock *lp, int * } /* + * Test for a lock. Return 1 if locked, 0 otherwise. + */ +APPLESTATIC int +nfsv4_testlock(struct nfsv4lock *lp) +{ + + if ((lp->nfslock_lock & NFSV4LOCK_LOCK) == 0 && + lp->nfslock_usecnt == 0) + return (0); + return (1); +} + +/* * Wake up anyone sleeping, waiting for this lock. */ static void Modified: stable/8/sys/fs/nfs/nfs_var.h ============================================================================== --- stable/8/sys/fs/nfs/nfs_var.h Wed Apr 14 01:57:53 2010 (r206584) +++ stable/8/sys/fs/nfs/nfs_var.h Wed Apr 14 03:13:02 2010 (r206585) @@ -251,6 +251,7 @@ int nfsv4_lock(struct nfsv4lock *, int, void nfsv4_unlock(struct nfsv4lock *, int); void nfsv4_relref(struct nfsv4lock *); void nfsv4_getref(struct nfsv4lock *, int *, void *); +int nfsv4_testlock(struct nfsv4lock *); int nfsrv_mtostr(struct nfsrv_descript *, char *, int); int nfsrv_checkutf8(u_int8_t *, int); int newnfs_sndlock(int *); Modified: stable/8/sys/fs/nfs/nfsport.h ============================================================================== --- stable/8/sys/fs/nfs/nfsport.h Wed Apr 14 01:57:53 2010 (r206584) +++ stable/8/sys/fs/nfs/nfsport.h Wed Apr 14 03:13:02 2010 (r206585) @@ -543,6 +543,7 @@ void nfsrvd_rcv(struct socket *, void *, #define NFSSTATESPINLOCK extern struct mtx nfs_state_mutex #define NFSLOCKSTATE() mtx_lock(&nfs_state_mutex) #define NFSUNLOCKSTATE() mtx_unlock(&nfs_state_mutex) +#define NFSSTATEMUTEXPTR (&nfs_state_mutex) #define NFSREQSPINLOCK extern struct mtx nfs_req_mutex #define NFSLOCKREQ() mtx_lock(&nfs_req_mutex) #define NFSUNLOCKREQ() mtx_unlock(&nfs_req_mutex) @@ -678,6 +679,7 @@ MALLOC_DECLARE(M_NEWNFSDIROFF); MALLOC_DECLARE(M_NEWNFSV4NODE); MALLOC_DECLARE(M_NEWNFSDIRECTIO); MALLOC_DECLARE(M_NEWNFSMNT); +MALLOC_DECLARE(M_NEWNFSDROLLBACK); #define M_NFSRVCACHE M_NEWNFSRVCACHE #define M_NFSDCLIENT M_NEWNFSDCLIENT #define M_NFSDSTATE M_NEWNFSDSTATE @@ -696,6 +698,7 @@ MALLOC_DECLARE(M_NEWNFSMNT); #define M_NFSDIROFF M_NEWNFSDIROFF #define M_NFSV4NODE M_NEWNFSV4NODE #define M_NFSDIRECTIO M_NEWNFSDIRECTIO +#define M_NFSDROLLBACK M_NEWNFSDROLLBACK #define NFSINT_SIGMASK(set) \ (SIGISMEMBER(set, SIGINT) || SIGISMEMBER(set, SIGTERM) || \ Modified: stable/8/sys/fs/nfs/nfsrvstate.h ============================================================================== --- stable/8/sys/fs/nfs/nfsrvstate.h Wed Apr 14 01:57:53 2010 (r206584) +++ stable/8/sys/fs/nfs/nfsrvstate.h Wed Apr 14 03:13:02 2010 (r206585) @@ -185,6 +185,17 @@ struct nfslockconflict { }; /* + * This structure is used to keep track of local locks that might need + * to be rolled back. + */ +struct nfsrollback { + LIST_ENTRY(nfsrollback) rlck_list; + uint64_t rlck_first; + uint64_t rlck_end; + int rlck_type; +}; + +/* * This structure refers to a file for which lock(s) and/or open(s) exist. * Searched via hash table on file handle or found via the back pointer from an * open or lock owner. @@ -193,8 +204,12 @@ struct nfslockfile { LIST_HEAD(, nfsstate) lf_open; /* Open list */ LIST_HEAD(, nfsstate) lf_deleg; /* Delegation list */ LIST_HEAD(, nfslock) lf_lock; /* Lock list */ + LIST_HEAD(, nfslock) lf_locallock; /* Local lock list */ + LIST_HEAD(, nfsrollback) lf_rollback; /* Local lock rollback list */ LIST_ENTRY(nfslockfile) lf_hash; /* Hash list entry */ fhandle_t lf_fh; /* The file handle */ + struct nfsv4lock lf_locallock_lck; /* serialize local locking */ + int lf_usecount; /* Ref count for locking */ }; /* Modified: stable/8/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Wed Apr 14 01:57:53 2010 (r206584) +++ stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Wed Apr 14 03:13:02 2010 (r206585) @@ -65,11 +65,11 @@ static void nfsrv_dumpaclient(struct nfs struct nfsd_dumpclients *dumpp); static void nfsrv_freeopenowner(struct nfsstate *stp, int cansleep, NFSPROC_T *p); -static int nfsrv_freeopen(struct nfsstate *stp, int *freedlockp, - int cansleep, NFSPROC_T *p); -static int nfsrv_freelockowner(struct nfsstate *stp, int *freedlockp, - int cansleep, NFSPROC_T *p); -static int nfsrv_freeallnfslocks(struct nfsstate *stp, int *freedlockp, +static int nfsrv_freeopen(struct nfsstate *stp, vnode_t vp, int cansleep, + NFSPROC_T *p); +static void nfsrv_freelockowner(struct nfsstate *stp, vnode_t vp, int cansleep, + NFSPROC_T *p); +static void nfsrv_freeallnfslocks(struct nfsstate *stp, vnode_t vp, int cansleep, NFSPROC_T *p); static void nfsrv_freenfslock(struct nfslock *lop); static void nfsrv_freenfslockfile(struct nfslockfile *lfp); @@ -80,8 +80,8 @@ static void nfsrv_getowner(struct nfssta struct nfsstate **stpp); static int nfsrv_getlockfh(vnode_t vp, u_short flags, struct nfslockfile **new_lfpp, fhandle_t *nfhp, NFSPROC_T *p); -static int nfsrv_getlockfile(u_short flags, - struct nfslockfile **new_lfpp, struct nfslockfile **lfpp, fhandle_t *nfhp); +static int nfsrv_getlockfile(u_short flags, struct nfslockfile **new_lfpp, + struct nfslockfile **lfpp, fhandle_t *nfhp, int lockit); static void nfsrv_insertlock(struct nfslock *new_lop, struct nfslock *insert_lop, struct nfsstate *stp, struct nfslockfile *lfp); static void nfsrv_updatelock(struct nfsstate *stp, struct nfslock **new_lopp, @@ -109,9 +109,20 @@ static time_t nfsrv_leaseexpiry(void); static void nfsrv_delaydelegtimeout(struct nfsstate *stp); static int nfsrv_checkseqid(struct nfsrv_descript *nd, u_int32_t seqid, struct nfsstate *stp, struct nfsrvcache *op); -static void nfsrv_locallocks(vnode_t vp, struct nfslockfile *lfp, - NFSPROC_T *p); static int nfsrv_nootherstate(struct nfsstate *stp); +static int nfsrv_locallock(vnode_t vp, struct nfslockfile *lfp, int flags, + uint64_t first, uint64_t end, struct nfslockconflict *cfp, NFSPROC_T *p); +static void nfsrv_localunlock(vnode_t vp, struct nfslockfile *lfp, + uint64_t init_first, uint64_t init_end, NFSPROC_T *p); +static int nfsrv_dolocal(vnode_t vp, struct nfslockfile *lfp, int flags, + int oldflags, uint64_t first, uint64_t end, struct nfslockconflict *cfp, + NFSPROC_T *p); +static void nfsrv_locallock_rollback(vnode_t vp, struct nfslockfile *lfp, + NFSPROC_T *p); +static void nfsrv_locallock_commit(struct nfslockfile *lfp, int flags, + uint64_t first, uint64_t end); +static void nfsrv_locklf(struct nfslockfile *lfp); +static void nfsrv_unlocklf(struct nfslockfile *lfp); /* * Scan the client list for a match and either return the current one, @@ -683,7 +694,7 @@ nfsrv_dumplocks(vnode_t vp, struct nfsd_ ret = nfsrv_getlockfh(vp, 0, NULL, &nfh, p); NFSLOCKSTATE(); if (!ret) - ret = nfsrv_getlockfile(0, NULL, &lfp, &nfh); + ret = nfsrv_getlockfile(0, NULL, &lfp, &nfh, 0); if (ret) { ldumpp[0].ndlck_clid.nclid_idlen = 0; NFSUNLOCKSTATE(); @@ -927,9 +938,8 @@ nfsrv_cleanclient(struct nfsclient *clp, { struct nfsstate *stp, *nstp; - LIST_FOREACH_SAFE(stp, &clp->lc_open, ls_list, nstp) { + LIST_FOREACH_SAFE(stp, &clp->lc_open, ls_list, nstp) nfsrv_freeopenowner(stp, 1, p); - } } /* @@ -993,7 +1003,10 @@ nfsrv_freedeleg(struct nfsstate *stp) LIST_REMOVE(stp, ls_file); lfp = stp->ls_lfp; if (LIST_EMPTY(&lfp->lf_open) && - LIST_EMPTY(&lfp->lf_lock) && LIST_EMPTY(&lfp->lf_deleg)) + LIST_EMPTY(&lfp->lf_lock) && LIST_EMPTY(&lfp->lf_deleg) && + LIST_EMPTY(&lfp->lf_locallock) && LIST_EMPTY(&lfp->lf_rollback) && + lfp->lf_usecount == 0 && + nfsv4_testlock(&lfp->lf_locallock_lck) == 0) nfsrv_freenfslockfile(lfp); FREE((caddr_t)stp, M_NFSDSTATE); newnfsstats.srvdelegates--; @@ -1031,16 +1044,14 @@ nfsrv_freeopenowner(struct nfsstate *stp * This function frees an open (nfsstate open structure) with all associated * lock_owners and locks. It also frees the nfslockfile structure iff there * are no other opens on the file. - * Must be called with soft clock interrupts disabled. * Returns 1 if it free'd the nfslockfile, 0 otherwise. */ static int -nfsrv_freeopen(struct nfsstate *stp, int *freedlockp, int cansleep, - NFSPROC_T *p) +nfsrv_freeopen(struct nfsstate *stp, vnode_t vp, int cansleep, NFSPROC_T *p) { struct nfsstate *nstp, *tstp; struct nfslockfile *lfp; - int ret = 0, ret2; + int ret; LIST_REMOVE(stp, ls_hash); LIST_REMOVE(stp, ls_list); @@ -1048,28 +1059,27 @@ nfsrv_freeopen(struct nfsstate *stp, int lfp = stp->ls_lfp; /* + * Now, free all lockowners associated with this open. + */ + LIST_FOREACH_SAFE(tstp, &stp->ls_open, ls_list, nstp) + nfsrv_freelockowner(tstp, vp, cansleep, p); + + /* * The nfslockfile is freed here if there are no locks * associated with the open. * If there are locks associated with the open, the * nfslockfile structure can be freed via nfsrv_freelockowner(). * (That is why the call must be here instead of after the loop.) */ - if (LIST_EMPTY(&lfp->lf_open) && LIST_EMPTY(&lfp->lf_lock) && - LIST_EMPTY(&lfp->lf_deleg)) { + if (lfp != NULL && LIST_EMPTY(&lfp->lf_open) && + LIST_EMPTY(&lfp->lf_deleg) && LIST_EMPTY(&lfp->lf_lock) && + LIST_EMPTY(&lfp->lf_locallock) && LIST_EMPTY(&lfp->lf_rollback) && + lfp->lf_usecount == 0 && + (cansleep != 0 || nfsv4_testlock(&lfp->lf_locallock_lck) == 0)) { nfsrv_freenfslockfile(lfp); ret = 1; - } - /* - * Now, free all lockowners associated with this open. - */ - nstp = LIST_FIRST(&stp->ls_open); - while (nstp != LIST_END(&stp->ls_open)) { - tstp = nstp; - nstp = LIST_NEXT(nstp, ls_list); - ret2 = nfsrv_freelockowner(tstp, freedlockp, cansleep, p); - if (ret == 0 && ret2 != 0) - ret = ret2; - } + } else + ret = 0; FREE((caddr_t)stp, M_NFSDSTATE); newnfsstats.srvopens--; nfsrv_openpluslock--; @@ -1078,79 +1088,76 @@ nfsrv_freeopen(struct nfsstate *stp, int /* * Frees a lockowner and all associated locks. - * It also frees the nfslockfile structure, if there are no more - * references to it. - * Must be called with soft clock interrupts disabled. - * Returns 1 if it free'd the nfslockfile structure, 1 otherwise. */ -static int -nfsrv_freelockowner(struct nfsstate *stp, int *freedlockp, int cansleep, +static void +nfsrv_freelockowner(struct nfsstate *stp, vnode_t vp, int cansleep, NFSPROC_T *p) { - int ret; LIST_REMOVE(stp, ls_hash); LIST_REMOVE(stp, ls_list); - ret = nfsrv_freeallnfslocks(stp, freedlockp, cansleep, p); + nfsrv_freeallnfslocks(stp, vp, cansleep, p); if (stp->ls_op) nfsrvd_derefcache(stp->ls_op); FREE((caddr_t)stp, M_NFSDSTATE); newnfsstats.srvlockowners--; nfsrv_openpluslock--; - return (ret); } /* * Free all the nfs locks on a lockowner. - * Returns 1 if it free'd the nfslockfile structure, 0 otherwise. - * If any byte range lock is free'd, *freedlockp is set to 1. */ -static int -nfsrv_freeallnfslocks(struct nfsstate *stp, int *freedlockp, int cansleep, +static void +nfsrv_freeallnfslocks(struct nfsstate *stp, vnode_t vp, int cansleep, NFSPROC_T *p) { struct nfslock *lop, *nlop; - struct nfslockfile *lfp = NULL, *olfp = NULL; - int ret = 0; + struct nfsrollback *rlp, *nrlp; + struct nfslockfile *lfp = NULL; + int gottvp = 0; + vnode_t tvp = NULL; lop = LIST_FIRST(&stp->ls_lock); while (lop != LIST_END(&stp->ls_lock)) { nlop = LIST_NEXT(lop, lo_lckowner); /* - * Since locks off a lockowner are ordered by - * file, you should update the local locks when - * you hit the next file OR the end of the lock - * list. If there are no locks for other owners, - * it must be done before the lockowner is discarded. - * (All this only applies if cansleep == 1.) + * Since all locks should be for the same file, lfp should + * not change. */ - olfp = lfp; - lfp = lop->lo_lfp; - nfsrv_freenfslock(lop); - if (freedlockp) - *freedlockp = 1; - if (LIST_EMPTY(&lfp->lf_open) && LIST_EMPTY(&lfp->lf_lock) && - LIST_EMPTY(&lfp->lf_deleg)) { - if (cansleep) - nfsrv_locallocks(NULL, lfp, p); - nfsrv_freenfslockfile(lfp); - /* - * Set the pointer(s) to this lockowner NULL, - * to indicate it has been free'd and local - * locks discarded already. - */ - if (olfp == lfp) - olfp = NULL; - lfp = NULL; - ret = 1; + if (lfp == NULL) + lfp = lop->lo_lfp; + else if (lfp != lop->lo_lfp) + panic("allnfslocks"); + /* + * If vp is NULL and cansleep != 0, a vnode must be acquired + * from the file handle. This only occurs when called from + * nfsrv_cleanclient(). + */ + if (gottvp == 0) { + if (nfsrv_dolocallocks == 0) + tvp = NULL; + else if (vp == NULL && cansleep != 0) + tvp = nfsvno_getvp(&lfp->lf_fh); + else + tvp = vp; + gottvp = 1; + } + + if (tvp != NULL) { + if (cansleep == 0) + panic("allnfs2"); + nfsrv_localunlock(tvp, lfp, lop->lo_first, + lop->lo_end, p); + LIST_FOREACH_SAFE(rlp, &lfp->lf_rollback, rlck_list, + nrlp) + free(rlp, M_NFSDROLLBACK); + LIST_INIT(&lfp->lf_rollback); } - if (cansleep && olfp != lfp && olfp != NULL) - nfsrv_locallocks(NULL, olfp, p); + nfsrv_freenfslock(lop); lop = nlop; } - if (cansleep && lfp != NULL) - nfsrv_locallocks(NULL, olfp, p); - return (ret); + if (vp == NULL && tvp != NULL) + vput(tvp); } /* @@ -1161,11 +1168,13 @@ static void nfsrv_freenfslock(struct nfslock *lop) { - LIST_REMOVE(lop, lo_lckfile); + if (lop->lo_lckfile.le_prev != NULL) { + LIST_REMOVE(lop, lo_lckfile); + newnfsstats.srvlocks--; + nfsrv_openpluslock--; + } LIST_REMOVE(lop, lo_lckowner); FREE((caddr_t)lop, M_NFSDLOCK); - newnfsstats.srvlocks--; - nfsrv_openpluslock--; } /* @@ -1240,7 +1249,8 @@ nfsrv_getowner(struct nfsstatehead *hp, APPLESTATIC int nfsrv_lockctrl(vnode_t vp, struct nfsstate **new_stpp, struct nfslock **new_lopp, struct nfslockconflict *cfp, - nfsquad_t clientid, nfsv4stateid_t *stateidp, __unused struct nfsexstuff *exp, + nfsquad_t clientid, nfsv4stateid_t *stateidp, + __unused struct nfsexstuff *exp, struct nfsrv_descript *nd, NFSPROC_T *p) { struct nfslock *lop; @@ -1253,9 +1263,11 @@ nfsrv_lockctrl(vnode_t vp, struct nfssta struct nfsstate *stp, *lckstp = NULL; struct nfsclient *clp = NULL; u_int32_t bits; - int error = 0, haslock = 0, ret; - int getlckret, delegation = 0; + int error = 0, haslock = 0, ret, reterr; + int getlckret, delegation = 0, filestruct_locked; fhandle_t nfh; + uint64_t first, end; + uint32_t lock_flags; if (new_stp->ls_flags & (NFSLCK_CHECK | NFSLCK_SETATTR)) { /* @@ -1290,23 +1302,6 @@ nfsrv_lockctrl(vnode_t vp, struct nfssta return (NFSERR_RESOURCE); /* - * For Lock, check for a conflict with a lock held by - * a process running locally on the server now, before - * monkeying with nfsd state. Since the vp is locked, any - * other local calls are blocked during this Op. - */ - if (new_stp->ls_flags & NFSLCK_LOCK) { - if (new_lop->lo_flags & NFSLCK_WRITE) - error = nfsvno_localconflict(vp, F_WRLCK, - new_lop->lo_first, new_lop->lo_end, cfp, p); - else - error = nfsvno_localconflict(vp, F_RDLCK, - new_lop->lo_first, new_lop->lo_end, cfp, p); - if (error) - return (error); - } - - /* * For the lock case, get another nfslock structure, * just in case we need it. * Malloc now, before we start sifting through the linked lists, @@ -1316,6 +1311,9 @@ tryagain: if (new_stp->ls_flags & NFSLCK_LOCK) MALLOC(other_lop, struct nfslock *, sizeof (struct nfslock), M_NFSDLOCK, M_WAITOK); + filestruct_locked = 0; + reterr = 0; + lfp = NULL; /* * Get the lockfile structure for CFH now, so we can do a sanity @@ -1324,22 +1322,41 @@ tryagain: * shouldn't be incremented for this case. * If nfsrv_getlockfile() returns -1, it means "not found", which * will be handled later. + * If we are doing Lock/LockU and local locking is enabled, sleep + * lock the nfslockfile structure. */ getlckret = nfsrv_getlockfh(vp, new_stp->ls_flags, NULL, &nfh, p); NFSLOCKSTATE(); - if (!getlckret) - getlckret = nfsrv_getlockfile(new_stp->ls_flags, NULL, - &lfp, &nfh); - if (getlckret != 0 && getlckret != -1) { - NFSUNLOCKSTATE(); - if (other_lop) - FREE((caddr_t)other_lop, M_NFSDLOCK); - if (haslock) { - NFSLOCKV4ROOTMUTEX(); - nfsv4_unlock(&nfsv4rootfs_lock, 1); - NFSUNLOCKV4ROOTMUTEX(); + if (getlckret == 0) { + if ((new_stp->ls_flags & (NFSLCK_LOCK | NFSLCK_UNLOCK)) != 0 && + nfsrv_dolocallocks != 0 && nd->nd_repstat == 0) { + getlckret = nfsrv_getlockfile(new_stp->ls_flags, NULL, + &lfp, &nfh, 1); + if (getlckret == 0) + filestruct_locked = 1; + } else + getlckret = nfsrv_getlockfile(new_stp->ls_flags, NULL, + &lfp, &nfh, 0); + } + if (getlckret != 0 && getlckret != -1) + reterr = getlckret; + + if (filestruct_locked != 0) { + LIST_INIT(&lfp->lf_rollback); + if ((new_stp->ls_flags & NFSLCK_LOCK)) { + /* + * For local locking, do the advisory locking now, so + * that any conflict can be detected. A failure later + * can be rolled back locally. If an error is returned, + * struct nfslockfile has been unlocked and any local + * locking rolled back. + */ + NFSUNLOCKSTATE(); + reterr = nfsrv_locallock(vp, lfp, + (new_lop->lo_flags & (NFSLCK_READ | NFSLCK_WRITE)), + new_lop->lo_first, new_lop->lo_end, cfp, p); + NFSLOCKSTATE(); } - return (getlckret); } /* @@ -1381,11 +1398,11 @@ tryagain: */ if (error == 0 && (stp->ls_flags & NFSLCK_OPEN) && ((stp->ls_openowner->ls_flags & NFSLCK_NEEDSCONFIRM) || - (getlckret != -1 && stp->ls_lfp != lfp))) + (getlckret == 0 && stp->ls_lfp != lfp))) error = NFSERR_BADSTATEID; if (error == 0 && (stp->ls_flags & (NFSLCK_DELEGREAD | NFSLCK_DELEGWRITE)) && - getlckret != -1 && stp->ls_lfp != lfp) + getlckret == 0 && stp->ls_lfp != lfp) error = NFSERR_BADSTATEID; /* @@ -1398,7 +1415,7 @@ tryagain: */ if (error == 0 && (stp->ls_flags & (NFSLCK_OPEN | NFSLCK_DELEGREAD | NFSLCK_DELEGWRITE)) == 0 && - getlckret != -1 && stp->ls_lfp != lfp) { + getlckret == 0 && stp->ls_lfp != lfp) { #ifdef DIAGNOSTIC printf("Got a lock statid for different file open\n"); #endif @@ -1478,12 +1495,30 @@ tryagain: nfsrv_markstable(clp); /* - * If nd_repstat is set, we can return that now, since the - * seqid# has been incremented. - */ - if (nd->nd_repstat && !error) - error = nd->nd_repstat; - if (error) { + * At this point, either error == NFSERR_BADSTATEID or the + * seqid# has been updated, so we can return any error. + * If error == 0, there may be an error in: + * nd_repstat - Set by the calling function. + * reterr - Set above, if getting the nfslockfile structure + * or acquiring the local lock failed. + * (If both of these are set, nd_repstat should probably be + * returned, since that error was detected before this + * function call.) + */ + if (error != 0 || nd->nd_repstat != 0 || reterr != 0) { + if (error == 0) { + if (nd->nd_repstat != 0) + error = nd->nd_repstat; + else + error = reterr; + } + if (filestruct_locked != 0) { + /* Roll back local locks. */ + NFSUNLOCKSTATE(); + nfsrv_locallock_rollback(vp, lfp, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } NFSUNLOCKSTATE(); if (other_lop) FREE((caddr_t)other_lop, M_NFSDLOCK); @@ -1569,6 +1604,13 @@ tryagain: ((new_stp->ls_flags & (NFSLCK_CHECK|NFSLCK_WRITEACCESS)) == (NFSLCK_CHECK | NFSLCK_WRITEACCESS) && !(mystp->ls_flags & NFSLCK_WRITEACCESS))) { + if (filestruct_locked != 0) { + /* Roll back local locks. */ + NFSUNLOCKSTATE(); + nfsrv_locallock_rollback(vp, lfp, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } NFSUNLOCKSTATE(); if (other_lop) FREE((caddr_t)other_lop, M_NFSDLOCK); @@ -1680,11 +1722,18 @@ tryagain: (new_lop->lo_flags & NFSLCK_WRITE) && (clp != tstp->ls_clp || (tstp->ls_flags & NFSLCK_DELEGREAD)))) { + if (filestruct_locked != 0) { + /* Roll back local locks. */ + NFSUNLOCKSTATE(); + nfsrv_locallock_rollback(vp, lfp, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } ret = nfsrv_delegconflict(tstp, &haslock, p, vp); if (ret) { /* * nfsrv_delegconflict unlocks state when it - * returns non-zero. + * returns non-zero, which it always does. */ if (other_lop) { FREE((caddr_t)other_lop, M_NFSDLOCK); @@ -1696,6 +1745,7 @@ tryagain: } return (ret); } + /* Never gets here. */ } tstp = nstp; } @@ -1706,32 +1756,21 @@ tryagain: * just let it happen.) */ if (new_stp->ls_flags & NFSLCK_UNLOCK) { + first = new_lop->lo_first; + end = new_lop->lo_end; nfsrv_updatelock(stp, new_lopp, &other_lop, lfp); stateidp->seqid = ++(stp->ls_stateid.seqid); stateidp->other[0] = stp->ls_stateid.other[0]; stateidp->other[1] = stp->ls_stateid.other[1]; stateidp->other[2] = stp->ls_stateid.other[2]; - /* - * For a non-empty flp->lf_lock list, I believe - * nfsrv_locallocks() can safely traverse the list, including - * sleeping, for two reasons: - * 1 - The Lock/LockU/Close Ops all require a locked - * vnode for the file and we currently have that. - * 2 - The only other thing that modifies a non-empty - * list is nfsrv_cleanclient() and it is always - * done with the exclusive nfsv4rootfs_lock held. - * Since this Op in progress holds either a shared or - * exclusive lock on nfsv4rootfs_lock, that can't - * happen now. - * However, the structure pointed to by lfp can go - * in many places for an empty list, so that is handled - * by passing a NULL pointer to nfsrv_locallocks(). - * Do that check now, while we are still SMP safe. - */ - if (LIST_EMPTY(&lfp->lf_lock)) - lfp = NULL; + if (filestruct_locked != 0) { + NFSUNLOCKSTATE(); + /* Update the local locks. */ + nfsrv_localunlock(vp, lfp, first, end, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } NFSUNLOCKSTATE(); - nfsrv_locallocks(vp, lfp, p); if (haslock) { NFSLOCKV4ROOTMUTEX(); nfsv4_unlock(&nfsv4rootfs_lock, 1); @@ -1763,6 +1802,13 @@ tryagain: } ret = nfsrv_clientconflict(lop->lo_stp->ls_clp,&haslock,vp,p); if (ret) { + if (filestruct_locked != 0) { + /* Roll back local locks. */ + nfsrv_locallock_rollback(vp, lfp, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + NFSUNLOCKSTATE(); + } /* * nfsrv_clientconflict() unlocks state when it * returns non-zero. @@ -1790,6 +1836,13 @@ tryagain: error = NFSERR_LOCKED; else error = NFSERR_DENIED; + if (filestruct_locked != 0) { + /* Roll back local locks. */ + NFSUNLOCKSTATE(); + nfsrv_locallock_rollback(vp, lfp, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } NFSUNLOCKSTATE(); if (haslock) { NFSLOCKV4ROOTMUTEX(); @@ -1820,6 +1873,9 @@ tryagain: * - exist_lock_owner where lock_owner exists * - open_to_lock_owner with new lock_owner */ + first = new_lop->lo_first; + end = new_lop->lo_end; + lock_flags = new_lop->lo_flags; if (!(new_stp->ls_flags & NFSLCK_OPENTOLOCK)) { nfsrv_updatelock(lckstp, new_lopp, &other_lop, lfp); stateidp->seqid = ++(lckstp->ls_stateid.seqid); @@ -1854,11 +1910,13 @@ tryagain: newnfsstats.srvlockowners++; nfsrv_openpluslock++; } - /* See comment above, w.r.t. nfsrv_locallocks(). */ - if (LIST_EMPTY(&lfp->lf_lock)) - lfp = NULL; + if (filestruct_locked != 0) { + NFSUNLOCKSTATE(); + nfsrv_locallock_commit(lfp, lock_flags, first, end); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } NFSUNLOCKSTATE(); - nfsrv_locallocks(vp, lfp, p); if (haslock) { NFSLOCKV4ROOTMUTEX(); nfsv4_unlock(&nfsv4rootfs_lock, 1); @@ -1984,7 +2042,7 @@ tryagain: error = getfhret; else error = nfsrv_getlockfile(new_stp->ls_flags, &new_lfp, &lfp, - NULL); + NULL, 0); if (new_lfp) FREE((caddr_t)new_lfp, M_NFSDLOCKFILE); if (error) { @@ -2227,7 +2285,7 @@ tryagain: error = getfhret; else error = nfsrv_getlockfile(new_stp->ls_flags, &new_lfp, &lfp, - NULL); + NULL, 0); if (new_lfp) FREE((caddr_t)new_lfp, M_NFSDLOCKFILE); if (error) { @@ -2775,7 +2833,7 @@ nfsrv_openupdate(vnode_t vp, struct nfss struct nfsclient *clp; struct nfslockfile *lfp; u_int32_t bits; - int error, gotstate = 0, len = 0, ret, freedlock; + int error, gotstate = 0, len = 0; u_char client[NFSV4_OPAQUELIMIT]; /* @@ -2863,26 +2921,19 @@ nfsrv_openupdate(vnode_t vp, struct nfss } else if (new_stp->ls_flags & NFSLCK_CLOSE) { ownerstp = stp->ls_openowner; lfp = stp->ls_lfp; - freedlock = 0; - ret = nfsrv_freeopen(stp, &freedlock, 0, p); - /* See comment on nfsrv_lockctrl() w.r.t. locallocks. */ - if (ret) { - lfp = NULL; + if (nfsrv_dolocallocks != 0 && !LIST_EMPTY(&stp->ls_open)) { + /* Get the lf lock */ + nfsrv_locklf(lfp); + NFSUNLOCKSTATE(); + if (nfsrv_freeopen(stp, vp, 1, p) == 0) { + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + NFSUNLOCKSTATE(); + } } else { - if (LIST_EMPTY(&lfp->lf_lock)) - lfp = NULL; - } - /* - * For now, I won't do this. The openowner should be - * free'd in NFSNOOPEN seconds and it will be deref'd then. - if (LIST_EMPTY(&ownerstp->ls_open) && ownerstp->ls_op) { - nfsrvd_derefcache(ownerstp->ls_op); - ownerstp->ls_op = NULL; + (void) nfsrv_freeopen(stp, NULL, 0, p); + NFSUNLOCKSTATE(); } - */ - NFSUNLOCKSTATE(); - if (freedlock && lfp != NULL) - nfsrv_locallocks(vp, lfp, p); } else { /* * Update the share bits, making sure that the new set are a @@ -3024,7 +3075,7 @@ nfsrv_releaselckown(struct nfsstate *new !NFSBCMP(stp->ls_owner, new_stp->ls_owner, stp->ls_ownerlen)){ if (LIST_EMPTY(&stp->ls_lock)) { - (void) nfsrv_freelockowner(stp, NULL, 0, p); + nfsrv_freelockowner(stp, NULL, 0, p); } else { NFSUNLOCKSTATE(); return (NFSERR_LOCKSHELD); @@ -3072,7 +3123,7 @@ nfsrv_getlockfh(vnode_t vp, u_short flag */ static int nfsrv_getlockfile(u_short flags, struct nfslockfile **new_lfpp, - struct nfslockfile **lfpp, fhandle_t *nfhp) + struct nfslockfile **lfpp, fhandle_t *nfhp, int lockit) { struct nfslockfile *lfp; fhandle_t *fhp = NULL, *tfhp; @@ -3096,6 +3147,8 @@ nfsrv_getlockfile(u_short flags, struct LIST_FOREACH(lfp, hp, lf_hash) { tfhp = &lfp->lf_fh; if (NFSVNO_CMPFH(fhp, tfhp)) { + if (lockit) + nfsrv_locklf(lfp); *lfpp = lfp; return (0); } @@ -3109,6 +3162,11 @@ nfsrv_getlockfile(u_short flags, struct LIST_INIT(&new_lfp->lf_open); LIST_INIT(&new_lfp->lf_lock); LIST_INIT(&new_lfp->lf_deleg); + LIST_INIT(&new_lfp->lf_locallock); + LIST_INIT(&new_lfp->lf_rollback); + new_lfp->lf_locallock_lck.nfslock_usecnt = 0; + new_lfp->lf_locallock_lck.nfslock_lock = 0; + new_lfp->lf_usecount = 0; LIST_INSERT_HEAD(hp, new_lfp, lf_hash); *lfpp = new_lfp; *new_lfpp = NULL; @@ -3130,31 +3188,39 @@ nfsrv_insertlock(struct nfslock *new_lop new_lop->lo_stp = stp; new_lop->lo_lfp = lfp; - /* Insert in increasing lo_first order */ - lop = LIST_FIRST(&lfp->lf_lock); - if (lop == LIST_END(&lfp->lf_lock) || - new_lop->lo_first <= lop->lo_first) { - LIST_INSERT_HEAD(&lfp->lf_lock, new_lop, lo_lckfile); - } else { - nlop = LIST_NEXT(lop, lo_lckfile); - while (nlop != LIST_END(&lfp->lf_lock) && - nlop->lo_first < new_lop->lo_first) { - lop = nlop; + if (stp != NULL) { + /* Insert in increasing lo_first order */ + lop = LIST_FIRST(&lfp->lf_lock); + if (lop == LIST_END(&lfp->lf_lock) || + new_lop->lo_first <= lop->lo_first) { + LIST_INSERT_HEAD(&lfp->lf_lock, new_lop, lo_lckfile); + } else { nlop = LIST_NEXT(lop, lo_lckfile); + while (nlop != LIST_END(&lfp->lf_lock) && + nlop->lo_first < new_lop->lo_first) { + lop = nlop; + nlop = LIST_NEXT(lop, lo_lckfile); + } + LIST_INSERT_AFTER(lop, new_lop, lo_lckfile); } - LIST_INSERT_AFTER(lop, new_lop, lo_lckfile); + } else { + new_lop->lo_lckfile.le_prev = NULL; /* list not used */ } /* - * Insert after insert_lop, which is overloaded as stp for + * Insert after insert_lop, which is overloaded as stp or lfp for * an empty list. */ - if ((struct nfsstate *)insert_lop == stp) + if (stp == NULL && (struct nfslockfile *)insert_lop == lfp) + LIST_INSERT_HEAD(&lfp->lf_locallock, new_lop, lo_lckowner); + else if ((struct nfsstate *)insert_lop == stp) LIST_INSERT_HEAD(&stp->ls_lock, new_lop, lo_lckowner); else LIST_INSERT_AFTER(insert_lop, new_lop, lo_lckowner); - newnfsstats.srvlocks++; - nfsrv_openpluslock++; + if (stp != NULL) { + newnfsstats.srvlocks++; + nfsrv_openpluslock++; + } } /* @@ -3180,9 +3246,14 @@ nfsrv_updatelock(struct nfsstate *stp, s */ if (new_lop->lo_flags & NFSLCK_UNLOCK) unlock = 1; - ilop = (struct nfslock *)stp; - lop = LIST_FIRST(&stp->ls_lock); - while (lop != LIST_END(&stp->ls_lock)) { + if (stp != NULL) { + ilop = (struct nfslock *)stp; + lop = LIST_FIRST(&stp->ls_lock); + } else { + ilop = (struct nfslock *)lfp; + lop = LIST_FIRST(&lfp->lf_locallock); + } + while (lop != NULL) { /* * Only check locks for this file that aren't before the start of * new lock's range. @@ -3278,8 +3349,7 @@ nfsrv_updatelock(struct nfsstate *stp, s } ilop = lop; lop = LIST_NEXT(lop, lo_lckowner); - if (myfile && (lop == LIST_END(&stp->ls_lock) || - lop->lo_lfp != lfp)) + if (myfile && (lop == NULL || lop->lo_lfp != lfp)) break; } @@ -4362,7 +4432,7 @@ nfsrv_checkremove(vnode_t vp, int remove tryagain: NFSLOCKSTATE(); if (!error) - error = nfsrv_getlockfile(NFSLCK_CHECK, NULL, &lfp, &nfh); + error = nfsrv_getlockfile(NFSLCK_CHECK, NULL, &lfp, &nfh, 0); if (error) { NFSUNLOCKSTATE(); if (haslock) { @@ -4612,7 +4682,7 @@ nfsrv_checkgetattr(struct nfsrv_descript error = nfsrv_getlockfh(vp, NFSLCK_CHECK, NULL, &nfh, p); NFSLOCKSTATE(); if (!error) - error = nfsrv_getlockfile(NFSLCK_CHECK, NULL, &lfp, &nfh); + error = nfsrv_getlockfile(NFSLCK_CHECK, NULL, &lfp, &nfh, 0); if (error) { NFSUNLOCKSTATE(); if (error == -1) @@ -4783,112 +4853,252 @@ nfsrv_delaydelegtimeout(struct nfsstate } /* - * Go through a lock list and set local locks for all ranges. - * This assumes that the lock list is sorted on increasing - * lo_first and that the list won't change, despite the possibility - * of sleeps. + * This function checks to see if there is any other state associated + * with the openowner for this Open. + * It returns 1 if there is no other state, 0 otherwise. */ -static void -nfsrv_locallocks(vnode_t vp, struct nfslockfile *lfp, - NFSPROC_T *p) +static int +nfsrv_nootherstate(struct nfsstate *stp) { - struct nfslock *lop, *nlop; - vnode_t tvp; - int newcollate, flags = 0; - u_int64_t first = 0x0ull, end = 0x0ull; + struct nfsstate *tstp; - if (!nfsrv_dolocallocks) - return; - /* - * If vp is NULL, a vnode must be aquired from the file - * handle. - */ - if (vp == NULL) { - if (lfp == NULL) - panic("nfsrv_locallocks"); - tvp = nfsvno_getvp(&lfp->lf_fh); - if (tvp == NULL) - return; - } else { - tvp = vp; + LIST_FOREACH(tstp, &stp->ls_openowner->ls_open, ls_list) { + if (tstp != stp || !LIST_EMPTY(&tstp->ls_lock)) + return (0); } + return (1); +} - /* - * If lfp == NULL, the lock list is empty, so just unlock - * everything. - */ - if (lfp == NULL) { - (void) nfsvno_advlock(tvp, F_UNLCK, (u_int64_t)0, - NFS64BITSSET, p); - /* vp can't be NULL */ - return; - } +/* + * Create a list of lock deltas (changes to local byte range locking + * that can be rolled back using the list) and apply the changes via + * nfsvno_advlock(). Optionally, lock the list. It is expected that either + * the rollback or update function will be called after this. + * It returns an error (and rolls back, as required), if any nfsvno_advlock() + * call fails. If it returns an error, it will unlock the list. + */ +static int +nfsrv_locallock(vnode_t vp, struct nfslockfile *lfp, int flags, + uint64_t first, uint64_t end, struct nfslockconflict *cfp, NFSPROC_T *p) +{ + struct nfslock *lop, *nlop; + int error = 0; - /* handle whole file case first */ - lop = LIST_FIRST(&lfp->lf_lock); - if (lop != LIST_END(&lfp->lf_lock) && - lop->lo_first == (u_int64_t)0 && - lop->lo_end == NFS64BITSSET) { - if (lop->lo_flags & NFSLCK_WRITE) - (void) nfsvno_advlock(tvp, F_WRLCK, lop->lo_first, - lop->lo_end, p); - else - (void) nfsvno_advlock(tvp, F_RDLCK, lop->lo_first, - lop->lo_end, p); - if (vp == NULL) - vput(tvp); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed Apr 14 15:00:47 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 344561065676; Wed, 14 Apr 2010 15:00:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 212368FC0A; Wed, 14 Apr 2010 15:00:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3EF0lVw004804; Wed, 14 Apr 2010 15:00:47 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EF0kxW004797; Wed, 14 Apr 2010 15:00:46 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201004141500.o3EF0kxW004797@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Apr 2010 15:00:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206598 - in stable/8/sys: amd64/amd64 amd64/include i386/i386 i386/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 15:00:47 -0000 Author: jhb Date: Wed Apr 14 15:00:46 2010 New Revision: 206598 URL: http://svn.freebsd.org/changeset/base/206598 Log: MFC 205851: Add a handler for the local APIC error interrupt. For now it just prints out the current value of the local APIC error register when the interrupt fires. Modified: stable/8/sys/amd64/amd64/apic_vector.S stable/8/sys/amd64/amd64/local_apic.c stable/8/sys/amd64/include/apicvar.h stable/8/sys/i386/i386/apic_vector.s stable/8/sys/i386/i386/local_apic.c stable/8/sys/i386/include/apicvar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/amd64/apic_vector.S ============================================================================== --- stable/8/sys/amd64/amd64/apic_vector.S Wed Apr 14 13:44:22 2010 (r206597) +++ stable/8/sys/amd64/amd64/apic_vector.S Wed Apr 14 15:00:46 2010 (r206598) @@ -104,6 +104,18 @@ IDTVEC(timerint) MEXITCOUNT jmp doreti +/* + * Local APIC error interrupt handler. + */ + .text + SUPERALIGN_TEXT +IDTVEC(errorint) + PUSH_FRAME + FAKE_MCOUNT(TF_RIP(%rsp)) + call lapic_handle_error + MEXITCOUNT + jmp doreti + #ifdef SMP /* * Global address space TLB shootdown. Modified: stable/8/sys/amd64/amd64/local_apic.c ============================================================================== --- stable/8/sys/amd64/amd64/local_apic.c Wed Apr 14 13:44:22 2010 (r206597) +++ stable/8/sys/amd64/amd64/local_apic.c Wed Apr 14 15:00:46 2010 (r206598) @@ -115,14 +115,12 @@ struct lapic { int la_ioint_irqs[APIC_NUM_IOINTS + 1]; } static lapics[MAX_APIC_ID + 1]; -/* XXX: should thermal be an NMI? */ - /* Global defaults for local APIC LVT entries. */ static struct lvt lvts[LVT_MAX + 1] = { { 1, 1, 1, 1, APIC_LVT_DM_EXTINT, 0 }, /* LINT0: masked ExtINT */ { 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* LINT1: NMI */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_TIMER_INT }, /* Timer */ - { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ + { 1, 1, 0, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT }, /* Thermal */ }; @@ -225,7 +223,10 @@ lapic_init(vm_paddr_t addr) /* Local APIC timer interrupt. */ setidt(APIC_TIMER_INT, IDTVEC(timerint), SDT_SYSIGT, SEL_KPL, 0); - /* XXX: error/thermal interrupts */ + /* Local APIC error interrupt. */ + setidt(APIC_ERROR_INT, IDTVEC(errorint), SDT_SYSIGT, SEL_KPL, 0); + + /* XXX: Thermal interrupt */ } /* @@ -278,7 +279,7 @@ lapic_dump(const char* str) lapic->id, lapic->version, lapic->ldr, lapic->dfr); printf(" lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n", lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr); - printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pcm: 0x%08x\n", + printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pmc: 0x%08x\n", lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error, lapic->lvt_pcint); } @@ -326,7 +327,11 @@ lapic_setup(int boot) lapic_timer_enable_intr(); } - /* XXX: Error and thermal LVTs */ + /* Program error LVT and clear any existing errors. */ + lapic->lvt_error = lvt_mode(la, LVT_ERROR, lapic->lvt_error); + lapic->esr = 0; + + /* XXX: Thermal LVT */ intr_restore(eflags); } @@ -725,18 +730,6 @@ lapic_eoi(void) lapic->eoi = 0; } -/* - * Read the contents of the error status register. We have to write - * to the register first before reading from it. - */ -u_int -lapic_error(void) -{ - - lapic->esr = 0; - return (lapic->esr); -} - void lapic_handle_intr(int vector, struct trapframe *frame) { @@ -863,6 +856,24 @@ lapic_timer_enable_intr(void) lapic->lvt_timer = value; } +void +lapic_handle_error(void) +{ + u_int32_t esr; + + /* + * Read the contents of the error status register. Write to + * the register first before reading from it to force the APIC + * to update its value to indicate any errors that have + * occurred since the previous write to the register. + */ + lapic->esr = 0; + esr = lapic->esr; + + printf("CPU%d: local APIC error 0x%x\n", PCPU_GET(cpuid), esr); + lapic_eoi(); +} + u_int apic_cpuid(u_int apic_id) { Modified: stable/8/sys/amd64/include/apicvar.h ============================================================================== --- stable/8/sys/amd64/include/apicvar.h Wed Apr 14 13:44:22 2010 (r206597) +++ stable/8/sys/amd64/include/apicvar.h Wed Apr 14 15:00:46 2010 (r206598) @@ -179,7 +179,8 @@ struct apic_enumerator { inthand_t IDTVEC(apic_isr1), IDTVEC(apic_isr2), IDTVEC(apic_isr3), IDTVEC(apic_isr4), IDTVEC(apic_isr5), IDTVEC(apic_isr6), - IDTVEC(apic_isr7), IDTVEC(spuriousint), IDTVEC(timerint); + IDTVEC(apic_isr7), IDTVEC(errorint), IDTVEC(spuriousint), + IDTVEC(timerint); extern vm_paddr_t lapic_paddr; extern int apic_cpuids[]; @@ -211,13 +212,13 @@ void lapic_disable_pmc(void); void lapic_dump(const char *str); int lapic_enable_pmc(void); void lapic_eoi(void); -u_int lapic_error(void); int lapic_id(void); void lapic_init(vm_paddr_t addr); int lapic_intr_pending(u_int vector); void lapic_ipi_raw(register_t icrlo, u_int dest); void lapic_ipi_vectored(u_int vector, int dest); int lapic_ipi_wait(int delay); +void lapic_handle_error(void); void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); void lapic_reenable_pmc(void); Modified: stable/8/sys/i386/i386/apic_vector.s ============================================================================== --- stable/8/sys/i386/i386/apic_vector.s Wed Apr 14 13:44:22 2010 (r206597) +++ stable/8/sys/i386/i386/apic_vector.s Wed Apr 14 15:00:46 2010 (r206598) @@ -110,6 +110,19 @@ IDTVEC(timerint) MEXITCOUNT jmp doreti +/* + * Local APIC error interrupt handler. + */ + .text + SUPERALIGN_TEXT +IDTVEC(errorint) + PUSH_FRAME + SET_KERNEL_SREGS + FAKE_MCOUNT(TF_EIP(%esp)) + call lapic_handle_error + MEXITCOUNT + jmp doreti + #ifdef SMP /* * Global address space TLB shootdown. Modified: stable/8/sys/i386/i386/local_apic.c ============================================================================== --- stable/8/sys/i386/i386/local_apic.c Wed Apr 14 13:44:22 2010 (r206597) +++ stable/8/sys/i386/i386/local_apic.c Wed Apr 14 15:00:46 2010 (r206598) @@ -116,14 +116,12 @@ struct lapic { int la_ioint_irqs[APIC_NUM_IOINTS + 1]; } static lapics[MAX_APIC_ID + 1]; -/* XXX: should thermal be an NMI? */ - /* Global defaults for local APIC LVT entries. */ static struct lvt lvts[LVT_MAX + 1] = { { 1, 1, 1, 1, APIC_LVT_DM_EXTINT, 0 }, /* LINT0: masked ExtINT */ { 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* LINT1: NMI */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_TIMER_INT }, /* Timer */ - { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ + { 1, 1, 0, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT }, /* Thermal */ }; @@ -228,7 +226,11 @@ lapic_init(vm_paddr_t addr) setidt(APIC_TIMER_INT, IDTVEC(timerint), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - /* XXX: error/thermal interrupts */ + /* Local APIC error interrupt. */ + setidt(APIC_ERROR_INT, IDTVEC(errorint), SDT_SYS386IGT, SEL_KPL, + GSEL(GCODE_SEL, SEL_KPL)); + + /* XXX: Thermal interrupt */ } /* @@ -281,7 +283,7 @@ lapic_dump(const char* str) lapic->id, lapic->version, lapic->ldr, lapic->dfr); printf(" lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n", lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr); - printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pcm: 0x%08x\n", + printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pmc: 0x%08x\n", lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error, lapic->lvt_pcint); } @@ -329,7 +331,11 @@ lapic_setup(int boot) lapic_timer_enable_intr(); } - /* XXX: Error and thermal LVTs */ + /* Program error LVT and clear any existing errors. */ + lapic->lvt_error = lvt_mode(la, LVT_ERROR, lapic->lvt_error); + lapic->esr = 0; + + /* XXX: Thermal LVT */ intr_restore(eflags); } @@ -725,18 +731,6 @@ lapic_eoi(void) lapic->eoi = 0; } -/* - * Read the contents of the error status register. We have to write - * to the register first before reading from it. - */ -u_int -lapic_error(void) -{ - - lapic->esr = 0; - return (lapic->esr); -} - void lapic_handle_intr(int vector, struct trapframe *frame) { @@ -863,6 +857,24 @@ lapic_timer_enable_intr(void) lapic->lvt_timer = value; } +void +lapic_handle_error(void) +{ + u_int32_t esr; + + /* + * Read the contents of the error status register. Write to + * the register first before reading from it to force the APIC + * to update its value to indicate any errors that have + * occurred since the previous write to the register. + */ + lapic->esr = 0; + esr = lapic->esr; + + printf("CPU%d: local APIC error 0x%x\n", PCPU_GET(cpuid), esr); + lapic_eoi(); +} + u_int apic_cpuid(u_int apic_id) { Modified: stable/8/sys/i386/include/apicvar.h ============================================================================== --- stable/8/sys/i386/include/apicvar.h Wed Apr 14 13:44:22 2010 (r206597) +++ stable/8/sys/i386/include/apicvar.h Wed Apr 14 15:00:46 2010 (r206598) @@ -208,7 +208,8 @@ struct apic_enumerator { inthand_t IDTVEC(apic_isr1), IDTVEC(apic_isr2), IDTVEC(apic_isr3), IDTVEC(apic_isr4), IDTVEC(apic_isr5), IDTVEC(apic_isr6), - IDTVEC(apic_isr7), IDTVEC(spuriousint), IDTVEC(timerint); + IDTVEC(apic_isr7), IDTVEC(errorint), IDTVEC(spuriousint), + IDTVEC(timerint); extern vm_paddr_t lapic_paddr; extern int apic_cpuids[]; @@ -240,13 +241,13 @@ void lapic_disable_pmc(void); void lapic_dump(const char *str); int lapic_enable_pmc(void); void lapic_eoi(void); -u_int lapic_error(void); int lapic_id(void); void lapic_init(vm_paddr_t addr); int lapic_intr_pending(u_int vector); void lapic_ipi_raw(register_t icrlo, u_int dest); void lapic_ipi_vectored(u_int vector, int dest); int lapic_ipi_wait(int delay); +void lapic_handle_error(void); void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); void lapic_reenable_pmc(void); From owner-svn-src-stable@FreeBSD.ORG Wed Apr 14 15:01:49 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA483106564A; Wed, 14 Apr 2010 15:01:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 974EB8FC08; Wed, 14 Apr 2010 15:01:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3EF1nus005086; Wed, 14 Apr 2010 15:01:49 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EF1nnd005076; Wed, 14 Apr 2010 15:01:49 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201004141501.o3EF1nnd005076@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Apr 2010 15:01:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206599 - in stable/7/sys: amd64/amd64 amd64/include i386/i386 i386/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 15:01:49 -0000 Author: jhb Date: Wed Apr 14 15:01:49 2010 New Revision: 206599 URL: http://svn.freebsd.org/changeset/base/206599 Log: MFC 185933,205851: - Add constants for fields in the local APIC error status register. - Add a handler for the local APIC error interrupt. For now it just prints out the current value of the local APIC error register when the interrupt fires. Modified: stable/7/sys/amd64/amd64/apic_vector.S stable/7/sys/amd64/amd64/local_apic.c stable/7/sys/amd64/include/apicreg.h stable/7/sys/amd64/include/apicvar.h stable/7/sys/i386/i386/apic_vector.s stable/7/sys/i386/i386/local_apic.c stable/7/sys/i386/include/apicreg.h stable/7/sys/i386/include/apicvar.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/amd64/apic_vector.S ============================================================================== --- stable/7/sys/amd64/amd64/apic_vector.S Wed Apr 14 15:00:46 2010 (r206598) +++ stable/7/sys/amd64/amd64/apic_vector.S Wed Apr 14 15:01:49 2010 (r206599) @@ -104,6 +104,18 @@ IDTVEC(timerint) MEXITCOUNT jmp doreti +/* + * Local APIC error interrupt handler. + */ + .text + SUPERALIGN_TEXT +IDTVEC(errorint) + PUSH_FRAME + FAKE_MCOUNT(TF_RIP(%rsp)) + call lapic_handle_error + MEXITCOUNT + jmp doreti + #ifdef SMP /* * Global address space TLB shootdown. Modified: stable/7/sys/amd64/amd64/local_apic.c ============================================================================== --- stable/7/sys/amd64/amd64/local_apic.c Wed Apr 14 15:00:46 2010 (r206598) +++ stable/7/sys/amd64/amd64/local_apic.c Wed Apr 14 15:01:49 2010 (r206599) @@ -111,14 +111,12 @@ struct lapic { u_long la_prof_ticks; } static lapics[MAX_APIC_ID + 1]; -/* XXX: should thermal be an NMI? */ - /* Global defaults for local APIC LVT entries. */ static struct lvt lvts[LVT_MAX + 1] = { { 1, 1, 1, 1, APIC_LVT_DM_EXTINT, 0 }, /* LINT0: masked ExtINT */ { 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* LINT1: NMI */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_TIMER_INT }, /* Timer */ - { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ + { 1, 1, 0, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT }, /* Thermal */ }; @@ -224,7 +222,10 @@ lapic_init(vm_paddr_t addr) setidt(APIC_TIMER_INT, IDTVEC(timerint), SDT_SYSIGT, SEL_KPL, 0); ioint_irqs[APIC_TIMER_INT - APIC_IO_INTS] = IRQ_TIMER; - /* XXX: error/thermal interrupts */ + /* Local APIC error interrupt. */ + setidt(APIC_ERROR_INT, IDTVEC(errorint), SDT_SYSIGT, SEL_KPL, 0); + + /* XXX: Thermal interrupt */ } /* @@ -272,7 +273,7 @@ lapic_dump(const char* str) lapic->id, lapic->version, lapic->ldr, lapic->dfr); printf(" lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n", lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr); - printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pcm: 0x%08x\n", + printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pmc: 0x%08x\n", lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error, lapic->lvt_pcint); } @@ -299,6 +300,7 @@ lapic_setup(int boot) /* Program LINT[01] LVT entries. */ lapic->lvt_lint0 = lvt_mode(la, LVT_LINT0, lapic->lvt_lint0); lapic->lvt_lint1 = lvt_mode(la, LVT_LINT1, lapic->lvt_lint1); + /* Program the PMC LVT entry if present. */ if (maxlvt >= LVT_PMC) lapic->lvt_pcint = lvt_mode(la, LVT_PMC, lapic->lvt_pcint); @@ -319,7 +321,11 @@ lapic_setup(int boot) lapic_timer_enable_intr(); } - /* XXX: Error and thermal LVTs */ + /* Program error LVT and clear any existing errors. */ + lapic->lvt_error = lvt_mode(la, LVT_ERROR, lapic->lvt_error); + lapic->esr = 0; + + /* XXX: Thermal LVT */ if (cpu_vendor_id == CPU_VENDOR_AMD) { /* @@ -846,6 +852,24 @@ lapic_timer_enable_intr(void) lapic->lvt_timer = value; } +void +lapic_handle_error(void) +{ + u_int32_t esr; + + /* + * Read the contents of the error status register. Write to + * the register first before reading from it to force the APIC + * to update its value to indicate any errors that have + * occurred since the previous write to the register. + */ + lapic->esr = 0; + esr = lapic->esr; + + printf("CPU%d: local APIC error 0x%x\n", PCPU_GET(cpuid), esr); + lapic_eoi(); +} + /* Request a free IDT vector to be used by the specified IRQ. */ u_int apic_alloc_vector(u_int irq) Modified: stable/7/sys/amd64/include/apicreg.h ============================================================================== --- stable/7/sys/amd64/include/apicreg.h Wed Apr 14 15:00:46 2010 (r206598) +++ stable/7/sys/amd64/include/apicreg.h Wed Apr 14 15:01:49 2010 (r206599) @@ -260,6 +260,14 @@ typedef struct IOAPIC ioapic_t; # define APIC_TPR_INT 0x000000f0 # define APIC_TPR_SUB 0x0000000f +/* fields in ESR */ +#define APIC_ESR_SEND_CS_ERROR 0x00000001 +#define APIC_ESR_RECEIVE_CS_ERROR 0x00000002 +#define APIC_ESR_SEND_ACCEPT 0x00000004 +#define APIC_ESR_RECEIVE_ACCEPT 0x00000008 +#define APIC_ESR_SEND_ILLEGAL_VECTOR 0x00000020 +#define APIC_ESR_RECEIVE_ILLEGAL_VECTOR 0x00000040 +#define APIC_ESR_ILLEGAL_REGISTER 0x00000080 /* fields in ICR_LOW */ #define APIC_VECTOR_MASK 0x000000ff Modified: stable/7/sys/amd64/include/apicvar.h ============================================================================== --- stable/7/sys/amd64/include/apicvar.h Wed Apr 14 15:00:46 2010 (r206598) +++ stable/7/sys/amd64/include/apicvar.h Wed Apr 14 15:01:49 2010 (r206599) @@ -173,7 +173,8 @@ struct apic_enumerator { inthand_t IDTVEC(apic_isr1), IDTVEC(apic_isr2), IDTVEC(apic_isr3), IDTVEC(apic_isr4), IDTVEC(apic_isr5), IDTVEC(apic_isr6), - IDTVEC(apic_isr7), IDTVEC(spuriousint), IDTVEC(timerint); + IDTVEC(apic_isr7), IDTVEC(errorint), IDTVEC(spuriousint), + IDTVEC(timerint); extern vm_paddr_t lapic_paddr; @@ -208,6 +209,7 @@ int lapic_intr_pending(u_int vector); void lapic_ipi_raw(register_t icrlo, u_int dest); void lapic_ipi_vectored(u_int vector, int dest); int lapic_ipi_wait(int delay); +void lapic_handle_error(void); void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); void lapic_reenable_pmc(void); Modified: stable/7/sys/i386/i386/apic_vector.s ============================================================================== --- stable/7/sys/i386/i386/apic_vector.s Wed Apr 14 15:00:46 2010 (r206598) +++ stable/7/sys/i386/i386/apic_vector.s Wed Apr 14 15:01:49 2010 (r206599) @@ -110,6 +110,19 @@ IDTVEC(timerint) MEXITCOUNT jmp doreti +/* + * Local APIC error interrupt handler. + */ + .text + SUPERALIGN_TEXT +IDTVEC(errorint) + PUSH_FRAME + SET_KERNEL_SREGS + FAKE_MCOUNT(TF_EIP(%esp)) + call lapic_handle_error + MEXITCOUNT + jmp doreti + #ifdef SMP /* * Global address space TLB shootdown. Modified: stable/7/sys/i386/i386/local_apic.c ============================================================================== --- stable/7/sys/i386/i386/local_apic.c Wed Apr 14 15:00:46 2010 (r206598) +++ stable/7/sys/i386/i386/local_apic.c Wed Apr 14 15:01:49 2010 (r206599) @@ -111,14 +111,12 @@ struct lapic { u_long la_prof_ticks; } static lapics[MAX_APIC_ID + 1]; -/* XXX: should thermal be an NMI? */ - /* Global defaults for local APIC LVT entries. */ static struct lvt lvts[LVT_MAX + 1] = { { 1, 1, 1, 1, APIC_LVT_DM_EXTINT, 0 }, /* LINT0: masked ExtINT */ { 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* LINT1: NMI */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_TIMER_INT }, /* Timer */ - { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ + { 1, 1, 0, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT }, /* Thermal */ }; @@ -226,7 +224,11 @@ lapic_init(vm_paddr_t addr) GSEL(GCODE_SEL, SEL_KPL)); ioint_irqs[APIC_TIMER_INT - APIC_IO_INTS] = IRQ_TIMER; - /* XXX: error/thermal interrupts */ + /* Local APIC error interrupt. */ + setidt(APIC_ERROR_INT, IDTVEC(errorint), SDT_SYS386IGT, SEL_KPL, + GSEL(GCODE_SEL, SEL_KPL)); + + /* XXX: Thermal interrupt */ } /* @@ -274,7 +276,7 @@ lapic_dump(const char* str) lapic->id, lapic->version, lapic->ldr, lapic->dfr); printf(" lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n", lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr); - printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pcm: 0x%08x\n", + printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pmc: 0x%08x\n", lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error, lapic->lvt_pcint); } @@ -301,6 +303,7 @@ lapic_setup(int boot) /* Program LINT[01] LVT entries. */ lapic->lvt_lint0 = lvt_mode(la, LVT_LINT0, lapic->lvt_lint0); lapic->lvt_lint1 = lvt_mode(la, LVT_LINT1, lapic->lvt_lint1); + /* Program the PMC LVT entry if present. */ if (maxlvt >= LVT_PMC) lapic->lvt_pcint = lvt_mode(la, LVT_PMC, lapic->lvt_pcint); @@ -321,7 +324,11 @@ lapic_setup(int boot) lapic_timer_enable_intr(); } - /* XXX: Error and thermal LVTs */ + /* Program error LVT and clear any existing errors. */ + lapic->lvt_error = lvt_mode(la, LVT_ERROR, lapic->lvt_error); + lapic->esr = 0; + + /* XXX: Thermal LVT */ if (cpu_vendor_id == CPU_VENDOR_AMD) { /* @@ -848,6 +855,24 @@ lapic_timer_enable_intr(void) lapic->lvt_timer = value; } +void +lapic_handle_error(void) +{ + u_int32_t esr; + + /* + * Read the contents of the error status register. Write to + * the register first before reading from it to force the APIC + * to update its value to indicate any errors that have + * occurred since the previous write to the register. + */ + lapic->esr = 0; + esr = lapic->esr; + + printf("CPU%d: local APIC error 0x%x\n", PCPU_GET(cpuid), esr); + lapic_eoi(); +} + /* Request a free IDT vector to be used by the specified IRQ. */ u_int apic_alloc_vector(u_int irq) Modified: stable/7/sys/i386/include/apicreg.h ============================================================================== --- stable/7/sys/i386/include/apicreg.h Wed Apr 14 15:00:46 2010 (r206598) +++ stable/7/sys/i386/include/apicreg.h Wed Apr 14 15:01:49 2010 (r206599) @@ -260,6 +260,14 @@ typedef struct IOAPIC ioapic_t; # define APIC_TPR_INT 0x000000f0 # define APIC_TPR_SUB 0x0000000f +/* fields in ESR */ +#define APIC_ESR_SEND_CS_ERROR 0x00000001 +#define APIC_ESR_RECEIVE_CS_ERROR 0x00000002 +#define APIC_ESR_SEND_ACCEPT 0x00000004 +#define APIC_ESR_RECEIVE_ACCEPT 0x00000008 +#define APIC_ESR_SEND_ILLEGAL_VECTOR 0x00000020 +#define APIC_ESR_RECEIVE_ILLEGAL_VECTOR 0x00000040 +#define APIC_ESR_ILLEGAL_REGISTER 0x00000080 /* fields in ICR_LOW */ #define APIC_VECTOR_MASK 0x000000ff Modified: stable/7/sys/i386/include/apicvar.h ============================================================================== --- stable/7/sys/i386/include/apicvar.h Wed Apr 14 15:00:46 2010 (r206598) +++ stable/7/sys/i386/include/apicvar.h Wed Apr 14 15:01:49 2010 (r206599) @@ -172,7 +172,8 @@ struct apic_enumerator { inthand_t IDTVEC(apic_isr1), IDTVEC(apic_isr2), IDTVEC(apic_isr3), IDTVEC(apic_isr4), IDTVEC(apic_isr5), IDTVEC(apic_isr6), - IDTVEC(apic_isr7), IDTVEC(spuriousint), IDTVEC(timerint); + IDTVEC(apic_isr7), IDTVEC(errorint), IDTVEC(spuriousint), + IDTVEC(timerint); extern vm_paddr_t lapic_paddr; @@ -207,6 +208,7 @@ int lapic_intr_pending(u_int vector); void lapic_ipi_raw(register_t icrlo, u_int dest); void lapic_ipi_vectored(u_int vector, int dest); int lapic_ipi_wait(int delay); +void lapic_handle_error(void); void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); void lapic_reenable_pmc(void); From owner-svn-src-stable@FreeBSD.ORG Wed Apr 14 15:03:59 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15840106564A; Wed, 14 Apr 2010 15:03:59 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 047928FC15; Wed, 14 Apr 2010 15:03:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3EF3wwH005593; Wed, 14 Apr 2010 15:03:58 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EF3wpi005591; Wed, 14 Apr 2010 15:03:58 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201004141503.o3EF3wpi005591@svn.freebsd.org> From: Hajimu UMEMOTO Date: Wed, 14 Apr 2010 15:03:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206600 - stable/8/etc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 15:03:59 -0000 Author: ume Date: Wed Apr 14 15:03:58 2010 New Revision: 206600 URL: http://svn.freebsd.org/changeset/base/206600 Log: MFC r206399, r206479: Disambiguate `IPs' to a more specific term. Modified: stable/8/etc/rc.firewall Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/rc.firewall ============================================================================== --- stable/8/etc/rc.firewall Wed Apr 14 15:01:49 2010 (r206599) +++ stable/8/etc/rc.firewall Wed Apr 14 15:03:58 2010 (r206600) @@ -424,13 +424,15 @@ case ${firewall_type} in # Configuration: # firewall_myservices: List of TCP ports on which this host # offers services. - # firewall_allowservices: List of IPs which has access to + # firewall_allowservices: List of IPv4 and/or IPv6 addresses + # that have access to # $firewall_myservices. - # firewall_trusted: List of IPs which has full access - # to this host. Be very carefull - # when setting this. This option can - # seriously degrade the level of - # protection provided by the firewall. + # firewall_trusted: List of IPv4 and/or IPv6 addresses + # that have full access to this host. + # Be very careful when setting this. + # This option can seriously degrade + # the level of protection provided by + # the firewall. # firewall_logdeny: Boolean (YES/NO) specifying if the # default denied packets should be # logged (in /var/log/security). From owner-svn-src-stable@FreeBSD.ORG Wed Apr 14 15:20:30 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A030E106564A; Wed, 14 Apr 2010 15:20:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EDFE8FC08; Wed, 14 Apr 2010 15:20:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3EFKUnE009349; Wed, 14 Apr 2010 15:20:30 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EFKUpe009347; Wed, 14 Apr 2010 15:20:30 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201004141520.o3EFKUpe009347@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Apr 2010 15:20:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206601 - stable/7/lib/libc/sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 15:20:30 -0000 Author: jhb Date: Wed Apr 14 15:20:30 2010 New Revision: 206601 URL: http://svn.freebsd.org/changeset/base/206601 Log: MFC 184226: Add a statement about the non-portability of non-page-aligned offsets. Modified: stable/7/lib/libc/sys/mmap.2 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/sys/mmap.2 ============================================================================== --- stable/7/lib/libc/sys/mmap.2 Wed Apr 14 15:03:58 2010 (r206600) +++ stable/7/lib/libc/sys/mmap.2 Wed Apr 14 15:20:30 2010 (r206601) @@ -28,7 +28,7 @@ .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 .\" $FreeBSD$ .\" -.Dd April 21, 2006 +.Dd October 24, 2008 .Dt MMAP 2 .Os .Sh NAME @@ -252,6 +252,11 @@ In the future we may define an additiona in which the file descriptor argument specifies a file or device to which swapping should be done. +.Sh NOTES +Although this implementation does not impose any alignment restrictions on +the +.Fa offset +argument, a portable program must only use page-aligned values. .Sh RETURN VALUES Upon successful completion, .Fn mmap @@ -307,13 +312,6 @@ was negative. was specified and the .Fa fd argument was not -1. -The -.Fa offset -argument -was not page-aligned. -(See -.Sx BUGS -below.) .It Bq Er ENODEV .Dv MAP_ANON has not been specified and From owner-svn-src-stable@FreeBSD.ORG Wed Apr 14 15:22:59 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27B741065670; Wed, 14 Apr 2010 15:22:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F10FC8FC0A; Wed, 14 Apr 2010 15:22:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3EFMwgh009935; Wed, 14 Apr 2010 15:22:58 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EFMwdj009932; Wed, 14 Apr 2010 15:22:58 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201004141522.o3EFMwdj009932@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Apr 2010 15:22:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206602 - in stable/8: lib/libc/sys sys/vm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 15:22:59 -0000 Author: jhb Date: Wed Apr 14 15:22:58 2010 New Revision: 206602 URL: http://svn.freebsd.org/changeset/base/206602 Log: MFC 205536: Reject attempts to create a MAP_ANON mapping with a non-zero offset. Modified: stable/8/lib/libc/sys/mmap.2 stable/8/sys/vm/vm_mmap.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/lib/libc/sys/mmap.2 ============================================================================== --- stable/8/lib/libc/sys/mmap.2 Wed Apr 14 15:20:30 2010 (r206601) +++ stable/8/lib/libc/sys/mmap.2 Wed Apr 14 15:22:58 2010 (r206602) @@ -105,7 +105,7 @@ The file descriptor used for creating must be \-1. The .Fa offset -argument is ignored. +argument must be 0. .\".It Dv MAP_FILE .\"Mapped from a regular file or character-special device memory. .It Dv MAP_FIXED @@ -312,6 +312,11 @@ was equal to zero. was specified and the .Fa fd argument was not -1. +.It Bq Er EINVAL +.Dv MAP_ANON +was specified and the +.Fa offset +argument was not 0. .It Bq Er ENODEV .Dv MAP_ANON has not been specified and Modified: stable/8/sys/vm/vm_mmap.c ============================================================================== --- stable/8/sys/vm/vm_mmap.c Wed Apr 14 15:20:30 2010 (r206601) +++ stable/8/sys/vm/vm_mmap.c Wed Apr 14 15:22:58 2010 (r206602) @@ -232,7 +232,7 @@ mmap(td, uap) /* make sure mapping fits into numeric range etc */ if ((uap->len == 0 && !SV_CURPROC_FLAG(SV_AOUT) && curproc->p_osrel >= 800104) || - ((flags & MAP_ANON) && uap->fd != -1)) + ((flags & MAP_ANON) && (uap->fd != -1 || pos != 0))) return (EINVAL); if (flags & MAP_STACK) { @@ -298,7 +298,6 @@ mmap(td, uap) handle = NULL; handle_type = OBJT_DEFAULT; maxprot = VM_PROT_ALL; - pos = 0; } else { /* * Mapping file, get fp for validation and From owner-svn-src-stable@FreeBSD.ORG Wed Apr 14 15:23:18 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E81D106566B; Wed, 14 Apr 2010 15:23:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 040CC8FC12; Wed, 14 Apr 2010 15:23:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3EFNGvZ010043; Wed, 14 Apr 2010 15:23:16 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EFNGBY010040; Wed, 14 Apr 2010 15:23:16 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201004141523.o3EFNGBY010040@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Apr 2010 15:23:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206603 - in stable/7: lib/libc/sys sys/vm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 15:23:18 -0000 Author: jhb Date: Wed Apr 14 15:23:16 2010 New Revision: 206603 URL: http://svn.freebsd.org/changeset/base/206603 Log: MFC 205536: Reject attempts to create a MAP_ANON mapping with a non-zero offset. Modified: stable/7/lib/libc/sys/mmap.2 stable/7/sys/vm/vm_mmap.c Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/lib/libc/sys/mmap.2 ============================================================================== --- stable/7/lib/libc/sys/mmap.2 Wed Apr 14 15:22:58 2010 (r206602) +++ stable/7/lib/libc/sys/mmap.2 Wed Apr 14 15:23:16 2010 (r206603) @@ -105,7 +105,7 @@ The file descriptor used for creating must be \-1. The .Fa offset -argument is ignored. +argument must be 0. .\".It Dv MAP_FILE .\"Mapped from a regular file or character-special device memory. .It Dv MAP_FIXED @@ -312,6 +312,11 @@ was negative. was specified and the .Fa fd argument was not -1. +.It Bq Er EINVAL +.Dv MAP_ANON +was specified and the +.Fa offset +argument was not 0. .It Bq Er ENODEV .Dv MAP_ANON has not been specified and Modified: stable/7/sys/vm/vm_mmap.c ============================================================================== --- stable/7/sys/vm/vm_mmap.c Wed Apr 14 15:22:58 2010 (r206602) +++ stable/7/sys/vm/vm_mmap.c Wed Apr 14 15:23:16 2010 (r206603) @@ -232,7 +232,7 @@ mmap(td, uap) fp = NULL; /* make sure mapping fits into numeric range etc */ if ((ssize_t) uap->len < 0 || - ((flags & MAP_ANON) && uap->fd != -1)) + ((flags & MAP_ANON) && (uap->fd != -1 || pos != 0))) return (EINVAL); if (flags & MAP_STACK) { @@ -298,7 +298,6 @@ mmap(td, uap) handle = NULL; handle_type = OBJT_DEFAULT; maxprot = VM_PROT_ALL; - pos = 0; } else { /* * Mapping file, get fp for validation. Obtain vnode and make From owner-svn-src-stable@FreeBSD.ORG Wed Apr 14 15:33:15 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B43CB1065678; Wed, 14 Apr 2010 15:33:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A0C78FC17; Wed, 14 Apr 2010 15:33:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3EFXFpU012386; Wed, 14 Apr 2010 15:33:15 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EFXF3g012384; Wed, 14 Apr 2010 15:33:15 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201004141533.o3EFXF3g012384@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Apr 2010 15:33:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206605 - stable/8/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 15:33:15 -0000 Author: jhb Date: Wed Apr 14 15:33:15 2010 New Revision: 206605 URL: http://svn.freebsd.org/changeset/base/206605 Log: MFC 205886: Defer freeing a kevent list until after dropping kqueue locks. Modified: stable/8/sys/kern/kern_event.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/kern_event.c ============================================================================== --- stable/8/sys/kern/kern_event.c Wed Apr 14 15:29:32 2010 (r206604) +++ stable/8/sys/kern/kern_event.c Wed Apr 14 15:33:15 2010 (r206605) @@ -1203,7 +1203,7 @@ static int kqueue_expand(struct kqueue *kq, struct filterops *fops, uintptr_t ident, int waitok) { - struct klist *list, *tmp_knhash; + struct klist *list, *tmp_knhash, *to_free; u_long tmp_knhashmask; int size; int fd; @@ -1211,6 +1211,7 @@ kqueue_expand(struct kqueue *kq, struct KQ_NOTOWNED(kq); + to_free = NULL; if (fops->f_isfd) { fd = ident; if (kq->kq_knlistsize <= fd) { @@ -1222,13 +1223,13 @@ kqueue_expand(struct kqueue *kq, struct return ENOMEM; KQ_LOCK(kq); if (kq->kq_knlistsize > fd) { - free(list, M_KQUEUE); + to_free = list; list = NULL; } else { if (kq->kq_knlist != NULL) { bcopy(kq->kq_knlist, list, kq->kq_knlistsize * sizeof list); - free(kq->kq_knlist, M_KQUEUE); + to_free = kq->kq_knlist; kq->kq_knlist = NULL; } bzero((caddr_t)list + @@ -1250,11 +1251,12 @@ kqueue_expand(struct kqueue *kq, struct kq->kq_knhash = tmp_knhash; kq->kq_knhashmask = tmp_knhashmask; } else { - free(tmp_knhash, M_KQUEUE); + to_free = tmp_knhash; } KQ_UNLOCK(kq); } } + free(to_free, M_KQUEUE); KQ_NOTOWNED(kq); return 0; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 14 15:33:31 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35FD41065670; Wed, 14 Apr 2010 15:33:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 24DA48FC17; Wed, 14 Apr 2010 15:33:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3EFXVge012459; Wed, 14 Apr 2010 15:33:31 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EFXVHv012457; Wed, 14 Apr 2010 15:33:31 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201004141533.o3EFXVHv012457@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Apr 2010 15:33:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206606 - stable/7/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 15:33:31 -0000 Author: jhb Date: Wed Apr 14 15:33:30 2010 New Revision: 206606 URL: http://svn.freebsd.org/changeset/base/206606 Log: MFC 205886: Defer freeing a kevent list until after dropping kqueue locks. Modified: stable/7/sys/kern/kern_event.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/kern_event.c ============================================================================== --- stable/7/sys/kern/kern_event.c Wed Apr 14 15:33:15 2010 (r206605) +++ stable/7/sys/kern/kern_event.c Wed Apr 14 15:33:30 2010 (r206606) @@ -1110,7 +1110,7 @@ static int kqueue_expand(struct kqueue *kq, struct filterops *fops, uintptr_t ident, int waitok) { - struct klist *list, *tmp_knhash; + struct klist *list, *tmp_knhash, *to_free; u_long tmp_knhashmask; int size; int fd; @@ -1118,6 +1118,7 @@ kqueue_expand(struct kqueue *kq, struct KQ_NOTOWNED(kq); + to_free = NULL; if (fops->f_isfd) { fd = ident; if (kq->kq_knlistsize <= fd) { @@ -1130,13 +1131,13 @@ kqueue_expand(struct kqueue *kq, struct return ENOMEM; KQ_LOCK(kq); if (kq->kq_knlistsize > fd) { - FREE(list, M_KQUEUE); + to_free = list; list = NULL; } else { if (kq->kq_knlist != NULL) { bcopy(kq->kq_knlist, list, kq->kq_knlistsize * sizeof list); - FREE(kq->kq_knlist, M_KQUEUE); + to_free = kq->kq_knlist; kq->kq_knlist = NULL; } bzero((caddr_t)list + @@ -1158,11 +1159,12 @@ kqueue_expand(struct kqueue *kq, struct kq->kq_knhash = tmp_knhash; kq->kq_knhashmask = tmp_knhashmask; } else { - free(tmp_knhash, M_KQUEUE); + to_free = tmp_knhash; } KQ_UNLOCK(kq); } } + free(to_free, M_KQUEUE); KQ_NOTOWNED(kq); return 0; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 14 16:31:59 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3C61106566C; Wed, 14 Apr 2010 16:31:59 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A22D18FC0A; Wed, 14 Apr 2010 16:31:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3EGVxSA025340; Wed, 14 Apr 2010 16:31:59 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EGVxvA025337; Wed, 14 Apr 2010 16:31:59 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201004141631.o3EGVxvA025337@svn.freebsd.org> From: Alan Cox Date: Wed, 14 Apr 2010 16:31:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206607 - stable/8/sys/vm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 16:31:59 -0000 Author: alc Date: Wed Apr 14 16:31:59 2010 New Revision: 206607 URL: http://svn.freebsd.org/changeset/base/206607 Log: MFC r206409 Introduce the function kmem_alloc_attr(), which allocates kernel virtual memory with the specified physical attributes. Correct an error in the prototype for kmem_malloc(). Modified: stable/8/sys/vm/vm_contig.c stable/8/sys/vm/vm_extern.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/vm/vm_contig.c ============================================================================== --- stable/8/sys/vm/vm_contig.c Wed Apr 14 15:33:30 2010 (r206606) +++ stable/8/sys/vm/vm_contig.c Wed Apr 14 16:31:59 2010 (r206607) @@ -87,6 +87,8 @@ __FBSDID("$FreeBSD$"); #include #include +static void vm_contig_grow_cache(int tries); + static int vm_contig_launder_page(vm_page_t m, vm_page_t *next) { @@ -186,6 +188,99 @@ vm_page_release_contig(vm_page_t m, vm_p } /* + * Increase the number of cached pages. + */ +static void +vm_contig_grow_cache(int tries) +{ + int actl, actmax, inactl, inactmax; + + vm_page_lock_queues(); + inactl = 0; + inactmax = tries < 1 ? 0 : cnt.v_inactive_count; + actl = 0; + actmax = tries < 2 ? 0 : cnt.v_active_count; +again: + if (inactl < inactmax && vm_contig_launder(PQ_INACTIVE)) { + inactl++; + goto again; + } + if (actl < actmax && vm_contig_launder(PQ_ACTIVE)) { + actl++; + goto again; + } + vm_page_unlock_queues(); +} + +/* + * Allocates a region from the kernel address map and pages within the + * specified physical address range to the kernel object, creates a wired + * mapping from the region to these pages, and returns the region's starting + * virtual address. The allocated pages are not necessarily physically + * contiguous. If M_ZERO is specified through the given flags, then the pages + * are zeroed before they are mapped. + */ +vm_offset_t +kmem_alloc_attr(vm_map_t map, vm_size_t size, int flags, vm_paddr_t low, + vm_paddr_t high, vm_memattr_t memattr) +{ + vm_object_t object = kernel_object; + vm_offset_t addr, i, offset; + vm_page_t m; + int tries; + + size = round_page(size); + vm_map_lock(map); + if (vm_map_findspace(map, vm_map_min(map), size, &addr)) { + vm_map_unlock(map); + return (0); + } + offset = addr - VM_MIN_KERNEL_ADDRESS; + vm_object_reference(object); + vm_map_insert(map, object, offset, addr, addr + size, VM_PROT_ALL, + VM_PROT_ALL, 0); + VM_OBJECT_LOCK(object); + for (i = 0; i < size; i += PAGE_SIZE) { + tries = 0; +retry: + m = vm_phys_alloc_contig(1, low, high, PAGE_SIZE, 0); + if (m == NULL) { + if (tries < ((flags & M_NOWAIT) != 0 ? 1 : 3)) { + VM_OBJECT_UNLOCK(object); + vm_map_unlock(map); + vm_contig_grow_cache(tries); + vm_map_lock(map); + VM_OBJECT_LOCK(object); + goto retry; + } + while (i != 0) { + i -= PAGE_SIZE; + m = vm_page_lookup(object, OFF_TO_IDX(offset + + i)); + vm_page_lock_queues(); + vm_page_free(m); + vm_page_unlock_queues(); + } + VM_OBJECT_UNLOCK(object); + vm_map_delete(map, addr, addr + size); + vm_map_unlock(map); + return (0); + } + if (memattr != VM_MEMATTR_DEFAULT) + pmap_page_set_memattr(m, memattr); + vm_page_insert(m, object, OFF_TO_IDX(offset + i)); + if ((flags & M_ZERO) && (m->flags & PG_ZERO) == 0) + pmap_zero_page(m); + m->valid = VM_PAGE_BITS_ALL; + } + VM_OBJECT_UNLOCK(object); + vm_map_unlock(map); + vm_map_wire(map, addr, addr + size, VM_MAP_WIRE_SYSTEM | + VM_MAP_WIRE_NOHOLES); + return (addr); +} + +/* * Allocates a region from the kernel address map, inserts the * given physically contiguous pages into the kernel object, * creates a wired mapping from the region to the pages, and @@ -253,7 +348,7 @@ kmem_alloc_contig(vm_map_t map, vm_size_ vm_offset_t ret; vm_page_t pages; unsigned long npgs; - int actl, actmax, inactl, inactmax, tries; + int tries; size = round_page(size); npgs = size >> PAGE_SHIFT; @@ -262,23 +357,7 @@ retry: pages = vm_phys_alloc_contig(npgs, low, high, alignment, boundary); if (pages == NULL) { if (tries < ((flags & M_NOWAIT) != 0 ? 1 : 3)) { - vm_page_lock_queues(); - inactl = 0; - inactmax = tries < 1 ? 0 : cnt.v_inactive_count; - actl = 0; - actmax = tries < 2 ? 0 : cnt.v_active_count; -again: - if (inactl < inactmax && - vm_contig_launder(PQ_INACTIVE)) { - inactl++; - goto again; - } - if (actl < actmax && - vm_contig_launder(PQ_ACTIVE)) { - actl++; - goto again; - } - vm_page_unlock_queues(); + vm_contig_grow_cache(tries); tries++; goto retry; } Modified: stable/8/sys/vm/vm_extern.h ============================================================================== --- stable/8/sys/vm/vm_extern.h Wed Apr 14 15:33:30 2010 (r206606) +++ stable/8/sys/vm/vm_extern.h Wed Apr 14 16:31:59 2010 (r206607) @@ -41,6 +41,8 @@ struct vnode; int kernacc(void *, int, int); vm_offset_t kmem_alloc(vm_map_t, vm_size_t); +vm_offset_t kmem_alloc_attr(vm_map_t map, vm_size_t size, int flags, + vm_paddr_t low, vm_paddr_t high, vm_memattr_t memattr); vm_offset_t kmem_alloc_contig(vm_map_t map, vm_size_t size, int flags, vm_paddr_t low, vm_paddr_t high, unsigned long alignment, unsigned long boundary, vm_memattr_t memattr); @@ -49,7 +51,7 @@ vm_offset_t kmem_alloc_wait(vm_map_t, vm void kmem_free(vm_map_t, vm_offset_t, vm_size_t); void kmem_free_wakeup(vm_map_t, vm_offset_t, vm_size_t); void kmem_init(vm_offset_t, vm_offset_t); -vm_offset_t kmem_malloc(vm_map_t, vm_size_t, boolean_t); +vm_offset_t kmem_malloc(vm_map_t map, vm_size_t size, int flags); vm_map_t kmem_suballoc(vm_map_t, vm_offset_t *, vm_offset_t *, vm_size_t, boolean_t); void swapout_procs(int); From owner-svn-src-stable@FreeBSD.ORG Wed Apr 14 16:37:35 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4548B1065670; Wed, 14 Apr 2010 16:37:35 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 340FD8FC26; Wed, 14 Apr 2010 16:37:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3EGbZiS026608; Wed, 14 Apr 2010 16:37:35 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EGbZxG026605; Wed, 14 Apr 2010 16:37:35 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201004141637.o3EGbZxG026605@svn.freebsd.org> From: "Justin T. Gibbs" Date: Wed, 14 Apr 2010 16:37:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206608 - stable/8/sys/dev/bktr X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 16:37:35 -0000 Author: gibbs Date: Wed Apr 14 16:37:34 2010 New Revision: 206608 URL: http://svn.freebsd.org/changeset/base/206608 Log: MFC revision 205781: Use standard types in preference to BSD types so that these header files can be used in applications compiled with only POSIX types visible. Modified: stable/8/sys/dev/bktr/ioctl_bt848.h stable/8/sys/dev/bktr/ioctl_meteor.h Modified: stable/8/sys/dev/bktr/ioctl_bt848.h ============================================================================== --- stable/8/sys/dev/bktr/ioctl_bt848.h Wed Apr 14 16:31:59 2010 (r206607) +++ stable/8/sys/dev/bktr/ioctl_bt848.h Wed Apr 14 16:37:34 2010 (r206608) @@ -89,9 +89,9 @@ * EEProm stuff */ struct eeProm { - short offset; - short count; - u_char bytes[ 256 ]; + short offset; + short count; + unsigned char bytes[ 256 ]; }; @@ -147,7 +147,7 @@ struct eeProm { * b23-b16: i2c addr (write) * b31-b24: 1 = write, 0 = read */ -#define BT848_I2CWR _IOWR('x', 57, u_long) /* i2c read-write */ +#define BT848_I2CWR _IOWR('x', 57, unsigned long) /* i2c read-write */ struct bktr_msp_control { unsigned char function; @@ -192,10 +192,10 @@ typedef enum { METEOR_PIXTYPE_RGB, METEO struct meteor_pixfmt { - u_int index; /* Index in supported pixfmt list */ + unsigned int index; /* Index in supported pixfmt list */ METEOR_PIXTYPE type; /* What's the board gonna feed us */ - u_int Bpp; /* Bytes per pixel */ - u_long masks[3]; /* R,G,B or Y,U,V masks, respectively */ + unsigned int Bpp; /* Bytes per pixel */ + unsigned long masks[3]; /* R,G,B or Y,U,V masks, respectively */ unsigned swap_bytes :1; /* Bytes swapped within shorts */ unsigned swap_shorts:1; /* Shorts swapped within longs */ }; Modified: stable/8/sys/dev/bktr/ioctl_meteor.h ============================================================================== --- stable/8/sys/dev/bktr/ioctl_meteor.h Wed Apr 14 16:31:59 2010 (r206607) +++ stable/8/sys/dev/bktr/ioctl_meteor.h Wed Apr 14 16:37:34 2010 (r206608) @@ -50,27 +50,27 @@ struct meteor_capframe { /* structure for METEOR[GS]ETGEO - get/set geometry */ struct meteor_geomet { - u_short rows; - u_short columns; - u_short frames; - u_long oformat; + unsigned short rows; + unsigned short columns; + unsigned short frames; + unsigned long oformat; } ; /* structure for METEORGCOUNT-get count of frames, fifo errors and dma errors */ struct meteor_counts { - u_long fifo_errors; /* count of fifo errors since open */ - u_long dma_errors; /* count of dma errors since open */ - u_long frames_captured; /* count of frames captured since open */ - u_long even_fields_captured; /* count of even fields captured */ - u_long odd_fields_captured; /* count of odd fields captured */ + unsigned long fifo_errors; /* count of fifo errors since open */ + unsigned long dma_errors; /* count of dma errors since open */ + unsigned long frames_captured; /* count of frames captured since open */ + unsigned long even_fields_captured; /* count of even fields captured */ + unsigned long odd_fields_captured; /* count of odd fields captured */ } ; /* structure for getting and setting direct transfers to vram */ struct meteor_video { - u_long addr; /* Address of location to dma to */ - u_long width; /* Width of memory area */ - u_long banksize; /* Size of Vram bank */ - u_long ramsize; /* Size of Vram */ + unsigned long addr; /* Address of location to dma to */ + unsigned long width; /* Width of memory area */ + unsigned long banksize; /* Size of Vram bank */ + unsigned long ramsize; /* Size of Vram */ }; #define METEORCAPTUR _IOW('x', 1, int) /* capture a frame */ From owner-svn-src-stable@FreeBSD.ORG Wed Apr 14 16:54:50 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F15A106566B; Wed, 14 Apr 2010 16:54:50 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D9768FC0C; Wed, 14 Apr 2010 16:54:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3EGsnin030506; Wed, 14 Apr 2010 16:54:49 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EGsn3M030503; Wed, 14 Apr 2010 16:54:49 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201004141654.o3EGsn3M030503@svn.freebsd.org> From: Alan Cox Date: Wed, 14 Apr 2010 16:54:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206609 - stable/7/sys/vm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 16:54:50 -0000 Author: alc Date: Wed Apr 14 16:54:49 2010 New Revision: 206609 URL: http://svn.freebsd.org/changeset/base/206609 Log: MFC r206409 Introduce the function kmem_alloc_attr(), which allocates kernel virtual memory with the specified physical attributes. Correct an error in the prototype for kmem_malloc(). Modified: stable/7/sys/vm/vm_contig.c stable/7/sys/vm/vm_extern.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/vm/vm_contig.c ============================================================================== --- stable/7/sys/vm/vm_contig.c Wed Apr 14 16:37:34 2010 (r206608) +++ stable/7/sys/vm/vm_contig.c Wed Apr 14 16:54:49 2010 (r206609) @@ -87,6 +87,8 @@ __FBSDID("$FreeBSD$"); #include #include +static void vm_contig_grow_cache(int tries); + static int vm_contig_launder_page(vm_page_t m, vm_page_t *next) { @@ -186,6 +188,99 @@ vm_page_release_contig(vm_page_t m, vm_p } /* + * Increase the number of cached pages. + */ +static void +vm_contig_grow_cache(int tries) +{ + int actl, actmax, inactl, inactmax; + + vm_page_lock_queues(); + inactl = 0; + inactmax = tries < 1 ? 0 : cnt.v_inactive_count; + actl = 0; + actmax = tries < 2 ? 0 : cnt.v_active_count; +again: + if (inactl < inactmax && vm_contig_launder(PQ_INACTIVE)) { + inactl++; + goto again; + } + if (actl < actmax && vm_contig_launder(PQ_ACTIVE)) { + actl++; + goto again; + } + vm_page_unlock_queues(); +} + +/* + * Allocates a region from the kernel address map and pages within the + * specified physical address range to the kernel object, creates a wired + * mapping from the region to these pages, and returns the region's starting + * virtual address. The allocated pages are not necessarily physically + * contiguous. If M_ZERO is specified through the given flags, then the pages + * are zeroed before they are mapped. + */ +vm_offset_t +kmem_alloc_attr(vm_map_t map, vm_size_t size, int flags, vm_paddr_t low, + vm_paddr_t high, vm_memattr_t memattr) +{ + vm_object_t object = kernel_object; + vm_offset_t addr, i, offset; + vm_page_t m; + int tries; + + size = round_page(size); + vm_map_lock(map); + if (vm_map_findspace(map, vm_map_min(map), size, &addr)) { + vm_map_unlock(map); + return (0); + } + offset = addr - VM_MIN_KERNEL_ADDRESS; + vm_object_reference(object); + vm_map_insert(map, object, offset, addr, addr + size, VM_PROT_ALL, + VM_PROT_ALL, 0); + VM_OBJECT_LOCK(object); + for (i = 0; i < size; i += PAGE_SIZE) { + tries = 0; +retry: + m = vm_phys_alloc_contig(1, low, high, PAGE_SIZE, 0); + if (m == NULL) { + if (tries < ((flags & M_NOWAIT) != 0 ? 1 : 3)) { + VM_OBJECT_UNLOCK(object); + vm_map_unlock(map); + vm_contig_grow_cache(tries); + vm_map_lock(map); + VM_OBJECT_LOCK(object); + goto retry; + } + while (i != 0) { + i -= PAGE_SIZE; + m = vm_page_lookup(object, OFF_TO_IDX(offset + + i)); + vm_page_lock_queues(); + vm_page_free(m); + vm_page_unlock_queues(); + } + VM_OBJECT_UNLOCK(object); + vm_map_delete(map, addr, addr + size); + vm_map_unlock(map); + return (0); + } + if (memattr != VM_MEMATTR_DEFAULT) + pmap_page_set_memattr(m, memattr); + vm_page_insert(m, object, OFF_TO_IDX(offset + i)); + if ((flags & M_ZERO) && (m->flags & PG_ZERO) == 0) + pmap_zero_page(m); + m->valid = VM_PAGE_BITS_ALL; + } + VM_OBJECT_UNLOCK(object); + vm_map_unlock(map); + vm_map_wire(map, addr, addr + size, VM_MAP_WIRE_SYSTEM | + VM_MAP_WIRE_NOHOLES); + return (addr); +} + +/* * Allocates a region from the kernel address map, inserts the * given physically contiguous pages into the kernel object, * creates a wired mapping from the region to the pages, and @@ -253,7 +348,7 @@ kmem_alloc_contig(vm_map_t map, vm_size_ vm_offset_t ret; vm_page_t pages; unsigned long npgs; - int actl, actmax, inactl, inactmax, tries; + int tries; size = round_page(size); npgs = size >> PAGE_SHIFT; @@ -262,23 +357,7 @@ retry: pages = vm_phys_alloc_contig(npgs, low, high, alignment, boundary); if (pages == NULL) { if (tries < ((flags & M_NOWAIT) != 0 ? 1 : 3)) { - vm_page_lock_queues(); - inactl = 0; - inactmax = tries < 1 ? 0 : cnt.v_inactive_count; - actl = 0; - actmax = tries < 2 ? 0 : cnt.v_active_count; -again: - if (inactl < inactmax && - vm_contig_launder(PQ_INACTIVE)) { - inactl++; - goto again; - } - if (actl < actmax && - vm_contig_launder(PQ_ACTIVE)) { - actl++; - goto again; - } - vm_page_unlock_queues(); + vm_contig_grow_cache(tries); tries++; goto retry; } Modified: stable/7/sys/vm/vm_extern.h ============================================================================== --- stable/7/sys/vm/vm_extern.h Wed Apr 14 16:37:34 2010 (r206608) +++ stable/7/sys/vm/vm_extern.h Wed Apr 14 16:54:49 2010 (r206609) @@ -57,6 +57,8 @@ int swapon(struct thread *, void *, int int kernacc(void *, int, int); vm_offset_t kmem_alloc(vm_map_t, vm_size_t); +vm_offset_t kmem_alloc_attr(vm_map_t map, vm_size_t size, int flags, + vm_paddr_t low, vm_paddr_t high, vm_memattr_t memattr); vm_offset_t kmem_alloc_contig(vm_map_t map, vm_size_t size, int flags, vm_paddr_t low, vm_paddr_t high, unsigned long alignment, unsigned long boundary, vm_memattr_t memattr); @@ -65,7 +67,7 @@ vm_offset_t kmem_alloc_wait(vm_map_t, vm void kmem_free(vm_map_t, vm_offset_t, vm_size_t); void kmem_free_wakeup(vm_map_t, vm_offset_t, vm_size_t); void kmem_init(vm_offset_t, vm_offset_t); -vm_offset_t kmem_malloc(vm_map_t, vm_size_t, boolean_t); +vm_offset_t kmem_malloc(vm_map_t map, vm_size_t size, int flags); vm_map_t kmem_suballoc(vm_map_t, vm_offset_t *, vm_offset_t *, vm_size_t, boolean_t); void swapout_procs(int); From owner-svn-src-stable@FreeBSD.ORG Wed Apr 14 17:01:30 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28761106566B; Wed, 14 Apr 2010 17:01:30 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1E448FC18; Wed, 14 Apr 2010 17:01:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3EH1TrI032037; Wed, 14 Apr 2010 17:01:29 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EH1TFF032035; Wed, 14 Apr 2010 17:01:29 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201004141701.o3EH1TFF032035@svn.freebsd.org> From: "Justin T. Gibbs" Date: Wed, 14 Apr 2010 17:01:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206610 - stable/8/sys/amd64/amd64 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 17:01:30 -0000 Author: gibbs Date: Wed Apr 14 17:01:29 2010 New Revision: 206610 URL: http://svn.freebsd.org/changeset/base/206610 Log: MFC 204214: Enforce stronger bus-dma alignment semantics so bus-dma operates correctly with Xen's blkfront driver. Modified: stable/8/sys/amd64/amd64/busdma_machdep.c Modified: stable/8/sys/amd64/amd64/busdma_machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/busdma_machdep.c Wed Apr 14 16:54:49 2010 (r206609) +++ stable/8/sys/amd64/amd64/busdma_machdep.c Wed Apr 14 17:01:29 2010 (r206610) @@ -239,8 +239,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, newtag->alignment = alignment; newtag->boundary = boundary; newtag->lowaddr = trunc_page((vm_paddr_t)lowaddr) + (PAGE_SIZE - 1); - newtag->highaddr = trunc_page((vm_paddr_t)highaddr) + - (PAGE_SIZE - 1); + newtag->highaddr = trunc_page((vm_paddr_t)highaddr) + (PAGE_SIZE - 1); newtag->filter = filter; newtag->filterarg = filterarg; newtag->maxsize = maxsize; @@ -605,13 +604,18 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm vendaddr = (vm_offset_t)buf + buflen; while (vaddr < vendaddr) { + bus_size_t sg_len; + + sg_len = PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK); if (pmap) paddr = pmap_extract(pmap, vaddr); else paddr = pmap_kextract(vaddr); - if (run_filter(dmat, paddr) != 0) + if (run_filter(dmat, paddr) != 0) { + sg_len = roundup2(sg_len, dmat->alignment); map->pagesneeded++; - vaddr += (PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK)); + } + vaddr += sg_len; } CTR1(KTR_BUSDMA, "pagesneeded= %d\n", map->pagesneeded); } @@ -644,6 +648,8 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm bmask = ~(dmat->boundary - 1); for (seg = *segp; buflen > 0 ; ) { + bus_size_t max_sgsize; + /* * Get the physical address for this segment. */ @@ -655,11 +661,15 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm /* * Compute the segment size, and adjust counts. */ - sgsize = PAGE_SIZE - ((u_long)curaddr & PAGE_MASK); - if (sgsize > dmat->maxsegsz) - sgsize = dmat->maxsegsz; - if (buflen < sgsize) - sgsize = buflen; + max_sgsize = MIN(buflen, dmat->maxsegsz); + sgsize = PAGE_SIZE - ((vm_offset_t)curaddr & PAGE_MASK); + if (map->pagesneeded != 0 && run_filter(dmat, curaddr)) { + sgsize = roundup2(sgsize, dmat->alignment); + sgsize = MIN(sgsize, max_sgsize); + curaddr = add_bounce_page(dmat, map, vaddr, sgsize); + } else { + sgsize = MIN(sgsize, max_sgsize); + } /* * Make sure we don't cross any boundaries. @@ -670,9 +680,6 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm sgsize = (baddr - curaddr); } - if (map->pagesneeded != 0 && run_filter(dmat, curaddr)) - curaddr = add_bounce_page(dmat, map, vaddr, sgsize); - /* * Insert chunk into a segment, coalescing with * previous segment if possible. From owner-svn-src-stable@FreeBSD.ORG Wed Apr 14 17:17:06 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74962106566C; Wed, 14 Apr 2010 17:17:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6394C8FC21; Wed, 14 Apr 2010 17:17:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3EHH6FB035484; Wed, 14 Apr 2010 17:17:06 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EHH6DZ035482; Wed, 14 Apr 2010 17:17:06 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201004141717.o3EHH6DZ035482@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Apr 2010 17:17:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206611 - stable/8/lib/libstand X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 17:17:06 -0000 Author: jhb Date: Wed Apr 14 17:17:06 2010 New Revision: 206611 URL: http://svn.freebsd.org/changeset/base/206611 Log: MFC 205900: Use panic() (which the environment is required to provide to libstand) to implement assert() instead of relying on a non-required exit(). The exit() invocation also did not match the semantics of the exit() routine that current boot environments happen to require. Modified: stable/8/lib/libstand/assert.c Directory Properties: stable/8/lib/libstand/ (props changed) Modified: stable/8/lib/libstand/assert.c ============================================================================== --- stable/8/lib/libstand/assert.c Wed Apr 14 17:01:29 2010 (r206610) +++ stable/8/lib/libstand/assert.c Wed Apr 14 17:17:06 2010 (r206611) @@ -35,10 +35,10 @@ void __assert(const char *func, const char *file, int line, const char *expression) { if (func == NULL) - printf("Assertion failed: (%s), file %s, line %d.\n", + panic("Assertion failed: (%s), file %s, line %d.\n", expression, file, line); else - printf("Assertion failed: (%s), function %s, file %s, line " - "%d.\n", expression, func, file, line); - exit(); + panic( + "Assertion failed: (%s), function %s, file %s, line %d.\n", + expression, func, file, line); } From owner-svn-src-stable@FreeBSD.ORG Wed Apr 14 17:17:25 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FA2B10656EE; Wed, 14 Apr 2010 17:17:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E6D98FC1A; Wed, 14 Apr 2010 17:17:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3EHHP2h035585; Wed, 14 Apr 2010 17:17:25 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EHHPdV035583; Wed, 14 Apr 2010 17:17:25 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201004141717.o3EHHPdV035583@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Apr 2010 17:17:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206612 - stable/7/lib/libstand X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 17:17:25 -0000 Author: jhb Date: Wed Apr 14 17:17:25 2010 New Revision: 206612 URL: http://svn.freebsd.org/changeset/base/206612 Log: MFC 205900: Use panic() (which the environment is required to provide to libstand) to implement assert() instead of relying on a non-required exit(). The exit() invocation also did not match the semantics of the exit() routine that current boot environments happen to require. Modified: stable/7/lib/libstand/assert.c Directory Properties: stable/7/lib/libstand/ (props changed) Modified: stable/7/lib/libstand/assert.c ============================================================================== --- stable/7/lib/libstand/assert.c Wed Apr 14 17:17:06 2010 (r206611) +++ stable/7/lib/libstand/assert.c Wed Apr 14 17:17:25 2010 (r206612) @@ -35,10 +35,10 @@ void __assert(const char *func, const char *file, int line, const char *expression) { if (func == NULL) - printf("Assertion failed: (%s), file %s, line %d.\n", + panic("Assertion failed: (%s), file %s, line %d.\n", expression, file, line); else - printf("Assertion failed: (%s), function %s, file %s, line " - "%d.\n", expression, func, file, line); - exit(); + panic( + "Assertion failed: (%s), function %s, file %s, line %d.\n", + expression, func, file, line); } From owner-svn-src-stable@FreeBSD.ORG Thu Apr 15 01:20:30 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 894B01065799; Thu, 15 Apr 2010 01:20:30 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 770EE8FC0C; Thu, 15 Apr 2010 01:20:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3F1KUIu043641; Thu, 15 Apr 2010 01:20:30 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3F1KUPt043636; Thu, 15 Apr 2010 01:20:30 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004150120.o3F1KUPt043636@svn.freebsd.org> From: Xin LI Date: Thu, 15 Apr 2010 01:20:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206640 - in stable/8/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 01:20:30 -0000 Author: delphij Date: Thu Apr 15 01:20:30 2010 New Revision: 206640 URL: http://svn.freebsd.org/changeset/base/206640 Log: MFC r205198: Merge OpenSolaris revision 8802:010b31dd4c53: 6773366 "zfs list" memory consumption can be further reduced PR: bin/144720 Submitted by: mm Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zdb/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/8/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Wed Apr 14 23:06:07 2010 (r206639) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Thu Apr 15 01:20:30 2010 (r206640) @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -58,6 +58,7 @@ typedef struct callback_data { zfs_type_t cb_types; zfs_sort_column_t *cb_sortcol; zprop_list_t **cb_proplist; + uint8_t cb_props_table[ZFS_NUM_PROPS]; } callback_data_t; uu_avl_pool_t *avl_pool; @@ -98,11 +99,20 @@ zfs_callback(zfs_handle_t *zhp, void *da uu_avl_node_init(node, &node->zn_avlnode, avl_pool); if (uu_avl_find(cb->cb_avl, node, cb->cb_sortcol, &idx) == NULL) { - if (cb->cb_proplist && - zfs_expand_proplist(zhp, cb->cb_proplist) != 0) { - free(node); - return (-1); + + if (cb->cb_proplist) { + if ((*cb->cb_proplist) && + !(*cb->cb_proplist)->pl_all) + zfs_prune_proplist(zhp, + cb->cb_props_table); + + if (zfs_expand_proplist(zhp, cb->cb_proplist) + != 0) { + free(node); + return (-1); + } } + uu_avl_insert(cb->cb_avl, node, idx); dontclose = 1; } else { @@ -328,7 +338,7 @@ zfs_for_each(int argc, char **argv, int zfs_sort_column_t *sortcol, zprop_list_t **proplist, zfs_iter_f callback, void *data) { - callback_data_t cb; + callback_data_t cb = {0}; int ret = 0; zfs_node_t *node; uu_avl_walk_t *walk; @@ -346,6 +356,39 @@ zfs_for_each(int argc, char **argv, int cb.cb_flags = flags; cb.cb_proplist = proplist; cb.cb_types = types; + + /* + * If cb_proplist is provided then in the zfs_handles created we + * retain only those properties listed in cb_proplist and sortcol. + * The rest are pruned. So, the caller should make sure that no other + * properties other than those listed in cb_proplist/sortcol are + * accessed. + * + * If cb_proplist is NULL then we retain all the properties. + */ + if (cb.cb_proplist && *cb.cb_proplist) { + zprop_list_t *p = *cb.cb_proplist; + + while (p) { + if (p->pl_prop >= ZFS_PROP_TYPE && + p->pl_prop < ZFS_NUM_PROPS) { + cb.cb_props_table[p->pl_prop] = B_TRUE; + } + p = p->pl_next; + } + + while (sortcol) { + if (sortcol->sc_prop >= ZFS_PROP_TYPE && + sortcol->sc_prop < ZFS_NUM_PROPS) { + cb.cb_props_table[sortcol->sc_prop] = B_TRUE; + } + sortcol = sortcol->sc_next; + } + } else { + (void) memset(cb.cb_props_table, B_TRUE, + sizeof (cb.cb_props_table)); + } + if ((cb.cb_avl = uu_avl_create(avl_pool, NULL, UU_DEFAULT)) == NULL) { (void) fprintf(stderr, gettext("internal error: out of memory\n")); Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Wed Apr 14 23:06:07 2010 (r206639) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Thu Apr 15 01:20:30 2010 (r206640) @@ -369,6 +369,7 @@ typedef struct zprop_list { } zprop_list_t; extern int zfs_expand_proplist(zfs_handle_t *, zprop_list_t **); +extern void zfs_prune_proplist(zfs_handle_t *, uint8_t *); #define ZFS_MOUNTPOINT_NONE "none" #define ZFS_MOUNTPOINT_LEGACY "legacy" Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Wed Apr 14 23:06:07 2010 (r206639) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Thu Apr 15 01:20:30 2010 (r206640) @@ -20,7 +20,7 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -2042,6 +2042,8 @@ getprop_uint64(zfs_handle_t *zhp, zfs_pr verify(nvlist_lookup_uint64(nv, ZPROP_VALUE, &value) == 0); (void) nvlist_lookup_string(nv, ZPROP_SOURCE, source); } else { + verify(!zhp->zfs_props_table || + zhp->zfs_props_table[prop] == B_TRUE); value = zfs_prop_default_numeric(prop); *source = ""; } @@ -2061,6 +2063,8 @@ getprop_string(zfs_handle_t *zhp, zfs_pr verify(nvlist_lookup_string(nv, ZPROP_VALUE, &value) == 0); (void) nvlist_lookup_string(nv, ZPROP_SOURCE, source); } else { + verify(!zhp->zfs_props_table || + zhp->zfs_props_table[prop] == B_TRUE); if ((value = (char *)zfs_prop_default_string(prop)) == NULL) value = ""; *source = ""; @@ -4264,6 +4268,30 @@ zfs_deleg_share_nfs(libzfs_handle_t *hdl return (error); } +void +zfs_prune_proplist(zfs_handle_t *zhp, uint8_t *props) +{ + nvpair_t *curr; + + /* + * Keep a reference to the props-table against which we prune the + * properties. + */ + zhp->zfs_props_table = props; + + curr = nvlist_next_nvpair(zhp->zfs_props, NULL); + + while (curr) { + zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr)); + nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr); + + if (props[zfs_prop] == B_FALSE) + (void) nvlist_remove(zhp->zfs_props, + nvpair_name(curr), nvpair_type(curr)); + curr = next; + } +} + /* * Attach/detach the given filesystem to/from the given jail. */ Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Wed Apr 14 23:06:07 2010 (r206639) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Thu Apr 15 01:20:30 2010 (r206640) @@ -20,7 +20,7 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -77,6 +77,7 @@ struct zfs_handle { nvlist_t *zfs_user_props; boolean_t zfs_mntcheck; char *zfs_mntopts; + uint8_t *zfs_props_table; }; /* From owner-svn-src-stable@FreeBSD.ORG Thu Apr 15 01:22:39 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2972B1065672; Thu, 15 Apr 2010 01:22:39 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 155A18FC1A; Thu, 15 Apr 2010 01:22:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3F1McEm044167; Thu, 15 Apr 2010 01:22:38 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3F1McLW044163; Thu, 15 Apr 2010 01:22:38 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004150122.o3F1McLW044163@svn.freebsd.org> From: Xin LI Date: Thu, 15 Apr 2010 01:22:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206641 - stable/8/cddl/contrib/opensolaris/cmd/zfs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 01:22:39 -0000 Author: delphij Date: Thu Apr 15 01:22:38 2010 New Revision: 206641 URL: http://svn.freebsd.org/changeset/base/206641 Log: MFC r205199: Merge OpenSolaris revision 9365:7838a22eccd6: PSARC/2009/171 zfs list -d and zfs get -d 6762432 zfs list --depth PR: bin/144720 Submitted by: mm Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zdb/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/8/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Thu Apr 15 01:20:30 2010 (r206640) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Thu Apr 15 01:22:38 2010 (r206641) @@ -53,12 +53,14 @@ typedef struct zfs_node { } zfs_node_t; typedef struct callback_data { - uu_avl_t *cb_avl; - int cb_flags; - zfs_type_t cb_types; - zfs_sort_column_t *cb_sortcol; - zprop_list_t **cb_proplist; - uint8_t cb_props_table[ZFS_NUM_PROPS]; + uu_avl_t *cb_avl; + int cb_flags; + zfs_type_t cb_types; + zfs_sort_column_t *cb_sortcol; + zprop_list_t **cb_proplist; + int cb_depth_limit; + int cb_depth; + uint8_t cb_props_table[ZFS_NUM_PROPS]; } callback_data_t; uu_avl_pool_t *avl_pool; @@ -99,7 +101,6 @@ zfs_callback(zfs_handle_t *zhp, void *da uu_avl_node_init(node, &node->zn_avlnode, avl_pool); if (uu_avl_find(cb->cb_avl, node, cb->cb_sortcol, &idx) == NULL) { - if (cb->cb_proplist) { if ((*cb->cb_proplist) && !(*cb->cb_proplist)->pl_all) @@ -112,7 +113,6 @@ zfs_callback(zfs_handle_t *zhp, void *da return (-1); } } - uu_avl_insert(cb->cb_avl, node, idx); dontclose = 1; } else { @@ -123,11 +123,15 @@ zfs_callback(zfs_handle_t *zhp, void *da /* * Recurse if necessary. */ - if (cb->cb_flags & ZFS_ITER_RECURSE) { + if (cb->cb_flags & ZFS_ITER_RECURSE && + ((cb->cb_flags & ZFS_ITER_DEPTH_LIMIT) == 0 || + cb->cb_depth < cb->cb_depth_limit)) { + cb->cb_depth++; if (zfs_get_type(zhp) == ZFS_TYPE_FILESYSTEM) (void) zfs_iter_filesystems(zhp, zfs_callback, data); if ((zfs_get_type(zhp) != ZFS_TYPE_SNAPSHOT) && include_snaps) (void) zfs_iter_snapshots(zhp, zfs_callback, data); + cb->cb_depth--; } if (!dontclose) @@ -335,7 +339,7 @@ zfs_sort(const void *larg, const void *r int zfs_for_each(int argc, char **argv, int flags, zfs_type_t types, - zfs_sort_column_t *sortcol, zprop_list_t **proplist, + zfs_sort_column_t *sortcol, zprop_list_t **proplist, int limit, zfs_iter_f callback, void *data) { callback_data_t cb = {0}; @@ -356,7 +360,7 @@ zfs_for_each(int argc, char **argv, int cb.cb_flags = flags; cb.cb_proplist = proplist; cb.cb_types = types; - + cb.cb_depth_limit = limit; /* * If cb_proplist is provided then in the zfs_handles created we * retain only those properties listed in cb_proplist and sortcol. Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h Thu Apr 15 01:20:30 2010 (r206640) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h Thu Apr 15 01:22:38 2010 (r206641) @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -41,9 +41,10 @@ typedef struct zfs_sort_column { #define ZFS_ITER_RECURSE (1 << 0) #define ZFS_ITER_ARGS_CAN_BE_PATHS (1 << 1) #define ZFS_ITER_PROP_LISTSNAPS (1 << 2) +#define ZFS_ITER_DEPTH_LIMIT (1 << 3) int zfs_for_each(int, char **, int options, zfs_type_t, - zfs_sort_column_t *, zprop_list_t **, zfs_iter_f, void *); + zfs_sort_column_t *, zprop_list_t **, int, zfs_iter_f, void *); int zfs_add_sort_column(zfs_sort_column_t **, const char *, boolean_t); void zfs_free_sort_columns(zfs_sort_column_t *); Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Thu Apr 15 01:20:30 2010 (r206640) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Thu Apr 15 01:22:38 2010 (r206641) @@ -190,8 +190,8 @@ get_usage(zfs_help_t idx) return (gettext("\tdestroy [-rRf] " "\n")); case HELP_GET: - return (gettext("\tget [-rHp] [-o field[,...]] " - "[-s source[,...]]\n" + return (gettext("\tget [-rHp] [-d max] " + "[-o field[,...]] [-s source[,...]]\n" "\t <\"all\" | property[,...]> " "[filesystem|volume|snapshot] ...\n")); case HELP_INHERIT: @@ -205,8 +205,8 @@ get_usage(zfs_help_t idx) case HELP_UNJAIL: return (gettext("\tunjail \n")); case HELP_LIST: - return (gettext("\tlist [-rH] [-o property[,...]] " - "[-t type[,...]] [-s property] ...\n" + return (gettext("\tlist [-rH][-d max] " + "[-o property[,...]] [-t type[,...]] [-s property] ...\n" "\t [-S property] ... " "[filesystem|volume|snapshot] ...\n")); case HELP_MOUNT: @@ -432,6 +432,27 @@ parseprop(nvlist_t *props) } +static int +parse_depth(char *opt, int *flags) +{ + char *tmp; + int depth; + + depth = (int)strtol(opt, &tmp, 0); + if (*tmp) { + (void) fprintf(stderr, + gettext("%s is not an integer\n"), optarg); + usage(B_FALSE); + } + if (depth < 0) { + (void) fprintf(stderr, + gettext("Depth can not be negative.\n")); + usage(B_FALSE); + } + *flags |= (ZFS_ITER_DEPTH_LIMIT|ZFS_ITER_RECURSE); + return (depth); +} + /* * zfs clone [-p] [-o prop=value] ... * @@ -1119,6 +1140,7 @@ zfs_do_get(int argc, char **argv) int i, c, flags = 0; char *value, *fields; int ret; + int limit = 0; zprop_list_t fake_name = { 0 }; /* @@ -1132,11 +1154,14 @@ zfs_do_get(int argc, char **argv) cb.cb_type = ZFS_TYPE_DATASET; /* check options */ - while ((c = getopt(argc, argv, ":o:s:rHp")) != -1) { + while ((c = getopt(argc, argv, ":d:o:s:rHp")) != -1) { switch (c) { case 'p': cb.cb_literal = B_TRUE; break; + case 'd': + limit = parse_depth(optarg, &flags); + break; case 'r': flags |= ZFS_ITER_RECURSE; break; @@ -1267,7 +1292,7 @@ zfs_do_get(int argc, char **argv) /* run for each object */ ret = zfs_for_each(argc, argv, flags, ZFS_TYPE_DATASET, NULL, - &cb.cb_proplist, get_callback, &cb); + &cb.cb_proplist, limit, get_callback, &cb); if (cb.cb_proplist == &fake_name) zprop_free_list(fake_name.pl_next); @@ -1380,10 +1405,10 @@ zfs_do_inherit(int argc, char **argv) if (flags & ZFS_ITER_RECURSE) { ret = zfs_for_each(argc, argv, flags, ZFS_TYPE_DATASET, - NULL, NULL, inherit_recurse_cb, propname); + NULL, NULL, 0, inherit_recurse_cb, propname); } else { ret = zfs_for_each(argc, argv, flags, ZFS_TYPE_DATASET, - NULL, NULL, inherit_cb, propname); + NULL, NULL, 0, inherit_cb, propname); } return (ret); @@ -1578,7 +1603,7 @@ zfs_do_upgrade(int argc, char **argv) if (cb.cb_version == 0) cb.cb_version = ZPL_VERSION; ret = zfs_for_each(argc, argv, flags, ZFS_TYPE_FILESYSTEM, - NULL, NULL, upgrade_set_callback, &cb); + NULL, NULL, 0, upgrade_set_callback, &cb); (void) printf(gettext("%llu filesystems upgraded\n"), cb.cb_numupgraded); if (cb.cb_numsamegraded) { @@ -1596,14 +1621,14 @@ zfs_do_upgrade(int argc, char **argv) flags |= ZFS_ITER_RECURSE; ret = zfs_for_each(0, NULL, flags, ZFS_TYPE_FILESYSTEM, - NULL, NULL, upgrade_list_callback, &cb); + NULL, NULL, 0, upgrade_list_callback, &cb); found = cb.cb_foundone; cb.cb_foundone = B_FALSE; cb.cb_newer = B_TRUE; ret = zfs_for_each(0, NULL, flags, ZFS_TYPE_FILESYSTEM, - NULL, NULL, upgrade_list_callback, &cb); + NULL, NULL, 0, upgrade_list_callback, &cb); if (!cb.cb_foundone && !found) { (void) printf(gettext("All filesystems are " @@ -1615,11 +1640,12 @@ zfs_do_upgrade(int argc, char **argv) } /* - * list [-rH] [-o property[,property]...] [-t type[,type]...] + * list [-r][-d max] [-H] [-o property[,property]...] [-t type[,type]...] * [-s property [-s property]...] [-S property [-S property]...] * ... * * -r Recurse over all children + * -d Limit recursion by depth. * -H Scripted mode; elide headers and separate columns by tabs * -o Control which fields to display. * -t Control which object types to display. @@ -1769,16 +1795,20 @@ zfs_do_list(int argc, char **argv) char *fields = NULL; list_cbdata_t cb = { 0 }; char *value; + int limit = 0; int ret; zfs_sort_column_t *sortcol = NULL; int flags = ZFS_ITER_PROP_LISTSNAPS | ZFS_ITER_ARGS_CAN_BE_PATHS; /* check options */ - while ((c = getopt(argc, argv, ":o:rt:Hs:S:")) != -1) { + while ((c = getopt(argc, argv, ":d:o:rt:Hs:S:")) != -1) { switch (c) { case 'o': fields = optarg; break; + case 'd': + limit = parse_depth(optarg, &flags); + break; case 'r': flags |= ZFS_ITER_RECURSE; break; @@ -1869,7 +1899,7 @@ zfs_do_list(int argc, char **argv) cb.cb_first = B_TRUE; ret = zfs_for_each(argc, argv, flags, types, sortcol, &cb.cb_proplist, - list_callback, &cb); + limit, list_callback, &cb); zprop_free_list(cb.cb_proplist); zfs_free_sort_columns(sortcol); @@ -2252,7 +2282,7 @@ zfs_do_set(int argc, char **argv) } ret = zfs_for_each(argc - 2, argv + 2, NULL, - ZFS_TYPE_DATASET, NULL, NULL, set_callback, &cb); + ZFS_TYPE_DATASET, NULL, NULL, 0, set_callback, &cb); return (ret); } @@ -2886,7 +2916,7 @@ zfs_do_unallow(int argc, char **argv) flags |= ZFS_ITER_RECURSE; error = zfs_for_each(argc, argv, flags, ZFS_TYPE_FILESYSTEM|ZFS_TYPE_VOLUME, NULL, - NULL, unallow_callback, (void *)zperms); + NULL, 0, unallow_callback, (void *)zperms); if (zperms) nvlist_free(zperms); From owner-svn-src-stable@FreeBSD.ORG Thu Apr 15 01:25:17 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDDD9106564A; Thu, 15 Apr 2010 01:25:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A285F8FC08; Thu, 15 Apr 2010 01:25:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3F1PHFV044834; Thu, 15 Apr 2010 01:25:17 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3F1PHAT044831; Thu, 15 Apr 2010 01:25:17 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004150125.o3F1PHAT044831@svn.freebsd.org> From: Xin LI Date: Thu, 15 Apr 2010 01:25:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206642 - in stable/8/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 01:25:17 -0000 Author: delphij Date: Thu Apr 15 01:25:17 2010 New Revision: 206642 URL: http://svn.freebsd.org/changeset/base/206642 Log: MFC r205200 + r206199 Merge OpenSolaris revision 9396:f41cf682d0d3: 6830813 zfs list -t all fails assertion *Note that this is only a partial merge of this revision addressing only this one issue.* PR: bin/144720 Submitted by: mm Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zdb/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/8/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Thu Apr 15 01:22:38 2010 (r206641) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Thu Apr 15 01:25:17 2010 (r206642) @@ -368,7 +368,10 @@ zfs_for_each(int argc, char **argv, int * properties other than those listed in cb_proplist/sortcol are * accessed. * - * If cb_proplist is NULL then we retain all the properties. + * If cb_proplist is NULL then we retain all the properties. We + * always retain the zoned property, which some other properties + * need (userquota & friends), and the createtxg property, which + * we need to sort snapshots. */ if (cb.cb_proplist && *cb.cb_proplist) { zprop_list_t *p = *cb.cb_proplist; @@ -388,6 +391,9 @@ zfs_for_each(int argc, char **argv, int } sortcol = sortcol->sc_next; } + + cb.cb_props_table[ZFS_PROP_ZONED] = B_TRUE; + cb.cb_props_table[ZFS_PROP_CREATETXG] = B_TRUE; } else { (void) memset(cb.cb_props_table, B_TRUE, sizeof (cb.cb_props_table)); Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Thu Apr 15 01:22:38 2010 (r206641) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Thu Apr 15 01:25:17 2010 (r206642) @@ -4285,7 +4285,12 @@ zfs_prune_proplist(zfs_handle_t *zhp, ui zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr)); nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr); - if (props[zfs_prop] == B_FALSE) + /* + * We leave user:props in the nvlist, so there will be + * some ZPROP_INVAL. To be extra safe, don't prune + * those. + */ + if (zfs_prop != ZPROP_INVAL && props[zfs_prop] == B_FALSE) (void) nvlist_remove(zhp->zfs_props, nvpair_name(curr), nvpair_type(curr)); curr = next; From owner-svn-src-stable@FreeBSD.ORG Thu Apr 15 05:56:28 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A280106564A; Thu, 15 Apr 2010 05:56:28 +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 8C3678FC15; Thu, 15 Apr 2010 05:56:25 +0000 (UTC) Received: from porto.topspin.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 IAA18330; Thu, 15 Apr 2010 08:56:24 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1O2I3r-0004kw-NO; Thu, 15 Apr 2010 08:56:23 +0300 Message-ID: <4BC6AA87.40309@freebsd.org> Date: Thu, 15 Apr 2010 08:56:23 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100321) MIME-Version: 1.0 To: Xin LI References: <201004150120.o3F1KUPt043636@svn.freebsd.org> In-Reply-To: <201004150120.o3F1KUPt043636@svn.freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r206640 - in stable/8/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 05:56:28 -0000 on 15/04/2010 04:20 Xin LI said the following: > Author: delphij > Date: Thu Apr 15 01:20:30 2010 > New Revision: 206640 > URL: http://svn.freebsd.org/changeset/base/206640 > > Log: > MFC r205198: > > Merge OpenSolaris revision 8802:010b31dd4c53: > > 6773366 "zfs list" memory consumption can be further reduced > > PR: bin/144720 > Submitted by: mm I wonder why you haven't also included into this MFC the commit that fixes crash with user properties. I think it's not nice to MFC a change with a known bug without a fix. > + while (curr) { > + zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr)); > + nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr); > + > + if (props[zfs_prop] == B_FALSE) zfs_prop can be -1 here, remember? -- Andriy Gapon From owner-svn-src-stable@FreeBSD.ORG Thu Apr 15 05:59:31 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5A79106564A; Thu, 15 Apr 2010 05:59:31 +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 370008FC13; Thu, 15 Apr 2010 05:59:29 +0000 (UTC) Received: from porto.topspin.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 IAA18418; Thu, 15 Apr 2010 08:59:28 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1O2I6q-0004lE-Fp; Thu, 15 Apr 2010 08:59:28 +0300 Message-ID: <4BC6AB3F.6090605@freebsd.org> Date: Thu, 15 Apr 2010 08:59:27 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100321) MIME-Version: 1.0 To: Xin LI References: <201004150125.o3F1PHAT044831@svn.freebsd.org> In-Reply-To: <201004150125.o3F1PHAT044831@svn.freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r206642 - in stable/8/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 05:59:31 -0000 on 15/04/2010 04:25 Xin LI said the following: > Author: delphij > Date: Thu Apr 15 01:25:17 2010 > New Revision: 206642 > URL: http://svn.freebsd.org/changeset/base/206642 > > Log: > MFC r205200 + r206199 > > Merge OpenSolaris revision 9396:f41cf682d0d3: > > 6830813 zfs list -t all fails assertion > > *Note that this is only a partial merge of this revision addressing only > this one issue.* > > PR: bin/144720 > Submitted by: mm Oh here it is :) The window between the commits is sufficiently small, but I still think that it would have been better to MFC the fix in one go. > - if (props[zfs_prop] == B_FALSE) > + /* > + * We leave user:props in the nvlist, so there will be > + * some ZPROP_INVAL. To be extra safe, don't prune > + * those. > + */ > + if (zfs_prop != ZPROP_INVAL && props[zfs_prop] == B_FALSE) > (void) nvlist_remove(zhp->zfs_props, > nvpair_name(curr), nvpair_type(curr)); > curr = next; -- Andriy Gapon From owner-svn-src-stable@FreeBSD.ORG Thu Apr 15 08:17:28 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB6031065672; Thu, 15 Apr 2010 08:17:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B9CC98FC1A; Thu, 15 Apr 2010 08:17:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3F8HSRb039772; Thu, 15 Apr 2010 08:17:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3F8HSjg039771; Thu, 15 Apr 2010 08:17:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004150817.o3F8HSjg039771@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 15 Apr 2010 08:17:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206646 - stable/8/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 08:17:28 -0000 Author: kib Date: Thu Apr 15 08:17:28 2010 New Revision: 206646 URL: http://svn.freebsd.org/changeset/base/206646 Log: MFC r206395: Do not leak master pty or ptmx vnode. Modified: stable/8/sys/kern/tty_pts.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/tty_pts.c ============================================================================== --- stable/8/sys/kern/tty_pts.c Thu Apr 15 05:24:18 2010 (r206645) +++ stable/8/sys/kern/tty_pts.c Thu Apr 15 08:17:28 2010 (r206646) @@ -589,6 +589,15 @@ ptsdev_close(struct file *fp, struct thr tty_lock(tp); tty_rel_gone(tp); + /* + * Open of /dev/ptmx or /dev/ptyXX changes the type of file + * from DTYPE_VNODE to DTYPE_PTS. vn_open() increases vnode + * use count, we need to decrement it, and possibly do other + * required cleanup. + */ + if (fp->f_vnode != NULL) + return (vnops.fo_close(fp, td)); + return (0); } From owner-svn-src-stable@FreeBSD.ORG Thu Apr 15 08:20:57 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3932106566C; Thu, 15 Apr 2010 08:20:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D18AB8FC1B; Thu, 15 Apr 2010 08:20:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3F8KvDA040589; Thu, 15 Apr 2010 08:20:57 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3F8KvpB040587; Thu, 15 Apr 2010 08:20:57 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004150820.o3F8KvpB040587@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 15 Apr 2010 08:20:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206647 - stable/8/crypto/openssh X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 08:20:58 -0000 Author: kib Date: Thu Apr 15 08:20:57 2010 New Revision: 206647 URL: http://svn.freebsd.org/changeset/base/206647 Log: MFC r206397: Enhance r199804 by marking the daemonised child as immune to OOM instead of short-living parent. Only mark the master process that accepts connections, do not protect connection handlers spawned from inetd. Modified: stable/8/crypto/openssh/sshd.c Directory Properties: stable/8/crypto/openssh/ (props changed) Modified: stable/8/crypto/openssh/sshd.c ============================================================================== --- stable/8/crypto/openssh/sshd.c Thu Apr 15 08:17:28 2010 (r206646) +++ stable/8/crypto/openssh/sshd.c Thu Apr 15 08:20:57 2010 (r206647) @@ -1293,10 +1293,6 @@ main(int ac, char **av) /* Initialize configuration options to their default values. */ initialize_server_options(&options); - /* Avoid killing the process in high-pressure swapping environments. */ - if (madvise(NULL, 0, MADV_PROTECT) != 0) - debug("madvise(): %.200s", strerror(errno)); - /* Parse command-line arguments. */ while ((opt = getopt(ac, av, "f:p:b:k:h:g:u:o:C:dDeiqrtQRT46")) != -1) { switch (opt) { @@ -1663,6 +1659,10 @@ main(int ac, char **av) /* Reinitialize the log (because of the fork above). */ log_init(__progname, options.log_level, options.log_facility, log_stderr); + /* Avoid killing the process in high-pressure swapping environments. */ + if (!inetd_flag && madvise(NULL, 0, MADV_PROTECT) != 0) + debug("madvise(): %.200s", strerror(errno)); + /* Initialize the random number generator. */ arc4random_stir(); From owner-svn-src-stable@FreeBSD.ORG Thu Apr 15 12:20:14 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0695B106566C; Thu, 15 Apr 2010 12:20:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D16108FC12; Thu, 15 Apr 2010 12:20:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3FCKDMl095034; Thu, 15 Apr 2010 12:20:13 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FCKDBl095032; Thu, 15 Apr 2010 12:20:13 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004151220.o3FCKDBl095032@svn.freebsd.org> From: Alexander Motin Date: Thu, 15 Apr 2010 12:20:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206653 - stable/8/sys/dev/ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 12:20:14 -0000 Author: mav Date: Thu Apr 15 12:20:13 2010 New Revision: 206653 URL: http://svn.freebsd.org/changeset/base/206653 Log: MFC r205680: Use last 16 bytes of serial number in metadata instead of first ones, same as Intel MatrixRAID does. PR: kern/124064 Modified: stable/8/sys/dev/ata/ata-raid.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-raid.c ============================================================================== --- stable/8/sys/dev/ata/ata-raid.c Thu Apr 15 11:17:33 2010 (r206652) +++ stable/8/sys/dev/ata/ata-raid.c Thu Apr 15 12:20:13 2010 (r206653) @@ -2568,8 +2568,15 @@ ata_raid_intel_read_meta(device_t dev, s if (meta->generation >= raid->generation) { for (disk = 0; disk < raid->total_disks; disk++) { struct ata_device *atadev = device_get_softc(parent); + int len; - if (!strncmp(raid->disks[disk].serial, atadev->param.serial, + for (len = 0; len < sizeof(atadev->param.serial); len++) { + if (atadev->param.serial[len] < 0x20) + break; + } + len = (len > sizeof(raid->disks[disk].serial)) ? + len - sizeof(raid->disks[disk].serial) : 0; + if (!strncmp(raid->disks[disk].serial, atadev->param.serial + len, sizeof(raid->disks[disk].serial))) { raid->disks[disk].dev = parent; raid->disks[disk].flags |= (AR_DF_PRESENT | AR_DF_ONLINE); @@ -2639,8 +2646,15 @@ ata_raid_intel_write_meta(struct ar_soft device_get_softc(device_get_parent(rdp->disks[disk].dev)); struct ata_device *atadev = device_get_softc(rdp->disks[disk].dev); + int len; - bcopy(atadev->param.serial, meta->disk[disk].serial, + for (len = 0; len < sizeof(atadev->param.serial); len++) { + if (atadev->param.serial[len] < 0x20) + break; + } + len = (len > sizeof(rdp->disks[disk].serial)) ? + len - sizeof(rdp->disks[disk].serial) : 0; + bcopy(atadev->param.serial + len, meta->disk[disk].serial, sizeof(rdp->disks[disk].serial)); meta->disk[disk].sectors = rdp->disks[disk].sectors; meta->disk[disk].id = (ch->unit << 16) | atadev->unit; From owner-svn-src-stable@FreeBSD.ORG Thu Apr 15 12:22:47 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76131106564A; Thu, 15 Apr 2010 12:22:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4CF8E8FC1C; Thu, 15 Apr 2010 12:22:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3FCMlZu095692; Thu, 15 Apr 2010 12:22:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FCMl0n095690; Thu, 15 Apr 2010 12:22:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004151222.o3FCMl0n095690@svn.freebsd.org> From: Alexander Motin Date: Thu, 15 Apr 2010 12:22:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206654 - stable/7/sys/dev/ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 12:22:47 -0000 Author: mav Date: Thu Apr 15 12:22:47 2010 New Revision: 206654 URL: http://svn.freebsd.org/changeset/base/206654 Log: MFC r205680: Use last 16 bytes of serial number in metadata instead of first ones, same as Intel MatrixRAID does. PR: kern/124064 Modified: stable/7/sys/dev/ata/ata-raid.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/ata/ata-raid.c ============================================================================== --- stable/7/sys/dev/ata/ata-raid.c Thu Apr 15 12:20:13 2010 (r206653) +++ stable/7/sys/dev/ata/ata-raid.c Thu Apr 15 12:22:47 2010 (r206654) @@ -2559,8 +2559,15 @@ ata_raid_intel_read_meta(device_t dev, s if (meta->generation >= raid->generation) { for (disk = 0; disk < raid->total_disks; disk++) { struct ata_device *atadev = device_get_softc(parent); + int len; - if (!strncmp(raid->disks[disk].serial, atadev->param.serial, + for (len = 0; len < sizeof(atadev->param.serial); len++) { + if (atadev->param.serial[len] < 0x20) + break; + } + len = (len > sizeof(raid->disks[disk].serial)) ? + len - sizeof(raid->disks[disk].serial) : 0; + if (!strncmp(raid->disks[disk].serial, atadev->param.serial + len, sizeof(raid->disks[disk].serial))) { raid->disks[disk].dev = parent; raid->disks[disk].flags |= (AR_DF_PRESENT | AR_DF_ONLINE); @@ -2627,8 +2634,15 @@ ata_raid_intel_write_meta(struct ar_soft device_get_softc(device_get_parent(rdp->disks[disk].dev)); struct ata_device *atadev = device_get_softc(rdp->disks[disk].dev); + int len; - bcopy(atadev->param.serial, meta->disk[disk].serial, + for (len = 0; len < sizeof(atadev->param.serial); len++) { + if (atadev->param.serial[len] < 0x20) + break; + } + len = (len > sizeof(rdp->disks[disk].serial)) ? + len - sizeof(rdp->disks[disk].serial) : 0; + bcopy(atadev->param.serial + len, meta->disk[disk].serial, sizeof(rdp->disks[disk].serial)); meta->disk[disk].sectors = rdp->disks[disk].sectors; meta->disk[disk].id = (ch->unit << 16) | ATA_DEV(atadev->unit); From owner-svn-src-stable@FreeBSD.ORG Thu Apr 15 12:26:24 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4742106564A; Thu, 15 Apr 2010 12:26:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 950058FC15; Thu, 15 Apr 2010 12:26:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3FCQOsA096584; Thu, 15 Apr 2010 12:26:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FCQO3t096582; Thu, 15 Apr 2010 12:26:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004151226.o3FCQO3t096582@svn.freebsd.org> From: Alexander Motin Date: Thu, 15 Apr 2010 12:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206655 - stable/8/sys/dev/ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 12:26:24 -0000 Author: mav Date: Thu Apr 15 12:26:24 2010 New Revision: 206655 URL: http://svn.freebsd.org/changeset/base/206655 Log: MFC r205967: Include opt_ata.h, as some structures here depending on ATA_CAM option. This fixes ATA_CAM with atamvsata and probably some other drivers. Modified: stable/8/sys/dev/ata/ata-all.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-all.h ============================================================================== --- stable/8/sys/dev/ata/ata-all.h Thu Apr 15 12:22:47 2010 (r206654) +++ stable/8/sys/dev/ata/ata-all.h Thu Apr 15 12:26:24 2010 (r206655) @@ -26,6 +26,8 @@ * $FreeBSD$ */ +#include "opt_ata.h" + #if 0 #define ATA_LEGACY_SUPPORT /* Enable obsolete features that break * some modern devices */ From owner-svn-src-stable@FreeBSD.ORG Thu Apr 15 12:30:46 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 704421065674; Thu, 15 Apr 2010 12:30:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60D0C8FC08; Thu, 15 Apr 2010 12:30:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3FCUkWU097665; Thu, 15 Apr 2010 12:30:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FCUkAG097663; Thu, 15 Apr 2010 12:30:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004151230.o3FCUkAG097663@svn.freebsd.org> From: Alexander Motin Date: Thu, 15 Apr 2010 12:30:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206656 - stable/8/sys/arm/mv X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 12:30:46 -0000 Author: mav Date: Thu Apr 15 12:30:46 2010 New Revision: 206656 URL: http://svn.freebsd.org/changeset/base/206656 Log: MFC r206053, r206054: Fill extended ATA command registers in cPRD to support 48bit commands. Modified: stable/8/sys/arm/mv/mv_sata.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/arm/mv/mv_sata.c ============================================================================== --- stable/8/sys/arm/mv/mv_sata.c Thu Apr 15 12:26:24 2010 (r206655) +++ stable/8/sys/arm/mv/mv_sata.c Thu Apr 15 12:30:46 2010 (r206656) @@ -600,7 +600,12 @@ sata_channel_begin_transaction(struct at crqb->crqb_ata_lba_mid = request->u.ata.lba >> 8; crqb->crqb_ata_lba_high = request->u.ata.lba >> 16; crqb->crqb_ata_device = ((request->u.ata.lba >> 24) & 0x0F) | (1 << 6); + crqb->crqb_ata_lba_low_p = request->u.ata.lba >> 24; + crqb->crqb_ata_lba_mid_p = request->u.ata.lba >> 32; + crqb->crqb_ata_lba_high_p = request->u.ata.lba >> 40; + crqb->crqb_ata_feature_p = request->u.ata.feature >> 8; crqb->crqb_ata_count = request->u.ata.count; + crqb->crqb_ata_count_p = request->u.ata.count >> 8; bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); From owner-svn-src-stable@FreeBSD.ORG Thu Apr 15 12:38:55 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA3BA106564A; Thu, 15 Apr 2010 12:38:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DAC4A8FC22; Thu, 15 Apr 2010 12:38:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3FCctKb099608; Thu, 15 Apr 2010 12:38:55 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FCctL9099606; Thu, 15 Apr 2010 12:38:55 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004151238.o3FCctL9099606@svn.freebsd.org> From: Alexander Motin Date: Thu, 15 Apr 2010 12:38:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206657 - stable/8/sys/netgraph X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 12:38:56 -0000 Author: mav Date: Thu Apr 15 12:38:55 2010 New Revision: 206657 URL: http://svn.freebsd.org/changeset/base/206657 Log: NFC r206000: Make ng_ppp fulfill upper protocol stack layers alignment requirements on platforms with strict alignment constraints. This fixes kernel panics on arm and probably other architectures. PR: sparc64/80410, sparc/118932, sparc/113556 Modified: stable/8/sys/netgraph/ng_ppp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netgraph/ng_ppp.c ============================================================================== --- stable/8/sys/netgraph/ng_ppp.c Thu Apr 15 12:30:46 2010 (r206656) +++ stable/8/sys/netgraph/ng_ppp.c Thu Apr 15 12:38:55 2010 (r206657) @@ -907,7 +907,21 @@ ng_ppp_proto_recv(node_p node, item_p it const priv_p priv = NG_NODE_PRIVATE(node); hook_p outHook = NULL; int error; +#ifdef ALIGNED_POINTER + struct mbuf *m, *n; + NGI_GET_M(item, m); + if (!ALIGNED_POINTER(mtod(m, caddr_t), uint32_t)) { + n = m_defrag(m, M_NOWAIT); + if (n == NULL) { + m_freem(m); + NG_FREE_ITEM(item); + return (ENOBUFS); + } + m = n; + } + NGI_M(item) = m; +#endif /* ALIGNED_POINTER */ switch (proto) { case PROT_IP: if (priv->conf.enableIP) From owner-svn-src-stable@FreeBSD.ORG Thu Apr 15 12:40:02 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B2F5106566C; Thu, 15 Apr 2010 12:40:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78DF38FC0C; Thu, 15 Apr 2010 12:40:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3FCe2nv099892; Thu, 15 Apr 2010 12:40:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FCe2v8099890; Thu, 15 Apr 2010 12:40:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004151240.o3FCe2v8099890@svn.freebsd.org> From: Alexander Motin Date: Thu, 15 Apr 2010 12:40:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206658 - stable/8/sys/netgraph X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 12:40:03 -0000 Author: mav Date: Thu Apr 15 12:40:02 2010 New Revision: 206658 URL: http://svn.freebsd.org/changeset/base/206658 Log: MFC r206015: Make ng_l2tp irrelevant to data alignment. Modified: stable/8/sys/netgraph/ng_l2tp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netgraph/ng_l2tp.c ============================================================================== --- stable/8/sys/netgraph/ng_l2tp.c Thu Apr 15 12:38:55 2010 (r206657) +++ stable/8/sys/netgraph/ng_l2tp.c Thu Apr 15 12:40:02 2010 (r206658) @@ -790,7 +790,7 @@ ng_l2tp_rcvdata_lower(hook_p h, item_p i NG_FREE_ITEM(item); ERROUT(EINVAL); } - hdr = ntohs(*mtod(m, u_int16_t *)); + hdr = (mtod(m, uint8_t *)[0] << 8) + mtod(m, uint8_t *)[1]; m_adj(m, 2); /* Check required header bits and minimum length */ @@ -819,7 +819,7 @@ ng_l2tp_rcvdata_lower(hook_p h, item_p i NG_FREE_ITEM(item); ERROUT(EINVAL); } - len = (u_int16_t)ntohs(*mtod(m, u_int16_t *)) - 4; + len = (mtod(m, uint8_t *)[0] << 8) + mtod(m, uint8_t *)[1] - 4; m_adj(m, 2); if (len < 0 || len > m->m_pkthdr.len) { priv->stats.recvInvalid++; @@ -1095,9 +1095,10 @@ ng_l2tp_rcvdata(hook_p hook, item_p item const priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); const hookpriv_p hpriv = NG_HOOK_PRIVATE(hook); struct mbuf *m; + uint8_t *p; u_int16_t hdr; int error; - int i = 1; + int i = 2; /* Sanity check */ L2TP_SEQ_CHECK(&priv->seq); @@ -1129,20 +1130,27 @@ ng_l2tp_rcvdata(hook_p hook, item_p item NG_FREE_ITEM(item); ERROUT(ENOBUFS); } + p = mtod(m, uint8_t *); hdr = L2TP_DATA_HDR; if (hpriv->conf.include_length) { hdr |= L2TP_HDR_LEN; - mtod(m, u_int16_t *)[i++] = htons(m->m_pkthdr.len); + p[i++] = m->m_pkthdr.len >> 8; + p[i++] = m->m_pkthdr.len & 0xff; } - mtod(m, u_int16_t *)[i++] = htons(priv->conf.peer_id); - mtod(m, u_int16_t *)[i++] = htons(hpriv->conf.peer_id); + p[i++] = priv->conf.peer_id >> 8; + p[i++] = priv->conf.peer_id & 0xff; + p[i++] = hpriv->conf.peer_id >> 8; + p[i++] = hpriv->conf.peer_id & 0xff; if (hpriv->conf.enable_dseq) { hdr |= L2TP_HDR_SEQ; - mtod(m, u_int16_t *)[i++] = htons(hpriv->ns); - mtod(m, u_int16_t *)[i++] = htons(hpriv->nr); + p[i++] = hpriv->ns >> 8; + p[i++] = hpriv->ns & 0xff; + p[i++] = hpriv->nr >> 8; + p[i++] = hpriv->nr & 0xff; hpriv->ns++; } - mtod(m, u_int16_t *)[0] = htons(hdr); + p[0] = hdr >> 8; + p[1] = hdr & 0xff; /* Update per session stats. */ hpriv->stats.xmitPackets++; @@ -1496,6 +1504,7 @@ static int ng_l2tp_xmit_ctrl(priv_p priv, struct mbuf *m, u_int16_t ns) { struct l2tp_seq *const seq = &priv->seq; + uint8_t *p; u_int16_t session_id = 0; int error; @@ -1540,12 +1549,19 @@ ng_l2tp_xmit_ctrl(priv_p priv, struct mb } /* Fill in L2TP header */ - mtod(m, u_int16_t *)[0] = htons(L2TP_CTRL_HDR); - mtod(m, u_int16_t *)[1] = htons(m->m_pkthdr.len); - mtod(m, u_int16_t *)[2] = htons(priv->conf.peer_id); - mtod(m, u_int16_t *)[3] = htons(session_id); - mtod(m, u_int16_t *)[4] = htons(ns); - mtod(m, u_int16_t *)[5] = htons(seq->nr); + p = mtod(m, u_int8_t *); + p[0] = L2TP_CTRL_HDR >> 8; + p[1] = L2TP_CTRL_HDR & 0xff; + p[2] = m->m_pkthdr.len >> 8; + p[3] = m->m_pkthdr.len & 0xff; + p[4] = priv->conf.peer_id >> 8; + p[5] = priv->conf.peer_id & 0xff; + p[6] = session_id >> 8; + p[7] = session_id & 0xff; + p[8] = ns >> 8; + p[9] = ns & 0xff; + p[10] = seq->nr >> 8; + p[11] = seq->nr & 0xff; /* Update sequence number info and stats */ priv->stats.xmitPackets++; From owner-svn-src-stable@FreeBSD.ORG Thu Apr 15 12:41:37 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 473AA106567A; Thu, 15 Apr 2010 12:41:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 379158FC1D; Thu, 15 Apr 2010 12:41:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3FCfbeP000435; Thu, 15 Apr 2010 12:41:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FCfbYf000433; Thu, 15 Apr 2010 12:41:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004151241.o3FCfbYf000433@svn.freebsd.org> From: Alexander Motin Date: Thu, 15 Apr 2010 12:41:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206660 - stable/8/sys/netgraph X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 12:41:37 -0000 Author: mav Date: Thu Apr 15 12:41:36 2010 New Revision: 206660 URL: http://svn.freebsd.org/changeset/base/206660 Log: MFC r206017: Make ng_ksocket fulfill lower protocol stack layers alignment requirements on platforms with strict alignment constraints. This fixes kernel panics on arm and probably other architectures. PR: sparc64/80410, sparc/118932, sparc/113556 Modified: stable/8/sys/netgraph/ng_ksocket.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netgraph/ng_ksocket.c ============================================================================== --- stable/8/sys/netgraph/ng_ksocket.c Thu Apr 15 12:40:33 2010 (r206659) +++ stable/8/sys/netgraph/ng_ksocket.c Thu Apr 15 12:41:36 2010 (r206660) @@ -902,12 +902,24 @@ ng_ksocket_rcvdata(hook_p hook, item_p i struct sockaddr *sa = NULL; int error; struct mbuf *m; +#ifdef ALIGNED_POINTER + struct mbuf *n; +#endif /* ALIGNED_POINTER */ struct sa_tag *stag; /* Extract data */ NGI_GET_M(item, m); NG_FREE_ITEM(item); - +#ifdef ALIGNED_POINTER + if (!ALIGNED_POINTER(mtod(m, caddr_t), uint32_t)) { + n = m_defrag(m, M_NOWAIT); + if (n == NULL) { + m_freem(m); + return (ENOBUFS); + } + m = n; + } +#endif /* ALIGNED_POINTER */ /* * Look if socket address is stored in packet tags. * If sockaddr is ours, or provided by a third party (zero id), From owner-svn-src-stable@FreeBSD.ORG Thu Apr 15 12:46:16 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E640F1065674; Thu, 15 Apr 2010 12:46:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D56758FC0C; Thu, 15 Apr 2010 12:46:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3FCkGSR001603; Thu, 15 Apr 2010 12:46:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FCkGCn001597; Thu, 15 Apr 2010 12:46:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004151246.o3FCkGCn001597@svn.freebsd.org> From: Alexander Motin Date: Thu, 15 Apr 2010 12:46:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206661 - stable/8/sys/netgraph X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 12:46:17 -0000 Author: mav Date: Thu Apr 15 12:46:16 2010 New Revision: 206661 URL: http://svn.freebsd.org/changeset/base/206661 Log: MFC r206021, r206032, r206049, r206050: Remove some more alignment constraints. Modified: stable/8/sys/netgraph/ng_deflate.c stable/8/sys/netgraph/ng_mppc.c stable/8/sys/netgraph/ng_ppp.c stable/8/sys/netgraph/ng_pptpgre.c stable/8/sys/netgraph/ng_tcpmss.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netgraph/ng_deflate.c ============================================================================== --- stable/8/sys/netgraph/ng_deflate.c Thu Apr 15 12:41:36 2010 (r206660) +++ stable/8/sys/netgraph/ng_deflate.c Thu Apr 15 12:46:16 2010 (r206661) @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -505,8 +506,8 @@ ng_deflate_compress(node_p node, struct priv->stats.OutOctets+=inlen; } else { /* Install header. */ - ((u_int16_t *)priv->outbuf)[0] = htons(PROT_COMPD); - ((u_int16_t *)priv->outbuf)[1] = htons(priv->seqnum); + be16enc(priv->outbuf, PROT_COMPD); + be16enc(priv->outbuf + 2, priv->seqnum); /* Return packet in an mbuf. */ m_copyback(m, 0, outlen, (caddr_t)priv->outbuf); @@ -568,7 +569,7 @@ ng_deflate_decompress(node_p node, struc proto = priv->inbuf[0]; offset = 1; } else { - proto = ntohs(((uint16_t *)priv->inbuf)[0]); + proto = be16dec(priv->inbuf); offset = 2; } @@ -579,7 +580,7 @@ ng_deflate_decompress(node_p node, struc priv->stats.FramesComp++; /* Check sequence number. */ - rseqnum = ntohs(((uint16_t *)(priv->inbuf + offset))[0]); + rseqnum = be16dec(priv->inbuf + offset); offset += 2; if (rseqnum != priv->seqnum) { priv->stats.Errors++; Modified: stable/8/sys/netgraph/ng_mppc.c ============================================================================== --- stable/8/sys/netgraph/ng_mppc.c Thu Apr 15 12:41:36 2010 (r206660) +++ stable/8/sys/netgraph/ng_mppc.c Thu Apr 15 12:46:16 2010 (r206661) @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -601,7 +602,7 @@ err1: /* Install header */ M_PREPEND(m, MPPC_HDRLEN, M_DONTWAIT); if (m != NULL) - *(mtod(m, uint16_t *)) = htons(header); + be16enc(mtod(m, void *), header); *datap = m; return (*datap == NULL ? ENOBUFS : 0); @@ -630,8 +631,7 @@ ng_mppc_decompress(node_p node, struct m m_freem(m); return (EINVAL); } - m_copydata(m, 0, MPPC_HDRLEN, (caddr_t)&header); - header = ntohs(header); + header = be16dec(mtod(m, void *)); cc = (header & MPPC_CCOUNT_MASK); m_adj(m, MPPC_HDRLEN); Modified: stable/8/sys/netgraph/ng_ppp.c ============================================================================== --- stable/8/sys/netgraph/ng_ppp.c Thu Apr 15 12:41:36 2010 (r206660) +++ stable/8/sys/netgraph/ng_ppp.c Thu Apr 15 12:46:16 2010 (r206661) @@ -97,6 +97,7 @@ #include #include #include +#include #include #include @@ -860,8 +861,8 @@ ng_ppp_rcvdata_bypass(hook_p hook, item_ NG_FREE_ITEM(item); return (ENOBUFS); } - linkNum = ntohs(mtod(m, uint16_t *)[0]); - proto = ntohs(mtod(m, uint16_t *)[1]); + linkNum = be16dec(mtod(m, uint8_t *)); + proto = be16dec(mtod(m, uint8_t *) + 2); m_adj(m, 4); NGI_M(item) = m; @@ -1544,7 +1545,7 @@ ng_ppp_mp_recv(node_p node, item_p item, if (m->m_len < 2 && (m = m_pullup(m, 2)) == NULL) ERROUT(ENOBUFS); - shdr = ntohs(*mtod(m, uint16_t *)); + shdr = be16dec(mtod(m, void *)); frag->seq = MP_SHORT_EXTEND(shdr); frag->first = (shdr & MP_SHORT_FIRST_FLAG) != 0; frag->last = (shdr & MP_SHORT_LAST_FLAG) != 0; @@ -1561,7 +1562,7 @@ ng_ppp_mp_recv(node_p node, item_p item, if (m->m_len < 4 && (m = m_pullup(m, 4)) == NULL) ERROUT(ENOBUFS); - lhdr = ntohl(*mtod(m, uint32_t *)); + lhdr = be32dec(mtod(m, void *)); frag->seq = MP_LONG_EXTEND(lhdr); frag->first = (lhdr & MP_LONG_FIRST_FLAG) != 0; frag->last = (lhdr & MP_LONG_LAST_FLAG) != 0; Modified: stable/8/sys/netgraph/ng_pptpgre.c ============================================================================== --- stable/8/sys/netgraph/ng_pptpgre.c Thu Apr 15 12:41:36 2010 (r206660) +++ stable/8/sys/netgraph/ng_pptpgre.c Thu Apr 15 12:46:16 2010 (r206661) @@ -62,6 +62,7 @@ #include #include #include +#include #include #include @@ -572,9 +573,9 @@ ng_pptpgre_xmit(hpriv_p hpriv, item_p it } /* Build GRE header */ - ((u_int32_t *)gre)[0] = htonl(PPTP_INIT_VALUE); - gre->length = (m != NULL) ? htons((u_short)m->m_pkthdr.len) : 0; - gre->cid = htons(hpriv->conf.peerCid); + be32enc(gre, PPTP_INIT_VALUE); + be16enc(&gre->length, (m != NULL) ? m->m_pkthdr.len : 0); + be16enc(&gre->cid, hpriv->conf.peerCid); /* Include sequence number if packet contains any data */ if (m != NULL) { @@ -584,13 +585,13 @@ ng_pptpgre_xmit(hpriv_p hpriv, item_p it = ng_pptpgre_time(); } hpriv->xmitSeq++; - gre->data[0] = htonl(hpriv->xmitSeq); + be32enc(&gre->data[0], hpriv->xmitSeq); } /* Include acknowledgement (and stop send ack timer) if needed */ if (hpriv->conf.enableAlwaysAck || hpriv->xmitAck != hpriv->recvSeq) { gre->hasAck = 1; - gre->data[gre->hasSeq] = htonl(hpriv->recvSeq); + be32enc(&gre->data[gre->hasSeq], hpriv->recvSeq); hpriv->xmitAck = hpriv->recvSeq; if (hpriv->conf.enableDelayedAck) ng_uncallout(&hpriv->sackTimer, hpriv->node); @@ -705,18 +706,17 @@ ng_pptpgre_rcvdata_lower(hook_p hook, it /* Sanity check packet length and GRE header bits */ extralen = m->m_pkthdr.len - - (iphlen + grelen + gre->hasSeq * (u_int16_t)ntohs(gre->length)); + - (iphlen + grelen + gre->hasSeq * be16dec(&gre->length)); if (extralen < 0) { priv->stats.recvBadGRE++; ERROUT(EINVAL); } - if ((ntohl(*((const u_int32_t *)gre)) & PPTP_INIT_MASK) - != PPTP_INIT_VALUE) { + if ((be32dec(gre) & PPTP_INIT_MASK) != PPTP_INIT_VALUE) { priv->stats.recvBadGRE++; ERROUT(EINVAL); } - hpriv = ng_pptpgre_find_session(priv, ntohs(gre->cid)); + hpriv = ng_pptpgre_find_session(priv, be16dec(&gre->cid)); if (hpriv == NULL || hpriv->hook == NULL || !hpriv->conf.enabled) { priv->stats.recvBadCID++; ERROUT(EINVAL); @@ -725,7 +725,7 @@ ng_pptpgre_rcvdata_lower(hook_p hook, it /* Look for peer ack */ if (gre->hasAck) { - const u_int32_t ack = ntohl(gre->data[gre->hasSeq]); + const u_int32_t ack = be32dec(&gre->data[gre->hasSeq]); const int index = ack - hpriv->recvAck - 1; long sample; long diff; @@ -776,7 +776,7 @@ badAck: /* See if frame contains any data */ if (gre->hasSeq) { - const u_int32_t seq = ntohl(gre->data[0]); + const u_int32_t seq = be32dec(&gre->data[0]); /* Sanity check sequence number */ if (PPTP_SEQ_DIFF(seq, hpriv->recvSeq) <= 0) { Modified: stable/8/sys/netgraph/ng_tcpmss.c ============================================================================== --- stable/8/sys/netgraph/ng_tcpmss.c Thu Apr 15 12:41:36 2010 (r206660) +++ stable/8/sys/netgraph/ng_tcpmss.c Thu Apr 15 12:46:16 2010 (r206661) @@ -47,6 +47,7 @@ #include #include +#include #include #include #include @@ -410,9 +411,9 @@ correct_mss(struct tcphdr *tc, int hlen, { int olen, optlen; u_char *opt; - uint16_t *mss; int accumulate; int res = 0; + uint16_t sum; for (olen = hlen - sizeof(struct tcphdr), opt = (u_char *)(tc + 1); olen > 0; olen -= optlen, opt += optlen) { @@ -427,13 +428,15 @@ correct_mss(struct tcphdr *tc, int hlen, if (*opt == TCPOPT_MAXSEG) { if (optlen != TCPOLEN_MAXSEG) continue; - mss = (uint16_t *)(opt + 2); - if (ntohs(*mss) > maxmss) { - accumulate = *mss; - *mss = htons(maxmss); - accumulate -= *mss; - if ((flags & CSUM_TCP) == 0) - TCPMSS_ADJUST_CHECKSUM(accumulate, tc->th_sum); + accumulate = be16dec(opt + 2); + if (accumulate > maxmss) { + if ((flags & CSUM_TCP) == 0) { + accumulate -= maxmss; + sum = be16dec(&tc->th_sum); + TCPMSS_ADJUST_CHECKSUM(accumulate, sum); + be16enc(&tc->th_sum, sum); + } + be16enc(opt + 2, maxmss); res = 1; } } From owner-svn-src-stable@FreeBSD.ORG Thu Apr 15 19:19:59 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5E071065672; Thu, 15 Apr 2010 19:19:59 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3D7D8FC1B; Thu, 15 Apr 2010 19:19:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3FJJxw1093823; Thu, 15 Apr 2010 19:19:59 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FJJxI0093819; Thu, 15 Apr 2010 19:19:59 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004151919.o3FJJxI0093819@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 15 Apr 2010 19:19:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206678 - stable/8/sys/dev/mii X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 19:20:00 -0000 Author: yongari Date: Thu Apr 15 19:19:59 2010 New Revision: 206678 URL: http://svn.freebsd.org/changeset/base/206678 Log: MFC r205299: - Added support for 5709S/5716S PHYs. Submitted by: pyunyh PR: kern/134658, kern/136417, kern/139761, kern/140970 Modified: stable/8/sys/dev/mii/brgphy.c stable/8/sys/dev/mii/brgphyreg.h stable/8/sys/dev/mii/miidevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mii/brgphy.c ============================================================================== --- stable/8/sys/dev/mii/brgphy.c Thu Apr 15 19:19:38 2010 (r206677) +++ stable/8/sys/dev/mii/brgphy.c Thu Apr 15 19:19:59 2010 (r206678) @@ -75,6 +75,7 @@ struct brgphy_softc { #define BRGPHY_5706S 0x0001 #define BRGPHY_5708S 0x0002 #define BRGPHY_NOANWAIT 0x0004 +#define BRGPHY_5709S 0x0008 int bce_phy_flags; /* PHY flags transferred from the MAC driver */ }; @@ -139,6 +140,7 @@ static const struct mii_phydesc brgphys[ MII_PHY_DESC(xxBROADCOM_ALT1, BCM5784), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709C), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5761), + MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709S), MII_PHY_DESC(BROADCOM2, BCM5906), MII_PHY_END }; @@ -216,30 +218,34 @@ brgphy_attach(device_t dev) break; case MII_OUI_xxBROADCOM: switch (bsc->mii_model) { - case MII_MODEL_xxBROADCOM_BCM5706: - case MII_MODEL_xxBROADCOM_BCM5714: - /* - * The 5464 PHY used in the 5706 supports both copper - * and fiber interfaces over GMII. Need to check the - * shadow registers to see which mode is actually - * in effect, and therefore whether we have 5706C or - * 5706S. - */ - PHY_WRITE(sc, BRGPHY_MII_SHADOW_1C, - BRGPHY_SHADOW_1C_MODE_CTRL); - if (PHY_READ(sc, BRGPHY_MII_SHADOW_1C) & - BRGPHY_SHADOW_1C_ENA_1000X) { - bsc->serdes_flags |= BRGPHY_5706S; - sc->mii_flags |= MIIF_HAVEFIBER; - } - break; + case MII_MODEL_xxBROADCOM_BCM5706: + case MII_MODEL_xxBROADCOM_BCM5714: + /* + * The 5464 PHY used in the 5706 supports both copper + * and fiber interfaces over GMII. Need to check the + * shadow registers to see which mode is actually + * in effect, and therefore whether we have 5706C or + * 5706S. + */ + PHY_WRITE(sc, BRGPHY_MII_SHADOW_1C, + BRGPHY_SHADOW_1C_MODE_CTRL); + if (PHY_READ(sc, BRGPHY_MII_SHADOW_1C) & + BRGPHY_SHADOW_1C_ENA_1000X) { + bsc->serdes_flags |= BRGPHY_5706S; + sc->mii_flags |= MIIF_HAVEFIBER; + } + break; } break; case MII_OUI_xxBROADCOM_ALT1: switch (bsc->mii_model) { - case MII_MODEL_xxBROADCOM_ALT1_BCM5708S: - bsc->serdes_flags |= BRGPHY_5708S; - sc->mii_flags |= MIIF_HAVEFIBER; - break; + case MII_MODEL_xxBROADCOM_ALT1_BCM5708S: + bsc->serdes_flags |= BRGPHY_5708S; + sc->mii_flags |= MIIF_HAVEFIBER; + break; + case MII_MODEL_xxBROADCOM_ALT1_BCM5709S: + bsc->serdes_flags |= BRGPHY_5709S; + sc->mii_flags |= MIIF_HAVEFIBER; + break; } break; default: device_printf(dev, "Unrecognized OUI for PHY!\n"); @@ -631,6 +637,7 @@ brgphy_status(struct mii_softc *sc) PHY_WRITE(sc, BRGPHY_5708S_BLOCK_ADDR, BRGPHY_5708S_DIG_PG0); xstat = PHY_READ(sc, BRGPHY_5708S_PG0_1000X_STAT1); + /* Check for MRBE auto-negotiated speed results. */ switch (xstat & BRGPHY_5708S_PG0_1000X_STAT1_SPEED_MASK) { case BRGPHY_5708S_PG0_1000X_STAT1_SPEED_10: mii->mii_media_active |= IFM_10_FL; break; @@ -642,11 +649,40 @@ brgphy_status(struct mii_softc *sc) mii->mii_media_active |= IFM_2500_SX; break; } + /* Check for MRBE auto-negotiated duplex results. */ if (xstat & BRGPHY_5708S_PG0_1000X_STAT1_FDX) mii->mii_media_active |= IFM_FDX; else mii->mii_media_active |= IFM_HDX; - } + + } else if (bsc->serdes_flags & BRGPHY_5709S) { + + /* Select GP Status Block of the AN MMD, get autoneg results. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_GP_STATUS); + xstat = PHY_READ(sc, BRGPHY_GP_STATUS_TOP_ANEG_STATUS); + + /* Restore IEEE0 block (assumed in all brgphy(4) code). */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_COMBO_IEEE0); + + /* Check for MRBE auto-negotiated speed results. */ + switch (xstat & BRGPHY_GP_STATUS_TOP_ANEG_SPEED_MASK) { + case BRGPHY_GP_STATUS_TOP_ANEG_SPEED_10: + mii->mii_media_active |= IFM_10_FL; break; + case BRGPHY_GP_STATUS_TOP_ANEG_SPEED_100: + mii->mii_media_active |= IFM_100_FX; break; + case BRGPHY_GP_STATUS_TOP_ANEG_SPEED_1G: + mii->mii_media_active |= IFM_1000_SX; break; + case BRGPHY_GP_STATUS_TOP_ANEG_SPEED_25G: + mii->mii_media_active |= IFM_2500_SX; break; + } + + /* Check for MRBE auto-negotiated duplex results. */ + if (xstat & BRGPHY_GP_STATUS_TOP_ANEG_FDX) + mii->mii_media_active |= IFM_FDX; + else + mii->mii_media_active |= IFM_HDX; + } + } #if 0 @@ -967,6 +1003,7 @@ brgphy_reset(struct mii_softc *sc) struct bge_softc *bge_sc = NULL; struct bce_softc *bce_sc = NULL; struct ifnet *ifp; + int val; /* Perform a standard PHY reset. */ mii_phy_reset(sc); @@ -1089,7 +1126,49 @@ brgphy_reset(struct mii_softc *sc) PHY_WRITE(sc, BRGPHY_5708S_BLOCK_ADDR, BRGPHY_5708S_DIG_PG0); } - } else if (BCE_CHIP_NUM(bce_sc) == BCE_CHIP_NUM_5709) { + } else if (BCE_CHIP_NUM(bce_sc) == BCE_CHIP_NUM_5709 && + (bce_sc->bce_phy_flags & BCE_PHY_SERDES_FLAG)) { + + /* Select the SerDes Digital block of the AN MMD. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_SERDES_DIG); + val = PHY_READ(sc, BRGPHY_SERDES_DIG_1000X_CTL1); + val &= ~BRGPHY_SD_DIG_1000X_CTL1_AUTODET; + val |= BRGPHY_SD_DIG_1000X_CTL1_FIBER; + PHY_WRITE(sc, BRGPHY_SERDES_DIG_1000X_CTL1, val); + + /* Select the Over 1G block of the AN MMD. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_OVER_1G); + + /* Enable autoneg "Next Page" to advertise 2.5G support. */ + val = PHY_READ(sc, BRGPHY_OVER_1G_UNFORMAT_PG1); + if (bce_sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) + val |= BRGPHY_5708S_ANEG_NXT_PG_XMIT1_25G; + else + val &= ~BRGPHY_5708S_ANEG_NXT_PG_XMIT1_25G; + PHY_WRITE(sc, BRGPHY_OVER_1G_UNFORMAT_PG1, val); + + /* Select the Multi-Rate Backplane Ethernet block of the AN MMD. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_MRBE); + + /* Enable MRBE speed autoneg. */ + val = PHY_READ(sc, BRGPHY_MRBE_MSG_PG5_NP); + val |= BRGPHY_MRBE_MSG_PG5_NP_MBRE | + BRGPHY_MRBE_MSG_PG5_NP_T2; + PHY_WRITE(sc, BRGPHY_MRBE_MSG_PG5_NP, val); + + /* Select the Clause 73 User B0 block of the AN MMD. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_CL73_USER_B0); + + /* Enable MRBE speed autoneg. */ + PHY_WRITE(sc, BRGPHY_CL73_USER_B0_MBRE_CTL1, + BRGPHY_CL73_USER_B0_MBRE_CTL1_NP_AFT_BP | + BRGPHY_CL73_USER_B0_MBRE_CTL1_STA_MGR | + BRGPHY_CL73_USER_B0_MBRE_CTL1_ANEG); + + /* Restore IEEE0 block (assumed in all brgphy(4) code). */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_COMBO_IEEE0); + + } else if (BCE_CHIP_NUM(bce_sc) == BCE_CHIP_NUM_5709) { if ((BCE_CHIP_REV(bce_sc) == BCE_CHIP_REV_Ax) || (BCE_CHIP_REV(bce_sc) == BCE_CHIP_REV_Bx)) brgphy_fixup_disable_early_dac(sc); Modified: stable/8/sys/dev/mii/brgphyreg.h ============================================================================== --- stable/8/sys/dev/mii/brgphyreg.h Thu Apr 15 19:19:38 2010 (r206677) +++ stable/8/sys/dev/mii/brgphyreg.h Thu Apr 15 19:19:59 2010 (r206678) @@ -359,6 +359,61 @@ /* End: PHY register values for the 5708S SerDes PHY */ /*******************************************************/ +/*******************************************************/ +/* Begin: PHY register values for the 5709S SerDes PHY */ +/*******************************************************/ + +/* 5709S SerDes "General Purpose Status" Registers */ +#define BRGPHY_BLOCK_ADDR_GP_STATUS 0x8120 +#define BRGPHY_GP_STATUS_TOP_ANEG_STATUS 0x1B +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_MASK 0x3F00 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_10 0x0000 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_100 0x0100 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_1G 0x0200 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_25G 0x0300 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_1GKX 0x0D00 +#define BRGPHY_GP_STATUS_TOP_ANEG_FDX 0x0008 +#define BRGPHY_GP_STATUS_TOP_ANEG_LINK_UP 0x0004 +#define BRGPHY_GP_STATUS_TOP_ANEG_CL73_COMP 0x0001 + +/* 5709S SerDes "SerDes Digital" Registers */ +#define BRGPHY_BLOCK_ADDR_SERDES_DIG 0x8300 +#define BRGPHY_SERDES_DIG_1000X_CTL1 0x0010 +#define BRGPHY_SD_DIG_1000X_CTL1_AUTODET 0x0010 +#define BRGPHY_SD_DIG_1000X_CTL1_FIBER 0x0001 + +/* 5709S SerDes "Over 1G" Registers */ +#define BRGPHY_BLOCK_ADDR_OVER_1G 0x8320 +#define BRGPHY_OVER_1G_UNFORMAT_PG1 0x19 + +/* 5709S SerDes "Multi-Rate Backplane Ethernet" Registers */ +#define BRGPHY_BLOCK_ADDR_MRBE 0x8350 +#define BRGPHY_MRBE_MSG_PG5_NP 0x10 +#define BRGPHY_MRBE_MSG_PG5_NP_MBRE 0x0001 +#define BRGPHY_MRBE_MSG_PG5_NP_T2 0x0001 + +/* 5709S SerDes "IEEE Clause 73 User B0" Registers */ +#define BRGPHY_BLOCK_ADDR_CL73_USER_B0 0x8370 +#define BRGPHY_CL73_USER_B0_MBRE_CTL1 0x12 +#define BRGPHY_CL73_USER_B0_MBRE_CTL1_NP_AFT_BP 0x2000 +#define BRGPHY_CL73_USER_B0_MBRE_CTL1_STA_MGR 0x4000 +#define BRGPHY_CL73_USER_B0_MBRE_CTL1_ANEG 0x8000 + +/* 5709S SerDes "IEEE Clause 73 User B0" Registers */ +#define BRGPHY_BLOCK_ADDR_ADDR_EXT 0xFFD0 + +/* 5709S SerDes "Combo IEEE 0" Registers */ +#define BRGPHY_BLOCK_ADDR_COMBO_IEEE0 0xFFE0 + +#define BRGPHY_ADDR_EXT 0x1E +#define BRGPHY_BLOCK_ADDR 0x1F + +#define BRGPHY_ADDR_EXT_AN_MMD 0x3800 + +/*******************************************************/ +/* End: PHY register values for the 5709S SerDes PHY */ +/*******************************************************/ + #define BRGPHY_INTRS \ ~(BRGPHY_IMR_LNK_CHG|BRGPHY_IMR_LSP_CHG|BRGPHY_IMR_DUP_CHG) Modified: stable/8/sys/dev/mii/miidevs ============================================================================== --- stable/8/sys/dev/mii/miidevs Thu Apr 15 19:19:38 2010 (r206677) +++ stable/8/sys/dev/mii/miidevs Thu Apr 15 19:19:59 2010 (r206678) @@ -157,6 +157,7 @@ model xxBROADCOM_ALT1 BCM5722 0x002d BCM model xxBROADCOM_ALT1 BCM5784 0x003a BCM5784 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5709C 0x003c BCM5709C 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5761 0x003d BCM5761 10/100/1000baseTX PHY +model xxBROADCOM_ALT1 BCM5709S 0x003f BCM5709S 1000/2500baseSX PHY model BROADCOM2 BCM5906 0x0004 BCM5906 10/100baseTX PHY /* Cicada Semiconductor PHYs (now owned by Vitesse?) */ From owner-svn-src-stable@FreeBSD.ORG Thu Apr 15 19:22:55 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FB031065687; Thu, 15 Apr 2010 19:22:55 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DB328FC19; Thu, 15 Apr 2010 19:22:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3FJMtpQ094513; Thu, 15 Apr 2010 19:22:55 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FJMtwU094509; Thu, 15 Apr 2010 19:22:55 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004151922.o3FJMtwU094509@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 15 Apr 2010 19:22:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206679 - stable/7/sys/dev/mii X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 19:22:55 -0000 Author: yongari Date: Thu Apr 15 19:22:55 2010 New Revision: 206679 URL: http://svn.freebsd.org/changeset/base/206679 Log: MFC r205299: - Added support for 5709S/5716S PHYs. Submitted by: pyunyh PR: kern/134658, kern/136417, kern/139761, kern/140970 Modified: stable/7/sys/dev/mii/brgphy.c stable/7/sys/dev/mii/brgphyreg.h stable/7/sys/dev/mii/miidevs Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/brgphy.c ============================================================================== --- stable/7/sys/dev/mii/brgphy.c Thu Apr 15 19:19:59 2010 (r206678) +++ stable/7/sys/dev/mii/brgphy.c Thu Apr 15 19:22:55 2010 (r206679) @@ -75,6 +75,7 @@ struct brgphy_softc { #define BRGPHY_5706S 0x0001 #define BRGPHY_5708S 0x0002 #define BRGPHY_NOANWAIT 0x0004 +#define BRGPHY_5709S 0x0008 int bce_phy_flags; /* PHY flags transferred from the MAC driver */ }; @@ -139,6 +140,7 @@ static const struct mii_phydesc brgphys[ MII_PHY_DESC(xxBROADCOM_ALT1, BCM5784), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709C), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5761), + MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709S), MII_PHY_DESC(BROADCOM2, BCM5906), MII_PHY_END }; @@ -216,30 +218,34 @@ brgphy_attach(device_t dev) break; case MII_OUI_xxBROADCOM: switch (bsc->mii_model) { - case MII_MODEL_xxBROADCOM_BCM5706: - case MII_MODEL_xxBROADCOM_BCM5714: - /* - * The 5464 PHY used in the 5706 supports both copper - * and fiber interfaces over GMII. Need to check the - * shadow registers to see which mode is actually - * in effect, and therefore whether we have 5706C or - * 5706S. - */ - PHY_WRITE(sc, BRGPHY_MII_SHADOW_1C, - BRGPHY_SHADOW_1C_MODE_CTRL); - if (PHY_READ(sc, BRGPHY_MII_SHADOW_1C) & - BRGPHY_SHADOW_1C_ENA_1000X) { - bsc->serdes_flags |= BRGPHY_5706S; - sc->mii_flags |= MIIF_HAVEFIBER; - } - break; + case MII_MODEL_xxBROADCOM_BCM5706: + case MII_MODEL_xxBROADCOM_BCM5714: + /* + * The 5464 PHY used in the 5706 supports both copper + * and fiber interfaces over GMII. Need to check the + * shadow registers to see which mode is actually + * in effect, and therefore whether we have 5706C or + * 5706S. + */ + PHY_WRITE(sc, BRGPHY_MII_SHADOW_1C, + BRGPHY_SHADOW_1C_MODE_CTRL); + if (PHY_READ(sc, BRGPHY_MII_SHADOW_1C) & + BRGPHY_SHADOW_1C_ENA_1000X) { + bsc->serdes_flags |= BRGPHY_5706S; + sc->mii_flags |= MIIF_HAVEFIBER; + } + break; } break; case MII_OUI_xxBROADCOM_ALT1: switch (bsc->mii_model) { - case MII_MODEL_xxBROADCOM_ALT1_BCM5708S: - bsc->serdes_flags |= BRGPHY_5708S; - sc->mii_flags |= MIIF_HAVEFIBER; - break; + case MII_MODEL_xxBROADCOM_ALT1_BCM5708S: + bsc->serdes_flags |= BRGPHY_5708S; + sc->mii_flags |= MIIF_HAVEFIBER; + break; + case MII_MODEL_xxBROADCOM_ALT1_BCM5709S: + bsc->serdes_flags |= BRGPHY_5709S; + sc->mii_flags |= MIIF_HAVEFIBER; + break; } break; default: device_printf(dev, "Unrecognized OUI for PHY!\n"); @@ -619,6 +625,7 @@ brgphy_status(struct mii_softc *sc) PHY_WRITE(sc, BRGPHY_5708S_BLOCK_ADDR, BRGPHY_5708S_DIG_PG0); xstat = PHY_READ(sc, BRGPHY_5708S_PG0_1000X_STAT1); + /* Check for MRBE auto-negotiated speed results. */ switch (xstat & BRGPHY_5708S_PG0_1000X_STAT1_SPEED_MASK) { case BRGPHY_5708S_PG0_1000X_STAT1_SPEED_10: mii->mii_media_active |= IFM_10_FL; break; @@ -630,11 +637,40 @@ brgphy_status(struct mii_softc *sc) mii->mii_media_active |= IFM_2500_SX; break; } + /* Check for MRBE auto-negotiated duplex results. */ if (xstat & BRGPHY_5708S_PG0_1000X_STAT1_FDX) mii->mii_media_active |= IFM_FDX; else mii->mii_media_active |= IFM_HDX; - } + + } else if (bsc->serdes_flags & BRGPHY_5709S) { + + /* Select GP Status Block of the AN MMD, get autoneg results. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_GP_STATUS); + xstat = PHY_READ(sc, BRGPHY_GP_STATUS_TOP_ANEG_STATUS); + + /* Restore IEEE0 block (assumed in all brgphy(4) code). */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_COMBO_IEEE0); + + /* Check for MRBE auto-negotiated speed results. */ + switch (xstat & BRGPHY_GP_STATUS_TOP_ANEG_SPEED_MASK) { + case BRGPHY_GP_STATUS_TOP_ANEG_SPEED_10: + mii->mii_media_active |= IFM_10_FL; break; + case BRGPHY_GP_STATUS_TOP_ANEG_SPEED_100: + mii->mii_media_active |= IFM_100_FX; break; + case BRGPHY_GP_STATUS_TOP_ANEG_SPEED_1G: + mii->mii_media_active |= IFM_1000_SX; break; + case BRGPHY_GP_STATUS_TOP_ANEG_SPEED_25G: + mii->mii_media_active |= IFM_2500_SX; break; + } + + /* Check for MRBE auto-negotiated duplex results. */ + if (xstat & BRGPHY_GP_STATUS_TOP_ANEG_FDX) + mii->mii_media_active |= IFM_FDX; + else + mii->mii_media_active |= IFM_HDX; + } + } #if 0 @@ -955,6 +991,7 @@ brgphy_reset(struct mii_softc *sc) struct bge_softc *bge_sc = NULL; struct bce_softc *bce_sc = NULL; struct ifnet *ifp; + int val; /* Perform a standard PHY reset. */ mii_phy_reset(sc); @@ -1077,7 +1114,49 @@ brgphy_reset(struct mii_softc *sc) PHY_WRITE(sc, BRGPHY_5708S_BLOCK_ADDR, BRGPHY_5708S_DIG_PG0); } - } else if (BCE_CHIP_NUM(bce_sc) == BCE_CHIP_NUM_5709) { + } else if (BCE_CHIP_NUM(bce_sc) == BCE_CHIP_NUM_5709 && + (bce_sc->bce_phy_flags & BCE_PHY_SERDES_FLAG)) { + + /* Select the SerDes Digital block of the AN MMD. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_SERDES_DIG); + val = PHY_READ(sc, BRGPHY_SERDES_DIG_1000X_CTL1); + val &= ~BRGPHY_SD_DIG_1000X_CTL1_AUTODET; + val |= BRGPHY_SD_DIG_1000X_CTL1_FIBER; + PHY_WRITE(sc, BRGPHY_SERDES_DIG_1000X_CTL1, val); + + /* Select the Over 1G block of the AN MMD. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_OVER_1G); + + /* Enable autoneg "Next Page" to advertise 2.5G support. */ + val = PHY_READ(sc, BRGPHY_OVER_1G_UNFORMAT_PG1); + if (bce_sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) + val |= BRGPHY_5708S_ANEG_NXT_PG_XMIT1_25G; + else + val &= ~BRGPHY_5708S_ANEG_NXT_PG_XMIT1_25G; + PHY_WRITE(sc, BRGPHY_OVER_1G_UNFORMAT_PG1, val); + + /* Select the Multi-Rate Backplane Ethernet block of the AN MMD. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_MRBE); + + /* Enable MRBE speed autoneg. */ + val = PHY_READ(sc, BRGPHY_MRBE_MSG_PG5_NP); + val |= BRGPHY_MRBE_MSG_PG5_NP_MBRE | + BRGPHY_MRBE_MSG_PG5_NP_T2; + PHY_WRITE(sc, BRGPHY_MRBE_MSG_PG5_NP, val); + + /* Select the Clause 73 User B0 block of the AN MMD. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_CL73_USER_B0); + + /* Enable MRBE speed autoneg. */ + PHY_WRITE(sc, BRGPHY_CL73_USER_B0_MBRE_CTL1, + BRGPHY_CL73_USER_B0_MBRE_CTL1_NP_AFT_BP | + BRGPHY_CL73_USER_B0_MBRE_CTL1_STA_MGR | + BRGPHY_CL73_USER_B0_MBRE_CTL1_ANEG); + + /* Restore IEEE0 block (assumed in all brgphy(4) code). */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_COMBO_IEEE0); + + } else if (BCE_CHIP_NUM(bce_sc) == BCE_CHIP_NUM_5709) { if ((BCE_CHIP_REV(bce_sc) == BCE_CHIP_REV_Ax) || (BCE_CHIP_REV(bce_sc) == BCE_CHIP_REV_Bx)) brgphy_fixup_disable_early_dac(sc); Modified: stable/7/sys/dev/mii/brgphyreg.h ============================================================================== --- stable/7/sys/dev/mii/brgphyreg.h Thu Apr 15 19:19:59 2010 (r206678) +++ stable/7/sys/dev/mii/brgphyreg.h Thu Apr 15 19:22:55 2010 (r206679) @@ -359,6 +359,61 @@ /* End: PHY register values for the 5708S SerDes PHY */ /*******************************************************/ +/*******************************************************/ +/* Begin: PHY register values for the 5709S SerDes PHY */ +/*******************************************************/ + +/* 5709S SerDes "General Purpose Status" Registers */ +#define BRGPHY_BLOCK_ADDR_GP_STATUS 0x8120 +#define BRGPHY_GP_STATUS_TOP_ANEG_STATUS 0x1B +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_MASK 0x3F00 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_10 0x0000 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_100 0x0100 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_1G 0x0200 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_25G 0x0300 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_1GKX 0x0D00 +#define BRGPHY_GP_STATUS_TOP_ANEG_FDX 0x0008 +#define BRGPHY_GP_STATUS_TOP_ANEG_LINK_UP 0x0004 +#define BRGPHY_GP_STATUS_TOP_ANEG_CL73_COMP 0x0001 + +/* 5709S SerDes "SerDes Digital" Registers */ +#define BRGPHY_BLOCK_ADDR_SERDES_DIG 0x8300 +#define BRGPHY_SERDES_DIG_1000X_CTL1 0x0010 +#define BRGPHY_SD_DIG_1000X_CTL1_AUTODET 0x0010 +#define BRGPHY_SD_DIG_1000X_CTL1_FIBER 0x0001 + +/* 5709S SerDes "Over 1G" Registers */ +#define BRGPHY_BLOCK_ADDR_OVER_1G 0x8320 +#define BRGPHY_OVER_1G_UNFORMAT_PG1 0x19 + +/* 5709S SerDes "Multi-Rate Backplane Ethernet" Registers */ +#define BRGPHY_BLOCK_ADDR_MRBE 0x8350 +#define BRGPHY_MRBE_MSG_PG5_NP 0x10 +#define BRGPHY_MRBE_MSG_PG5_NP_MBRE 0x0001 +#define BRGPHY_MRBE_MSG_PG5_NP_T2 0x0001 + +/* 5709S SerDes "IEEE Clause 73 User B0" Registers */ +#define BRGPHY_BLOCK_ADDR_CL73_USER_B0 0x8370 +#define BRGPHY_CL73_USER_B0_MBRE_CTL1 0x12 +#define BRGPHY_CL73_USER_B0_MBRE_CTL1_NP_AFT_BP 0x2000 +#define BRGPHY_CL73_USER_B0_MBRE_CTL1_STA_MGR 0x4000 +#define BRGPHY_CL73_USER_B0_MBRE_CTL1_ANEG 0x8000 + +/* 5709S SerDes "IEEE Clause 73 User B0" Registers */ +#define BRGPHY_BLOCK_ADDR_ADDR_EXT 0xFFD0 + +/* 5709S SerDes "Combo IEEE 0" Registers */ +#define BRGPHY_BLOCK_ADDR_COMBO_IEEE0 0xFFE0 + +#define BRGPHY_ADDR_EXT 0x1E +#define BRGPHY_BLOCK_ADDR 0x1F + +#define BRGPHY_ADDR_EXT_AN_MMD 0x3800 + +/*******************************************************/ +/* End: PHY register values for the 5709S SerDes PHY */ +/*******************************************************/ + #define BRGPHY_INTRS \ ~(BRGPHY_IMR_LNK_CHG|BRGPHY_IMR_LSP_CHG|BRGPHY_IMR_DUP_CHG) Modified: stable/7/sys/dev/mii/miidevs ============================================================================== --- stable/7/sys/dev/mii/miidevs Thu Apr 15 19:19:59 2010 (r206678) +++ stable/7/sys/dev/mii/miidevs Thu Apr 15 19:22:55 2010 (r206679) @@ -152,6 +152,7 @@ model xxBROADCOM_ALT1 BCM5722 0x002d BCM model xxBROADCOM_ALT1 BCM5784 0x003a BCM5784 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5709C 0x003c BCM5709C 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5761 0x003d BCM5761 10/100/1000baseTX PHY +model xxBROADCOM_ALT1 BCM5709S 0x003f BCM5709S 1000/2500baseSX PHY model BROADCOM2 BCM5906 0x0004 BCM5906 10/100baseTX PHY /* Cicada Semiconductor PHYs (now owned by Vitesse?) */ From owner-svn-src-stable@FreeBSD.ORG Thu Apr 15 19:26:28 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECEC11065690; Thu, 15 Apr 2010 19:26:28 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DAAA48FC24; Thu, 15 Apr 2010 19:26:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3FJQSFG095343; Thu, 15 Apr 2010 19:26:28 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FJQSI9095339; Thu, 15 Apr 2010 19:26:28 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004151926.o3FJQSI9095339@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 15 Apr 2010 19:26:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206680 - stable/8/sys/dev/bce X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 19:26:29 -0000 Author: yongari Date: Thu Apr 15 19:26:28 2010 New Revision: 206680 URL: http://svn.freebsd.org/changeset/base/206680 Log: MFC r205300: - Added support for 5709S/5716S PHYs. - Update copyright to 2010. - Add new debug code for RV2P block. - Improve output formatting for various debug functions. PR: kern/134658, kern/136417, kern/139761, kern/140970 Modified: stable/8/sys/dev/bce/if_bce.c stable/8/sys/dev/bce/if_bcefw.h stable/8/sys/dev/bce/if_bcereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/bce/if_bce.c ============================================================================== --- stable/8/sys/dev/bce/if_bce.c Thu Apr 15 19:22:55 2010 (r206679) +++ stable/8/sys/dev/bce/if_bce.c Thu Apr 15 19:26:28 2010 (r206680) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2009 Broadcom Corporation + * Copyright (c) 2006-2010 Broadcom Corporation * David Christensen . All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$"); * BCM5708C B1, B2 * BCM5708S B1, B2 * BCM5709C A1, C0 + * BCM5709S A1, C0 * BCM5716C C0 + * BCM5716S C0 * * The following controllers are not supported by this driver: * BCM5706C A0, A1 (pre-production) @@ -46,7 +48,7 @@ __FBSDID("$FreeBSD$"); * BCM5708C A0, B0 (pre-production) * BCM5708S A0, B0 (pre-production) * BCM5709C A0 B0, B1, B2 (pre-production) - * BCM5709S A0, A1, B0, B1, B2, C0 (pre-production) + * BCM5709S A0, B0, B1, B2 (pre-production) */ #include "opt_bce.h" @@ -320,6 +322,7 @@ static void bce_dump_rxp_state (struct static void bce_dump_tpat_state (struct bce_softc *, int); static void bce_dump_cp_state (struct bce_softc *, int); static void bce_dump_com_state (struct bce_softc *, int); +static void bce_dump_rv2p_state (struct bce_softc *); static void bce_breakpoint (struct bce_softc *); #endif @@ -360,6 +363,7 @@ static int bce_nvram_write (struct bc /* */ /****************************************************************************/ static void bce_get_media (struct bce_softc *); +static void bce_init_media (struct bce_softc *); static void bce_dma_map_addr (void *, bus_dma_segment_t *, int, int); static int bce_dma_alloc (device_t); static void bce_dma_free (struct bce_softc *); @@ -1096,7 +1100,10 @@ bce_attach(device_t dev) else ifp->if_baudrate = IF_Mbps(1000); - /* Check for an MII child bus by probing the PHY. */ + /* Handle any special PHY initialization for SerDes PHYs. */ + bce_init_media(sc); + + /* MII child bus by probing the PHY. */ if (mii_phy_probe(dev, &sc->bce_miibus, bce_ifmedia_upd, bce_ifmedia_sts)) { BCE_PRINTF("%s(%d): No PHY found on child MII bus!\n", @@ -1504,7 +1511,17 @@ bce_miibus_read_reg(device_t dev, int ph return(0); } - if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) { + /* + * The 5709S PHY is an IEEE Clause 45 PHY + * with special mappings to work with IEEE + * Clause 22 register accesses. + */ + if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) { + if (reg >= MII_BMCR && reg <= MII_ANLPRNP) + reg += 0x10; + } + + if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) { val = REG_RD(sc, BCE_EMAC_MDIO_MODE); val &= ~BCE_EMAC_MDIO_MODE_AUTO_POLL; @@ -1584,6 +1601,16 @@ bce_miibus_write_reg(device_t dev, int p DB_PRINT_PHY_REG(reg, val); + /* + * The 5709S PHY is an IEEE Clause 45 PHY + * with special mappings to work with IEEE + * Clause 22 register accesses. + */ + if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) { + if (reg >= MII_BMCR && reg <= MII_ANLPRNP) + reg += 0x10; + } + if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) { val1 = REG_RD(sc, BCE_EMAC_MDIO_MODE); val1 &= ~BCE_EMAC_MDIO_MODE_AUTO_POLL; @@ -2647,9 +2674,11 @@ bce_get_media(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_LOAD, "BCM5709 s/w configured for SerDes.\n"); sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; + break; default: DBPRINT(sc, BCE_INFO_LOAD, "BCM5709 s/w configured for Copper.\n"); + break; } } else { switch (strap) { @@ -2659,9 +2688,11 @@ bce_get_media(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_LOAD, "BCM5709 s/w configured for SerDes.\n"); sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; + break; default: DBPRINT(sc, BCE_INFO_LOAD, "BCM5709 s/w configured for Copper.\n"); + break; } } @@ -2669,15 +2700,22 @@ bce_get_media(struct bce_softc *sc) sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; if (sc->bce_phy_flags & BCE_PHY_SERDES_FLAG) { + sc->bce_flags |= BCE_NO_WOL_FLAG; - if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { + + /* 5708S, 5709S, and 5716S use a separate PHY for SerDes. */ + if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) sc->bce_phy_addr = 2; + + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { + sc->bce_phy_flags |= BCE_PHY_IEEE_CLAUSE_45_FLAG; + val = bce_shmem_rd(sc, BCE_SHARED_HW_CFG_CONFIG); if (val & BCE_SHARED_HW_CFG_PHY_2_5G) { sc->bce_phy_flags |= BCE_PHY_2_5G_CAPABLE_FLAG; DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb capable adapter\n"); } - } + } } else if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5706) || (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5708)) sc->bce_phy_flags |= BCE_PHY_CRC_FIX_FLAG; @@ -2691,6 +2729,37 @@ bce_get_media_exit: /****************************************************************************/ +/* Performs PHY initialization required before MII drivers access the */ +/* device. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_init_media(struct bce_softc *sc) +{ + if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) { + /* + * Configure 5709S/5716S PHYs to use traditional IEEE + * Clause 22 method. Otherwise we have no way to attach + * the PHY in mii(4) layer. PHY specific configuration + * is done in mii layer. + */ + + /* Select auto-negotiation MMD of the PHY. */ + bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, + BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_ADDR_EXT); + bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, + BRGPHY_ADDR_EXT, BRGPHY_ADDR_EXT_AN_MMD); + + /* Select IEEE0 block of AN MMD (assumed in all brgphy(4) code). */ + bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, + BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_COMBO_IEEE0); + } +} + + +/****************************************************************************/ /* Free any DMA memory owned by the driver. */ /* */ /* Scans through each data structre that requires DMA memory and frees */ @@ -6679,7 +6748,7 @@ bce_tso_setup(struct bce_softc *sc, stru DBPRINT(sc, BCE_EXTREME_SEND, "%s(): hdr_len = %d, e_hlen = %d, " "ip_hlen = %d, tcp_hlen = %d, ip_len = %d\n", - __FUNCTION__, hdr_len, sizeof(struct ether_header), ip_hlen, + __FUNCTION__, hdr_len, (int) sizeof(struct ether_header), ip_hlen, tcp_hlen, ip_len); /* Set the LSO flag in the TX BD */ @@ -7943,7 +8012,7 @@ bce_sysctl_dump_tx_chain(SYSCTL_HANDLER_ if (result == 1) { sc = (struct bce_softc *)arg1; - bce_dump_tx_chain(sc, 0, USABLE_TX_BD); + bce_dump_tx_chain(sc, 0, TOTAL_TX_BD); } return error; @@ -8626,7 +8695,7 @@ bce_add_sysctls(struct bce_softc *sc) /* Returns: */ /* Nothing. */ /****************************************************************************/ -static void +static __attribute__ ((noinline)) void bce_freeze_controller(struct bce_softc *sc) { u32 val; @@ -8643,7 +8712,7 @@ bce_freeze_controller(struct bce_softc * /* Returns: */ /* Nothing. */ /****************************************************************************/ -static void +static __attribute__ ((noinline)) void bce_unfreeze_controller(struct bce_softc *sc) { u32 val; @@ -8661,7 +8730,7 @@ bce_unfreeze_controller(struct bce_softc /* Returns: */ /* Nothing. */ /****************************************************************************/ -static void +static __attribute__ ((noinline)) void bce_dump_enet(struct bce_softc *sc, struct mbuf *m) { struct ether_vlan_header *eh; @@ -8915,7 +8984,9 @@ bce_dump_pg_mbuf_chain(struct bce_softc static __attribute__ ((noinline)) void bce_dump_txbd(struct bce_softc *sc, int idx, struct tx_bd *txbd) { - if (idx > MAX_TX_BD) + int i = 0; + + if (idx > MAX_TX_BD) /* Index out of range. */ BCE_PRINTF("tx_bd[0x%04X]: Invalid tx_bd index!\n", idx); else if ((idx & USABLE_TX_BD_PER_PAGE) == USABLE_TX_BD_PER_PAGE) @@ -8923,52 +8994,65 @@ bce_dump_txbd(struct bce_softc *sc, int BCE_PRINTF("tx_bd[0x%04X]: haddr = 0x%08X:%08X, chain page pointer\n", idx, txbd->tx_bd_haddr_hi, txbd->tx_bd_haddr_lo); else { - /* Normal tx_bd entry. */ - BCE_PRINTF("tx_bd[0x%04X]: haddr = 0x%08X:%08X, nbytes = 0x%08X, " - "vlan tag= 0x%04X, flags = 0x%04X (", idx, - txbd->tx_bd_haddr_hi, txbd->tx_bd_haddr_lo, - txbd->tx_bd_mss_nbytes, txbd->tx_bd_vlan_tag, - txbd->tx_bd_flags); - - if (txbd->tx_bd_flags & TX_BD_FLAGS_CONN_FAULT) - printf(" CONN_FAULT"); - - if (txbd->tx_bd_flags & TX_BD_FLAGS_TCP_UDP_CKSUM) - printf(" TCP_UDP_CKSUM"); + /* Normal tx_bd entry. */ + BCE_PRINTF("tx_bd[0x%04X]: haddr = 0x%08X:%08X, mss_nbytes = 0x%08X, " + "vlan tag = 0x%04X, flags = 0x%04X (", idx, + txbd->tx_bd_haddr_hi, txbd->tx_bd_haddr_lo, + txbd->tx_bd_mss_nbytes, txbd->tx_bd_vlan_tag, + txbd->tx_bd_flags); - if (txbd->tx_bd_flags & TX_BD_FLAGS_IP_CKSUM) - printf(" IP_CKSUM"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_CONN_FAULT) { + if (i>0) printf("|"); printf("CONN_FAULT"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_VLAN_TAG) - printf(" VLAN"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_TCP_UDP_CKSUM) { + if (i>0) printf("|"); printf("TCP_UDP_CKSUM"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_COAL_NOW) - printf(" COAL_NOW"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_IP_CKSUM) { + if (i>0) printf("|"); printf("IP_CKSUM"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_DONT_GEN_CRC) - printf(" DONT_GEN_CRC"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_VLAN_TAG) { + if (i>0) printf("|"); printf("VLAN"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_START) - printf(" START"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_COAL_NOW) { + if (i>0) printf("|"); printf("COAL_NOW"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_END) - printf(" END"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_DONT_GEN_CRC) { + if (i>0) printf("|"); printf("DONT_GEN_CRC"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_LSO) - printf(" LSO"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_START) { + if (i>0) printf("|"); printf("START"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_OPTION_WORD) - printf(" OPTION_WORD"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_END) { + if (i>0) printf("|"); printf("END"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_FLAGS) - printf(" FLAGS"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_LSO) { + if (i>0) printf("|"); printf("LSO"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_SNAP) - printf(" SNAP"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_OPTION_WORD) { + if (i>0) printf("|"); + printf("SW_OPTION=%d", ((txbd->tx_bd_flags & + TX_BD_FLAGS_SW_OPTION_WORD) >> 8)); i++; + } - printf(" )\n"); - } + if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_FLAGS) { + if (i>0) printf("|"); printf("SW_FLAGS"); i++; + } + if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_SNAP) { + if (i>0) printf("|"); printf("SNAP)"); + } else { + printf(")\n"); + } + } } @@ -9415,10 +9499,8 @@ bce_dump_tx_chain(struct bce_softc *sc, BCE_PRINTF("page size = 0x%08X, tx chain pages = 0x%08X\n", (u32) BCM_PAGE_SIZE, (u32) TX_PAGES); - BCE_PRINTF("tx_bd per page = 0x%08X, usable tx_bd per page = 0x%08X\n", (u32) TOTAL_TX_BD_PER_PAGE, (u32) USABLE_TX_BD_PER_PAGE); - BCE_PRINTF("total tx_bd = 0x%08X\n", (u32) TOTAL_TX_BD); BCE_PRINTF( @@ -9426,11 +9508,11 @@ bce_dump_tx_chain(struct bce_softc *sc, " tx_bd data " "----------------------------\n"); - /* Now print out the tx_bd's themselves. */ + /* Now print out a decoded list of TX buffer descriptors. */ for (int i = 0; i < count; i++) { txbd = &sc->tx_bd_chain[TX_PAGE(tx_prod)][TX_IDX(tx_prod)]; bce_dump_txbd(sc, tx_prod, txbd); - tx_prod = NEXT_TX_BD(tx_prod); + tx_prod++; } BCE_PRINTF( @@ -9530,6 +9612,17 @@ bce_dump_pg_chain(struct bce_softc *sc, } #endif +#define BCE_PRINT_RX_CONS(arg) \ +if (sblk->status_rx_quick_consumer_index##arg) \ + BCE_PRINTF("0x%04X(0x%04X) - rx_quick_consumer_index##arg\n", \ + sblk->status_rx_quick_consumer_index##arg, \ + (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index##arg)); + +#define BCE_PRINT_TX_CONS(arg) \ +if (sblk->status_tx_quick_consumer_index##arg) \ + BCE_PRINTF("0x%04X(0x%04X) - tx_quick_consumer_index##arg\n", \ + sblk->status_tx_quick_consumer_index##arg, \ + (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index##arg)); /****************************************************************************/ /* Prints out the status block from host memory. */ @@ -9549,90 +9642,28 @@ bce_dump_status_block(struct bce_softc * " Status Block " "----------------------------\n"); + /* Theses indices are used for normal L2 drivers. */ BCE_PRINTF(" 0x%08X - attn_bits\n", sblk->status_attn_bits); BCE_PRINTF(" 0x%08X - attn_bits_ack\n", sblk->status_attn_bits_ack); - BCE_PRINTF("0x%04X(0x%04X) - rx_cons0\n", - sblk->status_rx_quick_consumer_index0, - (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index0)); - - BCE_PRINTF("0x%04X(0x%04X) - tx_cons0\n", - sblk->status_tx_quick_consumer_index0, - (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index0)); + BCE_PRINT_RX_CONS(0); + BCE_PRINT_TX_CONS(0) BCE_PRINTF(" 0x%04X - status_idx\n", sblk->status_idx); /* Theses indices are not used for normal L2 drivers. */ - if (sblk->status_rx_quick_consumer_index1) - BCE_PRINTF("0x%04X(0x%04X) - rx_cons1\n", - sblk->status_rx_quick_consumer_index1, - (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index1)); - - if (sblk->status_tx_quick_consumer_index1) - BCE_PRINTF("0x%04X(0x%04X) - tx_cons1\n", - sblk->status_tx_quick_consumer_index1, - (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index1)); - - if (sblk->status_rx_quick_consumer_index2) - BCE_PRINTF("0x%04X(0x%04X)- rx_cons2\n", - sblk->status_rx_quick_consumer_index2, - (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index2)); - - if (sblk->status_tx_quick_consumer_index2) - BCE_PRINTF("0x%04X(0x%04X) - tx_cons2\n", - sblk->status_tx_quick_consumer_index2, - (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index2)); - - if (sblk->status_rx_quick_consumer_index3) - BCE_PRINTF("0x%04X(0x%04X) - rx_cons3\n", - sblk->status_rx_quick_consumer_index3, - (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index3)); - - if (sblk->status_tx_quick_consumer_index3) - BCE_PRINTF("0x%04X(0x%04X) - tx_cons3\n", - sblk->status_tx_quick_consumer_index3, - (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index3)); - - if (sblk->status_rx_quick_consumer_index4 || - sblk->status_rx_quick_consumer_index5) - BCE_PRINTF("rx_cons4 = 0x%08X, rx_cons5 = 0x%08X\n", - sblk->status_rx_quick_consumer_index4, - sblk->status_rx_quick_consumer_index5); - - if (sblk->status_rx_quick_consumer_index6 || - sblk->status_rx_quick_consumer_index7) - BCE_PRINTF("rx_cons6 = 0x%08X, rx_cons7 = 0x%08X\n", - sblk->status_rx_quick_consumer_index6, - sblk->status_rx_quick_consumer_index7); - - if (sblk->status_rx_quick_consumer_index8 || - sblk->status_rx_quick_consumer_index9) - BCE_PRINTF("rx_cons8 = 0x%08X, rx_cons9 = 0x%08X\n", - sblk->status_rx_quick_consumer_index8, - sblk->status_rx_quick_consumer_index9); - - if (sblk->status_rx_quick_consumer_index10 || - sblk->status_rx_quick_consumer_index11) - BCE_PRINTF("rx_cons10 = 0x%08X, rx_cons11 = 0x%08X\n", - sblk->status_rx_quick_consumer_index10, - sblk->status_rx_quick_consumer_index11); - - if (sblk->status_rx_quick_consumer_index12 || - sblk->status_rx_quick_consumer_index13) - BCE_PRINTF("rx_cons12 = 0x%08X, rx_cons13 = 0x%08X\n", - sblk->status_rx_quick_consumer_index12, - sblk->status_rx_quick_consumer_index13); - - if (sblk->status_rx_quick_consumer_index14 || - sblk->status_rx_quick_consumer_index15) - BCE_PRINTF("rx_cons14 = 0x%08X, rx_cons15 = 0x%08X\n", - sblk->status_rx_quick_consumer_index14, - sblk->status_rx_quick_consumer_index15); + BCE_PRINT_RX_CONS(1); BCE_PRINT_RX_CONS(2); BCE_PRINT_RX_CONS(3); + BCE_PRINT_RX_CONS(4); BCE_PRINT_RX_CONS(5); BCE_PRINT_RX_CONS(6); + BCE_PRINT_RX_CONS(7); BCE_PRINT_RX_CONS(8); BCE_PRINT_RX_CONS(9); + BCE_PRINT_RX_CONS(10); BCE_PRINT_RX_CONS(11); BCE_PRINT_RX_CONS(12); + BCE_PRINT_RX_CONS(13); BCE_PRINT_RX_CONS(14); BCE_PRINT_RX_CONS(15); - if (sblk->status_completion_producer_index || + BCE_PRINT_TX_CONS(1); BCE_PRINT_TX_CONS(2); BCE_PRINT_TX_CONS(3); + + if (sblk->status_completion_producer_index || sblk->status_cmd_consumer_index) BCE_PRINTF("com_prod = 0x%08X, cmd_cons = 0x%08X\n", sblk->status_completion_producer_index, @@ -9645,6 +9676,14 @@ bce_dump_status_block(struct bce_softc * } +#define BCE_PRINT_64BIT_STAT(arg) \ +if (sblk->arg##_lo || sblk->arg##_hi) \ + BCE_PRINTF("0x%08X:%08X : arg\n", sblk->arg##_hi, sblk->arg##_lo); + +#define BCE_PRINT_32BIT_STAT(arg) \ +if (sblk->arg) \ + BCE_PRINTF(" 0x%08X : arg\n", sblk->arg); + /****************************************************************************/ /* Prints out the statistics block from host memory. */ /* */ @@ -9663,252 +9702,60 @@ bce_dump_stats_block(struct bce_softc *s " Stats Block (All Stats Not Shown Are 0) " "---------------\n"); - if (sblk->stat_IfHCInOctets_hi - || sblk->stat_IfHCInOctets_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInOctets\n", - sblk->stat_IfHCInOctets_hi, - sblk->stat_IfHCInOctets_lo); - - if (sblk->stat_IfHCInBadOctets_hi - || sblk->stat_IfHCInBadOctets_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInBadOctets\n", - sblk->stat_IfHCInBadOctets_hi, - sblk->stat_IfHCInBadOctets_lo); - - if (sblk->stat_IfHCOutOctets_hi - || sblk->stat_IfHCOutOctets_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutOctets\n", - sblk->stat_IfHCOutOctets_hi, - sblk->stat_IfHCOutOctets_lo); - - if (sblk->stat_IfHCOutBadOctets_hi - || sblk->stat_IfHCOutBadOctets_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutBadOctets\n", - sblk->stat_IfHCOutBadOctets_hi, - sblk->stat_IfHCOutBadOctets_lo); - - if (sblk->stat_IfHCInUcastPkts_hi - || sblk->stat_IfHCInUcastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInUcastPkts\n", - sblk->stat_IfHCInUcastPkts_hi, - sblk->stat_IfHCInUcastPkts_lo); - - if (sblk->stat_IfHCInBroadcastPkts_hi - || sblk->stat_IfHCInBroadcastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInBroadcastPkts\n", - sblk->stat_IfHCInBroadcastPkts_hi, - sblk->stat_IfHCInBroadcastPkts_lo); - - if (sblk->stat_IfHCInMulticastPkts_hi - || sblk->stat_IfHCInMulticastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInMulticastPkts\n", - sblk->stat_IfHCInMulticastPkts_hi, - sblk->stat_IfHCInMulticastPkts_lo); - - if (sblk->stat_IfHCOutUcastPkts_hi - || sblk->stat_IfHCOutUcastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutUcastPkts\n", - sblk->stat_IfHCOutUcastPkts_hi, - sblk->stat_IfHCOutUcastPkts_lo); - - if (sblk->stat_IfHCOutBroadcastPkts_hi - || sblk->stat_IfHCOutBroadcastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutBroadcastPkts\n", - sblk->stat_IfHCOutBroadcastPkts_hi, - sblk->stat_IfHCOutBroadcastPkts_lo); - - if (sblk->stat_IfHCOutMulticastPkts_hi - || sblk->stat_IfHCOutMulticastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutMulticastPkts\n", - sblk->stat_IfHCOutMulticastPkts_hi, - sblk->stat_IfHCOutMulticastPkts_lo); - - if (sblk->stat_emac_tx_stat_dot3statsinternalmactransmiterrors) - BCE_PRINTF(" 0x%08X : " - "emac_tx_stat_dot3statsinternalmactransmiterrors\n", - sblk->stat_emac_tx_stat_dot3statsinternalmactransmiterrors); - - if (sblk->stat_Dot3StatsCarrierSenseErrors) - BCE_PRINTF(" 0x%08X : Dot3StatsCarrierSenseErrors\n", - sblk->stat_Dot3StatsCarrierSenseErrors); - - if (sblk->stat_Dot3StatsFCSErrors) - BCE_PRINTF(" 0x%08X : Dot3StatsFCSErrors\n", - sblk->stat_Dot3StatsFCSErrors); - - if (sblk->stat_Dot3StatsAlignmentErrors) - BCE_PRINTF(" 0x%08X : Dot3StatsAlignmentErrors\n", - sblk->stat_Dot3StatsAlignmentErrors); - - if (sblk->stat_Dot3StatsSingleCollisionFrames) - BCE_PRINTF(" 0x%08X : Dot3StatsSingleCollisionFrames\n", - sblk->stat_Dot3StatsSingleCollisionFrames); - - if (sblk->stat_Dot3StatsMultipleCollisionFrames) - BCE_PRINTF(" 0x%08X : Dot3StatsMultipleCollisionFrames\n", - sblk->stat_Dot3StatsMultipleCollisionFrames); - - if (sblk->stat_Dot3StatsDeferredTransmissions) - BCE_PRINTF(" 0x%08X : Dot3StatsDeferredTransmissions\n", - sblk->stat_Dot3StatsDeferredTransmissions); - - if (sblk->stat_Dot3StatsExcessiveCollisions) - BCE_PRINTF(" 0x%08X : Dot3StatsExcessiveCollisions\n", - sblk->stat_Dot3StatsExcessiveCollisions); - - if (sblk->stat_Dot3StatsLateCollisions) - BCE_PRINTF(" 0x%08X : Dot3StatsLateCollisions\n", - sblk->stat_Dot3StatsLateCollisions); - - if (sblk->stat_EtherStatsCollisions) - BCE_PRINTF(" 0x%08X : EtherStatsCollisions\n", - sblk->stat_EtherStatsCollisions); - - if (sblk->stat_EtherStatsFragments) - BCE_PRINTF(" 0x%08X : EtherStatsFragments\n", - sblk->stat_EtherStatsFragments); - - if (sblk->stat_EtherStatsJabbers) - BCE_PRINTF(" 0x%08X : EtherStatsJabbers\n", - sblk->stat_EtherStatsJabbers); - - if (sblk->stat_EtherStatsUndersizePkts) - BCE_PRINTF(" 0x%08X : EtherStatsUndersizePkts\n", - sblk->stat_EtherStatsUndersizePkts); - - if (sblk->stat_EtherStatsOversizePkts) - BCE_PRINTF(" 0x%08X : EtherStatsOverrsizePkts\n", - sblk->stat_EtherStatsOversizePkts); - - if (sblk->stat_EtherStatsPktsRx64Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx64Octets\n", - sblk->stat_EtherStatsPktsRx64Octets); - - if (sblk->stat_EtherStatsPktsRx65Octetsto127Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx65Octetsto127Octets\n", - sblk->stat_EtherStatsPktsRx65Octetsto127Octets); - - if (sblk->stat_EtherStatsPktsRx128Octetsto255Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx128Octetsto255Octets\n", - sblk->stat_EtherStatsPktsRx128Octetsto255Octets); - - if (sblk->stat_EtherStatsPktsRx256Octetsto511Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx256Octetsto511Octets\n", - sblk->stat_EtherStatsPktsRx256Octetsto511Octets); - - if (sblk->stat_EtherStatsPktsRx512Octetsto1023Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx512Octetsto1023Octets\n", - sblk->stat_EtherStatsPktsRx512Octetsto1023Octets); - - if (sblk->stat_EtherStatsPktsRx1024Octetsto1522Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx1024Octetsto1522Octets\n", - sblk->stat_EtherStatsPktsRx1024Octetsto1522Octets); - - if (sblk->stat_EtherStatsPktsRx1523Octetsto9022Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx1523Octetsto9022Octets\n", - sblk->stat_EtherStatsPktsRx1523Octetsto9022Octets); - - if (sblk->stat_EtherStatsPktsTx64Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx64Octets\n", - sblk->stat_EtherStatsPktsTx64Octets); - - if (sblk->stat_EtherStatsPktsTx65Octetsto127Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx65Octetsto127Octets\n", - sblk->stat_EtherStatsPktsTx65Octetsto127Octets); - - if (sblk->stat_EtherStatsPktsTx128Octetsto255Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx128Octetsto255Octets\n", - sblk->stat_EtherStatsPktsTx128Octetsto255Octets); - - if (sblk->stat_EtherStatsPktsTx256Octetsto511Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx256Octetsto511Octets\n", - sblk->stat_EtherStatsPktsTx256Octetsto511Octets); - - if (sblk->stat_EtherStatsPktsTx512Octetsto1023Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx512Octetsto1023Octets\n", - sblk->stat_EtherStatsPktsTx512Octetsto1023Octets); - - if (sblk->stat_EtherStatsPktsTx1024Octetsto1522Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx1024Octetsto1522Octets\n", - sblk->stat_EtherStatsPktsTx1024Octetsto1522Octets); - - if (sblk->stat_EtherStatsPktsTx1523Octetsto9022Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx1523Octetsto9022Octets\n", - sblk->stat_EtherStatsPktsTx1523Octetsto9022Octets); - - if (sblk->stat_XonPauseFramesReceived) - BCE_PRINTF(" 0x%08X : XonPauseFramesReceived\n", - sblk->stat_XonPauseFramesReceived); - - if (sblk->stat_XoffPauseFramesReceived) - BCE_PRINTF(" 0x%08X : XoffPauseFramesReceived\n", - sblk->stat_XoffPauseFramesReceived); - - if (sblk->stat_OutXonSent) - BCE_PRINTF(" 0x%08X : OutXonSent\n", - sblk->stat_OutXonSent); - - if (sblk->stat_OutXoffSent) - BCE_PRINTF(" 0x%08X : OutXoffSent\n", - sblk->stat_OutXoffSent); - - if (sblk->stat_FlowControlDone) - BCE_PRINTF(" 0x%08X : FlowControlDone\n", - sblk->stat_FlowControlDone); - - if (sblk->stat_MacControlFramesReceived) - BCE_PRINTF(" 0x%08X : MacControlFramesReceived\n", - sblk->stat_MacControlFramesReceived); - - if (sblk->stat_XoffStateEntered) - BCE_PRINTF(" 0x%08X : XoffStateEntered\n", - sblk->stat_XoffStateEntered); - - if (sblk->stat_IfInFramesL2FilterDiscards) - BCE_PRINTF(" 0x%08X : IfInFramesL2FilterDiscards\n", - sblk->stat_IfInFramesL2FilterDiscards); - - if (sblk->stat_IfInRuleCheckerDiscards) - BCE_PRINTF(" 0x%08X : IfInRuleCheckerDiscards\n", - sblk->stat_IfInRuleCheckerDiscards); - - if (sblk->stat_IfInFTQDiscards) - BCE_PRINTF(" 0x%08X : IfInFTQDiscards\n", - sblk->stat_IfInFTQDiscards); - - if (sblk->stat_IfInMBUFDiscards) - BCE_PRINTF(" 0x%08X : IfInMBUFDiscards\n", - sblk->stat_IfInMBUFDiscards); - - if (sblk->stat_IfInRuleCheckerP4Hit) - BCE_PRINTF(" 0x%08X : IfInRuleCheckerP4Hit\n", - sblk->stat_IfInRuleCheckerP4Hit); - - if (sblk->stat_CatchupInRuleCheckerDiscards) - BCE_PRINTF(" 0x%08X : CatchupInRuleCheckerDiscards\n", - sblk->stat_CatchupInRuleCheckerDiscards); - - if (sblk->stat_CatchupInFTQDiscards) - BCE_PRINTF(" 0x%08X : CatchupInFTQDiscards\n", - sblk->stat_CatchupInFTQDiscards); - - if (sblk->stat_CatchupInMBUFDiscards) - BCE_PRINTF(" 0x%08X : CatchupInMBUFDiscards\n", - sblk->stat_CatchupInMBUFDiscards); - - if (sblk->stat_CatchupInRuleCheckerP4Hit) - BCE_PRINTF(" 0x%08X : CatchupInRuleCheckerP4Hit\n", - sblk->stat_CatchupInRuleCheckerP4Hit); + BCE_PRINT_64BIT_STAT(stat_IfHCInOctets); + BCE_PRINT_64BIT_STAT(stat_IfHCInBadOctets); + BCE_PRINT_64BIT_STAT(stat_IfHCOutOctets); + BCE_PRINT_64BIT_STAT(stat_IfHCOutBadOctets); + BCE_PRINT_64BIT_STAT(stat_IfHCInUcastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCInBroadcastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCInMulticastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCOutUcastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCOutBroadcastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCOutMulticastPkts); + BCE_PRINT_32BIT_STAT(stat_emac_tx_stat_dot3statsinternalmactransmiterrors); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsCarrierSenseErrors); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsFCSErrors); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsAlignmentErrors); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsSingleCollisionFrames); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsMultipleCollisionFrames); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsDeferredTransmissions); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsExcessiveCollisions); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsLateCollisions); + BCE_PRINT_32BIT_STAT(stat_EtherStatsCollisions); + BCE_PRINT_32BIT_STAT(stat_EtherStatsFragments); + BCE_PRINT_32BIT_STAT(stat_EtherStatsJabbers); + BCE_PRINT_32BIT_STAT(stat_EtherStatsUndersizePkts); + BCE_PRINT_32BIT_STAT(stat_EtherStatsOversizePkts); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx64Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx65Octetsto127Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx128Octetsto255Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx256Octetsto511Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx512Octetsto1023Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx1024Octetsto1522Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx1523Octetsto9022Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx64Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx65Octetsto127Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx128Octetsto255Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx256Octetsto511Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx512Octetsto1023Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx1024Octetsto1522Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx1523Octetsto9022Octets); + BCE_PRINT_32BIT_STAT(stat_XonPauseFramesReceived); + BCE_PRINT_32BIT_STAT(stat_XoffPauseFramesReceived); + BCE_PRINT_32BIT_STAT(stat_OutXonSent); + BCE_PRINT_32BIT_STAT(stat_OutXoffSent); + BCE_PRINT_32BIT_STAT(stat_FlowControlDone); + BCE_PRINT_32BIT_STAT(stat_MacControlFramesReceived); + BCE_PRINT_32BIT_STAT(stat_XoffStateEntered); + BCE_PRINT_32BIT_STAT(stat_IfInFramesL2FilterDiscards); + BCE_PRINT_32BIT_STAT(stat_IfInRuleCheckerDiscards); + BCE_PRINT_32BIT_STAT(stat_IfInFTQDiscards); + BCE_PRINT_32BIT_STAT(stat_IfInMBUFDiscards); + BCE_PRINT_32BIT_STAT(stat_IfInRuleCheckerP4Hit); + BCE_PRINT_32BIT_STAT(stat_CatchupInRuleCheckerDiscards); + BCE_PRINT_32BIT_STAT(stat_CatchupInFTQDiscards); + BCE_PRINT_32BIT_STAT(stat_CatchupInMBUFDiscards); + BCE_PRINT_32BIT_STAT(stat_CatchupInRuleCheckerP4Hit); BCE_PRINTF( "----------------------------" @@ -10465,7 +10312,7 @@ static __attribute__ ((noinline)) void bce_dump_com_state(struct bce_softc *sc, int regs) { u32 val; - u32 fw_version[3]; + u32 fw_version[4]; BCE_PRINTF( "----------------------------" @@ -10508,12 +10355,76 @@ bce_dump_com_state(struct bce_softc *sc, /****************************************************************************/ +/* Prints out the Receive Virtual 2 Physical (RV2P) state. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static __attribute__ ((noinline)) void +bce_dump_rv2p_state(struct bce_softc *sc) +{ + u32 val, pc1, pc2, fw_ver_high, fw_ver_low; + + BCE_PRINTF( + "----------------------------" + " RV2P State " + "----------------------------\n"); + + /* Stall the RV2P processors. */ + val = REG_RD_IND(sc, BCE_RV2P_CONFIG); + val |= BCE_RV2P_CONFIG_STALL_PROC1 | BCE_RV2P_CONFIG_STALL_PROC2; + REG_WR_IND(sc, BCE_RV2P_CONFIG, val); + + /* Read the firmware version. */ + val = 0x00000001; + REG_WR_IND(sc, BCE_RV2P_PROC1_ADDR_CMD, val); + fw_ver_low = REG_RD_IND(sc, BCE_RV2P_INSTR_LOW); + fw_ver_high = REG_RD_IND(sc, BCE_RV2P_INSTR_HIGH) & BCE_RV2P_INSTR_HIGH_HIGH; + BCE_PRINTF("RV2P1 Firmware version - 0x%08X:0x%08X\n", fw_ver_high, fw_ver_low); + + val = 0x00000001; + REG_WR_IND(sc, BCE_RV2P_PROC2_ADDR_CMD, val); + fw_ver_low = REG_RD_IND(sc, BCE_RV2P_INSTR_LOW); + fw_ver_high = REG_RD_IND(sc, BCE_RV2P_INSTR_HIGH) & BCE_RV2P_INSTR_HIGH_HIGH; + BCE_PRINTF("RV2P2 Firmware version - 0x%08X:0x%08X\n", fw_ver_high, fw_ver_low); + + /* Resume the RV2P processors. */ + val = REG_RD_IND(sc, BCE_RV2P_CONFIG); + val &= ~(BCE_RV2P_CONFIG_STALL_PROC1 | BCE_RV2P_CONFIG_STALL_PROC2); + REG_WR_IND(sc, BCE_RV2P_CONFIG, val); + + /* Fetch the program counter value. */ + val = 0x68007800; + REG_WR_IND(sc, BCE_RV2P_DEBUG_VECT_PEEK, val); + val = REG_RD_IND(sc, BCE_RV2P_DEBUG_VECT_PEEK); + pc1 = (val & BCE_RV2P_DEBUG_VECT_PEEK_1_VALUE); + pc2 = (val & BCE_RV2P_DEBUG_VECT_PEEK_2_VALUE) >> 16; + BCE_PRINTF("0x%08X - RV2P1 program counter (1st read)\n", pc1); + BCE_PRINTF("0x%08X - RV2P2 program counter (1st read)\n", pc2); + + /* Fetch the program counter value again to see if it is advancing. */ + val = 0x68007800; + REG_WR_IND(sc, BCE_RV2P_DEBUG_VECT_PEEK, val); + val = REG_RD_IND(sc, BCE_RV2P_DEBUG_VECT_PEEK); + pc1 = (val & BCE_RV2P_DEBUG_VECT_PEEK_1_VALUE); + pc2 = (val & BCE_RV2P_DEBUG_VECT_PEEK_2_VALUE) >> 16; + BCE_PRINTF("0x%08X - RV2P1 program counter (2nd read)\n", pc1); + BCE_PRINTF("0x%08X - RV2P2 program counter (2nd read)\n", pc2); + + BCE_PRINTF( + "----------------------------" + "----------------" + "----------------------------\n"); +} + + +/****************************************************************************/ /* Prints out the driver state and then enters the debugger. */ /* */ /* Returns: */ /* Nothing. */ /****************************************************************************/ -static void +static __attribute__ ((noinline)) void bce_breakpoint(struct bce_softc *sc) { @@ -10544,6 +10455,7 @@ bce_breakpoint(struct bce_softc *sc) bce_dump_tpat_state(sc, 0); bce_dump_cp_state(sc, 0); bce_dump_com_state(sc, 0); + bce_dump_rv2p_state(sc); #ifdef BCE_JUMBO_HDRSPLIT bce_dump_pgbd(sc, 0, NULL); bce_dump_pg_mbuf_chain(sc, 0, USABLE_PG_BD); Modified: stable/8/sys/dev/bce/if_bcefw.h ============================================================================== --- stable/8/sys/dev/bce/if_bcefw.h Thu Apr 15 19:22:55 2010 (r206679) +++ stable/8/sys/dev/bce/if_bcefw.h Thu Apr 15 19:26:28 2010 (r206680) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2009 Broadcom Corporation + * Copyright (c) 2006-2010 Broadcom Corporation * David Christensen . All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/8/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/8/sys/dev/bce/if_bcereg.h Thu Apr 15 19:22:55 2010 (r206679) +++ stable/8/sys/dev/bce/if_bcereg.h Thu Apr 15 19:26:28 2010 (r206680) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2009 Broadcom Corporation + * Copyright (c) 2006-2010 Broadcom Corporation * David Christensen . All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -453,24 +453,10 @@ } /* Announces function entry. */ -#if 0 -#define DBENTER(cond) \ - u32 start_time = REG_RD(sc, BCE_TIMER_25MHZ_FREE_RUN); \ - u32 end_time; \ - DBPRINT(sc, (cond), "%s(enter)\n", __FUNCTION__); -#endif - #define DBENTER(cond) \ DBPRINT(sc, (cond), "%s(enter)\n", __FUNCTION__) /* Announces function exit. */ -#if 0 -#define DBEXIT(cond, val) \ - end_time = REG_RD(sc, BCE_TIMER_25MHZ_FREE_RUN); \ - val += (u64) BCE_TIME_DELTA(start_time, end_time); \ - DBPRINT(sc, (cond), "%s(exit)\n", __FUNCTION__); -#endif - #define DBEXIT(cond) \ DBPRINT(sc, (cond), "%s(exit)\n", __FUNCTION__) @@ -6454,6 +6440,7 @@ struct bce_softc #define BCE_PHY_INT_MODE_MASK_FLAG 0x00000300 #define BCE_PHY_INT_MODE_AUTO_POLLING_FLAG 0x00000100 #define BCE_PHY_INT_MODE_LINK_READY_FLAG 0x00000200 +#define BCE_PHY_IEEE_CLAUSE_45_FLAG 0x00000400 /* Values that need to be shared with the PHY driver. */ u32 bce_shared_hw_cfg; From owner-svn-src-stable@FreeBSD.ORG Thu Apr 15 19:28:15 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7661106566B; Thu, 15 Apr 2010 19:28:15 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B4F458FC0C; Thu, 15 Apr 2010 19:28:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3FJSFBH095751; Thu, 15 Apr 2010 19:28:15 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FJSF3E095747; Thu, 15 Apr 2010 19:28:15 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004151928.o3FJSF3E095747@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 15 Apr 2010 19:28:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206681 - stable/7/sys/dev/bce X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 19:28:15 -0000 Author: yongari Date: Thu Apr 15 19:28:15 2010 New Revision: 206681 URL: http://svn.freebsd.org/changeset/base/206681 Log: MFC r205300: - Added support for 5709S/5716S PHYs. - Update copyright to 2010. - Add new debug code for RV2P block. - Improve output formatting for various debug functions. PR: kern/134658, kern/136417, kern/139761, kern/140970 Modified: stable/7/sys/dev/bce/if_bce.c stable/7/sys/dev/bce/if_bcefw.h stable/7/sys/dev/bce/if_bcereg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/bce/if_bce.c ============================================================================== --- stable/7/sys/dev/bce/if_bce.c Thu Apr 15 19:26:28 2010 (r206680) +++ stable/7/sys/dev/bce/if_bce.c Thu Apr 15 19:28:15 2010 (r206681) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2009 Broadcom Corporation + * Copyright (c) 2006-2010 Broadcom Corporation * David Christensen . All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$"); * BCM5708C B1, B2 * BCM5708S B1, B2 * BCM5709C A1, C0 + * BCM5709S A1, C0 * BCM5716C C0 + * BCM5716S C0 * * The following controllers are not supported by this driver: * BCM5706C A0, A1 (pre-production) @@ -46,7 +48,7 @@ __FBSDID("$FreeBSD$"); * BCM5708C A0, B0 (pre-production) * BCM5708S A0, B0 (pre-production) * BCM5709C A0 B0, B1, B2 (pre-production) - * BCM5709S A0, A1, B0, B1, B2, C0 (pre-production) + * BCM5709S A0, B0, B1, B2 (pre-production) */ #include "opt_bce.h" @@ -320,6 +322,7 @@ static void bce_dump_rxp_state (struct static void bce_dump_tpat_state (struct bce_softc *, int); static void bce_dump_cp_state (struct bce_softc *, int); static void bce_dump_com_state (struct bce_softc *, int); +static void bce_dump_rv2p_state (struct bce_softc *); static void bce_breakpoint (struct bce_softc *); #endif @@ -360,6 +363,7 @@ static int bce_nvram_write (struct bc /* */ /****************************************************************************/ static void bce_get_media (struct bce_softc *); +static void bce_init_media (struct bce_softc *); static void bce_dma_map_addr (void *, bus_dma_segment_t *, int, int); static int bce_dma_alloc (device_t); static void bce_dma_free (struct bce_softc *); @@ -1096,7 +1100,10 @@ bce_attach(device_t dev) else ifp->if_baudrate = IF_Mbps(1000); - /* Check for an MII child bus by probing the PHY. */ + /* Handle any special PHY initialization for SerDes PHYs. */ + bce_init_media(sc); + + /* MII child bus by probing the PHY. */ if (mii_phy_probe(dev, &sc->bce_miibus, bce_ifmedia_upd, bce_ifmedia_sts)) { BCE_PRINTF("%s(%d): No PHY found on child MII bus!\n", @@ -1504,7 +1511,17 @@ bce_miibus_read_reg(device_t dev, int ph return(0); } - if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) { + /* + * The 5709S PHY is an IEEE Clause 45 PHY + * with special mappings to work with IEEE + * Clause 22 register accesses. + */ + if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) { + if (reg >= MII_BMCR && reg <= MII_ANLPRNP) + reg += 0x10; + } + + if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) { val = REG_RD(sc, BCE_EMAC_MDIO_MODE); val &= ~BCE_EMAC_MDIO_MODE_AUTO_POLL; @@ -1584,6 +1601,16 @@ bce_miibus_write_reg(device_t dev, int p DB_PRINT_PHY_REG(reg, val); + /* + * The 5709S PHY is an IEEE Clause 45 PHY + * with special mappings to work with IEEE + * Clause 22 register accesses. + */ + if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) { + if (reg >= MII_BMCR && reg <= MII_ANLPRNP) + reg += 0x10; + } + if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) { val1 = REG_RD(sc, BCE_EMAC_MDIO_MODE); val1 &= ~BCE_EMAC_MDIO_MODE_AUTO_POLL; @@ -2647,9 +2674,11 @@ bce_get_media(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_LOAD, "BCM5709 s/w configured for SerDes.\n"); sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; + break; default: DBPRINT(sc, BCE_INFO_LOAD, "BCM5709 s/w configured for Copper.\n"); + break; } } else { switch (strap) { @@ -2659,9 +2688,11 @@ bce_get_media(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_LOAD, "BCM5709 s/w configured for SerDes.\n"); sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; + break; default: DBPRINT(sc, BCE_INFO_LOAD, "BCM5709 s/w configured for Copper.\n"); + break; } } @@ -2669,15 +2700,22 @@ bce_get_media(struct bce_softc *sc) sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; if (sc->bce_phy_flags & BCE_PHY_SERDES_FLAG) { + sc->bce_flags |= BCE_NO_WOL_FLAG; - if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { + + /* 5708S, 5709S, and 5716S use a separate PHY for SerDes. */ + if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) sc->bce_phy_addr = 2; + + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { + sc->bce_phy_flags |= BCE_PHY_IEEE_CLAUSE_45_FLAG; + val = bce_shmem_rd(sc, BCE_SHARED_HW_CFG_CONFIG); if (val & BCE_SHARED_HW_CFG_PHY_2_5G) { sc->bce_phy_flags |= BCE_PHY_2_5G_CAPABLE_FLAG; DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb capable adapter\n"); } - } + } } else if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5706) || (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5708)) sc->bce_phy_flags |= BCE_PHY_CRC_FIX_FLAG; @@ -2691,6 +2729,37 @@ bce_get_media_exit: /****************************************************************************/ +/* Performs PHY initialization required before MII drivers access the */ +/* device. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_init_media(struct bce_softc *sc) +{ + if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) { + /* + * Configure 5709S/5716S PHYs to use traditional IEEE + * Clause 22 method. Otherwise we have no way to attach + * the PHY in mii(4) layer. PHY specific configuration + * is done in mii layer. + */ + + /* Select auto-negotiation MMD of the PHY. */ + bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, + BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_ADDR_EXT); + bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, + BRGPHY_ADDR_EXT, BRGPHY_ADDR_EXT_AN_MMD); + + /* Select IEEE0 block of AN MMD (assumed in all brgphy(4) code). */ + bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, + BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_COMBO_IEEE0); + } +} + + +/****************************************************************************/ /* Free any DMA memory owned by the driver. */ /* */ /* Scans through each data structre that requires DMA memory and frees */ @@ -6679,7 +6748,7 @@ bce_tso_setup(struct bce_softc *sc, stru DBPRINT(sc, BCE_EXTREME_SEND, "%s(): hdr_len = %d, e_hlen = %d, " "ip_hlen = %d, tcp_hlen = %d, ip_len = %d\n", - __FUNCTION__, hdr_len, sizeof(struct ether_header), ip_hlen, + __FUNCTION__, hdr_len, (int) sizeof(struct ether_header), ip_hlen, tcp_hlen, ip_len); /* Set the LSO flag in the TX BD */ @@ -7943,7 +8012,7 @@ bce_sysctl_dump_tx_chain(SYSCTL_HANDLER_ if (result == 1) { sc = (struct bce_softc *)arg1; - bce_dump_tx_chain(sc, 0, USABLE_TX_BD); + bce_dump_tx_chain(sc, 0, TOTAL_TX_BD); } return error; @@ -8626,7 +8695,7 @@ bce_add_sysctls(struct bce_softc *sc) /* Returns: */ /* Nothing. */ /****************************************************************************/ -static void +static __attribute__ ((noinline)) void bce_freeze_controller(struct bce_softc *sc) { u32 val; @@ -8643,7 +8712,7 @@ bce_freeze_controller(struct bce_softc * /* Returns: */ /* Nothing. */ /****************************************************************************/ -static void +static __attribute__ ((noinline)) void bce_unfreeze_controller(struct bce_softc *sc) { u32 val; @@ -8661,7 +8730,7 @@ bce_unfreeze_controller(struct bce_softc /* Returns: */ /* Nothing. */ /****************************************************************************/ -static void +static __attribute__ ((noinline)) void bce_dump_enet(struct bce_softc *sc, struct mbuf *m) { struct ether_vlan_header *eh; @@ -8915,7 +8984,9 @@ bce_dump_pg_mbuf_chain(struct bce_softc static __attribute__ ((noinline)) void bce_dump_txbd(struct bce_softc *sc, int idx, struct tx_bd *txbd) { - if (idx > MAX_TX_BD) + int i = 0; + + if (idx > MAX_TX_BD) /* Index out of range. */ BCE_PRINTF("tx_bd[0x%04X]: Invalid tx_bd index!\n", idx); else if ((idx & USABLE_TX_BD_PER_PAGE) == USABLE_TX_BD_PER_PAGE) @@ -8923,52 +8994,65 @@ bce_dump_txbd(struct bce_softc *sc, int BCE_PRINTF("tx_bd[0x%04X]: haddr = 0x%08X:%08X, chain page pointer\n", idx, txbd->tx_bd_haddr_hi, txbd->tx_bd_haddr_lo); else { - /* Normal tx_bd entry. */ - BCE_PRINTF("tx_bd[0x%04X]: haddr = 0x%08X:%08X, nbytes = 0x%08X, " - "vlan tag= 0x%04X, flags = 0x%04X (", idx, - txbd->tx_bd_haddr_hi, txbd->tx_bd_haddr_lo, - txbd->tx_bd_mss_nbytes, txbd->tx_bd_vlan_tag, - txbd->tx_bd_flags); - - if (txbd->tx_bd_flags & TX_BD_FLAGS_CONN_FAULT) - printf(" CONN_FAULT"); - - if (txbd->tx_bd_flags & TX_BD_FLAGS_TCP_UDP_CKSUM) - printf(" TCP_UDP_CKSUM"); + /* Normal tx_bd entry. */ + BCE_PRINTF("tx_bd[0x%04X]: haddr = 0x%08X:%08X, mss_nbytes = 0x%08X, " + "vlan tag = 0x%04X, flags = 0x%04X (", idx, + txbd->tx_bd_haddr_hi, txbd->tx_bd_haddr_lo, + txbd->tx_bd_mss_nbytes, txbd->tx_bd_vlan_tag, + txbd->tx_bd_flags); - if (txbd->tx_bd_flags & TX_BD_FLAGS_IP_CKSUM) - printf(" IP_CKSUM"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_CONN_FAULT) { + if (i>0) printf("|"); printf("CONN_FAULT"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_VLAN_TAG) - printf(" VLAN"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_TCP_UDP_CKSUM) { + if (i>0) printf("|"); printf("TCP_UDP_CKSUM"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_COAL_NOW) - printf(" COAL_NOW"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_IP_CKSUM) { + if (i>0) printf("|"); printf("IP_CKSUM"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_DONT_GEN_CRC) - printf(" DONT_GEN_CRC"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_VLAN_TAG) { + if (i>0) printf("|"); printf("VLAN"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_START) - printf(" START"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_COAL_NOW) { + if (i>0) printf("|"); printf("COAL_NOW"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_END) - printf(" END"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_DONT_GEN_CRC) { + if (i>0) printf("|"); printf("DONT_GEN_CRC"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_LSO) - printf(" LSO"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_START) { + if (i>0) printf("|"); printf("START"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_OPTION_WORD) - printf(" OPTION_WORD"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_END) { + if (i>0) printf("|"); printf("END"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_FLAGS) - printf(" FLAGS"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_LSO) { + if (i>0) printf("|"); printf("LSO"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_SNAP) - printf(" SNAP"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_OPTION_WORD) { + if (i>0) printf("|"); + printf("SW_OPTION=%d", ((txbd->tx_bd_flags & + TX_BD_FLAGS_SW_OPTION_WORD) >> 8)); i++; + } - printf(" )\n"); - } + if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_FLAGS) { + if (i>0) printf("|"); printf("SW_FLAGS"); i++; + } + if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_SNAP) { + if (i>0) printf("|"); printf("SNAP)"); + } else { + printf(")\n"); + } + } } @@ -9415,10 +9499,8 @@ bce_dump_tx_chain(struct bce_softc *sc, BCE_PRINTF("page size = 0x%08X, tx chain pages = 0x%08X\n", (u32) BCM_PAGE_SIZE, (u32) TX_PAGES); - BCE_PRINTF("tx_bd per page = 0x%08X, usable tx_bd per page = 0x%08X\n", (u32) TOTAL_TX_BD_PER_PAGE, (u32) USABLE_TX_BD_PER_PAGE); - BCE_PRINTF("total tx_bd = 0x%08X\n", (u32) TOTAL_TX_BD); BCE_PRINTF( @@ -9426,11 +9508,11 @@ bce_dump_tx_chain(struct bce_softc *sc, " tx_bd data " "----------------------------\n"); - /* Now print out the tx_bd's themselves. */ + /* Now print out a decoded list of TX buffer descriptors. */ for (int i = 0; i < count; i++) { txbd = &sc->tx_bd_chain[TX_PAGE(tx_prod)][TX_IDX(tx_prod)]; bce_dump_txbd(sc, tx_prod, txbd); - tx_prod = NEXT_TX_BD(tx_prod); + tx_prod++; } BCE_PRINTF( @@ -9530,6 +9612,17 @@ bce_dump_pg_chain(struct bce_softc *sc, } #endif +#define BCE_PRINT_RX_CONS(arg) \ +if (sblk->status_rx_quick_consumer_index##arg) \ + BCE_PRINTF("0x%04X(0x%04X) - rx_quick_consumer_index##arg\n", \ + sblk->status_rx_quick_consumer_index##arg, \ + (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index##arg)); + +#define BCE_PRINT_TX_CONS(arg) \ +if (sblk->status_tx_quick_consumer_index##arg) \ + BCE_PRINTF("0x%04X(0x%04X) - tx_quick_consumer_index##arg\n", \ + sblk->status_tx_quick_consumer_index##arg, \ + (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index##arg)); /****************************************************************************/ /* Prints out the status block from host memory. */ @@ -9549,90 +9642,28 @@ bce_dump_status_block(struct bce_softc * " Status Block " "----------------------------\n"); + /* Theses indices are used for normal L2 drivers. */ BCE_PRINTF(" 0x%08X - attn_bits\n", sblk->status_attn_bits); BCE_PRINTF(" 0x%08X - attn_bits_ack\n", sblk->status_attn_bits_ack); - BCE_PRINTF("0x%04X(0x%04X) - rx_cons0\n", - sblk->status_rx_quick_consumer_index0, - (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index0)); - - BCE_PRINTF("0x%04X(0x%04X) - tx_cons0\n", - sblk->status_tx_quick_consumer_index0, - (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index0)); + BCE_PRINT_RX_CONS(0); + BCE_PRINT_TX_CONS(0) BCE_PRINTF(" 0x%04X - status_idx\n", sblk->status_idx); /* Theses indices are not used for normal L2 drivers. */ - if (sblk->status_rx_quick_consumer_index1) - BCE_PRINTF("0x%04X(0x%04X) - rx_cons1\n", - sblk->status_rx_quick_consumer_index1, - (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index1)); - - if (sblk->status_tx_quick_consumer_index1) - BCE_PRINTF("0x%04X(0x%04X) - tx_cons1\n", - sblk->status_tx_quick_consumer_index1, - (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index1)); - - if (sblk->status_rx_quick_consumer_index2) - BCE_PRINTF("0x%04X(0x%04X)- rx_cons2\n", - sblk->status_rx_quick_consumer_index2, - (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index2)); - - if (sblk->status_tx_quick_consumer_index2) - BCE_PRINTF("0x%04X(0x%04X) - tx_cons2\n", - sblk->status_tx_quick_consumer_index2, - (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index2)); - - if (sblk->status_rx_quick_consumer_index3) - BCE_PRINTF("0x%04X(0x%04X) - rx_cons3\n", - sblk->status_rx_quick_consumer_index3, - (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index3)); - - if (sblk->status_tx_quick_consumer_index3) - BCE_PRINTF("0x%04X(0x%04X) - tx_cons3\n", - sblk->status_tx_quick_consumer_index3, - (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index3)); - - if (sblk->status_rx_quick_consumer_index4 || - sblk->status_rx_quick_consumer_index5) - BCE_PRINTF("rx_cons4 = 0x%08X, rx_cons5 = 0x%08X\n", - sblk->status_rx_quick_consumer_index4, - sblk->status_rx_quick_consumer_index5); - - if (sblk->status_rx_quick_consumer_index6 || - sblk->status_rx_quick_consumer_index7) - BCE_PRINTF("rx_cons6 = 0x%08X, rx_cons7 = 0x%08X\n", - sblk->status_rx_quick_consumer_index6, - sblk->status_rx_quick_consumer_index7); - - if (sblk->status_rx_quick_consumer_index8 || - sblk->status_rx_quick_consumer_index9) - BCE_PRINTF("rx_cons8 = 0x%08X, rx_cons9 = 0x%08X\n", - sblk->status_rx_quick_consumer_index8, - sblk->status_rx_quick_consumer_index9); - - if (sblk->status_rx_quick_consumer_index10 || - sblk->status_rx_quick_consumer_index11) - BCE_PRINTF("rx_cons10 = 0x%08X, rx_cons11 = 0x%08X\n", - sblk->status_rx_quick_consumer_index10, - sblk->status_rx_quick_consumer_index11); - - if (sblk->status_rx_quick_consumer_index12 || - sblk->status_rx_quick_consumer_index13) - BCE_PRINTF("rx_cons12 = 0x%08X, rx_cons13 = 0x%08X\n", - sblk->status_rx_quick_consumer_index12, - sblk->status_rx_quick_consumer_index13); - - if (sblk->status_rx_quick_consumer_index14 || - sblk->status_rx_quick_consumer_index15) - BCE_PRINTF("rx_cons14 = 0x%08X, rx_cons15 = 0x%08X\n", - sblk->status_rx_quick_consumer_index14, - sblk->status_rx_quick_consumer_index15); + BCE_PRINT_RX_CONS(1); BCE_PRINT_RX_CONS(2); BCE_PRINT_RX_CONS(3); + BCE_PRINT_RX_CONS(4); BCE_PRINT_RX_CONS(5); BCE_PRINT_RX_CONS(6); + BCE_PRINT_RX_CONS(7); BCE_PRINT_RX_CONS(8); BCE_PRINT_RX_CONS(9); + BCE_PRINT_RX_CONS(10); BCE_PRINT_RX_CONS(11); BCE_PRINT_RX_CONS(12); + BCE_PRINT_RX_CONS(13); BCE_PRINT_RX_CONS(14); BCE_PRINT_RX_CONS(15); - if (sblk->status_completion_producer_index || + BCE_PRINT_TX_CONS(1); BCE_PRINT_TX_CONS(2); BCE_PRINT_TX_CONS(3); + + if (sblk->status_completion_producer_index || sblk->status_cmd_consumer_index) BCE_PRINTF("com_prod = 0x%08X, cmd_cons = 0x%08X\n", sblk->status_completion_producer_index, @@ -9645,6 +9676,14 @@ bce_dump_status_block(struct bce_softc * } +#define BCE_PRINT_64BIT_STAT(arg) \ +if (sblk->arg##_lo || sblk->arg##_hi) \ + BCE_PRINTF("0x%08X:%08X : arg\n", sblk->arg##_hi, sblk->arg##_lo); + +#define BCE_PRINT_32BIT_STAT(arg) \ +if (sblk->arg) \ + BCE_PRINTF(" 0x%08X : arg\n", sblk->arg); + /****************************************************************************/ /* Prints out the statistics block from host memory. */ /* */ @@ -9663,252 +9702,60 @@ bce_dump_stats_block(struct bce_softc *s " Stats Block (All Stats Not Shown Are 0) " "---------------\n"); - if (sblk->stat_IfHCInOctets_hi - || sblk->stat_IfHCInOctets_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInOctets\n", - sblk->stat_IfHCInOctets_hi, - sblk->stat_IfHCInOctets_lo); - - if (sblk->stat_IfHCInBadOctets_hi - || sblk->stat_IfHCInBadOctets_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInBadOctets\n", - sblk->stat_IfHCInBadOctets_hi, - sblk->stat_IfHCInBadOctets_lo); - - if (sblk->stat_IfHCOutOctets_hi - || sblk->stat_IfHCOutOctets_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutOctets\n", - sblk->stat_IfHCOutOctets_hi, - sblk->stat_IfHCOutOctets_lo); - - if (sblk->stat_IfHCOutBadOctets_hi - || sblk->stat_IfHCOutBadOctets_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutBadOctets\n", - sblk->stat_IfHCOutBadOctets_hi, - sblk->stat_IfHCOutBadOctets_lo); - - if (sblk->stat_IfHCInUcastPkts_hi - || sblk->stat_IfHCInUcastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInUcastPkts\n", - sblk->stat_IfHCInUcastPkts_hi, - sblk->stat_IfHCInUcastPkts_lo); - - if (sblk->stat_IfHCInBroadcastPkts_hi - || sblk->stat_IfHCInBroadcastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInBroadcastPkts\n", - sblk->stat_IfHCInBroadcastPkts_hi, - sblk->stat_IfHCInBroadcastPkts_lo); - - if (sblk->stat_IfHCInMulticastPkts_hi - || sblk->stat_IfHCInMulticastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInMulticastPkts\n", - sblk->stat_IfHCInMulticastPkts_hi, - sblk->stat_IfHCInMulticastPkts_lo); - - if (sblk->stat_IfHCOutUcastPkts_hi - || sblk->stat_IfHCOutUcastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutUcastPkts\n", - sblk->stat_IfHCOutUcastPkts_hi, - sblk->stat_IfHCOutUcastPkts_lo); - - if (sblk->stat_IfHCOutBroadcastPkts_hi - || sblk->stat_IfHCOutBroadcastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutBroadcastPkts\n", - sblk->stat_IfHCOutBroadcastPkts_hi, - sblk->stat_IfHCOutBroadcastPkts_lo); - - if (sblk->stat_IfHCOutMulticastPkts_hi - || sblk->stat_IfHCOutMulticastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutMulticastPkts\n", - sblk->stat_IfHCOutMulticastPkts_hi, - sblk->stat_IfHCOutMulticastPkts_lo); - - if (sblk->stat_emac_tx_stat_dot3statsinternalmactransmiterrors) - BCE_PRINTF(" 0x%08X : " - "emac_tx_stat_dot3statsinternalmactransmiterrors\n", - sblk->stat_emac_tx_stat_dot3statsinternalmactransmiterrors); - - if (sblk->stat_Dot3StatsCarrierSenseErrors) - BCE_PRINTF(" 0x%08X : Dot3StatsCarrierSenseErrors\n", - sblk->stat_Dot3StatsCarrierSenseErrors); - - if (sblk->stat_Dot3StatsFCSErrors) - BCE_PRINTF(" 0x%08X : Dot3StatsFCSErrors\n", - sblk->stat_Dot3StatsFCSErrors); - - if (sblk->stat_Dot3StatsAlignmentErrors) - BCE_PRINTF(" 0x%08X : Dot3StatsAlignmentErrors\n", - sblk->stat_Dot3StatsAlignmentErrors); - - if (sblk->stat_Dot3StatsSingleCollisionFrames) - BCE_PRINTF(" 0x%08X : Dot3StatsSingleCollisionFrames\n", - sblk->stat_Dot3StatsSingleCollisionFrames); - - if (sblk->stat_Dot3StatsMultipleCollisionFrames) - BCE_PRINTF(" 0x%08X : Dot3StatsMultipleCollisionFrames\n", - sblk->stat_Dot3StatsMultipleCollisionFrames); - - if (sblk->stat_Dot3StatsDeferredTransmissions) - BCE_PRINTF(" 0x%08X : Dot3StatsDeferredTransmissions\n", - sblk->stat_Dot3StatsDeferredTransmissions); - - if (sblk->stat_Dot3StatsExcessiveCollisions) - BCE_PRINTF(" 0x%08X : Dot3StatsExcessiveCollisions\n", - sblk->stat_Dot3StatsExcessiveCollisions); - - if (sblk->stat_Dot3StatsLateCollisions) - BCE_PRINTF(" 0x%08X : Dot3StatsLateCollisions\n", - sblk->stat_Dot3StatsLateCollisions); - - if (sblk->stat_EtherStatsCollisions) - BCE_PRINTF(" 0x%08X : EtherStatsCollisions\n", - sblk->stat_EtherStatsCollisions); - - if (sblk->stat_EtherStatsFragments) - BCE_PRINTF(" 0x%08X : EtherStatsFragments\n", - sblk->stat_EtherStatsFragments); - - if (sblk->stat_EtherStatsJabbers) - BCE_PRINTF(" 0x%08X : EtherStatsJabbers\n", - sblk->stat_EtherStatsJabbers); - - if (sblk->stat_EtherStatsUndersizePkts) - BCE_PRINTF(" 0x%08X : EtherStatsUndersizePkts\n", - sblk->stat_EtherStatsUndersizePkts); - - if (sblk->stat_EtherStatsOversizePkts) - BCE_PRINTF(" 0x%08X : EtherStatsOverrsizePkts\n", - sblk->stat_EtherStatsOversizePkts); - - if (sblk->stat_EtherStatsPktsRx64Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx64Octets\n", - sblk->stat_EtherStatsPktsRx64Octets); - - if (sblk->stat_EtherStatsPktsRx65Octetsto127Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx65Octetsto127Octets\n", - sblk->stat_EtherStatsPktsRx65Octetsto127Octets); - - if (sblk->stat_EtherStatsPktsRx128Octetsto255Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx128Octetsto255Octets\n", - sblk->stat_EtherStatsPktsRx128Octetsto255Octets); - - if (sblk->stat_EtherStatsPktsRx256Octetsto511Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx256Octetsto511Octets\n", - sblk->stat_EtherStatsPktsRx256Octetsto511Octets); - - if (sblk->stat_EtherStatsPktsRx512Octetsto1023Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx512Octetsto1023Octets\n", - sblk->stat_EtherStatsPktsRx512Octetsto1023Octets); - - if (sblk->stat_EtherStatsPktsRx1024Octetsto1522Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx1024Octetsto1522Octets\n", - sblk->stat_EtherStatsPktsRx1024Octetsto1522Octets); - - if (sblk->stat_EtherStatsPktsRx1523Octetsto9022Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx1523Octetsto9022Octets\n", - sblk->stat_EtherStatsPktsRx1523Octetsto9022Octets); - - if (sblk->stat_EtherStatsPktsTx64Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx64Octets\n", - sblk->stat_EtherStatsPktsTx64Octets); - - if (sblk->stat_EtherStatsPktsTx65Octetsto127Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx65Octetsto127Octets\n", - sblk->stat_EtherStatsPktsTx65Octetsto127Octets); - - if (sblk->stat_EtherStatsPktsTx128Octetsto255Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx128Octetsto255Octets\n", - sblk->stat_EtherStatsPktsTx128Octetsto255Octets); - - if (sblk->stat_EtherStatsPktsTx256Octetsto511Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx256Octetsto511Octets\n", - sblk->stat_EtherStatsPktsTx256Octetsto511Octets); - - if (sblk->stat_EtherStatsPktsTx512Octetsto1023Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx512Octetsto1023Octets\n", - sblk->stat_EtherStatsPktsTx512Octetsto1023Octets); - - if (sblk->stat_EtherStatsPktsTx1024Octetsto1522Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx1024Octetsto1522Octets\n", - sblk->stat_EtherStatsPktsTx1024Octetsto1522Octets); - - if (sblk->stat_EtherStatsPktsTx1523Octetsto9022Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx1523Octetsto9022Octets\n", - sblk->stat_EtherStatsPktsTx1523Octetsto9022Octets); - - if (sblk->stat_XonPauseFramesReceived) - BCE_PRINTF(" 0x%08X : XonPauseFramesReceived\n", - sblk->stat_XonPauseFramesReceived); - - if (sblk->stat_XoffPauseFramesReceived) - BCE_PRINTF(" 0x%08X : XoffPauseFramesReceived\n", - sblk->stat_XoffPauseFramesReceived); - - if (sblk->stat_OutXonSent) - BCE_PRINTF(" 0x%08X : OutXonSent\n", - sblk->stat_OutXonSent); - - if (sblk->stat_OutXoffSent) - BCE_PRINTF(" 0x%08X : OutXoffSent\n", - sblk->stat_OutXoffSent); - - if (sblk->stat_FlowControlDone) - BCE_PRINTF(" 0x%08X : FlowControlDone\n", - sblk->stat_FlowControlDone); - - if (sblk->stat_MacControlFramesReceived) - BCE_PRINTF(" 0x%08X : MacControlFramesReceived\n", - sblk->stat_MacControlFramesReceived); - - if (sblk->stat_XoffStateEntered) - BCE_PRINTF(" 0x%08X : XoffStateEntered\n", - sblk->stat_XoffStateEntered); - - if (sblk->stat_IfInFramesL2FilterDiscards) - BCE_PRINTF(" 0x%08X : IfInFramesL2FilterDiscards\n", - sblk->stat_IfInFramesL2FilterDiscards); - - if (sblk->stat_IfInRuleCheckerDiscards) - BCE_PRINTF(" 0x%08X : IfInRuleCheckerDiscards\n", - sblk->stat_IfInRuleCheckerDiscards); - - if (sblk->stat_IfInFTQDiscards) - BCE_PRINTF(" 0x%08X : IfInFTQDiscards\n", - sblk->stat_IfInFTQDiscards); - - if (sblk->stat_IfInMBUFDiscards) - BCE_PRINTF(" 0x%08X : IfInMBUFDiscards\n", - sblk->stat_IfInMBUFDiscards); - - if (sblk->stat_IfInRuleCheckerP4Hit) - BCE_PRINTF(" 0x%08X : IfInRuleCheckerP4Hit\n", - sblk->stat_IfInRuleCheckerP4Hit); - - if (sblk->stat_CatchupInRuleCheckerDiscards) - BCE_PRINTF(" 0x%08X : CatchupInRuleCheckerDiscards\n", - sblk->stat_CatchupInRuleCheckerDiscards); - - if (sblk->stat_CatchupInFTQDiscards) - BCE_PRINTF(" 0x%08X : CatchupInFTQDiscards\n", - sblk->stat_CatchupInFTQDiscards); - - if (sblk->stat_CatchupInMBUFDiscards) - BCE_PRINTF(" 0x%08X : CatchupInMBUFDiscards\n", - sblk->stat_CatchupInMBUFDiscards); - - if (sblk->stat_CatchupInRuleCheckerP4Hit) - BCE_PRINTF(" 0x%08X : CatchupInRuleCheckerP4Hit\n", - sblk->stat_CatchupInRuleCheckerP4Hit); + BCE_PRINT_64BIT_STAT(stat_IfHCInOctets); + BCE_PRINT_64BIT_STAT(stat_IfHCInBadOctets); + BCE_PRINT_64BIT_STAT(stat_IfHCOutOctets); + BCE_PRINT_64BIT_STAT(stat_IfHCOutBadOctets); + BCE_PRINT_64BIT_STAT(stat_IfHCInUcastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCInBroadcastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCInMulticastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCOutUcastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCOutBroadcastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCOutMulticastPkts); + BCE_PRINT_32BIT_STAT(stat_emac_tx_stat_dot3statsinternalmactransmiterrors); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsCarrierSenseErrors); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsFCSErrors); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsAlignmentErrors); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsSingleCollisionFrames); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsMultipleCollisionFrames); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsDeferredTransmissions); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsExcessiveCollisions); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsLateCollisions); + BCE_PRINT_32BIT_STAT(stat_EtherStatsCollisions); + BCE_PRINT_32BIT_STAT(stat_EtherStatsFragments); + BCE_PRINT_32BIT_STAT(stat_EtherStatsJabbers); + BCE_PRINT_32BIT_STAT(stat_EtherStatsUndersizePkts); + BCE_PRINT_32BIT_STAT(stat_EtherStatsOversizePkts); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx64Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx65Octetsto127Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx128Octetsto255Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx256Octetsto511Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx512Octetsto1023Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx1024Octetsto1522Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx1523Octetsto9022Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx64Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx65Octetsto127Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx128Octetsto255Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx256Octetsto511Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx512Octetsto1023Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx1024Octetsto1522Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx1523Octetsto9022Octets); + BCE_PRINT_32BIT_STAT(stat_XonPauseFramesReceived); + BCE_PRINT_32BIT_STAT(stat_XoffPauseFramesReceived); + BCE_PRINT_32BIT_STAT(stat_OutXonSent); + BCE_PRINT_32BIT_STAT(stat_OutXoffSent); + BCE_PRINT_32BIT_STAT(stat_FlowControlDone); + BCE_PRINT_32BIT_STAT(stat_MacControlFramesReceived); + BCE_PRINT_32BIT_STAT(stat_XoffStateEntered); + BCE_PRINT_32BIT_STAT(stat_IfInFramesL2FilterDiscards); + BCE_PRINT_32BIT_STAT(stat_IfInRuleCheckerDiscards); + BCE_PRINT_32BIT_STAT(stat_IfInFTQDiscards); + BCE_PRINT_32BIT_STAT(stat_IfInMBUFDiscards); + BCE_PRINT_32BIT_STAT(stat_IfInRuleCheckerP4Hit); + BCE_PRINT_32BIT_STAT(stat_CatchupInRuleCheckerDiscards); + BCE_PRINT_32BIT_STAT(stat_CatchupInFTQDiscards); + BCE_PRINT_32BIT_STAT(stat_CatchupInMBUFDiscards); + BCE_PRINT_32BIT_STAT(stat_CatchupInRuleCheckerP4Hit); BCE_PRINTF( "----------------------------" @@ -10465,7 +10312,7 @@ static __attribute__ ((noinline)) void bce_dump_com_state(struct bce_softc *sc, int regs) { u32 val; - u32 fw_version[3]; + u32 fw_version[4]; BCE_PRINTF( "----------------------------" @@ -10508,12 +10355,76 @@ bce_dump_com_state(struct bce_softc *sc, /****************************************************************************/ +/* Prints out the Receive Virtual 2 Physical (RV2P) state. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static __attribute__ ((noinline)) void +bce_dump_rv2p_state(struct bce_softc *sc) +{ + u32 val, pc1, pc2, fw_ver_high, fw_ver_low; + + BCE_PRINTF( + "----------------------------" + " RV2P State " + "----------------------------\n"); + + /* Stall the RV2P processors. */ + val = REG_RD_IND(sc, BCE_RV2P_CONFIG); + val |= BCE_RV2P_CONFIG_STALL_PROC1 | BCE_RV2P_CONFIG_STALL_PROC2; + REG_WR_IND(sc, BCE_RV2P_CONFIG, val); + + /* Read the firmware version. */ + val = 0x00000001; + REG_WR_IND(sc, BCE_RV2P_PROC1_ADDR_CMD, val); + fw_ver_low = REG_RD_IND(sc, BCE_RV2P_INSTR_LOW); + fw_ver_high = REG_RD_IND(sc, BCE_RV2P_INSTR_HIGH) & BCE_RV2P_INSTR_HIGH_HIGH; + BCE_PRINTF("RV2P1 Firmware version - 0x%08X:0x%08X\n", fw_ver_high, fw_ver_low); + + val = 0x00000001; + REG_WR_IND(sc, BCE_RV2P_PROC2_ADDR_CMD, val); + fw_ver_low = REG_RD_IND(sc, BCE_RV2P_INSTR_LOW); + fw_ver_high = REG_RD_IND(sc, BCE_RV2P_INSTR_HIGH) & BCE_RV2P_INSTR_HIGH_HIGH; + BCE_PRINTF("RV2P2 Firmware version - 0x%08X:0x%08X\n", fw_ver_high, fw_ver_low); + + /* Resume the RV2P processors. */ + val = REG_RD_IND(sc, BCE_RV2P_CONFIG); + val &= ~(BCE_RV2P_CONFIG_STALL_PROC1 | BCE_RV2P_CONFIG_STALL_PROC2); + REG_WR_IND(sc, BCE_RV2P_CONFIG, val); + + /* Fetch the program counter value. */ + val = 0x68007800; + REG_WR_IND(sc, BCE_RV2P_DEBUG_VECT_PEEK, val); + val = REG_RD_IND(sc, BCE_RV2P_DEBUG_VECT_PEEK); + pc1 = (val & BCE_RV2P_DEBUG_VECT_PEEK_1_VALUE); + pc2 = (val & BCE_RV2P_DEBUG_VECT_PEEK_2_VALUE) >> 16; + BCE_PRINTF("0x%08X - RV2P1 program counter (1st read)\n", pc1); + BCE_PRINTF("0x%08X - RV2P2 program counter (1st read)\n", pc2); + + /* Fetch the program counter value again to see if it is advancing. */ + val = 0x68007800; + REG_WR_IND(sc, BCE_RV2P_DEBUG_VECT_PEEK, val); + val = REG_RD_IND(sc, BCE_RV2P_DEBUG_VECT_PEEK); + pc1 = (val & BCE_RV2P_DEBUG_VECT_PEEK_1_VALUE); + pc2 = (val & BCE_RV2P_DEBUG_VECT_PEEK_2_VALUE) >> 16; + BCE_PRINTF("0x%08X - RV2P1 program counter (2nd read)\n", pc1); + BCE_PRINTF("0x%08X - RV2P2 program counter (2nd read)\n", pc2); + + BCE_PRINTF( + "----------------------------" + "----------------" + "----------------------------\n"); +} + + +/****************************************************************************/ /* Prints out the driver state and then enters the debugger. */ /* */ /* Returns: */ /* Nothing. */ /****************************************************************************/ -static void +static __attribute__ ((noinline)) void bce_breakpoint(struct bce_softc *sc) { @@ -10544,6 +10455,7 @@ bce_breakpoint(struct bce_softc *sc) bce_dump_tpat_state(sc, 0); bce_dump_cp_state(sc, 0); bce_dump_com_state(sc, 0); + bce_dump_rv2p_state(sc); #ifdef BCE_JUMBO_HDRSPLIT bce_dump_pgbd(sc, 0, NULL); bce_dump_pg_mbuf_chain(sc, 0, USABLE_PG_BD); Modified: stable/7/sys/dev/bce/if_bcefw.h ============================================================================== --- stable/7/sys/dev/bce/if_bcefw.h Thu Apr 15 19:26:28 2010 (r206680) +++ stable/7/sys/dev/bce/if_bcefw.h Thu Apr 15 19:28:15 2010 (r206681) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2009 Broadcom Corporation + * Copyright (c) 2006-2010 Broadcom Corporation * David Christensen . All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/7/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/7/sys/dev/bce/if_bcereg.h Thu Apr 15 19:26:28 2010 (r206680) +++ stable/7/sys/dev/bce/if_bcereg.h Thu Apr 15 19:28:15 2010 (r206681) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2009 Broadcom Corporation + * Copyright (c) 2006-2010 Broadcom Corporation * David Christensen . All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -453,24 +453,10 @@ } /* Announces function entry. */ -#if 0 -#define DBENTER(cond) \ - u32 start_time = REG_RD(sc, BCE_TIMER_25MHZ_FREE_RUN); \ - u32 end_time; \ - DBPRINT(sc, (cond), "%s(enter)\n", __FUNCTION__); -#endif - #define DBENTER(cond) \ DBPRINT(sc, (cond), "%s(enter)\n", __FUNCTION__) /* Announces function exit. */ -#if 0 -#define DBEXIT(cond, val) \ - end_time = REG_RD(sc, BCE_TIMER_25MHZ_FREE_RUN); \ - val += (u64) BCE_TIME_DELTA(start_time, end_time); \ - DBPRINT(sc, (cond), "%s(exit)\n", __FUNCTION__); -#endif - #define DBEXIT(cond) \ DBPRINT(sc, (cond), "%s(exit)\n", __FUNCTION__) @@ -6451,6 +6437,7 @@ struct bce_softc #define BCE_PHY_INT_MODE_MASK_FLAG 0x00000300 #define BCE_PHY_INT_MODE_AUTO_POLLING_FLAG 0x00000100 #define BCE_PHY_INT_MODE_LINK_READY_FLAG 0x00000200 +#define BCE_PHY_IEEE_CLAUSE_45_FLAG 0x00000400 /* Values that need to be shared with the PHY driver. */ u32 bce_shared_hw_cfg; From owner-svn-src-stable@FreeBSD.ORG Thu Apr 15 19:29:56 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D771E1065672; Thu, 15 Apr 2010 19:29:56 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C531E8FC15; Thu, 15 Apr 2010 19:29:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3FJTu0W096190; Thu, 15 Apr 2010 19:29:56 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FJTuUL096187; Thu, 15 Apr 2010 19:29:56 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004151929.o3FJTuUL096187@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 15 Apr 2010 19:29:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206682 - stable/8/sys/dev/bce X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 19:29:57 -0000 Author: yongari Date: Thu Apr 15 19:29:56 2010 New Revision: 206682 URL: http://svn.freebsd.org/changeset/base/206682 Log: MFC r206268 - Fixed 5708S 2.5G support broken in last commit. - Added some new debug helper routines to systcl. - Fixed many of the style(9) violations that have crept into the code due to my use of a "smart" editor. Modified: stable/8/sys/dev/bce/if_bce.c stable/8/sys/dev/bce/if_bcereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/bce/if_bce.c ============================================================================== --- stable/8/sys/dev/bce/if_bce.c Thu Apr 15 19:28:15 2010 (r206681) +++ stable/8/sys/dev/bce/if_bce.c Thu Apr 15 19:29:56 2010 (r206682) @@ -39,8 +39,8 @@ __FBSDID("$FreeBSD$"); * BCM5708S B1, B2 * BCM5709C A1, C0 * BCM5709S A1, C0 - * BCM5716C C0 - * BCM5716S C0 + * BCM5716C C0 + * BCM5716S C0 * * The following controllers are not supported by this driver: * BCM5706C A0, A1 (pre-production) @@ -277,37 +277,41 @@ static struct flash_spec flash_5709 = { /****************************************************************************/ /* FreeBSD device entry points. */ /****************************************************************************/ -static int bce_probe (device_t); -static int bce_attach (device_t); -static int bce_detach (device_t); -static int bce_shutdown (device_t); +static int bce_probe (device_t); +static int bce_attach (device_t); +static int bce_detach (device_t); +static int bce_shutdown (device_t); /****************************************************************************/ /* BCE Debug Data Structure Dump Routines */ /****************************************************************************/ #ifdef BCE_DEBUG -static u32 bce_reg_rd (struct bce_softc *, u32); -static void bce_reg_wr (struct bce_softc *, u32, u32); -static void bce_reg_wr16 (struct bce_softc *, u32, u16); -static u32 bce_ctx_rd (struct bce_softc *, u32, u32); -static void bce_dump_enet (struct bce_softc *, struct mbuf *); -static void bce_dump_mbuf (struct bce_softc *, struct mbuf *); +static u32 bce_reg_rd (struct bce_softc *, u32); +static void bce_reg_wr (struct bce_softc *, u32, u32); +static void bce_reg_wr16 (struct bce_softc *, u32, u16); +static u32 bce_ctx_rd (struct bce_softc *, u32, u32); +static void bce_dump_enet (struct bce_softc *, struct mbuf *); +static void bce_dump_mbuf (struct bce_softc *, struct mbuf *); static void bce_dump_tx_mbuf_chain (struct bce_softc *, u16, int); static void bce_dump_rx_mbuf_chain (struct bce_softc *, u16, int); #ifdef BCE_JUMBO_HDRSPLIT static void bce_dump_pg_mbuf_chain (struct bce_softc *, u16, int); #endif -static void bce_dump_txbd (struct bce_softc *, int, struct tx_bd *); -static void bce_dump_rxbd (struct bce_softc *, int, struct rx_bd *); +static void bce_dump_txbd (struct bce_softc *, + int, struct tx_bd *); +static void bce_dump_rxbd (struct bce_softc *, + int, struct rx_bd *); #ifdef BCE_JUMBO_HDRSPLIT -static void bce_dump_pgbd (struct bce_softc *, int, struct rx_bd *); +static void bce_dump_pgbd (struct bce_softc *, + int, struct rx_bd *); #endif -static void bce_dump_l2fhdr (struct bce_softc *, int, struct l2_fhdr *); -static void bce_dump_ctx (struct bce_softc *, u16); -static void bce_dump_ftqs (struct bce_softc *); +static void bce_dump_l2fhdr (struct bce_softc *, + int, struct l2_fhdr *); +static void bce_dump_ctx (struct bce_softc *, u16); +static void bce_dump_ftqs (struct bce_softc *); static void bce_dump_tx_chain (struct bce_softc *, u16, int); -static void bce_dump_rx_chain (struct bce_softc *, u16, int); +static void bce_dump_rx_bd_chain (struct bce_softc *, u16, int); #ifdef BCE_JUMBO_HDRSPLIT static void bce_dump_pg_chain (struct bce_softc *, u16, int); #endif @@ -315,7 +319,7 @@ static void bce_dump_status_block (struc static void bce_dump_stats_block (struct bce_softc *); static void bce_dump_driver_state (struct bce_softc *); static void bce_dump_hw_state (struct bce_softc *); -static void bce_dump_mq_regs (struct bce_softc *); +static void bce_dump_mq_regs (struct bce_softc *); static void bce_dump_bc_state (struct bce_softc *); static void bce_dump_txp_state (struct bce_softc *, int); static void bce_dump_rxp_state (struct bce_softc *, int); @@ -323,18 +327,18 @@ static void bce_dump_tpat_state (struct static void bce_dump_cp_state (struct bce_softc *, int); static void bce_dump_com_state (struct bce_softc *, int); static void bce_dump_rv2p_state (struct bce_softc *); -static void bce_breakpoint (struct bce_softc *); +static void bce_breakpoint (struct bce_softc *); #endif /****************************************************************************/ /* BCE Register/Memory Access Routines */ /****************************************************************************/ -static u32 bce_reg_rd_ind (struct bce_softc *, u32); -static void bce_reg_wr_ind (struct bce_softc *, u32, u32); -static void bce_shmem_wr (struct bce_softc *, u32, u32); -static u32 bce_shmem_rd (struct bce_softc *, u32); -static void bce_ctx_wr (struct bce_softc *, u32, u32, u32); +static u32 bce_reg_rd_ind (struct bce_softc *, u32); +static void bce_reg_wr_ind (struct bce_softc *, u32, u32); +static void bce_shmem_wr (struct bce_softc *, u32, u32); +static u32 bce_shmem_rd (struct bce_softc *, u32); +static void bce_ctx_wr (struct bce_softc *, u32, u32, u32); static int bce_miibus_read_reg (device_t, int, int); static int bce_miibus_write_reg (device_t, int, int, int); static void bce_miibus_statchg (device_t); @@ -346,96 +350,101 @@ static void bce_miibus_statchg (device_ static int bce_acquire_nvram_lock (struct bce_softc *); static int bce_release_nvram_lock (struct bce_softc *); static void bce_enable_nvram_access (struct bce_softc *); -static void bce_disable_nvram_access(struct bce_softc *); +static void bce_disable_nvram_access (struct bce_softc *); static int bce_nvram_read_dword (struct bce_softc *, u32, u8 *, u32); -static int bce_init_nvram (struct bce_softc *); -static int bce_nvram_read (struct bce_softc *, u32, u8 *, int); -static int bce_nvram_test (struct bce_softc *); +static int bce_init_nvram (struct bce_softc *); +static int bce_nvram_read (struct bce_softc *, u32, u8 *, int); +static int bce_nvram_test (struct bce_softc *); #ifdef BCE_NVRAM_WRITE_SUPPORT static int bce_enable_nvram_write (struct bce_softc *); static void bce_disable_nvram_write (struct bce_softc *); static int bce_nvram_erase_page (struct bce_softc *, u32); static int bce_nvram_write_dword (struct bce_softc *, u32, u8 *, u32); -static int bce_nvram_write (struct bce_softc *, u32, u8 *, int); +static int bce_nvram_write (struct bce_softc *, u32, u8 *, int); #endif /****************************************************************************/ /* */ /****************************************************************************/ -static void bce_get_media (struct bce_softc *); -static void bce_init_media (struct bce_softc *); -static void bce_dma_map_addr (void *, bus_dma_segment_t *, int, int); -static int bce_dma_alloc (device_t); -static void bce_dma_free (struct bce_softc *); +static void bce_get_media (struct bce_softc *); +static void bce_init_media (struct bce_softc *); +static void bce_dma_map_addr (void *, + bus_dma_segment_t *, int, int); +static int bce_dma_alloc (device_t); +static void bce_dma_free (struct bce_softc *); static void bce_release_resources (struct bce_softc *); /****************************************************************************/ /* BCE Firmware Synchronization and Load */ /****************************************************************************/ -static int bce_fw_sync (struct bce_softc *, u32); +static int bce_fw_sync (struct bce_softc *, u32); static void bce_load_rv2p_fw (struct bce_softc *, u32 *, u32, u32); -static void bce_load_cpu_fw (struct bce_softc *, struct cpu_reg *, struct fw_info *); -static void bce_start_cpu (struct bce_softc *, struct cpu_reg *); -static void bce_halt_cpu (struct bce_softc *, struct cpu_reg *); -static void bce_start_rxp_cpu (struct bce_softc *); +static void bce_load_cpu_fw (struct bce_softc *, + struct cpu_reg *, struct fw_info *); +static void bce_start_cpu (struct bce_softc *, struct cpu_reg *); +static void bce_halt_cpu (struct bce_softc *, struct cpu_reg *); +static void bce_start_rxp_cpu (struct bce_softc *); static void bce_init_rxp_cpu (struct bce_softc *); static void bce_init_txp_cpu (struct bce_softc *); static void bce_init_tpat_cpu (struct bce_softc *); -static void bce_init_cp_cpu (struct bce_softc *); +static void bce_init_cp_cpu (struct bce_softc *); static void bce_init_com_cpu (struct bce_softc *); -static void bce_init_cpus (struct bce_softc *); +static void bce_init_cpus (struct bce_softc *); static void bce_print_adapter_info (struct bce_softc *); static void bce_probe_pci_caps (device_t, struct bce_softc *); -static void bce_stop (struct bce_softc *); -static int bce_reset (struct bce_softc *, u32); -static int bce_chipinit (struct bce_softc *); -static int bce_blockinit (struct bce_softc *); +static void bce_stop (struct bce_softc *); +static int bce_reset (struct bce_softc *, u32); +static int bce_chipinit (struct bce_softc *); +static int bce_blockinit (struct bce_softc *); static int bce_init_tx_chain (struct bce_softc *); static void bce_free_tx_chain (struct bce_softc *); -static int bce_get_rx_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *, u32 *); +static int bce_get_rx_buf (struct bce_softc *, + struct mbuf *, u16 *, u16 *, u32 *); static int bce_init_rx_chain (struct bce_softc *); static void bce_fill_rx_chain (struct bce_softc *); static void bce_free_rx_chain (struct bce_softc *); #ifdef BCE_JUMBO_HDRSPLIT -static int bce_get_pg_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *); +static int bce_get_pg_buf (struct bce_softc *, + struct mbuf *, u16 *, u16 *); static int bce_init_pg_chain (struct bce_softc *); static void bce_fill_pg_chain (struct bce_softc *); static void bce_free_pg_chain (struct bce_softc *); #endif -static struct mbuf *bce_tso_setup (struct bce_softc *, struct mbuf **, u16 *); -static int bce_tx_encap (struct bce_softc *, struct mbuf **); +static struct mbuf *bce_tso_setup (struct bce_softc *, + struct mbuf **, u16 *); +static int bce_tx_encap (struct bce_softc *, struct mbuf **); static void bce_start_locked (struct ifnet *); -static void bce_start (struct ifnet *); -static int bce_ioctl (struct ifnet *, u_long, caddr_t); -static void bce_watchdog (struct bce_softc *); -static int bce_ifmedia_upd (struct ifnet *); +static void bce_start (struct ifnet *); +static int bce_ioctl (struct ifnet *, u_long, caddr_t); +static void bce_watchdog (struct bce_softc *); +static int bce_ifmedia_upd (struct ifnet *); static void bce_ifmedia_upd_locked (struct ifnet *); -static void bce_ifmedia_sts (struct ifnet *, struct ifmediareq *); -static void bce_init_locked (struct bce_softc *); -static void bce_init (void *); +static void bce_ifmedia_sts (struct ifnet *, struct ifmediareq *); +static void bce_init_locked (struct bce_softc *); +static void bce_init (void *); static void bce_mgmt_init_locked (struct bce_softc *sc); -static void bce_init_ctx (struct bce_softc *); +static void bce_init_ctx (struct bce_softc *); static void bce_get_mac_addr (struct bce_softc *); static void bce_set_mac_addr (struct bce_softc *); -static void bce_phy_intr (struct bce_softc *); -static inline u16 bce_get_hw_rx_cons(struct bce_softc *); -static void bce_rx_intr (struct bce_softc *); -static void bce_tx_intr (struct bce_softc *); +static void bce_phy_intr (struct bce_softc *); +static inline u16 bce_get_hw_rx_cons (struct bce_softc *); +static void bce_rx_intr (struct bce_softc *); +static void bce_tx_intr (struct bce_softc *); static void bce_disable_intr (struct bce_softc *); -static void bce_enable_intr (struct bce_softc *, int); +static void bce_enable_intr (struct bce_softc *, int); -static void bce_intr (void *); -static void bce_set_rx_mode (struct bce_softc *); +static void bce_intr (void *); +static void bce_set_rx_mode (struct bce_softc *); static void bce_stats_update (struct bce_softc *); -static void bce_tick (void *); -static void bce_pulse (void *); -static void bce_add_sysctls (struct bce_softc *); +static void bce_tick (void *); +static void bce_pulse (void *); +static void bce_add_sysctls (struct bce_softc *); /****************************************************************************/ @@ -540,15 +549,15 @@ bce_probe(device_t dev) sdid = pci_get_subdevice(dev); DBPRINT(sc, BCE_EXTREME_LOAD, - "%s(); VID = 0x%04X, DID = 0x%04X, SVID = 0x%04X, " - "SDID = 0x%04X\n", __FUNCTION__, vid, did, svid, sdid); + "%s(); VID = 0x%04X, DID = 0x%04X, SVID = 0x%04X, " + "SDID = 0x%04X\n", __FUNCTION__, vid, did, svid, sdid); /* Look through the list of known devices for a match. */ while(t->bce_name != NULL) { if ((vid == t->bce_vid) && (did == t->bce_did) && - ((svid == t->bce_svid) || (t->bce_svid == PCI_ANY_ID)) && - ((sdid == t->bce_sdid) || (t->bce_sdid == PCI_ANY_ID))) { + ((svid == t->bce_svid) || (t->bce_svid == PCI_ANY_ID)) && + ((sdid == t->bce_sdid) || (t->bce_sdid == PCI_ANY_ID))) { descbuf = malloc(BCE_DEVDESC_MAX, M_TEMP, M_NOWAIT); @@ -557,8 +566,8 @@ bce_probe(device_t dev) /* Print out the device identity. */ snprintf(descbuf, BCE_DEVDESC_MAX, "%s (%c%d)", - t->bce_name, - (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), + t->bce_name, (((pci_read_config(dev, + PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), (pci_read_config(dev, PCIR_REVID, 4) & 0xf)); device_set_desc_copy(dev, descbuf); @@ -590,21 +599,21 @@ bce_print_adapter_info(struct bce_softc BCE_PRINTF("ASIC (0x%08X); ", sc->bce_chipid); printf("Rev (%c%d); ", ((BCE_CHIP_ID(sc) & 0xf000) >> 12) + 'A', - ((BCE_CHIP_ID(sc) & 0x0ff0) >> 4)); + ((BCE_CHIP_ID(sc) & 0x0ff0) >> 4)); /* Bus info. */ if (sc->bce_flags & BCE_PCIE_FLAG) { printf("Bus (PCIe x%d, ", sc->link_width); switch (sc->link_speed) { - case 1: printf("2.5Gbps); "); break; - case 2: printf("5Gbps); "); break; - default: printf("Unknown link speed); "); + case 1: printf("2.5Gbps); "); break; + case 2: printf("5Gbps); "); break; + default: printf("Unknown link speed); "); } } else { printf("Bus (PCI%s, %s, %dMHz); ", - ((sc->bce_flags & BCE_PCIX_FLAG) ? "-X" : ""), - ((sc->bce_flags & BCE_PCI_32BIT_FLAG) ? "32-bit" : "64-bit"), - sc->bus_speed_mhz); + ((sc->bce_flags & BCE_PCIX_FLAG) ? "-X" : ""), + ((sc->bce_flags & BCE_PCI_32BIT_FLAG) ? + "32-bit" : "64-bit"), sc->bus_speed_mhz); } /* Firmware version and device features. */ @@ -612,30 +621,30 @@ bce_print_adapter_info(struct bce_softc #ifdef BCE_JUMBO_HDRSPLIT printf("SPLT"); - i++; + i++; #endif - if (sc->bce_flags & BCE_USING_MSI_FLAG) { - if (i > 0) printf("|"); + if (sc->bce_flags & BCE_USING_MSI_FLAG) { + if (i > 0) printf("|"); printf("MSI"); i++; - } + } - if (sc->bce_flags & BCE_USING_MSIX_FLAG) { - if (i > 0) printf("|"); + if (sc->bce_flags & BCE_USING_MSIX_FLAG) { + if (i > 0) printf("|"); printf("MSI-X"); i++; - } + } - if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) { - if (i > 0) printf("|"); + if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) { + if (i > 0) printf("|"); printf("2.5G"); i++; - } + } - if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) { - if (i > 0) printf("|"); - printf("MFW); MFW (%s)\n", sc->bce_mfw_ver); - } else { - printf(")\n"); - } + if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) { + if (i > 0) printf("|"); + printf("MFW); MFW (%s)\n", sc->bce_mfw_ver); + } else { + printf(")\n"); + } DBEXIT(BCE_VERBOSE_LOAD); } @@ -667,8 +676,8 @@ bce_probe_pci_caps(device_t dev, struct if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) { if (reg != 0) { u16 link_status = pci_read_config(dev, reg + 0x12, 2); - DBPRINT(sc, BCE_INFO_LOAD, "PCIe link_status = 0x%08X\n", - link_status); + DBPRINT(sc, BCE_INFO_LOAD, "PCIe link_status = " + "0x%08X\n", link_status); sc->link_speed = link_status & 0xf; sc->link_width = (link_status >> 4) & 0x3f; sc->bce_cap_flags |= BCE_PCIE_CAPABLE_FLAG; @@ -730,7 +739,7 @@ bce_attach(device_t dev) if (sc->bce_res_mem == NULL) { BCE_PRINTF("%s(%d): PCI memory allocation failed\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; } @@ -801,14 +810,14 @@ bce_attach(device_t dev) } sc->bce_res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, - &rid, RF_SHAREABLE | RF_ACTIVE); + &rid, RF_SHAREABLE | RF_ACTIVE); sc->bce_irq_rid = rid; /* Report any IRQ allocation errors. */ if (sc->bce_res_irq == NULL) { BCE_PRINTF("%s(%d): PCI map interrupt failed!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; } @@ -823,28 +832,28 @@ bce_attach(device_t dev) * valid until this is done. */ pci_write_config(dev, BCE_PCICFG_MISC_CONFIG, - BCE_PCICFG_MISC_CONFIG_REG_WINDOW_ENA | - BCE_PCICFG_MISC_CONFIG_TARGET_MB_WORD_SWAP, 4); + BCE_PCICFG_MISC_CONFIG_REG_WINDOW_ENA | + BCE_PCICFG_MISC_CONFIG_TARGET_MB_WORD_SWAP, 4); /* Save ASIC revsion info. */ sc->bce_chipid = REG_RD(sc, BCE_MISC_ID); /* Weed out any non-production controller revisions. */ switch(BCE_CHIP_ID(sc)) { - case BCE_CHIP_ID_5706_A0: - case BCE_CHIP_ID_5706_A1: - case BCE_CHIP_ID_5708_A0: - case BCE_CHIP_ID_5708_B0: - case BCE_CHIP_ID_5709_A0: - case BCE_CHIP_ID_5709_B0: - case BCE_CHIP_ID_5709_B1: - case BCE_CHIP_ID_5709_B2: - BCE_PRINTF("%s(%d): Unsupported controller revision (%c%d)!\n", - __FILE__, __LINE__, - (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), - (pci_read_config(dev, PCIR_REVID, 4) & 0xf)); - rc = ENODEV; - goto bce_attach_fail; + case BCE_CHIP_ID_5706_A0: + case BCE_CHIP_ID_5706_A1: + case BCE_CHIP_ID_5708_A0: + case BCE_CHIP_ID_5708_B0: + case BCE_CHIP_ID_5709_A0: + case BCE_CHIP_ID_5709_B0: + case BCE_CHIP_ID_5709_B1: + case BCE_CHIP_ID_5709_B2: + BCE_PRINTF("%s(%d): Unsupported controller revision (%c%d)!\n", + __FILE__, __LINE__, + (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), + (pci_read_config(dev, PCIR_REVID, 4) & 0xf)); + rc = ENODEV; + goto bce_attach_fail; } /* @@ -866,58 +875,67 @@ bce_attach(device_t dev) if ((val & BCE_SHM_HDR_SIGNATURE_SIG_MASK) == BCE_SHM_HDR_SIGNATURE_SIG) /* Multi-port devices use different offsets in shared memory. */ sc->bce_shmem_base = REG_RD_IND(sc, BCE_SHM_HDR_ADDR_0 + - (pci_get_function(sc->bce_dev) << 2)); + (pci_get_function(sc->bce_dev) << 2)); else sc->bce_shmem_base = HOST_VIEW_SHMEM_BASE; DBPRINT(sc, BCE_VERBOSE_FIRMWARE, "%s(): bce_shmem_base = 0x%08X\n", - __FUNCTION__, sc->bce_shmem_base); + __FUNCTION__, sc->bce_shmem_base); /* Fetch the bootcode revision. */ - val = bce_shmem_rd(sc, BCE_DEV_INFO_BC_REV); - for (int i = 0, j = 0; i < 3; i++) { - u8 num; - - num = (u8) (val >> (24 - (i * 8))); - for (int k = 100, skip0 = 1; k >= 1; num %= k, k /= 10) { - if (num >= k || !skip0 || k == 1) { - sc->bce_bc_ver[j++] = (num / k) + '0'; - skip0 = 0; - } - } - if (i != 2) - sc->bce_bc_ver[j++] = '.'; - } - - /* Check if any management firwmare is running. */ - val = bce_shmem_rd(sc, BCE_PORT_FEATURE); - if (val & BCE_PORT_FEATURE_ASF_ENABLED) { - sc->bce_flags |= BCE_MFW_ENABLE_FLAG; - - /* Allow time for firmware to enter the running state. */ - for (int i = 0; i < 30; i++) { - val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); - if (val & BCE_CONDITION_MFW_RUN_MASK) - break; - DELAY(10000); - } - } - - /* Check the current bootcode state. */ - val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); - val &= BCE_CONDITION_MFW_RUN_MASK; - if (val != BCE_CONDITION_MFW_RUN_UNKNOWN && - val != BCE_CONDITION_MFW_RUN_NONE) { - u32 addr = bce_shmem_rd(sc, BCE_MFW_VER_PTR); - int i = 0; - - for (int j = 0; j < 3; j++) { - val = bce_reg_rd_ind(sc, addr + j * 4); - val = bswap32(val); - memcpy(&sc->bce_mfw_ver[i], &val, 4); - i += 4; - } - } + val = bce_shmem_rd(sc, BCE_DEV_INFO_BC_REV); + for (int i = 0, j = 0; i < 3; i++) { + u8 num; + + num = (u8) (val >> (24 - (i * 8))); + for (int k = 100, skip0 = 1; k >= 1; num %= k, k /= 10) { + if (num >= k || !skip0 || k == 1) { + sc->bce_bc_ver[j++] = (num / k) + '0'; + skip0 = 0; + } + } + + if (i != 2) + sc->bce_bc_ver[j++] = '.'; + } + + /* Check if any management firwmare is enabled. */ + val = bce_shmem_rd(sc, BCE_PORT_FEATURE); + if (val & BCE_PORT_FEATURE_ASF_ENABLED) { + sc->bce_flags |= BCE_MFW_ENABLE_FLAG; + + /* Allow time for firmware to enter the running state. */ + for (int i = 0; i < 30; i++) { + val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); + if (val & BCE_CONDITION_MFW_RUN_MASK) + break; + DELAY(10000); + } + + /* Check if management firmware is running. */ + val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); + val &= BCE_CONDITION_MFW_RUN_MASK; + if ((val != BCE_CONDITION_MFW_RUN_UNKNOWN) && + (val != BCE_CONDITION_MFW_RUN_NONE)) { + u32 addr = bce_shmem_rd(sc, BCE_MFW_VER_PTR); + int i = 0; + + /* Read the management firmware version string. */ + for (int j = 0; j < 3; j++) { + val = bce_reg_rd_ind(sc, addr + j * 4); + val = bswap32(val); + memcpy(&sc->bce_mfw_ver[i], &val, 4); + i += 4; + } + } else { + /* May cause firmware synchronization timeouts. */ + BCE_PRINTF("%s(%d): Management firmware enabled " + "but not running!\n", __FILE__, __LINE__); + strcpy(sc->bce_mfw_ver, "NOT RUNNING!"); + + /* ToDo: Any action the driver should take? */ + } + } /* Get PCI bus information (speed and type). */ val = REG_RD(sc, BCE_PCICFG_MISC_STATUS); @@ -964,10 +982,10 @@ bce_attach(device_t dev) if (val & BCE_PCICFG_MISC_STATUS_32BIT_DET) sc->bce_flags |= BCE_PCI_32BIT_FLAG; - /* Reset the controller and announce to bootcode that driver is present. */ + /* Reset controller and announce to bootcode that driver is present. */ if (bce_reset(sc, BCE_DRV_MSG_CODE_RESET)) { BCE_PRINTF("%s(%d): Controller reset failed!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; } @@ -975,7 +993,7 @@ bce_attach(device_t dev) /* Initialize the controller. */ if (bce_chipinit(sc)) { BCE_PRINTF("%s(%d): Controller initialization failed!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; } @@ -983,7 +1001,7 @@ bce_attach(device_t dev) /* Perform NVRAM test. */ if (bce_nvram_test(sc)) { BCE_PRINTF("%s(%d): NVRAM test failed!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; } @@ -1024,6 +1042,14 @@ bce_attach(device_t dev) sc->bce_rx_ticks = 18; #endif + /* Not used for L2. */ + sc->bce_comp_prod_trip_int = 0; + sc->bce_comp_prod_trip = 0; + sc->bce_com_ticks_int = 0; + sc->bce_com_ticks = 0; + sc->bce_cmd_ticks_int = 0; + sc->bce_cmd_ticks = 0; + /* Update statistics once every second. */ sc->bce_stats_ticks = 1000000 & 0xffff00; @@ -1507,7 +1533,8 @@ bce_miibus_read_reg(device_t dev, int ph /* Make sure we are accessing the correct PHY address. */ if (phy != sc->bce_phy_addr) { - DBPRINT(sc, BCE_INSANE_PHY, "Invalid PHY address %d for PHY read!\n", phy); + DBPRINT(sc, BCE_INSANE_PHY, "Invalid PHY address %d " + "for PHY read!\n", phy); return(0); } @@ -1533,8 +1560,8 @@ bce_miibus_read_reg(device_t dev, int ph val = BCE_MIPHY(phy) | BCE_MIREG(reg) | - BCE_EMAC_MDIO_COMM_COMMAND_READ | BCE_EMAC_MDIO_COMM_DISEXT | - BCE_EMAC_MDIO_COMM_START_BUSY; + BCE_EMAC_MDIO_COMM_COMMAND_READ | BCE_EMAC_MDIO_COMM_DISEXT | + BCE_EMAC_MDIO_COMM_START_BUSY; REG_WR(sc, BCE_EMAC_MDIO_COMM, val); for (i = 0; i < BCE_PHY_TIMEOUT; i++) { @@ -1552,8 +1579,8 @@ bce_miibus_read_reg(device_t dev, int ph } if (val & BCE_EMAC_MDIO_COMM_START_BUSY) { - BCE_PRINTF("%s(%d): Error: PHY read timeout! phy = %d, reg = 0x%04X\n", - __FILE__, __LINE__, phy, reg); + BCE_PRINTF("%s(%d): Error: PHY read timeout! phy = %d, " + "reg = 0x%04X\n", __FILE__, __LINE__, phy, reg); val = 0x0; } else { val = REG_RD(sc, BCE_EMAC_MDIO_COMM); @@ -1595,17 +1622,18 @@ bce_miibus_write_reg(device_t dev, int p /* Make sure we are accessing the correct PHY address. */ if (phy != sc->bce_phy_addr) { - DBPRINT(sc, BCE_INSANE_PHY, "Invalid PHY address %d for PHY write!\n", phy); + DBPRINT(sc, BCE_INSANE_PHY, "Invalid PHY address %d " + "for PHY write!\n", phy); return(0); } DB_PRINT_PHY_REG(reg, val); - /* - * The 5709S PHY is an IEEE Clause 45 PHY - * with special mappings to work with IEEE - * Clause 22 register accesses. - */ + /* + * The 5709S PHY is an IEEE Clause 45 PHY + * with special mappings to work with IEEE + * Clause 22 register accesses. + */ if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) { if (reg >= MII_BMCR && reg <= MII_ANLPRNP) reg += 0x10; @@ -1622,8 +1650,8 @@ bce_miibus_write_reg(device_t dev, int p } val1 = BCE_MIPHY(phy) | BCE_MIREG(reg) | val | - BCE_EMAC_MDIO_COMM_COMMAND_WRITE | - BCE_EMAC_MDIO_COMM_START_BUSY | BCE_EMAC_MDIO_COMM_DISEXT; + BCE_EMAC_MDIO_COMM_COMMAND_WRITE | + BCE_EMAC_MDIO_COMM_START_BUSY | BCE_EMAC_MDIO_COMM_DISEXT; REG_WR(sc, BCE_EMAC_MDIO_COMM, val1); for (i = 0; i < BCE_PHY_TIMEOUT; i++) { @@ -1638,7 +1666,7 @@ bce_miibus_write_reg(device_t dev, int p if (val1 & BCE_EMAC_MDIO_COMM_START_BUSY) BCE_PRINTF("%s(%d): PHY write timeout!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) { val1 = REG_RD(sc, BCE_EMAC_MDIO_MODE); @@ -2653,18 +2681,22 @@ bce_get_media(struct bce_softc *sc) * for Copper or SerDes operation. */ if (bond_id == BCE_MISC_DUAL_MEDIA_CTRL_BOND_ID_C) { - DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded for copper.\n"); + DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded " + "for copper.\n"); goto bce_get_media_exit; } else if (bond_id == BCE_MISC_DUAL_MEDIA_CTRL_BOND_ID_S) { - DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded for dual media.\n"); + DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded " + "for dual media.\n"); sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; goto bce_get_media_exit; } if (val & BCE_MISC_DUAL_MEDIA_CTRL_STRAP_OVERRIDE) - strap = (val & BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL) >> 21; + strap = (val & + BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL) >> 21; else - strap = (val & BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL_STRAP) >> 8; + strap = (val & + BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL_STRAP) >> 8; if (pci_get_function(sc->bce_dev) == 0) { switch (strap) { @@ -2672,13 +2704,13 @@ bce_get_media(struct bce_softc *sc) case 0x5: case 0x6: DBPRINT(sc, BCE_INFO_LOAD, - "BCM5709 s/w configured for SerDes.\n"); + "BCM5709 s/w configured for SerDes.\n"); sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; - break; + break; default: DBPRINT(sc, BCE_INFO_LOAD, - "BCM5709 s/w configured for Copper.\n"); - break; + "BCM5709 s/w configured for Copper.\n"); + break; } } else { switch (strap) { @@ -2686,13 +2718,13 @@ bce_get_media(struct bce_softc *sc) case 0x2: case 0x4: DBPRINT(sc, BCE_INFO_LOAD, - "BCM5709 s/w configured for SerDes.\n"); + "BCM5709 s/w configured for SerDes.\n"); sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; - break; + break; default: DBPRINT(sc, BCE_INFO_LOAD, - "BCM5709 s/w configured for Copper.\n"); - break; + "BCM5709 s/w configured for Copper.\n"); + break; } } @@ -2703,21 +2735,23 @@ bce_get_media(struct bce_softc *sc) sc->bce_flags |= BCE_NO_WOL_FLAG; - /* 5708S, 5709S, and 5716S use a separate PHY for SerDes. */ - if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) - sc->bce_phy_addr = 2; - - if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) sc->bce_phy_flags |= BCE_PHY_IEEE_CLAUSE_45_FLAG; + if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { + /* 5708S/09S/16S use a separate PHY for SerDes. */ + sc->bce_phy_addr = 2; + val = bce_shmem_rd(sc, BCE_SHARED_HW_CFG_CONFIG); if (val & BCE_SHARED_HW_CFG_PHY_2_5G) { - sc->bce_phy_flags |= BCE_PHY_2_5G_CAPABLE_FLAG; - DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb capable adapter\n"); + sc->bce_phy_flags |= + BCE_PHY_2_5G_CAPABLE_FLAG; + DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb " + "capable adapter\n"); } - } + } } else if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5706) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5708)) + (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5708)) sc->bce_phy_flags |= BCE_PHY_CRC_FIX_FLAG; bce_get_media_exit: @@ -2746,13 +2780,13 @@ bce_init_media(struct bce_softc *sc) * is done in mii layer. */ - /* Select auto-negotiation MMD of the PHY. */ - bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, + /* Select auto-negotiation MMD of the PHY. */ + bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_ADDR_EXT); bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, BRGPHY_ADDR_EXT, BRGPHY_ADDR_EXT_AN_MMD); - /* Select IEEE0 block of AN MMD (assumed in all brgphy(4) code). */ + /* Set IEEE0 block of AN MMD (assumed in brgphy(4) code). */ bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_COMBO_IEEE0); } @@ -2778,7 +2812,7 @@ bce_dma_free(struct bce_softc *sc) /* Free, unmap, and destroy the status block. */ if (sc->status_block != NULL) { bus_dmamem_free( - sc->status_tag, + sc->status_tag, sc->status_block, sc->status_map); sc->status_block = NULL; @@ -2786,7 +2820,7 @@ bce_dma_free(struct bce_softc *sc) if (sc->status_map != NULL) { bus_dmamap_unload( - sc->status_tag, + sc->status_tag, sc->status_map); bus_dmamap_destroy(sc->status_tag, sc->status_map); @@ -2802,7 +2836,7 @@ bce_dma_free(struct bce_softc *sc) /* Free, unmap, and destroy the statistics block. */ if (sc->stats_block != NULL) { bus_dmamem_free( - sc->stats_tag, + sc->stats_tag, sc->stats_block, sc->stats_map); sc->stats_block = NULL; @@ -2810,7 +2844,7 @@ bce_dma_free(struct bce_softc *sc) if (sc->stats_map != NULL) { bus_dmamap_unload( - sc->stats_tag, + sc->stats_tag, sc->stats_map); bus_dmamap_destroy(sc->stats_tag, sc->stats_map); @@ -2829,7 +2863,7 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < sc->ctx_pages; i++ ) { if (sc->ctx_block[i] != NULL) { bus_dmamem_free( - sc->ctx_tag, + sc->ctx_tag, sc->ctx_block[i], sc->ctx_map[i]); sc->ctx_block[i] = NULL; @@ -2837,10 +2871,10 @@ bce_dma_free(struct bce_softc *sc) if (sc->ctx_map[i] != NULL) { bus_dmamap_unload( - sc->ctx_tag, - sc->ctx_map[i]); + sc->ctx_tag, + sc->ctx_map[i]); bus_dmamap_destroy( - sc->ctx_tag, + sc->ctx_tag, sc->ctx_map[i]); sc->ctx_map[i] = NULL; } @@ -2858,7 +2892,7 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < TX_PAGES; i++ ) { if (sc->tx_bd_chain[i] != NULL) { bus_dmamem_free( - sc->tx_bd_chain_tag, + sc->tx_bd_chain_tag, sc->tx_bd_chain[i], sc->tx_bd_chain_map[i]); sc->tx_bd_chain[i] = NULL; @@ -2866,10 +2900,10 @@ bce_dma_free(struct bce_softc *sc) if (sc->tx_bd_chain_map[i] != NULL) { bus_dmamap_unload( - sc->tx_bd_chain_tag, - sc->tx_bd_chain_map[i]); + sc->tx_bd_chain_tag, + sc->tx_bd_chain_map[i]); bus_dmamap_destroy( - sc->tx_bd_chain_tag, + sc->tx_bd_chain_tag, sc->tx_bd_chain_map[i]); sc->tx_bd_chain_map[i] = NULL; } @@ -2886,7 +2920,7 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < RX_PAGES; i++ ) { if (sc->rx_bd_chain[i] != NULL) { bus_dmamem_free( - sc->rx_bd_chain_tag, + sc->rx_bd_chain_tag, sc->rx_bd_chain[i], sc->rx_bd_chain_map[i]); sc->rx_bd_chain[i] = NULL; @@ -2894,10 +2928,10 @@ bce_dma_free(struct bce_softc *sc) if (sc->rx_bd_chain_map[i] != NULL) { bus_dmamap_unload( - sc->rx_bd_chain_tag, - sc->rx_bd_chain_map[i]); + sc->rx_bd_chain_tag, + sc->rx_bd_chain_map[i]); bus_dmamap_destroy( - sc->rx_bd_chain_tag, + sc->rx_bd_chain_tag, sc->rx_bd_chain_map[i]); sc->rx_bd_chain_map[i] = NULL; } @@ -2915,7 +2949,7 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < PG_PAGES; i++ ) { if (sc->pg_bd_chain[i] != NULL) { bus_dmamem_free( - sc->pg_bd_chain_tag, + sc->pg_bd_chain_tag, sc->pg_bd_chain[i], sc->pg_bd_chain_map[i]); sc->pg_bd_chain[i] = NULL; @@ -2923,10 +2957,10 @@ bce_dma_free(struct bce_softc *sc) if (sc->pg_bd_chain_map[i] != NULL) { bus_dmamap_unload( - sc->pg_bd_chain_tag, - sc->pg_bd_chain_map[i]); + sc->pg_bd_chain_tag, + sc->pg_bd_chain_map[i]); bus_dmamap_destroy( - sc->pg_bd_chain_tag, + sc->pg_bd_chain_tag, sc->pg_bd_chain_map[i]); sc->pg_bd_chain_map[i] = NULL; } @@ -2944,9 +2978,9 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < TOTAL_TX_BD; i++) { if (sc->tx_mbuf_map[i] != NULL) { bus_dmamap_unload(sc->tx_mbuf_tag, - sc->tx_mbuf_map[i]); + sc->tx_mbuf_map[i]); bus_dmamap_destroy(sc->tx_mbuf_tag, - sc->tx_mbuf_map[i]); + sc->tx_mbuf_map[i]); sc->tx_mbuf_map[i] = NULL; } } @@ -2961,9 +2995,9 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < TOTAL_RX_BD; i++) { if (sc->rx_mbuf_map[i] != NULL) { bus_dmamap_unload(sc->rx_mbuf_tag, - sc->rx_mbuf_map[i]); + sc->rx_mbuf_map[i]); bus_dmamap_destroy(sc->rx_mbuf_tag, - sc->rx_mbuf_map[i]); + sc->rx_mbuf_map[i]); sc->rx_mbuf_map[i] = NULL; } } @@ -2979,9 +3013,9 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < TOTAL_PG_BD; i++) { if (sc->pg_mbuf_map[i] != NULL) { bus_dmamap_unload(sc->pg_mbuf_tag, - sc->pg_mbuf_map[i]); + sc->pg_mbuf_map[i]); bus_dmamap_destroy(sc->pg_mbuf_tag, - sc->pg_mbuf_map[i]); + sc->pg_mbuf_map[i]); sc->pg_mbuf_map[i] = NULL; } } @@ -3074,20 +3108,12 @@ bce_dma_alloc(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - if (bus_dma_tag_create(NULL, - 1, - BCE_DMA_BOUNDARY, - sc->max_bus_addr, - BUS_SPACE_MAXADDR, - NULL, NULL, - MAXBSIZE, - BUS_SPACE_UNRESTRICTED, - BUS_SPACE_MAXSIZE_32BIT, - 0, - NULL, NULL, - &sc->parent_tag)) { + if (bus_dma_tag_create(NULL, 1, BCE_DMA_BOUNDARY, + sc->max_bus_addr, BUS_SPACE_MAXADDR, NULL, NULL, + MAXBSIZE, BUS_SPACE_UNRESTRICTED, BUS_SPACE_MAXSIZE_32BIT, + 0, NULL, NULL, &sc->parent_tag)) { BCE_PRINTF("%s(%d): Could not allocate parent DMA tag!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENOMEM; goto bce_dma_alloc_exit; } @@ -3097,117 +3123,89 @@ bce_dma_alloc(device_t dev) * memory, map the memory into DMA space, and fetch the physical * address of the block. */ - if (bus_dma_tag_create(sc->parent_tag, - BCE_DMA_ALIGN, - BCE_DMA_BOUNDARY, - sc->max_bus_addr, - BUS_SPACE_MAXADDR, - NULL, NULL, - BCE_STATUS_BLK_SZ, - 1, - BCE_STATUS_BLK_SZ, - 0, - NULL, NULL, - &sc->status_tag)) { - BCE_PRINTF("%s(%d): Could not allocate status block DMA tag!\n", - __FILE__, __LINE__); + if (bus_dma_tag_create(sc->parent_tag, BCE_DMA_ALIGN, + BCE_DMA_BOUNDARY, sc->max_bus_addr, BUS_SPACE_MAXADDR, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Apr 15 19:31:21 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C2F11065672; Thu, 15 Apr 2010 19:31:21 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 594CF8FC29; Thu, 15 Apr 2010 19:31:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3FJVLgH096539; Thu, 15 Apr 2010 19:31:21 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FJVLgF096536; Thu, 15 Apr 2010 19:31:21 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004151931.o3FJVLgF096536@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 15 Apr 2010 19:31:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206683 - stable/7/sys/dev/bce X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 19:31:21 -0000 Author: yongari Date: Thu Apr 15 19:31:21 2010 New Revision: 206683 URL: http://svn.freebsd.org/changeset/base/206683 Log: MFC r206268 - Fixed 5708S 2.5G support broken in last commit. - Added some new debug helper routines to systcl. - Fixed many of the style(9) violations that have crept into the code due to my use of a "smart" editor. Modified: stable/7/sys/dev/bce/if_bce.c stable/7/sys/dev/bce/if_bcereg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/bce/if_bce.c ============================================================================== --- stable/7/sys/dev/bce/if_bce.c Thu Apr 15 19:29:56 2010 (r206682) +++ stable/7/sys/dev/bce/if_bce.c Thu Apr 15 19:31:21 2010 (r206683) @@ -39,8 +39,8 @@ __FBSDID("$FreeBSD$"); * BCM5708S B1, B2 * BCM5709C A1, C0 * BCM5709S A1, C0 - * BCM5716C C0 - * BCM5716S C0 + * BCM5716C C0 + * BCM5716S C0 * * The following controllers are not supported by this driver: * BCM5706C A0, A1 (pre-production) @@ -277,37 +277,41 @@ static struct flash_spec flash_5709 = { /****************************************************************************/ /* FreeBSD device entry points. */ /****************************************************************************/ -static int bce_probe (device_t); -static int bce_attach (device_t); -static int bce_detach (device_t); -static int bce_shutdown (device_t); +static int bce_probe (device_t); +static int bce_attach (device_t); +static int bce_detach (device_t); +static int bce_shutdown (device_t); /****************************************************************************/ /* BCE Debug Data Structure Dump Routines */ /****************************************************************************/ #ifdef BCE_DEBUG -static u32 bce_reg_rd (struct bce_softc *, u32); -static void bce_reg_wr (struct bce_softc *, u32, u32); -static void bce_reg_wr16 (struct bce_softc *, u32, u16); -static u32 bce_ctx_rd (struct bce_softc *, u32, u32); -static void bce_dump_enet (struct bce_softc *, struct mbuf *); -static void bce_dump_mbuf (struct bce_softc *, struct mbuf *); +static u32 bce_reg_rd (struct bce_softc *, u32); +static void bce_reg_wr (struct bce_softc *, u32, u32); +static void bce_reg_wr16 (struct bce_softc *, u32, u16); +static u32 bce_ctx_rd (struct bce_softc *, u32, u32); +static void bce_dump_enet (struct bce_softc *, struct mbuf *); +static void bce_dump_mbuf (struct bce_softc *, struct mbuf *); static void bce_dump_tx_mbuf_chain (struct bce_softc *, u16, int); static void bce_dump_rx_mbuf_chain (struct bce_softc *, u16, int); #ifdef BCE_JUMBO_HDRSPLIT static void bce_dump_pg_mbuf_chain (struct bce_softc *, u16, int); #endif -static void bce_dump_txbd (struct bce_softc *, int, struct tx_bd *); -static void bce_dump_rxbd (struct bce_softc *, int, struct rx_bd *); +static void bce_dump_txbd (struct bce_softc *, + int, struct tx_bd *); +static void bce_dump_rxbd (struct bce_softc *, + int, struct rx_bd *); #ifdef BCE_JUMBO_HDRSPLIT -static void bce_dump_pgbd (struct bce_softc *, int, struct rx_bd *); +static void bce_dump_pgbd (struct bce_softc *, + int, struct rx_bd *); #endif -static void bce_dump_l2fhdr (struct bce_softc *, int, struct l2_fhdr *); -static void bce_dump_ctx (struct bce_softc *, u16); -static void bce_dump_ftqs (struct bce_softc *); +static void bce_dump_l2fhdr (struct bce_softc *, + int, struct l2_fhdr *); +static void bce_dump_ctx (struct bce_softc *, u16); +static void bce_dump_ftqs (struct bce_softc *); static void bce_dump_tx_chain (struct bce_softc *, u16, int); -static void bce_dump_rx_chain (struct bce_softc *, u16, int); +static void bce_dump_rx_bd_chain (struct bce_softc *, u16, int); #ifdef BCE_JUMBO_HDRSPLIT static void bce_dump_pg_chain (struct bce_softc *, u16, int); #endif @@ -315,7 +319,7 @@ static void bce_dump_status_block (struc static void bce_dump_stats_block (struct bce_softc *); static void bce_dump_driver_state (struct bce_softc *); static void bce_dump_hw_state (struct bce_softc *); -static void bce_dump_mq_regs (struct bce_softc *); +static void bce_dump_mq_regs (struct bce_softc *); static void bce_dump_bc_state (struct bce_softc *); static void bce_dump_txp_state (struct bce_softc *, int); static void bce_dump_rxp_state (struct bce_softc *, int); @@ -323,18 +327,18 @@ static void bce_dump_tpat_state (struct static void bce_dump_cp_state (struct bce_softc *, int); static void bce_dump_com_state (struct bce_softc *, int); static void bce_dump_rv2p_state (struct bce_softc *); -static void bce_breakpoint (struct bce_softc *); +static void bce_breakpoint (struct bce_softc *); #endif /****************************************************************************/ /* BCE Register/Memory Access Routines */ /****************************************************************************/ -static u32 bce_reg_rd_ind (struct bce_softc *, u32); -static void bce_reg_wr_ind (struct bce_softc *, u32, u32); -static void bce_shmem_wr (struct bce_softc *, u32, u32); -static u32 bce_shmem_rd (struct bce_softc *, u32); -static void bce_ctx_wr (struct bce_softc *, u32, u32, u32); +static u32 bce_reg_rd_ind (struct bce_softc *, u32); +static void bce_reg_wr_ind (struct bce_softc *, u32, u32); +static void bce_shmem_wr (struct bce_softc *, u32, u32); +static u32 bce_shmem_rd (struct bce_softc *, u32); +static void bce_ctx_wr (struct bce_softc *, u32, u32, u32); static int bce_miibus_read_reg (device_t, int, int); static int bce_miibus_write_reg (device_t, int, int, int); static void bce_miibus_statchg (device_t); @@ -346,96 +350,101 @@ static void bce_miibus_statchg (device_ static int bce_acquire_nvram_lock (struct bce_softc *); static int bce_release_nvram_lock (struct bce_softc *); static void bce_enable_nvram_access (struct bce_softc *); -static void bce_disable_nvram_access(struct bce_softc *); +static void bce_disable_nvram_access (struct bce_softc *); static int bce_nvram_read_dword (struct bce_softc *, u32, u8 *, u32); -static int bce_init_nvram (struct bce_softc *); -static int bce_nvram_read (struct bce_softc *, u32, u8 *, int); -static int bce_nvram_test (struct bce_softc *); +static int bce_init_nvram (struct bce_softc *); +static int bce_nvram_read (struct bce_softc *, u32, u8 *, int); +static int bce_nvram_test (struct bce_softc *); #ifdef BCE_NVRAM_WRITE_SUPPORT static int bce_enable_nvram_write (struct bce_softc *); static void bce_disable_nvram_write (struct bce_softc *); static int bce_nvram_erase_page (struct bce_softc *, u32); static int bce_nvram_write_dword (struct bce_softc *, u32, u8 *, u32); -static int bce_nvram_write (struct bce_softc *, u32, u8 *, int); +static int bce_nvram_write (struct bce_softc *, u32, u8 *, int); #endif /****************************************************************************/ /* */ /****************************************************************************/ -static void bce_get_media (struct bce_softc *); -static void bce_init_media (struct bce_softc *); -static void bce_dma_map_addr (void *, bus_dma_segment_t *, int, int); -static int bce_dma_alloc (device_t); -static void bce_dma_free (struct bce_softc *); +static void bce_get_media (struct bce_softc *); +static void bce_init_media (struct bce_softc *); +static void bce_dma_map_addr (void *, + bus_dma_segment_t *, int, int); +static int bce_dma_alloc (device_t); +static void bce_dma_free (struct bce_softc *); static void bce_release_resources (struct bce_softc *); /****************************************************************************/ /* BCE Firmware Synchronization and Load */ /****************************************************************************/ -static int bce_fw_sync (struct bce_softc *, u32); +static int bce_fw_sync (struct bce_softc *, u32); static void bce_load_rv2p_fw (struct bce_softc *, u32 *, u32, u32); -static void bce_load_cpu_fw (struct bce_softc *, struct cpu_reg *, struct fw_info *); -static void bce_start_cpu (struct bce_softc *, struct cpu_reg *); -static void bce_halt_cpu (struct bce_softc *, struct cpu_reg *); -static void bce_start_rxp_cpu (struct bce_softc *); +static void bce_load_cpu_fw (struct bce_softc *, + struct cpu_reg *, struct fw_info *); +static void bce_start_cpu (struct bce_softc *, struct cpu_reg *); +static void bce_halt_cpu (struct bce_softc *, struct cpu_reg *); +static void bce_start_rxp_cpu (struct bce_softc *); static void bce_init_rxp_cpu (struct bce_softc *); static void bce_init_txp_cpu (struct bce_softc *); static void bce_init_tpat_cpu (struct bce_softc *); -static void bce_init_cp_cpu (struct bce_softc *); +static void bce_init_cp_cpu (struct bce_softc *); static void bce_init_com_cpu (struct bce_softc *); -static void bce_init_cpus (struct bce_softc *); +static void bce_init_cpus (struct bce_softc *); static void bce_print_adapter_info (struct bce_softc *); static void bce_probe_pci_caps (device_t, struct bce_softc *); -static void bce_stop (struct bce_softc *); -static int bce_reset (struct bce_softc *, u32); -static int bce_chipinit (struct bce_softc *); -static int bce_blockinit (struct bce_softc *); +static void bce_stop (struct bce_softc *); +static int bce_reset (struct bce_softc *, u32); +static int bce_chipinit (struct bce_softc *); +static int bce_blockinit (struct bce_softc *); static int bce_init_tx_chain (struct bce_softc *); static void bce_free_tx_chain (struct bce_softc *); -static int bce_get_rx_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *, u32 *); +static int bce_get_rx_buf (struct bce_softc *, + struct mbuf *, u16 *, u16 *, u32 *); static int bce_init_rx_chain (struct bce_softc *); static void bce_fill_rx_chain (struct bce_softc *); static void bce_free_rx_chain (struct bce_softc *); #ifdef BCE_JUMBO_HDRSPLIT -static int bce_get_pg_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *); +static int bce_get_pg_buf (struct bce_softc *, + struct mbuf *, u16 *, u16 *); static int bce_init_pg_chain (struct bce_softc *); static void bce_fill_pg_chain (struct bce_softc *); static void bce_free_pg_chain (struct bce_softc *); #endif -static struct mbuf *bce_tso_setup (struct bce_softc *, struct mbuf **, u16 *); -static int bce_tx_encap (struct bce_softc *, struct mbuf **); +static struct mbuf *bce_tso_setup (struct bce_softc *, + struct mbuf **, u16 *); +static int bce_tx_encap (struct bce_softc *, struct mbuf **); static void bce_start_locked (struct ifnet *); -static void bce_start (struct ifnet *); -static int bce_ioctl (struct ifnet *, u_long, caddr_t); -static void bce_watchdog (struct bce_softc *); -static int bce_ifmedia_upd (struct ifnet *); +static void bce_start (struct ifnet *); +static int bce_ioctl (struct ifnet *, u_long, caddr_t); +static void bce_watchdog (struct bce_softc *); +static int bce_ifmedia_upd (struct ifnet *); static void bce_ifmedia_upd_locked (struct ifnet *); -static void bce_ifmedia_sts (struct ifnet *, struct ifmediareq *); -static void bce_init_locked (struct bce_softc *); -static void bce_init (void *); +static void bce_ifmedia_sts (struct ifnet *, struct ifmediareq *); +static void bce_init_locked (struct bce_softc *); +static void bce_init (void *); static void bce_mgmt_init_locked (struct bce_softc *sc); -static void bce_init_ctx (struct bce_softc *); +static void bce_init_ctx (struct bce_softc *); static void bce_get_mac_addr (struct bce_softc *); static void bce_set_mac_addr (struct bce_softc *); -static void bce_phy_intr (struct bce_softc *); -static inline u16 bce_get_hw_rx_cons(struct bce_softc *); -static void bce_rx_intr (struct bce_softc *); -static void bce_tx_intr (struct bce_softc *); +static void bce_phy_intr (struct bce_softc *); +static inline u16 bce_get_hw_rx_cons (struct bce_softc *); +static void bce_rx_intr (struct bce_softc *); +static void bce_tx_intr (struct bce_softc *); static void bce_disable_intr (struct bce_softc *); -static void bce_enable_intr (struct bce_softc *, int); +static void bce_enable_intr (struct bce_softc *, int); -static void bce_intr (void *); -static void bce_set_rx_mode (struct bce_softc *); +static void bce_intr (void *); +static void bce_set_rx_mode (struct bce_softc *); static void bce_stats_update (struct bce_softc *); -static void bce_tick (void *); -static void bce_pulse (void *); -static void bce_add_sysctls (struct bce_softc *); +static void bce_tick (void *); +static void bce_pulse (void *); +static void bce_add_sysctls (struct bce_softc *); /****************************************************************************/ @@ -540,15 +549,15 @@ bce_probe(device_t dev) sdid = pci_get_subdevice(dev); DBPRINT(sc, BCE_EXTREME_LOAD, - "%s(); VID = 0x%04X, DID = 0x%04X, SVID = 0x%04X, " - "SDID = 0x%04X\n", __FUNCTION__, vid, did, svid, sdid); + "%s(); VID = 0x%04X, DID = 0x%04X, SVID = 0x%04X, " + "SDID = 0x%04X\n", __FUNCTION__, vid, did, svid, sdid); /* Look through the list of known devices for a match. */ while(t->bce_name != NULL) { if ((vid == t->bce_vid) && (did == t->bce_did) && - ((svid == t->bce_svid) || (t->bce_svid == PCI_ANY_ID)) && - ((sdid == t->bce_sdid) || (t->bce_sdid == PCI_ANY_ID))) { + ((svid == t->bce_svid) || (t->bce_svid == PCI_ANY_ID)) && + ((sdid == t->bce_sdid) || (t->bce_sdid == PCI_ANY_ID))) { descbuf = malloc(BCE_DEVDESC_MAX, M_TEMP, M_NOWAIT); @@ -557,8 +566,8 @@ bce_probe(device_t dev) /* Print out the device identity. */ snprintf(descbuf, BCE_DEVDESC_MAX, "%s (%c%d)", - t->bce_name, - (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), + t->bce_name, (((pci_read_config(dev, + PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), (pci_read_config(dev, PCIR_REVID, 4) & 0xf)); device_set_desc_copy(dev, descbuf); @@ -590,21 +599,21 @@ bce_print_adapter_info(struct bce_softc BCE_PRINTF("ASIC (0x%08X); ", sc->bce_chipid); printf("Rev (%c%d); ", ((BCE_CHIP_ID(sc) & 0xf000) >> 12) + 'A', - ((BCE_CHIP_ID(sc) & 0x0ff0) >> 4)); + ((BCE_CHIP_ID(sc) & 0x0ff0) >> 4)); /* Bus info. */ if (sc->bce_flags & BCE_PCIE_FLAG) { printf("Bus (PCIe x%d, ", sc->link_width); switch (sc->link_speed) { - case 1: printf("2.5Gbps); "); break; - case 2: printf("5Gbps); "); break; - default: printf("Unknown link speed); "); + case 1: printf("2.5Gbps); "); break; + case 2: printf("5Gbps); "); break; + default: printf("Unknown link speed); "); } } else { printf("Bus (PCI%s, %s, %dMHz); ", - ((sc->bce_flags & BCE_PCIX_FLAG) ? "-X" : ""), - ((sc->bce_flags & BCE_PCI_32BIT_FLAG) ? "32-bit" : "64-bit"), - sc->bus_speed_mhz); + ((sc->bce_flags & BCE_PCIX_FLAG) ? "-X" : ""), + ((sc->bce_flags & BCE_PCI_32BIT_FLAG) ? + "32-bit" : "64-bit"), sc->bus_speed_mhz); } /* Firmware version and device features. */ @@ -612,30 +621,30 @@ bce_print_adapter_info(struct bce_softc #ifdef BCE_JUMBO_HDRSPLIT printf("SPLT"); - i++; + i++; #endif - if (sc->bce_flags & BCE_USING_MSI_FLAG) { - if (i > 0) printf("|"); + if (sc->bce_flags & BCE_USING_MSI_FLAG) { + if (i > 0) printf("|"); printf("MSI"); i++; - } + } - if (sc->bce_flags & BCE_USING_MSIX_FLAG) { - if (i > 0) printf("|"); + if (sc->bce_flags & BCE_USING_MSIX_FLAG) { + if (i > 0) printf("|"); printf("MSI-X"); i++; - } + } - if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) { - if (i > 0) printf("|"); + if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) { + if (i > 0) printf("|"); printf("2.5G"); i++; - } + } - if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) { - if (i > 0) printf("|"); - printf("MFW); MFW (%s)\n", sc->bce_mfw_ver); - } else { - printf(")\n"); - } + if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) { + if (i > 0) printf("|"); + printf("MFW); MFW (%s)\n", sc->bce_mfw_ver); + } else { + printf(")\n"); + } DBEXIT(BCE_VERBOSE_LOAD); } @@ -667,8 +676,8 @@ bce_probe_pci_caps(device_t dev, struct if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) { if (reg != 0) { u16 link_status = pci_read_config(dev, reg + 0x12, 2); - DBPRINT(sc, BCE_INFO_LOAD, "PCIe link_status = 0x%08X\n", - link_status); + DBPRINT(sc, BCE_INFO_LOAD, "PCIe link_status = " + "0x%08X\n", link_status); sc->link_speed = link_status & 0xf; sc->link_width = (link_status >> 4) & 0x3f; sc->bce_cap_flags |= BCE_PCIE_CAPABLE_FLAG; @@ -730,7 +739,7 @@ bce_attach(device_t dev) if (sc->bce_res_mem == NULL) { BCE_PRINTF("%s(%d): PCI memory allocation failed\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; } @@ -801,14 +810,14 @@ bce_attach(device_t dev) } sc->bce_res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, - &rid, RF_SHAREABLE | RF_ACTIVE); + &rid, RF_SHAREABLE | RF_ACTIVE); sc->bce_irq_rid = rid; /* Report any IRQ allocation errors. */ if (sc->bce_res_irq == NULL) { BCE_PRINTF("%s(%d): PCI map interrupt failed!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; } @@ -823,28 +832,28 @@ bce_attach(device_t dev) * valid until this is done. */ pci_write_config(dev, BCE_PCICFG_MISC_CONFIG, - BCE_PCICFG_MISC_CONFIG_REG_WINDOW_ENA | - BCE_PCICFG_MISC_CONFIG_TARGET_MB_WORD_SWAP, 4); + BCE_PCICFG_MISC_CONFIG_REG_WINDOW_ENA | + BCE_PCICFG_MISC_CONFIG_TARGET_MB_WORD_SWAP, 4); /* Save ASIC revsion info. */ sc->bce_chipid = REG_RD(sc, BCE_MISC_ID); /* Weed out any non-production controller revisions. */ switch(BCE_CHIP_ID(sc)) { - case BCE_CHIP_ID_5706_A0: - case BCE_CHIP_ID_5706_A1: - case BCE_CHIP_ID_5708_A0: - case BCE_CHIP_ID_5708_B0: - case BCE_CHIP_ID_5709_A0: - case BCE_CHIP_ID_5709_B0: - case BCE_CHIP_ID_5709_B1: - case BCE_CHIP_ID_5709_B2: - BCE_PRINTF("%s(%d): Unsupported controller revision (%c%d)!\n", - __FILE__, __LINE__, - (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), - (pci_read_config(dev, PCIR_REVID, 4) & 0xf)); - rc = ENODEV; - goto bce_attach_fail; + case BCE_CHIP_ID_5706_A0: + case BCE_CHIP_ID_5706_A1: + case BCE_CHIP_ID_5708_A0: + case BCE_CHIP_ID_5708_B0: + case BCE_CHIP_ID_5709_A0: + case BCE_CHIP_ID_5709_B0: + case BCE_CHIP_ID_5709_B1: + case BCE_CHIP_ID_5709_B2: + BCE_PRINTF("%s(%d): Unsupported controller revision (%c%d)!\n", + __FILE__, __LINE__, + (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), + (pci_read_config(dev, PCIR_REVID, 4) & 0xf)); + rc = ENODEV; + goto bce_attach_fail; } /* @@ -866,58 +875,67 @@ bce_attach(device_t dev) if ((val & BCE_SHM_HDR_SIGNATURE_SIG_MASK) == BCE_SHM_HDR_SIGNATURE_SIG) /* Multi-port devices use different offsets in shared memory. */ sc->bce_shmem_base = REG_RD_IND(sc, BCE_SHM_HDR_ADDR_0 + - (pci_get_function(sc->bce_dev) << 2)); + (pci_get_function(sc->bce_dev) << 2)); else sc->bce_shmem_base = HOST_VIEW_SHMEM_BASE; DBPRINT(sc, BCE_VERBOSE_FIRMWARE, "%s(): bce_shmem_base = 0x%08X\n", - __FUNCTION__, sc->bce_shmem_base); + __FUNCTION__, sc->bce_shmem_base); /* Fetch the bootcode revision. */ - val = bce_shmem_rd(sc, BCE_DEV_INFO_BC_REV); - for (int i = 0, j = 0; i < 3; i++) { - u8 num; - - num = (u8) (val >> (24 - (i * 8))); - for (int k = 100, skip0 = 1; k >= 1; num %= k, k /= 10) { - if (num >= k || !skip0 || k == 1) { - sc->bce_bc_ver[j++] = (num / k) + '0'; - skip0 = 0; - } - } - if (i != 2) - sc->bce_bc_ver[j++] = '.'; - } - - /* Check if any management firwmare is running. */ - val = bce_shmem_rd(sc, BCE_PORT_FEATURE); - if (val & BCE_PORT_FEATURE_ASF_ENABLED) { - sc->bce_flags |= BCE_MFW_ENABLE_FLAG; - - /* Allow time for firmware to enter the running state. */ - for (int i = 0; i < 30; i++) { - val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); - if (val & BCE_CONDITION_MFW_RUN_MASK) - break; - DELAY(10000); - } - } - - /* Check the current bootcode state. */ - val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); - val &= BCE_CONDITION_MFW_RUN_MASK; - if (val != BCE_CONDITION_MFW_RUN_UNKNOWN && - val != BCE_CONDITION_MFW_RUN_NONE) { - u32 addr = bce_shmem_rd(sc, BCE_MFW_VER_PTR); - int i = 0; - - for (int j = 0; j < 3; j++) { - val = bce_reg_rd_ind(sc, addr + j * 4); - val = bswap32(val); - memcpy(&sc->bce_mfw_ver[i], &val, 4); - i += 4; - } - } + val = bce_shmem_rd(sc, BCE_DEV_INFO_BC_REV); + for (int i = 0, j = 0; i < 3; i++) { + u8 num; + + num = (u8) (val >> (24 - (i * 8))); + for (int k = 100, skip0 = 1; k >= 1; num %= k, k /= 10) { + if (num >= k || !skip0 || k == 1) { + sc->bce_bc_ver[j++] = (num / k) + '0'; + skip0 = 0; + } + } + + if (i != 2) + sc->bce_bc_ver[j++] = '.'; + } + + /* Check if any management firwmare is enabled. */ + val = bce_shmem_rd(sc, BCE_PORT_FEATURE); + if (val & BCE_PORT_FEATURE_ASF_ENABLED) { + sc->bce_flags |= BCE_MFW_ENABLE_FLAG; + + /* Allow time for firmware to enter the running state. */ + for (int i = 0; i < 30; i++) { + val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); + if (val & BCE_CONDITION_MFW_RUN_MASK) + break; + DELAY(10000); + } + + /* Check if management firmware is running. */ + val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); + val &= BCE_CONDITION_MFW_RUN_MASK; + if ((val != BCE_CONDITION_MFW_RUN_UNKNOWN) && + (val != BCE_CONDITION_MFW_RUN_NONE)) { + u32 addr = bce_shmem_rd(sc, BCE_MFW_VER_PTR); + int i = 0; + + /* Read the management firmware version string. */ + for (int j = 0; j < 3; j++) { + val = bce_reg_rd_ind(sc, addr + j * 4); + val = bswap32(val); + memcpy(&sc->bce_mfw_ver[i], &val, 4); + i += 4; + } + } else { + /* May cause firmware synchronization timeouts. */ + BCE_PRINTF("%s(%d): Management firmware enabled " + "but not running!\n", __FILE__, __LINE__); + strcpy(sc->bce_mfw_ver, "NOT RUNNING!"); + + /* ToDo: Any action the driver should take? */ + } + } /* Get PCI bus information (speed and type). */ val = REG_RD(sc, BCE_PCICFG_MISC_STATUS); @@ -964,10 +982,10 @@ bce_attach(device_t dev) if (val & BCE_PCICFG_MISC_STATUS_32BIT_DET) sc->bce_flags |= BCE_PCI_32BIT_FLAG; - /* Reset the controller and announce to bootcode that driver is present. */ + /* Reset controller and announce to bootcode that driver is present. */ if (bce_reset(sc, BCE_DRV_MSG_CODE_RESET)) { BCE_PRINTF("%s(%d): Controller reset failed!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; } @@ -975,7 +993,7 @@ bce_attach(device_t dev) /* Initialize the controller. */ if (bce_chipinit(sc)) { BCE_PRINTF("%s(%d): Controller initialization failed!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; } @@ -983,7 +1001,7 @@ bce_attach(device_t dev) /* Perform NVRAM test. */ if (bce_nvram_test(sc)) { BCE_PRINTF("%s(%d): NVRAM test failed!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; } @@ -1024,6 +1042,14 @@ bce_attach(device_t dev) sc->bce_rx_ticks = 18; #endif + /* Not used for L2. */ + sc->bce_comp_prod_trip_int = 0; + sc->bce_comp_prod_trip = 0; + sc->bce_com_ticks_int = 0; + sc->bce_com_ticks = 0; + sc->bce_cmd_ticks_int = 0; + sc->bce_cmd_ticks = 0; + /* Update statistics once every second. */ sc->bce_stats_ticks = 1000000 & 0xffff00; @@ -1507,7 +1533,8 @@ bce_miibus_read_reg(device_t dev, int ph /* Make sure we are accessing the correct PHY address. */ if (phy != sc->bce_phy_addr) { - DBPRINT(sc, BCE_INSANE_PHY, "Invalid PHY address %d for PHY read!\n", phy); + DBPRINT(sc, BCE_INSANE_PHY, "Invalid PHY address %d " + "for PHY read!\n", phy); return(0); } @@ -1533,8 +1560,8 @@ bce_miibus_read_reg(device_t dev, int ph val = BCE_MIPHY(phy) | BCE_MIREG(reg) | - BCE_EMAC_MDIO_COMM_COMMAND_READ | BCE_EMAC_MDIO_COMM_DISEXT | - BCE_EMAC_MDIO_COMM_START_BUSY; + BCE_EMAC_MDIO_COMM_COMMAND_READ | BCE_EMAC_MDIO_COMM_DISEXT | + BCE_EMAC_MDIO_COMM_START_BUSY; REG_WR(sc, BCE_EMAC_MDIO_COMM, val); for (i = 0; i < BCE_PHY_TIMEOUT; i++) { @@ -1552,8 +1579,8 @@ bce_miibus_read_reg(device_t dev, int ph } if (val & BCE_EMAC_MDIO_COMM_START_BUSY) { - BCE_PRINTF("%s(%d): Error: PHY read timeout! phy = %d, reg = 0x%04X\n", - __FILE__, __LINE__, phy, reg); + BCE_PRINTF("%s(%d): Error: PHY read timeout! phy = %d, " + "reg = 0x%04X\n", __FILE__, __LINE__, phy, reg); val = 0x0; } else { val = REG_RD(sc, BCE_EMAC_MDIO_COMM); @@ -1595,17 +1622,18 @@ bce_miibus_write_reg(device_t dev, int p /* Make sure we are accessing the correct PHY address. */ if (phy != sc->bce_phy_addr) { - DBPRINT(sc, BCE_INSANE_PHY, "Invalid PHY address %d for PHY write!\n", phy); + DBPRINT(sc, BCE_INSANE_PHY, "Invalid PHY address %d " + "for PHY write!\n", phy); return(0); } DB_PRINT_PHY_REG(reg, val); - /* - * The 5709S PHY is an IEEE Clause 45 PHY - * with special mappings to work with IEEE - * Clause 22 register accesses. - */ + /* + * The 5709S PHY is an IEEE Clause 45 PHY + * with special mappings to work with IEEE + * Clause 22 register accesses. + */ if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) { if (reg >= MII_BMCR && reg <= MII_ANLPRNP) reg += 0x10; @@ -1622,8 +1650,8 @@ bce_miibus_write_reg(device_t dev, int p } val1 = BCE_MIPHY(phy) | BCE_MIREG(reg) | val | - BCE_EMAC_MDIO_COMM_COMMAND_WRITE | - BCE_EMAC_MDIO_COMM_START_BUSY | BCE_EMAC_MDIO_COMM_DISEXT; + BCE_EMAC_MDIO_COMM_COMMAND_WRITE | + BCE_EMAC_MDIO_COMM_START_BUSY | BCE_EMAC_MDIO_COMM_DISEXT; REG_WR(sc, BCE_EMAC_MDIO_COMM, val1); for (i = 0; i < BCE_PHY_TIMEOUT; i++) { @@ -1638,7 +1666,7 @@ bce_miibus_write_reg(device_t dev, int p if (val1 & BCE_EMAC_MDIO_COMM_START_BUSY) BCE_PRINTF("%s(%d): PHY write timeout!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) { val1 = REG_RD(sc, BCE_EMAC_MDIO_MODE); @@ -2653,18 +2681,22 @@ bce_get_media(struct bce_softc *sc) * for Copper or SerDes operation. */ if (bond_id == BCE_MISC_DUAL_MEDIA_CTRL_BOND_ID_C) { - DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded for copper.\n"); + DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded " + "for copper.\n"); goto bce_get_media_exit; } else if (bond_id == BCE_MISC_DUAL_MEDIA_CTRL_BOND_ID_S) { - DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded for dual media.\n"); + DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded " + "for dual media.\n"); sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; goto bce_get_media_exit; } if (val & BCE_MISC_DUAL_MEDIA_CTRL_STRAP_OVERRIDE) - strap = (val & BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL) >> 21; + strap = (val & + BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL) >> 21; else - strap = (val & BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL_STRAP) >> 8; + strap = (val & + BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL_STRAP) >> 8; if (pci_get_function(sc->bce_dev) == 0) { switch (strap) { @@ -2672,13 +2704,13 @@ bce_get_media(struct bce_softc *sc) case 0x5: case 0x6: DBPRINT(sc, BCE_INFO_LOAD, - "BCM5709 s/w configured for SerDes.\n"); + "BCM5709 s/w configured for SerDes.\n"); sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; - break; + break; default: DBPRINT(sc, BCE_INFO_LOAD, - "BCM5709 s/w configured for Copper.\n"); - break; + "BCM5709 s/w configured for Copper.\n"); + break; } } else { switch (strap) { @@ -2686,13 +2718,13 @@ bce_get_media(struct bce_softc *sc) case 0x2: case 0x4: DBPRINT(sc, BCE_INFO_LOAD, - "BCM5709 s/w configured for SerDes.\n"); + "BCM5709 s/w configured for SerDes.\n"); sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; - break; + break; default: DBPRINT(sc, BCE_INFO_LOAD, - "BCM5709 s/w configured for Copper.\n"); - break; + "BCM5709 s/w configured for Copper.\n"); + break; } } @@ -2703,21 +2735,23 @@ bce_get_media(struct bce_softc *sc) sc->bce_flags |= BCE_NO_WOL_FLAG; - /* 5708S, 5709S, and 5716S use a separate PHY for SerDes. */ - if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) - sc->bce_phy_addr = 2; - - if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) sc->bce_phy_flags |= BCE_PHY_IEEE_CLAUSE_45_FLAG; + if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { + /* 5708S/09S/16S use a separate PHY for SerDes. */ + sc->bce_phy_addr = 2; + val = bce_shmem_rd(sc, BCE_SHARED_HW_CFG_CONFIG); if (val & BCE_SHARED_HW_CFG_PHY_2_5G) { - sc->bce_phy_flags |= BCE_PHY_2_5G_CAPABLE_FLAG; - DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb capable adapter\n"); + sc->bce_phy_flags |= + BCE_PHY_2_5G_CAPABLE_FLAG; + DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb " + "capable adapter\n"); } - } + } } else if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5706) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5708)) + (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5708)) sc->bce_phy_flags |= BCE_PHY_CRC_FIX_FLAG; bce_get_media_exit: @@ -2746,13 +2780,13 @@ bce_init_media(struct bce_softc *sc) * is done in mii layer. */ - /* Select auto-negotiation MMD of the PHY. */ - bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, + /* Select auto-negotiation MMD of the PHY. */ + bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_ADDR_EXT); bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, BRGPHY_ADDR_EXT, BRGPHY_ADDR_EXT_AN_MMD); - /* Select IEEE0 block of AN MMD (assumed in all brgphy(4) code). */ + /* Set IEEE0 block of AN MMD (assumed in brgphy(4) code). */ bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_COMBO_IEEE0); } @@ -2778,7 +2812,7 @@ bce_dma_free(struct bce_softc *sc) /* Free, unmap, and destroy the status block. */ if (sc->status_block != NULL) { bus_dmamem_free( - sc->status_tag, + sc->status_tag, sc->status_block, sc->status_map); sc->status_block = NULL; @@ -2786,7 +2820,7 @@ bce_dma_free(struct bce_softc *sc) if (sc->status_map != NULL) { bus_dmamap_unload( - sc->status_tag, + sc->status_tag, sc->status_map); bus_dmamap_destroy(sc->status_tag, sc->status_map); @@ -2802,7 +2836,7 @@ bce_dma_free(struct bce_softc *sc) /* Free, unmap, and destroy the statistics block. */ if (sc->stats_block != NULL) { bus_dmamem_free( - sc->stats_tag, + sc->stats_tag, sc->stats_block, sc->stats_map); sc->stats_block = NULL; @@ -2810,7 +2844,7 @@ bce_dma_free(struct bce_softc *sc) if (sc->stats_map != NULL) { bus_dmamap_unload( - sc->stats_tag, + sc->stats_tag, sc->stats_map); bus_dmamap_destroy(sc->stats_tag, sc->stats_map); @@ -2829,7 +2863,7 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < sc->ctx_pages; i++ ) { if (sc->ctx_block[i] != NULL) { bus_dmamem_free( - sc->ctx_tag, + sc->ctx_tag, sc->ctx_block[i], sc->ctx_map[i]); sc->ctx_block[i] = NULL; @@ -2837,10 +2871,10 @@ bce_dma_free(struct bce_softc *sc) if (sc->ctx_map[i] != NULL) { bus_dmamap_unload( - sc->ctx_tag, - sc->ctx_map[i]); + sc->ctx_tag, + sc->ctx_map[i]); bus_dmamap_destroy( - sc->ctx_tag, + sc->ctx_tag, sc->ctx_map[i]); sc->ctx_map[i] = NULL; } @@ -2858,7 +2892,7 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < TX_PAGES; i++ ) { if (sc->tx_bd_chain[i] != NULL) { bus_dmamem_free( - sc->tx_bd_chain_tag, + sc->tx_bd_chain_tag, sc->tx_bd_chain[i], sc->tx_bd_chain_map[i]); sc->tx_bd_chain[i] = NULL; @@ -2866,10 +2900,10 @@ bce_dma_free(struct bce_softc *sc) if (sc->tx_bd_chain_map[i] != NULL) { bus_dmamap_unload( - sc->tx_bd_chain_tag, - sc->tx_bd_chain_map[i]); + sc->tx_bd_chain_tag, + sc->tx_bd_chain_map[i]); bus_dmamap_destroy( - sc->tx_bd_chain_tag, + sc->tx_bd_chain_tag, sc->tx_bd_chain_map[i]); sc->tx_bd_chain_map[i] = NULL; } @@ -2886,7 +2920,7 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < RX_PAGES; i++ ) { if (sc->rx_bd_chain[i] != NULL) { bus_dmamem_free( - sc->rx_bd_chain_tag, + sc->rx_bd_chain_tag, sc->rx_bd_chain[i], sc->rx_bd_chain_map[i]); sc->rx_bd_chain[i] = NULL; @@ -2894,10 +2928,10 @@ bce_dma_free(struct bce_softc *sc) if (sc->rx_bd_chain_map[i] != NULL) { bus_dmamap_unload( - sc->rx_bd_chain_tag, - sc->rx_bd_chain_map[i]); + sc->rx_bd_chain_tag, + sc->rx_bd_chain_map[i]); bus_dmamap_destroy( - sc->rx_bd_chain_tag, + sc->rx_bd_chain_tag, sc->rx_bd_chain_map[i]); sc->rx_bd_chain_map[i] = NULL; } @@ -2915,7 +2949,7 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < PG_PAGES; i++ ) { if (sc->pg_bd_chain[i] != NULL) { bus_dmamem_free( - sc->pg_bd_chain_tag, + sc->pg_bd_chain_tag, sc->pg_bd_chain[i], sc->pg_bd_chain_map[i]); sc->pg_bd_chain[i] = NULL; @@ -2923,10 +2957,10 @@ bce_dma_free(struct bce_softc *sc) if (sc->pg_bd_chain_map[i] != NULL) { bus_dmamap_unload( - sc->pg_bd_chain_tag, - sc->pg_bd_chain_map[i]); + sc->pg_bd_chain_tag, + sc->pg_bd_chain_map[i]); bus_dmamap_destroy( - sc->pg_bd_chain_tag, + sc->pg_bd_chain_tag, sc->pg_bd_chain_map[i]); sc->pg_bd_chain_map[i] = NULL; } @@ -2944,9 +2978,9 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < TOTAL_TX_BD; i++) { if (sc->tx_mbuf_map[i] != NULL) { bus_dmamap_unload(sc->tx_mbuf_tag, - sc->tx_mbuf_map[i]); + sc->tx_mbuf_map[i]); bus_dmamap_destroy(sc->tx_mbuf_tag, - sc->tx_mbuf_map[i]); + sc->tx_mbuf_map[i]); sc->tx_mbuf_map[i] = NULL; } } @@ -2961,9 +2995,9 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < TOTAL_RX_BD; i++) { if (sc->rx_mbuf_map[i] != NULL) { bus_dmamap_unload(sc->rx_mbuf_tag, - sc->rx_mbuf_map[i]); + sc->rx_mbuf_map[i]); bus_dmamap_destroy(sc->rx_mbuf_tag, - sc->rx_mbuf_map[i]); + sc->rx_mbuf_map[i]); sc->rx_mbuf_map[i] = NULL; } } @@ -2979,9 +3013,9 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < TOTAL_PG_BD; i++) { if (sc->pg_mbuf_map[i] != NULL) { bus_dmamap_unload(sc->pg_mbuf_tag, - sc->pg_mbuf_map[i]); + sc->pg_mbuf_map[i]); bus_dmamap_destroy(sc->pg_mbuf_tag, - sc->pg_mbuf_map[i]); + sc->pg_mbuf_map[i]); sc->pg_mbuf_map[i] = NULL; } } @@ -3074,20 +3108,12 @@ bce_dma_alloc(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - if (bus_dma_tag_create(NULL, - 1, - BCE_DMA_BOUNDARY, - sc->max_bus_addr, - BUS_SPACE_MAXADDR, - NULL, NULL, - MAXBSIZE, - BUS_SPACE_UNRESTRICTED, - BUS_SPACE_MAXSIZE_32BIT, - 0, - NULL, NULL, - &sc->parent_tag)) { + if (bus_dma_tag_create(NULL, 1, BCE_DMA_BOUNDARY, + sc->max_bus_addr, BUS_SPACE_MAXADDR, NULL, NULL, + MAXBSIZE, BUS_SPACE_UNRESTRICTED, BUS_SPACE_MAXSIZE_32BIT, + 0, NULL, NULL, &sc->parent_tag)) { BCE_PRINTF("%s(%d): Could not allocate parent DMA tag!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENOMEM; goto bce_dma_alloc_exit; } @@ -3097,117 +3123,89 @@ bce_dma_alloc(device_t dev) * memory, map the memory into DMA space, and fetch the physical * address of the block. */ - if (bus_dma_tag_create(sc->parent_tag, - BCE_DMA_ALIGN, - BCE_DMA_BOUNDARY, - sc->max_bus_addr, - BUS_SPACE_MAXADDR, - NULL, NULL, - BCE_STATUS_BLK_SZ, - 1, - BCE_STATUS_BLK_SZ, - 0, - NULL, NULL, - &sc->status_tag)) { - BCE_PRINTF("%s(%d): Could not allocate status block DMA tag!\n", - __FILE__, __LINE__); + if (bus_dma_tag_create(sc->parent_tag, BCE_DMA_ALIGN, + BCE_DMA_BOUNDARY, sc->max_bus_addr, BUS_SPACE_MAXADDR, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri Apr 16 01:39:31 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F05D106566B; Fri, 16 Apr 2010 01:39:31 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8E628FC08; Fri, 16 Apr 2010 01:39:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3G1dU9F078398; Fri, 16 Apr 2010 01:39:30 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3G1dUE7078396; Fri, 16 Apr 2010 01:39:30 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201004160139.o3G1dUE7078396@svn.freebsd.org> From: Rick Macklem Date: Fri, 16 Apr 2010 01:39:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206691 - stable/8/sys/fs/nfsserver X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 01:39:31 -0000 Author: rmacklem Date: Fri Apr 16 01:39:30 2010 New Revision: 206691 URL: http://svn.freebsd.org/changeset/base/206691 Log: MFC: r206061 Add SAVENAME to the cn_flags for all cases in the experimental NFS server for the CREATE cn_nameiop where SAVESTART isn't set. I was not aware that this needed to be done by the caller until recently. Modified: stable/8/sys/fs/nfsserver/nfs_nfsdserv.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdserv.c Thu Apr 15 23:56:05 2010 (r206690) +++ stable/8/sys/fs/nfsserver/nfs_nfsdserv.c Fri Apr 16 01:39:30 2010 (r206691) @@ -1086,7 +1086,7 @@ nfsrvd_mknod(struct nfsrv_descript *nd, case NFFIFO: break; case NFDIR: - cnflags = LOCKPARENT; + cnflags = (LOCKPARENT | SAVENAME); break; default: nd->nd_repstat = NFSERR_BADTYPE; @@ -1549,7 +1549,8 @@ nfsrvd_link(struct nfsrv_descript *nd, i NFSVOPUNLOCK(dp, 0, p); } } - NFSNAMEICNDSET(&named.ni_cnd, nd->nd_cred, CREATE, LOCKPARENT); + NFSNAMEICNDSET(&named.ni_cnd, nd->nd_cred, CREATE, + LOCKPARENT | SAVENAME); if (!nd->nd_repstat) { nfsvno_setpathbuf(&named, &bufp, &hashp); error = nfsrv_parsename(nd, bufp, hashp, &named.ni_pathlen); @@ -1743,7 +1744,8 @@ nfsrvd_mkdir(struct nfsrv_descript *nd, nfsrv_wcc(nd, dirfor_ret, &dirfor, diraft_ret, &diraft); return (0); } - NFSNAMEICNDSET(&named.ni_cnd, nd->nd_cred, CREATE, LOCKPARENT); + NFSNAMEICNDSET(&named.ni_cnd, nd->nd_cred, CREATE, + LOCKPARENT | SAVENAME); nfsvno_setpathbuf(&named, &bufp, &hashp); error = nfsrv_parsename(nd, bufp, hashp, &named.ni_pathlen); if (error) { From owner-svn-src-stable@FreeBSD.ORG Fri Apr 16 01:53:20 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D716106566B; Fri, 16 Apr 2010 01:53:20 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C7EB8FC1D; Fri, 16 Apr 2010 01:53:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3G1rKeh081484; Fri, 16 Apr 2010 01:53:20 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3G1rKuf081481; Fri, 16 Apr 2010 01:53:20 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201004160153.o3G1rKuf081481@svn.freebsd.org> From: Kevin Lo Date: Fri, 16 Apr 2010 01:53:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206692 - in stable/8/sys/dev/usb: . serial X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 01:53:20 -0000 Author: kevlo Date: Fri Apr 16 01:53:19 2010 New Revision: 206692 URL: http://svn.freebsd.org/changeset/base/206692 Log: MFC r206544 The Quanta Q101 modem has a different type of cdrom driver disk, add the product id and use a standard scsi eject. Reviewed by: thompsa Modified: stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/usbdevs Modified: stable/8/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/8/sys/dev/usb/serial/u3g.c Fri Apr 16 01:39:30 2010 (r206691) +++ stable/8/sys/dev/usb/serial/u3g.c Fri Apr 16 01:53:19 2010 (r206692) @@ -501,6 +501,7 @@ static const struct usb_device_id u3g_de U3G_DEV(OPTION, GTICON322, U3GINIT_REZERO), U3G_DEV(QUALCOMMINC, ZTE_STOR, U3GINIT_ZTESTOR), U3G_DEV(QUALCOMMINC, ZTE_STOR2, U3GINIT_SCSIEJECT), + U3G_DEV(QUANTA, Q101_STOR, U3GINIT_SCSIEJECT), U3G_DEV(SIERRA, TRUINSTALL, U3GINIT_SIERRA), #undef U3G_DEV }; Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri Apr 16 01:39:30 2010 (r206691) +++ stable/8/sys/dev/usb/usbdevs Fri Apr 16 01:53:19 2010 (r206692) @@ -2526,6 +2526,7 @@ product QUALCOMMINC E2003 0x2003 3G mode /* Quanta products */ product QUANTA RW6815_1 0x00ce HP iPAQ rw6815 product QUANTA RT3070 0x0304 RT3070 +product QUANTA Q101_STOR 0x1000 USB Q101 Storage product QUANTA Q101 0xea02 HSDPA modem product QUANTA Q111 0xea03 HSDPA modem product QUANTA GLX 0xea04 HSDPA modem From owner-svn-src-stable@FreeBSD.ORG Fri Apr 16 01:54:47 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B4471065709; Fri, 16 Apr 2010 01:54:47 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5AF308FC1E; Fri, 16 Apr 2010 01:54:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3G1slMV081821; Fri, 16 Apr 2010 01:54:47 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3G1sl8S081819; Fri, 16 Apr 2010 01:54:47 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201004160154.o3G1sl8S081819@svn.freebsd.org> From: Kevin Lo Date: Fri, 16 Apr 2010 01:54:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206693 - stable/8/sys/dev/usb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 01:54:47 -0000 Author: kevlo Date: Fri Apr 16 01:54:47 2010 New Revision: 206693 URL: http://svn.freebsd.org/changeset/base/206693 Log: MFC r206595 Eliminate duplicate comment Modified: stable/8/sys/dev/usb/usbdevs Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri Apr 16 01:53:19 2010 (r206692) +++ stable/8/sys/dev/usb/usbdevs Fri Apr 16 01:54:47 2010 (r206693) @@ -2523,7 +2523,6 @@ product QUALCOMMINC E2002 0x2002 3G mode product QUALCOMMINC E2003 0x2003 3G modem /* Quanta products */ -/* Quanta products */ product QUANTA RW6815_1 0x00ce HP iPAQ rw6815 product QUANTA RT3070 0x0304 RT3070 product QUANTA Q101_STOR 0x1000 USB Q101 Storage From owner-svn-src-stable@FreeBSD.ORG Fri Apr 16 02:16:59 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 528311065670; Fri, 16 Apr 2010 02:16:59 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4163E8FC15; Fri, 16 Apr 2010 02:16:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3G2Gxgx086917; Fri, 16 Apr 2010 02:16:59 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3G2GxAR086915; Fri, 16 Apr 2010 02:16:59 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201004160216.o3G2GxAR086915@svn.freebsd.org> From: Rick Macklem Date: Fri, 16 Apr 2010 02:16:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206694 - stable/8/sys/fs/nfsserver X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 02:16:59 -0000 Author: rmacklem Date: Fri Apr 16 02:16:58 2010 New Revision: 206694 URL: http://svn.freebsd.org/changeset/base/206694 Log: MFC: r206063 For the experimental NFS server, add a call to free the lookup path buffer for one case where it was missing when doing mkdir. This could have conceivably resulted in a leak of a buffer, but a leak was never observed during testing, so I suspect it would have occurred rarely, if ever, in practice. Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdport.c Fri Apr 16 01:54:47 2010 (r206693) +++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c Fri Apr 16 02:16:58 2010 (r206694) @@ -869,6 +869,7 @@ nfsvno_mkdir(struct nameidata *ndp, stru else vput(ndp->ni_dvp); vrele(ndp->ni_vp); + nfsvno_relpathbuf(ndp); return (EEXIST); } error = VOP_MKDIR(ndp->ni_dvp, &ndp->ni_vp, &ndp->ni_cnd, From owner-svn-src-stable@FreeBSD.ORG Fri Apr 16 08:32:08 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A49F8106566C; Fri, 16 Apr 2010 08:32:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 947D78FC0C; Fri, 16 Apr 2010 08:32:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3G8W89p069920; Fri, 16 Apr 2010 08:32:08 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3G8W8JH069918; Fri, 16 Apr 2010 08:32:08 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004160832.o3G8W8JH069918@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 16 Apr 2010 08:32:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206699 - stable/8/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 08:32:08 -0000 Author: kib Date: Fri Apr 16 08:32:08 2010 New Revision: 206699 URL: http://svn.freebsd.org/changeset/base/206699 Log: MFC r206546: Remove XXX comment. Add another comment, describing why f_vnode assignment is useful. Modified: stable/8/sys/kern/vfs_syscalls.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/vfs_syscalls.c ============================================================================== --- stable/8/sys/kern/vfs_syscalls.c Fri Apr 16 07:02:28 2010 (r206698) +++ stable/8/sys/kern/vfs_syscalls.c Fri Apr 16 08:32:08 2010 (r206699) @@ -1124,7 +1124,12 @@ kern_openat(struct thread *td, int fd, c NDFREE(&nd, NDF_ONLY_PNBUF); vp = nd.ni_vp; - fp->f_vnode = vp; /* XXX Does devfs need this? */ + /* + * Store the vnode, for any f_type. Typically, the vnode use + * count is decremented by direct call to vn_closefile() for + * files that switched type in the cdevsw fdopen() method. + */ + fp->f_vnode = vp; /* * If the file wasn't claimed by devfs bind it to the normal * vnode operations here. From owner-svn-src-stable@FreeBSD.ORG Fri Apr 16 09:08:20 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4208E106564A; Fri, 16 Apr 2010 09:08:20 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 321408FC2C; Fri, 16 Apr 2010 09:08:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3G98Kvq078015; Fri, 16 Apr 2010 09:08:20 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3G98KlZ078013; Fri, 16 Apr 2010 09:08:20 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004160908.o3G98KlZ078013@svn.freebsd.org> From: Rui Paulo Date: Fri, 16 Apr 2010 09:08:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206700 - stable/8/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 09:08:20 -0000 Author: rpaulo Date: Fri Apr 16 09:08:19 2010 New Revision: 206700 URL: http://svn.freebsd.org/changeset/base/206700 Log: MFC r206420: Setup the correct RX/TX chainmask when we play with the antenna settings. Sponsored by: iXsystems, inc Modified: stable/8/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c ============================================================================== --- stable/8/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c Fri Apr 16 08:32:08 2010 (r206699) +++ stable/8/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c Fri Apr 16 09:08:19 2010 (r206700) @@ -378,8 +378,8 @@ ar9285SetAntennaSwitch(struct ath_hal *a case HAL_ANT_VARIABLE: /* Restore original chainmask settings */ /* XXX */ - ahp->ah_tx_chainmask = AR5416_DEFAULT_TXCHAINMASK; - ahp->ah_rx_chainmask = AR5416_DEFAULT_RXCHAINMASK; + ahp->ah_tx_chainmask = AR9285_DEFAULT_TXCHAINMASK; + ahp->ah_rx_chainmask = AR9285_DEFAULT_RXCHAINMASK; break; } return AH_TRUE; From owner-svn-src-stable@FreeBSD.ORG Fri Apr 16 15:43:24 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E954106566B; Fri, 16 Apr 2010 15:43:24 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 790898FC12; Fri, 16 Apr 2010 15:43:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3GFhOhB066521; Fri, 16 Apr 2010 15:43:24 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3GFhOtU066515; Fri, 16 Apr 2010 15:43:24 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201004161543.o3GFhOtU066515@svn.freebsd.org> From: Fabien Thomas Date: Fri, 16 Apr 2010 15:43:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206701 - in stable/8/sys: amd64/include conf dev/hwpmc i386/include modules/hwpmc sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 15:43:24 -0000 Author: fabient Date: Fri Apr 16 15:43:24 2010 New Revision: 206701 URL: http://svn.freebsd.org/changeset/base/206701 Log: MFC r206089, r206684: - Support for uncore counting events: one fixed PMC with the uncore domain clock, 8 programmable PMC. - Westmere based CPU (Xeon 5600, Corei7 980X) support. - New man pages with events list for core and uncore. - Updated Corei7 events with Intel 253669-033US December 2009 doc. There is some removed events in the documentation, they have been kept in the code but documented in the man page as obsolete. - Offcore response events can be setup with rsp token. Sponsored by: NETASQ Added: stable/8/sys/dev/hwpmc/hwpmc_uncore.c - copied unchanged from r206089, head/sys/dev/hwpmc/hwpmc_uncore.c stable/8/sys/dev/hwpmc/hwpmc_uncore.h (contents, props changed) Modified: stable/8/sys/amd64/include/pmc_mdep.h stable/8/sys/conf/files.amd64 stable/8/sys/conf/files.i386 stable/8/sys/conf/files.pc98 stable/8/sys/dev/hwpmc/hwpmc_core.c stable/8/sys/dev/hwpmc/hwpmc_core.h stable/8/sys/dev/hwpmc/hwpmc_intel.c stable/8/sys/dev/hwpmc/pmc_events.h stable/8/sys/i386/include/pmc_mdep.h stable/8/sys/modules/hwpmc/Makefile stable/8/sys/sys/pmc.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/include/pmc_mdep.h ============================================================================== --- stable/8/sys/amd64/include/pmc_mdep.h Fri Apr 16 09:08:19 2010 (r206700) +++ stable/8/sys/amd64/include/pmc_mdep.h Fri Apr 16 15:43:24 2010 (r206701) @@ -43,17 +43,20 @@ struct pmc_mdep; #include #include #include +#include /* * Intel processors implementing V2 and later of the Intel performance * measurement architecture have PMCs of the following classes: TSC, - * IAF and IAP. + * IAF, IAP, UCF and UCP. */ #define PMC_MDEP_CLASS_INDEX_TSC 0 #define PMC_MDEP_CLASS_INDEX_K8 1 #define PMC_MDEP_CLASS_INDEX_P4 1 #define PMC_MDEP_CLASS_INDEX_IAP 1 #define PMC_MDEP_CLASS_INDEX_IAF 2 +#define PMC_MDEP_CLASS_INDEX_UCP 3 +#define PMC_MDEP_CLASS_INDEX_UCF 4 /* * On the amd64 platform we support the following PMCs. @@ -63,12 +66,16 @@ struct pmc_mdep; * PIV Intel P4/HTT and P4/EMT64 * IAP Intel Core/Core2/Atom CPUs in 64 bits mode. * IAF Intel fixed-function PMCs in Core2 and later CPUs. + * UCP Intel Uncore programmable PMCs. + * UCF Intel Uncore fixed-function PMCs. */ union pmc_md_op_pmcallocate { struct pmc_md_amd_op_pmcallocate pm_amd; struct pmc_md_iaf_op_pmcallocate pm_iaf; struct pmc_md_iap_op_pmcallocate pm_iap; + struct pmc_md_ucf_op_pmcallocate pm_ucf; + struct pmc_md_ucp_op_pmcallocate pm_ucp; struct pmc_md_p4_op_pmcallocate pm_p4; uint64_t __pad[4]; }; @@ -83,6 +90,8 @@ union pmc_md_pmc { struct pmc_md_amd_pmc pm_amd; struct pmc_md_iaf_pmc pm_iaf; struct pmc_md_iap_pmc pm_iap; + struct pmc_md_ucf_pmc pm_ucf; + struct pmc_md_ucp_pmc pm_ucp; struct pmc_md_p4_pmc pm_p4; }; Modified: stable/8/sys/conf/files.amd64 ============================================================================== --- stable/8/sys/conf/files.amd64 Fri Apr 16 09:08:19 2010 (r206700) +++ stable/8/sys/conf/files.amd64 Fri Apr 16 15:43:24 2010 (r206701) @@ -205,6 +205,7 @@ dev/hptrr/hptrr_config.c optional hptrr dev/hwpmc/hwpmc_amd.c optional hwpmc dev/hwpmc/hwpmc_intel.c optional hwpmc dev/hwpmc/hwpmc_core.c optional hwpmc +dev/hwpmc/hwpmc_uncore.c optional hwpmc dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_tsc.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc Modified: stable/8/sys/conf/files.i386 ============================================================================== --- stable/8/sys/conf/files.i386 Fri Apr 16 09:08:19 2010 (r206700) +++ stable/8/sys/conf/files.i386 Fri Apr 16 15:43:24 2010 (r206701) @@ -179,6 +179,7 @@ dev/hptrr/hptrr_config.c optional hptrr dev/hwpmc/hwpmc_amd.c optional hwpmc dev/hwpmc/hwpmc_intel.c optional hwpmc dev/hwpmc/hwpmc_core.c optional hwpmc +dev/hwpmc/hwpmc_uncore.c optional hwpmc dev/hwpmc/hwpmc_pentium.c optional hwpmc dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_ppro.c optional hwpmc Modified: stable/8/sys/conf/files.pc98 ============================================================================== --- stable/8/sys/conf/files.pc98 Fri Apr 16 09:08:19 2010 (r206700) +++ stable/8/sys/conf/files.pc98 Fri Apr 16 15:43:24 2010 (r206701) @@ -99,6 +99,7 @@ dev/fe/if_fe_cbus.c optional fe isa dev/hwpmc/hwpmc_amd.c optional hwpmc dev/hwpmc/hwpmc_intel.c optional hwpmc dev/hwpmc/hwpmc_core.c optional hwpmc +dev/hwpmc/hwpmc_uncore.c optional hwpmc dev/hwpmc/hwpmc_pentium.c optional hwpmc dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_ppro.c optional hwpmc Modified: stable/8/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/8/sys/dev/hwpmc/hwpmc_core.c Fri Apr 16 09:08:19 2010 (r206700) +++ stable/8/sys/dev/hwpmc/hwpmc_core.c Fri Apr 16 15:43:24 2010 (r206701) @@ -534,10 +534,12 @@ struct iap_event_descr { #define IAP_F_CC2E (1 << 2) /* CPU: Core2 Extreme only */ #define IAP_F_CA (1 << 3) /* CPU: Atom */ #define IAP_F_I7 (1 << 4) /* CPU: Core i7 */ -#define IAP_F_FM (1 << 5) /* Fixed mask */ +#define IAP_F_I7O (1 << 4) /* CPU: Core i7 (old) */ +#define IAP_F_WM (1 << 5) /* CPU: Westmere */ +#define IAP_F_FM (1 << 6) /* Fixed mask */ -#define IAP_F_ALLCPUS \ - (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA | IAP_F_I7) +#define IAP_F_ALLCPUSCORE2 \ + (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA) /* Sub fields of UMASK that this event supports. */ #define IAP_M_CORE (1 << 0) /* Core specificity */ @@ -570,151 +572,319 @@ static struct iap_event_descr iap_events .iap_flags = (FLAGS) \ } + IAPDESCR(02H_01H, 0x02, 0x01, IAP_F_FM | IAP_F_I7O), IAPDESCR(02H_81H, 0x02, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(03H_00H, 0x03, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(03H_02H, 0x03, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(03H_04H, 0x03, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(03H_01H, 0x03, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(03H_02H, 0x03, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_WM), + IAPDESCR(03H_04H, 0x03, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), IAPDESCR(03H_08H, 0x03, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(03H_10H, 0x03, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(03H_20H, 0x03, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(04H_00H, 0x04, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(04H_01H, 0x04, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(04H_01H, 0x04, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), IAPDESCR(04H_02H, 0x04, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(04H_07H, 0x04, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(04H_08H, 0x04, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(05H_00H, 0x05, 0x00, IAP_F_FM | IAP_F_CC), - - IAPDESCR(06H_00H, 0x06, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(05H_02H, 0x05, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_WM), + IAPDESCR(05H_03H, 0x05, 0x03, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(06H_00H, 0x06, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2 | + IAP_F_CC2E | IAP_F_CA), + IAPDESCR(06H_01H, 0x06, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(06H_02H, 0x06, 0x02, IAP_F_FM | IAP_F_I7O), + IAPDESCR(06H_04H, 0x06, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(06H_08H, 0x06, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(06H_0FH, 0x06, 0x0F, IAP_F_FM | IAP_F_I7O), IAPDESCR(07H_00H, 0x07, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(07H_02H, 0x07, 0x02, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(07H_03H, 0x07, 0x03, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM), + IAPDESCR(07H_02H, 0x07, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(07H_03H, 0x07, 0x03, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(07H_06H, 0x07, 0x06, IAP_F_FM | IAP_F_CA), IAPDESCR(07H_08H, 0x07, 0x08, IAP_F_FM | IAP_F_CA), - IAPDESCR(08H_01H, 0x08, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(08H_02H, 0x08, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(08H_04H, 0x08, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(08H_01H, 0x08, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(08H_02H, 0x08, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(08H_04H, 0x08, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_WM), IAPDESCR(08H_05H, 0x08, 0x05, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_06H, 0x08, 0x06, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_07H, 0x08, 0x07, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_08H, 0x08, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(08H_09H, 0x08, 0x09, IAP_F_FM | IAP_F_CA), + IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7), + IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(09H_01H, 0x09, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(09H_02H, 0x09, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(09H_01H, 0x09, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), + IAPDESCR(09H_02H, 0x09, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), + IAPDESCR(09H_04H, 0x09, 0x04, IAP_F_FM | IAP_F_I7O), + IAPDESCR(09H_08H, 0x09, 0x08, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(0BH_01H, 0x0B, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0BH_02H, 0x0B, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0BH_10H, 0x0B, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(0CH_01H, 0x0C, 0x01, IAP_F_FM | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(0CH_01H, 0x0C, 0x01, IAP_F_FM | IAP_F_CC2 | IAP_F_I7 | + IAP_F_WM), IAPDESCR(0CH_02H, 0x0C, 0x02, IAP_F_FM | IAP_F_CC2), IAPDESCR(0CH_03H, 0x0C, 0x03, IAP_F_FM | IAP_F_CA), - IAPDESCR(10H_00H, 0x10, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(10H_01H, 0x10, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(0FH_01H, 0x0F, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(0FH_02H, 0x0F, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0FH_08H, 0x0F, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0FH_10H, 0x0F, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0FH_20H, 0x0F, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0FH_80H, 0x0F, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(10H_00H, 0x10, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(10H_01H, 0x10, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_02H, 0x10, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_04H, 0x10, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_08H, 0x10, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_10H, 0x10, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_20H, 0x10, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_40H, 0x10, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_80H, 0x10, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(10H_81H, 0x10, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(11H_00H, 0x11, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), IAPDESCR(11H_01H, 0x11, 0x01, IAP_F_FM | IAP_F_CA), IAPDESCR(11H_81H, 0x11, 0x81, IAP_F_FM | IAP_F_CA), - IAPDESCR(12H_00H, 0x12, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(12H_01H, 0x12, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(12H_00H, 0x12, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(12H_01H, 0x12, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_02H, 0x12, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_04H, 0x12, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_08H, 0x12, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_10H, 0x12, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_20H, 0x12, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_40H, 0x12, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(12H_81H, 0x12, 0x81, IAP_F_FM | IAP_F_CA), - IAPDESCR(13H_00H, 0x13, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(13H_01H, 0x13, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(13H_00H, 0x13, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(13H_01H, 0x13, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM), + IAPDESCR(13H_02H, 0x13, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(13H_04H, 0x13, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(13H_07H, 0x13, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(13H_81H, 0x13, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(14H_00H, 0x14, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(14H_01H, 0x14, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(14H_01H, 0x14, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM), + IAPDESCR(14H_02H, 0x14, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(17H_01H, 0x17, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(18H_00H, 0x18, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(18H_01H, 0x18, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(19H_00H, 0x19, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(19H_01H, 0x19, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(19H_01H, 0x19, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(19H_02H, 0x19, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(21H, 0x21, IAP_M_CORE, IAP_F_ALLCPUS), + IAPDESCR(1DH_01H, 0x1D, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(1DH_02H, 0x1D, 0x02, IAP_F_FM | IAP_F_I7O), + IAPDESCR(1DH_04H, 0x1D, 0x04, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(1EH_01H, 0x1E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(20H_01H, 0x20, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(21H, 0x21, IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(22H, 0x22, IAP_M_CORE, IAP_F_CC2), - IAPDESCR(23H, 0x23, IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(24H, 0x24, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUS), - IAPDESCR(25H, 0x25, IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(26H, 0x26, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUS), - IAPDESCR(27H, 0x27, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUS), - IAPDESCR(28H, 0x28, IAP_M_CORE | IAP_M_MESI, IAP_F_ALLCPUS), + IAPDESCR(23H, 0x23, IAP_M_CORE, IAP_F_ALLCPUSCORE2), + + IAPDESCR(24H, 0x24, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), + IAPDESCR(24H_01H, 0x24, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_02H, 0x24, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_03H, 0x24, 0x03, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_04H, 0x24, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_08H, 0x24, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_0CH, 0x24, 0x0C, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_10H, 0x24, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_20H, 0x24, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_40H, 0x24, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_80H, 0x24, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_C0H, 0x24, 0xC0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(25H, 0x25, IAP_M_CORE, IAP_F_ALLCPUSCORE2), + + IAPDESCR(26H, 0x26, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), + IAPDESCR(26H_01H, 0x26, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_02H, 0x26, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_04H, 0x26, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_08H, 0x26, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_0FH, 0x26, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_10H, 0x26, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_20H, 0x26, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_40H, 0x26, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_80H, 0x26, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_F0H, 0x26, 0xF0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_FFH, 0x26, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(27H, 0x27, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), + IAPDESCR(27H_01H, 0x27, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_02H, 0x27, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_04H, 0x27, 0x04, IAP_F_FM | IAP_F_I7O), + IAPDESCR(27H_08H, 0x27, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_0EH, 0x27, 0x0E, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_0FH, 0x27, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_10H, 0x27, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_20H, 0x27, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_40H, 0x27, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_80H, 0x27, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_E0H, 0x27, 0xE0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_F0H, 0x27, 0xF0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(28H, 0x28, IAP_M_CORE | IAP_M_MESI, IAP_F_ALLCPUSCORE2), + IAPDESCR(28H_01H, 0x28, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(28H_02H, 0x28, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(28H_04H, 0x28, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(28H_08H, 0x28, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(28H_0FH, 0x28, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(29H, 0x29, IAP_M_CORE | IAP_M_MESI, IAP_F_CC), IAPDESCR(29H, 0x29, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_CA | IAP_F_CC2), - IAPDESCR(2AH, 0x2A, IAP_M_CORE | IAP_M_MESI, IAP_F_ALLCPUS), + IAPDESCR(2AH, 0x2A, IAP_M_CORE | IAP_M_MESI, IAP_F_ALLCPUSCORE2), IAPDESCR(2BH, 0x2B, IAP_M_CORE | IAP_M_MESI, IAP_F_CA | IAP_F_CC2), IAPDESCR(2EH, 0x2E, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, - IAP_F_ALLCPUS), - IAPDESCR(2EH_41H, 0x2E, 0x41, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(2EH_4FH, 0x2E, 0x4F, IAP_F_FM | IAP_F_ALLCPUS), + IAP_F_ALLCPUSCORE2), + IAPDESCR(2EH_01H, 0x2E, 0x01, IAP_F_FM | IAP_F_WM), + IAPDESCR(2EH_02H, 0x2E, 0x02, IAP_F_FM | IAP_F_WM), + IAPDESCR(2EH_41H, 0x2E, 0x41, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7), + IAPDESCR(2EH_4FH, 0x2E, 0x4F, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7), IAPDESCR(30H, 0x30, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, - IAP_F_ALLCPUS), + IAP_F_ALLCPUSCORE2), IAPDESCR(32H, 0x32, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_CC), IAPDESCR(32H, 0x32, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(3AH, 0x3A, IAP_M_TRANSITION, IAP_F_CC), IAPDESCR(3AH_00H, 0x3A, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(3BH_C0H, 0x3B, 0xC0, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(3BH_C0H, 0x3B, 0xC0, IAP_F_FM | IAP_F_ALLCPUSCORE2), + + IAPDESCR(3CH_00H, 0x3C, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(3CH_01H, 0x3C, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(3CH_00H, 0x3C, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(3CH_01H, 0x3C, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(3DH_01H, 0x3D, 0x01, IAP_F_FM | IAP_F_I7O), IAPDESCR(40H, 0x40, IAP_M_MESI, IAP_F_CC | IAP_F_CC2), + IAPDESCR(40H_01H, 0x40, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(40H_02H, 0x40, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(40H_04H, 0x40, 0x04, IAP_F_FM | IAP_F_I7), + IAPDESCR(40H_08H, 0x40, 0x08, IAP_F_FM | IAP_F_I7), + IAPDESCR(40H_0FH, 0x40, 0x0F, IAP_F_FM | IAP_F_I7), IAPDESCR(40H_21H, 0x40, 0x21, IAP_F_FM | IAP_F_CA), IAPDESCR(41H, 0x41, IAP_M_MESI, IAP_F_CC | IAP_F_CC2), + IAPDESCR(41H_01H, 0x41, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(41H_02H, 0x41, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(41H_04H, 0x41, 0x04, IAP_F_FM | IAP_F_I7), + IAPDESCR(41H_08H, 0x41, 0x08, IAP_F_FM | IAP_F_I7), + IAPDESCR(41H_0FH, 0x41, 0x0F, IAP_F_FM | IAP_F_I7O), IAPDESCR(41H_22H, 0x41, 0x22, IAP_F_FM | IAP_F_CA), - IAPDESCR(42H, 0x42, IAP_M_MESI, IAP_F_ALLCPUS), + IAPDESCR(42H, 0x42, IAP_M_MESI, IAP_F_ALLCPUSCORE2), + IAPDESCR(42H_01H, 0x42, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(42H_02H, 0x42, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(42H_04H, 0x42, 0x04, IAP_F_FM | IAP_F_I7), + IAPDESCR(42H_08H, 0x42, 0x08, IAP_F_FM | IAP_F_I7), IAPDESCR(42H_10H, 0x42, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(43H_01H, 0x43, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(43H_02H, 0x43, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(43H_01H, 0x43, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7), + IAPDESCR(43H_02H, 0x43, 0x02, IAP_F_FM | IAP_F_CA | + IAP_F_CC2 | IAP_F_I7), IAPDESCR(44H_02H, 0x44, 0x02, IAP_F_FM | IAP_F_CC), - IAPDESCR(45H_0FH, 0x45, 0x0F, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(45H_0FH, 0x45, 0x0F, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(46H_00H, 0x46, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(47H_00H, 0x47, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(48H_00H, 0x48, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(46H_00H, 0x46, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(47H_00H, 0x47, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(49H_00H, 0x49, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(49H_01H, 0x49, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(49H_02H, 0x49, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(48H_00H, 0x48, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(48H_02H, 0x48, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(4BH_00H, 0x4B, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(4BH_01H, 0x4B, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(4BH_02H, 0x4B, 0x02, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(49H_00H, 0x49, 0x00, IAP_F_FM | IAP_F_CC), + IAPDESCR(49H_01H, 0x49, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(49H_02H, 0x49, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(49H_04H, 0x49, 0x04, IAP_F_FM | IAP_F_WM), + IAPDESCR(49H_10H, 0x49, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7O), + IAPDESCR(49H_40H, 0x49, 0x40, IAP_F_FM | IAP_F_I7O), + IAPDESCR(49H_80H, 0x49, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + + IAPDESCR(4BH_00H, 0x4B, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(4BH_01H, 0x4B, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7O), + IAPDESCR(4BH_02H, 0x4B, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(4BH_03H, 0x4B, 0x03, IAP_F_FM | IAP_F_CC), + IAPDESCR(4BH_08H, 0x4B, 0x08, IAP_F_FM | IAP_F_I7O), IAPDESCR(4CH_00H, 0x4C, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(4CH_01H, 0x4C, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(4DH_01H, 0x4D, 0x01, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(4EH_01H, 0x4E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(4EH_02H, 0x4E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(4EH_04H, 0x4E, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(4EH_10H, 0x4E, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(4FH_00H, 0x4F, 0x00, IAP_F_FM | IAP_F_CC), - - IAPDESCR(60H, 0x60, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), + IAPDESCR(4FH_02H, 0x4F, 0x02, IAP_F_FM | IAP_F_I7O), + IAPDESCR(4FH_04H, 0x4F, 0x04, IAP_F_FM | IAP_F_I7O), + IAPDESCR(4FH_08H, 0x4F, 0x08, IAP_F_FM | IAP_F_I7O), + IAPDESCR(4FH_10H, 0x4F, 0x10, IAP_F_FM | IAP_F_WM), + + IAPDESCR(51H_01H, 0x51, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(51H_02H, 0x51, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(51H_04H, 0x51, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(51H_08H, 0x51, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(52H_01H, 0x52, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(53H_01H, 0x53, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(60H, 0x60, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + IAPDESCR(60H_01H, 0x60, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(60H_02H, 0x60, 0x02, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(60H_04H, 0x60, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(60H_08H, 0x60, 0x08, IAP_F_FM | IAP_F_WM | IAP_F_I7O), IAPDESCR(61H, 0x61, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), IAPDESCR(61H_00H, 0x61, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(62H, 0x62, IAP_M_AGENT, IAP_F_ALLCPUS), + IAPDESCR(62H, 0x62, IAP_M_AGENT, IAP_F_ALLCPUSCORE2), IAPDESCR(62H_00H, 0x62, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(63H, 0x63, IAP_M_AGENT | IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(63H, 0x63, IAP_M_CORE, IAP_F_CC), + IAPDESCR(63H_01H, 0x63, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(63H_02H, 0x63, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(64H, 0x64, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(64H_40H, 0x64, 0x40, IAP_F_FM | IAP_F_CC), @@ -723,16 +893,18 @@ static struct iap_event_descr iap_events IAP_F_CA | IAP_F_CC2), IAPDESCR(65H, 0x65, IAP_M_CORE, IAP_F_CC), - IAPDESCR(66H, 0x66, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), + IAPDESCR(66H, 0x66, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(67H, 0x67, IAP_M_AGENT | IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(67H, 0x67, IAP_M_AGENT, IAP_F_CC), - IAPDESCR(68H, 0x68, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(69H, 0x69, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(6AH, 0x6A, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(6BH, 0x6B, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(6CH, 0x6C, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), + IAPDESCR(68H, 0x68, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + IAPDESCR(69H, 0x69, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + IAPDESCR(6AH, 0x6A, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + IAPDESCR(6BH, 0x6B, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + + IAPDESCR(6CH, 0x6C, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + IAPDESCR(6CH_01H, 0x6C, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(6DH, 0x6D, IAP_M_AGENT | IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(6DH, 0x6D, IAP_M_CORE, IAP_F_CC), @@ -757,47 +929,89 @@ static struct iap_event_descr iap_events IAPDESCR(7BH, 0x7B, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), - IAPDESCR(7DH, 0x7D, IAP_M_CORE, IAP_F_ALLCPUS), + IAPDESCR(7DH, 0x7D, IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(7EH, 0x7E, IAP_M_AGENT | IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(7EH_00H, 0x7E, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(7FH, 0x7F, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), - IAPDESCR(80H_00H, 0x80, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(80H_02H, 0x80, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_I7), - IAPDESCR(80H_03H, 0x80, 0x03, IAP_F_FM | IAP_F_CA | IAP_F_I7), - - IAPDESCR(81H_00H, 0x81, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(80H_00H, 0x80, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(80H_01H, 0x80, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(80H_02H, 0x80, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_I7 | + IAP_F_WM), + IAPDESCR(80H_03H, 0x80, 0x03, IAP_F_FM | IAP_F_CA | IAP_F_I7 | + IAP_F_WM), + IAPDESCR(80H_04H, 0x80, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(81H_00H, 0x81, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(81H_01H, 0x81, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(81H_02H, 0x81, 0x02, IAP_F_FM | IAP_F_I7O), + IAPDESCR(82H_01H, 0x82, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(82H_02H, 0x82, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(82H_04H, 0x82, 0x04, IAP_F_FM | IAP_F_CA), IAPDESCR(82H_10H, 0x82, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(82H_12H, 0x82, 0x12, IAP_F_FM | IAP_F_CC2), IAPDESCR(82H_40H, 0x82, 0x40, IAP_F_FM | IAP_F_CC2), + IAPDESCR(83H_01H, 0x83, 0x01, IAP_F_FM | IAP_F_I7O), IAPDESCR(83H_02H, 0x83, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(85H_00H, 0x85, 0x00, IAP_F_FM | IAP_F_CC), - - IAPDESCR(86H_00H, 0x86, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - - IAPDESCR(87H_00H, 0x87, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - - IAPDESCR(88H_00H, 0x88, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(89H_00H, 0x89, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8AH_00H, 0x8A, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8BH_00H, 0x8B, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8CH_00H, 0x8C, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8DH_00H, 0x8D, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8EH_00H, 0x8E, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8FH_00H, 0x8F, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - - IAPDESCR(90H_00H, 0x90, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(91H_00H, 0x91, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(92H_00H, 0x92, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(93H_00H, 0x93, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(94H_00H, 0x94, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(85H_01H, 0x85, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(85H_02H, 0x85, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(85H_04H, 0x85, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(85H_10H, 0x85, 0x10, IAP_F_FM | IAP_F_I7O), + IAPDESCR(85H_20H, 0x85, 0x20, IAP_F_FM | IAP_F_I7O), + IAPDESCR(85H_40H, 0x85, 0x40, IAP_F_FM | IAP_F_I7O), + IAPDESCR(85H_80H, 0x85, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + + IAPDESCR(86H_00H, 0x86, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + + IAPDESCR(87H_00H, 0x87, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(87H_01H, 0x87, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(87H_02H, 0x87, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(87H_04H, 0x87, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(87H_08H, 0x87, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(87H_0FH, 0x87, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(88H_00H, 0x88, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(88H_01H, 0x88, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_02H, 0x88, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_04H, 0x88, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_07H, 0x88, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_08H, 0x88, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_10H, 0x88, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_20H, 0x88, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_30H, 0x88, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_40H, 0x88, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_7FH, 0x88, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(89H_00H, 0x89, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(89H_01H, 0x89, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_02H, 0x89, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_04H, 0x89, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_07H, 0x89, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_08H, 0x89, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_10H, 0x89, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_20H, 0x89, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_30H, 0x89, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_40H, 0x89, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_7FH, 0x89, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(8AH_00H, 0x8A, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(8BH_00H, 0x8B, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(8CH_00H, 0x8C, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(8DH_00H, 0x8D, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(8EH_00H, 0x8E, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(8FH_00H, 0x8F, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + + IAPDESCR(90H_00H, 0x90, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(91H_00H, 0x91, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(92H_00H, 0x92, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(93H_00H, 0x93, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(94H_00H, 0x94, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(97H_00H, 0x97, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(98H_00H, 0x98, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -811,6 +1025,18 @@ static struct iap_event_descr iap_events IAPDESCR(A1H_20H, 0xA1, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(A2H_00H, 0xA2, 0x00, IAP_F_FM | IAP_F_CC), + IAPDESCR(A2H_01H, 0xA2, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_02H, 0xA2, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_04H, 0xA2, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_08H, 0xA2, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_10H, 0xA2, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_20H, 0xA2, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_40H, 0xA2, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_80H, 0xA2, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A7H_01H, 0xA7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(AAH_01H, 0xAA, 0x01, IAP_F_FM | IAP_F_CC2), IAPDESCR(AAH_02H, 0xAA, 0x02, IAP_F_FM | IAP_F_CA), @@ -820,18 +1046,42 @@ static struct iap_event_descr iap_events IAPDESCR(ABH_01H, 0xAB, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(ABH_02H, 0xAB, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(B0H_00H, 0xB0, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B0H_80H, 0xB0, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(AEH_01H, 0xAE, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(B1H_00H, 0xB1, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B1H_80H, 0xB1, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_I7), - - IAPDESCR(B3H_01H, 0xB3, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B3H_02H, 0xB3, 0x02, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B3H_04H, 0xB3, 0x04, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B3H_08H, 0xB3, 0x08, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B3H_10H, 0xB3, 0x10, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B3H_20H, 0xB3, 0x20, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(B0H_00H, 0xB0, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(B0H_01H, 0xB0, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_02H, 0xB0, 0x02, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_04H, 0xB0, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_08H, 0xB0, 0x08, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_10H, 0xB0, 0x10, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_20H, 0xB0, 0x20, IAP_F_FM | IAP_F_I7O), + IAPDESCR(B0H_40H, 0xB0, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B0H_80H, 0xB0, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_WM | IAP_F_I7O), + + IAPDESCR(B1H_00H, 0xB1, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(B1H_01H, 0xB1, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_02H, 0xB1, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_04H, 0xB1, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_08H, 0xB1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_10H, 0xB1, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_1FH, 0xB1, 0x1F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_20H, 0xB1, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_3FH, 0xB1, 0x3F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_40H, 0xB1, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_80H, 0xB1, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_I7 | + IAP_F_WM), + + IAPDESCR(B2H_01H, 0xB2, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(B3H_01H, 0xB3, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_WM | IAP_F_I7O), + IAPDESCR(B3H_02H, 0xB3, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_WM | IAP_F_I7O), + IAPDESCR(B3H_04H, 0xB3, 0x04, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_WM | IAP_F_I7O), + IAPDESCR(B3H_08H, 0xB3, 0x08, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(B3H_10H, 0xB3, 0x10, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(B3H_20H, 0xB3, 0x20, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(B3H_81H, 0xB3, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(B3H_82H, 0xB3, 0x82, IAP_F_FM | IAP_F_CA), IAPDESCR(B3H_84H, 0xB3, 0x84, IAP_F_FM | IAP_F_CA), @@ -839,10 +1089,28 @@ static struct iap_event_descr iap_events IAPDESCR(B3H_90H, 0xB3, 0x90, IAP_F_FM | IAP_F_CA), IAPDESCR(B3H_A0H, 0xB3, 0xA0, IAP_F_FM | IAP_F_CA), - IAPDESCR(C0H_00H, 0xC0, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(C0H_01H, 0xC0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C0H_02H, 0xC0, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C0H_04H, 0xC0, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(B4H_01H, 0xB4, 0x01, IAP_F_FM | IAP_F_WM), + IAPDESCR(B4H_02H, 0xB4, 0x02, IAP_F_FM | IAP_F_WM), + IAPDESCR(B4H_04H, 0xB4, 0x04, IAP_F_FM | IAP_F_WM), + + IAPDESCR(B7H_01H, 0xB7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(B8H_01H, 0xB8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B8H_02H, 0xB8, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B8H_04H, 0xB8, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(BAH_01H, 0xBA, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(BAH_02H, 0xBA, 0x02, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(BBH_01H, 0xBB, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(C0H_00H, 0xC0, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(C0H_01H, 0xC0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C0H_02H, 0xC0, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C0H_04H, 0xC0, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(C0H_08H, 0xC0, 0x08, IAP_F_FM | IAP_F_CC2E), IAPDESCR(C1H_00H, 0xC1, 0x00, IAP_F_FM | IAP_F_CC), @@ -850,43 +1118,64 @@ static struct iap_event_descr iap_events IAPDESCR(C1H_FEH, 0xC1, 0xFE, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C2H_00H, 0xC2, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(C2H_01H, 0xC2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C2H_02H, 0xC2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C2H_04H, 0xC2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(C2H_01H, 0xC2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C2H_02H, 0xC2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C2H_04H, 0xC2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(C2H_07H, 0xC2, 0x07, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C2H_08H, 0xC2, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C2H_0FH, 0xC2, 0x0F, IAP_F_FM | IAP_F_CC2), IAPDESCR(C2H_10H, 0xC2, 0x10, IAP_F_FM | IAP_F_CA), IAPDESCR(C3H_00H, 0xC3, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(C3H_01H, 0xC3, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C3H_04H, 0xC3, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - - IAPDESCR(C4H_00H, 0xC4, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(C4H_01H, 0xC4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C4H_02H, 0xC4, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C4H_04H, 0xC4, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(C3H_01H, 0xC3, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C3H_02H, 0xC3, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(C3H_04H, 0xC3, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C3H_10H, 0xC3, 0x10, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(C4H_00H, 0xC4, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C4H_01H, 0xC4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C4H_02H, 0xC4, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C4H_04H, 0xC4, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(C4H_08H, 0xC4, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C4H_0CH, 0xC4, 0x0C, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C4H_0FH, 0xC4, 0x0F, IAP_F_FM | IAP_F_CA), - IAPDESCR(C5H_00H, 0xC5, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(C5H_00H, 0xC5, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C5H_01H, 0xC5, 0x01, IAP_F_FM | IAP_F_WM), + IAPDESCR(C5H_02H, 0xC5, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(C5H_04H, 0xC5, 0x04, IAP_F_FM | IAP_F_WM), IAPDESCR(C6H_00H, 0xC6, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(C6H_01H, 0xC6, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C6H_02H, 0xC6, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C7H_00H, 0xC7, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(C7H_01H, 0xC7, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C7H_02H, 0xC7, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C7H_04H, 0xC7, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C7H_08H, 0xC7, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C7H_10H, 0xC7, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(C7H_01H, 0xC7, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C7H_02H, 0xC7, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C7H_04H, 0xC7, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C7H_08H, 0xC7, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C7H_10H, 0xC7, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(C7H_1FH, 0xC7, 0x1F, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(C8H_00H, 0xC8, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(C8H_00H, 0xC8, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(C8H_20H, 0xC8, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(C9H_00H, 0xC9, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(C9H_00H, 0xC9, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(CAH_00H, 0xCA, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(CAH_01H, 0xCA, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -894,36 +1183,59 @@ static struct iap_event_descr iap_events IAPDESCR(CAH_04H, 0xCA, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(CAH_08H, 0xCA, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(CBH_01H, 0xCB, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(CBH_02H, 0xCB, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(CBH_04H, 0xCB, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(CBH_08H, 0xCB, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(CBH_10H, 0xCB, 0x10, IAP_F_FM | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(CBH_01H, 0xCB, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CBH_02H, 0xCB, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CBH_04H, 0xCB, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CBH_08H, 0xCB, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CBH_10H, 0xCB, 0x10, IAP_F_FM | IAP_F_CC2 | IAP_F_I7 | + IAP_F_WM), + IAPDESCR(CBH_40H, 0xCB, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(CBH_80H, 0xCB, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(CCH_00H, 0xCC, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(CCH_01H, 0xCC, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(CCH_02H, 0xCC, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(CCH_01H, 0xCC, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CCH_02H, 0xCC, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CCH_03H, 0xCC, 0x03, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(CDH_00H, 0xCD, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(CEH_00H, 0xCE, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(CDH_00H, 0xCD, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(CEH_00H, 0xCE, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(CFH_00H, 0xCF, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D0H_00H, 0xD0, 0x00, IAP_F_FM | IAP_F_CC), + IAPDESCR(D0H_01H, 0xD0, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(D2H_01H, 0xD2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(D2H_02H, 0xD2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(D2H_04H, 0xD2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(D2H_08H, 0xD2, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(D2H_0FH, 0xD2, 0x0F, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(D1H_01H, 0xD1, 0x01, IAP_F_FM | IAP_F_WM), + IAPDESCR(D1H_02H, 0xD1, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(D1H_04H, 0xD1, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(D1H_08H, 0xD1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(D2H_01H, 0xD2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(D2H_02H, 0xD2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(D2H_04H, 0xD2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(D2H_08H, 0xD2, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(D2H_0FH, 0xD2, 0x0F, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(D2H_10H, 0xD2, 0x10, IAP_F_FM | IAP_F_CC2E), - IAPDESCR(D4H_01H, 0xD4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(D4H_01H, 0xD4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(D4H_02H, 0xD4, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D4H_04H, 0xD4, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D4H_08H, 0xD4, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D4H_0FH, 0xD4, 0x0F, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(D5H_01H, 0xD5, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(D5H_01H, 0xD5, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(D5H_02H, 0xD5, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D5H_04H, 0xD5, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D5H_08H, 0xD5, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -947,6 +1259,7 @@ static struct iap_event_descr iap_events IAPDESCR(DAH_02H, 0xDA, 0x02, IAP_F_FM | IAP_F_CC), IAPDESCR(DBH_00H, 0xDB, 0x00, IAP_F_FM | IAP_F_CC), + IAPDESCR(DBH_01H, 0xDB, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(DCH_01H, 0xDC, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(DCH_02H, 0xDC, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -956,276 +1269,76 @@ static struct iap_event_descr iap_events IAPDESCR(DCH_1FH, 0xDC, 0x1F, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(E0H_00H, 0xE0, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(E0H_01H, 0xE0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(E0H_01H, 0xE0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | + IAP_F_WM), IAPDESCR(E2H_00H, 0xE2, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(E4H_00H, 0xE4, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(E6H_00H, 0xE6, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(E6H_01H, 0xE6, 0x01, IAP_F_FM | IAP_F_CA), + IAPDESCR(E4H_00H, 0xE4, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(E4H_01H, 0xE4, 0x01, IAP_F_FM | IAP_F_I7O), - IAPDESCR(F0H_00H, 0xF0, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(F8H_00H, 0xF8, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(E5H_01H, 0xE5, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - /* Added with nehalem. */ - IAPDESCR(02H_01H, 0x02, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(03H_01H, 0x03, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(05H_02H, 0x05, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(05H_03H, 0x05, 0x03, IAP_F_FM | IAP_F_I7), - IAPDESCR(06H_01H, 0x06, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(06H_02H, 0x06, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(06H_04H, 0x06, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(06H_08H, 0x06, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(06H_0FH, 0x06, 0x0F, IAP_F_FM | IAP_F_I7), - IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(09H_04H, 0x09, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(09H_08H, 0x09, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(0BH_01H, 0x0B, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(0BH_02H, 0x0B, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(0FH_02H, 0x0F, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(0FH_08H, 0x0F, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(0FH_10H, 0x0F, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(0FH_20H, 0x0F, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_02H, 0x10, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_04H, 0x10, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_08H, 0x10, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_10H, 0x10, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_20H, 0x10, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_40H, 0x10, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_80H, 0x10, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_02H, 0x12, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_04H, 0x12, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_08H, 0x12, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_10H, 0x12, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_20H, 0x12, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_40H, 0x12, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(13H_02H, 0x13, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(13H_04H, 0x13, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(13H_07H, 0x13, 0x07, IAP_F_FM | IAP_F_I7), - IAPDESCR(14H_02H, 0x14, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(17H_01H, 0x17, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(18H_01H, 0x18, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(1DH_01H, 0x1D, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(1DH_02H, 0x1D, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(1DH_04H, 0x1D, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(1EH_01H, 0x1E, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_01H, 0x24, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_02H, 0x24, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_03H, 0x24, 0x03, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_04H, 0x24, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_08H, 0x24, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_0CH, 0x24, 0x0C, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_10H, 0x24, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_20H, 0x24, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_40H, 0x24, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_80H, 0x24, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_C0H, 0x24, 0xC0, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_01H, 0x26, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_02H, 0x26, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_04H, 0x26, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_08H, 0x26, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_0FH, 0x26, 0x0F, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_10H, 0x26, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_20H, 0x26, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_40H, 0x26, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_80H, 0x26, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_F0H, 0x26, 0xF0, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_FFH, 0x26, 0xFF, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_01H, 0x27, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_02H, 0x27, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_04H, 0x27, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_08H, 0x27, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_0EH, 0x27, 0x0E, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_0FH, 0x27, 0x0F, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_10H, 0x27, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_20H, 0x27, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_40H, 0x27, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_80H, 0x27, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_E0H, 0x27, 0xE0, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_F0H, 0x27, 0xF0, IAP_F_FM | IAP_F_I7), - IAPDESCR(28H_01H, 0x28, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(28H_02H, 0x28, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(28H_04H, 0x28, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(28H_08H, 0x28, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(28H_0FH, 0x28, 0x0F, IAP_F_FM | IAP_F_I7), - IAPDESCR(3DH_01H, 0x3D, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(40H_01H, 0x40, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(40H_02H, 0x40, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(40H_04H, 0x40, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(40H_08H, 0x40, 0x08, IAP_F_FM | IAP_F_I7), *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri Apr 16 15:45:10 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1705C106564A; Fri, 16 Apr 2010 15:45:10 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 033678FC17; Fri, 16 Apr 2010 15:45:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3GFjAa3066982; Fri, 16 Apr 2010 15:45:10 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3GFj9eP066977; Fri, 16 Apr 2010 15:45:09 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201004161545.o3GFj9eP066977@svn.freebsd.org> From: Fabien Thomas Date: Fri, 16 Apr 2010 15:45:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206702 - stable/8/lib/libpmc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 15:45:10 -0000 Author: fabient Date: Fri Apr 16 15:45:09 2010 New Revision: 206702 URL: http://svn.freebsd.org/changeset/base/206702 Log: MFC r206089, r206684: - Support for uncore counting events: one fixed PMC with the uncore domain clock, 8 programmable PMC. - Westmere based CPU (Xeon 5600, Corei7 980X) support. - New man pages with events list for core and uncore. - Updated Corei7 events with Intel 253669-033US December 2009 doc. There is some removed events in the documentation, they have been kept in the code but documented in the man page as obsolete. - Offcore response events can be setup with rsp token. Sponsored by: NETASQ Added: stable/8/lib/libpmc/pmc.corei7.3 - copied unchanged from r206089, head/lib/libpmc/pmc.corei7.3 stable/8/lib/libpmc/pmc.corei7uc.3 - copied unchanged from r206089, head/lib/libpmc/pmc.corei7uc.3 stable/8/lib/libpmc/pmc.ucf.3 - copied unchanged from r206089, head/lib/libpmc/pmc.ucf.3 stable/8/lib/libpmc/pmc.westmere.3 - copied unchanged from r206089, head/lib/libpmc/pmc.westmere.3 stable/8/lib/libpmc/pmc.westmereuc.3 - copied unchanged from r206089, head/lib/libpmc/pmc.westmereuc.3 Modified: stable/8/lib/libpmc/Makefile stable/8/lib/libpmc/libpmc.c Directory Properties: stable/8/lib/libpmc/ (props changed) Modified: stable/8/lib/libpmc/Makefile ============================================================================== --- stable/8/lib/libpmc/Makefile Fri Apr 16 15:43:24 2010 (r206701) +++ stable/8/lib/libpmc/Makefile Fri Apr 16 15:45:09 2010 (r206702) @@ -28,11 +28,16 @@ MAN+= pmc.atom.3 MAN+= pmc.core.3 MAN+= pmc.core2.3 MAN+= pmc.iaf.3 +MAN+= pmc.ucf.3 MAN+= pmc.k7.3 MAN+= pmc.k8.3 MAN+= pmc.p4.3 MAN+= pmc.p5.3 MAN+= pmc.p6.3 +MAN+= pmc.corei7.3 +MAN+= pmc.corei7uc.3 +MAN+= pmc.westmere.3 +MAN+= pmc.westmereuc.3 MAN+= pmc.tsc.3 MLINKS+= \ Modified: stable/8/lib/libpmc/libpmc.c ============================================================================== --- stable/8/lib/libpmc/libpmc.c Fri Apr 16 15:43:24 2010 (r206701) +++ stable/8/lib/libpmc/libpmc.c Fri Apr 16 15:45:09 2010 (r206702) @@ -54,6 +54,10 @@ static int iaf_allocate_pmc(enum pmc_eve struct pmc_op_pmcallocate *_pmc_config); static int iap_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); +static int ucf_allocate_pmc(enum pmc_event _pe, char *_ctrspec, + struct pmc_op_pmcallocate *_pmc_config); +static int ucp_allocate_pmc(enum pmc_event _pe, char *_ctrspec, + struct pmc_op_pmcallocate *_pmc_config); static int k8_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); static int p4_allocate_pmc(enum pmc_event _pe, char *_ctrspec, @@ -132,6 +136,7 @@ PMC_CLASSDEP_TABLE(k8, K8); PMC_CLASSDEP_TABLE(p4, P4); PMC_CLASSDEP_TABLE(p5, P5); PMC_CLASSDEP_TABLE(p6, P6); +PMC_CLASSDEP_TABLE(ucf, UCF); #undef __PMC_EV_ALIAS #define __PMC_EV_ALIAS(N,CODE) { N, PMC_EV_##CODE }, @@ -157,6 +162,21 @@ static const struct pmc_event_descr core __PMC_EV_ALIAS_COREI7() }; +static const struct pmc_event_descr westmere_event_table[] = +{ + __PMC_EV_ALIAS_WESTMERE() +}; + +static const struct pmc_event_descr corei7uc_event_table[] = +{ + __PMC_EV_ALIAS_COREI7UC() +}; + +static const struct pmc_event_descr westmereuc_event_table[] = +{ + __PMC_EV_ALIAS_WESTMEREUC() +}; + /* * PMC_MDEP_TABLE(NAME, PRIMARYCLASS, ADDITIONAL_CLASSES...) * @@ -170,7 +190,8 @@ static const struct pmc_event_descr core PMC_MDEP_TABLE(atom, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(core, IAP, PMC_CLASS_TSC); PMC_MDEP_TABLE(core2, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); -PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); +PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); +PMC_MDEP_TABLE(westmere, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(k7, K7, PMC_CLASS_TSC); PMC_MDEP_TABLE(k8, K8, PMC_CLASS_TSC); PMC_MDEP_TABLE(p4, P4, PMC_CLASS_TSC); @@ -201,6 +222,10 @@ PMC_CLASS_TABLE_DESC(atom, IAP, atom, ia PMC_CLASS_TABLE_DESC(core, IAP, core, iap); PMC_CLASS_TABLE_DESC(core2, IAP, core2, iap); PMC_CLASS_TABLE_DESC(corei7, IAP, corei7, iap); +PMC_CLASS_TABLE_DESC(westmere, IAP, westmere, iap); +PMC_CLASS_TABLE_DESC(ucf, UCF, ucf, ucf); +PMC_CLASS_TABLE_DESC(corei7uc, UCP, corei7uc, ucp); +PMC_CLASS_TABLE_DESC(westmereuc, UCP, westmereuc, ucp); #endif #if defined(__i386__) PMC_CLASS_TABLE_DESC(k7, K7, k7, k7); @@ -281,7 +306,7 @@ struct pmc_masks { const uint32_t pm_value; }; #define PMCMASK(N,V) { .pm_name = #N, .pm_value = (V) } -#define NULLMASK PMCMASK(NULL,0) +#define NULLMASK { .pm_name = NULL } #if defined(__amd64__) || defined(__i386__) static int @@ -474,6 +499,8 @@ static struct pmc_event_alias core2_alia #define atom_aliases_without_iaf core2_aliases_without_iaf #define corei7_aliases core2_aliases #define corei7_aliases_without_iaf core2_aliases_without_iaf +#define westmere_aliases core2_aliases +#define westmere_aliases_without_iaf core2_aliases_without_iaf #define IAF_KW_OS "os" #define IAF_KW_USR "usr" @@ -524,6 +551,7 @@ iaf_allocate_pmc(enum pmc_event pe, char #define IAP_KW_SNOOPTYPE "snooptype" #define IAP_KW_TRANSITION "trans" #define IAP_KW_USR "usr" +#define IAP_KW_RSP "rsp" static struct pmc_masks iap_core_mask[] = { PMCMASK(all, (0x3 << 14)), @@ -571,19 +599,38 @@ static struct pmc_masks iap_transition_m NULLMASK }; +static struct pmc_masks iap_rsp_mask[] = { + PMCMASK(DMND_DATA_RD, (1 << 0)), + PMCMASK(DMND_RFO, (1 << 1)), + PMCMASK(DMND_IFETCH, (1 << 2)), + PMCMASK(WB, (1 << 3)), + PMCMASK(PF_DATA_RD, (1 << 4)), + PMCMASK(PF_RFO, (1 << 5)), + PMCMASK(PF_IFETCH, (1 << 6)), + PMCMASK(OTHER, (1 << 7)), + PMCMASK(UNCORE_HIT, (1 << 8)), + PMCMASK(OTHER_CORE_HIT_SNP, (1 << 9)), + PMCMASK(OTHER_CORE_HITM, (1 << 10)), + PMCMASK(REMOTE_CACHE_FWD, (1 << 12)), + PMCMASK(REMOTE_DRAM, (1 << 13)), + PMCMASK(LOCAL_DRAM, (1 << 14)), + PMCMASK(NON_DRAM, (1 << 15)), + NULLMASK +}; + static int iap_allocate_pmc(enum pmc_event pe, char *ctrspec, struct pmc_op_pmcallocate *pmc_config) { char *e, *p, *q; - uint32_t cachestate, evmask; + uint32_t cachestate, evmask, rsp; int count, n; pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE | PMC_CAP_QUALIFIER); pmc_config->pm_md.pm_iap.pm_iap_config = 0; - cachestate = evmask = 0; + cachestate = evmask = rsp = 0; /* Parse additional modifiers if present */ while ((p = strsep(&ctrspec, ",")) != NULL) { @@ -630,8 +677,7 @@ iap_allocate_pmc(enum pmc_event pe, char return (-1); } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_ATOM || cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2 || - cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2EXTREME || - cpu_info.pm_cputype == PMC_CPU_INTEL_COREI7) { + cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2EXTREME) { if (KWPREFIXMATCH(p, IAP_KW_SNOOPRESPONSE "=")) { n = pmc_parse_mask(iap_snoopresponse_mask, p, &evmask); @@ -640,6 +686,12 @@ iap_allocate_pmc(enum pmc_event pe, char &evmask); } else return (-1); + } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_COREI7 || + cpu_info.pm_cputype == PMC_CPU_INTEL_WESTMERE) { + if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { + n = pmc_parse_mask(iap_rsp_mask, p, &rsp); + } else + return (-1); } else return (-1); @@ -672,6 +724,69 @@ iap_allocate_pmc(enum pmc_event pe, char } pmc_config->pm_md.pm_iap.pm_iap_config |= cachestate; + pmc_config->pm_md.pm_iap.pm_iap_rsp = rsp; + + return (0); +} + +/* + * Intel Uncore. + */ + +static int +ucf_allocate_pmc(enum pmc_event pe, char *ctrspec, + struct pmc_op_pmcallocate *pmc_config) +{ + (void) pe; + (void) ctrspec; + + pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); + pmc_config->pm_md.pm_ucf.pm_ucf_flags = 0; + + return (0); +} + +#define UCP_KW_CMASK "cmask" +#define UCP_KW_EDGE "edge" +#define UCP_KW_INV "inv" + +static int +ucp_allocate_pmc(enum pmc_event pe, char *ctrspec, + struct pmc_op_pmcallocate *pmc_config) +{ + char *e, *p, *q; + int count, n; + + (void) pe; + + pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE | + PMC_CAP_QUALIFIER); + pmc_config->pm_md.pm_ucp.pm_ucp_config = 0; + + /* Parse additional modifiers if present */ + while ((p = strsep(&ctrspec, ",")) != NULL) { + + n = 0; + if (KWPREFIXMATCH(p, UCP_KW_CMASK "=")) { + q = strchr(p, '='); + if (*++q == '\0') /* skip '=' */ + return (-1); + count = strtol(q, &e, 0); + if (e == q || *e != '\0') + return (-1); + pmc_config->pm_caps |= PMC_CAP_THRESHOLD; + pmc_config->pm_md.pm_ucp.pm_ucp_config |= + UCP_CMASK(count); + } else if (KWMATCH(p, UCP_KW_EDGE)) { + pmc_config->pm_caps |= PMC_CAP_EDGE; + } else if (KWMATCH(p, UCP_KW_INV)) { + pmc_config->pm_caps |= PMC_CAP_INVERT; + } else + return (-1); + + if (n < 0) /* Parsing failed. */ + return (-1); + } return (0); } @@ -2309,6 +2424,31 @@ pmc_event_names_of_class(enum pmc_class ev = corei7_event_table; count = PMC_EVENT_TABLE_SIZE(corei7); break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmere_event_table; + count = PMC_EVENT_TABLE_SIZE(westmere); + break; + } + break; + case PMC_CLASS_UCF: + ev = ucf_event_table; + count = PMC_EVENT_TABLE_SIZE(ucf); + break; + case PMC_CLASS_UCP: + /* + * Return the most appropriate set of event name + * spellings for the current CPU. + */ + switch (cpu_info.pm_cputype) { + default: + case PMC_CPU_INTEL_COREI7: + ev = corei7uc_event_table; + count = PMC_EVENT_TABLE_SIZE(corei7uc); + break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmereuc_event_table; + count = PMC_EVENT_TABLE_SIZE(westmereuc); + break; } break; case PMC_CLASS_TSC: @@ -2514,8 +2654,15 @@ pmc_init(void) PMC_MDEP_INIT_INTEL_V2(core2); break; case PMC_CPU_INTEL_COREI7: + pmc_class_table[n++] = &ucf_class_table_descr; + pmc_class_table[n++] = &corei7uc_class_table_descr; PMC_MDEP_INIT_INTEL_V2(corei7); break; + case PMC_CPU_INTEL_WESTMERE: + pmc_class_table[n++] = &ucf_class_table_descr; + pmc_class_table[n++] = &westmereuc_class_table_descr; + PMC_MDEP_INIT_INTEL_V2(westmere); + break; case PMC_CPU_INTEL_PIV: PMC_MDEP_INIT(p4); pmc_class_table[n] = &p4_class_table_descr; @@ -2618,10 +2765,30 @@ _pmc_name_of_event(enum pmc_event pe, en ev = corei7_event_table; evfence = corei7_event_table + PMC_EVENT_TABLE_SIZE(corei7); break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmere_event_table; + evfence = westmere_event_table + PMC_EVENT_TABLE_SIZE(westmere); + break; + default: /* Unknown CPU type. */ + break; + } + } else if (pe >= PMC_EV_UCF_FIRST && pe <= PMC_EV_UCF_LAST) { + ev = ucf_event_table; + evfence = ucf_event_table + PMC_EVENT_TABLE_SIZE(ucf); + } else if (pe >= PMC_EV_UCP_FIRST && pe <= PMC_EV_UCP_LAST) { + switch (cpu) { + case PMC_CPU_INTEL_COREI7: + ev = corei7uc_event_table; + evfence = corei7uc_event_table + PMC_EVENT_TABLE_SIZE(corei7uc); + break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmereuc_event_table; + evfence = westmereuc_event_table + PMC_EVENT_TABLE_SIZE(westmereuc); + break; default: /* Unknown CPU type. */ break; } - } if (pe >= PMC_EV_K7_FIRST && pe <= PMC_EV_K7_LAST) { + } else if (pe >= PMC_EV_K7_FIRST && pe <= PMC_EV_K7_LAST) { ev = k7_event_table; evfence = k7_event_table + PMC_EVENT_TABLE_SIZE(k7); } else if (pe >= PMC_EV_K8_FIRST && pe <= PMC_EV_K8_LAST) { Copied: stable/8/lib/libpmc/pmc.corei7.3 (from r206089, head/lib/libpmc/pmc.corei7.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/lib/libpmc/pmc.corei7.3 Fri Apr 16 15:45:09 2010 (r206702, copy of r206089, head/lib/libpmc/pmc.corei7.3) @@ -0,0 +1,1581 @@ +.\" Copyright (c) 2010 Fabien Thomas. 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 Joseph Koshy ``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 Joseph Koshy be liable +.\" for any direct, indirect, incidental, special, exemplary, or consequential +.\" damages (including, but not limited to, procurement of substitute goods +.\" or services; loss of use, data, or profits; or business interruption) +.\" however caused and on any theory of liability, whether in contract, strict +.\" liability, or tort (including negligence or otherwise) arising in any way +.\" out of the use of this software, even if advised of the possibility of +.\" such damage. +.\" +.\" $FreeBSD$ +.\" +.Dd March 24, 2010 +.Os +.Dt PMC.COREI7 3 +.Sh NAME +.Nm pmc.corei7 +.Nd measurement events for +.Tn Intel +.Tn Core i7 and Xeon 5500 +family CPUs +.Sh LIBRARY +.Lb libpmc +.Sh SYNOPSIS +.In pmc.h +.Sh DESCRIPTION +.Tn Intel +.Tn "Core i7" +CPUs contain PMCs conforming to version 2 of the +.Tn Intel +performance measurement architecture. +These CPUs may contain up to three classes of PMCs: +.Bl -tag -width "Li PMC_CLASS_IAP" +.It Li PMC_CLASS_IAF +Fixed-function counters that count only one hardware event per counter. +.It Li PMC_CLASS_IAP +Programmable counters that may be configured to count one of a defined +set of hardware events. +.El +.Pp +The number of PMCs available in each class and their widths need to be +determined at run time by calling +.Xr pmc_cpuinfo 3 . +.Pp +Intel Core i7 and Xeon 5500 PMCs are documented in +.Rs +.%B "Intel(R) 64 and IA-32 Architectures Software Developes Manual" +.%T "Volume 3B: System Programming Guide, Part 2" +.%N "Order Number: 253669-033US" +.%D December 2009 +.%Q "Intel Corporation" +.Re +.Ss COREI7 AND XEON 5500 FIXED FUNCTION PMCS +These PMCs and their supported events are documented in +.Xr pmc.iaf 3 . +Not all CPUs in this family implement fixed-function counters. +.Ss COREI7 AND XEON 5500 PROGRAMMABLE PMCS +The programmable PMCs support the following capabilities: +.Bl -column "PMC_CAP_INTERRUPT" "Support" +.It Em Capability Ta Em Support +.It PMC_CAP_CASCADE Ta \&No +.It PMC_CAP_EDGE Ta Yes +.It PMC_CAP_INTERRUPT Ta Yes +.It PMC_CAP_INVERT Ta Yes +.It PMC_CAP_READ Ta Yes +.It PMC_CAP_PRECISE Ta \&No +.It PMC_CAP_SYSTEM Ta Yes +.It PMC_CAP_TAGGING Ta \&No +.It PMC_CAP_THRESHOLD Ta Yes +.It PMC_CAP_USER Ta Yes +.It PMC_CAP_WRITE Ta Yes +.El +.Ss Event Qualifiers +Event specifiers for these PMCs support the following common +qualifiers: +.Bl -tag -width indent +.It Li rsp= Ns Ar value +Configure the Off-core Response bits. +.Bl -tag -width indent +.It Li DMND_DATA_RD +Counts the number of demand and DCU prefetch data reads of full +and partial cachelines as well as demand data page table entry +cacheline reads. Does not count L2 data read prefetches or +instruction fetches. +.It Li DMND_RFO +Counts the number of demand and DCU prefetch reads for ownership +(RFO) requests generated by a write to data cacheline. Does not +count L2 RFO. +.It Li DMND_IFETCH +Counts the number of demand and DCU prefetch instruction cacheline +reads. Does not count L2 code read prefetches. +WB +Counts the number of writeback (modified to exclusive) transactions. +.It Li PF_DATA_RD +Counts the number of data cacheline reads generated by L2 prefetchers. +.It Li PF_RFO +Counts the number of RFO requests generated by L2 prefetchers. +.It Li PF_IFETCH +Counts the number of code reads generated by L2 prefetchers. +.It Li OTHER +Counts one of the following transaction types, including L3 invalidate, +I/O, full or partial writes, WC or non-temporal stores, CLFLUSH, Fences, +lock, unlock, split lock. +.It Li UNCORE_HIT +L3 Hit: local or remote home requests that hit L3 cache in the uncore +with no coherency actions required (snooping). +.It Li OTHER_CORE_HIT_SNP +L3 Hit: local or remote home requests that hit L3 cache in the uncore +and was serviced by another core with a cross core snoop where no modified +copies were found (clean). +.It Li OTHER_CORE_HITM +L3 Hit: local or remote home requests that hit L3 cache in the uncore +and was serviced by another core with a cross core snoop where modified +copies were found (HITM). +.It Li REMOTE_CACHE_FWD +L3 Miss: local homed requests that missed the L3 cache and was serviced +by forwarded data following a cross package snoop where no modified +copies found. (Remote home requests are not counted) +.It Li REMOTE_DRAM +L3 Miss: remote home requests that missed the L3 cache and were serviced +by remote DRAM. +.It Li LOCAL_DRAM +L3 Miss: local home requests that missed the L3 cache and were serviced +by local DRAM. +.It Li NON_DRAM +Non-DRAM requests that were serviced by IOH. +.El +.It Li cmask= Ns Ar value +Configure the PMC to increment only if the number of configured +events measured in a cycle is greater than or equal to +.Ar value . +.It Li edge +Configure the PMC to count the number of de-asserted to asserted +transitions of the conditions expressed by the other qualifiers. +If specified, the counter will increment only once whenever a +condition becomes true, irrespective of the number of clocks during +which the condition remains true. +.It Li inv +Invert the sense of comparison when the +.Dq Li cmask +qualifier is present, making the counter increment when the number of +events per cycle is less than the value specified by the +.Dq Li cmask +qualifier. +.It Li os +Configure the PMC to count events happening at processor privilege +level 0. +.It Li usr +Configure the PMC to count events occurring at privilege levels 1, 2 +or 3. +.El +.Pp +If neither of the +.Dq Li os +or +.Dq Li usr +qualifiers are specified, the default is to enable both. +.Ss Event Specifiers (Programmable PMCs) +Core i7 and Xeon 5500 programmable PMCs support the following events: +.Bl -tag -width indent +.It Li SB_DRAIN.ANY +.Pq Event 04H , Umask 07H +Counts the number of store buffer drains. +.It Li STORE_BLOCKS.AT_RET +.Pq Event 06H , Umask 04H +Counts number of loads delayed with at-Retirement block code. The following +loads need to be executed at retirement and wait for all senior stores on +the same thread to be drained: load splitting across 4K boundary (page +split), load accessing uncacheable (UC or USWC) memory, load lock, and load +with page table in UC or USWC memory region. +.It Li STORE_BLOCKS.L1D_BLOCK +.Pq Event 06H , Umask 08H +Cacheable loads delayed with L1D block code +.It Li PARTIAL_ADDRESS_ALIAS +.Pq Event 07H , Umask 01H +Counts false dependency due to partial address aliasing +.It Li DTLB_LOAD_MISSES.ANY +.Pq Event 08H , Umask 01H +Counts all load misses that cause a page walk +.It Li DTLB_LOAD_MISSES.WALK_COMPLETED +.Pq Event 08H , Umask 02H +Counts number of completed page walks due to load miss in the STLB. +.It Li DTLB_LOAD_MISSES.STLB_HIT +.Pq Event 08H , Umask 10H +Number of cache load STLB hits +.It Li DTLB_LOAD_MISSES.PDE_MISS +.Pq Event 08H , Umask 20H +Number of DTLB cache load misses where the low part of the linear to +physical address translation was missed. +.It Li DTLB_LOAD_MISSES.PDP_MISS +.Pq Event 08H , Umask 40H +Number of DTLB cache load misses where the high part of the linear to +physical address translation was missed. +.It Li DTLB_LOAD_MISSES.LARGE_WALK_COMPLETED +.Pq Event 08H , Umask 80H +Counts number of completed large page walks due to load miss in the STLB. +.It Li MEM_INST_RETIRED.LOADS +.Pq Event 0BH , Umask 01H +Counts the number of instructions with an architecturally-visible store +retired on the architected path. +In conjunction with ld_lat facility +.It Li MEM_INST_RETIRED.STORES +.Pq Event 0BH , Umask 02H +Counts the number of instructions with an architecturally-visible store +retired on the architected path. +In conjunction with ld_lat facility +.It Li MEM_INST_RETIRED.LATENCY_ABOVE_THRESHOLD +.Pq Event 0BH , Umask 10H +Counts the number of instructions exceeding the latency specified with +ld_lat facility. +In conjunction with ld_lat facility +.It Li MEM_STORE_RETIRED.DTLB_MISS +.Pq Event 0CH , Umask 01H +The event counts the number of retired stores that missed the DTLB. The DTLB +miss is not counted if the store operation causes a fault. Does not counter +prefetches. Counts both primary and secondary misses to the TLB +.It Li UOPS_ISSUED.ANY +.Pq Event 0EH , Umask 01H +Counts the number of Uops issued by the Register Allocation Table to the +Reservation Station, i.e. the UOPs issued from the front end to the back +end. +.It Li UOPS_ISSUED.STALLED_CYCLES +.Pq Event 0EH , Umask 01H +Counts the number of cycles no Uops issued by the Register Allocation Table +to the Reservation Station, i.e. the UOPs issued from the front end to the +back end. +set invert=1, cmask = 1 +.It Li UOPS_ISSUED.FUSED +.Pq Event 0EH , Umask 02H +Counts the number of fused Uops that were issued from the Register +Allocation Table to the Reservation Station. +.It Li MEM_UNCORE_RETIRED.L3_DATA_MISS_UNKNOWN +.Pq Event 0FH , Umask 01H +Counts number of memory load instructions retired where the memory reference +missed L3 and data source is unknown. +Available only for CPUID signature 06_2EH +.It Li MEM_UNCORE_RETIRED.OTHER_CORE_L2_HITM +.Pq Event 0FH , Umask 02H +Counts number of memory load instructions retired where the memory reference +hit modified data in a sibling core residing on the same socket. +.It Li MEM_UNCORE_RETIRED.REMOTE_CACHE_LOCAL_HOME_HIT +.Pq Event 0FH , Umask 08H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and HIT in a remote socket's cache. Only +counts locally homed lines. +.It Li MEM_UNCORE_RETIRED.REMOTE_DRAM +.Pq Event 0FH , Umask 10H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and was remotely homed. This includes both +DRAM access and HITM in a remote socket's cache for remotely homed lines. +.It Li MEM_UNCORE_RETIRED.LOCAL_DRAM +.Pq Event 0FH , Umask 20H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and required a local socket memory +reference. This includes locally homed cachelines that were in a modified +state in another socket. +.It Li MEM_UNCORE_RETIRED.UNCACHEABLE +.Pq Event 0FH , Umask 80H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and to perform I/O. +Available only for CPUID signature 06_2EH +.It Li FP_COMP_OPS_EXE.X87 +.Pq Event 10H , Umask 01H +Counts the number of FP Computational Uops Executed. The number of FADD, +FSUB, FCOM, FMULs, integer MULsand IMULs, FDIVs, FPREMs, FSQRTS, integer +DIVs, and IDIVs. This event does not distinguish an FADD used in the middle +of a transcendental flow from a separate FADD instruction. +.It Li FP_COMP_OPS_EXE.MMX +.Pq Event 10H , Umask 02H +Counts number of MMX Uops executed. +.It Li FP_COMP_OPS_EXE.SSE_FP +.Pq Event 10H , Umask 04H +Counts number of SSE and SSE2 FP uops executed. +.It Li FP_COMP_OPS_EXE.SSE2_INTEGER +.Pq Event 10H , Umask 08H +Counts number of SSE2 integer uops executed. +.It Li FP_COMP_OPS_EXE.SSE_FP_PACKED +.Pq Event 10H , Umask 10H +Counts number of SSE FP packed uops executed. +.It Li FP_COMP_OPS_EXE.SSE_FP_SCALAR +.Pq Event 10H , Umask 20H +Counts number of SSE FP scalar uops executed. +.It Li FP_COMP_OPS_EXE.SSE_SINGLE_PRECISION +.Pq Event 10H , Umask 40H +Counts number of SSE* FP single precision uops executed. +.It Li FP_COMP_OPS_EXE.SSE_DOUBLE_PRECISION +.Pq Event 10H , Umask 80H +Counts number of SSE* FP double precision uops executed. +.It Li SIMD_INT_128.PACKED_MPY +.Pq Event 12H , Umask 01H +Counts number of 128 bit SIMD integer multiply operations. +.It Li SIMD_INT_128.PACKED_SHIFT +.Pq Event 12H , Umask 02H +Counts number of 128 bit SIMD integer shift operations. +.It Li SIMD_INT_128.PACK +.Pq Event 12H , Umask 04H +Counts number of 128 bit SIMD integer pack operations. +.It Li SIMD_INT_128.UNPACK +.Pq Event 12H , Umask 08H +Counts number of 128 bit SIMD integer unpack operations. +.It Li SIMD_INT_128.PACKED_LOGICAL +.Pq Event 12H , Umask 10H +Counts number of 128 bit SIMD integer logical operations. +.It Li SIMD_INT_128.PACKED_ARITH +.Pq Event 12H , Umask 20H +Counts number of 128 bit SIMD integer arithmetic operations. +.It Li SIMD_INT_128.SHUFFLE_MOVE +.Pq Event 12H , Umask 40H +Counts number of 128 bit SIMD integer shuffle and move operations. +.It Li LOAD_DISPATCH.RS +.Pq Event 13H , Umask 01H +Counts number of loads dispatched from the Reservation Station that bypass +the Memory Order Buffer. +.It Li LOAD_DISPATCH.RS_DELAYED +.Pq Event 13H , Umask 02H +Counts the number of delayed RS dispatches at the stage latch. If an RS +dispatch can not bypass to LB, it has another chance to dispatch from the +one-cycle delayed staging latch before it is written into the LB. +.It Li LOAD_DISPATCH.MOB +.Pq Event 13H , Umask 04H +Counts the number of loads dispatched from the Reservation Station to the +Memory Order Buffer. +.It Li LOAD_DISPATCH.ANY +.Pq Event 13H , Umask 07H +Counts all loads dispatched from the Reservation Station. +.It Li ARITH.CYCLES_DIV_BUSY +.Pq Event 14H , Umask 01H +Counts the number of cycles the divider is busy executing divide or square +root operations. The divide can be integer, X87 or Streaming SIMD Extensions +(SSE). The square root operation can be either X87 or SSE. +Set 'edge =1, invert=1, cmask=1' to count the number of divides. +Count may be incorrect When SMT is on. +.It Li ARITH.MUL +.Pq Event 14H , Umask 02H +Counts the number of multiply operations executed. This includes integer as +well as floating point multiply operations but excludes DPPS mul and MPSAD. +Count may be incorrect When SMT is on +.It Li INST_QUEUE_WRITES +.Pq Event 17H , Umask 01H +Counts the number of instructions written into the instruction queue every +cycle. +.It Li INST_DECODED.DEC0 +.Pq Event 18H , Umask 01H +Counts number of instructions that require decoder 0 to be decoded. Usually, +this means that the instruction maps to more than 1 uop +.It Li TWO_UOP_INSTS_DECODED +.Pq Event 19H , Umask 01H +An instruction that generates two uops was decoded +.It Li INST_QUEUE_WRITE_CYCLES +.Pq Event 1EH , Umask 01H +This event counts the number of cycles during which instructions are written +to the instruction queue. Dividing this counter by the number of +instructions written to the instruction queue (INST_QUEUE_WRITES) yields the +average number of instructions decoded each cycle. If this number is less +than four and the pipe stalls, this indicates that the decoder is failing to +decode enough instructions per cycle to sustain the 4-wide pipeline. +If SSE* instructions that are 6 bytes or longer arrive one after another, +then front end throughput may limit execution speed. In such case, +.It Li LSD_OVERFLOW +.Pq Event 20H , Umask 01H +Counts number of loops that cant stream from the instruction queue. +.It Li L2_RQSTS.LD_HIT +.Pq Event 24H , Umask 01H +Counts number of loads that hit the L2 cache. L2 loads include both L1D +demand misses as well as L1D prefetches. L2 loads can be rejected for +various reasons. Only non rejected loads are counted. +.It Li L2_RQSTS.LD_MISS +.Pq Event 24H , Umask 02H +Counts the number of loads that miss the L2 cache. L2 loads include both L1D +demand misses as well as L1D prefetches. +.It Li L2_RQSTS.LOADS +.Pq Event 24H , Umask 03H +Counts all L2 load requests. L2 loads include both L1D demand misses as well +as L1D prefetches. +.It Li L2_RQSTS.RFO_HIT +.Pq Event 24H , Umask 04H +Counts the number of store RFO requests that hit the L2 cache. L2 RFO +requests include both L1D demand RFO misses as well as L1D RFO prefetches. +Count includes WC memory requests, where the data is not fetched but the +permission to write the line is required. +.It Li L2_RQSTS.RFO_MISS +.Pq Event 24H , Umask 08H +Counts the number of store RFO requests that miss the L2 cache. L2 RFO +requests include both L1D demand RFO misses as well as L1D RFO prefetches. +.It Li L2_RQSTS.RFOS +.Pq Event 24H , Umask 0CH +Counts all L2 store RFO requests. L2 RFO requests include both L1D demand +RFO misses as well as L1D RFO prefetches. +.It Li L2_RQSTS.IFETCH_HIT +.Pq Event 24H , Umask 10H +Counts number of instruction fetches that hit the L2 cache. L2 instruction +fetches include both L1I demand misses as well as L1I instruction +prefetches. +.It Li L2_RQSTS.IFETCH_MISS +.Pq Event 24H , Umask 20H +Counts number of instruction fetches that miss the L2 cache. L2 instruction +fetches include both L1I demand misses as well as L1I instruction +prefetches. +.It Li L2_RQSTS.IFETCHES +.Pq Event 24H , Umask 30H +Counts all instruction fetches. L2 instruction fetches include both L1I +demand misses as well as L1I instruction prefetches. +.It Li L2_RQSTS.PREFETCH_HIT +.Pq Event 24H , Umask 40H +Counts L2 prefetch hits for both code and data. +.It Li L2_RQSTS.PREFETCH_MISS +.Pq Event 24H , Umask 80H +Counts L2 prefetch misses for both code and data. +.It Li L2_RQSTS.PREFETCHES +.Pq Event 24H , Umask C0H +Counts all L2 prefetches for both code and data. +.It Li L2_RQSTS.MISS +.Pq Event 24H , Umask AAH +Counts all L2 misses for both code and data. +.It Li L2_RQSTS.REFERENCES +.Pq Event 24H , Umask FFH +Counts all L2 requests for both code and data. +.It Li L2_DATA_RQSTS.DEMAND.I_STATE +.Pq Event 26H , Umask 01H +Counts number of L2 data demand loads where the cache line to be loaded is +in the I (invalid) state, i.e. a cache miss. L2 demand loads are both L1D +demand misses and L1D prefetches. +.It Li L2_DATA_RQSTS.DEMAND.S_STATE +.Pq Event 26H , Umask 02H +Counts number of L2 data demand loads where the cache line to be loaded is +in the S (shared) state. L2 demand loads are both L1D demand misses and L1D +prefetches. +.It Li L2_DATA_RQSTS.DEMAND.E_STATE +.Pq Event 26H , Umask 04H +Counts number of L2 data demand loads where the cache line to be loaded is +in the E (exclusive) state. L2 demand loads are both L1D demand misses and +L1D prefetches. +.It Li L2_DATA_RQSTS.DEMAND.M_STATE +.Pq Event 26H , Umask 08H +Counts number of L2 data demand loads where the cache line to be loaded is +in the M (modified) state. L2 demand loads are both L1D demand misses and +L1D prefetches. +.It Li L2_DATA_RQSTS.DEMAND.MESI +.Pq Event 26H , Umask 0FH +Counts all L2 data demand requests. L2 demand loads are both L1D demand +misses and L1D prefetches. +.It Li L2_DATA_RQSTS.PREFETCH.I_STATE +.Pq Event 26H , Umask 10H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the I (invalid) state, i.e. a cache miss. +.It Li L2_DATA_RQSTS.PREFETCH.S_STATE +.Pq Event 26H , Umask 20H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the S (shared) state. A prefetch RFO will miss on an S state line, while +a prefetch read will hit on an S state line. +.It Li L2_DATA_RQSTS.PREFETCH.E_STATE +.Pq Event 26H , Umask 40H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the E (exclusive) state. +.It Li L2_DATA_RQSTS.PREFETCH.M_STATE +.Pq Event 26H , Umask 80H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the M (modified) state. +.It Li L2_DATA_RQSTS.PREFETCH.MESI +.Pq Event 26H , Umask F0H +Counts all L2 prefetch requests. +.It Li L2_DATA_RQSTS.ANY +.Pq Event 26H , Umask FFH +Counts all L2 data requests. +.It Li L2_WRITE.RFO.I_STATE +.Pq Event 27H , Umask 01H +Counts number of L2 demand store RFO requests where the cache line to be +loaded is in the I (invalid) state, i.e, a cache miss. The L1D prefetcher +does not issue a RFO prefetch. +This is a demand RFO request +.It Li L2_WRITE.RFO.S_STATE +.Pq Event 27H , Umask 02H +Counts number of L2 store RFO requests where the cache line to be loaded is +in the S (shared) state. The L1D prefetcher does not issue a RFO prefetch,. +This is a demand RFO request +.It Li L2_WRITE.RFO.M_STATE +.Pq Event 27H , Umask 08H +Counts number of L2 store RFO requests where the cache line to be loaded is +in the M (modified) state. The L1D prefetcher does not issue a RFO prefetch. +This is a demand RFO request +.It Li L2_WRITE.RFO.HIT +.Pq Event 27H , Umask 0EH +Counts number of L2 store RFO requests where the cache line to be loaded is +in either the S, E or M states. The L1D prefetcher does not issue a RFO +prefetch. +This is a demand RFO request +.It Li L2_WRITE.RFO.MESI +.Pq Event 27H , Umask 0FH +Counts all L2 store RFO requests.The L1D prefetcher does not issue a RFO +prefetch. +This is a demand RFO request +.It Li L2_WRITE.LOCK.I_STATE +.Pq Event 27H , Umask 10H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in the I (invalid) state, i.e. a cache miss. +.It Li L2_WRITE.LOCK.S_STATE +.Pq Event 27H , Umask 20H +Counts number of L2 lock RFO requests where the cache line to be loaded is +in the S (shared) state. +.It Li L2_WRITE.LOCK.E_STATE +.Pq Event 27H , Umask 40H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in the E (exclusive) state. +.It Li L2_WRITE.LOCK.M_STATE +.Pq Event 27H , Umask 80H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in the M (modified) state. +.It Li L2_WRITE.LOCK.HIT +.Pq Event 27H , Umask E0H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in either the S, E, or M state. +.It Li L2_WRITE.LOCK.MESI +.Pq Event 27H , Umask F0H +Counts all L2 demand lock RFO requests. +.It Li L1D_WB_L2.I_STATE +.Pq Event 28H , Umask 01H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the I (invalid) state, i.e. a cache miss. +.It Li L1D_WB_L2.S_STATE +.Pq Event 28H , Umask 02H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the S state. +.It Li L1D_WB_L2.E_STATE +.Pq Event 28H , Umask 04H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the E (exclusive) state. +.It Li L1D_WB_L2.M_STATE +.Pq Event 28H , Umask 08H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the M (modified) state. +.It Li L1D_WB_L2.MESI +.Pq Event 28H , Umask 0FH +Counts all L1 writebacks to the L2. +.It Li L3_LAT_CACHE.REFERENCE +.Pq Event 2EH , Umask 4FH +This event counts requests originating from the core that reference a cache +line in the last level cache. The event count includes speculative traffic +but excludes cache line fills due to a L2 hardware-prefetch. Because cache +hierarchy, cache sizes and other implementation-specific characteristics; +value comparison to estimate performance differences is not recommended. +see Table A-1 +.It Li L3_LAT_CACHE.MISS +.Pq Event 2EH , Umask 41H +This event counts each cache miss condition for references to the last level +cache. The event count may include speculative traffic but excludes cache +line fills due to L2 hardware-prefetches. Because cache hierarchy, cache +sizes and other implementation-specific characteristics; value comparison to +estimate performance differences is not recommended. +see Table A-1 +.It Li CPU_CLK_UNHALTED.THREAD_P +.Pq Event 3CH , Umask 00H +Counts the number of thread cycles while the thread is not in a halt state. +The thread enters the halt state when it is running the HLT instruction. The +core frequency may change from time to time due to power or thermal +throttling. +see Table A-1 +.It Li CPU_CLK_UNHALTED.REF_P +.Pq Event 3CH , Umask 01H +Increments at the frequency of TSC when not halted. +see Table A-1 +.It Li L1D_CACHE_LD.I_STATE +.Pq Event 40H , Umask 01H +Counts L1 data cache read requests where the cache line to be loaded is in +the I (invalid) state, i.e. the read request missed the cache. +Counter 0, 1 only +.It Li L1D_CACHE_LD.S_STATE +.Pq Event 40H , Umask 02H +Counts L1 data cache read requests where the cache line to be loaded is in +the S (shared) state. +Counter 0, 1 only +.It Li L1D_CACHE_LD.E_STATE +.Pq Event 40H , Umask 04H +Counts L1 data cache read requests where the cache line to be loaded is in +the E (exclusive) state. +Counter 0, 1 only +.It Li L1D_CACHE_LD.M_STATE +.Pq Event 40H , Umask 08H +Counts L1 data cache read requests where the cache line to be loaded is in +the M (modified) state. +Counter 0, 1 only +.It Li L1D_CACHE_LD.MESI +.Pq Event 40H , Umask 0FH +Counts L1 data cache read requests. +Counter 0, 1 only +.It Li L1D_CACHE_ST.S_STATE +.Pq Event 41H , Umask 02H +Counts L1 data cache store RFO requests where the cache line to be loaded is +in the S (shared) state. +Counter 0, 1 only +.It Li L1D_CACHE_ST.E_STATE +.Pq Event 41H , Umask 04H +Counts L1 data cache store RFO requests where the cache line to be loaded is +in the E (exclusive) state. +Counter 0, 1 only +.It Li L1D_CACHE_ST.M_STATE +.Pq Event 41H , Umask 08H +Counts L1 data cache store RFO requests where cache line to be loaded is in +the M (modified) state. +Counter 0, 1 only +.It Li L1D_CACHE_LOCK.HIT +.Pq Event 42H , Umask 01H +Counts retired load locks that hit in the L1 data cache or hit in an already +allocated fill buffer. The lock portion of the load lock transaction must +hit in the L1D. +The initial load will pull the lock into the L1 data cache. Counter 0, 1 +only +.It Li L1D_CACHE_LOCK.S_STATE +.Pq Event 42H , Umask 02H +Counts L1 data cache retired load locks that hit the target cache line in +the shared state. +Counter 0, 1 only +.It Li L1D_CACHE_LOCK.E_STATE +.Pq Event 42H , Umask 04H +Counts L1 data cache retired load locks that hit the target cache line in +the exclusive state. +Counter 0, 1 only +.It Li L1D_CACHE_LOCK.M_STATE +.Pq Event 42H , Umask 08H +Counts L1 data cache retired load locks that hit the target cache line in +the modified state. +Counter 0, 1 only +.It Li L1D_ALL_REF.ANY +.Pq Event 43H , Umask 01H +Counts all references (uncached, speculated and retired) to the L1 data +cache, including all loads and stores with any memory types. The event +counts memory accesses only when they are actually performed. For example, a +load blocked by unknown store address and later performed is only counted +once. +The event does not include non- memory accesses, such as I/O accesses. +Counter 0, 1 only +.It Li L1D_ALL_REF.CACHEABLE +.Pq Event 43H , Umask 02H +Counts all data reads and writes (speculated and retired) from cacheable +memory, including locked operations. +Counter 0, 1 only +.It Li L1D_PEND_MISS.LOAD_BUFFERS_FULL +.Pq Event 48H , Umask 02H +Counts cycles of L1 data cache load fill buffers full. +Counter 0, 1 only +.It Li DTLB_MISSES.ANY +.Pq Event 49H , Umask 01H +Counts the number of misses in the STLB which causes a page walk. +.It Li DTLB_MISSES.WALK_COMPLETED +.Pq Event 49H , Umask 02H +Counts number of misses in the STLB which resulted in a completed page walk. +.It Li DTLB_MISSES.STLB_HIT +.Pq Event 49H , Umask 10H +Counts the number of DTLB first level misses that hit in the second level +TLB. This event is only relevant if the core contains multiple DTLB levels. +.It Li LOAD_HIT_PRE +.Pq Event 4CH , Umask 01H +Counts load operations sent to the L1 data cache while a previous SSE +prefetch instruction to the same cache line has started prefetching but has +not yet finished. +.It Li L1D_PREFETCH.REQUESTS +.Pq Event 4EH , Umask 01H +Counts number of hardware prefetch requests dispatched out of the prefetch +FIFO. +.It Li L1D_PREFETCH.MISS +.Pq Event 4EH , Umask 02H +Counts number of hardware prefetch requests that miss the L1D. There are two *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri Apr 16 16:13:49 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F9D7106564A; Fri, 16 Apr 2010 16:13:49 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A3CF8FC08; Fri, 16 Apr 2010 16:13:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3GGDnIC073326; Fri, 16 Apr 2010 16:13:49 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3GGDnfF073319; Fri, 16 Apr 2010 16:13:49 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201004161613.o3GGDnfF073319@svn.freebsd.org> From: Fabien Thomas Date: Fri, 16 Apr 2010 16:13:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206703 - in stable/7/sys: amd64/include conf dev/hwpmc i386/include modules/hwpmc sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 16:13:49 -0000 Author: fabient Date: Fri Apr 16 16:13:49 2010 New Revision: 206703 URL: http://svn.freebsd.org/changeset/base/206703 Log: MFC r206089, r206684: - Support for uncore counting events: one fixed PMC with the uncore domain clock, 8 programmable PMC. - Westmere based CPU (Xeon 5600, Corei7 980X) support. - New man pages with events list for core and uncore. - Updated Corei7 events with Intel 253669-033US December 2009 doc. There is some removed events in the documentation, they have been kept in the code but documented in the man page as obsolete. - Offcore response events can be setup with rsp token. Sponsored by: NETASQ Added: stable/7/sys/dev/hwpmc/hwpmc_uncore.c - copied unchanged from r206089, head/sys/dev/hwpmc/hwpmc_uncore.c stable/7/sys/dev/hwpmc/hwpmc_uncore.h - copied unchanged from r206089, head/sys/dev/hwpmc/hwpmc_uncore.h Modified: stable/7/sys/amd64/include/pmc_mdep.h stable/7/sys/conf/files.amd64 stable/7/sys/conf/files.i386 stable/7/sys/conf/files.pc98 stable/7/sys/dev/hwpmc/hwpmc_core.c stable/7/sys/dev/hwpmc/hwpmc_core.h stable/7/sys/dev/hwpmc/hwpmc_intel.c stable/7/sys/dev/hwpmc/pmc_events.h stable/7/sys/i386/include/pmc_mdep.h stable/7/sys/modules/hwpmc/Makefile stable/7/sys/sys/pmc.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/include/pmc_mdep.h ============================================================================== --- stable/7/sys/amd64/include/pmc_mdep.h Fri Apr 16 15:45:09 2010 (r206702) +++ stable/7/sys/amd64/include/pmc_mdep.h Fri Apr 16 16:13:49 2010 (r206703) @@ -43,17 +43,20 @@ struct pmc_mdep; #include #include #include +#include /* * Intel processors implementing V2 and later of the Intel performance * measurement architecture have PMCs of the following classes: TSC, - * IAF and IAP. + * IAF, IAP, UCF and UCP. */ #define PMC_MDEP_CLASS_INDEX_TSC 0 #define PMC_MDEP_CLASS_INDEX_K8 1 #define PMC_MDEP_CLASS_INDEX_P4 1 #define PMC_MDEP_CLASS_INDEX_IAP 1 #define PMC_MDEP_CLASS_INDEX_IAF 2 +#define PMC_MDEP_CLASS_INDEX_UCP 3 +#define PMC_MDEP_CLASS_INDEX_UCF 4 /* * On the amd64 platform we support the following PMCs. @@ -63,12 +66,16 @@ struct pmc_mdep; * PIV Intel P4/HTT and P4/EMT64 * IAP Intel Core/Core2/Atom CPUs in 64 bits mode. * IAF Intel fixed-function PMCs in Core2 and later CPUs. + * UCP Intel Uncore programmable PMCs. + * UCF Intel Uncore fixed-function PMCs. */ union pmc_md_op_pmcallocate { struct pmc_md_amd_op_pmcallocate pm_amd; struct pmc_md_iaf_op_pmcallocate pm_iaf; struct pmc_md_iap_op_pmcallocate pm_iap; + struct pmc_md_ucf_op_pmcallocate pm_ucf; + struct pmc_md_ucp_op_pmcallocate pm_ucp; struct pmc_md_p4_op_pmcallocate pm_p4; uint64_t __pad[4]; }; @@ -83,6 +90,8 @@ union pmc_md_pmc { struct pmc_md_amd_pmc pm_amd; struct pmc_md_iaf_pmc pm_iaf; struct pmc_md_iap_pmc pm_iap; + struct pmc_md_ucf_pmc pm_ucf; + struct pmc_md_ucp_pmc pm_ucp; struct pmc_md_p4_pmc pm_p4; }; Modified: stable/7/sys/conf/files.amd64 ============================================================================== --- stable/7/sys/conf/files.amd64 Fri Apr 16 15:45:09 2010 (r206702) +++ stable/7/sys/conf/files.amd64 Fri Apr 16 16:13:49 2010 (r206703) @@ -184,6 +184,7 @@ dev/hptrr/hptrr_config.c optional hptrr dev/hwpmc/hwpmc_amd.c optional hwpmc dev/hwpmc/hwpmc_intel.c optional hwpmc dev/hwpmc/hwpmc_core.c optional hwpmc +dev/hwpmc/hwpmc_uncore.c optional hwpmc dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_tsc.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc Modified: stable/7/sys/conf/files.i386 ============================================================================== --- stable/7/sys/conf/files.i386 Fri Apr 16 15:45:09 2010 (r206702) +++ stable/7/sys/conf/files.i386 Fri Apr 16 16:13:49 2010 (r206703) @@ -184,6 +184,7 @@ dev/hptrr/hptrr_config.c optional hptrr dev/hwpmc/hwpmc_amd.c optional hwpmc dev/hwpmc/hwpmc_intel.c optional hwpmc dev/hwpmc/hwpmc_core.c optional hwpmc +dev/hwpmc/hwpmc_uncore.c optional hwpmc dev/hwpmc/hwpmc_pentium.c optional hwpmc dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_ppro.c optional hwpmc Modified: stable/7/sys/conf/files.pc98 ============================================================================== --- stable/7/sys/conf/files.pc98 Fri Apr 16 15:45:09 2010 (r206702) +++ stable/7/sys/conf/files.pc98 Fri Apr 16 16:13:49 2010 (r206703) @@ -105,6 +105,7 @@ dev/fe/if_fe_cbus.c optional fe isa dev/hwpmc/hwpmc_amd.c optional hwpmc dev/hwpmc/hwpmc_intel.c optional hwpmc dev/hwpmc/hwpmc_core.c optional hwpmc +dev/hwpmc/hwpmc_uncore.c optional hwpmc dev/hwpmc/hwpmc_pentium.c optional hwpmc dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_ppro.c optional hwpmc Modified: stable/7/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/7/sys/dev/hwpmc/hwpmc_core.c Fri Apr 16 15:45:09 2010 (r206702) +++ stable/7/sys/dev/hwpmc/hwpmc_core.c Fri Apr 16 16:13:49 2010 (r206703) @@ -534,10 +534,12 @@ struct iap_event_descr { #define IAP_F_CC2E (1 << 2) /* CPU: Core2 Extreme only */ #define IAP_F_CA (1 << 3) /* CPU: Atom */ #define IAP_F_I7 (1 << 4) /* CPU: Core i7 */ -#define IAP_F_FM (1 << 5) /* Fixed mask */ +#define IAP_F_I7O (1 << 4) /* CPU: Core i7 (old) */ +#define IAP_F_WM (1 << 5) /* CPU: Westmere */ +#define IAP_F_FM (1 << 6) /* Fixed mask */ -#define IAP_F_ALLCPUS \ - (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA | IAP_F_I7) +#define IAP_F_ALLCPUSCORE2 \ + (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA) /* Sub fields of UMASK that this event supports. */ #define IAP_M_CORE (1 << 0) /* Core specificity */ @@ -570,151 +572,319 @@ static struct iap_event_descr iap_events .iap_flags = (FLAGS) \ } + IAPDESCR(02H_01H, 0x02, 0x01, IAP_F_FM | IAP_F_I7O), IAPDESCR(02H_81H, 0x02, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(03H_00H, 0x03, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(03H_02H, 0x03, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(03H_04H, 0x03, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(03H_01H, 0x03, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(03H_02H, 0x03, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_WM), + IAPDESCR(03H_04H, 0x03, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), IAPDESCR(03H_08H, 0x03, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(03H_10H, 0x03, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(03H_20H, 0x03, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(04H_00H, 0x04, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(04H_01H, 0x04, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(04H_01H, 0x04, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), IAPDESCR(04H_02H, 0x04, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(04H_07H, 0x04, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(04H_08H, 0x04, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(05H_00H, 0x05, 0x00, IAP_F_FM | IAP_F_CC), - - IAPDESCR(06H_00H, 0x06, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(05H_02H, 0x05, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_WM), + IAPDESCR(05H_03H, 0x05, 0x03, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(06H_00H, 0x06, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2 | + IAP_F_CC2E | IAP_F_CA), + IAPDESCR(06H_01H, 0x06, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(06H_02H, 0x06, 0x02, IAP_F_FM | IAP_F_I7O), + IAPDESCR(06H_04H, 0x06, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(06H_08H, 0x06, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(06H_0FH, 0x06, 0x0F, IAP_F_FM | IAP_F_I7O), IAPDESCR(07H_00H, 0x07, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(07H_02H, 0x07, 0x02, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(07H_03H, 0x07, 0x03, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM), + IAPDESCR(07H_02H, 0x07, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(07H_03H, 0x07, 0x03, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(07H_06H, 0x07, 0x06, IAP_F_FM | IAP_F_CA), IAPDESCR(07H_08H, 0x07, 0x08, IAP_F_FM | IAP_F_CA), - IAPDESCR(08H_01H, 0x08, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(08H_02H, 0x08, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(08H_04H, 0x08, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(08H_01H, 0x08, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(08H_02H, 0x08, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(08H_04H, 0x08, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_WM), IAPDESCR(08H_05H, 0x08, 0x05, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_06H, 0x08, 0x06, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_07H, 0x08, 0x07, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_08H, 0x08, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(08H_09H, 0x08, 0x09, IAP_F_FM | IAP_F_CA), + IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7), + IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(09H_01H, 0x09, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(09H_02H, 0x09, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(09H_01H, 0x09, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), + IAPDESCR(09H_02H, 0x09, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), + IAPDESCR(09H_04H, 0x09, 0x04, IAP_F_FM | IAP_F_I7O), + IAPDESCR(09H_08H, 0x09, 0x08, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(0BH_01H, 0x0B, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0BH_02H, 0x0B, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0BH_10H, 0x0B, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(0CH_01H, 0x0C, 0x01, IAP_F_FM | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(0CH_01H, 0x0C, 0x01, IAP_F_FM | IAP_F_CC2 | IAP_F_I7 | + IAP_F_WM), IAPDESCR(0CH_02H, 0x0C, 0x02, IAP_F_FM | IAP_F_CC2), IAPDESCR(0CH_03H, 0x0C, 0x03, IAP_F_FM | IAP_F_CA), - IAPDESCR(10H_00H, 0x10, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(10H_01H, 0x10, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(0FH_01H, 0x0F, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(0FH_02H, 0x0F, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0FH_08H, 0x0F, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0FH_10H, 0x0F, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0FH_20H, 0x0F, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0FH_80H, 0x0F, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(10H_00H, 0x10, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(10H_01H, 0x10, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_02H, 0x10, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_04H, 0x10, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_08H, 0x10, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_10H, 0x10, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_20H, 0x10, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_40H, 0x10, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_80H, 0x10, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(10H_81H, 0x10, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(11H_00H, 0x11, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), IAPDESCR(11H_01H, 0x11, 0x01, IAP_F_FM | IAP_F_CA), IAPDESCR(11H_81H, 0x11, 0x81, IAP_F_FM | IAP_F_CA), - IAPDESCR(12H_00H, 0x12, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(12H_01H, 0x12, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(12H_00H, 0x12, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(12H_01H, 0x12, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_02H, 0x12, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_04H, 0x12, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_08H, 0x12, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_10H, 0x12, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_20H, 0x12, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_40H, 0x12, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(12H_81H, 0x12, 0x81, IAP_F_FM | IAP_F_CA), - IAPDESCR(13H_00H, 0x13, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(13H_01H, 0x13, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(13H_00H, 0x13, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(13H_01H, 0x13, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM), + IAPDESCR(13H_02H, 0x13, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(13H_04H, 0x13, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(13H_07H, 0x13, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(13H_81H, 0x13, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(14H_00H, 0x14, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(14H_01H, 0x14, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(14H_01H, 0x14, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM), + IAPDESCR(14H_02H, 0x14, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(17H_01H, 0x17, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(18H_00H, 0x18, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(18H_01H, 0x18, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(19H_00H, 0x19, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(19H_01H, 0x19, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(19H_01H, 0x19, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(19H_02H, 0x19, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(21H, 0x21, IAP_M_CORE, IAP_F_ALLCPUS), + IAPDESCR(1DH_01H, 0x1D, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(1DH_02H, 0x1D, 0x02, IAP_F_FM | IAP_F_I7O), + IAPDESCR(1DH_04H, 0x1D, 0x04, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(1EH_01H, 0x1E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(20H_01H, 0x20, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(21H, 0x21, IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(22H, 0x22, IAP_M_CORE, IAP_F_CC2), - IAPDESCR(23H, 0x23, IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(24H, 0x24, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUS), - IAPDESCR(25H, 0x25, IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(26H, 0x26, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUS), - IAPDESCR(27H, 0x27, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUS), - IAPDESCR(28H, 0x28, IAP_M_CORE | IAP_M_MESI, IAP_F_ALLCPUS), + IAPDESCR(23H, 0x23, IAP_M_CORE, IAP_F_ALLCPUSCORE2), + + IAPDESCR(24H, 0x24, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), + IAPDESCR(24H_01H, 0x24, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_02H, 0x24, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_03H, 0x24, 0x03, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_04H, 0x24, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_08H, 0x24, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_0CH, 0x24, 0x0C, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_10H, 0x24, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_20H, 0x24, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_40H, 0x24, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_80H, 0x24, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_C0H, 0x24, 0xC0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(25H, 0x25, IAP_M_CORE, IAP_F_ALLCPUSCORE2), + + IAPDESCR(26H, 0x26, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), + IAPDESCR(26H_01H, 0x26, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_02H, 0x26, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_04H, 0x26, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_08H, 0x26, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_0FH, 0x26, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_10H, 0x26, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_20H, 0x26, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_40H, 0x26, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_80H, 0x26, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_F0H, 0x26, 0xF0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_FFH, 0x26, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(27H, 0x27, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), + IAPDESCR(27H_01H, 0x27, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_02H, 0x27, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_04H, 0x27, 0x04, IAP_F_FM | IAP_F_I7O), + IAPDESCR(27H_08H, 0x27, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_0EH, 0x27, 0x0E, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_0FH, 0x27, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_10H, 0x27, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_20H, 0x27, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_40H, 0x27, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_80H, 0x27, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_E0H, 0x27, 0xE0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_F0H, 0x27, 0xF0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(28H, 0x28, IAP_M_CORE | IAP_M_MESI, IAP_F_ALLCPUSCORE2), + IAPDESCR(28H_01H, 0x28, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(28H_02H, 0x28, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(28H_04H, 0x28, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(28H_08H, 0x28, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(28H_0FH, 0x28, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(29H, 0x29, IAP_M_CORE | IAP_M_MESI, IAP_F_CC), IAPDESCR(29H, 0x29, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_CA | IAP_F_CC2), - IAPDESCR(2AH, 0x2A, IAP_M_CORE | IAP_M_MESI, IAP_F_ALLCPUS), + IAPDESCR(2AH, 0x2A, IAP_M_CORE | IAP_M_MESI, IAP_F_ALLCPUSCORE2), IAPDESCR(2BH, 0x2B, IAP_M_CORE | IAP_M_MESI, IAP_F_CA | IAP_F_CC2), IAPDESCR(2EH, 0x2E, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, - IAP_F_ALLCPUS), - IAPDESCR(2EH_41H, 0x2E, 0x41, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(2EH_4FH, 0x2E, 0x4F, IAP_F_FM | IAP_F_ALLCPUS), + IAP_F_ALLCPUSCORE2), + IAPDESCR(2EH_01H, 0x2E, 0x01, IAP_F_FM | IAP_F_WM), + IAPDESCR(2EH_02H, 0x2E, 0x02, IAP_F_FM | IAP_F_WM), + IAPDESCR(2EH_41H, 0x2E, 0x41, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7), + IAPDESCR(2EH_4FH, 0x2E, 0x4F, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7), IAPDESCR(30H, 0x30, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, - IAP_F_ALLCPUS), + IAP_F_ALLCPUSCORE2), IAPDESCR(32H, 0x32, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_CC), IAPDESCR(32H, 0x32, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(3AH, 0x3A, IAP_M_TRANSITION, IAP_F_CC), IAPDESCR(3AH_00H, 0x3A, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(3BH_C0H, 0x3B, 0xC0, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(3BH_C0H, 0x3B, 0xC0, IAP_F_FM | IAP_F_ALLCPUSCORE2), + + IAPDESCR(3CH_00H, 0x3C, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(3CH_01H, 0x3C, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(3CH_00H, 0x3C, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(3CH_01H, 0x3C, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(3DH_01H, 0x3D, 0x01, IAP_F_FM | IAP_F_I7O), IAPDESCR(40H, 0x40, IAP_M_MESI, IAP_F_CC | IAP_F_CC2), + IAPDESCR(40H_01H, 0x40, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(40H_02H, 0x40, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(40H_04H, 0x40, 0x04, IAP_F_FM | IAP_F_I7), + IAPDESCR(40H_08H, 0x40, 0x08, IAP_F_FM | IAP_F_I7), + IAPDESCR(40H_0FH, 0x40, 0x0F, IAP_F_FM | IAP_F_I7), IAPDESCR(40H_21H, 0x40, 0x21, IAP_F_FM | IAP_F_CA), IAPDESCR(41H, 0x41, IAP_M_MESI, IAP_F_CC | IAP_F_CC2), + IAPDESCR(41H_01H, 0x41, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(41H_02H, 0x41, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(41H_04H, 0x41, 0x04, IAP_F_FM | IAP_F_I7), + IAPDESCR(41H_08H, 0x41, 0x08, IAP_F_FM | IAP_F_I7), + IAPDESCR(41H_0FH, 0x41, 0x0F, IAP_F_FM | IAP_F_I7O), IAPDESCR(41H_22H, 0x41, 0x22, IAP_F_FM | IAP_F_CA), - IAPDESCR(42H, 0x42, IAP_M_MESI, IAP_F_ALLCPUS), + IAPDESCR(42H, 0x42, IAP_M_MESI, IAP_F_ALLCPUSCORE2), + IAPDESCR(42H_01H, 0x42, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(42H_02H, 0x42, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(42H_04H, 0x42, 0x04, IAP_F_FM | IAP_F_I7), + IAPDESCR(42H_08H, 0x42, 0x08, IAP_F_FM | IAP_F_I7), IAPDESCR(42H_10H, 0x42, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(43H_01H, 0x43, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(43H_02H, 0x43, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(43H_01H, 0x43, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7), + IAPDESCR(43H_02H, 0x43, 0x02, IAP_F_FM | IAP_F_CA | + IAP_F_CC2 | IAP_F_I7), IAPDESCR(44H_02H, 0x44, 0x02, IAP_F_FM | IAP_F_CC), - IAPDESCR(45H_0FH, 0x45, 0x0F, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(45H_0FH, 0x45, 0x0F, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(46H_00H, 0x46, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(47H_00H, 0x47, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(48H_00H, 0x48, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(46H_00H, 0x46, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(47H_00H, 0x47, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(49H_00H, 0x49, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(49H_01H, 0x49, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(49H_02H, 0x49, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(48H_00H, 0x48, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(48H_02H, 0x48, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(4BH_00H, 0x4B, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(4BH_01H, 0x4B, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(4BH_02H, 0x4B, 0x02, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(49H_00H, 0x49, 0x00, IAP_F_FM | IAP_F_CC), + IAPDESCR(49H_01H, 0x49, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(49H_02H, 0x49, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(49H_04H, 0x49, 0x04, IAP_F_FM | IAP_F_WM), + IAPDESCR(49H_10H, 0x49, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7O), + IAPDESCR(49H_40H, 0x49, 0x40, IAP_F_FM | IAP_F_I7O), + IAPDESCR(49H_80H, 0x49, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + + IAPDESCR(4BH_00H, 0x4B, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(4BH_01H, 0x4B, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7O), + IAPDESCR(4BH_02H, 0x4B, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(4BH_03H, 0x4B, 0x03, IAP_F_FM | IAP_F_CC), + IAPDESCR(4BH_08H, 0x4B, 0x08, IAP_F_FM | IAP_F_I7O), IAPDESCR(4CH_00H, 0x4C, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(4CH_01H, 0x4C, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(4DH_01H, 0x4D, 0x01, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(4EH_01H, 0x4E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(4EH_02H, 0x4E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(4EH_04H, 0x4E, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(4EH_10H, 0x4E, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(4FH_00H, 0x4F, 0x00, IAP_F_FM | IAP_F_CC), - - IAPDESCR(60H, 0x60, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), + IAPDESCR(4FH_02H, 0x4F, 0x02, IAP_F_FM | IAP_F_I7O), + IAPDESCR(4FH_04H, 0x4F, 0x04, IAP_F_FM | IAP_F_I7O), + IAPDESCR(4FH_08H, 0x4F, 0x08, IAP_F_FM | IAP_F_I7O), + IAPDESCR(4FH_10H, 0x4F, 0x10, IAP_F_FM | IAP_F_WM), + + IAPDESCR(51H_01H, 0x51, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(51H_02H, 0x51, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(51H_04H, 0x51, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(51H_08H, 0x51, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(52H_01H, 0x52, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(53H_01H, 0x53, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(60H, 0x60, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + IAPDESCR(60H_01H, 0x60, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(60H_02H, 0x60, 0x02, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(60H_04H, 0x60, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(60H_08H, 0x60, 0x08, IAP_F_FM | IAP_F_WM | IAP_F_I7O), IAPDESCR(61H, 0x61, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), IAPDESCR(61H_00H, 0x61, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(62H, 0x62, IAP_M_AGENT, IAP_F_ALLCPUS), + IAPDESCR(62H, 0x62, IAP_M_AGENT, IAP_F_ALLCPUSCORE2), IAPDESCR(62H_00H, 0x62, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(63H, 0x63, IAP_M_AGENT | IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(63H, 0x63, IAP_M_CORE, IAP_F_CC), + IAPDESCR(63H_01H, 0x63, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(63H_02H, 0x63, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(64H, 0x64, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(64H_40H, 0x64, 0x40, IAP_F_FM | IAP_F_CC), @@ -723,16 +893,18 @@ static struct iap_event_descr iap_events IAP_F_CA | IAP_F_CC2), IAPDESCR(65H, 0x65, IAP_M_CORE, IAP_F_CC), - IAPDESCR(66H, 0x66, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), + IAPDESCR(66H, 0x66, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(67H, 0x67, IAP_M_AGENT | IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(67H, 0x67, IAP_M_AGENT, IAP_F_CC), - IAPDESCR(68H, 0x68, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(69H, 0x69, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(6AH, 0x6A, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(6BH, 0x6B, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(6CH, 0x6C, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), + IAPDESCR(68H, 0x68, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + IAPDESCR(69H, 0x69, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + IAPDESCR(6AH, 0x6A, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + IAPDESCR(6BH, 0x6B, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + + IAPDESCR(6CH, 0x6C, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + IAPDESCR(6CH_01H, 0x6C, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(6DH, 0x6D, IAP_M_AGENT | IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(6DH, 0x6D, IAP_M_CORE, IAP_F_CC), @@ -757,47 +929,89 @@ static struct iap_event_descr iap_events IAPDESCR(7BH, 0x7B, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), - IAPDESCR(7DH, 0x7D, IAP_M_CORE, IAP_F_ALLCPUS), + IAPDESCR(7DH, 0x7D, IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(7EH, 0x7E, IAP_M_AGENT | IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(7EH_00H, 0x7E, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(7FH, 0x7F, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), - IAPDESCR(80H_00H, 0x80, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(80H_02H, 0x80, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_I7), - IAPDESCR(80H_03H, 0x80, 0x03, IAP_F_FM | IAP_F_CA | IAP_F_I7), - - IAPDESCR(81H_00H, 0x81, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(80H_00H, 0x80, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(80H_01H, 0x80, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(80H_02H, 0x80, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_I7 | + IAP_F_WM), + IAPDESCR(80H_03H, 0x80, 0x03, IAP_F_FM | IAP_F_CA | IAP_F_I7 | + IAP_F_WM), + IAPDESCR(80H_04H, 0x80, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(81H_00H, 0x81, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(81H_01H, 0x81, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(81H_02H, 0x81, 0x02, IAP_F_FM | IAP_F_I7O), + IAPDESCR(82H_01H, 0x82, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(82H_02H, 0x82, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(82H_04H, 0x82, 0x04, IAP_F_FM | IAP_F_CA), IAPDESCR(82H_10H, 0x82, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(82H_12H, 0x82, 0x12, IAP_F_FM | IAP_F_CC2), IAPDESCR(82H_40H, 0x82, 0x40, IAP_F_FM | IAP_F_CC2), + IAPDESCR(83H_01H, 0x83, 0x01, IAP_F_FM | IAP_F_I7O), IAPDESCR(83H_02H, 0x83, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(85H_00H, 0x85, 0x00, IAP_F_FM | IAP_F_CC), - - IAPDESCR(86H_00H, 0x86, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - - IAPDESCR(87H_00H, 0x87, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - - IAPDESCR(88H_00H, 0x88, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(89H_00H, 0x89, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8AH_00H, 0x8A, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8BH_00H, 0x8B, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8CH_00H, 0x8C, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8DH_00H, 0x8D, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8EH_00H, 0x8E, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8FH_00H, 0x8F, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - - IAPDESCR(90H_00H, 0x90, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(91H_00H, 0x91, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(92H_00H, 0x92, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(93H_00H, 0x93, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(94H_00H, 0x94, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(85H_01H, 0x85, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(85H_02H, 0x85, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(85H_04H, 0x85, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(85H_10H, 0x85, 0x10, IAP_F_FM | IAP_F_I7O), + IAPDESCR(85H_20H, 0x85, 0x20, IAP_F_FM | IAP_F_I7O), + IAPDESCR(85H_40H, 0x85, 0x40, IAP_F_FM | IAP_F_I7O), + IAPDESCR(85H_80H, 0x85, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + + IAPDESCR(86H_00H, 0x86, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + + IAPDESCR(87H_00H, 0x87, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(87H_01H, 0x87, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(87H_02H, 0x87, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(87H_04H, 0x87, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(87H_08H, 0x87, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(87H_0FH, 0x87, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(88H_00H, 0x88, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(88H_01H, 0x88, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_02H, 0x88, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_04H, 0x88, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_07H, 0x88, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_08H, 0x88, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_10H, 0x88, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_20H, 0x88, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_30H, 0x88, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_40H, 0x88, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_7FH, 0x88, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(89H_00H, 0x89, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(89H_01H, 0x89, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_02H, 0x89, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_04H, 0x89, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_07H, 0x89, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_08H, 0x89, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_10H, 0x89, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_20H, 0x89, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_30H, 0x89, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_40H, 0x89, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_7FH, 0x89, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(8AH_00H, 0x8A, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(8BH_00H, 0x8B, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(8CH_00H, 0x8C, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(8DH_00H, 0x8D, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(8EH_00H, 0x8E, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(8FH_00H, 0x8F, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + + IAPDESCR(90H_00H, 0x90, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(91H_00H, 0x91, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(92H_00H, 0x92, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(93H_00H, 0x93, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(94H_00H, 0x94, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(97H_00H, 0x97, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(98H_00H, 0x98, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -811,6 +1025,18 @@ static struct iap_event_descr iap_events IAPDESCR(A1H_20H, 0xA1, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(A2H_00H, 0xA2, 0x00, IAP_F_FM | IAP_F_CC), + IAPDESCR(A2H_01H, 0xA2, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_02H, 0xA2, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_04H, 0xA2, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_08H, 0xA2, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_10H, 0xA2, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_20H, 0xA2, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_40H, 0xA2, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_80H, 0xA2, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A7H_01H, 0xA7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(AAH_01H, 0xAA, 0x01, IAP_F_FM | IAP_F_CC2), IAPDESCR(AAH_02H, 0xAA, 0x02, IAP_F_FM | IAP_F_CA), @@ -820,18 +1046,42 @@ static struct iap_event_descr iap_events IAPDESCR(ABH_01H, 0xAB, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(ABH_02H, 0xAB, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(B0H_00H, 0xB0, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B0H_80H, 0xB0, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(AEH_01H, 0xAE, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(B1H_00H, 0xB1, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B1H_80H, 0xB1, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_I7), - - IAPDESCR(B3H_01H, 0xB3, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B3H_02H, 0xB3, 0x02, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B3H_04H, 0xB3, 0x04, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B3H_08H, 0xB3, 0x08, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B3H_10H, 0xB3, 0x10, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B3H_20H, 0xB3, 0x20, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(B0H_00H, 0xB0, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(B0H_01H, 0xB0, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_02H, 0xB0, 0x02, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_04H, 0xB0, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_08H, 0xB0, 0x08, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_10H, 0xB0, 0x10, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_20H, 0xB0, 0x20, IAP_F_FM | IAP_F_I7O), + IAPDESCR(B0H_40H, 0xB0, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B0H_80H, 0xB0, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_WM | IAP_F_I7O), + + IAPDESCR(B1H_00H, 0xB1, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(B1H_01H, 0xB1, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_02H, 0xB1, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_04H, 0xB1, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_08H, 0xB1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_10H, 0xB1, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_1FH, 0xB1, 0x1F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_20H, 0xB1, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_3FH, 0xB1, 0x3F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_40H, 0xB1, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_80H, 0xB1, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_I7 | + IAP_F_WM), + + IAPDESCR(B2H_01H, 0xB2, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(B3H_01H, 0xB3, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_WM | IAP_F_I7O), + IAPDESCR(B3H_02H, 0xB3, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_WM | IAP_F_I7O), + IAPDESCR(B3H_04H, 0xB3, 0x04, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_WM | IAP_F_I7O), + IAPDESCR(B3H_08H, 0xB3, 0x08, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(B3H_10H, 0xB3, 0x10, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(B3H_20H, 0xB3, 0x20, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(B3H_81H, 0xB3, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(B3H_82H, 0xB3, 0x82, IAP_F_FM | IAP_F_CA), IAPDESCR(B3H_84H, 0xB3, 0x84, IAP_F_FM | IAP_F_CA), @@ -839,10 +1089,28 @@ static struct iap_event_descr iap_events IAPDESCR(B3H_90H, 0xB3, 0x90, IAP_F_FM | IAP_F_CA), IAPDESCR(B3H_A0H, 0xB3, 0xA0, IAP_F_FM | IAP_F_CA), - IAPDESCR(C0H_00H, 0xC0, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(C0H_01H, 0xC0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C0H_02H, 0xC0, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C0H_04H, 0xC0, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(B4H_01H, 0xB4, 0x01, IAP_F_FM | IAP_F_WM), + IAPDESCR(B4H_02H, 0xB4, 0x02, IAP_F_FM | IAP_F_WM), + IAPDESCR(B4H_04H, 0xB4, 0x04, IAP_F_FM | IAP_F_WM), + + IAPDESCR(B7H_01H, 0xB7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(B8H_01H, 0xB8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B8H_02H, 0xB8, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B8H_04H, 0xB8, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(BAH_01H, 0xBA, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(BAH_02H, 0xBA, 0x02, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(BBH_01H, 0xBB, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(C0H_00H, 0xC0, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(C0H_01H, 0xC0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C0H_02H, 0xC0, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C0H_04H, 0xC0, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(C0H_08H, 0xC0, 0x08, IAP_F_FM | IAP_F_CC2E), IAPDESCR(C1H_00H, 0xC1, 0x00, IAP_F_FM | IAP_F_CC), @@ -850,43 +1118,64 @@ static struct iap_event_descr iap_events IAPDESCR(C1H_FEH, 0xC1, 0xFE, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C2H_00H, 0xC2, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(C2H_01H, 0xC2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C2H_02H, 0xC2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C2H_04H, 0xC2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(C2H_01H, 0xC2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C2H_02H, 0xC2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C2H_04H, 0xC2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(C2H_07H, 0xC2, 0x07, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C2H_08H, 0xC2, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C2H_0FH, 0xC2, 0x0F, IAP_F_FM | IAP_F_CC2), IAPDESCR(C2H_10H, 0xC2, 0x10, IAP_F_FM | IAP_F_CA), IAPDESCR(C3H_00H, 0xC3, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(C3H_01H, 0xC3, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C3H_04H, 0xC3, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - - IAPDESCR(C4H_00H, 0xC4, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(C4H_01H, 0xC4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C4H_02H, 0xC4, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C4H_04H, 0xC4, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(C3H_01H, 0xC3, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C3H_02H, 0xC3, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(C3H_04H, 0xC3, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C3H_10H, 0xC3, 0x10, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(C4H_00H, 0xC4, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C4H_01H, 0xC4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C4H_02H, 0xC4, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C4H_04H, 0xC4, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(C4H_08H, 0xC4, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C4H_0CH, 0xC4, 0x0C, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C4H_0FH, 0xC4, 0x0F, IAP_F_FM | IAP_F_CA), - IAPDESCR(C5H_00H, 0xC5, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(C5H_00H, 0xC5, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C5H_01H, 0xC5, 0x01, IAP_F_FM | IAP_F_WM), + IAPDESCR(C5H_02H, 0xC5, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(C5H_04H, 0xC5, 0x04, IAP_F_FM | IAP_F_WM), IAPDESCR(C6H_00H, 0xC6, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(C6H_01H, 0xC6, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C6H_02H, 0xC6, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C7H_00H, 0xC7, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(C7H_01H, 0xC7, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C7H_02H, 0xC7, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C7H_04H, 0xC7, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C7H_08H, 0xC7, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C7H_10H, 0xC7, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(C7H_01H, 0xC7, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C7H_02H, 0xC7, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C7H_04H, 0xC7, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C7H_08H, 0xC7, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C7H_10H, 0xC7, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(C7H_1FH, 0xC7, 0x1F, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(C8H_00H, 0xC8, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(C8H_00H, 0xC8, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(C8H_20H, 0xC8, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(C9H_00H, 0xC9, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(C9H_00H, 0xC9, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(CAH_00H, 0xCA, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(CAH_01H, 0xCA, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -894,36 +1183,59 @@ static struct iap_event_descr iap_events IAPDESCR(CAH_04H, 0xCA, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(CAH_08H, 0xCA, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(CBH_01H, 0xCB, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(CBH_02H, 0xCB, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(CBH_04H, 0xCB, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(CBH_08H, 0xCB, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(CBH_10H, 0xCB, 0x10, IAP_F_FM | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(CBH_01H, 0xCB, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CBH_02H, 0xCB, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CBH_04H, 0xCB, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CBH_08H, 0xCB, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CBH_10H, 0xCB, 0x10, IAP_F_FM | IAP_F_CC2 | IAP_F_I7 | + IAP_F_WM), + IAPDESCR(CBH_40H, 0xCB, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(CBH_80H, 0xCB, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(CCH_00H, 0xCC, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(CCH_01H, 0xCC, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(CCH_02H, 0xCC, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(CCH_01H, 0xCC, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CCH_02H, 0xCC, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CCH_03H, 0xCC, 0x03, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(CDH_00H, 0xCD, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(CEH_00H, 0xCE, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(CDH_00H, 0xCD, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(CEH_00H, 0xCE, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(CFH_00H, 0xCF, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D0H_00H, 0xD0, 0x00, IAP_F_FM | IAP_F_CC), + IAPDESCR(D0H_01H, 0xD0, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(D2H_01H, 0xD2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(D2H_02H, 0xD2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(D2H_04H, 0xD2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(D2H_08H, 0xD2, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(D2H_0FH, 0xD2, 0x0F, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(D1H_01H, 0xD1, 0x01, IAP_F_FM | IAP_F_WM), + IAPDESCR(D1H_02H, 0xD1, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(D1H_04H, 0xD1, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(D1H_08H, 0xD1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(D2H_01H, 0xD2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(D2H_02H, 0xD2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(D2H_04H, 0xD2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(D2H_08H, 0xD2, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(D2H_0FH, 0xD2, 0x0F, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(D2H_10H, 0xD2, 0x10, IAP_F_FM | IAP_F_CC2E), - IAPDESCR(D4H_01H, 0xD4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(D4H_01H, 0xD4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(D4H_02H, 0xD4, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D4H_04H, 0xD4, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D4H_08H, 0xD4, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D4H_0FH, 0xD4, 0x0F, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(D5H_01H, 0xD5, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(D5H_01H, 0xD5, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(D5H_02H, 0xD5, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D5H_04H, 0xD5, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D5H_08H, 0xD5, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -947,6 +1259,7 @@ static struct iap_event_descr iap_events IAPDESCR(DAH_02H, 0xDA, 0x02, IAP_F_FM | IAP_F_CC), IAPDESCR(DBH_00H, 0xDB, 0x00, IAP_F_FM | IAP_F_CC), + IAPDESCR(DBH_01H, 0xDB, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(DCH_01H, 0xDC, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(DCH_02H, 0xDC, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -956,276 +1269,76 @@ static struct iap_event_descr iap_events IAPDESCR(DCH_1FH, 0xDC, 0x1F, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(E0H_00H, 0xE0, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(E0H_01H, 0xE0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(E0H_01H, 0xE0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | + IAP_F_WM), IAPDESCR(E2H_00H, 0xE2, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(E4H_00H, 0xE4, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(E6H_00H, 0xE6, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(E6H_01H, 0xE6, 0x01, IAP_F_FM | IAP_F_CA), + IAPDESCR(E4H_00H, 0xE4, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(E4H_01H, 0xE4, 0x01, IAP_F_FM | IAP_F_I7O), - IAPDESCR(F0H_00H, 0xF0, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(F8H_00H, 0xF8, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(E5H_01H, 0xE5, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - /* Added with nehalem. */ - IAPDESCR(02H_01H, 0x02, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(03H_01H, 0x03, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(05H_02H, 0x05, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(05H_03H, 0x05, 0x03, IAP_F_FM | IAP_F_I7), - IAPDESCR(06H_01H, 0x06, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(06H_02H, 0x06, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(06H_04H, 0x06, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(06H_08H, 0x06, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(06H_0FH, 0x06, 0x0F, IAP_F_FM | IAP_F_I7), - IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(09H_04H, 0x09, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(09H_08H, 0x09, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(0BH_01H, 0x0B, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(0BH_02H, 0x0B, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(0FH_02H, 0x0F, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(0FH_08H, 0x0F, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(0FH_10H, 0x0F, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(0FH_20H, 0x0F, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_02H, 0x10, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_04H, 0x10, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_08H, 0x10, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_10H, 0x10, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_20H, 0x10, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_40H, 0x10, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_80H, 0x10, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_02H, 0x12, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_04H, 0x12, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_08H, 0x12, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_10H, 0x12, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_20H, 0x12, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_40H, 0x12, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(13H_02H, 0x13, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(13H_04H, 0x13, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(13H_07H, 0x13, 0x07, IAP_F_FM | IAP_F_I7), - IAPDESCR(14H_02H, 0x14, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(17H_01H, 0x17, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(18H_01H, 0x18, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(1DH_01H, 0x1D, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(1DH_02H, 0x1D, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(1DH_04H, 0x1D, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(1EH_01H, 0x1E, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_01H, 0x24, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_02H, 0x24, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_03H, 0x24, 0x03, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_04H, 0x24, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_08H, 0x24, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_0CH, 0x24, 0x0C, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_10H, 0x24, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_20H, 0x24, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_40H, 0x24, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_80H, 0x24, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_C0H, 0x24, 0xC0, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_01H, 0x26, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_02H, 0x26, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_04H, 0x26, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_08H, 0x26, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_0FH, 0x26, 0x0F, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_10H, 0x26, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_20H, 0x26, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_40H, 0x26, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_80H, 0x26, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_F0H, 0x26, 0xF0, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_FFH, 0x26, 0xFF, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_01H, 0x27, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_02H, 0x27, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_04H, 0x27, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_08H, 0x27, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_0EH, 0x27, 0x0E, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_0FH, 0x27, 0x0F, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_10H, 0x27, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_20H, 0x27, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_40H, 0x27, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_80H, 0x27, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_E0H, 0x27, 0xE0, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_F0H, 0x27, 0xF0, IAP_F_FM | IAP_F_I7), - IAPDESCR(28H_01H, 0x28, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(28H_02H, 0x28, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(28H_04H, 0x28, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(28H_08H, 0x28, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(28H_0FH, 0x28, 0x0F, IAP_F_FM | IAP_F_I7), - IAPDESCR(3DH_01H, 0x3D, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(40H_01H, 0x40, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(40H_02H, 0x40, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(40H_04H, 0x40, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(40H_08H, 0x40, 0x08, IAP_F_FM | IAP_F_I7), *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri Apr 16 16:15:30 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5731B106566C; Fri, 16 Apr 2010 16:15:30 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 431AA8FC20; Fri, 16 Apr 2010 16:15:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3GGFUi9073749; Fri, 16 Apr 2010 16:15:30 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3GGFUXf073744; Fri, 16 Apr 2010 16:15:30 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201004161615.o3GGFUXf073744@svn.freebsd.org> From: Fabien Thomas Date: Fri, 16 Apr 2010 16:15:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206704 - stable/7/lib/libpmc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 16:15:30 -0000 Author: fabient Date: Fri Apr 16 16:15:30 2010 New Revision: 206704 URL: http://svn.freebsd.org/changeset/base/206704 Log: MFC r206089, r206684: - Support for uncore counting events: one fixed PMC with the uncore domain clock, 8 programmable PMC. - Westmere based CPU (Xeon 5600, Corei7 980X) support. - New man pages with events list for core and uncore. - Updated Corei7 events with Intel 253669-033US December 2009 doc. There is some removed events in the documentation, they have been kept in the code but documented in the man page as obsolete. - Offcore response events can be setup with rsp token. Sponsored by: NETASQ Added: stable/7/lib/libpmc/pmc.corei7.3 - copied unchanged from r206089, head/lib/libpmc/pmc.corei7.3 stable/7/lib/libpmc/pmc.corei7uc.3 - copied unchanged from r206089, head/lib/libpmc/pmc.corei7uc.3 stable/7/lib/libpmc/pmc.ucf.3 - copied unchanged from r206089, head/lib/libpmc/pmc.ucf.3 stable/7/lib/libpmc/pmc.westmere.3 - copied unchanged from r206089, head/lib/libpmc/pmc.westmere.3 stable/7/lib/libpmc/pmc.westmereuc.3 - copied unchanged from r206089, head/lib/libpmc/pmc.westmereuc.3 Modified: stable/7/lib/libpmc/Makefile stable/7/lib/libpmc/libpmc.c Directory Properties: stable/7/lib/libpmc/ (props changed) Modified: stable/7/lib/libpmc/Makefile ============================================================================== --- stable/7/lib/libpmc/Makefile Fri Apr 16 16:13:49 2010 (r206703) +++ stable/7/lib/libpmc/Makefile Fri Apr 16 16:15:30 2010 (r206704) @@ -28,11 +28,16 @@ MAN+= pmc.atom.3 MAN+= pmc.core.3 MAN+= pmc.core2.3 MAN+= pmc.iaf.3 +MAN+= pmc.ucf.3 MAN+= pmc.k7.3 MAN+= pmc.k8.3 MAN+= pmc.p4.3 MAN+= pmc.p5.3 MAN+= pmc.p6.3 +MAN+= pmc.corei7.3 +MAN+= pmc.corei7uc.3 +MAN+= pmc.westmere.3 +MAN+= pmc.westmereuc.3 MAN+= pmc.tsc.3 MLINKS+= \ Modified: stable/7/lib/libpmc/libpmc.c ============================================================================== --- stable/7/lib/libpmc/libpmc.c Fri Apr 16 16:13:49 2010 (r206703) +++ stable/7/lib/libpmc/libpmc.c Fri Apr 16 16:15:30 2010 (r206704) @@ -54,6 +54,10 @@ static int iaf_allocate_pmc(enum pmc_eve struct pmc_op_pmcallocate *_pmc_config); static int iap_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); +static int ucf_allocate_pmc(enum pmc_event _pe, char *_ctrspec, + struct pmc_op_pmcallocate *_pmc_config); +static int ucp_allocate_pmc(enum pmc_event _pe, char *_ctrspec, + struct pmc_op_pmcallocate *_pmc_config); static int k8_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); static int p4_allocate_pmc(enum pmc_event _pe, char *_ctrspec, @@ -132,6 +136,7 @@ PMC_CLASSDEP_TABLE(k8, K8); PMC_CLASSDEP_TABLE(p4, P4); PMC_CLASSDEP_TABLE(p5, P5); PMC_CLASSDEP_TABLE(p6, P6); +PMC_CLASSDEP_TABLE(ucf, UCF); #undef __PMC_EV_ALIAS #define __PMC_EV_ALIAS(N,CODE) { N, PMC_EV_##CODE }, @@ -157,6 +162,21 @@ static const struct pmc_event_descr core __PMC_EV_ALIAS_COREI7() }; +static const struct pmc_event_descr westmere_event_table[] = +{ + __PMC_EV_ALIAS_WESTMERE() +}; + +static const struct pmc_event_descr corei7uc_event_table[] = +{ + __PMC_EV_ALIAS_COREI7UC() +}; + +static const struct pmc_event_descr westmereuc_event_table[] = +{ + __PMC_EV_ALIAS_WESTMEREUC() +}; + /* * PMC_MDEP_TABLE(NAME, PRIMARYCLASS, ADDITIONAL_CLASSES...) * @@ -170,7 +190,8 @@ static const struct pmc_event_descr core PMC_MDEP_TABLE(atom, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(core, IAP, PMC_CLASS_TSC); PMC_MDEP_TABLE(core2, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); -PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); +PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); +PMC_MDEP_TABLE(westmere, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(k7, K7, PMC_CLASS_TSC); PMC_MDEP_TABLE(k8, K8, PMC_CLASS_TSC); PMC_MDEP_TABLE(p4, P4, PMC_CLASS_TSC); @@ -201,6 +222,10 @@ PMC_CLASS_TABLE_DESC(atom, IAP, atom, ia PMC_CLASS_TABLE_DESC(core, IAP, core, iap); PMC_CLASS_TABLE_DESC(core2, IAP, core2, iap); PMC_CLASS_TABLE_DESC(corei7, IAP, corei7, iap); +PMC_CLASS_TABLE_DESC(westmere, IAP, westmere, iap); +PMC_CLASS_TABLE_DESC(ucf, UCF, ucf, ucf); +PMC_CLASS_TABLE_DESC(corei7uc, UCP, corei7uc, ucp); +PMC_CLASS_TABLE_DESC(westmereuc, UCP, westmereuc, ucp); #endif #if defined(__i386__) PMC_CLASS_TABLE_DESC(k7, K7, k7, k7); @@ -281,7 +306,7 @@ struct pmc_masks { const uint32_t pm_value; }; #define PMCMASK(N,V) { .pm_name = #N, .pm_value = (V) } -#define NULLMASK PMCMASK(NULL,0) +#define NULLMASK { .pm_name = NULL } #if defined(__amd64__) || defined(__i386__) static int @@ -474,6 +499,8 @@ static struct pmc_event_alias core2_alia #define atom_aliases_without_iaf core2_aliases_without_iaf #define corei7_aliases core2_aliases #define corei7_aliases_without_iaf core2_aliases_without_iaf +#define westmere_aliases core2_aliases +#define westmere_aliases_without_iaf core2_aliases_without_iaf #define IAF_KW_OS "os" #define IAF_KW_USR "usr" @@ -524,6 +551,7 @@ iaf_allocate_pmc(enum pmc_event pe, char #define IAP_KW_SNOOPTYPE "snooptype" #define IAP_KW_TRANSITION "trans" #define IAP_KW_USR "usr" +#define IAP_KW_RSP "rsp" static struct pmc_masks iap_core_mask[] = { PMCMASK(all, (0x3 << 14)), @@ -571,19 +599,38 @@ static struct pmc_masks iap_transition_m NULLMASK }; +static struct pmc_masks iap_rsp_mask[] = { + PMCMASK(DMND_DATA_RD, (1 << 0)), + PMCMASK(DMND_RFO, (1 << 1)), + PMCMASK(DMND_IFETCH, (1 << 2)), + PMCMASK(WB, (1 << 3)), + PMCMASK(PF_DATA_RD, (1 << 4)), + PMCMASK(PF_RFO, (1 << 5)), + PMCMASK(PF_IFETCH, (1 << 6)), + PMCMASK(OTHER, (1 << 7)), + PMCMASK(UNCORE_HIT, (1 << 8)), + PMCMASK(OTHER_CORE_HIT_SNP, (1 << 9)), + PMCMASK(OTHER_CORE_HITM, (1 << 10)), + PMCMASK(REMOTE_CACHE_FWD, (1 << 12)), + PMCMASK(REMOTE_DRAM, (1 << 13)), + PMCMASK(LOCAL_DRAM, (1 << 14)), + PMCMASK(NON_DRAM, (1 << 15)), + NULLMASK +}; + static int iap_allocate_pmc(enum pmc_event pe, char *ctrspec, struct pmc_op_pmcallocate *pmc_config) { char *e, *p, *q; - uint32_t cachestate, evmask; + uint32_t cachestate, evmask, rsp; int count, n; pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE | PMC_CAP_QUALIFIER); pmc_config->pm_md.pm_iap.pm_iap_config = 0; - cachestate = evmask = 0; + cachestate = evmask = rsp = 0; /* Parse additional modifiers if present */ while ((p = strsep(&ctrspec, ",")) != NULL) { @@ -630,8 +677,7 @@ iap_allocate_pmc(enum pmc_event pe, char return (-1); } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_ATOM || cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2 || - cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2EXTREME || - cpu_info.pm_cputype == PMC_CPU_INTEL_COREI7) { + cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2EXTREME) { if (KWPREFIXMATCH(p, IAP_KW_SNOOPRESPONSE "=")) { n = pmc_parse_mask(iap_snoopresponse_mask, p, &evmask); @@ -640,6 +686,12 @@ iap_allocate_pmc(enum pmc_event pe, char &evmask); } else return (-1); + } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_COREI7 || + cpu_info.pm_cputype == PMC_CPU_INTEL_WESTMERE) { + if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { + n = pmc_parse_mask(iap_rsp_mask, p, &rsp); + } else + return (-1); } else return (-1); @@ -672,6 +724,69 @@ iap_allocate_pmc(enum pmc_event pe, char } pmc_config->pm_md.pm_iap.pm_iap_config |= cachestate; + pmc_config->pm_md.pm_iap.pm_iap_rsp = rsp; + + return (0); +} + +/* + * Intel Uncore. + */ + +static int +ucf_allocate_pmc(enum pmc_event pe, char *ctrspec, + struct pmc_op_pmcallocate *pmc_config) +{ + (void) pe; + (void) ctrspec; + + pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); + pmc_config->pm_md.pm_ucf.pm_ucf_flags = 0; + + return (0); +} + +#define UCP_KW_CMASK "cmask" +#define UCP_KW_EDGE "edge" +#define UCP_KW_INV "inv" + +static int +ucp_allocate_pmc(enum pmc_event pe, char *ctrspec, + struct pmc_op_pmcallocate *pmc_config) +{ + char *e, *p, *q; + int count, n; + + (void) pe; + + pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE | + PMC_CAP_QUALIFIER); + pmc_config->pm_md.pm_ucp.pm_ucp_config = 0; + + /* Parse additional modifiers if present */ + while ((p = strsep(&ctrspec, ",")) != NULL) { + + n = 0; + if (KWPREFIXMATCH(p, UCP_KW_CMASK "=")) { + q = strchr(p, '='); + if (*++q == '\0') /* skip '=' */ + return (-1); + count = strtol(q, &e, 0); + if (e == q || *e != '\0') + return (-1); + pmc_config->pm_caps |= PMC_CAP_THRESHOLD; + pmc_config->pm_md.pm_ucp.pm_ucp_config |= + UCP_CMASK(count); + } else if (KWMATCH(p, UCP_KW_EDGE)) { + pmc_config->pm_caps |= PMC_CAP_EDGE; + } else if (KWMATCH(p, UCP_KW_INV)) { + pmc_config->pm_caps |= PMC_CAP_INVERT; + } else + return (-1); + + if (n < 0) /* Parsing failed. */ + return (-1); + } return (0); } @@ -2309,6 +2424,31 @@ pmc_event_names_of_class(enum pmc_class ev = corei7_event_table; count = PMC_EVENT_TABLE_SIZE(corei7); break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmere_event_table; + count = PMC_EVENT_TABLE_SIZE(westmere); + break; + } + break; + case PMC_CLASS_UCF: + ev = ucf_event_table; + count = PMC_EVENT_TABLE_SIZE(ucf); + break; + case PMC_CLASS_UCP: + /* + * Return the most appropriate set of event name + * spellings for the current CPU. + */ + switch (cpu_info.pm_cputype) { + default: + case PMC_CPU_INTEL_COREI7: + ev = corei7uc_event_table; + count = PMC_EVENT_TABLE_SIZE(corei7uc); + break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmereuc_event_table; + count = PMC_EVENT_TABLE_SIZE(westmereuc); + break; } break; case PMC_CLASS_TSC: @@ -2514,8 +2654,15 @@ pmc_init(void) PMC_MDEP_INIT_INTEL_V2(core2); break; case PMC_CPU_INTEL_COREI7: + pmc_class_table[n++] = &ucf_class_table_descr; + pmc_class_table[n++] = &corei7uc_class_table_descr; PMC_MDEP_INIT_INTEL_V2(corei7); break; + case PMC_CPU_INTEL_WESTMERE: + pmc_class_table[n++] = &ucf_class_table_descr; + pmc_class_table[n++] = &westmereuc_class_table_descr; + PMC_MDEP_INIT_INTEL_V2(westmere); + break; case PMC_CPU_INTEL_PIV: PMC_MDEP_INIT(p4); pmc_class_table[n] = &p4_class_table_descr; @@ -2618,10 +2765,30 @@ _pmc_name_of_event(enum pmc_event pe, en ev = corei7_event_table; evfence = corei7_event_table + PMC_EVENT_TABLE_SIZE(corei7); break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmere_event_table; + evfence = westmere_event_table + PMC_EVENT_TABLE_SIZE(westmere); + break; + default: /* Unknown CPU type. */ + break; + } + } else if (pe >= PMC_EV_UCF_FIRST && pe <= PMC_EV_UCF_LAST) { + ev = ucf_event_table; + evfence = ucf_event_table + PMC_EVENT_TABLE_SIZE(ucf); + } else if (pe >= PMC_EV_UCP_FIRST && pe <= PMC_EV_UCP_LAST) { + switch (cpu) { + case PMC_CPU_INTEL_COREI7: + ev = corei7uc_event_table; + evfence = corei7uc_event_table + PMC_EVENT_TABLE_SIZE(corei7uc); + break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmereuc_event_table; + evfence = westmereuc_event_table + PMC_EVENT_TABLE_SIZE(westmereuc); + break; default: /* Unknown CPU type. */ break; } - } if (pe >= PMC_EV_K7_FIRST && pe <= PMC_EV_K7_LAST) { + } else if (pe >= PMC_EV_K7_FIRST && pe <= PMC_EV_K7_LAST) { ev = k7_event_table; evfence = k7_event_table + PMC_EVENT_TABLE_SIZE(k7); } else if (pe >= PMC_EV_K8_FIRST && pe <= PMC_EV_K8_LAST) { Copied: stable/7/lib/libpmc/pmc.corei7.3 (from r206089, head/lib/libpmc/pmc.corei7.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/lib/libpmc/pmc.corei7.3 Fri Apr 16 16:15:30 2010 (r206704, copy of r206089, head/lib/libpmc/pmc.corei7.3) @@ -0,0 +1,1581 @@ +.\" Copyright (c) 2010 Fabien Thomas. 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 Joseph Koshy ``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 Joseph Koshy be liable +.\" for any direct, indirect, incidental, special, exemplary, or consequential +.\" damages (including, but not limited to, procurement of substitute goods +.\" or services; loss of use, data, or profits; or business interruption) +.\" however caused and on any theory of liability, whether in contract, strict +.\" liability, or tort (including negligence or otherwise) arising in any way +.\" out of the use of this software, even if advised of the possibility of +.\" such damage. +.\" +.\" $FreeBSD$ +.\" +.Dd March 24, 2010 +.Os +.Dt PMC.COREI7 3 +.Sh NAME +.Nm pmc.corei7 +.Nd measurement events for +.Tn Intel +.Tn Core i7 and Xeon 5500 +family CPUs +.Sh LIBRARY +.Lb libpmc +.Sh SYNOPSIS +.In pmc.h +.Sh DESCRIPTION +.Tn Intel +.Tn "Core i7" +CPUs contain PMCs conforming to version 2 of the +.Tn Intel +performance measurement architecture. +These CPUs may contain up to three classes of PMCs: +.Bl -tag -width "Li PMC_CLASS_IAP" +.It Li PMC_CLASS_IAF +Fixed-function counters that count only one hardware event per counter. +.It Li PMC_CLASS_IAP +Programmable counters that may be configured to count one of a defined +set of hardware events. +.El +.Pp +The number of PMCs available in each class and their widths need to be +determined at run time by calling +.Xr pmc_cpuinfo 3 . +.Pp +Intel Core i7 and Xeon 5500 PMCs are documented in +.Rs +.%B "Intel(R) 64 and IA-32 Architectures Software Developes Manual" +.%T "Volume 3B: System Programming Guide, Part 2" +.%N "Order Number: 253669-033US" +.%D December 2009 +.%Q "Intel Corporation" +.Re +.Ss COREI7 AND XEON 5500 FIXED FUNCTION PMCS +These PMCs and their supported events are documented in +.Xr pmc.iaf 3 . +Not all CPUs in this family implement fixed-function counters. +.Ss COREI7 AND XEON 5500 PROGRAMMABLE PMCS +The programmable PMCs support the following capabilities: +.Bl -column "PMC_CAP_INTERRUPT" "Support" +.It Em Capability Ta Em Support +.It PMC_CAP_CASCADE Ta \&No +.It PMC_CAP_EDGE Ta Yes +.It PMC_CAP_INTERRUPT Ta Yes +.It PMC_CAP_INVERT Ta Yes +.It PMC_CAP_READ Ta Yes +.It PMC_CAP_PRECISE Ta \&No +.It PMC_CAP_SYSTEM Ta Yes +.It PMC_CAP_TAGGING Ta \&No +.It PMC_CAP_THRESHOLD Ta Yes +.It PMC_CAP_USER Ta Yes +.It PMC_CAP_WRITE Ta Yes +.El +.Ss Event Qualifiers +Event specifiers for these PMCs support the following common +qualifiers: +.Bl -tag -width indent +.It Li rsp= Ns Ar value +Configure the Off-core Response bits. +.Bl -tag -width indent +.It Li DMND_DATA_RD +Counts the number of demand and DCU prefetch data reads of full +and partial cachelines as well as demand data page table entry +cacheline reads. Does not count L2 data read prefetches or +instruction fetches. +.It Li DMND_RFO +Counts the number of demand and DCU prefetch reads for ownership +(RFO) requests generated by a write to data cacheline. Does not +count L2 RFO. +.It Li DMND_IFETCH +Counts the number of demand and DCU prefetch instruction cacheline +reads. Does not count L2 code read prefetches. +WB +Counts the number of writeback (modified to exclusive) transactions. +.It Li PF_DATA_RD +Counts the number of data cacheline reads generated by L2 prefetchers. +.It Li PF_RFO +Counts the number of RFO requests generated by L2 prefetchers. +.It Li PF_IFETCH +Counts the number of code reads generated by L2 prefetchers. +.It Li OTHER +Counts one of the following transaction types, including L3 invalidate, +I/O, full or partial writes, WC or non-temporal stores, CLFLUSH, Fences, +lock, unlock, split lock. +.It Li UNCORE_HIT +L3 Hit: local or remote home requests that hit L3 cache in the uncore +with no coherency actions required (snooping). +.It Li OTHER_CORE_HIT_SNP +L3 Hit: local or remote home requests that hit L3 cache in the uncore +and was serviced by another core with a cross core snoop where no modified +copies were found (clean). +.It Li OTHER_CORE_HITM +L3 Hit: local or remote home requests that hit L3 cache in the uncore +and was serviced by another core with a cross core snoop where modified +copies were found (HITM). +.It Li REMOTE_CACHE_FWD +L3 Miss: local homed requests that missed the L3 cache and was serviced +by forwarded data following a cross package snoop where no modified +copies found. (Remote home requests are not counted) +.It Li REMOTE_DRAM +L3 Miss: remote home requests that missed the L3 cache and were serviced +by remote DRAM. +.It Li LOCAL_DRAM +L3 Miss: local home requests that missed the L3 cache and were serviced +by local DRAM. +.It Li NON_DRAM +Non-DRAM requests that were serviced by IOH. +.El +.It Li cmask= Ns Ar value +Configure the PMC to increment only if the number of configured +events measured in a cycle is greater than or equal to +.Ar value . +.It Li edge +Configure the PMC to count the number of de-asserted to asserted +transitions of the conditions expressed by the other qualifiers. +If specified, the counter will increment only once whenever a +condition becomes true, irrespective of the number of clocks during +which the condition remains true. +.It Li inv +Invert the sense of comparison when the +.Dq Li cmask +qualifier is present, making the counter increment when the number of +events per cycle is less than the value specified by the +.Dq Li cmask +qualifier. +.It Li os +Configure the PMC to count events happening at processor privilege +level 0. +.It Li usr +Configure the PMC to count events occurring at privilege levels 1, 2 +or 3. +.El +.Pp +If neither of the +.Dq Li os +or +.Dq Li usr +qualifiers are specified, the default is to enable both. +.Ss Event Specifiers (Programmable PMCs) +Core i7 and Xeon 5500 programmable PMCs support the following events: +.Bl -tag -width indent +.It Li SB_DRAIN.ANY +.Pq Event 04H , Umask 07H +Counts the number of store buffer drains. +.It Li STORE_BLOCKS.AT_RET +.Pq Event 06H , Umask 04H +Counts number of loads delayed with at-Retirement block code. The following +loads need to be executed at retirement and wait for all senior stores on +the same thread to be drained: load splitting across 4K boundary (page +split), load accessing uncacheable (UC or USWC) memory, load lock, and load +with page table in UC or USWC memory region. +.It Li STORE_BLOCKS.L1D_BLOCK +.Pq Event 06H , Umask 08H +Cacheable loads delayed with L1D block code +.It Li PARTIAL_ADDRESS_ALIAS +.Pq Event 07H , Umask 01H +Counts false dependency due to partial address aliasing +.It Li DTLB_LOAD_MISSES.ANY +.Pq Event 08H , Umask 01H +Counts all load misses that cause a page walk +.It Li DTLB_LOAD_MISSES.WALK_COMPLETED +.Pq Event 08H , Umask 02H +Counts number of completed page walks due to load miss in the STLB. +.It Li DTLB_LOAD_MISSES.STLB_HIT +.Pq Event 08H , Umask 10H +Number of cache load STLB hits +.It Li DTLB_LOAD_MISSES.PDE_MISS +.Pq Event 08H , Umask 20H +Number of DTLB cache load misses where the low part of the linear to +physical address translation was missed. +.It Li DTLB_LOAD_MISSES.PDP_MISS +.Pq Event 08H , Umask 40H +Number of DTLB cache load misses where the high part of the linear to +physical address translation was missed. +.It Li DTLB_LOAD_MISSES.LARGE_WALK_COMPLETED +.Pq Event 08H , Umask 80H +Counts number of completed large page walks due to load miss in the STLB. +.It Li MEM_INST_RETIRED.LOADS +.Pq Event 0BH , Umask 01H +Counts the number of instructions with an architecturally-visible store +retired on the architected path. +In conjunction with ld_lat facility +.It Li MEM_INST_RETIRED.STORES +.Pq Event 0BH , Umask 02H +Counts the number of instructions with an architecturally-visible store +retired on the architected path. +In conjunction with ld_lat facility +.It Li MEM_INST_RETIRED.LATENCY_ABOVE_THRESHOLD +.Pq Event 0BH , Umask 10H +Counts the number of instructions exceeding the latency specified with +ld_lat facility. +In conjunction with ld_lat facility +.It Li MEM_STORE_RETIRED.DTLB_MISS +.Pq Event 0CH , Umask 01H +The event counts the number of retired stores that missed the DTLB. The DTLB +miss is not counted if the store operation causes a fault. Does not counter +prefetches. Counts both primary and secondary misses to the TLB +.It Li UOPS_ISSUED.ANY +.Pq Event 0EH , Umask 01H +Counts the number of Uops issued by the Register Allocation Table to the +Reservation Station, i.e. the UOPs issued from the front end to the back +end. +.It Li UOPS_ISSUED.STALLED_CYCLES +.Pq Event 0EH , Umask 01H +Counts the number of cycles no Uops issued by the Register Allocation Table +to the Reservation Station, i.e. the UOPs issued from the front end to the +back end. +set invert=1, cmask = 1 +.It Li UOPS_ISSUED.FUSED +.Pq Event 0EH , Umask 02H +Counts the number of fused Uops that were issued from the Register +Allocation Table to the Reservation Station. +.It Li MEM_UNCORE_RETIRED.L3_DATA_MISS_UNKNOWN +.Pq Event 0FH , Umask 01H +Counts number of memory load instructions retired where the memory reference +missed L3 and data source is unknown. +Available only for CPUID signature 06_2EH +.It Li MEM_UNCORE_RETIRED.OTHER_CORE_L2_HITM +.Pq Event 0FH , Umask 02H +Counts number of memory load instructions retired where the memory reference +hit modified data in a sibling core residing on the same socket. +.It Li MEM_UNCORE_RETIRED.REMOTE_CACHE_LOCAL_HOME_HIT +.Pq Event 0FH , Umask 08H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and HIT in a remote socket's cache. Only +counts locally homed lines. +.It Li MEM_UNCORE_RETIRED.REMOTE_DRAM +.Pq Event 0FH , Umask 10H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and was remotely homed. This includes both +DRAM access and HITM in a remote socket's cache for remotely homed lines. +.It Li MEM_UNCORE_RETIRED.LOCAL_DRAM +.Pq Event 0FH , Umask 20H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and required a local socket memory +reference. This includes locally homed cachelines that were in a modified +state in another socket. +.It Li MEM_UNCORE_RETIRED.UNCACHEABLE +.Pq Event 0FH , Umask 80H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and to perform I/O. +Available only for CPUID signature 06_2EH +.It Li FP_COMP_OPS_EXE.X87 +.Pq Event 10H , Umask 01H +Counts the number of FP Computational Uops Executed. The number of FADD, +FSUB, FCOM, FMULs, integer MULsand IMULs, FDIVs, FPREMs, FSQRTS, integer +DIVs, and IDIVs. This event does not distinguish an FADD used in the middle +of a transcendental flow from a separate FADD instruction. +.It Li FP_COMP_OPS_EXE.MMX +.Pq Event 10H , Umask 02H +Counts number of MMX Uops executed. +.It Li FP_COMP_OPS_EXE.SSE_FP +.Pq Event 10H , Umask 04H +Counts number of SSE and SSE2 FP uops executed. +.It Li FP_COMP_OPS_EXE.SSE2_INTEGER +.Pq Event 10H , Umask 08H +Counts number of SSE2 integer uops executed. +.It Li FP_COMP_OPS_EXE.SSE_FP_PACKED +.Pq Event 10H , Umask 10H +Counts number of SSE FP packed uops executed. +.It Li FP_COMP_OPS_EXE.SSE_FP_SCALAR +.Pq Event 10H , Umask 20H +Counts number of SSE FP scalar uops executed. +.It Li FP_COMP_OPS_EXE.SSE_SINGLE_PRECISION +.Pq Event 10H , Umask 40H +Counts number of SSE* FP single precision uops executed. +.It Li FP_COMP_OPS_EXE.SSE_DOUBLE_PRECISION +.Pq Event 10H , Umask 80H +Counts number of SSE* FP double precision uops executed. +.It Li SIMD_INT_128.PACKED_MPY +.Pq Event 12H , Umask 01H +Counts number of 128 bit SIMD integer multiply operations. +.It Li SIMD_INT_128.PACKED_SHIFT +.Pq Event 12H , Umask 02H +Counts number of 128 bit SIMD integer shift operations. +.It Li SIMD_INT_128.PACK +.Pq Event 12H , Umask 04H +Counts number of 128 bit SIMD integer pack operations. +.It Li SIMD_INT_128.UNPACK +.Pq Event 12H , Umask 08H +Counts number of 128 bit SIMD integer unpack operations. +.It Li SIMD_INT_128.PACKED_LOGICAL +.Pq Event 12H , Umask 10H +Counts number of 128 bit SIMD integer logical operations. +.It Li SIMD_INT_128.PACKED_ARITH +.Pq Event 12H , Umask 20H +Counts number of 128 bit SIMD integer arithmetic operations. +.It Li SIMD_INT_128.SHUFFLE_MOVE +.Pq Event 12H , Umask 40H +Counts number of 128 bit SIMD integer shuffle and move operations. +.It Li LOAD_DISPATCH.RS +.Pq Event 13H , Umask 01H +Counts number of loads dispatched from the Reservation Station that bypass +the Memory Order Buffer. +.It Li LOAD_DISPATCH.RS_DELAYED +.Pq Event 13H , Umask 02H +Counts the number of delayed RS dispatches at the stage latch. If an RS +dispatch can not bypass to LB, it has another chance to dispatch from the +one-cycle delayed staging latch before it is written into the LB. +.It Li LOAD_DISPATCH.MOB +.Pq Event 13H , Umask 04H +Counts the number of loads dispatched from the Reservation Station to the +Memory Order Buffer. +.It Li LOAD_DISPATCH.ANY +.Pq Event 13H , Umask 07H +Counts all loads dispatched from the Reservation Station. +.It Li ARITH.CYCLES_DIV_BUSY +.Pq Event 14H , Umask 01H +Counts the number of cycles the divider is busy executing divide or square +root operations. The divide can be integer, X87 or Streaming SIMD Extensions +(SSE). The square root operation can be either X87 or SSE. +Set 'edge =1, invert=1, cmask=1' to count the number of divides. +Count may be incorrect When SMT is on. +.It Li ARITH.MUL +.Pq Event 14H , Umask 02H +Counts the number of multiply operations executed. This includes integer as +well as floating point multiply operations but excludes DPPS mul and MPSAD. +Count may be incorrect When SMT is on +.It Li INST_QUEUE_WRITES +.Pq Event 17H , Umask 01H +Counts the number of instructions written into the instruction queue every +cycle. +.It Li INST_DECODED.DEC0 +.Pq Event 18H , Umask 01H +Counts number of instructions that require decoder 0 to be decoded. Usually, +this means that the instruction maps to more than 1 uop +.It Li TWO_UOP_INSTS_DECODED +.Pq Event 19H , Umask 01H +An instruction that generates two uops was decoded +.It Li INST_QUEUE_WRITE_CYCLES +.Pq Event 1EH , Umask 01H +This event counts the number of cycles during which instructions are written +to the instruction queue. Dividing this counter by the number of +instructions written to the instruction queue (INST_QUEUE_WRITES) yields the +average number of instructions decoded each cycle. If this number is less +than four and the pipe stalls, this indicates that the decoder is failing to +decode enough instructions per cycle to sustain the 4-wide pipeline. +If SSE* instructions that are 6 bytes or longer arrive one after another, +then front end throughput may limit execution speed. In such case, +.It Li LSD_OVERFLOW +.Pq Event 20H , Umask 01H +Counts number of loops that cant stream from the instruction queue. +.It Li L2_RQSTS.LD_HIT +.Pq Event 24H , Umask 01H +Counts number of loads that hit the L2 cache. L2 loads include both L1D +demand misses as well as L1D prefetches. L2 loads can be rejected for +various reasons. Only non rejected loads are counted. +.It Li L2_RQSTS.LD_MISS +.Pq Event 24H , Umask 02H +Counts the number of loads that miss the L2 cache. L2 loads include both L1D +demand misses as well as L1D prefetches. +.It Li L2_RQSTS.LOADS +.Pq Event 24H , Umask 03H +Counts all L2 load requests. L2 loads include both L1D demand misses as well +as L1D prefetches. +.It Li L2_RQSTS.RFO_HIT +.Pq Event 24H , Umask 04H +Counts the number of store RFO requests that hit the L2 cache. L2 RFO +requests include both L1D demand RFO misses as well as L1D RFO prefetches. +Count includes WC memory requests, where the data is not fetched but the +permission to write the line is required. +.It Li L2_RQSTS.RFO_MISS +.Pq Event 24H , Umask 08H +Counts the number of store RFO requests that miss the L2 cache. L2 RFO +requests include both L1D demand RFO misses as well as L1D RFO prefetches. +.It Li L2_RQSTS.RFOS +.Pq Event 24H , Umask 0CH +Counts all L2 store RFO requests. L2 RFO requests include both L1D demand +RFO misses as well as L1D RFO prefetches. +.It Li L2_RQSTS.IFETCH_HIT +.Pq Event 24H , Umask 10H +Counts number of instruction fetches that hit the L2 cache. L2 instruction +fetches include both L1I demand misses as well as L1I instruction +prefetches. +.It Li L2_RQSTS.IFETCH_MISS +.Pq Event 24H , Umask 20H +Counts number of instruction fetches that miss the L2 cache. L2 instruction +fetches include both L1I demand misses as well as L1I instruction +prefetches. +.It Li L2_RQSTS.IFETCHES +.Pq Event 24H , Umask 30H +Counts all instruction fetches. L2 instruction fetches include both L1I +demand misses as well as L1I instruction prefetches. +.It Li L2_RQSTS.PREFETCH_HIT +.Pq Event 24H , Umask 40H +Counts L2 prefetch hits for both code and data. +.It Li L2_RQSTS.PREFETCH_MISS +.Pq Event 24H , Umask 80H +Counts L2 prefetch misses for both code and data. +.It Li L2_RQSTS.PREFETCHES +.Pq Event 24H , Umask C0H +Counts all L2 prefetches for both code and data. +.It Li L2_RQSTS.MISS +.Pq Event 24H , Umask AAH +Counts all L2 misses for both code and data. +.It Li L2_RQSTS.REFERENCES +.Pq Event 24H , Umask FFH +Counts all L2 requests for both code and data. +.It Li L2_DATA_RQSTS.DEMAND.I_STATE +.Pq Event 26H , Umask 01H +Counts number of L2 data demand loads where the cache line to be loaded is +in the I (invalid) state, i.e. a cache miss. L2 demand loads are both L1D +demand misses and L1D prefetches. +.It Li L2_DATA_RQSTS.DEMAND.S_STATE +.Pq Event 26H , Umask 02H +Counts number of L2 data demand loads where the cache line to be loaded is +in the S (shared) state. L2 demand loads are both L1D demand misses and L1D +prefetches. +.It Li L2_DATA_RQSTS.DEMAND.E_STATE +.Pq Event 26H , Umask 04H +Counts number of L2 data demand loads where the cache line to be loaded is +in the E (exclusive) state. L2 demand loads are both L1D demand misses and +L1D prefetches. +.It Li L2_DATA_RQSTS.DEMAND.M_STATE +.Pq Event 26H , Umask 08H +Counts number of L2 data demand loads where the cache line to be loaded is +in the M (modified) state. L2 demand loads are both L1D demand misses and +L1D prefetches. +.It Li L2_DATA_RQSTS.DEMAND.MESI +.Pq Event 26H , Umask 0FH +Counts all L2 data demand requests. L2 demand loads are both L1D demand +misses and L1D prefetches. +.It Li L2_DATA_RQSTS.PREFETCH.I_STATE +.Pq Event 26H , Umask 10H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the I (invalid) state, i.e. a cache miss. +.It Li L2_DATA_RQSTS.PREFETCH.S_STATE +.Pq Event 26H , Umask 20H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the S (shared) state. A prefetch RFO will miss on an S state line, while +a prefetch read will hit on an S state line. +.It Li L2_DATA_RQSTS.PREFETCH.E_STATE +.Pq Event 26H , Umask 40H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the E (exclusive) state. +.It Li L2_DATA_RQSTS.PREFETCH.M_STATE +.Pq Event 26H , Umask 80H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the M (modified) state. +.It Li L2_DATA_RQSTS.PREFETCH.MESI +.Pq Event 26H , Umask F0H +Counts all L2 prefetch requests. +.It Li L2_DATA_RQSTS.ANY +.Pq Event 26H , Umask FFH +Counts all L2 data requests. +.It Li L2_WRITE.RFO.I_STATE +.Pq Event 27H , Umask 01H +Counts number of L2 demand store RFO requests where the cache line to be +loaded is in the I (invalid) state, i.e, a cache miss. The L1D prefetcher +does not issue a RFO prefetch. +This is a demand RFO request +.It Li L2_WRITE.RFO.S_STATE +.Pq Event 27H , Umask 02H +Counts number of L2 store RFO requests where the cache line to be loaded is +in the S (shared) state. The L1D prefetcher does not issue a RFO prefetch,. +This is a demand RFO request +.It Li L2_WRITE.RFO.M_STATE +.Pq Event 27H , Umask 08H +Counts number of L2 store RFO requests where the cache line to be loaded is +in the M (modified) state. The L1D prefetcher does not issue a RFO prefetch. +This is a demand RFO request +.It Li L2_WRITE.RFO.HIT +.Pq Event 27H , Umask 0EH +Counts number of L2 store RFO requests where the cache line to be loaded is +in either the S, E or M states. The L1D prefetcher does not issue a RFO +prefetch. +This is a demand RFO request +.It Li L2_WRITE.RFO.MESI +.Pq Event 27H , Umask 0FH +Counts all L2 store RFO requests.The L1D prefetcher does not issue a RFO +prefetch. +This is a demand RFO request +.It Li L2_WRITE.LOCK.I_STATE +.Pq Event 27H , Umask 10H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in the I (invalid) state, i.e. a cache miss. +.It Li L2_WRITE.LOCK.S_STATE +.Pq Event 27H , Umask 20H +Counts number of L2 lock RFO requests where the cache line to be loaded is +in the S (shared) state. +.It Li L2_WRITE.LOCK.E_STATE +.Pq Event 27H , Umask 40H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in the E (exclusive) state. +.It Li L2_WRITE.LOCK.M_STATE +.Pq Event 27H , Umask 80H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in the M (modified) state. +.It Li L2_WRITE.LOCK.HIT +.Pq Event 27H , Umask E0H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in either the S, E, or M state. +.It Li L2_WRITE.LOCK.MESI +.Pq Event 27H , Umask F0H +Counts all L2 demand lock RFO requests. +.It Li L1D_WB_L2.I_STATE +.Pq Event 28H , Umask 01H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the I (invalid) state, i.e. a cache miss. +.It Li L1D_WB_L2.S_STATE +.Pq Event 28H , Umask 02H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the S state. +.It Li L1D_WB_L2.E_STATE +.Pq Event 28H , Umask 04H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the E (exclusive) state. +.It Li L1D_WB_L2.M_STATE +.Pq Event 28H , Umask 08H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the M (modified) state. +.It Li L1D_WB_L2.MESI +.Pq Event 28H , Umask 0FH +Counts all L1 writebacks to the L2. +.It Li L3_LAT_CACHE.REFERENCE +.Pq Event 2EH , Umask 4FH +This event counts requests originating from the core that reference a cache +line in the last level cache. The event count includes speculative traffic +but excludes cache line fills due to a L2 hardware-prefetch. Because cache +hierarchy, cache sizes and other implementation-specific characteristics; +value comparison to estimate performance differences is not recommended. +see Table A-1 +.It Li L3_LAT_CACHE.MISS +.Pq Event 2EH , Umask 41H +This event counts each cache miss condition for references to the last level +cache. The event count may include speculative traffic but excludes cache +line fills due to L2 hardware-prefetches. Because cache hierarchy, cache +sizes and other implementation-specific characteristics; value comparison to +estimate performance differences is not recommended. +see Table A-1 +.It Li CPU_CLK_UNHALTED.THREAD_P +.Pq Event 3CH , Umask 00H +Counts the number of thread cycles while the thread is not in a halt state. +The thread enters the halt state when it is running the HLT instruction. The +core frequency may change from time to time due to power or thermal +throttling. +see Table A-1 +.It Li CPU_CLK_UNHALTED.REF_P +.Pq Event 3CH , Umask 01H +Increments at the frequency of TSC when not halted. +see Table A-1 +.It Li L1D_CACHE_LD.I_STATE +.Pq Event 40H , Umask 01H +Counts L1 data cache read requests where the cache line to be loaded is in +the I (invalid) state, i.e. the read request missed the cache. +Counter 0, 1 only +.It Li L1D_CACHE_LD.S_STATE +.Pq Event 40H , Umask 02H +Counts L1 data cache read requests where the cache line to be loaded is in +the S (shared) state. +Counter 0, 1 only +.It Li L1D_CACHE_LD.E_STATE +.Pq Event 40H , Umask 04H +Counts L1 data cache read requests where the cache line to be loaded is in +the E (exclusive) state. +Counter 0, 1 only +.It Li L1D_CACHE_LD.M_STATE +.Pq Event 40H , Umask 08H +Counts L1 data cache read requests where the cache line to be loaded is in +the M (modified) state. +Counter 0, 1 only +.It Li L1D_CACHE_LD.MESI +.Pq Event 40H , Umask 0FH +Counts L1 data cache read requests. +Counter 0, 1 only +.It Li L1D_CACHE_ST.S_STATE +.Pq Event 41H , Umask 02H +Counts L1 data cache store RFO requests where the cache line to be loaded is +in the S (shared) state. +Counter 0, 1 only +.It Li L1D_CACHE_ST.E_STATE +.Pq Event 41H , Umask 04H +Counts L1 data cache store RFO requests where the cache line to be loaded is +in the E (exclusive) state. +Counter 0, 1 only +.It Li L1D_CACHE_ST.M_STATE +.Pq Event 41H , Umask 08H +Counts L1 data cache store RFO requests where cache line to be loaded is in +the M (modified) state. +Counter 0, 1 only +.It Li L1D_CACHE_LOCK.HIT +.Pq Event 42H , Umask 01H +Counts retired load locks that hit in the L1 data cache or hit in an already +allocated fill buffer. The lock portion of the load lock transaction must +hit in the L1D. +The initial load will pull the lock into the L1 data cache. Counter 0, 1 +only +.It Li L1D_CACHE_LOCK.S_STATE +.Pq Event 42H , Umask 02H +Counts L1 data cache retired load locks that hit the target cache line in +the shared state. +Counter 0, 1 only +.It Li L1D_CACHE_LOCK.E_STATE +.Pq Event 42H , Umask 04H +Counts L1 data cache retired load locks that hit the target cache line in +the exclusive state. +Counter 0, 1 only +.It Li L1D_CACHE_LOCK.M_STATE +.Pq Event 42H , Umask 08H +Counts L1 data cache retired load locks that hit the target cache line in +the modified state. +Counter 0, 1 only +.It Li L1D_ALL_REF.ANY +.Pq Event 43H , Umask 01H +Counts all references (uncached, speculated and retired) to the L1 data +cache, including all loads and stores with any memory types. The event +counts memory accesses only when they are actually performed. For example, a +load blocked by unknown store address and later performed is only counted +once. +The event does not include non- memory accesses, such as I/O accesses. +Counter 0, 1 only +.It Li L1D_ALL_REF.CACHEABLE +.Pq Event 43H , Umask 02H +Counts all data reads and writes (speculated and retired) from cacheable +memory, including locked operations. +Counter 0, 1 only +.It Li L1D_PEND_MISS.LOAD_BUFFERS_FULL +.Pq Event 48H , Umask 02H +Counts cycles of L1 data cache load fill buffers full. +Counter 0, 1 only +.It Li DTLB_MISSES.ANY +.Pq Event 49H , Umask 01H +Counts the number of misses in the STLB which causes a page walk. +.It Li DTLB_MISSES.WALK_COMPLETED +.Pq Event 49H , Umask 02H +Counts number of misses in the STLB which resulted in a completed page walk. +.It Li DTLB_MISSES.STLB_HIT +.Pq Event 49H , Umask 10H +Counts the number of DTLB first level misses that hit in the second level +TLB. This event is only relevant if the core contains multiple DTLB levels. +.It Li LOAD_HIT_PRE +.Pq Event 4CH , Umask 01H +Counts load operations sent to the L1 data cache while a previous SSE +prefetch instruction to the same cache line has started prefetching but has +not yet finished. +.It Li L1D_PREFETCH.REQUESTS +.Pq Event 4EH , Umask 01H +Counts number of hardware prefetch requests dispatched out of the prefetch +FIFO. +.It Li L1D_PREFETCH.MISS +.Pq Event 4EH , Umask 02H +Counts number of hardware prefetch requests that miss the L1D. There are two *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri Apr 16 16:18:31 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDA401065673; Fri, 16 Apr 2010 16:18:31 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by mx1.freebsd.org (Postfix) with ESMTP id 5EFB78FC12; Fri, 16 Apr 2010 16:18:31 +0000 (UTC) Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id 00137EAF4B; Fri, 16 Apr 2010 12:18:30 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Fri, 16 Apr 2010 12:18:31 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpout; bh=mODjQ5Dum9U2xHXPhn1o8eYXt/0=; b=C1LmTy1/PImuYwOX+c6C+123Alsq64lxkNctSLEsZodraleC5QEZBCzE+6xwfSxq2QXiEr6BfRg5d6RkYcnjv4mK7IXr9O+G8boEB72kjK6ifNES/OXo4Knaz6OqEFsXlTiJGOabEyQw/jdtC+VvnNHd7XbzBtIhFsxZTLcHvbk= X-Sasl-enc: rbJZO0AzQVfQmPTy8BKQWfJctTUQMNIbDy+97y3Eu9lF 1271434710 Received: from anglepoise.lon.incunabulum.net (cpc2-dals7-0-0-cust253.hari.cable.virginmedia.com [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 366B53E0D8; Fri, 16 Apr 2010 12:18:30 -0400 (EDT) Message-ID: <4BC88DD3.6000505@incunabulum.net> Date: Fri, 16 Apr 2010 17:18:27 +0100 From: Bruce Simpson User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.9) Gecko/20100406 Thunderbird/3.0.4 MIME-Version: 1.0 To: Fabien Thomas References: <201004161543.o3GFhOtU066515@svn.freebsd.org> In-Reply-To: <201004161543.o3GFhOtU066515@svn.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r206701 - in stable/8/sys: amd64/include conf dev/hwpmc i386/include modules/hwpmc sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 16:18:32 -0000 Right On Commander! On 04/16/10 16:43, Fabien Thomas wrote: > Log: > MFC r206089, r206684: > > - Support for uncore counting events: one fixed PMC with the uncore > domain clock, 8 programmable PMC. > - Westmere based CPU (Xeon 5600, Corei7 980X) support. > - New man pages with events list for core and uncore. > - Updated Corei7 events with Intel 253669-033US December 2009 doc. > There is some removed events in the documentation, they have been > kept in the code but documented in the man page as obsolete. > - Offcore response events can be setup with rsp token. > From owner-svn-src-stable@FreeBSD.ORG Fri Apr 16 17:27:21 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BE92106564A; Fri, 16 Apr 2010 17:27:21 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 08C5C8FC0C; Fri, 16 Apr 2010 17:27:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3GHRKLS089876; Fri, 16 Apr 2010 17:27:20 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3GHRKVU089871; Fri, 16 Apr 2010 17:27:20 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201004161727.o3GHRKVU089871@svn.freebsd.org> From: Jack F Vogel Date: Fri, 16 Apr 2010 17:27:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206707 - stable/8/sys/dev/e1000 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 17:27:21 -0000 Author: jfv Date: Fri Apr 16 17:27:20 2010 New Revision: 206707 URL: http://svn.freebsd.org/changeset/base/206707 Log: MFC bug fixes to em and igb from HEAD. Modified: stable/8/sys/dev/e1000/if_em.c stable/8/sys/dev/e1000/if_em.h stable/8/sys/dev/e1000/if_igb.c stable/8/sys/dev/e1000/if_lem.c Modified: stable/8/sys/dev/e1000/if_em.c ============================================================================== --- stable/8/sys/dev/e1000/if_em.c Fri Apr 16 16:49:42 2010 (r206706) +++ stable/8/sys/dev/e1000/if_em.c Fri Apr 16 17:27:20 2010 (r206707) @@ -93,7 +93,7 @@ int em_display_debug_stats = 0; /********************************************************************* * Driver version: *********************************************************************/ -char em_driver_version[] = "7.0.0"; +char em_driver_version[] = "7.0.5"; /********************************************************************* @@ -192,7 +192,7 @@ static int em_suspend(device_t); static int em_resume(device_t); static void em_start(struct ifnet *); static void em_start_locked(struct ifnet *, struct tx_ring *); -#if __FreeBSD_version >= 800000 +#ifdef EM_MULTIQUEUE static int em_mq_start(struct ifnet *, struct mbuf *); static int em_mq_start_locked(struct ifnet *, struct tx_ring *, struct mbuf *); @@ -797,7 +797,7 @@ em_resume(device_t dev) * the packet is requeued. **********************************************************************/ -#if __FreeBSD_version >= 800000 +#ifdef EM_MULTIQUEUE static int em_mq_start_locked(struct ifnet *ifp, struct tx_ring *txr, struct mbuf *m) { @@ -812,10 +812,18 @@ em_mq_start_locked(struct ifnet *ifp, st return (err); } + /* Call cleanup if number of TX descriptors low */ + if (txr->tx_avail <= EM_TX_CLEANUP_THRESHOLD) + em_txeof(txr); + enq = 0; - if (m == NULL) + if (m == NULL) { next = drbr_dequeue(ifp, txr->br); - else + } else if (drbr_needs_enqueue(ifp, txr->br)) { + if ((err = drbr_enqueue(ifp, txr->br, m)) != 0) + return (err); + next = drbr_dequeue(ifp, txr->br); + } else next = m; /* Process the queue */ @@ -830,12 +838,17 @@ em_mq_start_locked(struct ifnet *ifp, st ETHER_BPF_MTAP(ifp, next); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) break; + if (txr->tx_avail < EM_MAX_SCATTER) { + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + break; + } next = drbr_dequeue(ifp, txr->br); } if (enq > 0) { /* Set the watchdog */ txr->watchdog_check = TRUE; + txr->watchdog_time = ticks; } return (err); } @@ -860,8 +873,7 @@ em_mq_start(struct ifnet *ifp, struct mb txr = &adapter->tx_rings[i]; if (EM_TX_TRYLOCK(txr)) { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - error = em_mq_start_locked(ifp, txr, m); + error = em_mq_start_locked(ifp, txr, m); EM_TX_UNLOCK(txr); } else error = drbr_enqueue(ifp, txr->br, m); @@ -888,7 +900,7 @@ em_qflush(struct ifnet *ifp) if_qflush(ifp); } -#endif /* FreeBSD_version */ +#endif /* EM_MULTIQUEUE */ static void em_start_locked(struct ifnet *ifp, struct tx_ring *txr) @@ -905,8 +917,15 @@ em_start_locked(struct ifnet *ifp, struc if (!adapter->link_active) return; - while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + /* Call cleanup if number of TX descriptors low */ + if (txr->tx_avail <= EM_TX_CLEANUP_THRESHOLD) + em_txeof(txr); + while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + if (txr->tx_avail < EM_MAX_SCATTER) { + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + break; + } IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); if (m_head == NULL) break; @@ -926,6 +945,7 @@ em_start_locked(struct ifnet *ifp, struc ETHER_BPF_MTAP(ifp, m_head); /* Set timeout in case hardware has problems transmitting. */ + txr->watchdog_time = ticks; txr->watchdog_check = TRUE; } @@ -1118,6 +1138,10 @@ em_ioctl(struct ifnet *ifp, u_long comma ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; reinit = 1; } + if (mask & IFCAP_VLAN_HWFILTER) { + ifp->if_capenable ^= IFCAP_VLAN_HWFILTER; + reinit = 1; + } if ((mask & IFCAP_WOL) && (ifp->if_capabilities & IFCAP_WOL) != 0) { if (mask & IFCAP_WOL_MCAST) @@ -1228,8 +1252,18 @@ em_init_locked(struct adapter *adapter) /* Setup VLAN support, basic and offload if available */ E1000_WRITE_REG(&adapter->hw, E1000_VET, ETHERTYPE_VLAN); - /* Use real VLAN Filter support */ - em_setup_vlan_hw_support(adapter); + /* Use real VLAN Filter support? */ + if (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) { + if (ifp->if_capenable & IFCAP_VLAN_HWFILTER) + /* Use real VLAN Filter support */ + em_setup_vlan_hw_support(adapter); + else { + u32 ctrl; + ctrl = E1000_READ_REG(&adapter->hw, E1000_CTRL); + ctrl |= E1000_CTRL_VME; + E1000_WRITE_REG(&adapter->hw, E1000_CTRL, ctrl); + } + } /* Set hardware offload abilities */ ifp->if_hwassist = 0; @@ -1337,11 +1371,13 @@ em_poll(struct ifnet *ifp, enum poll_cmd } EM_CORE_UNLOCK(adapter); + EM_RX_LOCK(rxr); rx_done = em_rxeof(rxr, count); + EM_RX_UNLOCK(rxr); EM_TX_LOCK(txr); em_txeof(txr); -#if __FreeBSD_version >= 800000 +#ifdef EM_MULTIQUEUE if (!drbr_empty(ifp, txr->br)) em_mq_start_locked(ifp, txr, NULL); #else @@ -1409,28 +1445,28 @@ em_handle_que(void *context, int pending struct ifnet *ifp = adapter->ifp; struct tx_ring *txr = adapter->tx_rings; struct rx_ring *rxr = adapter->rx_rings; - u32 loop = EM_MAX_LOOP; - bool more_rx, more_tx; + bool more_rx; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - EM_TX_LOCK(txr); - do { - more_rx = em_rxeof(rxr, adapter->rx_process_limit); - more_tx = em_txeof(txr); - } while (loop-- && (more_rx || more_tx)); + EM_RX_LOCK(rxr); + more_rx = em_rxeof(rxr, adapter->rx_process_limit); + EM_RX_UNLOCK(rxr); -#if __FreeBSD_version >= 800000 + EM_TX_LOCK(txr); + em_txeof(txr); +#ifdef EM_MULTIQUEUE if (!drbr_empty(ifp, txr->br)) em_mq_start_locked(ifp, txr, NULL); #else if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) em_start_locked(ifp, txr); #endif - if (more_rx || more_tx) - taskqueue_enqueue(adapter->tq, &adapter->que_task); - EM_TX_UNLOCK(txr); + if (more_rx) { + taskqueue_enqueue(adapter->tq, &adapter->que_task); + return; + } } em_enable_intr(adapter); @@ -1475,8 +1511,10 @@ em_msix_rx(void *arg) struct adapter *adapter = rxr->adapter; bool more; + EM_RX_LOCK(rxr); ++rxr->rx_irq; more = em_rxeof(rxr, adapter->rx_process_limit); + EM_RX_UNLOCK(rxr); if (more) taskqueue_enqueue(rxr->tq, &rxr->rx_task); else @@ -1513,14 +1551,16 @@ em_handle_rx(void *context, int pending) { struct rx_ring *rxr = context; struct adapter *adapter = rxr->adapter; - u32 loop = EM_MAX_LOOP; bool more; - do { - more = em_rxeof(rxr, adapter->rx_process_limit); - } while (loop-- && more); - /* Reenable this interrupt */ - E1000_WRITE_REG(&adapter->hw, E1000_IMS, rxr->ims); + EM_RX_LOCK(rxr); + more = em_rxeof(rxr, adapter->rx_process_limit); + EM_RX_UNLOCK(rxr); + if (more) + taskqueue_enqueue(rxr->tq, &rxr->rx_task); + else + /* Reenable this interrupt */ + E1000_WRITE_REG(&adapter->hw, E1000_IMS, rxr->ims); } static void @@ -1529,16 +1569,13 @@ em_handle_tx(void *context, int pending) struct tx_ring *txr = context; struct adapter *adapter = txr->adapter; struct ifnet *ifp = adapter->ifp; - u32 loop = EM_MAX_LOOP; - bool more; if (!EM_TX_TRYLOCK(txr)) return; - do { - more = em_txeof(txr); - } while (loop-- && more); -#if __FreeBSD_version >= 800000 + em_txeof(txr); + +#ifdef EM_MULTIQUEUE if (!drbr_empty(ifp, txr->br)) em_mq_start_locked(ifp, txr, NULL); #else @@ -1706,13 +1743,6 @@ em_xmit(struct tx_ring *txr, struct mbuf txd_upper = txd_lower = txd_used = txd_saved = 0; do_tso = ((m_head->m_pkthdr.csum_flags & CSUM_TSO) != 0); - /* - * Force a cleanup if number of TX descriptors - * available hits the threshold - */ - if (txr->tx_avail <= EM_TX_CLEANUP_THRESHOLD) - em_txeof(txr); - /* * TSO workaround: * If an mbuf is only header we need @@ -2642,7 +2672,7 @@ em_setup_interface(device_t dev, struct ifp->if_capabilities = ifp->if_capenable = 0; -#if __FreeBSD_version >= 800000 +#ifdef EM_MULTIQUEUE /* Multiqueue tx functions */ ifp->if_transmit = em_mq_start; ifp->if_qflush = em_qflush; @@ -2656,12 +2686,23 @@ em_setup_interface(device_t dev, struct ifp->if_capenable |= IFCAP_TSO4; /* - * Tell the upper layer(s) we support long frames. + * Tell the upper layer(s) we + * support full VLAN capability */ ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; ifp->if_capenable |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; + /* + ** Dont turn this on by default, if vlans are + ** created on another pseudo device (eg. lagg) + ** then vlan events are not passed thru, breaking + ** operation, but with HW FILTER off it works. If + ** using vlans directly on the em driver you can + ** enable this and get full hardware tag filtering. + */ + ifp->if_capabilities |= IFCAP_VLAN_HWFILTER; + #ifdef DEVICE_POLLING ifp->if_capabilities |= IFCAP_POLLING; #endif @@ -3681,6 +3722,8 @@ em_refresh_mbufs(struct rx_ring *rxr, in rxr->next_to_refresh = i; } update: + bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); if (cleaned != -1) /* Update tail index */ E1000_WRITE_REG(&adapter->hw, E1000_RDT(rxr->me), cleaned); @@ -3972,7 +4015,7 @@ em_initialize_receive_unit(struct adapte ** When using MSIX interrupts we need to throttle ** using the EITR register (82574 only) */ - if (adapter->msix) + if (hw->mac.type == e1000_82574) for (int i = 0; i < 4; i++) E1000_WRITE_REG(hw, E1000_EITR_82574(i), DEFAULT_ITR); @@ -4015,6 +4058,9 @@ em_initialize_receive_unit(struct adapte E1000_RCTL_LBM_NO | E1000_RCTL_RDMTS_HALF | (hw->mac.mc_filter_type << E1000_RCTL_MO_SHIFT); + /* Strip the CRC */ + rctl |= E1000_RCTL_SECRC; + /* Make sure VLAN Filters are off */ rctl &= ~E1000_RCTL_VFE; rctl &= ~E1000_RCTL_SBP; @@ -4046,15 +4092,15 @@ static int em_rxeof(struct rx_ring *rxr, int count) { struct adapter *adapter = rxr->adapter; - struct ifnet *ifp = adapter->ifp;; + struct ifnet *ifp = adapter->ifp; struct mbuf *mp, *sendmp; - u8 status; + u8 status = 0; u16 len; int i, processed, rxdone = 0; bool eop; struct e1000_rx_desc *cur; - EM_RX_LOCK(rxr); + EM_RX_LOCK_ASSERT(rxr); for (i = rxr->next_to_check, processed = 0; count != 0;) { @@ -4109,6 +4155,10 @@ em_rxeof(struct rx_ring *rxr, int count) E1000_RXD_SPC_VLAN_MASK); rxr->fmp->m_flags |= M_VLANTAG; } +#ifdef EM_MULTIQUEUE + rxr->fmp->m_pkthdr.flowid = curcpu; + rxr->fmp->m_flags |= M_FLOWID; +#endif #ifndef __NO_STRICT_ALIGNMENT skip: #endif @@ -4162,8 +4212,11 @@ skip: rxr->next_to_check = i; - EM_RX_UNLOCK(rxr); +#ifdef DEVICE_POLLING return (rxdone); +#else + return ((status & E1000_RXD_STAT_DD) ? TRUE : FALSE); +#endif } #ifndef __NO_STRICT_ALIGNMENT @@ -4346,7 +4399,7 @@ em_enable_intr(struct adapter *adapter) struct e1000_hw *hw = &adapter->hw; u32 ims_mask = IMS_ENABLE_MASK; - if (adapter->msix) { + if (hw->mac.type == e1000_82574) { E1000_WRITE_REG(hw, EM_EIAC, EM_MSIX_MASK); ims_mask |= EM_MSIX_MASK; } @@ -4358,7 +4411,7 @@ em_disable_intr(struct adapter *adapter) { struct e1000_hw *hw = &adapter->hw; - if (adapter->msix) + if (hw->mac.type == e1000_82574) E1000_WRITE_REG(hw, EM_EIAC, 0); E1000_WRITE_REG(&adapter->hw, E1000_IMC, 0xffffffff); } Modified: stable/8/sys/dev/e1000/if_em.h ============================================================================== --- stable/8/sys/dev/e1000/if_em.h Fri Apr 16 16:49:42 2010 (r206706) +++ stable/8/sys/dev/e1000/if_em.h Fri Apr 16 17:27:20 2010 (r206707) @@ -223,7 +223,7 @@ #define HW_DEBUGOUT1(S, A) if (DEBUG_HW) printf(S "\n", A) #define HW_DEBUGOUT2(S, A, B) if (DEBUG_HW) printf(S "\n", A, B) -#define EM_MAX_SCATTER 64 +#define EM_MAX_SCATTER 32 #define EM_VFTA_SIZE 128 #define EM_TSO_SIZE (65535 + sizeof(struct ether_vlan_header)) #define EM_TSO_SEG_SIZE 4096 /* Max dma segment size */ @@ -453,5 +453,6 @@ struct em_buffer { #define EM_RX_UNLOCK(_sc) mtx_unlock(&(_sc)->rx_mtx) #define EM_CORE_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->core_mtx, MA_OWNED) #define EM_TX_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->tx_mtx, MA_OWNED) +#define EM_RX_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->rx_mtx, MA_OWNED) #endif /* _EM_H_DEFINED_ */ Modified: stable/8/sys/dev/e1000/if_igb.c ============================================================================== --- stable/8/sys/dev/e1000/if_igb.c Fri Apr 16 16:49:42 2010 (r206706) +++ stable/8/sys/dev/e1000/if_igb.c Fri Apr 16 17:27:20 2010 (r206707) @@ -99,7 +99,7 @@ int igb_display_debug_stats = 0; /********************************************************************* * Driver version: *********************************************************************/ -char igb_driver_version[] = "version - 1.9.3"; +char igb_driver_version[] = "version - 1.9.5"; /********************************************************************* @@ -758,8 +758,15 @@ igb_start_locked(struct tx_ring *txr, st if (!adapter->link_active) return; - while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + /* Call cleanup if number of TX descriptors low */ + if (txr->tx_avail <= IGB_TX_CLEANUP_THRESHOLD) + igb_txeof(txr); + while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + if (txr->tx_avail <= IGB_TX_OP_THRESHOLD) { + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + break; + } IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); if (m_head == NULL) break; @@ -779,6 +786,7 @@ igb_start_locked(struct tx_ring *txr, st ETHER_BPF_MTAP(ifp, m_head); /* Set watchdog on */ + txr->watchdog_time = ticks; txr->watchdog_check = TRUE; } } @@ -817,8 +825,6 @@ igb_mq_start(struct ifnet *ifp, struct m /* Which queue to use */ if ((m->m_flags & M_FLOWID) != 0) i = m->m_pkthdr.flowid % adapter->num_queues; - else - i = curcpu % adapter->num_queues; txr = &adapter->tx_rings[i]; @@ -847,6 +853,10 @@ igb_mq_start_locked(struct ifnet *ifp, s return (err); } + /* Call cleanup if number of TX descriptors low */ + if (txr->tx_avail <= IGB_TX_CLEANUP_THRESHOLD) + igb_txeof(txr); + enq = 0; if (m == NULL) { next = drbr_dequeue(ifp, txr->br); @@ -856,6 +866,7 @@ igb_mq_start_locked(struct ifnet *ifp, s next = drbr_dequeue(ifp, txr->br); } else next = m; + /* Process the queue */ while (next != NULL) { if ((err = igb_xmit(txr, &next)) != 0) { @@ -877,6 +888,7 @@ igb_mq_start_locked(struct ifnet *ifp, s if (enq > 0) { /* Set the watchdog */ txr->watchdog_check = TRUE; + txr->watchdog_time = ticks; } return (err); } @@ -1055,6 +1067,10 @@ igb_ioctl(struct ifnet *ifp, u_long comm ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; reinit = 1; } + if (mask & IFCAP_VLAN_HWFILTER) { + ifp->if_capenable ^= IFCAP_VLAN_HWFILTER; + reinit = 1; + } if (mask & IFCAP_LRO) { ifp->if_capenable ^= IFCAP_LRO; reinit = 1; @@ -1110,6 +1126,19 @@ igb_init_locked(struct adapter *adapter) E1000_WRITE_REG(&adapter->hw, E1000_VET, ETHERTYPE_VLAN); + /* Use real VLAN Filter support? */ + if (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) { + if (ifp->if_capenable & IFCAP_VLAN_HWFILTER) + /* Use real VLAN Filter support */ + igb_setup_vlan_hw_support(adapter); + else { + u32 ctrl; + ctrl = E1000_READ_REG(&adapter->hw, E1000_CTRL); + ctrl |= E1000_CTRL_VME; + E1000_WRITE_REG(&adapter->hw, E1000_CTRL, ctrl); + } + } + /* Set hardware offload abilities */ ifp->if_hwassist = 0; if (ifp->if_capenable & IFCAP_TXCSUM) { @@ -1231,19 +1260,13 @@ igb_handle_que(void *context, int pendin struct adapter *adapter = que->adapter; struct tx_ring *txr = que->txr; struct ifnet *ifp = adapter->ifp; - u32 loop = IGB_MAX_LOOP; bool more; - /* RX first */ - do { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { more = igb_rxeof(que, -1); - } while (loop-- && more); - if (IGB_TX_TRYLOCK(txr)) { - loop = IGB_MAX_LOOP; - do { - more = igb_txeof(txr); - } while (loop-- && more); + IGB_TX_LOCK(txr); + igb_txeof(txr); #if __FreeBSD_version >= 800000 igb_mq_start_locked(ifp, txr, NULL); #else @@ -1251,6 +1274,10 @@ igb_handle_que(void *context, int pendin igb_start_locked(txr, ifp); #endif IGB_TX_UNLOCK(txr); + if (more) { + taskqueue_enqueue(que->tq, &que->que_task); + return; + } } /* Reenable this interrupt */ @@ -1436,7 +1463,7 @@ igb_msix_que(void *arg) if (adapter->hw.mac.type == e1000_82575) newitr |= newitr << 16; else - newitr |= 0x8000000; + newitr |= E1000_EITR_CNT_IGNR; /* save for next interrupt */ que->eitr_setting = newitr; @@ -2340,7 +2367,7 @@ igb_configure_queues(struct adapter *ada if (hw->mac.type == e1000_82575) newitr |= newitr << 16; else - newitr |= 0x8000000; + newitr |= E1000_EITR_CNT_IGNR; for (int i = 0; i < adapter->num_queues; i++) { que = &adapter->queues[i]; @@ -2669,13 +2696,24 @@ igb_setup_interface(device_t dev, struct #endif /* - * Tell the upper layer(s) we support long frames. + * Tell the upper layer(s) we + * support full VLAN capability. */ ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; ifp->if_capenable |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; /* + ** Dont turn this on by default, if vlans are + ** created on another pseudo device (eg. lagg) + ** then vlan events are not passed thru, breaking + ** operation, but with HW FILTER off it works. If + ** using vlans directly on the em driver you can + ** enable this and get full hardware tag filtering. + */ + ifp->if_capabilities |= IFCAP_VLAN_HWFILTER; + + /* * Specify the media types supported by this adapter and register * callbacks to update media and link information */ @@ -3779,6 +3817,9 @@ igb_setup_receive_ring(struct rx_ring *r /* Update descriptor */ rxr->rx_base[j].read.pkt_addr = htole64(pseg[0].ds_addr); } + + /* Setup our descriptor indices */ + rxr->next_to_check = 0; rxr->next_to_refresh = 0; rxr->lro_enabled = FALSE; @@ -4672,10 +4713,12 @@ igb_update_stats_counters(struct adapter { struct ifnet *ifp; - if(adapter->hw.phy.media_type == e1000_media_type_copper || + if (adapter->hw.phy.media_type == e1000_media_type_copper || (E1000_READ_REG(&adapter->hw, E1000_STATUS) & E1000_STATUS_LU)) { - adapter->stats.symerrs += E1000_READ_REG(&adapter->hw, E1000_SYMERRS); - adapter->stats.sec += E1000_READ_REG(&adapter->hw, E1000_SEC); + adapter->stats.symerrs += + E1000_READ_REG(&adapter->hw, E1000_SYMERRS); + adapter->stats.sec += + E1000_READ_REG(&adapter->hw, E1000_SEC); } adapter->stats.crcerrs += E1000_READ_REG(&adapter->hw, E1000_CRCERRS); adapter->stats.mpc += E1000_READ_REG(&adapter->hw, E1000_MPC); Modified: stable/8/sys/dev/e1000/if_lem.c ============================================================================== --- stable/8/sys/dev/e1000/if_lem.c Fri Apr 16 16:49:42 2010 (r206706) +++ stable/8/sys/dev/e1000/if_lem.c Fri Apr 16 17:27:20 2010 (r206707) @@ -39,9 +39,6 @@ #include #include -#if __FreeBSD_version >= 800000 -#include -#endif #include #include #include @@ -94,7 +91,7 @@ int lem_display_debug_stats = 0; /********************************************************************* * Legacy Em Driver version: *********************************************************************/ -char lem_driver_version[] = "1.0.0"; +char lem_driver_version[] = "1.0.1"; /********************************************************************* @@ -177,11 +174,6 @@ static int lem_suspend(device_t); static int lem_resume(device_t); static void lem_start(struct ifnet *); static void lem_start_locked(struct ifnet *ifp); -#if __FreeBSD_version >= 800000 -static int lem_mq_start(struct ifnet *, struct mbuf *); -static int lem_mq_start_locked(struct ifnet *, struct mbuf *); -static void lem_qflush(struct ifnet *); -#endif static int lem_ioctl(struct ifnet *, u_long, caddr_t); static void lem_init(void *); static void lem_init_locked(struct adapter *); @@ -304,12 +296,6 @@ MODULE_DEPEND(lem, ether, 1, 1, 1); #define EM_TICKS_TO_USECS(ticks) ((1024 * (ticks) + 500) / 1000) #define EM_USECS_TO_TICKS(usecs) ((1000 * (usecs) + 512) / 1024) -#define M_TSO_LEN 66 - -/* Allow common code without TSO */ -#ifndef CSUM_TSO -#define CSUM_TSO 0 -#endif static int lem_tx_int_delay_dflt = EM_TICKS_TO_USECS(EM_TIDV); static int lem_rx_int_delay_dflt = EM_TICKS_TO_USECS(EM_RDTR); @@ -827,118 +813,6 @@ lem_resume(device_t dev) } -/********************************************************************* - * Transmit entry point - * - * em_start is called by the stack to initiate a transmit. - * The driver will remain in this routine as long as there are - * packets to transmit and transmit resources are available. - * In case resources are not available stack is notified and - * the packet is requeued. - **********************************************************************/ - -#if __FreeBSD_version >= 800000 -static int -lem_mq_start_locked(struct ifnet *ifp, struct mbuf *m) -{ - struct adapter *adapter = ifp->if_softc; - struct mbuf *next; - int error = E1000_SUCCESS; - - EM_TX_LOCK_ASSERT(adapter); - /* To allow being called from a tasklet */ - if (m == NULL) - goto process; - - if (((ifp->if_drv_flags & (IFF_DRV_RUNNING|IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING) - || (!adapter->link_active)) { - error = drbr_enqueue(ifp, adapter->br, m); - return (error); - } else if (drbr_empty(ifp, adapter->br) && - (adapter->num_tx_desc_avail > EM_TX_OP_THRESHOLD)) { - if ((error = lem_xmit(adapter, &m)) != 0) { - if (m) - error = drbr_enqueue(ifp, adapter->br, m); - return (error); - } else { - /* - * We've bypassed the buf ring so we need to update - * ifp directly - */ - drbr_stats_update(ifp, m->m_pkthdr.len, m->m_flags); - /* - ** Send a copy of the frame to the BPF - ** listener and set the watchdog on. - */ - ETHER_BPF_MTAP(ifp, m); - adapter->watchdog_check = TRUE; - } - } else if ((error = drbr_enqueue(ifp, adapter->br, m)) != 0) - return (error); - -process: - if (drbr_empty(ifp, adapter->br)) - return(error); - /* Process the queue */ - while (TRUE) { - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) - break; - next = drbr_dequeue(ifp, adapter->br); - if (next == NULL) - break; - if ((error = lem_xmit(adapter, &next)) != 0) { - if (next != NULL) - error = drbr_enqueue(ifp, adapter->br, next); - break; - } - drbr_stats_update(ifp, next->m_pkthdr.len, next->m_flags); - ETHER_BPF_MTAP(ifp, next); - /* Set the watchdog */ - adapter->watchdog_check = TRUE; - } - - if (adapter->num_tx_desc_avail <= EM_TX_OP_THRESHOLD) - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - - return (error); -} - -/* -** Multiqueue capable stack interface, this is not -** yet truely multiqueue, but that is coming... -*/ -static int -lem_mq_start(struct ifnet *ifp, struct mbuf *m) -{ - - struct adapter *adapter = ifp->if_softc; - int error = 0; - - if (EM_TX_TRYLOCK(adapter)) { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - error = lem_mq_start_locked(ifp, m); - EM_TX_UNLOCK(adapter); - } else - error = drbr_enqueue(ifp, adapter->br, m); - - return (error); -} - -static void -lem_qflush(struct ifnet *ifp) -{ - struct mbuf *m; - struct adapter *adapter = (struct adapter *)ifp->if_softc; - - EM_TX_LOCK(adapter); - while ((m = buf_ring_dequeue_sc(adapter->br)) != NULL) - m_freem(m); - if_qflush(ifp); - EM_TX_UNLOCK(adapter); -} -#endif /* FreeBSD_version */ - static void lem_start_locked(struct ifnet *ifp) { @@ -975,6 +849,7 @@ lem_start_locked(struct ifnet *ifp) /* Set timeout in case hardware has problems transmitting. */ adapter->watchdog_check = TRUE; + adapter->watchdog_time = ticks; } if (adapter->num_tx_desc_avail <= EM_TX_OP_THRESHOLD) ifp->if_drv_flags |= IFF_DRV_OACTIVE; @@ -1151,12 +1026,6 @@ lem_ioctl(struct ifnet *ifp, u_long comm ifp->if_capenable ^= IFCAP_HWCSUM; reinit = 1; } -#if __FreeBSD_version >= 700000 - if (mask & IFCAP_TSO4) { - ifp->if_capenable ^= IFCAP_TSO4; - reinit = 1; - } -#endif if (mask & IFCAP_VLAN_HWTAGGING) { ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; reinit = 1; @@ -1279,10 +1148,6 @@ lem_init_locked(struct adapter *adapter) if (adapter->hw.mac.type >= e1000_82543) { if (ifp->if_capenable & IFCAP_TXCSUM) ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP); -#if __FreeBSD_version >= 700000 - if (ifp->if_capenable & IFCAP_TSO4) - ifp->if_hwassist |= CSUM_TSO; -#endif } /* Configure for OS presence */ @@ -1394,13 +1259,8 @@ lem_poll(struct ifnet *ifp, enum poll_cm EM_TX_LOCK(adapter); lem_txeof(adapter); -#if __FreeBSD_version >= 800000 - if (!drbr_empty(ifp, adapter->br)) - lem_mq_start_locked(ifp, NULL); -#else if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) lem_start_locked(ifp); -#endif EM_TX_UNLOCK(adapter); return (rx_done); } @@ -1494,14 +1354,8 @@ lem_handle_rxtx(void *context, int pendi taskqueue_enqueue(adapter->tq, &adapter->rxtx_task); EM_TX_LOCK(adapter); lem_txeof(adapter); - -#if __FreeBSD_version >= 800000 - if (!drbr_empty(ifp, adapter->br)) - lem_mq_start_locked(ifp, NULL); -#else if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) lem_start_locked(ifp); -#endif EM_TX_UNLOCK(adapter); } @@ -1852,15 +1706,17 @@ lem_xmit(struct adapter *adapter, struct if (mtag != NULL) { ctxd->upper.fields.special = htole16(VLAN_TAG_VALUE(mtag)); + ctxd->lower.data |= htole32(E1000_TXD_CMD_VLE); + } #else /* FreeBSD 7 */ if (m_head->m_flags & M_VLANTAG) { /* Set the vlan id. */ ctxd->upper.fields.special = htole16(m_head->m_pkthdr.ether_vtag); -#endif /* Tell hardware to add tag */ ctxd->lower.data |= htole32(E1000_TXD_CMD_VLE); } +#endif tx_buffer->m_head = m_head; tx_buffer_mapped->map = tx_buffer->map; @@ -2544,12 +2400,6 @@ lem_setup_interface(device_t dev, struct ifp->if_capabilities = ifp->if_capenable = 0; -#if __FreeBSD_version >= 800000 - /* Multiqueue tx functions */ - ifp->if_transmit = lem_mq_start; - ifp->if_qflush = lem_qflush; - adapter->br = buf_ring_alloc(4096, M_DEVBUF, M_WAITOK, &adapter->tx_mtx); -#endif if (adapter->hw.mac.type >= e1000_82543) { int version_cap; #if __FreeBSD_version < 700000 @@ -4549,10 +4399,6 @@ lem_print_hw_stats(struct adapter *adapt (long long)adapter->stats.gprc); device_printf(dev, "Good Packets Xmtd = %lld\n", (long long)adapter->stats.gptc); - device_printf(dev, "TSO Contexts Xmtd = %lld\n", - (long long)adapter->stats.tsctc); - device_printf(dev, "TSO Contexts Failed = %lld\n", - (long long)adapter->stats.tsctfc); } /********************************************************************** From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 03:38:26 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6DBC1065673; Sat, 17 Apr 2010 03:38:26 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3CFE8FC0C; Sat, 17 Apr 2010 03:38:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H3cQTW035474; Sat, 17 Apr 2010 03:38:26 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H3cQ7w035472; Sat, 17 Apr 2010 03:38:26 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170338.o3H3cQ7w035472@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 03:38:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206723 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 03:38:26 -0000 Author: rrs Date: Sat Apr 17 03:38:26 2010 New Revision: 206723 URL: http://svn.freebsd.org/changeset/base/206723 Log: Merge of SVN 196507. This optimizes the sack handling a bit and restructures it so its much more readable ;-) Modified: stable/8/sys/netinet/sctp_indata.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Sat Apr 17 03:14:00 2010 (r206722) +++ stable/8/sys/netinet/sctp_indata.c Sat Apr 17 03:38:26 2010 (r206723) @@ -2525,6 +2525,7 @@ sctp_sack_check(struct sctp_tcb *stcb, i */ struct sctp_association *asoc; int at; + uint8_t comb_byte; int last_all_ones = 0; int slide_from, slide_end, lgap, distance; @@ -2555,7 +2556,6 @@ sctp_sack_check(struct sctp_tcb *stcb, i memcpy(aux_array, asoc->mapping_array, 64); /* EY do the same for nr_mapping_array */ if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { - if (asoc->nr_mapping_array_size != asoc->mapping_array_size) { /* * printf("\nEY-IN sack_check method: \nEY-" "The @@ -2582,13 +2582,18 @@ sctp_sack_check(struct sctp_tcb *stcb, i */ at = 0; for (slide_from = 0; slide_from < stcb->asoc.mapping_array_size; slide_from++) { - - if (asoc->mapping_array[slide_from] == 0xff) { + /* + * We must combine the renegable and non-renegable arrays + * here to form a unified view of what is acked right now + * (since they are kept separate + */ + comb_byte = asoc->mapping_array[slide_from] | asoc->nr_mapping_array[slide_from]; + if (comb_byte == 0xff) { at += 8; last_all_ones = 1; } else { /* there is a 0 bit */ - at += sctp_map_lookup_tab[asoc->mapping_array[slide_from]]; + at += sctp_map_lookup_tab[comb_byte]; last_all_ones = 0; break; } @@ -3182,6 +3187,235 @@ sctp_process_data(struct mbuf **mm, int return (0); } +static int +sctp_process_segment_range(struct sctp_tcb *stcb, struct sctp_tmit_chunk **p_tp1, uint32_t last_tsn, + uint16_t frag_strt, uint16_t frag_end, int nr_sacking, + int *num_frs, + uint32_t * biggest_newly_acked_tsn, + uint32_t * this_sack_lowest_newack, + int *ecn_seg_sums) +{ + struct sctp_tmit_chunk *tp1; + unsigned int theTSN; + int j, wake_him = 0; + + /* Recover the tp1 we last saw */ + tp1 = *p_tp1; + if (tp1 == NULL) { + tp1 = TAILQ_FIRST(&stcb->asoc.sent_queue); + } + for (j = frag_strt; j <= frag_end; j++) { + theTSN = j + last_tsn; + while (tp1) { + if (tp1->rec.data.doing_fast_retransmit) + (*num_frs) += 1; + + /*- + * CMT: CUCv2 algorithm. For each TSN being + * processed from the sent queue, track the + * next expected pseudo-cumack, or + * rtx_pseudo_cumack, if required. Separate + * cumack trackers for first transmissions, + * and retransmissions. + */ + if ((tp1->whoTo->find_pseudo_cumack == 1) && (tp1->sent < SCTP_DATAGRAM_RESEND) && + (tp1->snd_count == 1)) { + tp1->whoTo->pseudo_cumack = tp1->rec.data.TSN_seq; + tp1->whoTo->find_pseudo_cumack = 0; + } + if ((tp1->whoTo->find_rtx_pseudo_cumack == 1) && (tp1->sent < SCTP_DATAGRAM_RESEND) && + (tp1->snd_count > 1)) { + tp1->whoTo->rtx_pseudo_cumack = tp1->rec.data.TSN_seq; + tp1->whoTo->find_rtx_pseudo_cumack = 0; + } + if (tp1->rec.data.TSN_seq == theTSN) { + if (tp1->sent != SCTP_DATAGRAM_UNSENT) { + /*- + * must be held until + * cum-ack passes + */ + /*- + * ECN Nonce: Add the nonce + * value to the sender's + * nonce sum + */ + if (tp1->sent < SCTP_DATAGRAM_RESEND) { + /*- + * If it is less than RESEND, it is + * now no-longer in flight. + * Higher values may already be set + * via previous Gap Ack Blocks... + * i.e. ACKED or RESEND. + */ + if (compare_with_wrap(tp1->rec.data.TSN_seq, + *biggest_newly_acked_tsn, MAX_TSN)) { + *biggest_newly_acked_tsn = tp1->rec.data.TSN_seq; + } + /*- + * CMT: SFR algo (and HTNA) - set + * saw_newack to 1 for dest being + * newly acked. update + * this_sack_highest_newack if + * appropriate. + */ + if (tp1->rec.data.chunk_was_revoked == 0) + tp1->whoTo->saw_newack = 1; + + if (compare_with_wrap(tp1->rec.data.TSN_seq, + tp1->whoTo->this_sack_highest_newack, + MAX_TSN)) { + tp1->whoTo->this_sack_highest_newack = + tp1->rec.data.TSN_seq; + } + /*- + * CMT DAC algo: also update + * this_sack_lowest_newack + */ + if (*this_sack_lowest_newack == 0) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SACK_LOGGING_ENABLE) { + sctp_log_sack(*this_sack_lowest_newack, + last_tsn, + tp1->rec.data.TSN_seq, + 0, + 0, + SCTP_LOG_TSN_ACKED); + } + *this_sack_lowest_newack = tp1->rec.data.TSN_seq; + } + /*- + * CMT: CUCv2 algorithm. If (rtx-)pseudo-cumack for corresp + * dest is being acked, then we have a new (rtx-)pseudo-cumack. Set + * new_(rtx_)pseudo_cumack to TRUE so that the cwnd for this dest can be + * updated. Also trigger search for the next expected (rtx-)pseudo-cumack. + * Separate pseudo_cumack trackers for first transmissions and + * retransmissions. + */ + if (tp1->rec.data.TSN_seq == tp1->whoTo->pseudo_cumack) { + if (tp1->rec.data.chunk_was_revoked == 0) { + tp1->whoTo->new_pseudo_cumack = 1; + } + tp1->whoTo->find_pseudo_cumack = 1; + } + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { + sctp_log_cwnd(stcb, tp1->whoTo, tp1->rec.data.TSN_seq, SCTP_CWND_LOG_FROM_SACK); + } + if (tp1->rec.data.TSN_seq == tp1->whoTo->rtx_pseudo_cumack) { + if (tp1->rec.data.chunk_was_revoked == 0) { + tp1->whoTo->new_pseudo_cumack = 1; + } + tp1->whoTo->find_rtx_pseudo_cumack = 1; + } + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SACK_LOGGING_ENABLE) { + sctp_log_sack(*biggest_newly_acked_tsn, + last_tsn, + tp1->rec.data.TSN_seq, + frag_strt, + frag_end, + SCTP_LOG_TSN_ACKED); + } + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FLIGHT_LOGGING_ENABLE) { + sctp_misc_ints(SCTP_FLIGHT_LOG_DOWN_GAP, + tp1->whoTo->flight_size, + tp1->book_size, + (uintptr_t) tp1->whoTo, + tp1->rec.data.TSN_seq); + } + sctp_flight_size_decrease(tp1); + sctp_total_flight_decrease(stcb, tp1); + + tp1->whoTo->net_ack += tp1->send_size; + if (tp1->snd_count < 2) { + /*- + * True non-retransmited chunk + */ + tp1->whoTo->net_ack2 += tp1->send_size; + + /*- + * update RTO too ? + */ + if (tp1->do_rtt) { + tp1->whoTo->RTO = + sctp_calculate_rto(stcb, + &stcb->asoc, + tp1->whoTo, + &tp1->sent_rcv_time, + sctp_align_safe_nocopy); + tp1->do_rtt = 0; + } + } + } + if (tp1->sent <= SCTP_DATAGRAM_RESEND) { + (*ecn_seg_sums) += tp1->rec.data.ect_nonce; + (*ecn_seg_sums) &= SCTP_SACK_NONCE_SUM; + if (compare_with_wrap(tp1->rec.data.TSN_seq, + stcb->asoc.this_sack_highest_gap, + MAX_TSN)) { + stcb->asoc.this_sack_highest_gap = + tp1->rec.data.TSN_seq; + } + if (tp1->sent == SCTP_DATAGRAM_RESEND) { + sctp_ucount_decr(stcb->asoc.sent_queue_retran_cnt); +#ifdef SCTP_AUDITING_ENABLED + sctp_audit_log(0xB2, + (stcb->asoc.sent_queue_retran_cnt & 0x000000ff)); +#endif + } + } + /*- + * All chunks NOT UNSENT fall through here and are marked + * (leave PR-SCTP ones that are to skip alone though) + */ + if (tp1->sent != SCTP_FORWARD_TSN_SKIP) + tp1->sent = SCTP_DATAGRAM_MARKED; + + if (tp1->rec.data.chunk_was_revoked) { + /* deflate the cwnd */ + tp1->whoTo->cwnd -= tp1->book_size; + tp1->rec.data.chunk_was_revoked = 0; + } + /* NR Sack code here */ + if (nr_sacking) { + if (tp1->sent != SCTP_FORWARD_TSN_SKIP) + tp1->sent = SCTP_DATAGRAM_NR_MARKED; + /* + * TAILQ_REMOVE(&asoc->sent_q + * ueue, tp1, sctp_next); + */ + if (tp1->data) { + /* + * sa_ignore + * NO_NULL_CHK + */ + sctp_free_bufspace(stcb, &stcb->asoc, tp1, 1); + sctp_m_freem(tp1->data); + } + tp1->data = NULL; + /* asoc->sent_queue_cnt--; */ + /* + * sctp_free_a_chunk(stcb, + * tp1); + */ + wake_him++; + } + } + break; + } /* if (tp1->TSN_seq == theTSN) */ + if (compare_with_wrap(tp1->rec.data.TSN_seq, theTSN, + MAX_TSN)) + break; + + tp1 = TAILQ_NEXT(tp1, sctp_next); + } /* end while (tp1) */ + /* In case the fragments were not in order we must reset */ + if (tp1 == NULL) { + tp1 = TAILQ_FIRST(&stcb->asoc.sent_queue); + } + } /* end for (j = fragStart */ + *p_tp1 = tp1; + return (wake_him); /* Return value only used for nr-sack */ +} + + static void sctp_handle_segments(struct mbuf *m, int *offset, struct sctp_tcb *stcb, struct sctp_association *asoc, struct sctp_sack_chunk *ch, uint32_t last_tsn, uint32_t * biggest_tsn_acked, @@ -3194,8 +3428,7 @@ sctp_handle_segments(struct mbuf *m, int struct sctp_sack *sack; struct sctp_gap_ack_block *frag, block; struct sctp_tmit_chunk *tp1; - int i, j; - unsigned int theTSN; + int i; int num_frs = 0; uint16_t frag_strt, frag_end, primary_flag_set; @@ -3263,214 +3496,9 @@ sctp_handle_segments(struct mbuf *m, int } last_frag_high = frag_end + last_tsn; } - for (j = frag_strt; j <= frag_end; j++) { - theTSN = j + last_tsn; - while (tp1) { - if (tp1->rec.data.doing_fast_retransmit) - num_frs++; - - /* - * CMT: CUCv2 algorithm. For each TSN being - * processed from the sent queue, track the - * next expected pseudo-cumack, or - * rtx_pseudo_cumack, if required. Separate - * cumack trackers for first transmissions, - * and retransmissions. - */ - if ((tp1->whoTo->find_pseudo_cumack == 1) && (tp1->sent < SCTP_DATAGRAM_RESEND) && - (tp1->snd_count == 1)) { - tp1->whoTo->pseudo_cumack = tp1->rec.data.TSN_seq; - tp1->whoTo->find_pseudo_cumack = 0; - } - if ((tp1->whoTo->find_rtx_pseudo_cumack == 1) && (tp1->sent < SCTP_DATAGRAM_RESEND) && - (tp1->snd_count > 1)) { - tp1->whoTo->rtx_pseudo_cumack = tp1->rec.data.TSN_seq; - tp1->whoTo->find_rtx_pseudo_cumack = 0; - } - if (tp1->rec.data.TSN_seq == theTSN) { - if (tp1->sent != SCTP_DATAGRAM_UNSENT) { - /* - * must be held until - * cum-ack passes - */ - /* - * ECN Nonce: Add the nonce - * value to the sender's - * nonce sum - */ - if (tp1->sent < SCTP_DATAGRAM_RESEND) { - /*- - * If it is less than RESEND, it is - * now no-longer in flight. - * Higher values may already be set - * via previous Gap Ack Blocks... - * i.e. ACKED or RESEND. - */ - if (compare_with_wrap(tp1->rec.data.TSN_seq, - *biggest_newly_acked_tsn, MAX_TSN)) { - *biggest_newly_acked_tsn = tp1->rec.data.TSN_seq; - } - /* - * CMT: SFR algo - * (and HTNA) - set - * saw_newack to 1 - * for dest being - * newly acked. - * update - * this_sack_highest_ - * newack if - * appropriate. - */ - if (tp1->rec.data.chunk_was_revoked == 0) - tp1->whoTo->saw_newack = 1; - - if (compare_with_wrap(tp1->rec.data.TSN_seq, - tp1->whoTo->this_sack_highest_newack, - MAX_TSN)) { - tp1->whoTo->this_sack_highest_newack = - tp1->rec.data.TSN_seq; - } - /* - * CMT DAC algo: - * also update - * this_sack_lowest_n - * ewack - */ - if (*this_sack_lowest_newack == 0) { - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SACK_LOGGING_ENABLE) { - sctp_log_sack(*this_sack_lowest_newack, - last_tsn, - tp1->rec.data.TSN_seq, - 0, - 0, - SCTP_LOG_TSN_ACKED); - } - *this_sack_lowest_newack = tp1->rec.data.TSN_seq; - } - /* - * CMT: CUCv2 - * algorithm. If - * (rtx-)pseudo-cumac - * k for corresp - * dest is being - * acked, then we - * have a new - * (rtx-)pseudo-cumac - * k. Set - * new_(rtx_)pseudo_c - * umack to TRUE so - * that the cwnd for - * this dest can be - * updated. Also - * trigger search - * for the next - * expected - * (rtx-)pseudo-cumac - * k. Separate - * pseudo_cumack - * trackers for - * first - * transmissions and - * retransmissions. - */ - if (tp1->rec.data.TSN_seq == tp1->whoTo->pseudo_cumack) { - if (tp1->rec.data.chunk_was_revoked == 0) { - tp1->whoTo->new_pseudo_cumack = 1; - } - tp1->whoTo->find_pseudo_cumack = 1; - } - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { - sctp_log_cwnd(stcb, tp1->whoTo, tp1->rec.data.TSN_seq, SCTP_CWND_LOG_FROM_SACK); - } - if (tp1->rec.data.TSN_seq == tp1->whoTo->rtx_pseudo_cumack) { - if (tp1->rec.data.chunk_was_revoked == 0) { - tp1->whoTo->new_pseudo_cumack = 1; - } - tp1->whoTo->find_rtx_pseudo_cumack = 1; - } - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SACK_LOGGING_ENABLE) { - sctp_log_sack(*biggest_newly_acked_tsn, - last_tsn, - tp1->rec.data.TSN_seq, - frag_strt, - frag_end, - SCTP_LOG_TSN_ACKED); - } - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FLIGHT_LOGGING_ENABLE) { - sctp_misc_ints(SCTP_FLIGHT_LOG_DOWN_GAP, - tp1->whoTo->flight_size, - tp1->book_size, - (uintptr_t) tp1->whoTo, - tp1->rec.data.TSN_seq); - } - sctp_flight_size_decrease(tp1); - sctp_total_flight_decrease(stcb, tp1); - - tp1->whoTo->net_ack += tp1->send_size; - if (tp1->snd_count < 2) { - /* - * True - * non-retran - * smited - * chunk */ - tp1->whoTo->net_ack2 += tp1->send_size; - - /* - * update RTO - * too ? */ - if (tp1->do_rtt) { - tp1->whoTo->RTO = - sctp_calculate_rto(stcb, - asoc, - tp1->whoTo, - &tp1->sent_rcv_time, - sctp_align_safe_nocopy); - tp1->do_rtt = 0; - } - } - } - if (tp1->sent <= SCTP_DATAGRAM_RESEND) { - (*ecn_seg_sums) += tp1->rec.data.ect_nonce; - (*ecn_seg_sums) &= SCTP_SACK_NONCE_SUM; - if (compare_with_wrap(tp1->rec.data.TSN_seq, - asoc->this_sack_highest_gap, - MAX_TSN)) { - asoc->this_sack_highest_gap = - tp1->rec.data.TSN_seq; - } - if (tp1->sent == SCTP_DATAGRAM_RESEND) { - sctp_ucount_decr(asoc->sent_queue_retran_cnt); -#ifdef SCTP_AUDITING_ENABLED - sctp_audit_log(0xB2, - (asoc->sent_queue_retran_cnt & 0x000000ff)); -#endif - } - } - /* - * All chunks NOT UNSENT - * fall through here and are - * marked (leave PR-SCTP - * ones that are to skip - * alone though) - */ - if (tp1->sent != SCTP_FORWARD_TSN_SKIP) - tp1->sent = SCTP_DATAGRAM_MARKED; - - if (tp1->rec.data.chunk_was_revoked) { - /* deflate the cwnd */ - tp1->whoTo->cwnd -= tp1->book_size; - tp1->rec.data.chunk_was_revoked = 0; - } - } - break; - } /* if (tp1->TSN_seq == theTSN) */ - if (compare_with_wrap(tp1->rec.data.TSN_seq, theTSN, - MAX_TSN)) - break; - - tp1 = TAILQ_NEXT(tp1, sctp_next); - } /* end while (tp1) */ - } /* end for (j = fragStart */ + sctp_process_segment_range(stcb, &tp1, last_tsn, frag_strt, frag_end, + 0, &num_frs, biggest_newly_acked_tsn, + this_sack_lowest_newack, ecn_seg_sums); frag = (struct sctp_gap_ack_block *)sctp_m_getptr(m, *offset, sizeof(struct sctp_gap_ack_block), (uint8_t *) & block); *offset += sizeof(block); @@ -6855,9 +6883,8 @@ sctp_handle_nr_sack_segments(struct mbuf struct sctp_gap_ack_block *frag, block; struct sctp_nr_gap_ack_block *nr_frag, nr_block; struct sctp_tmit_chunk *tp1; - uint32_t i, j; + uint32_t i; int wake_him = 0; - uint32_t theTSN; int num_frs = 0; uint16_t frag_strt, frag_end, primary_flag_set; @@ -6932,213 +6959,9 @@ sctp_handle_nr_sack_segments(struct mbuf } last_frag_high = frag_end + last_tsn; } - for (j = frag_strt; j <= frag_end; j++) { - theTSN = j + last_tsn; - while (tp1) { - if (tp1->rec.data.doing_fast_retransmit) - num_frs++; - - /* - * CMT: CUCv2 algorithm. For each TSN being - * processed from the sent queue, track the - * next expected pseudo-cumack, or - * rtx_pseudo_cumack, if required. Separate - * cumack trackers for first transmissions, - * and retransmissions. - */ - if ((tp1->whoTo->find_pseudo_cumack == 1) && (tp1->sent < SCTP_DATAGRAM_RESEND) && - (tp1->snd_count == 1)) { - tp1->whoTo->pseudo_cumack = tp1->rec.data.TSN_seq; - tp1->whoTo->find_pseudo_cumack = 0; - } - if ((tp1->whoTo->find_rtx_pseudo_cumack == 1) && (tp1->sent < SCTP_DATAGRAM_RESEND) && - (tp1->snd_count > 1)) { - tp1->whoTo->rtx_pseudo_cumack = tp1->rec.data.TSN_seq; - tp1->whoTo->find_rtx_pseudo_cumack = 0; - } - if (tp1->rec.data.TSN_seq == theTSN) { - if (tp1->sent != SCTP_DATAGRAM_UNSENT) { - /* - * must be held until - * cum-ack passes - */ - /* - * ECN Nonce: Add the nonce - * value to the sender's - * nonce sum - */ - if (tp1->sent < SCTP_DATAGRAM_RESEND) { - /*- - * If it is less than RESEND, it is - * now no-longer in flight. - * Higher values may already be set - * via previous Gap Ack Blocks... - * i.e. ACKED or RESEND. - */ - if (compare_with_wrap(tp1->rec.data.TSN_seq, - *biggest_newly_acked_tsn, MAX_TSN)) { - *biggest_newly_acked_tsn = tp1->rec.data.TSN_seq; - } - /* - * CMT: SFR algo - * (and HTNA) - set - * saw_newack to 1 - * for dest being - * newly acked. - * update - * this_sack_highest_ - * newack if - * appropriate. - */ - if (tp1->rec.data.chunk_was_revoked == 0) - tp1->whoTo->saw_newack = 1; - - if (compare_with_wrap(tp1->rec.data.TSN_seq, - tp1->whoTo->this_sack_highest_newack, - MAX_TSN)) { - tp1->whoTo->this_sack_highest_newack = - tp1->rec.data.TSN_seq; - } - /* - * CMT DAC algo: - * also update - * this_sack_lowest_n - * ewack - */ - if (*this_sack_lowest_newack == 0) { - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SACK_LOGGING_ENABLE) { - sctp_log_sack(*this_sack_lowest_newack, - last_tsn, - tp1->rec.data.TSN_seq, - 0, - 0, - SCTP_LOG_TSN_ACKED); - } - *this_sack_lowest_newack = tp1->rec.data.TSN_seq; - } - /* - * CMT: CUCv2 - * algorithm. If - * (rtx-)pseudo-cumac - * k for corresp - * dest is being - * acked, then we - * have a new - * (rtx-)pseudo-cumac - * k. Set - * new_(rtx_)pseudo_c - * umack to TRUE so - * that the cwnd for - * this dest can be - * updated. Also - * trigger search - * for the next - * expected - * (rtx-)pseudo-cumac - * k. Separate - * pseudo_cumack - * trackers for - * first - * transmissions and - * retransmissions. - */ - if (tp1->rec.data.TSN_seq == tp1->whoTo->pseudo_cumack) { - if (tp1->rec.data.chunk_was_revoked == 0) { - tp1->whoTo->new_pseudo_cumack = 1; - } - tp1->whoTo->find_pseudo_cumack = 1; - } - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { - sctp_log_cwnd(stcb, tp1->whoTo, tp1->rec.data.TSN_seq, SCTP_CWND_LOG_FROM_SACK); - } - if (tp1->rec.data.TSN_seq == tp1->whoTo->rtx_pseudo_cumack) { - if (tp1->rec.data.chunk_was_revoked == 0) { - tp1->whoTo->new_pseudo_cumack = 1; - } - tp1->whoTo->find_rtx_pseudo_cumack = 1; - } - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SACK_LOGGING_ENABLE) { - sctp_log_sack(*biggest_newly_acked_tsn, - last_tsn, - tp1->rec.data.TSN_seq, - frag_strt, - frag_end, - SCTP_LOG_TSN_ACKED); - } - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FLIGHT_LOGGING_ENABLE) { - sctp_misc_ints(SCTP_FLIGHT_LOG_DOWN_GAP, - tp1->whoTo->flight_size, - tp1->book_size, - (uintptr_t) tp1->whoTo, - tp1->rec.data.TSN_seq); - } - sctp_flight_size_decrease(tp1); - sctp_total_flight_decrease(stcb, tp1); - - tp1->whoTo->net_ack += tp1->send_size; - if (tp1->snd_count < 2) { - /* - * True - * non-retran - * smited - * chunk - */ - tp1->whoTo->net_ack2 += tp1->send_size; - - /* - * update - * RTO too ? - */ - if (tp1->do_rtt) { - tp1->whoTo->RTO = - sctp_calculate_rto(stcb, - asoc, - tp1->whoTo, - &tp1->sent_rcv_time, - sctp_align_safe_nocopy); - tp1->do_rtt = 0; - } - } - } - if (tp1->sent <= SCTP_DATAGRAM_RESEND) { - (*ecn_seg_sums) += tp1->rec.data.ect_nonce; - (*ecn_seg_sums) &= SCTP_SACK_NONCE_SUM; - if (compare_with_wrap(tp1->rec.data.TSN_seq, - asoc->this_sack_highest_gap, - MAX_TSN)) { - asoc->this_sack_highest_gap = - tp1->rec.data.TSN_seq; - } - if (tp1->sent == SCTP_DATAGRAM_RESEND) { - sctp_ucount_decr(asoc->sent_queue_retran_cnt); -#ifdef SCTP_AUDITING_ENABLED - sctp_audit_log(0xB2, - (asoc->sent_queue_retran_cnt & 0x000000ff)); -#endif - } - } - /* - * All chunks NOT UNSENT - * fall through here and are - * marked - */ - if (tp1->sent != SCTP_FORWARD_TSN_SKIP) - tp1->sent = SCTP_DATAGRAM_NR_MARKED; - if (tp1->rec.data.chunk_was_revoked) { - /* deflate the cwnd */ - tp1->whoTo->cwnd -= tp1->book_size; - tp1->rec.data.chunk_was_revoked = 0; - } - } - break; - } /* if (tp1->TSN_seq == theTSN) */ - if (compare_with_wrap(tp1->rec.data.TSN_seq, theTSN, - MAX_TSN)) - break; - - tp1 = TAILQ_NEXT(tp1, sctp_next); - } /* end while (tp1) */ - } /* end for (j = fragStart */ + sctp_process_segment_range(stcb, &tp1, last_tsn, frag_strt, frag_end, + 0, &num_frs, biggest_newly_acked_tsn, + this_sack_lowest_newack, ecn_seg_sums); frag = (struct sctp_gap_ack_block *)sctp_m_getptr(m, *offset, sizeof(struct sctp_gap_ack_block), (uint8_t *) & block); *offset += sizeof(block); @@ -7164,6 +6987,8 @@ sctp_handle_nr_sack_segments(struct mbuf } tp1 = NULL; last_nr_frag_high = 0; + /* Reset to beginning for the nr_sack section */ + tp1 = TAILQ_FIRST(&asoc->sent_queue); for (i = 0; i < num_nr_seg; i++) { @@ -7207,45 +7032,15 @@ sctp_handle_nr_sack_segments(struct mbuf } last_nr_frag_high = nr_frag_end + last_tsn; } - - for (j = nr_frag_strt + last_tsn; (compare_with_wrap((nr_frag_end + last_tsn), j, MAX_TSN)); j++) { - while (tp1) { - if (tp1->rec.data.TSN_seq == j) { - if (tp1->sent != SCTP_DATAGRAM_UNSENT) { - if (tp1->sent != SCTP_FORWARD_TSN_SKIP) - tp1->sent = SCTP_DATAGRAM_NR_MARKED; - /* - * TAILQ_REMOVE(&asoc->sent_q - * ueue, tp1, sctp_next); - */ - if (tp1->data) { - /* - * sa_ignore - * NO_NULL_CHK - */ - sctp_free_bufspace(stcb, asoc, tp1, 1); - sctp_m_freem(tp1->data); - } - tp1->data = NULL; - /* asoc->sent_queue_cnt--; */ - /* - * sctp_free_a_chunk(stcb, - * tp1); - */ - wake_him++; - } - break; - } /* if (tp1->TSN_seq == j) */ - if (compare_with_wrap(tp1->rec.data.TSN_seq, j, - MAX_TSN)) - break; - tp1 = TAILQ_NEXT(tp1, sctp_next); - } /* end while (tp1) */ - - } /* end for (j = nrFragStart */ + num_frs = 0; + wake_him = sctp_process_segment_range(stcb, &tp1, last_tsn, + nr_frag_strt, nr_frag_end, 1, + &num_frs, biggest_newly_acked_tsn, + this_sack_lowest_newack, ecn_seg_sums); nr_frag = (struct sctp_nr_gap_ack_block *)sctp_m_getptr(m, *offset, - sizeof(struct sctp_nr_gap_ack_block), (uint8_t *) & nr_block); + sizeof(struct sctp_nr_gap_ack_block), + (uint8_t *) & nr_block); *offset += sizeof(nr_block); if (nr_frag == NULL) { break; From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 03:40:49 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CD9B106566B; Sat, 17 Apr 2010 03:40:49 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B0E58FC1D; Sat, 17 Apr 2010 03:40:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H3enIR036058; Sat, 17 Apr 2010 03:40:49 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H3emLd036056; Sat, 17 Apr 2010 03:40:48 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170340.o3H3emLd036056@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 03:40:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206724 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 03:40:49 -0000 Author: rrs Date: Sat Apr 17 03:40:48 2010 New Revision: 206724 URL: http://svn.freebsd.org/changeset/base/206724 Log: MFC 202516 This gets rid of some stray #ifdef APPLE that drifted in some how. Modified: stable/8/sys/netinet/sctp_constants.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_constants.h ============================================================================== --- stable/8/sys/netinet/sctp_constants.h Sat Apr 17 03:38:26 2010 (r206723) +++ stable/8/sys/netinet/sctp_constants.h Sat Apr 17 03:40:48 2010 (r206724) @@ -276,28 +276,16 @@ __FBSDID("$FreeBSD$"); #define SCTP_SCALE_FOR_ADDR 2 /* default AUTO_ASCONF mode enable(1)/disable(0) value (sysctl) */ -#if defined (__APPLE__) && !defined(SCTP_APPLE_AUTO_ASCONF) -#define SCTP_DEFAULT_AUTO_ASCONF 0 -#else #define SCTP_DEFAULT_AUTO_ASCONF 1 -#endif /* default MULTIPLE_ASCONF mode enable(1)/disable(0) value (sysctl) */ #define SCTP_DEFAULT_MULTIPLE_ASCONFS 0 /* default MOBILITY_BASE mode enable(1)/disable(0) value (sysctl) */ -#if defined (__APPLE__) && !defined(SCTP_APPLE_MOBILITY_BASE) -#define SCTP_DEFAULT_MOBILITY_BASE 0 -#else #define SCTP_DEFAULT_MOBILITY_BASE 0 -#endif /* default MOBILITY_FASTHANDOFF mode enable(1)/disable(0) value (sysctl) */ -#if defined (__APPLE__) && !defined(SCTP_APPLE_MOBILITY_FASTHANDOFF) #define SCTP_DEFAULT_MOBILITY_FASTHANDOFF 0 -#else -#define SCTP_DEFAULT_MOBILITY_FASTHANDOFF 0 -#endif /* * Theshold for rwnd updates, we have to read (sb_hiwat >> From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 03:43:02 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8FE6106566B; Sat, 17 Apr 2010 03:43:02 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C77C58FC18; Sat, 17 Apr 2010 03:43:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H3h2aH036604; Sat, 17 Apr 2010 03:43:02 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H3h2Gu036602; Sat, 17 Apr 2010 03:43:02 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170343.o3H3h2Gu036602@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 03:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206725 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 03:43:03 -0000 Author: rrs Date: Sat Apr 17 03:43:02 2010 New Revision: 206725 URL: http://svn.freebsd.org/changeset/base/206725 Log: MFC of 202517 Again gets rid of some rather strange ifdef's for APPLE/USERSPACE that drifted in through our scrubber programs. Modified: stable/8/sys/netinet/sctp_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sat Apr 17 03:40:48 2010 (r206724) +++ stable/8/sys/netinet/sctp_output.c Sat Apr 17 03:43:02 2010 (r206725) @@ -3490,11 +3490,7 @@ sctp_lowlevel_chunk_output(struct sctp_i tos_value = inp->ip_inp.inp.inp_ip_tos; } if ((nofragment_flag) && (port == 0)) { -#if defined(WITH_CONVERT_IP_OFF) || defined(__FreeBSD__) || defined(__APPLE__) || defined(__Userspace__) ip->ip_off = IP_DF; -#else - ip->ip_off = htons(IP_DF); -#endif } else ip->ip_off = 0; From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 03:44:28 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D753B106564A; Sat, 17 Apr 2010 03:44:28 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C57418FC17; Sat, 17 Apr 2010 03:44:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H3iS3c036964; Sat, 17 Apr 2010 03:44:28 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H3iSI0036962; Sat, 17 Apr 2010 03:44:28 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170344.o3H3iSI0036962@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 03:44:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206726 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 03:44:29 -0000 Author: rrs Date: Sat Apr 17 03:44:28 2010 New Revision: 206726 URL: http://svn.freebsd.org/changeset/base/206726 Log: MFC of 202518 More ifdefs that should not be present... Modified: stable/8/sys/netinet/sctp_sysctl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/8/sys/netinet/sctp_sysctl.c Sat Apr 17 03:43:02 2010 (r206725) +++ stable/8/sys/netinet/sctp_sysctl.c Sat Apr 17 03:44:28 2010 (r206726) @@ -556,9 +556,7 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) if (error == 0) { RANGECHK(SCTP_BASE_SYSCTL(sctp_sendspace), SCTPCTL_MAXDGRAM_MIN, SCTPCTL_MAXDGRAM_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_recvspace), SCTPCTL_RECVSPACE_MIN, SCTPCTL_RECVSPACE_MAX); -#if defined(__FreeBSD__) || defined(SCTP_APPLE_AUTO_ASCONF) RANGECHK(SCTP_BASE_SYSCTL(sctp_auto_asconf), SCTPCTL_AUTOASCONF_MIN, SCTPCTL_AUTOASCONF_MAX); -#endif RANGECHK(SCTP_BASE_SYSCTL(sctp_ecn_enable), SCTPCTL_ECN_ENABLE_MIN, SCTPCTL_ECN_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_ecn_nonce), SCTPCTL_ECN_NONCE_MIN, SCTPCTL_ECN_NONCE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_strict_sacks), SCTPCTL_STRICT_SACKS_MIN, SCTPCTL_STRICT_SACKS_MAX); @@ -613,12 +611,8 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) RANGECHK(SCTP_BASE_SYSCTL(sctp_default_frag_interleave), SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MIN, SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_vtag_time_wait), SCTPCTL_TIME_WAIT_MIN, SCTPCTL_TIME_WAIT_MAX); -#if defined(__FreeBSD__) || defined(SCTP_APPLE_MOBILITY_BASE) RANGECHK(SCTP_BASE_SYSCTL(sctp_mobility_base), SCTPCTL_MOBILITY_BASE_MIN, SCTPCTL_MOBILITY_BASE_MAX); -#endif -#if defined(__FreeBSD__) || defined(SCTP_APPLE_MOBILITY_FASTHANDOFF) RANGECHK(SCTP_BASE_SYSCTL(sctp_mobility_fasthandoff), SCTPCTL_MOBILITY_FASTHANDOFF_MIN, SCTPCTL_MOBILITY_FASTHANDOFF_MAX); -#endif RANGECHK(SCTP_BASE_SYSCTL(sctp_udp_tunneling_for_client_enable), SCTPCTL_UDP_TUNNELING_FOR_CLIENT_ENABLE_MIN, SCTPCTL_UDP_TUNNELING_FOR_CLIENT_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_enable_sack_immediately), SCTPCTL_SACK_IMMEDIATELY_ENABLE_MIN, SCTPCTL_SACK_IMMEDIATELY_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_inits_include_nat_friendly), SCTPCTL_NAT_FRIENDLY_INITS_MIN, SCTPCTL_NAT_FRIENDLY_INITS_MAX); @@ -660,11 +654,9 @@ SYSCTL_PROC(_net_inet_sctp, OID_AUTO, re &SCTP_BASE_SYSCTL(sctp_recvspace), 0, sysctl_sctp_check, "IU", SCTPCTL_RECVSPACE_DESC); -#if defined(__FreeBSD__) || defined(SCTP_APPLE_AUTO_ASCONF) SYSCTL_PROC(_net_inet_sctp, OID_AUTO, auto_asconf, CTLTYPE_INT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_auto_asconf), 0, sysctl_sctp_check, "IU", SCTPCTL_AUTOASCONF_DESC); -#endif SYSCTL_PROC(_net_inet_sctp, OID_AUTO, ecn_enable, CTLTYPE_INT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_ecn_enable), 0, sysctl_sctp_check, "IU", @@ -871,17 +863,13 @@ SYSCTL_PROC(_net_inet_sctp, OID_AUTO, de &SCTP_BASE_SYSCTL(sctp_default_frag_interleave), 0, sysctl_sctp_check, "IU", SCTPCTL_DEFAULT_FRAG_INTERLEAVE_DESC); -#if defined(__FreeBSD__) || defined(SCTP_APPLE_MOBILITY_BASE) SYSCTL_PROC(_net_inet_sctp, OID_AUTO, mobility_base, CTLTYPE_INT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_mobility_base), 0, sysctl_sctp_check, "IU", SCTPCTL_MOBILITY_BASE_DESC); -#endif -#if defined(__FreeBSD__) || defined(SCTP_APPLE_MOBILITY_FASTHANDOFF) SYSCTL_PROC(_net_inet_sctp, OID_AUTO, mobility_fasthandoff, CTLTYPE_INT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_mobility_fasthandoff), 0, sysctl_sctp_check, "IU", SCTPCTL_MOBILITY_FASTHANDOFF_DESC); -#endif #if defined(SCTP_LOCAL_TRACE_BUF) SYSCTL_STRUCT(_net_inet_sctp, OID_AUTO, log, CTLFLAG_RD, From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 03:47:04 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A66FD106564A; Sat, 17 Apr 2010 03:47:04 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 94C938FC17; Sat, 17 Apr 2010 03:47:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H3l4SI037578; Sat, 17 Apr 2010 03:47:04 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H3l4jp037575; Sat, 17 Apr 2010 03:47:04 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170347.o3H3l4jp037575@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 03:47:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206727 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 03:47:04 -0000 Author: rrs Date: Sat Apr 17 03:47:04 2010 New Revision: 206727 URL: http://svn.freebsd.org/changeset/base/206727 Log: MFC of 202520 This aligns us to the socket api of the stream reset with proper naming.. and a define for backward compatibility. Modified: stable/8/sys/netinet/sctp_uio.h stable/8/sys/netinet/sctp_usrreq.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_uio.h ============================================================================== --- stable/8/sys/netinet/sctp_uio.h Sat Apr 17 03:44:28 2010 (r206726) +++ stable/8/sys/netinet/sctp_uio.h Sat Apr 17 03:47:04 2010 (r206727) @@ -45,6 +45,9 @@ __FBSDID("$FreeBSD$"); typedef uint32_t sctp_assoc_t; +/* Compatibility to previous define's */ +#define sctp_stream_reset_events sctp_stream_reset_event + /* On/Off setup for subscription to events */ struct sctp_event_subscribe { uint8_t sctp_data_io_event; @@ -57,7 +60,7 @@ struct sctp_event_subscribe { uint8_t sctp_adaptation_layer_event; uint8_t sctp_authentication_event; uint8_t sctp_sender_dry_event; - uint8_t sctp_stream_reset_events; + uint8_t sctp_stream_reset_event; }; /* ancillary data types */ @@ -402,19 +405,19 @@ union sctp_notification { }; /* notification types */ -#define SCTP_ASSOC_CHANGE 0x0001 -#define SCTP_PEER_ADDR_CHANGE 0x0002 -#define SCTP_REMOTE_ERROR 0x0003 -#define SCTP_SEND_FAILED 0x0004 -#define SCTP_SHUTDOWN_EVENT 0x0005 -#define SCTP_ADAPTATION_INDICATION 0x0006 +#define SCTP_ASSOC_CHANGE 0x0001 +#define SCTP_PEER_ADDR_CHANGE 0x0002 +#define SCTP_REMOTE_ERROR 0x0003 +#define SCTP_SEND_FAILED 0x0004 +#define SCTP_SHUTDOWN_EVENT 0x0005 +#define SCTP_ADAPTATION_INDICATION 0x0006 /* same as above */ -#define SCTP_ADAPTION_INDICATION 0x0006 -#define SCTP_PARTIAL_DELIVERY_EVENT 0x0007 -#define SCTP_AUTHENTICATION_EVENT 0x0008 -#define SCTP_STREAM_RESET_EVENT 0x0009 -#define SCTP_SENDER_DRY_EVENT 0x000a - +#define SCTP_ADAPTION_INDICATION 0x0006 +#define SCTP_PARTIAL_DELIVERY_EVENT 0x0007 +#define SCTP_AUTHENTICATION_EVENT 0x0008 +#define SCTP_STREAM_RESET_EVENT 0x0009 +#define SCTP_SENDER_DRY_EVENT 0x000a +#define SCTP__NOTIFICATIONS_STOPPED_EVENT 0x000b /* we dont send this */ /* * socket option structs */ Modified: stable/8/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/8/sys/netinet/sctp_usrreq.c Sat Apr 17 03:44:28 2010 (r206726) +++ stable/8/sys/netinet/sctp_usrreq.c Sat Apr 17 03:47:04 2010 (r206727) @@ -2008,7 +2008,7 @@ flags_out: events->sctp_sender_dry_event = 1; if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_STREAM_RESETEVNT)) - events->sctp_stream_reset_events = 1; + events->sctp_stream_reset_event = 1; SCTP_INP_RUNLOCK(inp); *optsize = sizeof(struct sctp_event_subscribe); } @@ -3650,7 +3650,7 @@ sctp_setopt(struct socket *so, int optna sctp_feature_off(inp, SCTP_PCB_FLAGS_DRYEVNT); } - if (events->sctp_stream_reset_events) { + if (events->sctp_stream_reset_event) { sctp_feature_on(inp, SCTP_PCB_FLAGS_STREAM_RESETEVNT); } else { sctp_feature_off(inp, SCTP_PCB_FLAGS_STREAM_RESETEVNT); From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 03:49:21 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66079106566B; Sat, 17 Apr 2010 03:49:21 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 545C28FC15; Sat, 17 Apr 2010 03:49:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H3nLYA038143; Sat, 17 Apr 2010 03:49:21 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H3nLtO038141; Sat, 17 Apr 2010 03:49:21 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170349.o3H3nLtO038141@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 03:49:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206728 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 03:49:21 -0000 Author: rrs Date: Sat Apr 17 03:49:21 2010 New Revision: 206728 URL: http://svn.freebsd.org/changeset/base/206728 Log: MFC 202521 More stray ifdef's that had worked their way into the code base somehow (yes thats ifdef Windows going out.. our stack runs on windows .. big thanks for that goes to Kozuka-san and Bruce Cran ;-D) Modified: stable/8/sys/netinet/sctputil.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Sat Apr 17 03:47:04 2010 (r206727) +++ stable/8/sys/netinet/sctputil.c Sat Apr 17 03:49:21 2010 (r206728) @@ -52,15 +52,9 @@ __FBSDID("$FreeBSD$"); #define NUMBER_OF_MTU_SIZES 18 -#if defined(__Windows__) && !defined(SCTP_LOCAL_TRACE_BUF) -#include "eventrace_netinet.h" -#include "sctputil.tmh" /* this is the file that will be auto - * generated */ -#else #ifndef KTR_SCTP #define KTR_SCTP KTR_SUBSYS #endif -#endif void sctp_sblog(struct sockbuf *sb, From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 03:51:13 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E0F6106564A; Sat, 17 Apr 2010 03:51:13 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C6B88FC08; Sat, 17 Apr 2010 03:51:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H3pDu5038589; Sat, 17 Apr 2010 03:51:13 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H3pDav038587; Sat, 17 Apr 2010 03:51:13 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170351.o3H3pDav038587@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 03:51:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206729 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 03:51:13 -0000 Author: rrs Date: Sat Apr 17 03:51:13 2010 New Revision: 206729 URL: http://svn.freebsd.org/changeset/base/206729 Log: MFC of 202523 This fixes a closing race condition that is unlikely to ever happen.. but good to fix ;-) Modified: stable/8/sys/netinet/sctp_usrreq.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/8/sys/netinet/sctp_usrreq.c Sat Apr 17 03:49:21 2010 (r206728) +++ stable/8/sys/netinet/sctp_usrreq.c Sat Apr 17 03:51:13 2010 (r206729) @@ -551,6 +551,7 @@ sctp_attach(struct socket *so, int proto sctp_log_closing(inp, NULL, 17); #endif if (error != 0) { +try_again: flags = inp->sctp_flags; if (((flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) && (atomic_cmpset_int(&inp->sctp_flags, flags, (flags | SCTP_PCB_FLAGS_SOCKET_GONE | SCTP_PCB_FLAGS_CLOSE_IP)))) { @@ -561,7 +562,12 @@ sctp_attach(struct socket *so, int proto sctp_inpcb_free(inp, SCTP_FREE_SHOULD_USE_ABORT, SCTP_CALLED_AFTER_CMPSET_OFCLOSE); } else { - SCTP_INP_WUNLOCK(inp); + flags = inp->sctp_flags; + if ((flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) { + goto try_again; + } else { + SCTP_INP_WUNLOCK(inp); + } } return error; } From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 03:53:45 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 139B4106566B; Sat, 17 Apr 2010 03:53:45 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 017098FC22; Sat, 17 Apr 2010 03:53:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H3riBT039191; Sat, 17 Apr 2010 03:53:44 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H3ri0w039187; Sat, 17 Apr 2010 03:53:44 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170353.o3H3ri0w039187@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 03:53:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206730 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 03:53:45 -0000 Author: rrs Date: Sat Apr 17 03:53:44 2010 New Revision: 206730 URL: http://svn.freebsd.org/changeset/base/206730 Log: MFC of 205502 The firste of Michael and my long fight at the IETF to get the NR sack code fixed and aligned. Modified: stable/8/sys/netinet/sctp_indata.c stable/8/sys/netinet/sctputil.c stable/8/sys/netinet/sctputil.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Sat Apr 17 03:51:13 2010 (r206729) +++ stable/8/sys/netinet/sctp_indata.c Sat Apr 17 03:53:44 2010 (r206730) @@ -2533,15 +2533,7 @@ sctp_sack_check(struct sctp_tcb *stcb, i /* int nr_at; */ /* int nr_last_all_ones = 0; */ /* int nr_slide_from, nr_slide_end, nr_lgap, nr_distance; */ - uint32_t old_cumack, old_base, old_highest; - unsigned char aux_array[64]; - - /* - * EY! Don't think this is required but I am immitating the code for - * map just to make sure - */ - unsigned char nr_aux_array[64]; asoc = &stcb->asoc; at = 0; @@ -2549,33 +2541,6 @@ sctp_sack_check(struct sctp_tcb *stcb, i old_cumack = asoc->cumulative_tsn; old_base = asoc->mapping_array_base_tsn; old_highest = asoc->highest_tsn_inside_map; - if (asoc->mapping_array_size < 64) - memcpy(aux_array, asoc->mapping_array, - asoc->mapping_array_size); - else - memcpy(aux_array, asoc->mapping_array, 64); - /* EY do the same for nr_mapping_array */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { - if (asoc->nr_mapping_array_size != asoc->mapping_array_size) { - /* - * printf("\nEY-IN sack_check method: \nEY-" "The - * size of map and nr_map are inconsitent") - */ ; - } - if (asoc->nr_mapping_array_base_tsn != asoc->mapping_array_base_tsn) { - /* - * printf("\nEY-IN sack_check method VERY CRUCIAL - * error: \nEY-" "The base tsns of map and nr_map - * are inconsitent") - */ ; - } - /* EY! just immitating the above code */ - if (asoc->nr_mapping_array_size < 64) - memcpy(nr_aux_array, asoc->nr_mapping_array, - asoc->nr_mapping_array_size); - else - memcpy(aux_array, asoc->nr_mapping_array, 64); - } /* * We could probably improve this a small bit by calculating the * offset of the current cum-ack as the starting point. @@ -2611,6 +2576,7 @@ sctp_sack_check(struct sctp_tcb *stcb, i #else SCTP_PRINTF("huh, cumack 0x%x greater than high-tsn 0x%x in map - should panic?\n", asoc->cumulative_tsn, asoc->highest_tsn_inside_map); + sctp_print_mapping_array(asoc); if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { sctp_log_map(0, 6, asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_RESULT); } Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Sat Apr 17 03:51:13 2010 (r206729) +++ stable/8/sys/netinet/sctputil.c Sat Apr 17 03:53:44 2010 (r206730) @@ -1180,6 +1180,25 @@ sctp_init_asoc(struct sctp_inpcb *m, str return (0); } +void +sctp_print_mapping_array(struct sctp_association *asoc) +{ + int i; + + printf("Mapping size:%d baseTSN:%8.8x cumAck:%8.8x highestTSN:%8.8x\n", + asoc->mapping_array_size, + asoc->mapping_array_base_tsn, + asoc->cumulative_tsn, + asoc->highest_tsn_inside_map + ); + for (i = 0; i < asoc->mapping_array_size; i++) { + printf("%8.8x ", asoc->mapping_array[i]); + if (((i + 1) % 8) == 0) + printf("\n"); + } + printf("\n"); +} + int sctp_expand_mapping_array(struct sctp_association *asoc, uint32_t needed) { @@ -1187,7 +1206,9 @@ sctp_expand_mapping_array(struct sctp_as uint8_t *new_array; uint32_t new_size; + new_size = asoc->mapping_array_size + ((needed + 7) / 8 + SCTP_MAPPING_ARRAY_INCR); + SCTP_MALLOC(new_array, uint8_t *, new_size, SCTP_M_MAP); if (new_array == NULL) { /* can't get more, forget it */ @@ -1200,21 +1221,19 @@ sctp_expand_mapping_array(struct sctp_as SCTP_FREE(asoc->mapping_array, SCTP_M_MAP); asoc->mapping_array = new_array; asoc->mapping_array_size = new_size; - if (asoc->peer_supports_nr_sack) { - new_size = asoc->nr_mapping_array_size + ((needed + 7) / 8 + SCTP_NR_MAPPING_ARRAY_INCR); - SCTP_MALLOC(new_array, uint8_t *, new_size, SCTP_M_MAP); - if (new_array == NULL) { - /* can't get more, forget it */ - SCTP_PRINTF("No memory for expansion of SCTP mapping array %d\n", - new_size); - return (-1); - } - memset(new_array, 0, new_size); - memcpy(new_array, asoc->nr_mapping_array, asoc->nr_mapping_array_size); - SCTP_FREE(asoc->nr_mapping_array, SCTP_M_MAP); - asoc->nr_mapping_array = new_array; - asoc->nr_mapping_array_size = new_size; + new_size = asoc->nr_mapping_array_size + ((needed + 7) / 8 + SCTP_NR_MAPPING_ARRAY_INCR); + SCTP_MALLOC(new_array, uint8_t *, new_size, SCTP_M_MAP); + if (new_array == NULL) { + /* can't get more, forget it */ + SCTP_PRINTF("No memory for expansion of SCTP mapping array %d\n", + new_size); + return (-1); } + memset(new_array, 0, new_size); + memcpy(new_array, asoc->nr_mapping_array, asoc->nr_mapping_array_size); + SCTP_FREE(asoc->nr_mapping_array, SCTP_M_MAP); + asoc->nr_mapping_array = new_array; + asoc->nr_mapping_array_size = new_size; return (0); } Modified: stable/8/sys/netinet/sctputil.h ============================================================================== --- stable/8/sys/netinet/sctputil.h Sat Apr 17 03:51:13 2010 (r206729) +++ stable/8/sys/netinet/sctputil.h Sat Apr 17 03:53:44 2010 (r206730) @@ -376,7 +376,7 @@ int sctp_fill_stat_log(void *, size_t *) void sctp_log_fr(uint32_t, uint32_t, uint32_t, int); void sctp_log_sack(uint32_t, uint32_t, uint32_t, uint16_t, uint16_t, int); void sctp_log_map(uint32_t, uint32_t, uint32_t, int); - +void sctp_print_mapping_array(struct sctp_association *asoc); void sctp_clr_stat_log(void); From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 03:55:49 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B5B81065670; Sat, 17 Apr 2010 03:55:49 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 882218FC25; Sat, 17 Apr 2010 03:55:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H3tnAD039724; Sat, 17 Apr 2010 03:55:49 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H3tn4w039720; Sat, 17 Apr 2010 03:55:49 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170355.o3H3tn4w039720@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 03:55:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206731 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 03:55:49 -0000 Author: rrs Date: Sat Apr 17 03:55:49 2010 New Revision: 206731 URL: http://svn.freebsd.org/changeset/base/206731 Log: MFC of 202526 The first round of some of Michael's changes to get the sack processing in better shape. Modified: stable/8/sys/netinet/sctp_header.h stable/8/sys/netinet/sctp_indata.c stable/8/sys/netinet/sctp_indata.h stable/8/sys/netinet/sctp_input.c stable/8/sys/netinet/sctp_output.c stable/8/sys/netinet/sctp_structs.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_header.h ============================================================================== --- stable/8/sys/netinet/sctp_header.h Sat Apr 17 03:53:44 2010 (r206730) +++ stable/8/sys/netinet/sctp_header.h Sat Apr 17 03:55:49 2010 (r206731) @@ -284,13 +284,6 @@ struct sctp_sack_chunk { struct sctp_sack sack; } SCTP_PACKED; - -/* EY Following 3 structs define NR Selective Ack (NR_SACK) chunk */ -struct sctp_nr_gap_ack_block { - uint16_t start; /* NR Gap Ack block start */ - uint16_t end; /* NR Gap Ack block end */ -} SCTP_PACKED; - struct sctp_nr_sack { uint32_t cum_tsn_ack; /* cumulative TSN Ack */ uint32_t a_rwnd; /* updated a_rwnd of sender */ @@ -299,7 +292,6 @@ struct sctp_nr_sack { uint16_t num_dup_tsns; /* number of duplicate TSNs */ uint16_t reserved; /* not currently used */ /* struct sctp_gap_ack_block's follow */ - /* struct sctp_nr_gap_ack_block's follow */ /* uint32_t duplicate_tsn's follow */ } SCTP_PACKED; Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Sat Apr 17 03:53:44 2010 (r206730) +++ stable/8/sys/netinet/sctp_indata.c Sat Apr 17 03:55:49 2010 (r206731) @@ -439,12 +439,11 @@ abandon: * EY!-TODO- this tsn should be tagged nr only if it is * out-of-order, the if statement should be modified */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { - + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { nr_tsn = chk->rec.data.TSN_seq; SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); - if ((nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3)) || - (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { + if ((nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { /* * EY The 1st should never happen, as in * process_a_data_chunk method this check @@ -525,11 +524,11 @@ abandon: * nr_gap and tag this tsn * NR */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { - printf("Impossible NR gap calculation?\n"); /* * EY The * 1st @@ -694,7 +693,8 @@ protocol_error: * calculate the gap and such then tag this TSN nr * chk->rec.data.TSN_seq */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { @@ -750,11 +750,11 @@ protocol_error: * such then tag this TSN nr * chk->rec.data.TSN_seq */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { - printf("Impossible nr TSN set 3?\n"); /* * EY The 1st should never * happen, as in @@ -773,7 +773,8 @@ protocol_error: SCTP_TCB_LOCK_ASSERT(stcb); SCTP_REVERSE_OUT_TSN_PRES(nr_gap, nr_tsn, asoc); SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, nr_gap); - if (compare_with_wrap(nr_tsn, asoc->highest_tsn_inside_nr_map, + if (compare_with_wrap(nr_tsn, + asoc->highest_tsn_inside_nr_map, MAX_TSN)) asoc->highest_tsn_inside_nr_map = nr_tsn; } @@ -1759,7 +1760,8 @@ sctp_process_a_data_chunk(struct sctp_tc SCTP_TCB_LOCK_ASSERT(stcb); SCTP_SET_TSN_PRESENT(asoc->mapping_array, gap); /* EY set this tsn present in nr_sack's nr_mapping_array */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_TCB_LOCK_ASSERT(stcb); SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); SCTP_REVERSE_OUT_TSN_PRES(gap, tsn, asoc); @@ -2015,7 +2017,8 @@ failed_express_del: * block here I should check if this delivered tsn * is out_of_order, if yes then update the nr_map */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { /* EY debugging block */ { /* @@ -2260,13 +2263,13 @@ failed_pdapi_express_del: sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - /* * EY It is added to the read queue in prev if block * here I should check if this delivered tsn is * out_of_order, if yes then update the nr_map */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { /* * EY check if the mapping_array and * nr_mapping array are consistent @@ -2412,6 +2415,10 @@ finish_express_del: SCTP_TCB_LOCK_ASSERT(stcb); SCTP_SET_TSN_PRESENT(asoc->mapping_array, gap); + /* + * EY - set tsn present in nr-map if doing nr-sacks and the tsn is + * non-renegable + */ if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack && (SCTP_BASE_SYSCTL(sctp_do_drain) == 0)) { @@ -3382,49 +3389,37 @@ sctp_process_segment_range(struct sctp_t } -static void +static int sctp_handle_segments(struct mbuf *m, int *offset, struct sctp_tcb *stcb, struct sctp_association *asoc, - struct sctp_sack_chunk *ch, uint32_t last_tsn, uint32_t * biggest_tsn_acked, + uint32_t last_tsn, uint32_t * biggest_tsn_acked, uint32_t * biggest_newly_acked_tsn, uint32_t * this_sack_lowest_newack, - int num_seg, int *ecn_seg_sums) + int num_seg, int num_nr_seg, int *ecn_seg_sums) { - /************************************************/ - /* process fragments and update sendqueue */ - /************************************************/ - struct sctp_sack *sack; struct sctp_gap_ack_block *frag, block; struct sctp_tmit_chunk *tp1; int i; int num_frs = 0; + int chunk_freed; + int non_revocable; + uint16_t frag_strt, frag_end; + uint32_t last_frag_high; - uint16_t frag_strt, frag_end, primary_flag_set; - u_long last_frag_high; - - /* - * @@@ JRI : TODO: This flag is not used anywhere .. remove? - */ - if (asoc->primary_destination->dest_state & SCTP_ADDR_SWITCH_PRIMARY) { - primary_flag_set = 1; - } else { - primary_flag_set = 0; - } - sack = &ch->sack; - - frag = (struct sctp_gap_ack_block *)sctp_m_getptr(m, *offset, - sizeof(struct sctp_gap_ack_block), (uint8_t *) & block); - *offset += sizeof(block); - if (frag == NULL) { - return; - } tp1 = NULL; last_frag_high = 0; - for (i = 0; i < num_seg; i++) { + chunk_freed = 0; + + for (i = 0; i < (num_seg + num_nr_seg); i++) { + frag = (struct sctp_gap_ack_block *)sctp_m_getptr(m, *offset, + sizeof(struct sctp_gap_ack_block), (uint8_t *) & block); + *offset += sizeof(block); + if (frag == NULL) { + return (chunk_freed); + } frag_strt = ntohs(frag->start); frag_end = ntohs(frag->end); /* some sanity checks on the fragment offsets */ if (frag_strt > frag_end) { /* this one is malformed, skip */ - frag++; continue; } if (compare_with_wrap((frag_end + last_tsn), *biggest_tsn_acked, @@ -3434,7 +3429,6 @@ sctp_handle_segments(struct mbuf *m, int /* mark acked dgs and find out the highestTSN being acked */ if (tp1 == NULL) { tp1 = TAILQ_FIRST(&asoc->sent_queue); - /* save the locations of the last frags */ last_frag_high = frag_end + last_tsn; } else { @@ -3462,14 +3456,15 @@ sctp_handle_segments(struct mbuf *m, int } last_frag_high = frag_end + last_tsn; } - sctp_process_segment_range(stcb, &tp1, last_tsn, frag_strt, frag_end, - 0, &num_frs, biggest_newly_acked_tsn, - this_sack_lowest_newack, ecn_seg_sums); - frag = (struct sctp_gap_ack_block *)sctp_m_getptr(m, *offset, - sizeof(struct sctp_gap_ack_block), (uint8_t *) & block); - *offset += sizeof(block); - if (frag == NULL) { - break; + if (i < num_seg) { + non_revocable = 0; + } else { + non_revocable = 1; + } + if (sctp_process_segment_range(stcb, &tp1, last_tsn, frag_strt, frag_end, + non_revocable, &num_frs, biggest_newly_acked_tsn, + this_sack_lowest_newack, ecn_seg_sums)) { + chunk_freed = 1; } } if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FR_LOGGING_ENABLE) { @@ -3478,6 +3473,7 @@ sctp_handle_segments(struct mbuf *m, int *biggest_newly_acked_tsn, last_tsn, SCTP_FR_LOG_BIGGEST_TSNS); } + return (chunk_freed); } static void @@ -4416,7 +4412,6 @@ sctp_express_handle_sack(struct sctp_tcb struct socket *so; #endif - SOCKBUF_LOCK(&stcb->sctp_socket->so_snd); if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) { /* sa_ignore NO_NULL_CHK */ @@ -4491,10 +4486,10 @@ sctp_express_handle_sack(struct sctp_tcb if (compare_with_wrap(asoc->last_acked_seq, asoc->nonce_resync_tsn, MAX_TSN)) { asoc->nonce_sum_check = 1; /* - * now we must calculate what the base is. + * Now we must calculate what the base is. * We do this based on two things, we know * the total's for all the segments - * gap-acked in the SACK (none), We also + * gap-acked in the SACK (none). We also * know the SACK's nonce sum, its in * nonce_sum_flag. So we can build a truth * table to back-calculate the new value of @@ -4533,6 +4528,7 @@ again: /* sa_ignore FREED_MEMORY */ TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) { if (tp1->window_probe) { + /* move back to data send queue */ sctp_window_probe_recovery(stcb, asoc, net, tp1); break; } @@ -4586,9 +4582,7 @@ again: */ if (sctp_fs_audit(asoc)) { TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - if (net->flight_size) { - net->flight_size = 0; - } + net->flight_size = 0; } asoc->total_flight = 0; asoc->total_flight_count = 0; @@ -4748,20 +4742,62 @@ again: } } +/* EY- nr_sack */ +/* Identifies the non-renegable tsns that are revoked*/ +static void +sctp_check_for_nr_revoked(struct sctp_tcb *stcb, + struct sctp_association *asoc, uint32_t cumack, + u_long biggest_tsn_acked) +{ + struct sctp_tmit_chunk *tp1; + + for (tp1 = TAILQ_FIRST(&asoc->sent_queue); tp1; tp1 = TAILQ_NEXT(tp1, sctp_next)) { + if (compare_with_wrap(tp1->rec.data.TSN_seq, cumack, + MAX_TSN)) { + /* + * ok this guy is either ACK or MARKED. If it is + * ACKED it has been previously acked but not this + * time i.e. revoked. If it is MARKED it was ACK'ed + * again. + */ + if (compare_with_wrap(tp1->rec.data.TSN_seq, biggest_tsn_acked, + MAX_TSN)) + break; + + + if (tp1->sent == SCTP_DATAGRAM_NR_ACKED) { + /* + * EY! a non-renegable TSN is revoked, need + * to abort the association + */ + /* + * EY TODO: put in the code to abort the + * assoc. + */ + return; + } else if (tp1->sent == SCTP_DATAGRAM_NR_MARKED) { + /* it has been re-acked in this SACK */ + tp1->sent = SCTP_DATAGRAM_NR_ACKED; + } + } + if (tp1->sent == SCTP_DATAGRAM_UNSENT) + break; + } + return; +} + void -sctp_handle_sack(struct mbuf *m, int offset, - struct sctp_sack_chunk *ch, struct sctp_tcb *stcb, - struct sctp_nets *net_from, int *abort_now, int sack_len, uint32_t rwnd) +sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup, + struct sctp_tcb *stcb, struct sctp_nets *net_from, + uint16_t num_seg, uint16_t num_nr_seg, uint16_t num_dup, + int *abort_now, uint8_t flags, + uint32_t cum_ack, uint32_t rwnd) { struct sctp_association *asoc; - struct sctp_sack *sack; struct sctp_tmit_chunk *tp1, *tp2; - uint32_t cum_ack, last_tsn, biggest_tsn_acked, biggest_tsn_newly_acked, - this_sack_lowest_newack; + uint32_t last_tsn, biggest_tsn_acked, biggest_tsn_newly_acked, this_sack_lowest_newack; uint32_t sav_cum_ack; - uint16_t num_seg, num_dup; uint16_t wake_him = 0; - unsigned int sack_length; uint32_t send_s = 0; long j; int accum_moved = 0; @@ -4797,15 +4833,13 @@ sctp_handle_sack(struct mbuf *m, int off * if in shutdown_recv state. */ SCTP_TCB_LOCK_ASSERT(stcb); - sack = &ch->sack; /* CMT DAC algo */ this_sack_lowest_newack = 0; j = 0; - sack_length = (unsigned int)sack_len; - /* ECN Nonce */ SCTP_STAT_INCR(sctps_slowpath_sack); - nonce_sum_flag = ch->ch.chunk_flags & SCTP_SACK_NONCE_SUM; - cum_ack = last_tsn = ntohl(sack->cum_tsn_ack); + last_tsn = cum_ack; + nonce_sum_flag = flags & SCTP_SACK_NONCE_SUM; + cmt_dac_flag = flags & SCTP_SACK_CMT_DAC; #ifdef SCTP_ASOCLOG_OF_TSNS stcb->asoc.cumack_log[stcb->asoc.cumack_log_at] = cum_ack; stcb->asoc.cumack_log_at++; @@ -4813,13 +4847,12 @@ sctp_handle_sack(struct mbuf *m, int off stcb->asoc.cumack_log_at = 0; } #endif - num_seg = ntohs(sack->num_gap_ack_blks); a_rwnd = rwnd; - /* CMT DAC algo */ - cmt_dac_flag = ch->ch.chunk_flags & SCTP_SACK_CMT_DAC; - num_dup = ntohs(sack->num_dup_tsns); - + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOG_SACK_ARRIVALS_ENABLE) { + sctp_misc_ints(SCTP_SACK_LOG_NORMAL, cum_ack, + rwnd, stcb->asoc.last_acked_seq, stcb->asoc.peers_rwnd); + } old_rwnd = stcb->asoc.peers_rwnd; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { sctp_misc_ints(SCTP_THRESHOLD_CLEAR, @@ -4839,27 +4872,16 @@ sctp_handle_sack(struct mbuf *m, int off SCTP_LOG_NEW_SACK); } if ((num_dup) && (SCTP_BASE_SYSCTL(sctp_logging_level) & (SCTP_FR_LOGGING_ENABLE | SCTP_EARLYFR_LOGGING_ENABLE))) { - int off_to_dup, iii; + uint16_t i; uint32_t *dupdata, dblock; - off_to_dup = (num_seg * sizeof(struct sctp_gap_ack_block)) + sizeof(struct sctp_sack_chunk); - if ((off_to_dup + (num_dup * sizeof(uint32_t))) <= sack_length) { - dupdata = (uint32_t *) sctp_m_getptr(m, off_to_dup, + for (i = 0; i < num_dup; i++) { + dupdata = (uint32_t *) sctp_m_getptr(m, offset_dup + i * sizeof(uint32_t), sizeof(uint32_t), (uint8_t *) & dblock); - off_to_dup += sizeof(uint32_t); - if (dupdata) { - for (iii = 0; iii < num_dup; iii++) { - sctp_log_fr(*dupdata, 0, 0, SCTP_FR_DUPED); - dupdata = (uint32_t *) sctp_m_getptr(m, off_to_dup, - sizeof(uint32_t), (uint8_t *) & dblock); - if (dupdata == NULL) - break; - off_to_dup += sizeof(uint32_t); - } + if (dupdata == NULL) { + break; } - } else { - SCTP_PRINTF("Size invalid offset to dups:%d number dups:%d sack_len:%d num gaps:%d\n", - off_to_dup, num_dup, sack_length, num_seg); + sctp_log_fr(*dupdata, 0, 0, SCTP_FR_DUPED); } } if (SCTP_BASE_SYSCTL(sctp_strict_sacks)) { @@ -4881,8 +4903,6 @@ sctp_handle_sack(struct mbuf *m, int off hopeless_peer: panic("Impossible sack 1"); #else - - /* * no way, we have not even sent this TSN out yet. * Peer is hopelessly messed up with us. @@ -4922,8 +4942,7 @@ sctp_handle_sack(struct mbuf *m, int off /* update the Rwnd of the peer */ if (TAILQ_EMPTY(&asoc->sent_queue) && TAILQ_EMPTY(&asoc->send_queue) && - (asoc->stream_queue_cnt == 0) - ) { + (asoc->stream_queue_cnt == 0)) { /* nothing left on send/sent and strmq */ if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOG_RWND_ENABLE) { sctp_log_rwnd_set(SCTP_SET_PEER_RWND_VIA_SACK, @@ -5094,14 +5113,7 @@ sctp_handle_sack(struct mbuf *m, int off /* always set this up to cum-ack */ asoc->this_sack_highest_gap = last_tsn; - /* Move offset up to point to gaps/dups */ - offset += sizeof(struct sctp_sack_chunk); - if (((num_seg * (sizeof(struct sctp_gap_ack_block))) + sizeof(struct sctp_sack_chunk)) > sack_length) { - - /* skip corrupt segments */ - goto skip_segments; - } - if (num_seg > 0) { + if ((num_seg > 0) || (num_nr_seg > 0)) { /* * CMT: SFR algo (and HTNA) - this_sack_highest_newack has @@ -5119,10 +5131,11 @@ sctp_handle_sack(struct mbuf *m, int off * handling NEWLY ACKED chunks. this_sack_lowest_newack is * used for CMT DAC algo. saw_newack will also change. */ - sctp_handle_segments(m, &offset, stcb, asoc, ch, last_tsn, - &biggest_tsn_acked, &biggest_tsn_newly_acked, &this_sack_lowest_newack, - num_seg, &ecn_seg_sums); - + if (sctp_handle_segments(m, &offset_seg, stcb, asoc, last_tsn, &biggest_tsn_acked, + &biggest_tsn_newly_acked, &this_sack_lowest_newack, + num_seg, num_nr_seg, &ecn_seg_sums)) { + wake_him++; + } if (SCTP_BASE_SYSCTL(sctp_strict_sacks)) { /* * validate the biggest_tsn_acked in the gap acks if @@ -5138,7 +5151,6 @@ sctp_handle_sack(struct mbuf *m, int off } } } -skip_segments: /*******************************************/ /* cancel ALL T3-send timer if accum moved */ /*******************************************/ @@ -5276,6 +5288,19 @@ done_with_it: if (tp1 != NULL) { /* Peer revoked all dg's marked or acked */ TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) { + /* + * EY- maybe check only if it is nr_acked + * nr_marked may not be possible + */ + if ((tp1->sent == SCTP_DATAGRAM_NR_ACKED) || + (tp1->sent == SCTP_DATAGRAM_NR_MARKED)) { + /* + * EY! - TODO: Something previously + * nr_gapped is reneged, abort the + * association + */ + return; + } if ((tp1->sent > SCTP_DATAGRAM_RESEND) && (tp1->sent < SCTP_FORWARD_TSN_SKIP)) { tp1->sent = SCTP_DATAGRAM_SENT; @@ -5311,6 +5336,10 @@ done_with_it: else asoc->saw_sack_with_frags = 0; + /* EY! - not sure about if there should be an IF */ + if (num_nr_seg > 0) + sctp_check_for_nr_revoked(stcb, asoc, cum_ack, biggest_tsn_acked); + /* JRS - Use the congestion control given in the CC module */ asoc->cc_functions.sctp_cwnd_update_after_sack(stcb, asoc, accum_moved, reneged_all, will_exit_fast_recovery); @@ -5446,7 +5475,7 @@ done_with_it: if (SCTP_BASE_SYSCTL(sctp_cmt_on_off) && SCTP_BASE_SYSCTL(sctp_cmt_use_dac) && (cmt_dac_flag == 0)) { this_sack_lowest_newack = cum_ack; } - if (num_seg > 0) { + if ((num_seg > 0) || (num_nr_seg > 0)) { sctp_strike_gap_ack_chunks(stcb, asoc, biggest_tsn_acked, biggest_tsn_newly_acked, this_sack_lowest_newack, accum_moved); } @@ -5569,9 +5598,12 @@ again: } if (net->flight_size) { j++; - sctp_timer_start(SCTP_TIMER_TYPE_SEND, - stcb->sctp_ep, stcb, net); + if (!SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { + sctp_timer_start(SCTP_TIMER_TYPE_SEND, + stcb->sctp_ep, stcb, net); + } if (net->window_probe) { + net->window_probe = 0; } } else { if (net->window_probe) { @@ -5579,7 +5611,6 @@ again: * In window probes we must assure a timer * is still running there */ - if (!SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net); @@ -5627,7 +5658,11 @@ again: done_once = 1; goto again; } - /* Fix up the a-p-a-p for future PR-SCTP sends */ + /*********************************************/ + /* Here we perform PR-SCTP procedures */ + /* (section 4.2) */ + /*********************************************/ + /* C1. update advancedPeerAckPoint */ if (compare_with_wrap(cum_ack, asoc->advanced_peer_ack_point, MAX_TSN)) { asoc->advanced_peer_ack_point = cum_ack; } @@ -5739,8 +5774,8 @@ sctp_kick_prsctp_reorder_queue(struct sc * such then tag this TSN nr * chk->rec.data.TSN_seq */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { - + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { @@ -5840,7 +5875,8 @@ sctp_kick_prsctp_reorder_queue(struct sc * such then tag this TSN nr * chk->rec.data.TSN_seq */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { @@ -6325,1743 +6361,3 @@ sctp_handle_forward_tsn(struct sctp_tcb sctp_deliver_reasm_check(stcb, &stcb->asoc); } } - -/* EY fully identical to sctp_express_handle_sack, duplicated for only naming convention */ -void -sctp_express_handle_nr_sack(struct sctp_tcb *stcb, uint32_t cumack, - uint32_t rwnd, int nonce_sum_flag, int *abort_now) -{ - struct sctp_nets *net; - struct sctp_association *asoc; - struct sctp_tmit_chunk *tp1, *tp2; - uint32_t old_rwnd; - int win_probe_recovery = 0; - int win_probe_recovered = 0; - int j, done_once = 0; - - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOG_SACK_ARRIVALS_ENABLE) { - sctp_misc_ints(SCTP_SACK_LOG_EXPRESS, cumack, - rwnd, stcb->asoc.last_acked_seq, stcb->asoc.peers_rwnd); - } - SCTP_TCB_LOCK_ASSERT(stcb); -#ifdef SCTP_ASOCLOG_OF_TSNS - stcb->asoc.cumack_log[stcb->asoc.cumack_log_at] = cumack; - stcb->asoc.cumack_log_at++; - if (stcb->asoc.cumack_log_at > SCTP_TSN_LOG_SIZE) { - stcb->asoc.cumack_log_at = 0; - } -#endif - asoc = &stcb->asoc; - old_rwnd = asoc->peers_rwnd; - if (compare_with_wrap(asoc->last_acked_seq, cumack, MAX_TSN)) { - /* old ack */ - return; - } else if (asoc->last_acked_seq == cumack) { - /* Window update sack */ - asoc->peers_rwnd = sctp_sbspace_sub(rwnd, - (uint32_t) (asoc->total_flight + (asoc->sent_queue_cnt * SCTP_BASE_SYSCTL(sctp_peer_chunk_oh)))); - if (asoc->peers_rwnd < stcb->sctp_ep->sctp_ep.sctp_sws_sender) { - /* SWS sender side engages */ - asoc->peers_rwnd = 0; - } - if (asoc->peers_rwnd > old_rwnd) { - goto again; - } - return; - } - /* First setup for CC stuff */ - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - net->prev_cwnd = net->cwnd; - net->net_ack = 0; - net->net_ack2 = 0; - - /* - * CMT: Reset CUC and Fast recovery algo variables before - * SACK processing - */ - net->new_pseudo_cumack = 0; - net->will_exit_fast_recovery = 0; - } - if (SCTP_BASE_SYSCTL(sctp_strict_sacks)) { - uint32_t send_s; - - if (!TAILQ_EMPTY(&asoc->sent_queue)) { - tp1 = TAILQ_LAST(&asoc->sent_queue, - sctpchunk_listhead); - send_s = tp1->rec.data.TSN_seq + 1; - } else { - send_s = asoc->sending_seq; - } - if ((cumack == send_s) || - compare_with_wrap(cumack, send_s, MAX_TSN)) { -#ifndef INVARIANTS - struct mbuf *oper; - -#endif -#ifdef INVARIANTS - panic("Impossible sack 1"); -#else - *abort_now = 1; - /* XXX */ - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = sizeof(struct sctp_paramhdr) + - sizeof(uint32_t); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_25); - } - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; - sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - return; -#endif - } - } - asoc->this_sack_highest_gap = cumack; - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { - sctp_misc_ints(SCTP_THRESHOLD_CLEAR, - stcb->asoc.overall_error_count, - 0, - SCTP_FROM_SCTP_INDATA, - __LINE__); - } - stcb->asoc.overall_error_count = 0; - if (compare_with_wrap(cumack, asoc->last_acked_seq, MAX_TSN)) { - /* process the new consecutive TSN first */ - tp1 = TAILQ_FIRST(&asoc->sent_queue); - while (tp1) { - tp2 = TAILQ_NEXT(tp1, sctp_next); - if (compare_with_wrap(cumack, tp1->rec.data.TSN_seq, - MAX_TSN) || - cumack == tp1->rec.data.TSN_seq) { - if (tp1->sent == SCTP_DATAGRAM_UNSENT) { - printf("Warning, an unsent is now acked?\n"); - } - /* - * ECN Nonce: Add the nonce to the sender's - * nonce sum - */ - asoc->nonce_sum_expect_base += tp1->rec.data.ect_nonce; - if (tp1->sent < SCTP_DATAGRAM_ACKED) { - /* - * If it is less than ACKED, it is - * now no-longer in flight. Higher - * values may occur during marking - */ - if (tp1->sent < SCTP_DATAGRAM_RESEND) { - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FLIGHT_LOGGING_ENABLE) { - sctp_misc_ints(SCTP_FLIGHT_LOG_DOWN_CA, - tp1->whoTo->flight_size, - tp1->book_size, - (uintptr_t) tp1->whoTo, - tp1->rec.data.TSN_seq); - } - sctp_flight_size_decrease(tp1); - /* sa_ignore NO_NULL_CHK */ - sctp_total_flight_decrease(stcb, tp1); - } - tp1->whoTo->net_ack += tp1->send_size; - if (tp1->snd_count < 2) { - /* - * True non-retransmited - * chunk - */ - tp1->whoTo->net_ack2 += - tp1->send_size; - - /* update RTO too? */ - if (tp1->do_rtt) { - tp1->whoTo->RTO = - /* - * sa_ignore - * NO_NULL_CHK - */ - sctp_calculate_rto(stcb, - asoc, tp1->whoTo, - &tp1->sent_rcv_time, - sctp_align_safe_nocopy); - tp1->do_rtt = 0; - } - } - /* - * CMT: CUCv2 algorithm. From the - * cumack'd TSNs, for each TSN being - * acked for the first time, set the - * following variables for the - * corresp destination. - * new_pseudo_cumack will trigger a - * cwnd update. - * find_(rtx_)pseudo_cumack will - * trigger search for the next - * expected (rtx-)pseudo-cumack. - */ - tp1->whoTo->new_pseudo_cumack = 1; - tp1->whoTo->find_pseudo_cumack = 1; - tp1->whoTo->find_rtx_pseudo_cumack = 1; - - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { - /* sa_ignore NO_NULL_CHK */ - sctp_log_cwnd(stcb, tp1->whoTo, tp1->rec.data.TSN_seq, SCTP_CWND_LOG_FROM_SACK); - } - } - if (tp1->sent == SCTP_DATAGRAM_RESEND) { - sctp_ucount_decr(asoc->sent_queue_retran_cnt); - } - if (tp1->rec.data.chunk_was_revoked) { - /* deflate the cwnd */ - tp1->whoTo->cwnd -= tp1->book_size; - tp1->rec.data.chunk_was_revoked = 0; - } - tp1->sent = SCTP_DATAGRAM_ACKED; - TAILQ_REMOVE(&asoc->sent_queue, tp1, sctp_next); - if (tp1->data) { - /* sa_ignore NO_NULL_CHK */ - sctp_free_bufspace(stcb, asoc, tp1, 1); - sctp_m_freem(tp1->data); - } - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SACK_LOGGING_ENABLE) { - sctp_log_sack(asoc->last_acked_seq, - cumack, - tp1->rec.data.TSN_seq, - 0, - 0, - SCTP_LOG_FREE_SENT); - } - tp1->data = NULL; - asoc->sent_queue_cnt--; - sctp_free_a_chunk(stcb, tp1); - tp1 = tp2; - } else { - break; - } - } - - } - /* sa_ignore NO_NULL_CHK */ - if (stcb->sctp_socket) { -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; - -#endif - - SOCKBUF_LOCK(&stcb->sctp_socket->so_snd); - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) { - /* sa_ignore NO_NULL_CHK */ - sctp_wakeup_log(stcb, cumack, 1, SCTP_WAKESND_FROM_SACK); - } -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(stcb->sctp_ep); - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); - if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { - /* assoc was freed while we were unlocked */ - SCTP_SOCKET_UNLOCK(so, 1); - return; - } -#endif - sctp_sowwakeup_locked(stcb->sctp_ep, stcb->sctp_socket); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif - } else { - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) { - sctp_wakeup_log(stcb, cumack, 1, SCTP_NOWAKE_FROM_SACK); - } - } - - /* JRS - Use the congestion control given in the CC module */ - if (asoc->last_acked_seq != cumack) - asoc->cc_functions.sctp_cwnd_update_after_sack(stcb, asoc, 1, 0, 0); - - asoc->last_acked_seq = cumack; - - if (TAILQ_EMPTY(&asoc->sent_queue)) { - /* nothing left in-flight */ - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - net->flight_size = 0; - net->partial_bytes_acked = 0; - } - asoc->total_flight = 0; - asoc->total_flight_count = 0; - } - /* Fix up the a-p-a-p for future PR-SCTP sends */ - if (compare_with_wrap(cumack, asoc->advanced_peer_ack_point, MAX_TSN)) { - asoc->advanced_peer_ack_point = cumack; - } - /* ECN Nonce updates */ - if (asoc->ecn_nonce_allowed) { - if (asoc->nonce_sum_check) { - if (nonce_sum_flag != ((asoc->nonce_sum_expect_base) & SCTP_SACK_NONCE_SUM)) { - if (asoc->nonce_wait_for_ecne == 0) { - struct sctp_tmit_chunk *lchk; - - lchk = TAILQ_FIRST(&asoc->send_queue); - asoc->nonce_wait_for_ecne = 1; - if (lchk) { - asoc->nonce_wait_tsn = lchk->rec.data.TSN_seq; - } else { - asoc->nonce_wait_tsn = asoc->sending_seq; - } - } else { - if (compare_with_wrap(asoc->last_acked_seq, asoc->nonce_wait_tsn, MAX_TSN) || - (asoc->last_acked_seq == asoc->nonce_wait_tsn)) { - /* - * Misbehaving peer. We need - * to react to this guy - */ - asoc->ecn_allowed = 0; - asoc->ecn_nonce_allowed = 0; - } - } - } - } else { - /* See if Resynchronization Possible */ - if (compare_with_wrap(asoc->last_acked_seq, asoc->nonce_resync_tsn, MAX_TSN)) { - asoc->nonce_sum_check = 1; - /* - * now we must calculate what the base is. - * We do this based on two things, we know - * the total's for all the segments - * gap-acked in the SACK (none), We also - * know the SACK's nonce sum, its in - * nonce_sum_flag. So we can build a truth - * table to back-calculate the new value of - * asoc->nonce_sum_expect_base: - * - * SACK-flag-Value Seg-Sums Base 0 0 0 - * 1 0 1 0 1 1 1 1 0 - */ - asoc->nonce_sum_expect_base = (0 ^ nonce_sum_flag) & SCTP_SACK_NONCE_SUM; - } - } - } - /* RWND update */ - asoc->peers_rwnd = sctp_sbspace_sub(rwnd, - (uint32_t) (asoc->total_flight + (asoc->sent_queue_cnt * SCTP_BASE_SYSCTL(sctp_peer_chunk_oh)))); - if (asoc->peers_rwnd < stcb->sctp_ep->sctp_ep.sctp_sws_sender) { - /* SWS sender side engages */ - asoc->peers_rwnd = 0; - } - if (asoc->peers_rwnd > old_rwnd) { - win_probe_recovery = 1; - } - /* Now assure a timer where data is queued at */ -again: - j = 0; - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - int to_ticks; - - if (win_probe_recovery && (net->window_probe)) { - win_probe_recovered = 1; - /* - * Find first chunk that was used with window probe - * and clear the sent - */ - /* sa_ignore FREED_MEMORY */ - TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) { - if (tp1->window_probe) { - /* move back to data send queue */ - sctp_window_probe_recovery(stcb, asoc, net, tp1); - break; - } - } - } - if (net->RTO == 0) { - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); - } else { - to_ticks = MSEC_TO_TICKS(net->RTO); - } - if (net->flight_size) { - - j++; - (void)SCTP_OS_TIMER_START(&net->rxt_timer.timer, to_ticks, - sctp_timeout_handler, &net->rxt_timer); - if (net->window_probe) { - net->window_probe = 0; - } - } else { - if (net->window_probe) { - /* - * In window probes we must assure a timer - * is still running there - */ - net->window_probe = 0; - (void)SCTP_OS_TIMER_START(&net->rxt_timer.timer, to_ticks, - sctp_timeout_handler, &net->rxt_timer); - } 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); - } - if (SCTP_BASE_SYSCTL(sctp_early_fr)) { - if (SCTP_OS_TIMER_PENDING(&net->fr_timer.timer)) { - SCTP_STAT_INCR(sctps_earlyfrstpidsck4); - sctp_timer_stop(SCTP_TIMER_TYPE_EARLYFR, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_23); - } - } - } - } - if ((j == 0) && - (!TAILQ_EMPTY(&asoc->sent_queue)) && - (asoc->sent_queue_retran_cnt == 0) && - (win_probe_recovered == 0) && - (done_once == 0)) { - /* - * huh, this should not happen unless all packets are - * PR-SCTP and marked to skip of course. - */ - if (sctp_fs_audit(asoc)) { - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - net->flight_size = 0; - } - asoc->total_flight = 0; - asoc->total_flight_count = 0; - asoc->sent_queue_retran_cnt = 0; - TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) { - if (tp1->sent < SCTP_DATAGRAM_RESEND) { - sctp_flight_size_increase(tp1); - sctp_total_flight_increase(stcb, tp1); - } else if (tp1->sent == SCTP_DATAGRAM_RESEND) { - asoc->sent_queue_retran_cnt++; - } - } - } - done_once = 1; - goto again; - } - /**********************************/ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 03:57:17 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15BBA106566C; Sat, 17 Apr 2010 03:57:17 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03EC58FC14; Sat, 17 Apr 2010 03:57:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H3vG09040085; Sat, 17 Apr 2010 03:57:16 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H3vGlg040081; Sat, 17 Apr 2010 03:57:16 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170357.o3H3vGlg040081@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 03:57:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206732 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 03:57:17 -0000 Author: rrs Date: Sat Apr 17 03:57:16 2010 New Revision: 206732 URL: http://svn.freebsd.org/changeset/base/206732 Log: MFC of 202782 Michaels changes that took out [0] -> for [] Modified: stable/8/sys/netinet/sctp_auth.h stable/8/sys/netinet/sctp_header.h stable/8/sys/netinet/sctp_uio.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_auth.h ============================================================================== --- stable/8/sys/netinet/sctp_auth.h Sat Apr 17 03:55:49 2010 (r206731) +++ stable/8/sys/netinet/sctp_auth.h Sat Apr 17 03:57:16 2010 (r206732) @@ -60,7 +60,7 @@ typedef union sctp_hash_context { typedef struct sctp_key { uint32_t keylen; - uint8_t key[0]; + uint8_t key[]; } sctp_key_t; typedef struct sctp_shared_key { @@ -83,7 +83,7 @@ typedef struct sctp_auth_chklist { typedef struct sctp_hmaclist { uint16_t max_algo; /* max algorithms allocated */ uint16_t num_algo; /* num algorithms used */ - uint16_t hmac[0]; + uint16_t hmac[]; } sctp_hmaclist_t; /* authentication info */ Modified: stable/8/sys/netinet/sctp_header.h ============================================================================== --- stable/8/sys/netinet/sctp_header.h Sat Apr 17 03:55:49 2010 (r206731) +++ stable/8/sys/netinet/sctp_header.h Sat Apr 17 03:57:16 2010 (r206732) @@ -138,7 +138,7 @@ struct sctp_asconf_addrv4_param { /* an struct sctp_supported_chunk_types_param { struct sctp_paramhdr ph;/* type = 0x8008 len = x */ - uint8_t chunk_types[0]; + uint8_t chunk_types[]; } SCTP_PACKED; @@ -219,7 +219,7 @@ struct sctp_state_cookie { /* this is ou struct sctp_missing_nat_state { uint16_t cause; uint16_t length; - uint8_t data[0]; + uint8_t data[]; } SCTP_PACKED; @@ -451,7 +451,7 @@ struct sctp_pktdrop_chunk { uint32_t current_onq; uint16_t trunc_len; uint16_t reserved; - uint8_t data[0]; + uint8_t data[]; } SCTP_PACKED; /**********STREAM RESET STUFF ******************/ @@ -461,13 +461,13 @@ struct sctp_stream_reset_out_request { uint32_t request_seq; /* monotonically increasing seq no */ uint32_t response_seq; /* if a response, the resp seq no */ uint32_t send_reset_at_tsn; /* last TSN I assigned outbound */ - uint16_t list_of_streams[0]; /* if not all list of streams */ + uint16_t list_of_streams[]; /* if not all list of streams */ } SCTP_PACKED; struct sctp_stream_reset_in_request { struct sctp_paramhdr ph; uint32_t request_seq; - uint16_t list_of_streams[0]; /* if not all list of streams */ + uint16_t list_of_streams[]; /* if not all list of streams */ } SCTP_PACKED; @@ -545,24 +545,24 @@ struct sctp_stream_reset_resp_tsn { #define SCTP_RANDOM_MAX_SIZE 256 struct sctp_auth_random { struct sctp_paramhdr ph;/* type = 0x8002 */ - uint8_t random_data[0]; + uint8_t random_data[]; } SCTP_PACKED; struct sctp_auth_chunk_list { struct sctp_paramhdr ph;/* type = 0x8003 */ - uint8_t chunk_types[0]; + uint8_t chunk_types[]; } SCTP_PACKED; struct sctp_auth_hmac_algo { struct sctp_paramhdr ph;/* type = 0x8004 */ - uint16_t hmac_ids[0]; + uint16_t hmac_ids[]; } SCTP_PACKED; struct sctp_auth_chunk { struct sctp_chunkhdr ch; uint16_t shared_key_id; uint16_t hmac_id; - uint8_t hmac[0]; + uint8_t hmac[]; } SCTP_PACKED; struct sctp_auth_invalid_hmac { Modified: stable/8/sys/netinet/sctp_uio.h ============================================================================== --- stable/8/sys/netinet/sctp_uio.h Sat Apr 17 03:55:49 2010 (r206731) +++ stable/8/sys/netinet/sctp_uio.h Sat Apr 17 03:57:16 2010 (r206732) @@ -276,7 +276,7 @@ struct sctp_send_failed { uint32_t ssf_error; struct sctp_sndrcvinfo ssf_info; sctp_assoc_t ssf_assoc_id; - uint8_t ssf_data[0]; + uint8_t ssf_data[]; }; /* flag that indicates state of data */ @@ -370,7 +370,7 @@ struct sctp_stream_reset_event { uint16_t strreset_flags; uint32_t strreset_length; sctp_assoc_t strreset_assoc_id; - uint16_t strreset_list[0]; + uint16_t strreset_list[]; }; /* flags in strreset_flags field */ @@ -517,13 +517,13 @@ struct sctp_authchunk { struct sctp_authkey { sctp_assoc_t sca_assoc_id; uint16_t sca_keynumber; - uint8_t sca_key[0]; + uint8_t sca_key[]; }; /* SCTP_HMAC_IDENT */ struct sctp_hmacalgo { uint32_t shmac_number_of_idents; - uint16_t shmac_idents[0]; + uint16_t shmac_idents[]; }; /* AUTH hmac_id */ @@ -544,7 +544,7 @@ struct sctp_authkeyid { /* SCTP_PEER_AUTH_CHUNKS / SCTP_LOCAL_AUTH_CHUNKS */ struct sctp_authchunks { sctp_assoc_t gauth_assoc_id; - uint8_t gauth_chunks[0]; + uint8_t gauth_chunks[]; }; struct sctp_assoc_value { @@ -554,7 +554,7 @@ struct sctp_assoc_value { struct sctp_assoc_ids { uint32_t gaids_number_of_ids; - sctp_assoc_t gaids_assoc_id[0]; + sctp_assoc_t gaids_assoc_id[]; }; struct sctp_sack_info { @@ -603,7 +603,7 @@ struct sctp_stream_reset { sctp_assoc_t strrst_assoc_id; uint16_t strrst_flags; uint16_t strrst_num_streams; /* 0 == ALL */ - uint16_t strrst_list[0];/* list if strrst_num_streams is not 0 */ + uint16_t strrst_list[]; /* list if strrst_num_streams is not 0 */ }; @@ -756,7 +756,7 @@ struct sctp_cwnd_log_req { int32_t num_ret; /* Number returned */ int32_t start_at; /* start at this one */ int32_t end_at; /* end at this one */ - struct sctp_cwnd_log log[0]; + struct sctp_cwnd_log log[]; }; struct sctp_timeval { From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 03:58:56 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5416106564A; Sat, 17 Apr 2010 03:58:56 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 938178FC0C; Sat, 17 Apr 2010 03:58:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H3wufV040490; Sat, 17 Apr 2010 03:58:56 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H3wuld040488; Sat, 17 Apr 2010 03:58:56 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170358.o3H3wuld040488@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 03:58:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206733 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 03:58:56 -0000 Author: rrs Date: Sat Apr 17 03:58:56 2010 New Revision: 206733 URL: http://svn.freebsd.org/changeset/base/206733 Log: MFC of 203503 A fix to how the checksum code works that Michael put in. Modified: stable/8/sys/netinet/sctp_input.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_input.c ============================================================================== --- stable/8/sys/netinet/sctp_input.c Sat Apr 17 03:57:16 2010 (r206732) +++ stable/8/sys/netinet/sctp_input.c Sat Apr 17 03:58:56 2010 (r206733) @@ -5806,6 +5806,7 @@ sctp_input_with_port(struct mbuf *i_pak, } sh->checksum = 0; /* prepare for calc */ calc_check = sctp_calculate_cksum(m, iphlen); + sh->checksum = check; SCTP_STAT_INCR(sctps_recvswcrc); if (calc_check != check) { SCTPDBG(SCTP_DEBUG_INPUT1, "Bad CSUM on SCTP packet calc_check:%x check:%x m:%p mlen:%d iphlen:%d\n", @@ -5831,7 +5832,6 @@ sctp_input_with_port(struct mbuf *i_pak, SCTP_STAT_INCR_COUNTER32(sctps_checksumerrors); goto bad; } - sh->checksum = calc_check; sctp_skip_csum_4: /* destination port of 0 is illegal, based on RFC2960. */ if (sh->dest_port == 0) { From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 04:00:57 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76EF5106564A; Sat, 17 Apr 2010 04:00:57 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64FF18FC08; Sat, 17 Apr 2010 04:00:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H40vNU041024; Sat, 17 Apr 2010 04:00:57 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H40voE041022; Sat, 17 Apr 2010 04:00:57 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170400.o3H40voE041022@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 04:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206734 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 04:00:57 -0000 Author: rrs Date: Sat Apr 17 04:00:57 2010 New Revision: 206734 URL: http://svn.freebsd.org/changeset/base/206734 Log: MFC of 203847 Puts in missing packed declarations (from Michael). It worked only because it was properly aligned anyway ;-) Modified: stable/8/sys/netinet/sctp_header.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_header.h ============================================================================== --- stable/8/sys/netinet/sctp_header.h Sat Apr 17 03:58:56 2010 (r206733) +++ stable/8/sys/netinet/sctp_header.h Sat Apr 17 04:00:57 2010 (r206734) @@ -62,7 +62,7 @@ struct sctp_ipv6addr_param { struct sctp_cookie_perserve_param { struct sctp_paramhdr ph;/* type=SCTP_COOKIE_PRESERVE, len=8 */ uint32_t time; /* time in ms to extend cookie */ -}; +} SCTP_PACKED; #define SCTP_ARRAY_MIN_LEN 1 /* Host Name Address */ @@ -495,7 +495,7 @@ struct sctp_stream_reset_add_strm { uint32_t request_seq; uint16_t number_of_streams; uint16_t reserved; -}; +} SCTP_PACKED; #define SCTP_STREAM_RESET_NOTHING 0x00000000 /* Nothing for me to do */ #define SCTP_STREAM_RESET_PERFORMED 0x00000001 /* Did it */ From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 04:02:27 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A37301065673; Sat, 17 Apr 2010 04:02:27 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91B028FC14; Sat, 17 Apr 2010 04:02:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H42R2E041401; Sat, 17 Apr 2010 04:02:27 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H42RsV041399; Sat, 17 Apr 2010 04:02:27 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170402.o3H42RsV041399@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 04:02:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206735 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 04:02:27 -0000 Author: rrs Date: Sat Apr 17 04:02:27 2010 New Revision: 206735 URL: http://svn.freebsd.org/changeset/base/206735 Log: MFD 204040 Fixes some argument calsl (u_long vs uint32_t). Modified: stable/8/sys/netinet/sctp_indata.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Sat Apr 17 04:00:57 2010 (r206734) +++ stable/8/sys/netinet/sctp_indata.c Sat Apr 17 04:02:27 2010 (r206735) @@ -3479,7 +3479,7 @@ sctp_handle_segments(struct mbuf *m, int static void sctp_check_for_revoked(struct sctp_tcb *stcb, struct sctp_association *asoc, uint32_t cumack, - u_long biggest_tsn_acked) + uint32_t biggest_tsn_acked) { struct sctp_tmit_chunk *tp1; int tot_revoked = 0; @@ -3561,7 +3561,7 @@ sctp_check_for_revoked(struct sctp_tcb * static void sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc, - u_long biggest_tsn_acked, u_long biggest_tsn_newly_acked, u_long this_sack_lowest_newack, int accum_moved) + uint32_t biggest_tsn_acked, uint32_t biggest_tsn_newly_acked, uint32_t this_sack_lowest_newack, int accum_moved) { struct sctp_tmit_chunk *tp1; int strike_flag = 0; @@ -4747,7 +4747,7 @@ again: static void sctp_check_for_nr_revoked(struct sctp_tcb *stcb, struct sctp_association *asoc, uint32_t cumack, - u_long biggest_tsn_acked) + uint32_t biggest_tsn_acked) { struct sctp_tmit_chunk *tp1; From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 04:06:40 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD1751065679; Sat, 17 Apr 2010 04:06:40 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91A918FC2A; Sat, 17 Apr 2010 04:06:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H46e2x042367; Sat, 17 Apr 2010 04:06:40 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H46eDJ042364; Sat, 17 Apr 2010 04:06:40 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170406.o3H46eDJ042364@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 04:06:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206736 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 04:06:40 -0000 Author: rrs Date: Sat Apr 17 04:06:40 2010 New Revision: 206736 URL: http://svn.freebsd.org/changeset/base/206736 Log: MFC of 204096 One of Michaels changes to fix some sign issues and some minor locking. Modified: stable/8/sys/netinet/sctp_usrreq.c stable/8/sys/netinet/sctputil.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/8/sys/netinet/sctp_usrreq.c Sat Apr 17 04:02:27 2010 (r206735) +++ stable/8/sys/netinet/sctp_usrreq.c Sat Apr 17 04:06:40 2010 (r206736) @@ -980,7 +980,9 @@ sctp_shutdown(struct socket *so) /* For UDP model this is a invalid call */ if (inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) { /* Restore the flags that the soshutdown took away. */ + SOCKBUF_LOCK(&so->so_rcv); so->so_rcv.sb_state &= ~SBS_CANTRCVMORE; + SOCKBUF_UNLOCK(&so->so_rcv); /* This proc will wakeup for read and do nothing (I hope) */ SCTP_INP_RUNLOCK(inp); SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EOPNOTSUPP); @@ -4465,6 +4467,15 @@ sctp_connect(struct socket *so, struct s if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) { stcb->sctp_ep->sctp_flags |= SCTP_PCB_FLAGS_CONNECTED; /* Set the connected flag so we can queue data */ + SOCKBUF_LOCK(&so->so_rcv); + so->so_rcv.sb_state &= ~SBS_CANTRCVMORE; + SOCKBUF_UNLOCK(&so->so_rcv); + SOCKBUF_LOCK(&so->so_snd); + so->so_snd.sb_state &= ~SBS_CANTSENDMORE; + SOCKBUF_UNLOCK(&so->so_snd); + SOCK_LOCK(so); + so->so_state &= ~SS_ISDISCONNECTING; + SOCK_UNLOCK(so); soisconnecting(so); } SCTP_SET_STATE(&stcb->asoc, SCTP_STATE_COOKIE_WAIT); Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Sat Apr 17 04:02:27 2010 (r206735) +++ stable/8/sys/netinet/sctputil.c Sat Apr 17 04:06:40 2010 (r206736) @@ -849,7 +849,7 @@ retry: uint32_t sctp_select_a_tag(struct sctp_inpcb *inp, uint16_t lport, uint16_t rport, int save_in_twait) { - u_long x, not_done; + uint32_t x, not_done; struct timeval now; (void)SCTP_GETTIME_TIMEVAL(&now); @@ -2770,8 +2770,6 @@ sctp_pad_lastmbuf(struct mbuf *m, int pa return (EFAULT); } -int sctp_asoc_change_wake = 0; - static void sctp_notify_assoc_change(uint32_t event, struct sctp_tcb *stcb, uint32_t error, void *data, int so_locked @@ -2825,7 +2823,6 @@ sctp_notify_assoc_change(uint32_t event, SCTP_SOCKET_UNLOCK(so, 1); } #endif - sctp_asoc_change_wake++; } if (sctp_is_feature_off(stcb->sctp_ep, SCTP_PCB_FLAGS_RECVASSOCEVNT)) { /* event not enabled */ From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 04:08:52 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55775106566B; Sat, 17 Apr 2010 04:08:52 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 431DC8FC12; Sat, 17 Apr 2010 04:08:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H48qFb042912; Sat, 17 Apr 2010 04:08:52 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H48qUZ042908; Sat, 17 Apr 2010 04:08:52 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170408.o3H48qUZ042908@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 04:08:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206738 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 04:08:52 -0000 Author: rrs Date: Sat Apr 17 04:08:51 2010 New Revision: 206738 URL: http://svn.freebsd.org/changeset/base/206738 Log: MFC of 204141 Cleans up so we can have a vtag reflected argument. One of Michaels fixes ;-) Modified: stable/8/sys/netinet/sctp_input.c stable/8/sys/netinet/sctp_output.c stable/8/sys/netinet/sctp_output.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_input.c ============================================================================== --- stable/8/sys/netinet/sctp_input.c Sat Apr 17 04:07:38 2010 (r206737) +++ stable/8/sys/netinet/sctp_input.c Sat Apr 17 04:08:51 2010 (r206738) @@ -918,7 +918,8 @@ sctp_handle_shutdown(struct sctp_shutdow static void sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp, - struct sctp_tcb *stcb, struct sctp_nets *net) + struct sctp_tcb *stcb, + struct sctp_nets *net) { struct sctp_association *asoc; @@ -934,6 +935,13 @@ sctp_handle_shutdown_ack(struct sctp_shu asoc = &stcb->asoc; /* process according to association state */ + if ((SCTP_GET_STATE(asoc) == SCTP_STATE_COOKIE_WAIT) || + (SCTP_GET_STATE(asoc) == SCTP_STATE_COOKIE_ECHOED)) { + /* unexpected SHUTDOWN-ACK... do OOTB handling... */ + sctp_send_shutdown_complete(stcb, net, 1); + SCTP_TCB_UNLOCK(stcb); + return; + } if ((SCTP_GET_STATE(asoc) != SCTP_STATE_SHUTDOWN_SENT) && (SCTP_GET_STATE(asoc) != SCTP_STATE_SHUTDOWN_ACK_SENT)) { /* unexpected SHUTDOWN-ACK... so ignore... */ @@ -975,7 +983,7 @@ sctp_handle_shutdown_ack(struct sctp_shu /* stop the timer */ sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_9); /* send SHUTDOWN-COMPLETE */ - sctp_send_shutdown_complete(stcb, net); + sctp_send_shutdown_complete(stcb, net, 0); /* notify upper layer protocol */ if (stcb->sctp_socket) { sctp_ulp_notify(SCTP_NOTIFY_ASSOC_DOWN, stcb, 0, NULL, SCTP_SO_NOT_LOCKED); Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sat Apr 17 04:07:38 2010 (r206737) +++ stable/8/sys/netinet/sctp_output.c Sat Apr 17 04:08:51 2010 (r206738) @@ -10622,27 +10622,37 @@ sctp_send_abort_tcb(struct sctp_tcb *stc void sctp_send_shutdown_complete(struct sctp_tcb *stcb, - struct sctp_nets *net) + struct sctp_nets *net, + int reflect_vtag) { /* formulate and SEND a SHUTDOWN-COMPLETE */ struct mbuf *m_shutdown_comp; struct sctp_shutdown_complete_chunk *shutdown_complete; + uint32_t vtag; + uint8_t flags; m_shutdown_comp = sctp_get_mbuf_for_msg(sizeof(struct sctp_chunkhdr), 0, M_DONTWAIT, 1, MT_HEADER); if (m_shutdown_comp == NULL) { /* no mbuf's */ return; } + if (reflect_vtag) { + flags = SCTP_HAD_NO_TCB; + vtag = stcb->asoc.my_vtag; + } else { + flags = 0; + vtag = stcb->asoc.peer_vtag; + } shutdown_complete = mtod(m_shutdown_comp, struct sctp_shutdown_complete_chunk *); shutdown_complete->ch.chunk_type = SCTP_SHUTDOWN_COMPLETE; - shutdown_complete->ch.chunk_flags = 0; + shutdown_complete->ch.chunk_flags = flags; shutdown_complete->ch.chunk_length = htons(sizeof(struct sctp_shutdown_complete_chunk)); SCTP_BUF_LEN(m_shutdown_comp) = sizeof(struct sctp_shutdown_complete_chunk); (void)sctp_lowlevel_chunk_output(stcb->sctp_ep, stcb, net, (struct sockaddr *)&net->ro._l_addr, m_shutdown_comp, 0, NULL, 0, 1, 0, NULL, 0, stcb->sctp_ep->sctp_lport, stcb->rport, - htonl(stcb->asoc.peer_vtag), + htonl(vtag), net->port, SCTP_SO_NOT_LOCKED, NULL); SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks); return; Modified: stable/8/sys/netinet/sctp_output.h ============================================================================== --- stable/8/sys/netinet/sctp_output.h Sat Apr 17 04:07:38 2010 (r206737) +++ stable/8/sys/netinet/sctp_output.h Sat Apr 17 04:08:51 2010 (r206738) @@ -111,7 +111,7 @@ void sctp_send_shutdown(struct sctp_tcb void sctp_send_shutdown_ack(struct sctp_tcb *, struct sctp_nets *); -void sctp_send_shutdown_complete(struct sctp_tcb *, struct sctp_nets *); +void sctp_send_shutdown_complete(struct sctp_tcb *, struct sctp_nets *, int); void sctp_send_shutdown_complete2(struct mbuf *, int, struct sctphdr *, From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 04:10:30 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 160CB106566B; Sat, 17 Apr 2010 04:10:30 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB41C8FC1C; Sat, 17 Apr 2010 04:10:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H4ATAp043324; Sat, 17 Apr 2010 04:10:29 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H4AT8Y043321; Sat, 17 Apr 2010 04:10:29 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170410.o3H4AT8Y043321@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 04:10:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206739 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 04:10:30 -0000 Author: rrs Date: Sat Apr 17 04:10:29 2010 New Revision: 206739 URL: http://svn.freebsd.org/changeset/base/206739 Log: MFC of 205627 Part II (more to follow) of the great IETF hack-a-thon to fix the NR-Sack code. Modified: stable/8/sys/netinet/sctp_indata.c stable/8/sys/netinet/sctp_input.c stable/8/sys/netinet/sctp_output.c stable/8/sys/netinet/sctputil.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Sat Apr 17 04:08:51 2010 (r206738) +++ stable/8/sys/netinet/sctp_indata.c Sat Apr 17 04:10:29 2010 (r206739) @@ -46,24 +46,13 @@ __FBSDID("$FreeBSD$"); #include #define SCTP_CALC_TSN_TO_GAP(gap, tsn, mapping_tsn) do { \ - if ((compare_with_wrap(tsn, mapping_tsn, MAX_TSN)) || \ - (tsn == mapping_tsn)) { \ + if (tsn >= mapping_tsn) { \ gap = tsn - mapping_tsn; \ } else { \ gap = (MAX_TSN - mapping_tsn) + tsn + 1; \ } \ } while(0) -#define SCTP_REVERSE_OUT_TSN_PRES(nr_gap, tsn, asoc) do { \ - if (asoc->mapping_array_base_tsn == asoc->nr_mapping_array_base_tsn) { \ - SCTP_UNSET_TSN_PRESENT(asoc->mapping_array, nr_gap); \ - } else {\ - int lgap; \ - SCTP_CALC_TSN_TO_GAP(lgap, tsn, asoc->mapping_array_base_tsn); \ - SCTP_UNSET_TSN_PRESENT(asoc->mapping_array, lgap); \ - } \ - } while(0) - /* * NOTES: On the outbound side of things I need to check the sack timer to * see if I should generate a sack into the chunk queue (if I have data to @@ -304,6 +293,44 @@ sctp_build_ctl_cchunk(struct sctp_inpcb return (buf); } +static void +sctp_mark_non_revokable(struct sctp_association *asoc, uint32_t tsn) +{ + uint32_t gap, i; + int fnd = 0; + + if (SCTP_BASE_SYSCTL(sctp_do_drain) == 0) { + return; + } + SCTP_CALC_TSN_TO_GAP(gap, tsn, asoc->mapping_array_base_tsn); +#ifdef INVARIANTS + if (!SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap)) { + printf("gap:%x tsn:%x\n", gap, tsn); + sctp_print_mapping_array(asoc); + panic("Things are really messed up now!!"); + } +#endif + SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); + SCTP_UNSET_TSN_PRESENT(asoc->mapping_array, gap); + if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { + asoc->highest_tsn_inside_nr_map = tsn; + } + if (tsn == asoc->highest_tsn_inside_map) { + /* We must back down to see what the new highest is */ + for (i = tsn - 1; compare_with_wrap(i, asoc->mapping_array_base_tsn, MAX_TSN); i--) { + SCTP_CALC_TSN_TO_GAP(gap, i, asoc->mapping_array_base_tsn); + if (SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap)) { + asoc->highest_tsn_inside_map = i; + fnd = 1; + break; + } + } + if (!fnd) { + asoc->highest_tsn_inside_map = asoc->mapping_array_base_tsn - 1; + } + } +} + /* * We are delivering currently from the reassembly queue. We must continue to @@ -319,9 +346,6 @@ sctp_service_reassembly(struct sctp_tcb int end = 0; int cntDel; - /* EY if any out-of-order delivered, then tag it nr on nr_map */ - uint32_t nr_tsn, nr_gap; - struct sctp_queued_to_read *control, *ctl, *ctlat; if (stcb == NULL) @@ -430,39 +454,7 @@ abandon: } /* pull it we did it */ TAILQ_REMOVE(&asoc->reasmqueue, chk, sctp_next); - /* - * EY this is the chunk that should be tagged nr gapped - * calculate the gap and such then tag this TSN nr - * chk->rec.data.TSN_seq - */ - /* - * EY!-TODO- this tsn should be tagged nr only if it is - * out-of-order, the if statement should be modified - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - asoc->peer_supports_nr_sack) { - nr_tsn = chk->rec.data.TSN_seq; - SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); - if ((nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { - /* - * EY The 1st should never happen, as in - * process_a_data_chunk method this check - * should be done - */ - /* - * EY The 2nd should never happen, because - * nr_mapping_array is always expanded when - * mapping_array is expanded - */ - printf("Impossible nr_gap ack range failed\n"); - } else { - SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, nr_gap); - SCTP_REVERSE_OUT_TSN_PRES(nr_gap, nr_tsn, asoc); - if (compare_with_wrap(nr_tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) - asoc->highest_tsn_inside_nr_map = nr_tsn; - } - } + sctp_mark_non_revokable(asoc, chk->rec.data.TSN_seq); if (chk->rec.data.rcv_flags & SCTP_DATA_LAST_FRAG) { asoc->fragmented_delivery_inprogress = 0; if ((chk->rec.data.rcv_flags & SCTP_DATA_UNORDERED) == 0) { @@ -509,67 +501,11 @@ abandon: asoc->size_on_all_streams -= ctl->length; sctp_ucount_decr(asoc->cnt_on_all_streams); strm->last_sequence_delivered++; - /* - * EY will be used to - * calculate nr-gap - */ - nr_tsn = ctl->sinfo_tsn; sctp_add_to_readq(stcb->sctp_ep, stcb, ctl, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - /* - * EY -now something is - * delivered, calculate - * nr_gap and tag this tsn - * NR - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - asoc->peer_supports_nr_sack) { - SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); - if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || - (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { - /* - * EY The - * 1st - * should - * never - * happen, - * as in - * process_a_ - * data_chunk - * method - * this - * check - * should be - * done - */ - /* - * EY The - * 2nd - * should - * never - * happen, - * because - * nr_mapping - * _array is - * always - * expanded - * when - * mapping_ar - * ray is - * expanded - */ - } else { - SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, nr_gap); - SCTP_REVERSE_OUT_TSN_PRES(nr_gap, nr_tsn, asoc); - if (compare_with_wrap(nr_tsn, - asoc->highest_tsn_inside_nr_map, - MAX_TSN)) - asoc->highest_tsn_inside_nr_map = nr_tsn; - } - } + sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); ctl = ctlat; } else { break; @@ -618,9 +554,6 @@ sctp_queue_data_to_stream(struct sctp_tc uint16_t nxt_todel; struct mbuf *oper; - /* EY- will be used to calculate nr-gap for a tsn */ - uint32_t nr_tsn, nr_gap; - queue_needed = 1; asoc->size_on_all_streams += control->length; sctp_ucount_incr(asoc->cnt_on_all_streams); @@ -682,41 +615,12 @@ protocol_error: asoc->size_on_all_streams -= control->length; sctp_ucount_decr(asoc->cnt_on_all_streams); strm->last_sequence_delivered++; - /* EY will be used to calculate nr-gap */ - nr_tsn = control->sinfo_tsn; + sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - /* - * EY this is the chunk that should be tagged nr gapped - * calculate the gap and such then tag this TSN nr - * chk->rec.data.TSN_seq - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - asoc->peer_supports_nr_sack) { - SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); - if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || - (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { - printf("Impossible nr_tsn set 2?\n"); - /* - * EY The 1st should never happen, as in - * process_a_data_chunk method this check - * should be done - */ - /* - * EY The 2nd should never happen, because - * nr_mapping_array is always expanded when - * mapping_array is expanded - */ - } else { - SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, nr_gap); - SCTP_REVERSE_OUT_TSN_PRES(nr_gap, nr_tsn, asoc); - if (compare_with_wrap(nr_tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) - asoc->highest_tsn_inside_nr_map = nr_tsn; - } - } + sctp_mark_non_revokable(asoc, control->sinfo_tsn); control = TAILQ_FIRST(&strm->inqueue); while (control != NULL) { /* all delivered */ @@ -738,47 +642,12 @@ protocol_error: SCTP_STR_LOG_FROM_IMMED_DEL); } /* EY will be used to calculate nr-gap */ - nr_tsn = control->sinfo_tsn; sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - /* - * EY this is the chunk that should be - * tagged nr gapped calculate the gap and - * such then tag this TSN nr - * chk->rec.data.TSN_seq - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - asoc->peer_supports_nr_sack) { - SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); - if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || - (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { - /* - * EY The 1st should never - * happen, as in - * process_a_data_chunk - * method this check should - * be done - */ - /* - * EY The 2nd should never - * happen, because - * nr_mapping_array is - * always expanded when - * mapping_array is expanded - */ - } else { - SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_REVERSE_OUT_TSN_PRES(nr_gap, nr_tsn, asoc); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, nr_gap); - if (compare_with_wrap(nr_tsn, - asoc->highest_tsn_inside_nr_map, - MAX_TSN)) - asoc->highest_tsn_inside_nr_map = nr_tsn; - } - } + sctp_mark_non_revokable(asoc, control->sinfo_tsn); control = at; continue; } @@ -1586,9 +1455,6 @@ sctp_process_a_data_chunk(struct sctp_tc /* struct sctp_tmit_chunk *chk; */ struct sctp_tmit_chunk *chk; uint32_t tsn, gap; - - /* EY - for nr_sack */ - uint32_t nr_gap; struct mbuf *dmbuf; int indx, the_len; int need_reasm_check = 0; @@ -1640,14 +1506,12 @@ sctp_process_a_data_chunk(struct sctp_tc return (0); } } - /* EY - for nr_sack */ - nr_gap = gap; - if (compare_with_wrap(tsn, *high_tsn, MAX_TSN)) { *high_tsn = tsn; } /* See if we have received this one already */ - if (SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap)) { + if (SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap) || + SCTP_IS_TSN_PRESENT(asoc->nr_mapping_array, gap)) { SCTP_STAT_INCR(sctps_recvdupdata); if (asoc->numduptsns < SCTP_MAX_DUP_TSNS) { /* Record a dup for the next outbound sack */ @@ -1714,7 +1578,8 @@ sctp_process_a_data_chunk(struct sctp_tc #endif } /* now is it in the mapping array of what we have accepted? */ - if (compare_with_wrap(tsn, asoc->highest_tsn_inside_map, MAX_TSN)) { + if (compare_with_wrap(tsn, asoc->highest_tsn_inside_map, MAX_TSN) && + compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { /* Nope not in the valid range dump it */ sctp_set_rwnd(stcb, asoc); if ((asoc->cnt_on_all_streams + @@ -1758,23 +1623,10 @@ sctp_process_a_data_chunk(struct sctp_tc } SCTP_STAT_INCR(sctps_badsid); SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->mapping_array, gap); - /* EY set this tsn present in nr_sack's nr_mapping_array */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - asoc->peer_supports_nr_sack) { - SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); - SCTP_REVERSE_OUT_TSN_PRES(gap, tsn, asoc); - } - if (compare_with_wrap(tsn, asoc->highest_tsn_inside_map, MAX_TSN)) { - /* we have a new high score */ - asoc->highest_tsn_inside_map = tsn; - /* EY nr_sack version of the above */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) - asoc->highest_tsn_inside_nr_map = tsn; - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { - sctp_log_map(0, 2, asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_RESULT); - } + + SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); + if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { + asoc->highest_tsn_inside_nr_map = tsn; } if (tsn == (asoc->cumulative_tsn + 1)) { /* Update cum-ack */ @@ -1925,48 +1777,6 @@ sctp_process_a_data_chunk(struct sctp_tc control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - /* - * EY here I should check if this delivered tsn is - * out_of_order, if yes then update the nr_map - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { - /* - * EY check if the mapping_array and nr_mapping - * array are consistent - */ - if (asoc->mapping_array_base_tsn != asoc->nr_mapping_array_base_tsn) - /* - * printf("EY-IN - * sctp_process_a_data_chunk(5): Something - * is wrong the map base tsn" "\nEY-and - * nr_map base tsn should be equal."); - */ - /* EY debugging block */ - { - /* - * printf("\nEY-Calculating an - * nr_gap!!\nmapping_array_size = %d - * nr_mapping_array_size = %d" - * "\nEY-mapping_array_base = %d - * nr_mapping_array_base = - * %d\nEY-highest_tsn_inside_map = %d" - * "highest_tsn_inside_nr_map = %d\nEY-TSN = - * %d nr_gap = %d",asoc->mapping_array_size, - * asoc->nr_mapping_array_size, - * asoc->mapping_array_base_tsn, - * asoc->nr_mapping_array_base_tsn, - * asoc->highest_tsn_inside_map, - * asoc->highest_tsn_inside_nr_map,tsn,nr_gap - * ); - */ - } - /* EY - not %100 sure about the lock thing */ - SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, nr_gap); - SCTP_REVERSE_OUT_TSN_PRES(nr_gap, tsn, asoc); - if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) - asoc->highest_tsn_inside_nr_map = tsn; - } if ((chunk_flags & SCTP_DATA_UNORDERED) == 0) { /* for ordered, bump what we delivered */ asoc->strmin[strmno].last_sequence_delivered++; @@ -1977,6 +1787,10 @@ sctp_process_a_data_chunk(struct sctp_tc SCTP_STR_LOG_FROM_EXPRS_DEL); } control = NULL; + SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); + if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { + asoc->highest_tsn_inside_nr_map = tsn; + } goto finish_express_del; } failed_express_del: @@ -2012,39 +1826,9 @@ failed_express_del: SCTP_PRINTF("Append fails end:%d\n", end); goto failed_pdapi_express_del; } - /* - * EY It is appended to the read queue in prev if - * block here I should check if this delivered tsn - * is out_of_order, if yes then update the nr_map - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - asoc->peer_supports_nr_sack) { - /* EY debugging block */ - { - /* - * printf("\nEY-Calculating an - * nr_gap!!\nEY-mapping_array_size = - * %d nr_mapping_array_size = %d" - * "\nEY-mapping_array_base = %d - * nr_mapping_array_base = - * %d\nEY-highest_tsn_inside_map = - * %d" "highest_tsn_inside_nr_map = - * %d\nEY-TSN = %d nr_gap = - * %d",asoc->mapping_array_size, - * asoc->nr_mapping_array_size, - * asoc->mapping_array_base_tsn, - * asoc->nr_mapping_array_base_tsn, - * asoc->highest_tsn_inside_map, - * asoc->highest_tsn_inside_nr_map,ts - * n,nr_gap); - */ - } - /* EY - not %100 sure about the lock thing */ - SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, nr_gap); - SCTP_REVERSE_OUT_TSN_PRES(nr_gap, tsn, asoc); - if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) - asoc->highest_tsn_inside_nr_map = tsn; + SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); + if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { + asoc->highest_tsn_inside_nr_map = tsn; } SCTP_STAT_INCR(sctps_recvexpressm); control->sinfo_tsn = tsn; @@ -2069,12 +1853,27 @@ failed_express_del: need_reasm_check = 1; } } + SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); + if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { + asoc->highest_tsn_inside_nr_map = tsn; + } control = NULL; goto finish_express_del; } } failed_pdapi_express_del: control = NULL; + if (SCTP_BASE_SYSCTL(sctp_do_drain) == 0) { + SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); + if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { + asoc->highest_tsn_inside_nr_map = tsn; + } + } else { + SCTP_SET_TSN_PRESENT(asoc->mapping_array, gap); + if (compare_with_wrap(tsn, asoc->highest_tsn_inside_map, MAX_TSN)) { + asoc->highest_tsn_inside_map = tsn; + } + } if ((chunk_flags & SCTP_DATA_NOT_FRAG) != SCTP_DATA_NOT_FRAG) { sctp_alloc_a_chunk(stcb, chk); if (chk == NULL) { @@ -2263,56 +2062,7 @@ failed_pdapi_express_del: sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - /* - * EY It is added to the read queue in prev if block - * here I should check if this delivered tsn is - * out_of_order, if yes then update the nr_map - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - asoc->peer_supports_nr_sack) { - /* - * EY check if the mapping_array and - * nr_mapping array are consistent - */ - if (asoc->mapping_array_base_tsn != asoc->nr_mapping_array_base_tsn) - /* - * printf("EY-IN - * sctp_process_a_data_chunk(6): - * Something is wrong the map base - * tsn" "\nEY-and nr_map base tsn - * should be equal."); - */ - /* - * EY - not %100 sure about the lock - * thing, i think we don't need the - * below, - */ - /* SCTP_TCB_LOCK_ASSERT(stcb); */ - { - /* - * printf("\nEY-Calculating an - * nr_gap!!\nEY-mapping_array_size = - * %d nr_mapping_array_size = %d" - * "\nEY-mapping_array_base = %d - * nr_mapping_array_base = - * %d\nEY-highest_tsn_inside_map = - * %d" "highest_tsn_inside_nr_map = - * %d\nEY-TSN = %d nr_gap = - * %d",asoc->mapping_array_size, - * asoc->nr_mapping_array_size, - * asoc->mapping_array_base_tsn, - * asoc->nr_mapping_array_base_tsn, - * asoc->highest_tsn_inside_map, - * asoc->highest_tsn_inside_nr_map,ts - * n,nr_gap); - */ - } - SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, nr_gap); - SCTP_REVERSE_OUT_TSN_PRES(nr_gap, tsn, asoc); - if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) - asoc->highest_tsn_inside_nr_map = tsn; - } + } else { /* * Special check for when streams are resetting. We @@ -2384,13 +2134,6 @@ failed_pdapi_express_del: } } finish_express_del: - if (compare_with_wrap(tsn, asoc->highest_tsn_inside_map, MAX_TSN)) { - /* we have a new high score */ - asoc->highest_tsn_inside_map = tsn; - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { - sctp_log_map(0, 2, asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_RESULT); - } - } if (tsn == (asoc->cumulative_tsn + 1)) { /* Update cum-ack */ asoc->cumulative_tsn = tsn; @@ -2412,22 +2155,6 @@ finish_express_del: sctp_log_map(asoc->mapping_array_base_tsn, asoc->cumulative_tsn, asoc->highest_tsn_inside_map, SCTP_MAP_PREPARE_SLIDE); } - SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->mapping_array, gap); - - /* - * EY - set tsn present in nr-map if doing nr-sacks and the tsn is - * non-renegable - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - asoc->peer_supports_nr_sack && - (SCTP_BASE_SYSCTL(sctp_do_drain) == 0)) { - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); - SCTP_REVERSE_OUT_TSN_PRES(nr_gap, tsn, asoc); - if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { - asoc->highest_tsn_inside_nr_map = tsn; - } - } /* check the special flag for stream resets */ if (((liste = TAILQ_FIRST(&asoc->resetHead)) != NULL) && ((compare_with_wrap(asoc->cumulative_tsn, liste->tsn, MAX_TSN)) || @@ -2532,7 +2259,6 @@ sctp_sack_check(struct sctp_tcb *stcb, i */ struct sctp_association *asoc; int at; - uint8_t comb_byte; int last_all_ones = 0; int slide_from, slide_end, lgap, distance; @@ -2540,7 +2266,7 @@ sctp_sack_check(struct sctp_tcb *stcb, i /* int nr_at; */ /* int nr_last_all_ones = 0; */ /* int nr_slide_from, nr_slide_end, nr_lgap, nr_distance; */ - uint32_t old_cumack, old_base, old_highest; + uint32_t old_cumack, old_base, old_highest, highest_tsn; asoc = &stcb->asoc; at = 0; @@ -2553,30 +2279,23 @@ sctp_sack_check(struct sctp_tcb *stcb, i * offset of the current cum-ack as the starting point. */ at = 0; - for (slide_from = 0; slide_from < stcb->asoc.mapping_array_size; slide_from++) { - /* - * We must combine the renegable and non-renegable arrays - * here to form a unified view of what is acked right now - * (since they are kept separate - */ - comb_byte = asoc->mapping_array[slide_from] | asoc->nr_mapping_array[slide_from]; - if (comb_byte == 0xff) { + for (slide_from = 0; slide_from < stcb->asoc.nr_mapping_array_size; slide_from++) { + if (asoc->nr_mapping_array[slide_from] == 0xff) { at += 8; last_all_ones = 1; } else { /* there is a 0 bit */ - at += sctp_map_lookup_tab[comb_byte]; + at += sctp_map_lookup_tab[asoc->nr_mapping_array[slide_from]]; last_all_ones = 0; break; } } - asoc->cumulative_tsn = asoc->mapping_array_base_tsn + (at - last_all_ones); - /* at is one off, since in the table a embedded -1 is present */ + asoc->cumulative_tsn = asoc->nr_mapping_array_base_tsn + (at - last_all_ones); at++; - if (compare_with_wrap(asoc->cumulative_tsn, - asoc->highest_tsn_inside_map, - MAX_TSN)) { + if (compare_with_wrap(asoc->cumulative_tsn, asoc->highest_tsn_inside_map, MAX_TSN) && + compare_with_wrap(asoc->cumulative_tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN) + ) { #ifdef INVARIANTS panic("huh, cumack 0x%x greater than high-tsn 0x%x in map", asoc->cumulative_tsn, asoc->highest_tsn_inside_map); @@ -2591,37 +2310,29 @@ sctp_sack_check(struct sctp_tcb *stcb, i asoc->highest_tsn_inside_nr_map = asoc->cumulative_tsn; #endif } - if ((asoc->cumulative_tsn == asoc->highest_tsn_inside_map) && (at >= 8)) { + if (compare_with_wrap(asoc->highest_tsn_inside_nr_map, + asoc->highest_tsn_inside_map, + MAX_TSN)) { + highest_tsn = asoc->highest_tsn_inside_nr_map; + } else { + highest_tsn = asoc->highest_tsn_inside_map; + } + if ((asoc->cumulative_tsn == highest_tsn) && (at >= 8)) { /* The complete array was completed by a single FR */ - /* higest becomes the cum-ack */ + /* highest becomes the cum-ack */ int clr; - asoc->cumulative_tsn = asoc->highest_tsn_inside_map; /* clear the array */ clr = (at >> 3) + 1; if (clr > asoc->mapping_array_size) { clr = asoc->mapping_array_size; } memset(asoc->mapping_array, 0, clr); - /* base becomes one ahead of the cum-ack */ - asoc->mapping_array_base_tsn = asoc->cumulative_tsn + 1; - - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { - - if (clr > asoc->nr_mapping_array_size) - clr = asoc->nr_mapping_array_size; + memset(asoc->nr_mapping_array, 0, clr); - memset(asoc->nr_mapping_array, 0, clr); - /* base becomes one ahead of the cum-ack */ - asoc->nr_mapping_array_base_tsn = asoc->cumulative_tsn + 1; - asoc->highest_tsn_inside_nr_map = asoc->cumulative_tsn; - } - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { - sctp_log_map(old_base, old_cumack, old_highest, - SCTP_MAP_PREPARE_SLIDE); - sctp_log_map(asoc->mapping_array_base_tsn, asoc->cumulative_tsn, - asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_CLEARED); - } + asoc->mapping_array_base_tsn = asoc->cumulative_tsn + 1; + asoc->nr_mapping_array_base_tsn = asoc->cumulative_tsn + 1; + asoc->highest_tsn_inside_nr_map = asoc->highest_tsn_inside_map = asoc->cumulative_tsn; } else if (at >= 8) { /* we can slide the mapping array down */ /* slide_from holds where we hit the first NON 0xff byte */ @@ -2630,19 +2341,15 @@ sctp_sack_check(struct sctp_tcb *stcb, i * now calculate the ceiling of the move using our highest * TSN value */ - if (asoc->highest_tsn_inside_map >= asoc->mapping_array_base_tsn) { - lgap = asoc->highest_tsn_inside_map - - asoc->mapping_array_base_tsn; - } else { - lgap = (MAX_TSN - asoc->mapping_array_base_tsn) + - asoc->highest_tsn_inside_map + 1; - } - slide_end = lgap >> 3; + SCTP_CALC_TSN_TO_GAP(lgap, highest_tsn, asoc->mapping_array_base_tsn); + slide_end = (lgap >> 3); if (slide_end < slide_from) { + sctp_print_mapping_array(asoc); #ifdef INVARIANTS panic("impossible slide"); #else - printf("impossible slide?\n"); + printf("impossible slide lgap:%x slide_end:%x slide_from:%x? at:%d\n", + lgap, slide_end, slide_from, at); return; #endif } @@ -2682,30 +2389,21 @@ sctp_sack_check(struct sctp_tcb *stcb, i for (ii = 0; ii < distance; ii++) { asoc->mapping_array[ii] = asoc->mapping_array[slide_from + ii]; + asoc->nr_mapping_array[ii] = + asoc->nr_mapping_array[slide_from + ii]; + } for (ii = distance; ii <= slide_end; ii++) { asoc->mapping_array[ii] = 0; + asoc->nr_mapping_array[ii] = 0; } asoc->mapping_array_base_tsn += (slide_from << 3); + asoc->nr_mapping_array_base_tsn += (slide_from << 3); if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { sctp_log_map(asoc->mapping_array_base_tsn, asoc->cumulative_tsn, asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_RESULT); } - /* - * EY if doing nr_sacks then slide the - * nr_mapping_array accordingly please - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { - for (ii = 0; ii < distance; ii++) { - asoc->nr_mapping_array[ii] = - asoc->nr_mapping_array[slide_from + ii]; - } - for (ii = distance; ii <= slide_end; ii++) { - asoc->nr_mapping_array[ii] = 0; - } - asoc->nr_mapping_array_base_tsn += (slide_from << 3); - } } } /* @@ -2736,8 +2434,7 @@ sctp_sack_check(struct sctp_tcb *stcb, i int is_a_gap; /* is there a gap now ? */ - is_a_gap = compare_with_wrap(stcb->asoc.highest_tsn_inside_map, - stcb->asoc.cumulative_tsn, MAX_TSN); + is_a_gap = compare_with_wrap(highest_tsn, stcb->asoc.cumulative_tsn, MAX_TSN); /* * CMT DAC algorithm: increase number of packets @@ -5742,9 +5439,6 @@ sctp_kick_prsctp_reorder_queue(struct sc struct sctp_association *asoc; int tt; - /* EY -used to calculate nr_gap information */ - uint32_t nr_tsn, nr_gap; - asoc = &stcb->asoc; tt = strmin->last_sequence_delivered; /* @@ -5764,82 +5458,10 @@ sctp_kick_prsctp_reorder_queue(struct sc /* deliver it to at least the delivery-q */ if (stcb->sctp_socket) { /* EY need the tsn info for calculating nr */ - nr_tsn = ctl->sinfo_tsn; sctp_add_to_readq(stcb->sctp_ep, stcb, ctl, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_HELD, SCTP_SO_NOT_LOCKED); - /* - * EY this is the chunk that should be - * tagged nr gapped calculate the gap and - * such then tag this TSN nr - * chk->rec.data.TSN_seq - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - asoc->peer_supports_nr_sack) { - SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); - if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || - (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { - /* - * EY These should never - * happen- explained before - */ - } else { - SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, nr_gap); - SCTP_REVERSE_OUT_TSN_PRES(nr_gap, nr_tsn, asoc); - if (compare_with_wrap(nr_tsn, - asoc->highest_tsn_inside_nr_map, - MAX_TSN)) - asoc->highest_tsn_inside_nr_map = nr_tsn; - } - if (!SCTP_IS_TSN_PRESENT(asoc->mapping_array, nr_gap)) - /* - * printf("In - * sctp_kick_prsctp_reorder_q - * ueue(7): Something wrong, - * the TSN to be tagged" - * "\nas NR is not even in - * the mapping_array, or map - * and nr_map are - * inconsistent"); - */ - /* - * EY - not %100 sure about - * the lock thing, don't - * think its required - */ - /* - * SCTP_TCB_LOCK_ASSERT(stcb) - * ; - */ - { - /* - * printf("\nCalculating an - * nr_gap!!\nmapping_array_si - * ze = %d - * nr_mapping_array_size = - * %d" "\nmapping_array_base - * = %d - * nr_mapping_array_base = - * %d\nhighest_tsn_inside_map - * = %d" - * "highest_tsn_inside_nr_map - * = %d\nTSN = %d nr_gap = - * %d",asoc->mapping_array_si - * ze, - * asoc->nr_mapping_array_siz - * e, - * asoc->mapping_array_base_t - * sn, - * asoc->nr_mapping_array_bas - * e_tsn, - * asoc->highest_tsn_inside_m - * ap, - * asoc->highest_tsn_inside_n - * r_map,tsn,nr_gap); - */ - } - } + sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); } } else { /* no more delivery now. */ @@ -5864,82 +5486,11 @@ sctp_kick_prsctp_reorder_queue(struct sc /* deliver it to at least the delivery-q */ strmin->last_sequence_delivered = ctl->sinfo_ssn; if (stcb->sctp_socket) { - /* EY */ - nr_tsn = ctl->sinfo_tsn; sctp_add_to_readq(stcb->sctp_ep, stcb, ctl, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_HELD, SCTP_SO_NOT_LOCKED); - /* - * EY this is the chunk that should be - * tagged nr gapped calculate the gap and - * such then tag this TSN nr - * chk->rec.data.TSN_seq - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - asoc->peer_supports_nr_sack) { - SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); - if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || - (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { - /* - * EY These should never - * happen, explained before - */ - } else { - SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, nr_gap); - SCTP_REVERSE_OUT_TSN_PRES(nr_gap, nr_tsn, asoc); - if (compare_with_wrap(nr_tsn, asoc->highest_tsn_inside_nr_map, - MAX_TSN)) - asoc->highest_tsn_inside_nr_map = nr_tsn; - } - if (!SCTP_IS_TSN_PRESENT(asoc->mapping_array, nr_gap)) - /* - * printf("In - * sctp_kick_prsctp_reorder_q - * ueue(8): Something wrong, - * the TSN to be tagged" - * "\nas NR is not even in - * the mapping_array, or map - * and nr_map are - * inconsistent"); - */ - /* - * EY - not %100 sure about - * the lock thing, don't - * think its required - */ - /* - * SCTP_TCB_LOCK_ASSERT(stcb) - * ; - */ - { - /* - * printf("\nCalculating an - * nr_gap!!\nmapping_array_si - * ze = %d - * nr_mapping_array_size = - * %d" "\nmapping_array_base - * = %d - * nr_mapping_array_base = - * %d\nhighest_tsn_inside_map - * = %d" - * "highest_tsn_inside_nr_map - * = %d\nTSN = %d nr_gap = - * %d",asoc->mapping_array_si - * ze, - * asoc->nr_mapping_array_siz - * e, - * asoc->mapping_array_base_t - * sn, - * asoc->nr_mapping_array_bas - * e_tsn, - * asoc->highest_tsn_inside_m - * ap, - * asoc->highest_tsn_inside_n - * r_map,tsn,nr_gap); - */ - } - } + sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); + } tt = strmin->last_sequence_delivered + 1; } else { @@ -6096,25 +5647,19 @@ sctp_handle_forward_tsn(struct sctp_tcb if (compare_with_wrap(new_cum_tsn, asoc->highest_tsn_inside_map, MAX_TSN)) { asoc->highest_tsn_inside_map = new_cum_tsn; - /* EY nr_mapping_array version of the above */ - /* - * if(SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - * asoc->peer_supports_nr_sack) - */ + + } + if (compare_with_wrap(new_cum_tsn, asoc->highest_tsn_inside_nr_map, + MAX_TSN)) { asoc->highest_tsn_inside_nr_map = new_cum_tsn; - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { - sctp_log_map(0, 0, asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_RESULT); - } } /* * now we know the new TSN is more advanced, let's find the actual * gap */ - SCTP_CALC_TSN_TO_GAP(gap, new_cum_tsn, asoc->mapping_array_base_tsn); + SCTP_CALC_TSN_TO_GAP(gap, new_cum_tsn, asoc->nr_mapping_array_base_tsn); + asoc->cumulative_tsn = new_cum_tsn; if (gap >= m_size) { - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { - sctp_log_map(0, 0, asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_RESULT); - } if ((long)gap > sctp_sbspace(&stcb->asoc, &stcb->sctp_socket->so_rcv)) { struct mbuf *oper; @@ -6147,23 +5692,15 @@ sctp_handle_forward_tsn(struct sctp_tcb return; } SCTP_STAT_INCR(sctps_fwdtsn_map_over); + memset(stcb->asoc.mapping_array, 0, stcb->asoc.mapping_array_size); - cumack_set_flag = 1; asoc->mapping_array_base_tsn = new_cum_tsn + 1; - asoc->cumulative_tsn = asoc->highest_tsn_inside_map = new_cum_tsn; - /* EY - nr_sack: nr_mapping_array version of the above */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { - memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.nr_mapping_array_size); - asoc->nr_mapping_array_base_tsn = new_cum_tsn + 1; - asoc->highest_tsn_inside_nr_map = new_cum_tsn; - if (asoc->nr_mapping_array_size != asoc->mapping_array_size) { - /* - * printf("IN sctp_handle_forward_tsn: - * Something is wrong the size of" "map and - * nr_map should be equal!") - */ ; - } - } + asoc->highest_tsn_inside_map = new_cum_tsn; + + memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.nr_mapping_array_size); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 04:11:45 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 861621065673; Sat, 17 Apr 2010 04:11:45 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 746398FC16; Sat, 17 Apr 2010 04:11:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H4BjYb043647; Sat, 17 Apr 2010 04:11:45 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H4BjrJ043645; Sat, 17 Apr 2010 04:11:45 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170411.o3H4BjrJ043645@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 04:11:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206740 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 04:11:45 -0000 Author: rrs Date: Sat Apr 17 04:11:45 2010 New Revision: 206740 URL: http://svn.freebsd.org/changeset/base/206740 Log: MFC of 205628 Out goes the nr_mapping_array expand. Modified: stable/8/sys/netinet/sctputil.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctputil.h ============================================================================== --- stable/8/sys/netinet/sctputil.h Sat Apr 17 04:10:29 2010 (r206739) +++ stable/8/sys/netinet/sctputil.h Sat Apr 17 04:11:45 2010 (r206740) @@ -169,8 +169,6 @@ sctp_report_all_outbound(struct sctp_tcb int sctp_expand_mapping_array(struct sctp_association *, uint32_t); -/* EY nr_sack version of the above method, expands nr_mapping_array */ -int sctp_expand_nr_mapping_array(struct sctp_association *, uint32_t); void sctp_abort_notification(struct sctp_tcb *, int, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 04:13:53 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07679106566B; Sat, 17 Apr 2010 04:13:53 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E823E8FC08; Sat, 17 Apr 2010 04:13:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H4DqKf044188; Sat, 17 Apr 2010 04:13:52 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H4DqSw044152; Sat, 17 Apr 2010 04:13:52 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170413.o3H4DqSw044152@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 04:13:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206741 - in stable/8/sys: conf netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 04:13:53 -0000 Author: rrs Date: Sat Apr 17 04:13:52 2010 New Revision: 206741 URL: http://svn.freebsd.org/changeset/base/206741 Log: MFC of 205629 Adds the option of seperating out the sctp stats per processor. This will be refined further and is definetly exploratory (which is why its an option) i.e. making it allocate the actual number of processors is coming ;-D. Modified: stable/8/sys/conf/options stable/8/sys/netinet/sctp_pcb.c stable/8/sys/netinet/sctp_pcb.h stable/8/sys/netinet/sctp_sysctl.c stable/8/sys/netinet/sctp_uio.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/conf/options ============================================================================== --- stable/8/sys/conf/options Sat Apr 17 04:11:45 2010 (r206740) +++ stable/8/sys/conf/options Sat Apr 17 04:13:52 2010 (r206741) @@ -435,6 +435,7 @@ SCTP_MBCNT_LOGGING opt_sctp.h # Log to K SCTP_PACKET_LOGGING opt_sctp.h # Log to a packet buffer last N packets SCTP_LTRACE_CHUNKS opt_sctp.h # Log to KTR chunks processed SCTP_LTRACE_ERRORS opt_sctp.h # Log to KTR error returns. +SCTP_USE_PERCPU_STAT opt_sctp.h # Use per cpu stats. # # # Modified: stable/8/sys/netinet/sctp_pcb.c ============================================================================== --- stable/8/sys/netinet/sctp_pcb.c Sat Apr 17 04:11:45 2010 (r206740) +++ stable/8/sys/netinet/sctp_pcb.c Sat Apr 17 04:13:52 2010 (r206741) @@ -5425,8 +5425,13 @@ sctp_pcb_init() bzero(&SCTP_BASE_SYSCTL(sctp_log), sizeof(struct sctp_log)); #endif (void)SCTP_GETTIME_TIMEVAL(&tv); +#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) + SCTP_BASE_STATS[PCPU_GET(cpuid)].sctps_discontinuitytime.tv_sec = (uint32_t) tv.tv_sec; + SCTP_BASE_STATS[PCPU_GET(cpuid)].sctps_discontinuitytime.tv_usec = (uint32_t) tv.tv_usec; +#else SCTP_BASE_STAT(sctps_discontinuitytime).tv_sec = (uint32_t) tv.tv_sec; SCTP_BASE_STAT(sctps_discontinuitytime).tv_usec = (uint32_t) tv.tv_usec; +#endif /* init the empty list of (All) Endpoints */ LIST_INIT(&SCTP_BASE_INFO(listhead)); Modified: stable/8/sys/netinet/sctp_pcb.h ============================================================================== --- stable/8/sys/netinet/sctp_pcb.h Sat Apr 17 04:11:45 2010 (r206740) +++ stable/8/sys/netinet/sctp_pcb.h Sat Apr 17 04:13:52 2010 (r206741) @@ -246,7 +246,11 @@ struct sctp_base_info { * All static structures that anchor the system must be here. */ struct sctp_epinfo sctppcbinfo; +#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) + struct sctpstat sctpstat[MAXCPU]; +#else struct sctpstat sctpstat; +#endif struct sctp_sysctl sctpsysctl; uint8_t first_time; char sctp_pcb_initialized; Modified: stable/8/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/8/sys/netinet/sctp_sysctl.c Sat Apr 17 04:11:45 2010 (r206740) +++ stable/8/sys/netinet/sctp_sysctl.c Sat Apr 17 04:13:52 2010 (r206741) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include /* * sysctl tunable variables @@ -627,7 +628,158 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) return (error); } +#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) +static int +sysctl_stat_get(SYSCTL_HANDLER_ARGS) +{ + int cpu, error; + struct sctpstat sb, *sarry; + memset(&sb, 0, sizeof(sb)); + for (cpu = 0; cpu < mp_ncpus; cpu++) { + sarry = &SCTP_BASE_STATS[cpu]; + if (sarry->sctps_discontinuitytime.tv_sec > sb.sctps_discontinuitytime.tv_sec) { + sb.sctps_discontinuitytime.tv_sec = sarry->sctps_discontinuitytime.tv_sec; + sb.sctps_discontinuitytime.tv_usec = sarry->sctps_discontinuitytime.tv_usec; + } + sb.sctps_currestab += sarry->sctps_currestab; + sb.sctps_activeestab += sarry->sctps_activeestab; + sb.sctps_restartestab += sarry->sctps_restartestab; + sb.sctps_collisionestab += sarry->sctps_collisionestab; + sb.sctps_passiveestab += sarry->sctps_passiveestab; + sb.sctps_aborted += sarry->sctps_aborted; + sb.sctps_shutdown += sarry->sctps_shutdown; + sb.sctps_outoftheblue += sarry->sctps_outoftheblue; + sb.sctps_checksumerrors += sarry->sctps_checksumerrors; + sb.sctps_outcontrolchunks += sarry->sctps_outcontrolchunks; + sb.sctps_outorderchunks += sarry->sctps_outorderchunks; + sb.sctps_outunorderchunks += sarry->sctps_outunorderchunks; + sb.sctps_incontrolchunks += sarry->sctps_incontrolchunks; + sb.sctps_inorderchunks += sarry->sctps_inorderchunks; + sb.sctps_inunorderchunks += sarry->sctps_inunorderchunks; + sb.sctps_fragusrmsgs += sarry->sctps_fragusrmsgs; + sb.sctps_reasmusrmsgs += sarry->sctps_reasmusrmsgs; + sb.sctps_outpackets += sarry->sctps_outpackets; + sb.sctps_inpackets += sarry->sctps_inpackets; + sb.sctps_recvpackets += sarry->sctps_recvpackets; + sb.sctps_recvdatagrams += sarry->sctps_recvdatagrams; + sb.sctps_recvpktwithdata += sarry->sctps_recvpktwithdata; + sb.sctps_recvsacks += sarry->sctps_recvsacks; + sb.sctps_recvdata += sarry->sctps_recvdata; + sb.sctps_recvdupdata += sarry->sctps_recvdupdata; + sb.sctps_recvheartbeat += sarry->sctps_recvheartbeat; + sb.sctps_recvheartbeatack += sarry->sctps_recvheartbeatack; + sb.sctps_recvecne += sarry->sctps_recvecne; + sb.sctps_recvauth += sarry->sctps_recvauth; + sb.sctps_recvauthmissing += sarry->sctps_recvauthmissing; + sb.sctps_recvivalhmacid += sarry->sctps_recvivalhmacid; + sb.sctps_recvivalkeyid += sarry->sctps_recvivalkeyid; + sb.sctps_recvauthfailed += sarry->sctps_recvauthfailed; + sb.sctps_recvexpress += sarry->sctps_recvexpress; + sb.sctps_recvexpressm += sarry->sctps_recvexpressm; + sb.sctps_recvnocrc += sarry->sctps_recvnocrc; + sb.sctps_recvswcrc += sarry->sctps_recvswcrc; + sb.sctps_recvhwcrc += sarry->sctps_recvhwcrc; + sb.sctps_sendpackets += sarry->sctps_sendpackets; + sb.sctps_sendsacks += sarry->sctps_sendsacks; + sb.sctps_senddata += sarry->sctps_senddata; + sb.sctps_sendretransdata += sarry->sctps_sendretransdata; + sb.sctps_sendfastretrans += sarry->sctps_sendfastretrans; + sb.sctps_sendmultfastretrans += sarry->sctps_sendmultfastretrans; + sb.sctps_sendheartbeat += sarry->sctps_sendheartbeat; + sb.sctps_sendecne += sarry->sctps_sendecne; + sb.sctps_sendauth += sarry->sctps_sendauth; + sb.sctps_senderrors += sarry->sctps_senderrors; + sb.sctps_sendnocrc += sarry->sctps_sendnocrc; + sb.sctps_sendswcrc += sarry->sctps_sendswcrc; + sb.sctps_sendhwcrc += sarry->sctps_sendhwcrc; + sb.sctps_pdrpfmbox += sarry->sctps_pdrpfmbox; + sb.sctps_pdrpfehos += sarry->sctps_pdrpfehos; + sb.sctps_pdrpmbda += sarry->sctps_pdrpmbda; + sb.sctps_pdrpmbct += sarry->sctps_pdrpmbct; + sb.sctps_pdrpbwrpt += sarry->sctps_pdrpbwrpt; + sb.sctps_pdrpcrupt += sarry->sctps_pdrpcrupt; + sb.sctps_pdrpnedat += sarry->sctps_pdrpnedat; + sb.sctps_pdrppdbrk += sarry->sctps_pdrppdbrk; + sb.sctps_pdrptsnnf += sarry->sctps_pdrptsnnf; + sb.sctps_pdrpdnfnd += sarry->sctps_pdrpdnfnd; + sb.sctps_pdrpdiwnp += sarry->sctps_pdrpdiwnp; + sb.sctps_pdrpdizrw += sarry->sctps_pdrpdizrw; + sb.sctps_pdrpbadd += sarry->sctps_pdrpbadd; + sb.sctps_pdrpmark += sarry->sctps_pdrpmark; + sb.sctps_timoiterator += sarry->sctps_timoiterator; + sb.sctps_timodata += sarry->sctps_timodata; + sb.sctps_timowindowprobe += sarry->sctps_timowindowprobe; + sb.sctps_timoinit += sarry->sctps_timoinit; + sb.sctps_timosack += sarry->sctps_timosack; + sb.sctps_timoshutdown += sarry->sctps_timoshutdown; + sb.sctps_timoheartbeat += sarry->sctps_timoheartbeat; + sb.sctps_timocookie += sarry->sctps_timocookie; + sb.sctps_timosecret += sarry->sctps_timosecret; + sb.sctps_timopathmtu += sarry->sctps_timopathmtu; + sb.sctps_timoshutdownack += sarry->sctps_timoshutdownack; + sb.sctps_timoshutdownguard += sarry->sctps_timoshutdownguard; + sb.sctps_timostrmrst += sarry->sctps_timostrmrst; + sb.sctps_timoearlyfr += sarry->sctps_timoearlyfr; + sb.sctps_timoasconf += sarry->sctps_timoasconf; + sb.sctps_timodelprim += sarry->sctps_timodelprim; + sb.sctps_timoautoclose += sarry->sctps_timoautoclose; + sb.sctps_timoassockill += sarry->sctps_timoassockill; + sb.sctps_timoinpkill += sarry->sctps_timoinpkill; + sb.sctps_earlyfrstart += sarry->sctps_earlyfrstart; + sb.sctps_earlyfrstop += sarry->sctps_earlyfrstop; + sb.sctps_earlyfrmrkretrans += sarry->sctps_earlyfrmrkretrans; + sb.sctps_earlyfrstpout += sarry->sctps_earlyfrstpout; + sb.sctps_earlyfrstpidsck1 += sarry->sctps_earlyfrstpidsck1; + sb.sctps_earlyfrstpidsck2 += sarry->sctps_earlyfrstpidsck2; + sb.sctps_earlyfrstpidsck3 += sarry->sctps_earlyfrstpidsck3; + sb.sctps_earlyfrstpidsck4 += sarry->sctps_earlyfrstpidsck4; + sb.sctps_earlyfrstrid += sarry->sctps_earlyfrstrid; + sb.sctps_earlyfrstrout += sarry->sctps_earlyfrstrout; + sb.sctps_earlyfrstrtmr += sarry->sctps_earlyfrstrtmr; + sb.sctps_hdrops += sarry->sctps_hdrops; + sb.sctps_badsum += sarry->sctps_badsum; + sb.sctps_noport += sarry->sctps_noport; + sb.sctps_badvtag += sarry->sctps_badvtag; + sb.sctps_badsid += sarry->sctps_badsid; + sb.sctps_nomem += sarry->sctps_nomem; + sb.sctps_fastretransinrtt += sarry->sctps_fastretransinrtt; + sb.sctps_markedretrans += sarry->sctps_markedretrans; + sb.sctps_naglesent += sarry->sctps_naglesent; + sb.sctps_naglequeued += sarry->sctps_naglequeued; + sb.sctps_maxburstqueued += sarry->sctps_maxburstqueued; + sb.sctps_ifnomemqueued += sarry->sctps_ifnomemqueued; + sb.sctps_windowprobed += sarry->sctps_windowprobed; + sb.sctps_lowlevelerr += sarry->sctps_lowlevelerr; + sb.sctps_lowlevelerrusr += sarry->sctps_lowlevelerrusr; + sb.sctps_datadropchklmt += sarry->sctps_datadropchklmt; + sb.sctps_datadroprwnd += sarry->sctps_datadroprwnd; + sb.sctps_ecnereducedcwnd += sarry->sctps_ecnereducedcwnd; + sb.sctps_vtagexpress += sarry->sctps_vtagexpress; + sb.sctps_vtagbogus += sarry->sctps_vtagbogus; + sb.sctps_primary_randry += sarry->sctps_primary_randry; + sb.sctps_cmt_randry += sarry->sctps_cmt_randry; + sb.sctps_slowpath_sack += sarry->sctps_slowpath_sack; + sb.sctps_wu_sacks_sent += sarry->sctps_wu_sacks_sent; + sb.sctps_sends_with_flags += sarry->sctps_sends_with_flags; + sb.sctps_sends_with_unord += sarry->sctps_sends_with_unord; + sb.sctps_sends_with_eof += sarry->sctps_sends_with_eof; + sb.sctps_sends_with_abort += sarry->sctps_sends_with_abort; + sb.sctps_protocol_drain_calls += sarry->sctps_protocol_drain_calls; + sb.sctps_protocol_drains_done += sarry->sctps_protocol_drains_done; + sb.sctps_read_peeks += sarry->sctps_read_peeks; + sb.sctps_cached_chk += sarry->sctps_cached_chk; + sb.sctps_cached_strmoq += sarry->sctps_cached_strmoq; + sb.sctps_left_abandon += sarry->sctps_left_abandon; + sb.sctps_send_burst_avoid += sarry->sctps_send_burst_avoid; + sb.sctps_send_cwnd_avoid += sarry->sctps_send_cwnd_avoid; + sb.sctps_fwdtsn_map_over += sarry->sctps_fwdtsn_map_over; + } + error = SYSCTL_OUT(req, &sb, sizeof(sb)); + return (error); +} + +#endif #if defined(SCTP_LOCAL_TRACE_BUF) static int @@ -916,10 +1068,16 @@ SYSCTL_PROC(_net_inet_sctp, OID_AUTO, ou &SCTP_BASE_SYSCTL(sctp_output_unlocked), 0, sysctl_sctp_check, "IU", SCTPCTL_OUTPUT_UNLOCKED_DESC); #endif - +#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) +SYSCTL_PROC(_net_inet_sctp, OID_AUTO, stats, + CTLTYPE_STRUCT | CTLFLAG_RD, + 0, 0, sysctl_stat_get, "S,sctpstat", + "SCTP statistics (struct sctp_stat)"); +#else SYSCTL_STRUCT(_net_inet_sctp, OID_AUTO, stats, CTLFLAG_RW, &SCTP_BASE_STATS_SYSCTL, sctpstat, "SCTP statistics (struct sctp_stat)"); +#endif SYSCTL_PROC(_net_inet_sctp, OID_AUTO, assoclist, CTLFLAG_RD, 0, 0, sctp_assoclist, Modified: stable/8/sys/netinet/sctp_uio.h ============================================================================== --- stable/8/sys/netinet/sctp_uio.h Sat Apr 17 04:11:45 2010 (r206740) +++ stable/8/sys/netinet/sctp_uio.h Sat Apr 17 04:13:52 2010 (r206741) @@ -957,9 +957,13 @@ struct sctpstat { #define SCTP_STAT_INCR(_x) SCTP_STAT_INCR_BY(_x,1) #define SCTP_STAT_DECR(_x) SCTP_STAT_DECR_BY(_x,1) +#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) +#define SCTP_STAT_INCR_BY(_x,_d) (SCTP_BASE_STATS[PCPU_GET(cpuid)]._x += _d) +#define SCTP_STAT_DECR_BY(_x,_d) (SCTP_BASE_STATS[PCPU_GET(cpuid)]._x -= _d) +#else #define SCTP_STAT_INCR_BY(_x,_d) atomic_add_int(&SCTP_BASE_STAT(_x), _d) #define SCTP_STAT_DECR_BY(_x,_d) atomic_subtract_int(&SCTP_BASE_STAT(_x), _d) - +#endif /* The following macros are for handling MIB values, */ #define SCTP_STAT_INCR_COUNTER32(_x) SCTP_STAT_INCR(_x) #define SCTP_STAT_INCR_COUNTER64(_x) SCTP_STAT_INCR(_x) From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 04:15:47 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54C3B106564A; Sat, 17 Apr 2010 04:15:47 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 412028FC1A; Sat, 17 Apr 2010 04:15:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H4FldU044713; Sat, 17 Apr 2010 04:15:47 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H4FlR3044705; Sat, 17 Apr 2010 04:15:47 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170415.o3H4FlR3044705@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 04:15:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206742 - in stable/8/sys: netinet netinet6 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 04:15:47 -0000 Author: rrs Date: Sat Apr 17 04:15:46 2010 New Revision: 206742 URL: http://svn.freebsd.org/changeset/base/206742 Log: MFC of 206137 This is Part III of the great IETF hack-a-thon to fix the NR-Sack code. (the last one on the cpu options was a lull.. i.e MFC 205629).. still 2 more to go. Modified: stable/8/sys/netinet/sctp_asconf.c stable/8/sys/netinet/sctp_constants.h stable/8/sys/netinet/sctp_indata.c stable/8/sys/netinet/sctp_indata.h stable/8/sys/netinet/sctp_input.c stable/8/sys/netinet/sctp_output.c stable/8/sys/netinet/sctp_output.h stable/8/sys/netinet/sctp_pcb.c stable/8/sys/netinet/sctp_pcb.h stable/8/sys/netinet/sctp_structs.h stable/8/sys/netinet/sctp_usrreq.c stable/8/sys/netinet/sctp_var.h stable/8/sys/netinet/sctputil.c stable/8/sys/netinet/sctputil.h stable/8/sys/netinet6/sctp6_usrreq.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_asconf.c ============================================================================== --- stable/8/sys/netinet/sctp_asconf.c Sat Apr 17 04:13:52 2010 (r206741) +++ stable/8/sys/netinet/sctp_asconf.c Sat Apr 17 04:15:46 2010 (r206742) @@ -556,9 +556,9 @@ sctp_process_asconf_set_primary(struct m * PRIMARY with DELETE IP ADDRESS of the previous primary * destination, unacknowledged DATA are retransmitted * immediately to the new primary destination for seamless - * handover. If the destination is UNCONFIRMED and marked - * to REQ_PRIM, The retransmission occur when reception of - * the HEARTBEAT-ACK. (See sctp_handle_heartbeat_ack in + * handover. If the destination is UNCONFIRMED and marked to + * REQ_PRIM, The retransmission occur when reception of the + * HEARTBEAT-ACK. (See sctp_handle_heartbeat_ack in * sctp_input.c) Also, when change of the primary * destination, it is better that all subsequent new DATA * containing already queued DATA are transmitted to the new @@ -1166,7 +1166,7 @@ sctp_path_check_and_react(struct sctp_tc /* * If number of local valid addresses is 1, the valid address is - * probably newly added address. Several valid addresses in this + * probably newly added address. Several valid addresses in this * association. A source address may not be changed. Additionally, * they can be configured on a same interface as "alias" addresses. * (by micchie) @@ -1210,7 +1210,7 @@ sctp_path_check_and_react(struct sctp_tc /* * Check if the nexthop is corresponding to the new address. * If the new address is corresponding to the current - * nexthop, the path will be changed. If the new address is + * nexthop, the path will be changed. If the new address is * NOT corresponding to the current nexthop, the path will * not be changed. */ Modified: stable/8/sys/netinet/sctp_constants.h ============================================================================== --- stable/8/sys/netinet/sctp_constants.h Sat Apr 17 04:13:52 2010 (r206741) +++ stable/8/sys/netinet/sctp_constants.h Sat Apr 17 04:15:46 2010 (r206742) @@ -544,13 +544,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_INITIAL_MAPPING_ARRAY 16 /* how much we grow the mapping array each call */ #define SCTP_MAPPING_ARRAY_INCR 32 -/* EY 05/13/08 - nr_sack version of the previous 3 constants */ -/* Maximum the nr mapping array will grow to (TSN mapping array) */ -#define SCTP_NR_MAPPING_ARRAY 512 -/* size of the inital malloc on the nr mapping array */ -#define SCTP_INITIAL_NR_MAPPING_ARRAY 16 -/* how much we grow the nr mapping array each call */ -#define SCTP_NR_MAPPING_ARRAY_INCR 32 + /* * Here we define the timer types used by the implementation as arguments in * the set/get timer type calls. @@ -933,6 +927,13 @@ __FBSDID("$FreeBSD$"); #define SCTP_IS_TSN_PRESENT(arry, gap) ((arry[(gap >> 3)] >> (gap & 0x07)) & 0x01) #define SCTP_SET_TSN_PRESENT(arry, gap) (arry[(gap >> 3)] |= (0x01 << ((gap & 0x07)))) #define SCTP_UNSET_TSN_PRESENT(arry, gap) (arry[(gap >> 3)] &= ((~(0x01 << ((gap & 0x07)))) & 0xff)) +#define SCTP_CALC_TSN_TO_GAP(gap, tsn, mapping_tsn) do { \ + if (tsn >= mapping_tsn) { \ + gap = tsn - mapping_tsn; \ + } else { \ + gap = (MAX_TSN - mapping_tsn) + tsn + 1; \ + } \ + } while(0) #define SCTP_RETRAN_DONE -1 Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Sat Apr 17 04:13:52 2010 (r206741) +++ stable/8/sys/netinet/sctp_indata.c Sat Apr 17 04:15:46 2010 (r206742) @@ -45,13 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define SCTP_CALC_TSN_TO_GAP(gap, tsn, mapping_tsn) do { \ - if (tsn >= mapping_tsn) { \ - gap = tsn - mapping_tsn; \ - } else { \ - gap = (MAX_TSN - mapping_tsn) + tsn + 1; \ - } \ - } while(0) /* * NOTES: On the outbound side of things I need to check the sack timer to @@ -303,13 +296,13 @@ sctp_mark_non_revokable(struct sctp_asso return; } SCTP_CALC_TSN_TO_GAP(gap, tsn, asoc->mapping_array_base_tsn); -#ifdef INVARIANTS if (!SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap)) { printf("gap:%x tsn:%x\n", gap, tsn); sctp_print_mapping_array(asoc); +#ifdef INVARIANTS panic("Things are really messed up now!!"); - } #endif + } SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); SCTP_UNSET_TSN_PRESENT(asoc->mapping_array, gap); if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { @@ -317,7 +310,8 @@ sctp_mark_non_revokable(struct sctp_asso } if (tsn == asoc->highest_tsn_inside_map) { /* We must back down to see what the new highest is */ - for (i = tsn - 1; compare_with_wrap(i, asoc->mapping_array_base_tsn, MAX_TSN); i--) { + for (i = tsn - 1; (compare_with_wrap(i, asoc->mapping_array_base_tsn, MAX_TSN) || + (i == asoc->mapping_array_base_tsn)); i--) { SCTP_CALC_TSN_TO_GAP(gap, i, asoc->mapping_array_base_tsn); if (SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap)) { asoc->highest_tsn_inside_map = i; @@ -411,6 +405,7 @@ abandon: end = 1; else end = 0; + sctp_mark_non_revokable(asoc, chk->rec.data.TSN_seq); sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, end, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); @@ -420,6 +415,7 @@ abandon: end = 1; else end = 0; + sctp_mark_non_revokable(asoc, chk->rec.data.TSN_seq); if (sctp_append_to_readq(stcb->sctp_ep, stcb, stcb->asoc.control_pdapi, chk->data, end, chk->rec.data.TSN_seq, @@ -454,7 +450,6 @@ abandon: } /* pull it we did it */ TAILQ_REMOVE(&asoc->reasmqueue, chk, sctp_next); - sctp_mark_non_revokable(asoc, chk->rec.data.TSN_seq); if (chk->rec.data.rcv_flags & SCTP_DATA_LAST_FRAG) { asoc->fragmented_delivery_inprogress = 0; if ((chk->rec.data.rcv_flags & SCTP_DATA_UNORDERED) == 0) { @@ -501,11 +496,11 @@ abandon: asoc->size_on_all_streams -= ctl->length; sctp_ucount_decr(asoc->cnt_on_all_streams); strm->last_sequence_delivered++; + sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, ctl, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); ctl = ctlat; } else { break; @@ -616,11 +611,11 @@ protocol_error: sctp_ucount_decr(asoc->cnt_on_all_streams); strm->last_sequence_delivered++; + sctp_mark_non_revokable(asoc, control->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - sctp_mark_non_revokable(asoc, control->sinfo_tsn); control = TAILQ_FIRST(&strm->inqueue); while (control != NULL) { /* all delivered */ @@ -641,13 +636,12 @@ protocol_error: sctp_log_strm_del(control, NULL, SCTP_STR_LOG_FROM_IMMED_DEL); } - /* EY will be used to calculate nr-gap */ + sctp_mark_non_revokable(asoc, control->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - sctp_mark_non_revokable(asoc, control->sinfo_tsn); control = at; continue; } @@ -965,8 +959,7 @@ sctp_queue_data_for_reasm(struct sctp_tc *abort_flag = 1; } else if ((asoc->fragment_flags & SCTP_DATA_UNORDERED) != SCTP_DATA_UNORDERED && - chk->rec.data.stream_seq != - asoc->ssn_of_pdapi) { + chk->rec.data.stream_seq != asoc->ssn_of_pdapi) { /* Got to be the right STR Seq */ SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, it IS not same stream seq %d vs %d\n", chk->rec.data.stream_seq, @@ -1623,7 +1616,6 @@ sctp_process_a_data_chunk(struct sctp_tc } SCTP_STAT_INCR(sctps_badsid); SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { asoc->highest_tsn_inside_nr_map = tsn; @@ -1787,6 +1779,7 @@ sctp_process_a_data_chunk(struct sctp_tc SCTP_STR_LOG_FROM_EXPRS_DEL); } control = NULL; + SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { asoc->highest_tsn_inside_nr_map = tsn; @@ -1853,10 +1846,6 @@ failed_express_del: need_reasm_check = 1; } } - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); - if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { - asoc->highest_tsn_inside_nr_map = tsn; - } control = NULL; goto finish_express_del; } @@ -2059,10 +2048,10 @@ failed_pdapi_express_del: /* ok, if we reach here we have passed the sanity checks */ if (chunk_flags & SCTP_DATA_UNORDERED) { /* queue directly into socket buffer */ + sctp_mark_non_revokable(asoc, control->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - } else { /* * Special check for when streams are resetting. We @@ -2134,10 +2123,6 @@ failed_pdapi_express_del: } } finish_express_del: - if (tsn == (asoc->cumulative_tsn + 1)) { - /* Update cum-ack */ - asoc->cumulative_tsn = tsn; - } if (last_chunk) { *m = NULL; } @@ -2215,43 +2200,43 @@ finish_express_del: } int8_t sctp_map_lookup_tab[256] = { - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 4, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 5, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 4, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 6, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 4, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 5, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 4, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 7, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 5, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 6, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 5, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 7, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 5, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 6, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 5, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 8 }; void -sctp_sack_check(struct sctp_tcb *stcb, int ok_to_sack, int was_a_gap, int *abort_flag) +sctp_slide_mapping_arrays(struct sctp_tcb *stcb) { /* * Now we also need to check the mapping array in a couple of ways. @@ -2259,7 +2244,6 @@ sctp_sack_check(struct sctp_tcb *stcb, i */ struct sctp_association *asoc; int at; - int last_all_ones = 0; int slide_from, slide_end, lgap, distance; /* EY nr_mapping array variables */ @@ -2279,19 +2263,16 @@ sctp_sack_check(struct sctp_tcb *stcb, i * offset of the current cum-ack as the starting point. */ at = 0; - for (slide_from = 0; slide_from < stcb->asoc.nr_mapping_array_size; slide_from++) { + for (slide_from = 0; slide_from < stcb->asoc.mapping_array_size; slide_from++) { if (asoc->nr_mapping_array[slide_from] == 0xff) { at += 8; - last_all_ones = 1; } else { /* there is a 0 bit */ at += sctp_map_lookup_tab[asoc->nr_mapping_array[slide_from]]; - last_all_ones = 0; break; } } - asoc->cumulative_tsn = asoc->nr_mapping_array_base_tsn + (at - last_all_ones); - at++; + asoc->cumulative_tsn = asoc->mapping_array_base_tsn + (at - 1); if (compare_with_wrap(asoc->cumulative_tsn, asoc->highest_tsn_inside_map, MAX_TSN) && compare_with_wrap(asoc->cumulative_tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN) @@ -2320,18 +2301,22 @@ sctp_sack_check(struct sctp_tcb *stcb, i if ((asoc->cumulative_tsn == highest_tsn) && (at >= 8)) { /* The complete array was completed by a single FR */ /* highest becomes the cum-ack */ - int clr; + int clr, i; /* clear the array */ - clr = (at >> 3) + 1; + clr = ((at + 7) >> 3); if (clr > asoc->mapping_array_size) { clr = asoc->mapping_array_size; } memset(asoc->mapping_array, 0, clr); memset(asoc->nr_mapping_array, 0, clr); - + for (i = 0; i < asoc->mapping_array_size; i++) { + if ((asoc->mapping_array[i]) || (asoc->nr_mapping_array[i])) { + printf("Error Mapping array's not clean at clear\n"); + sctp_print_mapping_array(asoc); + } + } asoc->mapping_array_base_tsn = asoc->cumulative_tsn + 1; - asoc->nr_mapping_array_base_tsn = asoc->cumulative_tsn + 1; asoc->highest_tsn_inside_nr_map = asoc->highest_tsn_inside_map = asoc->cumulative_tsn; } else if (at >= 8) { /* we can slide the mapping array down */ @@ -2393,12 +2378,11 @@ sctp_sack_check(struct sctp_tcb *stcb, i asoc->nr_mapping_array[slide_from + ii]; } - for (ii = distance; ii <= slide_end; ii++) { + for (ii = distance; ii <= asoc->mapping_array_size; ii++) { asoc->mapping_array[ii] = 0; asoc->nr_mapping_array[ii] = 0; } asoc->mapping_array_base_tsn += (slide_from << 3); - asoc->nr_mapping_array_base_tsn += (slide_from << 3); if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { sctp_log_map(asoc->mapping_array_base_tsn, asoc->cumulative_tsn, asoc->highest_tsn_inside_map, @@ -2406,95 +2390,95 @@ sctp_sack_check(struct sctp_tcb *stcb, i } } } +} + + +void +sctp_sack_check(struct sctp_tcb *stcb, int was_a_gap, int *abort_flag) +{ + struct sctp_association *asoc; + uint32_t highest_tsn; + + asoc = &stcb->asoc; + if (compare_with_wrap(asoc->highest_tsn_inside_nr_map, + asoc->highest_tsn_inside_map, + MAX_TSN)) { + highest_tsn = asoc->highest_tsn_inside_nr_map; + } else { + highest_tsn = asoc->highest_tsn_inside_map; + } + /* * Now we need to see if we need to queue a sack or just start the * timer (if allowed). */ - if (ok_to_sack) { - if (SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_SENT) { - /* - * Ok special case, in SHUTDOWN-SENT case. here we - * maker sure SACK timer is off and instead send a - * SHUTDOWN and a SACK - */ - 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); - } - sctp_send_shutdown(stcb, stcb->asoc.primary_destination); - /* - * EY if nr_sacks used then send an nr-sack , a sack - * otherwise - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && stcb->asoc.peer_supports_nr_sack) - sctp_send_nr_sack(stcb); - else - sctp_send_sack(stcb); - } else { - int is_a_gap; + if (SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_SENT) { + /* + * Ok special case, in SHUTDOWN-SENT case. here we maker + * sure SACK timer is off and instead send a SHUTDOWN and a + * SACK + */ + 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); + } + sctp_send_shutdown(stcb, stcb->asoc.primary_destination); + sctp_send_sack(stcb); + } else { + int is_a_gap; - /* is there a gap now ? */ - is_a_gap = compare_with_wrap(highest_tsn, stcb->asoc.cumulative_tsn, MAX_TSN); + /* is there a gap now ? */ + is_a_gap = compare_with_wrap(highest_tsn, stcb->asoc.cumulative_tsn, MAX_TSN); - /* - * CMT DAC algorithm: increase number of packets - * received since last ack - */ - stcb->asoc.cmt_dac_pkts_rcvd++; + /* + * CMT DAC algorithm: increase number of packets received + * since last ack + */ + stcb->asoc.cmt_dac_pkts_rcvd++; - if ((stcb->asoc.send_sack == 1) || /* We need to send a - * SACK */ - ((was_a_gap) && (is_a_gap == 0)) || /* was a gap, but no - * longer is one */ - (stcb->asoc.numduptsns) || /* we have dup's */ - (is_a_gap) || /* is still a gap */ - (stcb->asoc.delayed_ack == 0) || /* Delayed sack disabled */ - (stcb->asoc.data_pkts_seen >= stcb->asoc.sack_freq) /* hit limit of pkts */ - ) { + if ((stcb->asoc.send_sack == 1) || /* We need to send a + * SACK */ + ((was_a_gap) && (is_a_gap == 0)) || /* was a gap, but no + * longer is one */ + (stcb->asoc.numduptsns) || /* we have dup's */ + (is_a_gap) || /* is still a gap */ + (stcb->asoc.delayed_ack == 0) || /* Delayed sack disabled */ + (stcb->asoc.data_pkts_seen >= stcb->asoc.sack_freq) /* hit limit of pkts */ + ) { - if ((SCTP_BASE_SYSCTL(sctp_cmt_on_off)) && - (SCTP_BASE_SYSCTL(sctp_cmt_use_dac)) && - (stcb->asoc.send_sack == 0) && - (stcb->asoc.numduptsns == 0) && - (stcb->asoc.delayed_ack) && - (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer))) { + if ((SCTP_BASE_SYSCTL(sctp_cmt_on_off)) && + (SCTP_BASE_SYSCTL(sctp_cmt_use_dac)) && + (stcb->asoc.send_sack == 0) && + (stcb->asoc.numduptsns == 0) && + (stcb->asoc.delayed_ack) && + (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer))) { - /* - * CMT DAC algorithm: With CMT, - * delay acks even in the face of - * - * reordering. Therefore, if acks that - * do not have to be sent because of - * the above reasons, will be - * delayed. That is, acks that would - * have been sent due to gap reports - * will be delayed with DAC. Start - * the delayed ack timer. - */ - sctp_timer_start(SCTP_TIMER_TYPE_RECV, - stcb->sctp_ep, stcb, NULL); - } else { - /* - * Ok we must build a SACK since the - * timer is pending, we got our - * first packet OR there are gaps or - * duplicates. - */ - (void)SCTP_OS_TIMER_STOP(&stcb->asoc.dack_timer.timer); - /* - * EY if nr_sacks used then send an - * nr-sack , a sack otherwise - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && stcb->asoc.peer_supports_nr_sack) - sctp_send_nr_sack(stcb); - else - sctp_send_sack(stcb); - } + /* + * CMT DAC algorithm: With CMT, delay acks + * even in the face of + * + * reordering. Therefore, if acks that do not + * have to be sent because of the above + * reasons, will be delayed. That is, acks + * that would have been sent due to gap + * reports will be delayed with DAC. Start + * the delayed ack timer. + */ + sctp_timer_start(SCTP_TIMER_TYPE_RECV, + stcb->sctp_ep, stcb, NULL); } else { - if (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { - sctp_timer_start(SCTP_TIMER_TYPE_RECV, - stcb->sctp_ep, stcb, NULL); - } + /* + * Ok we must build a SACK since the timer + * is pending, we got our first packet OR + * there are gaps or duplicates. + */ + (void)SCTP_OS_TIMER_STOP(&stcb->asoc.dack_timer.timer); + sctp_send_sack(stcb); + } + } else { + if (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { + sctp_timer_start(SCTP_TIMER_TYPE_RECV, + stcb->sctp_ep, stcb, NULL); } } } @@ -2834,14 +2818,7 @@ sctp_process_data(struct mbuf **mm, int if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { (void)SCTP_OS_TIMER_STOP(&stcb->asoc.dack_timer.timer); } - /* - * EY if nr_sacks used then send an nr-sack , a sack - * otherwise - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && stcb->asoc.peer_supports_nr_sack) - sctp_send_nr_sack(stcb); - else - sctp_send_sack(stcb); + sctp_send_sack(stcb); } else { if (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { sctp_timer_start(SCTP_TIMER_TYPE_RECV, @@ -2849,7 +2826,7 @@ sctp_process_data(struct mbuf **mm, int } } } else { - sctp_sack_check(stcb, 1, was_a_gap, &abort_flag); + sctp_sack_check(stcb, was_a_gap, &abort_flag); } if (abort_flag) return (2); @@ -2867,7 +2844,7 @@ sctp_process_segment_range(struct sctp_t { struct sctp_tmit_chunk *tp1; unsigned int theTSN; - int j, wake_him = 0; + int j, wake_him = 0, circled = 0; /* Recover the tp1 we last saw */ tp1 = *p_tp1; @@ -3045,12 +3022,6 @@ sctp_process_segment_range(struct sctp_t } /* NR Sack code here */ if (nr_sacking) { - if (tp1->sent != SCTP_FORWARD_TSN_SKIP) - tp1->sent = SCTP_DATAGRAM_NR_MARKED; - /* - * TAILQ_REMOVE(&asoc->sent_q - * ueue, tp1, sctp_next); - */ if (tp1->data) { /* * sa_ignore @@ -3058,13 +3029,8 @@ sctp_process_segment_range(struct sctp_t */ sctp_free_bufspace(stcb, &stcb->asoc, tp1, 1); sctp_m_freem(tp1->data); + tp1->data = NULL; } - tp1->data = NULL; - /* asoc->sent_queue_cnt--; */ - /* - * sctp_free_a_chunk(stcb, - * tp1); - */ wake_him++; } } @@ -3075,11 +3041,16 @@ sctp_process_segment_range(struct sctp_t break; tp1 = TAILQ_NEXT(tp1, sctp_next); + if ((tp1 == NULL) && (circled == 0)) { + circled++; + tp1 = TAILQ_FIRST(&stcb->asoc.sent_queue); + } } /* end while (tp1) */ - /* In case the fragments were not in order we must reset */ if (tp1 == NULL) { + circled = 0; tp1 = TAILQ_FIRST(&stcb->asoc.sent_queue); } + /* In case the fragments were not in order we must reset */ } /* end for (j = fragStart */ *p_tp1 = tp1; return (wake_him); /* Return value only used for nr-sack */ @@ -3158,6 +3129,9 @@ sctp_handle_segments(struct mbuf *m, int } else { non_revocable = 1; } + if (i == num_seg) { + tp1 = NULL; + } if (sctp_process_segment_range(stcb, &tp1, last_tsn, frag_strt, frag_end, non_revocable, &num_frs, biggest_newly_acked_tsn, this_sack_lowest_newack, ecn_seg_sums)) { @@ -3961,6 +3935,7 @@ sctp_express_handle_sack(struct sctp_tcb #ifdef INVARIANTS panic("Impossible sack 1"); #else + *abort_now = 1; /* XXX */ oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)), @@ -4439,50 +4414,6 @@ again: } } -/* EY- nr_sack */ -/* Identifies the non-renegable tsns that are revoked*/ -static void -sctp_check_for_nr_revoked(struct sctp_tcb *stcb, - struct sctp_association *asoc, uint32_t cumack, - uint32_t biggest_tsn_acked) -{ - struct sctp_tmit_chunk *tp1; - - for (tp1 = TAILQ_FIRST(&asoc->sent_queue); tp1; tp1 = TAILQ_NEXT(tp1, sctp_next)) { - if (compare_with_wrap(tp1->rec.data.TSN_seq, cumack, - MAX_TSN)) { - /* - * ok this guy is either ACK or MARKED. If it is - * ACKED it has been previously acked but not this - * time i.e. revoked. If it is MARKED it was ACK'ed - * again. - */ - if (compare_with_wrap(tp1->rec.data.TSN_seq, biggest_tsn_acked, - MAX_TSN)) - break; - - - if (tp1->sent == SCTP_DATAGRAM_NR_ACKED) { - /* - * EY! a non-renegable TSN is revoked, need - * to abort the association - */ - /* - * EY TODO: put in the code to abort the - * assoc. - */ - return; - } else if (tp1->sent == SCTP_DATAGRAM_NR_MARKED) { - /* it has been re-acked in this SACK */ - tp1->sent = SCTP_DATAGRAM_NR_ACKED; - } - } - if (tp1->sent == SCTP_DATAGRAM_UNSENT) - break; - } - return; -} - void sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup, struct sctp_tcb *stcb, struct sctp_nets *net_from, @@ -4588,22 +4519,23 @@ sctp_handle_sack(struct mbuf *m, int off sctpchunk_listhead); send_s = tp1->rec.data.TSN_seq + 1; } else { + tp1 = NULL; send_s = asoc->sending_seq; } if (cum_ack == send_s || compare_with_wrap(cum_ack, send_s, MAX_TSN)) { -#ifndef INVARIANTS struct mbuf *oper; -#endif -#ifdef INVARIANTS - hopeless_peer: - panic("Impossible sack 1"); -#else /* * no way, we have not even sent this TSN out yet. * Peer is hopelessly messed up with us. */ + printf("NEW cum_ack:%x send_s:%x is smaller or equal\n", + cum_ack, send_s); + if (tp1) { + printf("Got send_s from tsn:%x + 1 of tp1:%p\n", + tp1->rec.data.TSN_seq, tp1); + } hopeless_peer: *abort_now = 1; /* XXX */ @@ -4624,7 +4556,6 @@ sctp_handle_sack(struct mbuf *m, int off stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); return; -#endif } } /**********************/ @@ -4844,6 +4775,10 @@ sctp_handle_sack(struct mbuf *m, int off * peer is either confused or we are under * attack. We must abort. */ + printf("Hopeless peer! biggest_tsn_acked:%x largest seq:%x\n", + biggest_tsn_acked, + send_s); + goto hopeless_peer; } } @@ -4991,15 +4926,9 @@ done_with_it: */ if ((tp1->sent == SCTP_DATAGRAM_NR_ACKED) || (tp1->sent == SCTP_DATAGRAM_NR_MARKED)) { - /* - * EY! - TODO: Something previously - * nr_gapped is reneged, abort the - * association - */ - return; + continue; } - if ((tp1->sent > SCTP_DATAGRAM_RESEND) && - (tp1->sent < SCTP_FORWARD_TSN_SKIP)) { + if (tp1->sent == SCTP_DATAGRAM_ACKED) { tp1->sent = SCTP_DATAGRAM_SENT; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FLIGHT_LOGGING_ENABLE) { sctp_misc_ints(SCTP_FLIGHT_LOG_UP_REVOKE, @@ -5028,15 +4957,11 @@ done_with_it: } asoc->saw_sack_with_frags = 0; } - if (num_seg) + if (num_seg || num_nr_seg) asoc->saw_sack_with_frags = 1; else asoc->saw_sack_with_frags = 0; - /* EY! - not sure about if there should be an IF */ - if (num_nr_seg > 0) - sctp_check_for_nr_revoked(stcb, asoc, cum_ack, biggest_tsn_acked); - /* JRS - Use the congestion control given in the CC module */ asoc->cc_functions.sctp_cwnd_update_after_sack(stcb, asoc, accum_moved, reneged_all, will_exit_fast_recovery); @@ -5457,11 +5382,10 @@ sctp_kick_prsctp_reorder_queue(struct sc sctp_ucount_decr(asoc->cnt_on_all_streams); /* deliver it to at least the delivery-q */ if (stcb->sctp_socket) { - /* EY need the tsn info for calculating nr */ + sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, ctl, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_HELD, SCTP_SO_NOT_LOCKED); - sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); } } else { /* no more delivery now. */ @@ -5486,10 +5410,10 @@ sctp_kick_prsctp_reorder_queue(struct sc /* deliver it to at least the delivery-q */ strmin->last_sequence_delivered = ctl->sinfo_ssn; if (stcb->sctp_socket) { + sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, ctl, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_HELD, SCTP_SO_NOT_LOCKED); - sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); } tt = strmin->last_sequence_delivered + 1; @@ -5593,7 +5517,8 @@ sctp_flush_reassm_for_str_seq(struct sct void sctp_handle_forward_tsn(struct sctp_tcb *stcb, - struct sctp_forward_tsn_chunk *fwd, int *abort_flag, struct mbuf *m, int offset) + struct sctp_forward_tsn_chunk *fwd, + int *abort_flag, struct mbuf *m, int offset) { /* * ISSUES that MUST be fixed for ECN! When we are the sender of the @@ -5619,8 +5544,8 @@ sctp_handle_forward_tsn(struct sctp_tcb * report where we are. */ struct sctp_association *asoc; - uint32_t new_cum_tsn, gap; - unsigned int i, fwd_sz, cumack_set_flag, m_size; + uint32_t new_cum_tsn, tsn, gap; + unsigned int i, fwd_sz, cumack_set_flag, m_size, fnd = 0; uint32_t str_seq; struct sctp_stream_in *strm; struct sctp_tmit_chunk *chk, *at; @@ -5657,7 +5582,7 @@ sctp_handle_forward_tsn(struct sctp_tcb * now we know the new TSN is more advanced, let's find the actual * gap */ - SCTP_CALC_TSN_TO_GAP(gap, new_cum_tsn, asoc->nr_mapping_array_base_tsn); + SCTP_CALC_TSN_TO_GAP(gap, new_cum_tsn, asoc->mapping_array_base_tsn); asoc->cumulative_tsn = new_cum_tsn; if (gap >= m_size) { if ((long)gap > sctp_sbspace(&stcb->asoc, &stcb->sctp_socket->so_rcv)) { @@ -5697,8 +5622,7 @@ sctp_handle_forward_tsn(struct sctp_tcb asoc->mapping_array_base_tsn = new_cum_tsn + 1; asoc->highest_tsn_inside_map = new_cum_tsn; - memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.nr_mapping_array_size); - asoc->nr_mapping_array_base_tsn = new_cum_tsn + 1; + memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.mapping_array_size); asoc->highest_tsn_inside_nr_map = new_cum_tsn; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { @@ -5710,14 +5634,32 @@ sctp_handle_forward_tsn(struct sctp_tcb for (i = 0; i <= gap; i++) { SCTP_UNSET_TSN_PRESENT(asoc->mapping_array, i); SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, i); + /* FIX ME add something to set up highest TSN in map */ + } + if (compare_with_wrap(new_cum_tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { + asoc->highest_tsn_inside_nr_map = new_cum_tsn; + } + if (compare_with_wrap(new_cum_tsn, asoc->highest_tsn_inside_map, MAX_TSN) || + new_cum_tsn == asoc->highest_tsn_inside_map) { + /* We must back down to see what the new highest is */ + for (tsn = new_cum_tsn; (compare_with_wrap(tsn, asoc->mapping_array_base_tsn, MAX_TSN) || + (tsn == asoc->mapping_array_base_tsn)); tsn--) { + SCTP_CALC_TSN_TO_GAP(gap, tsn, asoc->mapping_array_base_tsn); + if (SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap)) { + asoc->highest_tsn_inside_map = tsn; + fnd = 1; + break; + } + } + if (!fnd) { + asoc->highest_tsn_inside_map = asoc->mapping_array_base_tsn - 1; + } } /* * Now after marking all, slide thing forward but no sack * please. */ - sctp_sack_check(stcb, 0, 0, abort_flag); - if (*abort_flag) - return; + sctp_slide_mapping_arrays(stcb); } /*************************************************************/ /* 2. Clear up re-assembly queue */ Modified: stable/8/sys/netinet/sctp_indata.h ============================================================================== --- stable/8/sys/netinet/sctp_indata.h Sat Apr 17 04:13:52 2010 (r206741) +++ stable/8/sys/netinet/sctp_indata.h Sat Apr 17 04:15:46 2010 (r206742) @@ -121,7 +121,9 @@ sctp_process_data(struct mbuf **, int, i struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *, uint32_t *); -void sctp_sack_check(struct sctp_tcb *, int, int, int *); +void sctp_slide_mapping_arrays(struct sctp_tcb *stcb); + +void sctp_sack_check(struct sctp_tcb *, int, int *); #endif #endif Modified: stable/8/sys/netinet/sctp_input.c ============================================================================== --- stable/8/sys/netinet/sctp_input.c Sat Apr 17 04:13:52 2010 (r206741) +++ stable/8/sys/netinet/sctp_input.c Sat Apr 17 04:15:46 2010 (r206742) @@ -343,11 +343,6 @@ sctp_process_init(struct sctp_init_chunk asoc->str_reset_seq_in = asoc->asconf_seq_in + 1; asoc->mapping_array_base_tsn = ntohl(init->initial_tsn); - /* - * EY 05/13/08 - nr_sack: initialize nr_mapping array's base tsn - * like above - */ - asoc->nr_mapping_array_base_tsn = ntohl(init->initial_tsn); asoc->tsn_last_delivered = asoc->cumulative_tsn = asoc->asconf_seq_in; asoc->last_echo_tsn = asoc->asconf_seq_in; asoc->advanced_peer_ack_point = asoc->last_acked_seq; @@ -1862,7 +1857,7 @@ sctp_process_cookie_existing(struct mbuf } if (asoc->nr_mapping_array) { memset(asoc->nr_mapping_array, 0, - asoc->nr_mapping_array_size); + asoc->mapping_array_size); } SCTP_TCB_UNLOCK(stcb); SCTP_INP_INFO_WLOCK(); @@ -2027,7 +2022,7 @@ sctp_process_cookie_new(struct mbuf *m, * socket is unbound and we must do an implicit bind. Since we are * getting a cookie, we cannot be unbound. */ - stcb = sctp_aloc_assoc(inp, init_src, 0, &error, + stcb = sctp_aloc_assoc(inp, init_src, &error, ntohl(initack_cp->init.initiate_tag), vrf_id, (struct thread *)NULL ); @@ -3236,13 +3231,10 @@ process_chunk_drop(struct sctp_tcb *stcb } break; case SCTP_SELECTIVE_ACK: + case SCTP_NR_SELECTIVE_ACK: /* resend the sack */ sctp_send_sack(stcb); break; - /* EY for nr_sacks */ - case SCTP_NR_SELECTIVE_ACK: - sctp_send_nr_sack(stcb); /* EY resend the nr-sack */ - break; case SCTP_HEARTBEAT_REQUEST: /* resend a demand HB */ if ((stcb->asoc.overall_error_count + 3) < stcb->asoc.max_send_times) { @@ -3514,8 +3506,7 @@ sctp_handle_stream_reset_response(struct memset(stcb->asoc.mapping_array, 0, stcb->asoc.mapping_array_size); stcb->asoc.highest_tsn_inside_nr_map = stcb->asoc.highest_tsn_inside_map; - stcb->asoc.nr_mapping_array_base_tsn = stcb->asoc.mapping_array_base_tsn; - memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.nr_mapping_array_size); + memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.mapping_array_size); stcb->asoc.sending_seq = ntohl(resp->receivers_next_tsn); stcb->asoc.last_acked_seq = stcb->asoc.cumulative_tsn; @@ -3624,8 +3615,7 @@ sctp_handle_str_reset_request_tsn(struct stcb->asoc.mapping_array_base_tsn = stcb->asoc.highest_tsn_inside_map + 1; memset(stcb->asoc.mapping_array, 0, stcb->asoc.mapping_array_size); stcb->asoc.highest_tsn_inside_nr_map = stcb->asoc.highest_tsn_inside_map; - stcb->asoc.nr_mapping_array_base_tsn = stcb->asoc.highest_tsn_inside_map + 1; - memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.nr_mapping_array_size); + memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.mapping_array_size); atomic_add_int(&stcb->asoc.sending_seq, 1); /* save off historical data for retrans */ stcb->asoc.last_sending_seq[1] = stcb->asoc.last_sending_seq[0]; @@ -5636,7 +5626,7 @@ sctp_common_input_processing(struct mbuf was_a_gap = 1; } stcb->asoc.send_sack = 1; - sctp_sack_check(stcb, 1, was_a_gap, &abort_flag); + sctp_sack_check(stcb, was_a_gap, &abort_flag); if (abort_flag) { /* Again, we aborted so NO UNLOCK needed */ goto out_now; Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sat Apr 17 04:13:52 2010 (r206741) +++ stable/8/sys/netinet/sctp_output.c Sat Apr 17 04:15:46 2010 (r206742) @@ -9003,6 +9003,11 @@ sctp_chunk_retransmission(struct sctp_in /* No, not sent to this net or not ready for rtx */ continue; } + if (chk->data == NULL) { + printf("TSN:%x chk->snd_count:%d chk->sent:%d can't retran - no data\n", + chk->rec.data.TSN_seq, chk->snd_count, chk->sent); + continue; + } if ((SCTP_BASE_SYSCTL(sctp_max_retran_chunk)) && (chk->snd_count >= SCTP_BASE_SYSCTL(sctp_max_retran_chunk))) { /* Gak, we have exceeded max unlucky retran, abort! */ @@ -9426,14 +9431,7 @@ sctp_chunk_output(struct sctp_inpcb *inp * running, if so piggy-back the sack. */ if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { - /* - * EY if nr_sacks used then send an nr-sack , a sack - * otherwise - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 04:17:17 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98850106566C; Sat, 17 Apr 2010 04:17:17 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85E638FC1F; Sat, 17 Apr 2010 04:17:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H4HH45045091; Sat, 17 Apr 2010 04:17:17 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H4HHV0045089; Sat, 17 Apr 2010 04:17:17 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170417.o3H4HHV0045089@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 04:17:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206743 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 04:17:17 -0000 Author: rrs Date: Sat Apr 17 04:17:17 2010 New Revision: 206743 URL: http://svn.freebsd.org/changeset/base/206743 Log: MFC of 206151 Modified: stable/8/sys/netinet/sctp_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sat Apr 17 04:15:46 2010 (r206742) +++ stable/8/sys/netinet/sctp_output.c Sat Apr 17 04:17:17 2010 (r206743) @@ -3709,7 +3709,7 @@ sctp_lowlevel_chunk_output(struct sctp_i (stcb) && (stcb->asoc.loopback_scope))) { m->m_pkthdr.csum_flags = CSUM_SCTP; - m->m_pkthdr.csum_data = 0; /* FIXME MT */ + m->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); } else { SCTP_STAT_INCR(sctps_sendnocrc); @@ -4021,7 +4021,7 @@ sctp_lowlevel_chunk_output(struct sctp_i (stcb) && (stcb->asoc.loopback_scope))) { m->m_pkthdr.csum_flags = CSUM_SCTP; - m->m_pkthdr.csum_data = 0; /* FIXME MT */ + m->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); } else { SCTP_STAT_INCR(sctps_sendnocrc); @@ -10542,7 +10542,7 @@ sctp_send_shutdown_complete2(struct mbuf SCTP_ENABLE_UDP_CSUM(mout); } else { mout->m_pkthdr.csum_flags = CSUM_SCTP; - mout->m_pkthdr.csum_data = 0; /* FIXME MT */ + mout->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); } SCTP_ATTACH_CHAIN(o_pak, mout, mlen); @@ -10566,14 +10566,29 @@ sctp_send_shutdown_complete2(struct mbuf if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) sctp_packet_log(mout, mlen); #endif - comp_cp->sh.checksum = sctp_calculate_cksum(mout, offset_out); - SCTP_STAT_INCR(sctps_sendswcrc); SCTP_ATTACH_CHAIN(o_pak, mout, mlen); if (port) { - if ((udp->uh_sum = in6_cksum(o_pak, IPPROTO_UDP, sizeof(struct ip6_hdr), - sizeof(struct sctp_shutdown_complete_msg) + sizeof(struct udphdr))) == 0) { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + comp_cp->sh.checksum = sctp_calculate_cksum(mout, sizeof(struct ip6_hdr) + sizeof(struct udphdr)); + SCTP_STAT_INCR(sctps_sendswcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } + if ((udp->uh_sum = in6_cksum(o_pak, IPPROTO_UDP, sizeof(struct ip6_hdr), mlen - sizeof(struct ip6_hdr))) == 0) { udp->uh_sum = 0xffff; } + } else { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + mout->m_pkthdr.csum_flags = CSUM_SCTP; + mout->m_pkthdr.csum_data = 0; + SCTP_STAT_INCR(sctps_sendhwcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } } SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id); @@ -11593,7 +11608,7 @@ sctp_send_abort(struct mbuf *m, int iphl SCTP_ENABLE_UDP_CSUM(o_pak); } else { mout->m_pkthdr.csum_flags = CSUM_SCTP; - mout->m_pkthdr.csum_data = 0; /* FIXME MT */ + mout->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); } SCTP_IP_OUTPUT(ret, o_pak, &ro, stcb, vrf_id); @@ -11621,13 +11636,29 @@ sctp_send_abort(struct mbuf *m, int iphl if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) sctp_packet_log(mout, len); #endif - abm->sh.checksum = sctp_calculate_cksum(mout, iphlen_out); - SCTP_STAT_INCR(sctps_sendswcrc); SCTP_ATTACH_CHAIN(o_pak, mout, len); if (port) { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + abm->sh.checksum = sctp_calculate_cksum(mout, sizeof(struct ip6_hdr) + sizeof(struct udphdr)); + SCTP_STAT_INCR(sctps_sendswcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } if ((udp->uh_sum = in6_cksum(o_pak, IPPROTO_UDP, sizeof(struct ip6_hdr), len - sizeof(struct ip6_hdr))) == 0) { udp->uh_sum = 0xffff; } + } else { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + mout->m_pkthdr.csum_flags = CSUM_SCTP; + mout->m_pkthdr.csum_data = 0; + SCTP_STAT_INCR(sctps_sendhwcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } } SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id); @@ -11815,7 +11846,7 @@ sctp_send_operr_to(struct mbuf *m, int i SCTP_ENABLE_UDP_CSUM(o_pak); } else { mout->m_pkthdr.csum_flags = CSUM_SCTP; - mout->m_pkthdr.csum_data = 0; /* FIXME MT */ + mout->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); } SCTP_IP_OUTPUT(ret, o_pak, &ro, stcb, vrf_id); @@ -11841,13 +11872,29 @@ sctp_send_operr_to(struct mbuf *m, int i if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) sctp_packet_log(mout, len); #endif - sh_out->checksum = sctp_calculate_cksum(mout, iphlen_out); - SCTP_STAT_INCR(sctps_sendswcrc); SCTP_ATTACH_CHAIN(o_pak, mout, len); if (port) { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + sh_out->checksum = sctp_calculate_cksum(mout, sizeof(struct ip6_hdr) + sizeof(struct udphdr)); + SCTP_STAT_INCR(sctps_sendswcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } if ((udp->uh_sum = in6_cksum(o_pak, IPPROTO_UDP, sizeof(struct ip6_hdr), len - sizeof(struct ip6_hdr))) == 0) { udp->uh_sum = 0xffff; } + } else { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + mout->m_pkthdr.csum_flags = CSUM_SCTP; + mout->m_pkthdr.csum_data = 0; + SCTP_STAT_INCR(sctps_sendhwcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } } SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id); From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 04:19:18 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E95141065670; Sat, 17 Apr 2010 04:19:18 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D717A8FC22; Sat, 17 Apr 2010 04:19:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H4JI8P045592; Sat, 17 Apr 2010 04:19:18 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H4JI69045589; Sat, 17 Apr 2010 04:19:18 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170419.o3H4JI69045589@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 04:19:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206744 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 04:19:19 -0000 Author: rrs Date: Sat Apr 17 04:19:18 2010 New Revision: 206744 URL: http://svn.freebsd.org/changeset/base/206744 Log: MFC of 206281 Final MFC of all the IETF hack a-thon.. head and stable are now in sync ;-) Modified: stable/8/sys/netinet/sctp_indata.c stable/8/sys/netinet/sctputil.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Sat Apr 17 04:17:17 2010 (r206743) +++ stable/8/sys/netinet/sctp_indata.c Sat Apr 17 04:19:18 2010 (r206744) @@ -2275,8 +2275,7 @@ sctp_slide_mapping_arrays(struct sctp_tc asoc->cumulative_tsn = asoc->mapping_array_base_tsn + (at - 1); if (compare_with_wrap(asoc->cumulative_tsn, asoc->highest_tsn_inside_map, MAX_TSN) && - compare_with_wrap(asoc->cumulative_tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN) - ) { + compare_with_wrap(asoc->cumulative_tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { #ifdef INVARIANTS panic("huh, cumack 0x%x greater than high-tsn 0x%x in map", asoc->cumulative_tsn, asoc->highest_tsn_inside_map); @@ -2378,7 +2377,7 @@ sctp_slide_mapping_arrays(struct sctp_tc asoc->nr_mapping_array[slide_from + ii]; } - for (ii = distance; ii <= asoc->mapping_array_size; ii++) { + for (ii = distance; ii < asoc->mapping_array_size; ii++) { asoc->mapping_array[ii] = 0; asoc->nr_mapping_array[ii] = 0; } Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Sat Apr 17 04:17:17 2010 (r206743) +++ stable/8/sys/netinet/sctputil.c Sat Apr 17 04:19:18 2010 (r206744) @@ -1187,50 +1187,38 @@ sctp_init_asoc(struct sctp_inpcb *m, str void sctp_print_mapping_array(struct sctp_association *asoc) { - int i, limit; + unsigned int i, limit; - printf("Mapping size:%d baseTSN:%8.8x cumAck:%8.8x highestTSN:%8.8x\n", + printf("Mapping array size: %d, baseTSN: %8.8x, cumAck: %8.8x, highestTSN: (%8.8x, %8.8x).\n", asoc->mapping_array_size, asoc->mapping_array_base_tsn, asoc->cumulative_tsn, - asoc->highest_tsn_inside_map - ); - limit = asoc->mapping_array_size; - for (i = asoc->mapping_array_size; i >= 0; i--) { - if (asoc->mapping_array[i]) { - limit = i; + asoc->highest_tsn_inside_map, + asoc->highest_tsn_inside_nr_map); + for (limit = asoc->mapping_array_size; limit > 1; limit--) { + if (asoc->mapping_array[limit - 1]) { break; } } - if (limit == 0) - limit = 1; + printf("Renegable mapping array (last %d entries are zero):\n", asoc->mapping_array_size - limit); for (i = 0; i < limit; i++) { - printf("%2.2x ", asoc->mapping_array[i]); + printf("%2.2x%c", asoc->mapping_array[i], ((i + 1) % 16) ? ' ' : '\n'); if (((i + 1) % 16) == 0) printf("\n"); } - printf("\n"); - printf("NR Mapping size:%d baseTSN:%8.8x highestTSN:%8.8x\n", - asoc->mapping_array_size, - asoc->mapping_array_base_tsn, - asoc->highest_tsn_inside_nr_map - ); - limit = asoc->mapping_array_size; - for (i = asoc->mapping_array_size; i >= 0; i--) { - if (asoc->nr_mapping_array[i]) { - limit = i; + if (limit % 16) + printf("\n"); + for (limit = asoc->mapping_array_size; limit > 1; limit--) { + if (asoc->nr_mapping_array[limit - 1]) { break; } } - if (limit == 0) - limit = 1; - + printf("Non renegable mapping array (last %d entries are zero):\n", asoc->mapping_array_size - limit); for (i = 0; i < limit; i++) { - printf("%2.2x ", asoc->nr_mapping_array[i]); - if (((i + 1) % 16) == 0) - printf("\n"); + printf("%2.2x%c", asoc->mapping_array[i], ((i + 1) % 16) ? ' ' : '\n'); } - printf("\n"); + if (limit % 16) + printf("\n"); } int @@ -1240,9 +1228,7 @@ sctp_expand_mapping_array(struct sctp_as uint8_t *new_array1, *new_array2; uint32_t new_size; - new_size = asoc->mapping_array_size + ((needed + 7) / 8 + SCTP_MAPPING_ARRAY_INCR); - SCTP_MALLOC(new_array1, uint8_t *, new_size, SCTP_M_MAP); SCTP_MALLOC(new_array2, uint8_t *, new_size, SCTP_M_MAP); if ((new_array1 == NULL) || (new_array2 == NULL)) { From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 04:54:39 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EB6D106566B; Sat, 17 Apr 2010 04:54:39 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 032728FC21; Sat, 17 Apr 2010 04:54:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H4scud053365; Sat, 17 Apr 2010 04:54:38 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H4scAn053363; Sat, 17 Apr 2010 04:54:38 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201004170454.o3H4scAn053363@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sat, 17 Apr 2010 04:54:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206745 - stable/8/share/man/man5 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 04:54:39 -0000 Author: ume Date: Sat Apr 17 04:54:38 2010 New Revision: 206745 URL: http://svn.freebsd.org/changeset/base/206745 Log: MFC r206557: Nuke the descriptions about ipv6_firewall_* as they were unified into firewall_*. Modified: stable/8/share/man/man5/rc.conf.5 Directory Properties: stable/8/share/man/man5/ (props changed) Modified: stable/8/share/man/man5/rc.conf.5 ============================================================================== --- stable/8/share/man/man5/rc.conf.5 Sat Apr 17 04:19:18 2010 (r206744) +++ stable/8/share/man/man5/rc.conf.5 Sat Apr 17 04:54:38 2010 (r206745) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 11, 2009 +.Dd April 14, 2010 .Dt RC.CONF 5 .Os .Sh NAME @@ -432,27 +432,11 @@ the kernel module will be loaded. See also .Va ipfilter_enable . -.It Va ipv6_firewall_enable -.Pq Vt bool -The IPv6 equivalent of -.Va firewall_enable . -Set to -.Dq Li YES -to load IPv6 firewall rules at startup. -If the kernel was not built with -.Cd "options IPV6FIREWALL" , -the -.Pa ipfw.ko -kernel module will be loaded. .It Va firewall_script .Pq Vt str This variable specifies the full path to the firewall script to run. The default is .Pa /etc/rc.firewall . -.It Va ipv6_firewall_script -.Pq Vt str -The IPv6 equivalent of -.Va firewall_script . .It Va firewall_type .Pq Vt str Names the firewall type from the selection in @@ -476,19 +460,11 @@ basic protection for a LAN. .Pp If a filename is specified, the full path must be given. -.It Va ipv6_firewall_type -.Pq Vt str -The IPv6 equivalent of -.Va firewall_type . .It Va firewall_quiet .Pq Vt bool Set to .Dq Li YES to disable the display of firewall rules on the console during boot. -.It Va ipv6_firewall_quiet -.Pq Vt bool -The IPv6 equivalent of -.Va firewall_quiet . .It Va firewall_logging .Pq Vt bool Set to @@ -497,10 +473,6 @@ to enable firewall event logging. This is equivalent to the .Dv IPFIREWALL_VERBOSE kernel option. -.It Va ipv6_firewall_logging -.Pq Vt bool -The IPv6 equivalent of -.Va firewall_logging . .It Va firewall_flags .Pq Vt str Flags passed to @@ -508,10 +480,6 @@ Flags passed to if .Va firewall_type specifies a filename. -.It Va ipv6_firewall_flags -.Pq Vt str -The IPv6 equivalent of -.Va firewall_flags . .It Va firewall_coscripts .Pq Vt str List of executables and/or rc scripts to run after firewall starts/stops. From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 09:37:08 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 968E0106564A; Sat, 17 Apr 2010 09:37:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85BE88FC15; Sat, 17 Apr 2010 09:37:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H9b8eN016078; Sat, 17 Apr 2010 09:37:08 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H9b8X6016076; Sat, 17 Apr 2010 09:37:08 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004170937.o3H9b8X6016076@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 Apr 2010 09:37:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206748 - stable/8/sys/amd64/amd64 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 09:37:08 -0000 Author: kib Date: Sat Apr 17 09:37:08 2010 New Revision: 206748 URL: http://svn.freebsd.org/changeset/base/206748 Log: MFC r206623: ld_gs_base is executing with stack containing only the frame, temporary pushed %rflags has been popped already. Modified: stable/8/sys/amd64/amd64/exception.S Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/amd64/exception.S ============================================================================== --- stable/8/sys/amd64/amd64/exception.S Sat Apr 17 07:38:20 2010 (r206747) +++ stable/8/sys/amd64/amd64/exception.S Sat Apr 17 09:37:08 2010 (r206748) @@ -815,7 +815,6 @@ fsbase_load_fault: ALIGN_TEXT .globl gsbase_load_fault gsbase_load_fault: - popfq movl $T_PROTFLT,TF_TRAPNO(%rsp) movq %rsp, %rdi call trap From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 11:06:43 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15C04106566C; Sat, 17 Apr 2010 11:06:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0530E8FC1B; Sat, 17 Apr 2010 11:06:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3HB6gHC037590; Sat, 17 Apr 2010 11:06:42 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HB6gOi037588; Sat, 17 Apr 2010 11:06:42 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004171106.o3HB6gOi037588@svn.freebsd.org> From: Andriy Gapon Date: Sat, 17 Apr 2010 11:06:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206751 - stable/8/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 11:06:43 -0000 Author: avg Date: Sat Apr 17 11:06:42 2010 New Revision: 206751 URL: http://svn.freebsd.org/changeset/base/206751 Log: MFC r205860,206097: correctly set b_offset for getblk(devvp) Modified: stable/8/sys/kern/vfs_bio.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/vfs_bio.c ============================================================================== --- stable/8/sys/kern/vfs_bio.c Sat Apr 17 09:50:13 2010 (r206750) +++ stable/8/sys/kern/vfs_bio.c Sat Apr 17 11:06:42 2010 (r206751) @@ -2678,7 +2678,7 @@ loop: */ if (flags & GB_NOCREAT) return NULL; - bsize = bo->bo_bsize; + bsize = vn_isdisk(vp, NULL) ? DEV_BSIZE : bo->bo_bsize; offset = blkno * bsize; vmio = vp->v_object != NULL; maxsize = vmio ? size + (offset & PAGE_MASK) : size; From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 11:12:20 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 907E31065672; Sat, 17 Apr 2010 11:12:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F9A78FC1F; Sat, 17 Apr 2010 11:12:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3HBCKph038886; Sat, 17 Apr 2010 11:12:20 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HBCKSX038884; Sat, 17 Apr 2010 11:12:20 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004171112.o3HBCKSX038884@svn.freebsd.org> From: Andriy Gapon Date: Sat, 17 Apr 2010 11:12:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206752 - stable/7/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 11:12:20 -0000 Author: avg Date: Sat Apr 17 11:12:20 2010 New Revision: 206752 URL: http://svn.freebsd.org/changeset/base/206752 Log: MFC r205860,206097: correctly set b_offset for getblk(devvp) Modified: stable/7/sys/kern/vfs_bio.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/vfs_bio.c ============================================================================== --- stable/7/sys/kern/vfs_bio.c Sat Apr 17 11:06:42 2010 (r206751) +++ stable/7/sys/kern/vfs_bio.c Sat Apr 17 11:12:20 2010 (r206752) @@ -2698,7 +2698,7 @@ loop: */ if (flags & GB_NOCREAT) return NULL; - bsize = bo->bo_bsize; + bsize = vn_isdisk(vp, NULL) ? DEV_BSIZE : bo->bo_bsize; offset = blkno * bsize; vmio = vp->v_object != NULL; maxsize = vmio ? size + (offset & PAGE_MASK) : size; From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 11:25:30 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A36EA106566B; Sat, 17 Apr 2010 11:25:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 928E48FC12; Sat, 17 Apr 2010 11:25:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3HBPUrS041791; Sat, 17 Apr 2010 11:25:30 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HBPUMO041789; Sat, 17 Apr 2010 11:25:30 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004171125.o3HBPUMO041789@svn.freebsd.org> From: Andriy Gapon Date: Sat, 17 Apr 2010 11:25:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206753 - stable/8/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 11:25:30 -0000 Author: avg Date: Sat Apr 17 11:25:30 2010 New Revision: 206753 URL: http://svn.freebsd.org/changeset/base/206753 Log: MFC r206129: vn_stat: use va_blocksize when setting st_blksize Modified: stable/8/sys/kern/vfs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/vfs_vnops.c ============================================================================== --- stable/8/sys/kern/vfs_vnops.c Sat Apr 17 11:12:20 2010 (r206752) +++ stable/8/sys/kern/vfs_vnops.c Sat Apr 17 11:25:30 2010 (r206753) @@ -788,11 +788,10 @@ vn_stat(vp, sb, active_cred, file_cred, * "a filesystem-specific preferred I/O block size for this * object. In some filesystem types, this may vary from file * to file" - * Default to PAGE_SIZE after much discussion. - * XXX: min(PAGE_SIZE, vp->v_bufobj.bo_bsize) may be more correct. + * Use miminum/default of PAGE_SIZE (e.g. for VCHR). */ - sb->st_blksize = PAGE_SIZE; + sb->st_blksize = max(PAGE_SIZE, vap->va_blocksize); sb->st_flags = vap->va_flags; if (priv_check(td, PRIV_VFS_GENERATION)) From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 11:38:19 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A2CB1065673; Sat, 17 Apr 2010 11:38:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 194568FC08; Sat, 17 Apr 2010 11:38:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3HBcJdM044656; Sat, 17 Apr 2010 11:38:19 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HBcI5J044654; Sat, 17 Apr 2010 11:38:18 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004171138.o3HBcI5J044654@svn.freebsd.org> From: Andriy Gapon Date: Sat, 17 Apr 2010 11:38:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206754 - stable/7/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 11:38:19 -0000 Author: avg Date: Sat Apr 17 11:38:18 2010 New Revision: 206754 URL: http://svn.freebsd.org/changeset/base/206754 Log: MFC r206129: vn_stat: use va_blocksize when setting st_blksize Modified: stable/7/sys/kern/vfs_vnops.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/vfs_vnops.c ============================================================================== --- stable/7/sys/kern/vfs_vnops.c Sat Apr 17 11:25:30 2010 (r206753) +++ stable/7/sys/kern/vfs_vnops.c Sat Apr 17 11:38:18 2010 (r206754) @@ -729,11 +729,10 @@ vn_stat(vp, sb, active_cred, file_cred, * "a filesystem-specific preferred I/O block size for this * object. In some filesystem types, this may vary from file * to file" - * Default to PAGE_SIZE after much discussion. - * XXX: min(PAGE_SIZE, vp->v_bufobj.bo_bsize) may be more correct. + * Use miminum/default of PAGE_SIZE (e.g. for VCHR). */ - sb->st_blksize = PAGE_SIZE; + sb->st_blksize = max(PAGE_SIZE, vap->va_blocksize); sb->st_flags = vap->va_flags; if (priv_check(td, PRIV_VFS_GENERATION)) From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 11:57:42 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FEAA1065674; Sat, 17 Apr 2010 11:57:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F307A8FC1F; Sat, 17 Apr 2010 11:57:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3HBvf7c048986; Sat, 17 Apr 2010 11:57:41 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HBvfWP048984; Sat, 17 Apr 2010 11:57:41 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004171157.o3HBvfWP048984@svn.freebsd.org> From: Andriy Gapon Date: Sat, 17 Apr 2010 11:57:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206756 - stable/8/sys/geom X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 11:57:42 -0000 Author: avg Date: Sat Apr 17 11:57:41 2010 New Revision: 206756 URL: http://svn.freebsd.org/changeset/base/206756 Log: MFC r206130: g_vfs_open: allow only one mount per device vnode Modified: stable/8/sys/geom/geom_vfs.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/geom/geom_vfs.c ============================================================================== --- stable/8/sys/geom/geom_vfs.c Sat Apr 17 11:40:39 2010 (r206755) +++ stable/8/sys/geom/geom_vfs.c Sat Apr 17 11:57:41 2010 (r206756) @@ -163,6 +163,10 @@ g_vfs_open(struct vnode *vp, struct g_co g_topology_assert(); *cpp = NULL; + bo = &vp->v_bufobj; + if (bo->bo_private != vp) + return (EBUSY); + pp = g_dev_getprovider(vp->v_rdev); if (pp == NULL) return (ENOENT); @@ -178,7 +182,7 @@ g_vfs_open(struct vnode *vp, struct g_co vnode_create_vobject(vp, pp->mediasize, curthread); VFS_UNLOCK_GIANT(vfslocked); *cpp = cp; - bo = &vp->v_bufobj; + cp->private = vp; bo->bo_ops = g_vfs_bufops; bo->bo_private = cp; bo->bo_bsize = pp->sectorsize; @@ -198,5 +202,6 @@ g_vfs_close(struct g_consumer *cp) gp = cp->geom; bo = gp->softc; bufobj_invalbuf(bo, V_SAVE, 0, 0); + bo->bo_private = cp->private; g_wither_geom_close(gp, ENXIO); } From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 12:01:51 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AAC01065673; Sat, 17 Apr 2010 12:01:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A65F8FC3A; Sat, 17 Apr 2010 12:01:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3HC1oDW050000; Sat, 17 Apr 2010 12:01:50 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HC1oBk049998; Sat, 17 Apr 2010 12:01:50 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004171201.o3HC1oBk049998@svn.freebsd.org> From: Andriy Gapon Date: Sat, 17 Apr 2010 12:01:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206757 - stable/7/sys/geom X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 12:01:51 -0000 Author: avg Date: Sat Apr 17 12:01:50 2010 New Revision: 206757 URL: http://svn.freebsd.org/changeset/base/206757 Log: MFC r206130: g_vfs_open: allow only one mount per device vnode Modified: stable/7/sys/geom/geom_vfs.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/geom/geom_vfs.c ============================================================================== --- stable/7/sys/geom/geom_vfs.c Sat Apr 17 11:57:41 2010 (r206756) +++ stable/7/sys/geom/geom_vfs.c Sat Apr 17 12:01:50 2010 (r206757) @@ -163,6 +163,10 @@ g_vfs_open(struct vnode *vp, struct g_co g_topology_assert(); *cpp = NULL; + bo = &vp->v_bufobj; + if (bo->bo_private != vp) + return (EBUSY); + pp = g_dev_getprovider(vp->v_rdev); if (pp == NULL) return (ENOENT); @@ -178,7 +182,7 @@ g_vfs_open(struct vnode *vp, struct g_co vnode_create_vobject(vp, pp->mediasize, curthread); VFS_UNLOCK_GIANT(vfslocked); *cpp = cp; - bo = &vp->v_bufobj; + cp->private = vp; bo->bo_ops = g_vfs_bufops; bo->bo_private = cp; bo->bo_bsize = pp->sectorsize; @@ -198,5 +202,6 @@ g_vfs_close(struct g_consumer *cp, struc gp = cp->geom; bo = gp->softc; bufobj_invalbuf(bo, V_SAVE, td, 0, 0); + bo->bo_private = cp->private; g_wither_geom_close(gp, ENXIO); } From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 17:40:13 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FBB41065670; Sat, 17 Apr 2010 17:40:13 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1EA338FC15; Sat, 17 Apr 2010 17:40:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3HHeDkV025223; Sat, 17 Apr 2010 17:40:13 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HHeCs4025221; Sat, 17 Apr 2010 17:40:12 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004171740.o3HHeCs4025221@svn.freebsd.org> From: Rui Paulo Date: Sat, 17 Apr 2010 17:40:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206762 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 17:40:13 -0000 Author: rpaulo Date: Sat Apr 17 17:40:12 2010 New Revision: 206762 URL: http://svn.freebsd.org/changeset/base/206762 Log: MFC r206456: Honor the CE bit even when the CWR bit is set. PR: 145600 Submitted by: Richard Scheffenegger Modified: stable/8/sys/netinet/tcp_input.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/tcp_input.c ============================================================================== --- stable/8/sys/netinet/tcp_input.c Sat Apr 17 17:02:17 2010 (r206761) +++ stable/8/sys/netinet/tcp_input.c Sat Apr 17 17:40:12 2010 (r206762) @@ -1134,6 +1134,8 @@ tcp_do_segment(struct mbuf *m, struct tc * TCP ECN processing. */ if (tp->t_flags & TF_ECN_PERMIT) { + if (thflags & TH_CWR) + tp->t_flags &= ~TF_ECN_SND_ECE; switch (iptos & IPTOS_ECN_MASK) { case IPTOS_ECN_CE: tp->t_flags |= TF_ECN_SND_ECE; @@ -1146,10 +1148,6 @@ tcp_do_segment(struct mbuf *m, struct tc TCPSTAT_INC(tcps_ecn_ect1); break; } - - if (thflags & TH_CWR) - tp->t_flags &= ~TF_ECN_SND_ECE; - /* * Congestion experienced. * Ignore if we are already trying to recover. From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 22:52:33 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF2EE1065672; Sat, 17 Apr 2010 22:52:33 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 844518FC1E; Sat, 17 Apr 2010 22:52:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3HMqXrZ095054; Sat, 17 Apr 2010 22:52:33 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HMqXTo095051; Sat, 17 Apr 2010 22:52:33 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201004172252.o3HMqXTo095051@svn.freebsd.org> From: Weongyo Jeong Date: Sat, 17 Apr 2010 22:52:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206775 - stable/8/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 22:52:33 -0000 Author: weongyo Date: Sat Apr 17 22:52:33 2010 New Revision: 206775 URL: http://svn.freebsd.org/changeset/base/206775 Log: MFC r197724: TRENDnet TEW-424UB has multiple revisions so clarify zyd(4) man page and adds a device to urtw(4). The revision informations are as follows: rev A ZD1211 V2 SiS163U V2.1R SiS163U V3.xR RTL8187B and bump date. Obtained from: OpenBSD Reported by: Albert Shih Modified: stable/8/share/man/man4/urtw.4 stable/8/share/man/man4/zyd.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/urtw.4 ============================================================================== --- stable/8/share/man/man4/urtw.4 Sat Apr 17 22:40:15 2010 (r206774) +++ stable/8/share/man/man4/urtw.4 Sat Apr 17 22:52:33 2010 (r206775) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 25, 2009 +.Dd October 2, 2009 .Dt URTW 4 .Os .Sh NAME @@ -73,6 +73,7 @@ driver supports Realtek RTL8187B/L based .It "Netgear WG111v2 RTL8225 USB" .It "Safehome WLG-1500SMA5 RTL8225 USB" .It "Shuttle XPC Accessory PN20 RTL8225 USB" +.It "TRENDnet TEW-424UB V3.xR RTL8225 USB" .El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): Modified: stable/8/share/man/man4/zyd.4 ============================================================================== --- stable/8/share/man/man4/zyd.4 Sat Apr 17 22:40:15 2010 (r206774) +++ stable/8/share/man/man4/zyd.4 Sat Apr 17 22:52:33 2010 (r206775) @@ -32,7 +32,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 1, 2008 +.Dd October 2, 2009 .Dt ZYD 4 .Os .Sh NAME @@ -113,7 +113,7 @@ driver: .It Sweex wireless USB 54 Mbps .It Tekram/Siemens USB adapter .It Telegent TG54USB -.It Trendnet TEW-424UB +.It Trendnet TEW-424UB rev A .It Trendnet TEW-429UB .It TwinMOS G240 .It Unicorn WL-54G From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 22:57:08 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26EDC106566B; Sat, 17 Apr 2010 22:57:08 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 156CB8FC16; Sat, 17 Apr 2010 22:57:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3HMv71b096128; Sat, 17 Apr 2010 22:57:07 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HMv7bA096126; Sat, 17 Apr 2010 22:57:07 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201004172257.o3HMv7bA096126@svn.freebsd.org> From: Weongyo Jeong Date: Sat, 17 Apr 2010 22:57:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206776 - stable/8/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 22:57:08 -0000 Author: weongyo Date: Sat Apr 17 22:57:07 2010 New Revision: 206776 URL: http://svn.freebsd.org/changeset/base/206776 Log: MFC r198195: adds devices supportted by urtw(4) and bumps date. Modified: stable/8/share/man/man4/urtw.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/urtw.4 ============================================================================== --- stable/8/share/man/man4/urtw.4 Sat Apr 17 22:52:33 2010 (r206775) +++ stable/8/share/man/man4/urtw.4 Sat Apr 17 22:57:07 2010 (r206776) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 2, 2009 +.Dd October 17, 2009 .Dt URTW 4 .Os .Sh NAME @@ -70,9 +70,15 @@ driver supports Realtek RTL8187B/L based .Pp .Bl -column "Shuttle XPC Accessory PN20" "RTL8225" "USB" -compact -offset 6n .It Em "Card Radio Bus" +.It "Belkin F5D7050E RTL8225 USB" +.It "Linksys WUSB54GCv2 RTL8225 USB" .It "Netgear WG111v2 RTL8225 USB" +.It "Netgear WG111v3 RTL8225 USB" .It "Safehome WLG-1500SMA5 RTL8225 USB" .It "Shuttle XPC Accessory PN20 RTL8225 USB" +.It "Sitecom WL168v1 RTL8225 USB" +.It "Sitecom WL168v4 RTL8225 USB" +.It "SureCom EP-9001-g(2A) RTL8225 USB" .It "TRENDnet TEW-424UB V3.xR RTL8225 USB" .El .Sh EXAMPLES From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 23:04:43 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C9BF106566B; Sat, 17 Apr 2010 23:04:43 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19EAB8FC14; Sat, 17 Apr 2010 23:04:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3HN4hOC097849; Sat, 17 Apr 2010 23:04:43 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HN4hrS097847; Sat, 17 Apr 2010 23:04:43 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201004172304.o3HN4hrS097847@svn.freebsd.org> From: Weongyo Jeong Date: Sat, 17 Apr 2010 23:04:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206777 - stable/8/sys/contrib/dev/uath X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 23:04:43 -0000 Author: weongyo Date: Sat Apr 17 23:04:42 2010 New Revision: 206777 URL: http://svn.freebsd.org/changeset/base/206777 Log: MFC r202607: Fixes a firmware bug that in some devices (e.g. Netgear WG111T or TRENDnet TEW-504UB/EU) idProduct didn't be decreased after loading the firmware. Pointed by: Steven Friedrich Submitted by: sam Modified: stable/8/sys/contrib/dev/uath/ar5523.bin.uu Directory Properties: stable/8/sys/contrib/dev/uath/ (props changed) Modified: stable/8/sys/contrib/dev/uath/ar5523.bin.uu ============================================================================== --- stable/8/sys/contrib/dev/uath/ar5523.bin.uu Sat Apr 17 22:57:07 2010 (r206776) +++ stable/8/sys/contrib/dev/uath/ar5523.bin.uu Sat Apr 17 23:04:42 2010 (r206777) @@ -59,34 +59,34 @@ M``````````````````````````````````````` M```````````````````````````````````````````````````````````` M``````!`@&@``````#P"$``T0O\`0()@`````````````````"0"``)`@H`` M`````````````````^`((3P:@``G6@MT/!^``"?_!&0#7]`B!!$``0`````# -M7]`@`"#X(0-`^`D``````^`((3P:@`(G6D:X/!^``"?_!)0#7]`B!!$``0`` +M7]`@`"#X(0-`^`D``````^`((3P:@`(G6E98/!^``"?_!)0#7]`B!!$``0`` M```#7]`@`"#X(0-`^`D`````0`)@```````\`___-&,`_P!#$"1`@F`````` -M````````````/`2``B2$5_``@.@A/`$?_S0A__\#H>@D/`&@``.AZ"5`!(`` -M`````````````````^`((3P:@`(G6J6$/!^``"?_!1@#7]`B!!$``0`````# -M7]`@`"#X(3P!'_\T(?__`T'0)#P!H``#0=`E`T#X"0`````\'(`#)YS&L#P$ -M@`(DA%?P`(#H(3P(@``\"8``)2D!P#P+@``E:P'DC2(``"$I``2M`@``(0@` +M````````````/`2``B2$9Y``@.@A/`$?_S0A__\#H>@D/`&@``.AZ"5`!(`` +M`````````````````^`((3P:@`(G6JL0/!^``"?_!1@#7]`B!!$``0`````# +M7]`@`"#X(3P!'_\T(?__`T'0)#P!H``#0=`E`T#X"0`````\'(`#)YS64#P$ +M@`(DA&>0`(#H(3P(@``\"8``)2D!P#P+@``E:P'DC2(``"$I``2M`@``(0@` M!!4K__L`````-`0`$#P%@``DI09T/`:``"3&`@"LQ0``(,8`!""$__\4@/_\ M`````#P$@``DA`(`/`6``"2E!X"LA0``/`6``"2E"RBLA0`D/`6``"2E!G2L -MA0"`K(4`A*R%`(@,``*L``````P`:5H`````#`!J>P`````,`&D:``````@` -M;<\\'P``$````0````!`&F``/!O__S=[__`#6]`D0)I@```````````````` +MA0"`K(4`A*R%`(@,``*L``````P`:KT`````#`!KW@`````,`&I]``````@` +M;S(\'P``$````0````!`&F``/!O__S=[__`#6]`D0)I@```````````````` M`$`:\`````````````````!`FG``````````````````0!I@`#P;_[\W>___ M`UO0)$":8``D&@"(/!N``"=[`@"/>P"(`V``"``````#H-@A([W^L*^Z`(BO MH```KZ$`!*^B``BOHP`,KZ0`$*^E`!2OI@`8KZ<`'*^H`""OJ0`DKZH`**^K M`"ROK``PKZT`-*^N`#BOKP`\K[``0*^Q`$2OL@!(K[,`3*^T`%"OM0!4K[8` M6*^W`%RON`!@K[D`9*^\`'"OO@!XK[\`?```(!```"@2KZ0`@*^E`(2ONP!T M0`AH`$`)8`!`"C@`0`M``$`,&`!`#7@`0`YP`*^H`)BOJ0",KZH`E*^K`)RO -MK`"DKZT`H*^N`)`\'(`#)YS&L`.@@"$CO?_@0!I@`#P;__\W>__P`UO0)$": -M8``````````````````,`&D.`@`@(0@``DT``````Z#8(2.]_K"ON@"(KZ`` +MK`"DKZT`H*^N`)`\'(`#)YS64`.@@"$CO?_@0!I@`#P;__\W>__P`UO0)$": +M8``````````````````,`&IQ`@`@(0@``DT``````Z#8(2.]_K"ON@"(KZ`` M`*^A``2OH@`(KZ,`#*^D`!"OI0`4KZ8`&*^G`!ROJ``@KZD`)*^J`"BOJP`L MKZP`,*^M`#2OK@`XKZ\`/*^P`$"OL0!$K[(`2*^S`$ROM`!0K[4`5*^V`%BO MMP!*^_`'P``"`0```H$J^D`("OI0"$K[L`=$`) -M8`!`"C@`0`MP`*^I`(ROJ@"4KZL`D#P<@`,GG,:P/`*``B1"1E2,1```((0` +M8`!`"C@`0`MP`*^I`(ROJ@"4KZL`D#P<@`,GG-90/`*``B1"5?2,1```((0` M`:Q$```#H(`A)[W_X$`#8```````0`)H````````0Q`D``(2@C!"`'\\`X`` M)&,*/`!#$""`4@```D"((20!``02(0`#`````!````P`````/!&@P#8Q`!". M,0``,C$`?SP#@``D8PH\`'$8((!Q```F,0`&`B"0(0``````$8B`0!I@`#P; -M__\W>__P`UO0)$":8``````````````````\"H`")4HQ>`%14""-2@``/`6` -M`B2E,?``L2@@C*4```)`("$!0/@)``````!`D"$\!8`")*4R:`"Q*"",I0`` -M`@`P(0P`=7,`0"`A`D`0(2.]`"!``F``/`/__S1C__X`0Q`D0()@```````` +M__\W>__P`UO0)$":8``````````````````\"H`")4HW(`%14""-2@``/`6` +M`B2E-Y@`L2@@C*4```)`("$!0/@)``````!`D"$\!8`")*4X$`"Q*"",I0`` +M`@`P(0P`=M8`0"`A`D`0(2.]`"!``F``/`/__S1C__X`0Q`D0()@```````` M`````````(^H`)2/J0"`CZH`A$"(.``!(``1`4``$X^A``2/H@`(CZ,`#(^D M`!"/I0`4CZ8`&(^G`!R/J``@CZD`)(^J`"B/JP`LCZP`,(^M`#2/K@`XCZ\` M/(^P`$"/L0!$C[(`2(^S`$R/M`!0C[4`5(^V`%B/MP!(^_`'R/NP",-!K_``-:T"<#>M@D0!I@``` MN@"0C[T`=#=[``)`FV``````````````````0)IP```````````````````` M``]"```8`````````0`"``$``P`!``(``0`$``$``@`!``,``0`"``$`!0`! M``(``0`#``$``@`!``0``0`"``$``P`!``(``0`#X``(``````.@&"$`H.@A -M([W_X*^C``BOOP`0`(#X"0````"/OP`0C[T`"`/@``@`````/`2``B2$1Z@\ -M!8`#)*6B'#"&``,4P``2``````"D.",`!SE"``P(``WK8((][```#8``(`````#0:`"0( @@ -111,7 +111,7 @@ MGP`LC)X`*(R<`"2,EP`@C)8`'(R5`!B,E``4C), M```#X``(`*`0(0`````GO?_PK[\```P``TL``$`AC[\```/@``@GO0`0)[W_ M\*^R``BOLP`,K[$`!*^P````P$@A`0"0(0#@6"$`H'`A%,`!``"`4"$`AQ`K M$$``9#0"__\`1Q`K%$``60#@*"$D`@`(+.,!``!`,"$``S`+/`.``@#%$`8D -M8Q9\`$,0(9!$```D`@`@`(8@(0!$.",0X``(``LT`@!'$",`3A`&`.H8!`!B +M8QP<`$,0(9!$```D`@`@`(8@(0!$.",0X``(``LT`@!'$",`3A`&`.H8!`!B M4"4`ZU@$`.YP!``+-`(!1@`;,6K__P`.)`)0P``!```!S0``$!(``!@0``,< M``!D&"4``"@2``````````!P2D@"`&D0*U!```L`:1@C`&L8(0!K$"L40``& M)*7__P!I$"M00``$`&D8(R2E__\`:Q@A`&D8(P!F`!M0P``!```!S3'$__\` @@ -120,7 +120,7 @@ M&"$`:Q`K%$``!B3&__\`:1`K$$``!``%%```:Q@ M(P``F"$20``$`.[(!@``P"&N6```KED`!`)@$"&/L@`(C[,`#(^Q``2/L``` M`,`8(0/@``@GO0`0/`(`_S1"__\D`P`0`$<0*R0$`!@`8#`A$`#_I0"",`L4 MX``*`$L0*R0"``$`1@`;4.```0```",!2U`C)!,``0`+9`(Q:/__`4P`&P`.+`)1@``! M```!S0``(!(``!@0``,<``!E&"4``&@2``````````!PB$@"`&D0*U!```L` M:1@C`&L8(0!K$"L40``&)(W__P!I$"M00``$`&D8(R6M__\`:Q@A`&D8(P!L @@ -134,7 +134,7 @@ M``,<``!D&"4``#`2``````````!P4T@"`&D0*Q! M0``&),;__P!I$"L00``$``\4`"3&__\`:Q@A``\4``!&F"40`/^.`&E0(S1" M__\D`P`0`$L0*R0$`!@`8"@A$`#_>0""*`L`AA`K$$``!S0"__\``#`A``"8 M(1$`_U$`H,@A$`#_30%`P"$`1A`K%$``?#P"`/\D`@`(+,,!``!`*"$``R@+ -M/`.``@"I$`8D8Q9\`$,0(9!$```D`@`@`(4@(0!$.",4X``1`$=X(P$J$"L4 +M/`.``@"I$`8D8QP<`$,0(9!$```D`@`@`(4@(0!$.",4X``1`$=X(P$J$"L4 M0``%`H@!@",`!LQ,___`>X0 M!@#J&`0`8E`E``HL`E&```$```'-`.M8!```,!(``"`0``0D``"%&"4``$`2 @@ -148,7 +148,7 @@ M(",!I!`K`8D8(P!B8",`@&@A$`#_[B3&__\T0O_ M(1``_X,`@B@+)[W_X*^_`!`,``3L`Z!`(8^B``"/HP`$C[\`$`/@``@GO0`@ M)[W_\*^R``BOLP`,K[$`!*^P````P$@A`0"0(0#@6"$`H'`A%,`!``"`4"$` MAQ`K$$``9#0"__\`1Q`K%$``60#@*"$D`@`(+.,!``!`,"$``S`+/`.``@#% -M$`8D8Q9\`$,0(9!$```D`@`@`(8@(0!$.",0X``(``LT`@!'$",`3A`&`.H8 +M$`8D8QP<`$,0(9!$```D`@`@`(8@(0!$.",0X``(``LT`@!'$",`3A`&`.H8 M!`!B4"4`ZU@$`.YP!``+-`(!1@`;,6K__P`.)`)0P``!```!S0``$!(``!@0 M``,<``!D&"4``"@2``````````!P2D@"`&D0*U!```L`:1@C`&L8(0!K$"L4 M0``&)*7__P!I$"M00``$`&D8(R2E__\`:Q@A`&D8(P!F`!M0P``!```!S3'$ @@ -157,7 +157,7 @@ M``!K&"$`:Q`K%$``!B3&__\`:1`K$$``!``%%`` M`&EP(P``F"$20``$`.[(!@``P"&N6```KED`!`)@$"&/L@`(C[,`#(^Q``2/ ML````,`8(0/@``@GO0`0/`(`_S1"__\D`P`0`$<0*R0$`!@`8#`A$`#_I0"" M,`L4X``*`$L0*R0"``$`1@`;4.```0```",!2U`C)!,``0`+9`(Q:/__`4P`&P`.+`)1 M@``!```!S0``(!(``!@0``,<``!E&"4``&@2``````````!PB$@"`&D0*U!` M``L`:1@C`&L8(0!K$"L40``&)(W__P!I$"M00``$`&D8(R6M__\`:Q@A`&D8 @@ -171,7 +171,7 @@ M`!@0``,<``!D&"4``#`2``````````!P4T@"`&D M$"L40``&),;__P!I$"L00``$``\4`"3&__\`:Q@A``\4``!&F"40`/^.`&E0 M(S1"__\D`P`0`$L0*R0$`!@`8"@A$`#_>0""*`L`AA`K$$``!S0"__\``#`A M``"8(1$`_U$`H,@A$`#_30%`P"$`1A`K%$``?#P"`/\D`@`(+,,!``!`*"$` -M`R@+/`.``@"I$`8D8Q9\`$,0(9!$```D`@`@`(4@(0!$.",4X``1`$=X(P$J +M`R@+/`.``@"I$`8D8QP<`$,0(9!$```D`@`@`(4@(0!$.",4X``1`$=X(P$J M$"L40``%`H@!@",`!LQ,___ M`>X0!@#J&`0`8E`E``HL`E&```$```'-`.M8!```,!(``"`0``0D``"%&"4` @@ -183,173 +183,173 @@ M`&`0````````````K!`K``!H$@``````````%$` M_N(``)@A`]`"`G -MO?_0K[``$`"`@"$D!`!`.@*"$00``+`$"( M(5:```&ND0``C[\`)(^T`""/LP`]`#"/H@`` -M`$`@(0P`!L^N8@`$%$#_\0!`B"$,`!FN`F`@(11`_^T`0(@A#``2D`)@("$4 -M0/_I`$"((0P`&=D"8"`A`$"0(1!`_^0D$0`"C[````!`("$,`!G1)`4'(`!` -MB"$D`@<@K@(;[`)`*"$"8"`A#``<@JYR```\`X`"K'-'J!``_]6N8@`()[W_ -M\*^P``"OOP`$#``4GP"`@"$"`"`A#``4K```*"$00``&)`,`%H^_``2/L``` -M`&`0(0/@``@GO0`0#``?*P(`("$`0!@A)@4;<`(`("$40/_U)`8``0P`-X4` -M`````$`8(20%``$40/_O`@`@(0P`%*P`````)`,`%A``_^H``A@*K*0`!`/@ -M``BLX```)[W_H*^S`$P`H)@A```H(:^Q`$2OOP!0K[(`2*^P`$`,`!2L`("( -M(11``!6OH@`PCB(7W!1``"T#H"`A#`!Z=0````"/I@`@CZ4`'#P$@`(DT,0` -M`!`7P@("$"$``I!##`!P="2$"(@"("`A#``)M@)`*"&OH@`P$$``"P.@("$2 -M8``"CZ(`,*YB``"/OP!0C[,`3(^R`$B/L0!$C[``0`/@``@GO0!@#`!Z=0`` -M``"/H@`@`B`@(210Q``,``RQ`@`H(3P$@`(DA`BD`@`H(0)`,"$40/_JKZ(` -M,`P`<'0`````)`(``:XB%]P"("`A#``'5R>E`#"/H@`P4$#_X*X@%^@0`/_> +M`$`@(0P`!L^N8@`$%$#_\0!`B"$,`!G!`F`@(11`_^T`0(@A#``2E`)@("$4 +M0/_I`$"((0P`&>P"8"`A`$"0(1!`_^0D$0`"C[````!`("$,`!GD)`4'(`!` +MB"$D`@<@K@(;\`)`*"$"8"`A#``E`#"/H@`P4$#_X*X@%^@0`/_> M`````">]_^"OL0`4K[``$*^_`!B,@Q?@)`(``0"@B"$`@(`A`Z`H(1!B``NO MH```$B``!JX`%^B/OP`8C[$`%(^P`!`#X``()[T`((^B```0`/_YKB(```P` -M!Y4`````CZ(``!1`__("`"`A#`!1E``````"`"`A#``4K"0%``$0`/_K```` -M`">]_^"OL@`(`*"0(0``*"&OLP`,K[$`!*^P``"OOP`0#``4K`"`@"$D$P`! +M!Y4`````CZ(``!1`__("`"`A#`!2K``````"`"`A#``4L"0%``$0`/_K```` +M`">]_^"OL@`(`*"0(0``*"&OLP`,K[$`!*^P``"OOP`0#``4L`"`@"$D$P`! M`$"((1!```L"`"`A$D```JX`%^BN40``C[\`$(^S``R/L@`(C[$`!(^P```# -MX``()[T`(*X`&QP,``A^KA,;)`P`"A@"`"`A#`!Q7``````D8P#(+&4`R(X$ -M&`@`11`A`$`P(20(```D"0#(#`!Q=`!@."$,`'%<`````"1C`,@L90#(C@08 -M0`!%$"$`0#`A)`@``"0)`,@,`'%T`&`X(8X"``0,`!T8C$0```(`("$,`"D\ +MX``()[T`(*X`&QP,``A^KA,;)`P`"A@"`"`A#`!ROP`````D8P#(+&4`R(X$ +M&`@`11`A`$`P(20(```D"0#(#`!RUP!@."$,`'*_`````"1C`,@L90#(C@08 +M0`!%$"$`0#`A)`@``"0)`,@,`'+7`&`X(8X"``0,`!TKC$0```(`("$,`"E6 M/`6```P`!_8"`"`AKA,7X!``_]$`````)[W_\*^R``BOL0`$K[```*^_``R, M@A?@)!(``0"@B"$`@(`A$%(`"@``*"$2(``"KA(7Z*X@``"/OP`,C[(`"(^Q -M``2/L````^``"">]`!`,`!2L`````#P%@``,`"EL`@`@(0P`<7N.!!@(#`!Q -M>XX$&$`,``LT`@`@(0P`$7<"`"`A#``(E0(`("$D!0`!#``*2`(`("$,``@' -M`@`@(8X"``0,`!T*C$0``*X`%^`0`/_>`````">]__"OL````*"`(:^Q``0` -MP"@A`("((0(`("&OOP`,K[(`"`P`!S8`P)`A#`!1E`(`("$"("`A)`4`"``` -M,"$,`!$9)`<``59```&N0```C[\`#(^R``B/L0`$C[````/@``@GO0`0)[W_ -M\*^Q``2OL````("((0"@@"&OOP`(#``4;20%``$"("`A$@``"SP%``0,`"D\ -M``````(@("$,`!1M```H(8^_``B/L0`$C[````/@``@GO0`0#``I;#P%``00 -M`/_V`B`@(2>]__`D`@`!K((]`!`,`!2P`````#P%@``,`"F&`@`@(0P``````">]__"OL````*"`(:^Q``0` +MP"@A`("((0(`("&OOP`,K[(`"`P`!S8`P)`A#`!2K`(`("$"("`A)`4`"``` +M,"$,`!$=)`<``59```&N0```C[\`#(^R``B/L0`$C[````/@``@GO0`0)[W_ +M\*^Q``2OL````("((0"@@"&OOP`(#``4<20%``$"("`A$@``"SP%``0,`"E6 +M``````(@("$,`!1Q```H(8^_``B/L0`$C[````/@``@GO0`0#``IACP%``00 +M`/_V`B`@(2>]__`D`@`!K((]_]"OM0`4`*"H(20%``&OOP`@K[<` -M'*^V`!BOM``0K[,`#`$`H"$`X)@AK[(`"*^Q``0`P)`A`("((:^P```,`!1M -M/!:``CP0@`(FI``0/!>``@``*"&N$C.`KM,SA`P`:S2N]#.(`J`@(0P`:S0D -M!0`!CB4``(X$,X`\`O_QC*-`$#1"__\`!"1``&(8)#P"``X`@B`D`&08):RC -M0!".)0``CL0SA#P"_X^,HT`0-$+__P`$)0``8A@D/`(`<`""("0`9!@EK*-` -M$(XE``".Y#.(/`+_?XRC0!`T0O__``0EP`!B&"0\`@"``((@)`!D&"6LHT`0 -M`B`@(0P`%&T``"@AC[\`((^W`!R/M@`8C[4`%(^T`!"/LP`,C[(`"(^Q``2/ -ML````^``"">]`#`GO?_PK[```"0&``0`@(`AK[\`!`P`-@X``"@A#`!1O28$ -M'8P00``'`@`@(0P`-;2,10`D#``UN`(`("$,`#7H`@`@(0P`<=`F!!K(C[\` -M!(^P```#X``()[T`$">]__```"@A)`8``Z^P``"OOP`$#``V#@"`@"$,`''" -M)@0:R`P`<+4`````#``U_0(`("$,`#6_`@`@(0P`<+H`````#``(VP(`("$D +M'*^V`!BOM``0K[,`#`$`H"$`X)@AK[(`"*^Q``0`P)`A`("((:^P```,`!1Q +M/!:``CP0@`(FI``0/!>``@``*"&N$CDHKM,Y+`P`;)>N]#DP`J`@(0P`;)]`#`GO?_PK[```"0&``0`@(`AK[\`!`P`-F$``"@A#`!2U28$ +M'9`00``'`@`@(0P`-@>,10`D#``V"P(`("$,`#8[`@`@(0P`]__```"@A)`8``Z^P``"OOP`$#``V80"`@"$,`',E +M)@0:R`P`]`!",I0`H)`/_\#"B``\D0@`G`$,X)`"C M&"0`9Q`A`$,0*Q1```<`8#`AO'$``"1C`!``QQ`A`$,0*Q!`__L`````D*(` -M`"0#`(`P0@#\4$,`!)2C`!0``"`A`^``"`"`$"&4@AQ>5&+__```("&4HP`2 -ME((<7%1B__@``"`AE((<6I2C`!`48O_S)`0``1``__(`````C((:_(Q#```# +M`"0#`(`P0@#\4$,`!)2C`!0``"`A`^``"`"`$"&4@AQB5&+__```("&4HP`2 +ME((<8%1B__@``"`AE((<7I2C`!`48O_S)`0``1``__(`````C((:_(Q#```# MX``(K(,:_(R"&ORLH@```^``"*R%&OPGO?_@)`(``:^P``"OOP`, +MK((`)%*@``&N!Q?`C@(`!`)`*"$,`!K:C$0``!(@``0"("@AC@(`!`P`&MJ, M1```H@`:^!``_XBN`!KT#``(TP(`("$`0(@AD@(:^"8E``0D0@`!HB(``"0" M``.B(@`!)`(`0!``_\2F(@`"D@,:^`)`*"$D8@`!H@(:^))"``&B0P``,$(` -M_J)"``&.`@`$#``:QXQ$```0`/]P)A8=C`P`"*X"`"`A$`#_F*X"&MR/OP`< +M_J)"``&.`@`$#``:VHQ$```0`/]P)A8=D`P`"*X"`"`A$`#_F*X"&MR/OP`< MC[8`&(^U`!2/M``0C[,`#(^R``B/L0`$C[````"`$"$#X``()[T`(">]__"O -ML0`$K[````#`B"$`H(`A)`4``:^_``ROL@`(#``4;0"`D"$"`"`A#``W=`(@ -M*"$"`#`A`@`H(0P`4=@F1!V,`D`@(0P`%&T``"@AC[\`#(^R``B/L0`$C[`` +ML0`$K[````#`B"$`H(`A)`4``:^_``ROL@`(#``4<0"`D"$"`"`A#``WQP(@ +M*"$"`#`A`@`H(0P`4O`F1!V0`D`@(0P`%'$``"@AC[\`#(^R``B/L0`$C[`` M``/@``@GO0`0)[W_\*^_``"0H@`!,$(``A!```8DI_^D#``(UP````"/OP`` -M`^``"">]`!"@H```H*```8R&&^RDH``"`.`H(0P`"8@DQO_\$`#_]H^_```G -MO?_0K[\`(*^W`!ROM@`8K[,`#*^Q``2OL```K[4`%*^T`!"OL@`(C((;[`"` -MF"$DA!V,)%``H`"P`!JN8!M44@```0```]`#!RT!@")`(``:YB';0D<``0#`!Z5P(`("$0 -M0``R`$"((0!`("$``"@A`@`P(0!`D"$,`'"J)C4`8`+V$"JN<1JX`B"@(:YP -M&KP00``5`J"((0+`@"&.9AOLKE0`)*Y5`"BN40`$`D`H(0)@("$,``F(),;_ -M_(YB&^PF$/__`B(H(0)"&"$"HB`A`H(0(21R`%PDE0!<)%0`7!8`_^XDL0!< +M`^``"">]`!"@H```H*```8R&&_"DH``"`.`H(0P`"8@DQO_\$`#_]H^_```G +MO?_0K[\`(*^W`!ROM@`8K[,`#*^Q``2OL```K[4`%*^T`!"OL@`(C((;\`"` +MF"$DA!V0)%``H`"P`!JN8!M44@```0```]`#!RT!@")`(``:YB';@D<``0#`![N@(`("$0 +M0``R`$"((0!`("$``"@A`@`P(0!`D"$,`'(-)C4`8`+V$"JN<1JX`B"@(:YP +M&KP00``5`J"((0+`@"&.9AOPKE0`)*Y5`"BN40`$`D`H(0)@("$,``F(),;_ +M_(YB&_`F$/__`B(H(0)"&"$"HB`A`H(0(21R`%PDE0!<)%0`7!8`_^XDL0!< M)I$`$!K```BN8!K\`L"`(0(@*"$"8"`A#``(UR80__\6`/_[)C$`1"9P&L@, -M`'&T`@`@(0P`<]__"OL````("`(:^_ -M``0,`''0)(0:F`P`<=`F!!J$)`(``:X"&K2/OP`$C[````/@``@GO0`0)[W_ +M`',7`@`@(0P`]__"OL````("`(:^_ +M``0,`',S)(0:F`P`] -M__"OL0`$`("((:X@&K0DA!J$K[\`"*^P```,`''"`*"`(0P`<<(F)!J8$@`` +M`!#D`D`@(28Q__\&(?_M)A`!'(^_``R/L@`(C[$`!(^P```#X``()[T`$">] +M__"OL0`$`("((:X@&K0DA!J$K[\`"*^P```,`',E`*"`(0P`LC@,`.*X@```"0A`JKA$`.*QQ```40/_N -MKB,`!"8$`"0,`'&'```H(0)@$"&/OP`0C[,`#(^R``B/L0`$C[````/@``@G -MO0`@$`#_]R03``(GO?_PK[$`!*^_``BOL```C)``!`P`<+4`H(@AC@0`-(R% +ML@`(K[```#P"@`*OOP`0K[$`!(Q%5TPD@P`T)((`+`"`@"&L@@`PK(,`.*R` +M`"RL@``T``"0(1B@`!0``)@A#`![NB0$``PF4@`!`$"((0!`("$``"@A$$`` +M%R0&``P,`'(-`````#P"@`*,0E=,C@,`.*X@```"0A`JKA$`.*QQ```40/_N +MKB,`!"8$`"0,`'+J```H(0)@$"&/OP`0C[,`#(^R``B/L0`$C[````/@``@G +MO0`@$`#_]R03``(GO?_PK[$`!*^_``BOL```C)``!`P`]`"`,``L3`D`@(1!`__<` M0"@A,$(`#R1"`"LD`__P`$,P)`"C&"0`9A`A`$,0*Q1```<`8"`AO'$``"1C M`!``AA`A`$,0*Q!`__L`````C*,`""0"`!`08@`*``````P`"H,"`"`ACZ(` M`"8Q``$"(A`J%$#_XX^_`!P0`/_=C[(`&`P`"O0"`"`A$`#_]X^B```GO?_P MK[(`"*^P``"OOP`,K[$`!(R1``0D`@`!``"`(0(@("&N(A?8#``*@R8R&JP" -M0"`A#`!QAP``*"$,``ZZ`B`@(2H#``440``.)A```5!@``TF,!J8#`!Q7``` -M```D8P!D+&0`9`!$$"$`0#`A`&`X(0P`<94"0"`A$`#_[P`````F,!J8#`!Q -MT`(`("$,`'&C)B07T`P`<8XF)!?(`@`@(:X@%]@,`''"`````(^_``R/L@`( +M0"`A#`!RZ@``*"$,``Z^`B`@(2H#``440``.)A```5!@``TF,!J8#`!ROP`` +M```D8P!D+&0`9`!$$"$`0#`A`&`X(0P`]_]"OL0`DK[\`+*^R`"BOL``@`*"((8R2``0` M`%`A``!P(1"@`'X``'@AC*T`#(RD`!`QH@`/``(8P`!B&",``QC``D,8(20" M__\0@@`8)'D8>``$$,``1!`A``(0P`!$$",``A"``D(0(8Q$``@D`P`!KZ,` M!!2```X`6!'``&DD`@`& MC<,`!%!B`&<``'@A)BG__(XL`!@!((`A)CC_H!$@`#\D!@`<`29`(24J_Z0E M"``$K4@`!(TK``"10P`.)`7P```+$"L``A$`,&,`[P!B&"6A0P`.CB(``)5# -M``HE9_^D)$+_Y#!"#_\`91@D`&(8):5#``J.0AOLE40`#@`+.`H`1A`C)$+_ +M``HE9_^D)$+_Y#!"#_\`91@D`&(8):5#``J.0AOPE40`#@`+.`H`1A`C)$+_ M_`&"&"L!@Q`+`(4@)#!"#_\`@B`EI40`#I5&``ZM)_^DC4(`/"0#_?\`#2E` M`$,0)#"E`@``#1E"/`3^_S2$__\`11`E,&,``0!$$"0``QX``$,0):U"`#RM M2``HCB,`$##&#_\D`O__)&0`!*U'`""M6``PK4\`4*U.`$P08@`C`89@(ZU$ M`#@!8$@A%6#_PP``,"$"`$@A$2``#`%`@"$E*O^DC4,`/(TK```\`G__-$+_ -M_P!B&"0!8$@AK4,`/*U9`%@58/_VK5``+`)`("$#("@A`P`P(0P`#TL``#@A +M_P!B&"0!8$@AK4,`/*U9`%@58/_VK5``+`)`("$#("@A`P`P(0P`#T\``#@A MCB(`%%!```.N``!4CB(`!*X"`%2/OP`LC[(`*(^Q`"2/L``@`^``"">]`#`D M`G__$`#_W:U"`#@``'@A$`#_F0``<"$,``JD`Z`P(:X@``0"0"`A#``*@P(@ -M*"$0`/_NC[\`+">]_]"OL0`4K[\`(*^S`!ROL@`8K[``$`"`B"$,`'#^C)(` -M!`!`("$,`'$!```H(0(@("$,``L3)E,:F`)@("$,`''"`$"`(0)`("$,`!1M +M*"$0`/_NC[\`+">]_]"OL0`4K[\`(*^S`!ROL@`8K[``$`"`B"$,`')AC)(` +M!`!`("$,`')D```H(0(@("$,``L3)E,:F`)@("$,`',E`$"`(0)`("$,`!1Q M)`4``8X#``@D`@`0`@`H(1!B`!X"("`ACD(7X`(`*"$40``6`D`@(0P`"H,` -M````)B0`)`P`<:H#H"@ACZ(`````@"$00``$`B`@(0P`"Q,``````$"`(58` -M_^N.`P`(#`!QT`)@("$"0"`A#``4;0``*"$0`/_;`B`@(0P`"YX"("`A$`#_ +M````)B0`)`P`]`"`,`'&T)@0:F#P%@``\!X`"/`B``CP+@`(D!``!)FID$"2E -M,.@"(#`A).<(Q"4(6!`E:V08#`!PRR0)#``,`'#DCF1D$!``_^<"0!`A)[W_ -M\*^P``"OOP`$C((;]`"`@"&,0@!$%$``!20$.@"/OP`$C[````/@``@GO0`0 -M)`(`!PP`>E>N`AL`)$("`"0#_@``0Q`DK@(=Q!``__2N`AL$)[W_X*^_`!RO -MM@`8K[4`%*^T`!"OL@`(K[$`!*^P``"OLP`,C((;[`"`B"$DD!AX)%4`7`"U -M`!H\`H`"4J```0```]`"`,`',7)@0:F#P%@``\!X`"/`B``CP+@`(D!``!)FISL"2E +M,.@"(#`A).<.5"4(9[`E:W.X#`!R+B0)#``,`')'CF1SL!``_^<"0!`A)[W_ +M\*^P``"OOP`$C((;^`"`@"&,0@!$%$``!20$.@"/OP`$C[````/@``@GO0`0 +M)`(`!PP`>[JN`AL`)$("`"0#_@``0Q`DK@(=R!``__2N`AL$)[W_X*^_`!RO +MM@`8K[4`%*^T`!"OL@`(K[$`!*^P``"OLP`,C((;\`"`B"$DD!AX)%4`7`"U +M`!H\`H`"4J```0```L)E(``0)"$"H40/_X`A6`(1``_]P`````$`#_WB03``(GO?_`K[``,*^_ -M`#BOL0`TC((;](S+```D#``!C$,`"`%L$`0`@(`A`&(8)!1@`"D`H$@A+*(` +M)C`:A`P`]__"OL@`( +MH``D$0``!J^@`"@5(``6`````(X"'<@D0AP`KZ(`*`(`("$,`$MR`Z`H(0!` +M&"&.`AOXC$(`:`!B$"M40``&KB,`)(^_`#B/L0`TC[``,`/@``@GO0!`#`!S +M%P(@("$0`/_YC[\`.%$L_^R.`AW()`+_]P%"$"00`/_IKZ(`!">]__"OL@`( MK[$`!*^P``"OOP`,`("`(0``D"$DD1G(C@,:<"0"``$"0A`$`&(8)`)`*"$4 M8``+`@`@(292``$N0@`&%$#_]B8Q`!R/OP`,C[(`"(^Q``2/L````^``"">] -M`!`,`$J'``````(`("$"0"@A#``-%@(@,"$0`/_P)E(``2>]__"OL@`(K[$` +M`!`,`$N1``````(`("$"0"@A#``-%@(@,"$0`/_P)E(``2>]__"OL@`(K[$` M!*^P``"OOP`,`("`(0``D"$DD1AXC@(:<"0#``$"0Q@$`$,0)%!```DF4@`! -MC@(;]`)`*"$"`"`AC$(`"`!#$"040``+)`8`!"92``$N0@`&%$#_\"8Q`#B/ -MOP`,C[(`"(^Q``2/L````^``"">]`!`,`$JV)E(``0(`("$,`!#@`B`H(1`` -M__(N0@`&)[W_\*^_``2OL```C*8`.`P`2[4`H(`AC@(`+(^_``2/L```K$`` +MC@(;^`)`*"$"`"`AC$(`"`!#$"040``+)`8`!"92``$N0@`&%$#_\"8Q`#B/ +MOP`,C[(`"(^Q``2/L````^``"">]`!`,`$O`)E(``0(`("$,`!#D`B`H(1`` +M__(N0@`&)[W_\*^_``2OL```C*8`.`P`3,(`H(`AC@(`+(^_``2/L```K$`` M0`/@``@GO0`0)[W_L*^U`#2OM``PK[,`+*^_`$"OMP`\K[8`.*^R`"BOL0`D -MK[``((RR`!0`H*@A`("8(1)``&XDE`2`CD(`/`1!``0``+`ACD(`(!!``.8` +MK[``((RR`!0`H*@A`("8(1)``&XDE`2`CD(`/`1!``0``+`ACD(`(!!``.H` M0)`ACD(`4%!```6.40`LC$(``%!```&N0`!0CE$`+(XB`$`40``')C<`0`)@ -M("$,`$VK`B`H(20#``T00P!9C[\`0`)@("$,`!"&`B`H(11``,\D`@`!CB,` -M0*Y@&QP08@`&CE``4%(```6.H@`(ZB`#"50P`(EF(<7E!B``.50P`&$`#_VB5"`!"68AQ<%&+_UR5"`!"50P`$ -MEF(<6E1B_],E0@`0CH(!+"1"``$0`/_TKH(!+`*@*"$,`!`!`B`P(5!`_X6. -ML@`4$`#_/8ZB`!P0`/^#KB``0(YB%]A00/^!C[\`0`P`<:,F9!JL$`#_?8^_ -M`$",@P`4$&``""0$``&,8@`\!$,`!0``("&,8@`@$$```@```````"`A`^`` -M"`"`$"$GO?_PK[$`!*^_``@`@(@AK[```(XB&\P00``4)(08>`P`#JX````` -M)B08L`P`#JX``H`K)B08Z`P`#JX``H`*)B09(`P`#JX``H`*4$```0``@"$" -M`!`AC[\`"(^Q``2/L````^``"">]`!`,``ZN`````!``__<``H`K)[W_\*^P -M``"OOP`$#`!PM0"`@"&.`AO,)@48>!!```L"`"`A#``-K0`````F!1BP#``- -MK0(`("$F!1CH#``-K0(`("$F!1D@`@`@(0P`#:T`````#`!PN@````"/OP`$ -MC[````/@``@GO0`0C*<`*```2"&0X@`!,$(`!!1``!",J``LD.(`%C!#``]4 -M8``-C*(`/)4"`$8``"`A``(1`J#B`!>1`@!',$(`#P`"$0``8A`EH.(`%@/@ -M``@`@!`AC*(`/``"%H(P0@`!5$``#Y#B``&5"0!&D.,`%C$B``\``A$`,&,` -M#P!B&"4`"1$"H.,`%J#B`!>,H@`\/`,$``!#$"6LH@`\D.(``3!"``000/_I -M`2`@(8T&`"!0P/_F`2`@(8S(`"PD!/_PC,<`*"4#``@P8@`/)$(`)P!D&"0` -M1"@D`&40(0!#$"L40``'`&`@(;QQ```D8P`0`(40(0!#$"L00/_[`````(S" -M`#P``A:",$(``51```Z0X@`!D.,`%C$B``\``A$`,&,`#P!B&"4`"1$"H.,` -M%J#B`!>,P@`\/`,$``!#$"6LP@`\D.(``3!"``140/_8C08`(!``_[T!("`A -M)[W_X*^S``P`P)@AK[4`%*^T`!"OL0`$K[```*^_`!BOL@`(`("@(0"@B"$, -M`'"U``"H(1)@`$("8(`AC@(`/``"%D(P0@`!%$``58X2`%`20`!4`H`@(8Y" -M`%000`!1`````!*@`$R.`@`LC$,``(Q"`""NHP``KJ(`((X&`"PF1`!<`@`H -M(:S``""LP```#`!1V`````".0@!X)$(``:Y"`'@2H``"`F"`(8ZP`"!6`/_C -MC@(`/!)@`"$`````EB,`-%!@`!&.(@`8CF0`*)""`!8P10`/4*``"Z8@`#0` -M`Q$"H((`%Y(B`#60@P`!,$(`#P`"$0``HA`E-&,`"*"#``&@@@`6CB(`&%1` -M`!VL4P`@)`(``:XB`"RN,P`4KC4`&`````^.(@`L5$``$(YF`"2.)0`D#`!* -MG`*`("$,`'"Z`````(^_`!B/M0`4C[0`$(^S``R/L@`(C[$`!(^P`````!`A -M`^``"">]`"".)0`D#`!*E0*`("$0`/_MKB``+(XC`!B.8@`DK&(``!``_^2N -M-0`8$`#_N(Q3`"`"@"`A#``-H0(`*"&.@ALX4$``&(XB`!Q2```6CB(`'(X" -M`#P``A9",$(``11```D"@"`ACB8`&(XG`#".*``D#`!*_@(`*"%40``*CB(` -M'`*`("$,`"EL/`6``(X"`#`"@"`A/`6```P`*3RN(@`PCB(`'"1"``$20``* -MKB(`'(XB`"2.1`!0``(0P`!2$"&40P`P)(0``:Y$`%`D8P`!I$,`,!``_Y>. -M%0`L)[W_\*^R``BOOP`,K[$`!*^P``",H@!4%$``!P"`D"$DL0!]`!",P@`LC,4` -M6`)`("&,4``@K$```*Q``"`,``]+```X(8XB`!P"`#`A)$+__Q1`__2N(@`< -M$`#_ZZX@`!@GO?_@K[0`$*^S``ROL0`$K[\`%*^R``BOL```C-``,(RB`"2, -MPP!`CA(`4``"$,``H(@A`D(H(20"``(`@*`A$&(`.22S`#".(P`4C&(`/`1" -M`"V,8@`@C@(`/#P#`@".!P`L`$,0):X"`#R.(@`] -M`""L8````&`H(:XB`!0"@"`A#``*8ZQ@`"`0`/_.C@(`/)2C`#".0@!4)`8` -M`:YF``0`0Q`AKD(`5*9C``*.`P`\/`6'_S2E__\``Q;",$(`#R1"``$P0@`/ -M``(6P`!E&"0`8A@EK@,`/(R"&V@``Q[",&,`#P!#$"M40``%CD(`5(R"&K14 -M0``1C((%@(Y"`%268P`")`7__R1"__^N0@!4CH(%A"1C__^F8P`")$(``0P` -M5NZN@@6$`H`@(0P`#]X"0"@A$`#_QB0"__\D0@`!K((%@(X"`#P``A;",$(` -M#Q!&``8`````C@,`*)!B``$T0@`($`#_DJ!B``$,``[T`@`H(1``__BF(@`T -M)[W_\*^Q``2OL```K[\`"`"@@"&.`P!`C*4`,"0"``$`@(@A$&(`3HRD`%". -M(AMH$$``1@``$"%0@`!%C[\`"(RB`"B00@`!,$(`!!!``"6.`P`@$&``/0`` -M$"&,<``LC@(`,(Q"`"B00@`6,$(`#Q!``#LF!``(,((`#R0#__`D0@`G`(,@ -M)`!#*"0`A1`A`$00*Q1```<`@!@AO)$``"2$`!``91`A`$00*Q!`__L````` -M`B`@(0(`*"$,`$Z')`8``1!``"$D`O__C@(`,(Q"`"B00@`!,$(`!!1`_]V. -M`P`@$&``&0``$"&,<``L)`3_\"8#``@P8@`/)$(`)P!D&"0`1"@D`&40(0!# -M$"L40``'`&`@(;QQ```D8P`0`(40(0!#$"L00/_[``````(@("$"`"@A#`!. -MAR0&``$D`___``(8"P!@$"&/OP`(C[$`!(^P```#X``()[T`$!``__H``!`A -M)[W_T*^Q`"0`H(@AK[(`**^P`""OOP`L#`!PM0"`D"&.,``4$@``&0````". -M0@2PCD,$M(X$`%0D8P`!+&4``0!%$"&N0@2PKD,$M!2``!]`!`0`/_JK@(`4`P`<9P` -M````)`,``11#__,D!``"$`#_W``````GO?_PK[````"`@"$DA``\K[\`#*^Q -M``2OL@`(#`!QC@"@B"$,`'"U`````(X%`$2,HP``$&``'(RB``2L8@`$C*(` -M!"8$`%2,L@`($B```ZQ#``",H@`,KB(``(X"`%`D`___K*```*RB``2.`@!0 -MK*,`"*X%`%"L10``#`!QHZR@``P,`'"Z``````)`$"&/OP`,C[(`"(^Q``2/ -ML````^``"">]`!`0`/_EK@(`2">]_^"OOP`4K[``$(R0``2OH```)@0`/`P` -M<:H#H"@ACZ(```(`("$40``()Z4`!(^B``!40/_X)@0`/(^_`!2/L``0`^`` -M"">]`"`,`!%+`````!``__>/H@``)[W_\"2E__^OL0`$K[\`#*^R``BOL``` -M+*(`&0"`B"$00``4C)(`!#P#@`(`!1"`)&,(X`!#$"&,0@```$``"`````", -MA```#``;"B0%`!$`0(`A)D8$@`!`("$D!0$X#``;/@````".)```#``:O0(` -M*"&/OP`,C[(`"(^Q``2/L````^``"">]`!```#`A`D`@(0P`+H$D!0`"CB0` -M``P`&PHD!0`2`$"`(29&!(@`0"`A$`#_ZB0%``B,A```#``;"B0%`!..)``` -M`$"`(20"`@`0`/_EK@(```P`$ZB,A``$$`#_Y(^_``P,`!/`C(0`!!``_^"/ -MOP`,)[W_T*^S`!ROOP`@K[(`&*^Q`!2OL``0C)(`!`"`F"$#H"@A`F`@(0P` -M$4LF41?L`B`@(0P`<<(`0(`A`D`@(0P`%&TD!0`!CZ8```(`*"$,`!&.`F`@ -M(0)`("$,`!1M```H(0P`<=`"("`A$`#_[0.@*"$GO?_@K[0`$*^S``ROOP`< -MK[8`&*^U`!2OL@`(K[$`!*^P``",D0`$``"@(0``F"&.(A?@5$``"HXB%]PF -M,!K(#`!QP@(`("$,`''0`@`@(8XB%^!00/_Z)C`:R(XB%]P00``X`````"8V -M&N`,`''"`L`@(8XC'*0D`@`#$&(`-0`````D!0`!`B`@(0P`%&TF,AK()C4: -MA`P`<]__"OOP``C*(`!`"@("$``#`A -MC$(7Q"0%`!@40``$```X(8^_```#X``()[T`$`P`$1D`````$`#_^X^_```G -MO?_P`*`@(0``,"$D!0`9K[\```P`$1D``#@AC[\```/@``@GO0`0)[W_\*^_ -M``BOL0`$K[```(R0``0,`'%9`("((0!`("$,`'%7)@4;7(X$&UP\!8``)@<8 -M""8(&!`"(#`A#`!Q822E20P,`'%<`````"1C`,@L90#(C@08"`!%$"$D"``` -M)`D`R`!`,"$,`'%T`&`X(8X$&UP\!8``)@<80"8(&$@"(#`A#`!Q822E24P, -M`'%<`````"1C`,B.!!A`+&4`R`!%$"$`0#`A)`@``"0)`,@,`'%T`&`X(8^_ -M``B/L0`$C[````/@``@GO0`0)[W_X"2"`$0D@P!,K[$`!`"`B"&OOP`8K[4` -M%*^S``ROL@`(K[0`$*^P```DA``\KB(`2*XC`%```"@AKB``1*X@`$PF,P!4 -M#`!QAXXT``0"8"`A#`!QAP``*"$``*@A``"0(0P`>EH).<)1"4(9+@E:VS``B`P(20)"``,`'#+ -M)`0``8X$;+@,`'#D/!"``CP%@``\!X`"/`B``CP+@`(F"GE@)*5'-"3G"50E -M"&U@)6MY:"0$``$"(#`A#`!PRR0)#``,`'#DC@1Y8`P`$ET"("`A`J`0(8^_ -M`!B/M0`4C[0`$(^S``R/L@`(C[$`!(^P```#X``()[T`(!``__4D%0`")[W_ -MT*^P`!``H(`AK[\`(*^S`!ROL@`8`("8(:^Q`!0,`'%"KZ``!`P`*.@"`"`A -M%$``$B02``$,`'%0`F`@(20"``$20@`)``````)`$"&/OP`@C[,`'(^R`!B/ -ML0`4C[``$`/@``@GO0`P#`!Q20)@("$0`/_V`D`0(0(`("$#H"@A#``H[2>F -M``0`0(@A,$(``11``%`"`"`A,B(`(%1``$:.`@2$,B((`!1``#X"`"`A,B(` -M0!1``#<"`"`A/`(`!`(B$"040``O`@`@(3(B`(`00``2`````(X"&\Q00``B -MC@48G(^B``0P0@`(5$``&HX%&42/H@`$,$(`!%1``!*.!1D,CZ(`!#!"``)4 -M0``*C@48U"0"_W\"(H@D$B#_Q:^@``".`AV$)!(``P!1$"40`/_`K@(=A`P` -M2IP"`"`A$`#_]20"_W\,`$J<`@`@(1``_^V/H@`$#`!*G`(`("$0`/_ECZ(` -M!(^B``0`LA@$`$,0)!!`_^D`````$`#_[@`````,`"EL/`4`!!``_]`R(@"` -M#``I;"0%`$`0`/_(/`(`!`P`2@HD!0`!)`+W_Q``_[\"(H@D`@`@(20%`"`D -M0@`!#``I;*X"!(00`/^V,B((``P`*6PD!0`!$`#_KS(B`"`GO?_@K[0`$*^R -M``BOL```K[\`%*^S``ROL0`$C,,] -M`"`,`#>``````%1```..!``$$`#_Z0)3D"4``#`A```X(0P`$1DD!0`#4$#_ -MY`)`*"$0`/_A`E.0)2>]__"OL```K[\`!(R"%^`00``/`("`(8R"%]P00``, -M)`(``HR#'*008@`))`(``1!B``B/OP`$#`!PM0`````,`##@`@`@(0P`<+H` -M````C[\`!(^P```#X``()[T`$">]_]"OL0`DK[\`+*^R`"BOL``@C((7X!!` -M`"8`@(@AC((7W!!``",D`@`"C(,)`(``1``_]RN(AL<)[W_X"0#``&OLP`,K[(`"*^Q``2O -ML```K[\`$`"@D"$`P)@A`("`(1"C`$8``(@A4*``,(R"'*0D`@`"$*(`$R0" -M``,0H@`,`````%(@``&N$ARD5F```:YQ``"/OP`0C[,`#(^R``B/L0`$C[`` -M``/@``@GO0`@#``4K"0%``(D$0`6$`#_\0`"B`H,`"EL/`6```(`("$,`!2L -M```H(201`!8"`"`A#``(E0`"B`HD!0`!#``*2`(`("&.`@`$#``="HQ$```, -M`%&4`@`@(0(`("&N`!?@#``I/#P%@``"`"`A#``4K"0%``$0`/_7`````!!# -M``D``````@`@(0``*"$,`!2L`````%1`_\\D$0`6$`#_S0````",@A?@4$#_ -M]P(`("&,@@`$#``=&(Q$```,`''0)@0:X!``__`"`"`AC((7X%1```2,@@`$ -M`@`@(1``_^LD!0`!#``="HQ$```,`''")@0:X!``__D"`"`A)[W_\*^P```P -ML`#_K[\`#*^R``BOL0`$``"0(0P`<+4`@(@A#`!Q-``````2```:CB(]`!`,`#3E)`8``8X#%]PD -M$@`6$&``!``"D`J.`A?@$%$`&3P%@``60/_O)`(``8X#'*A08@`/C@(%)`8``1!```0`0)`A)!(`%A9` -M_[X"0!`A`@`@(1``_]]__`D@@`4 -M)(,`'*^R``BOL```K[\`#*^Q``0`@(`AK((`&*R#`""L@``4K(``'```D"$, -M`'I7)`0`#`!`B"$2(``1)`(``@(@("$``"@A#`!PJB0&``R.`@`@)E(``2I# -M``*N$0`@KB```*XB``048/_PK%$``"8$``P,`'&'```H(0``$"&/OP`,C[(` -M"(^Q``2/L````^``"">]`!`GO?_PK[\``(R&`!R,R```$0``$0"`."&,P@`$ -MK0(`!(SB`!B,PP`$).0`#*S"``2,X@`8K&@``*S%``BLP```K.8`&`P`<:.L -M1@``C[\```/@``@GO0`0C,(`!!``__"L@@`@)[W_\*^Q``0`@(@A)(0`#*^_ -M``@,`'&.K[````P`<+4`````CB0`%(R%```0H``3C((`!*RB``2.(@`@C(,` -M!(R0``BL@@`$CB(`(*QE``"N)``@K(```*R```@,`'"ZK$0```(`$"&/OP`( -MC[$`!(^P```#X``()[T`$!``_^ZN(@`8,*8`#R>]_?`D`O_P),,`3Z^T`@`` -M8A@D`*"@(0"B*"0`HQ`AK[$!]*^_`@ROM@((K[4"!*^S`?ROL@'XK[`!\`!% -M$"L`@(@AC),`!(R6``"OH`"TKZ``H!1```<`H"`AO+$``"2E`!``@Q`A`$40 -M*Q!`__L`````CH,``"QB`$%40``1CH(`#`!F$"$D0@`/)`/_\`!#*"0"@Q@D -M`&40(0!#$"L40``'`&`@(;QQ```D8P`0`(40(0!#$"L00/_[`````(Z"``P4 -M0`.[CI``!```J"$F!?__+*(`0Q!``!L\`X`"``40@"1C"80`0Q`AC$(```!` -M``@`````)Z4`H">F`*0,`!MH`H`@(0*`("$GI0"@#``;:">F`*@"@"`A)Z4` -MH`P`&V@GI@"L`H`@(2>F`+`,`!MH)Z4`H`(@("$"8"@A#``'PR>F`+02H``' -M`L`@(8Z"``@"H"@AKJ(`"(^B`+0,`!J]KJ(`#(^_`@R/M@((C[4"!(^T`@"/ -MLP'\C[(!^(^Q`?2/L`'P`^``"">]`A`"@"`A)Z4`H`P`&V@GI@"XCZ8`N`(@ -M("$"8"@A#``&\">G`+00`/_D``````)@("$,`%>0)Z4`M!``_]\``````H`@ -M(2>E`*`,`!MH)Z8`O(^E`+P"8"`A)Z8`P```."$,`%!<)Z@`Q(^E`,`,`!LW -M`J`@(8^B`,`00``1CZ4`O`*@("$GI0#(#``;5R>F`,R/I0"\CZ<`R`)@("$G -MI@#0#`!07">H`,2/I0#0`J`@(0P`&V$`````$`#_OP`````"8"`A)Z8`P">G -M`-0,`%!<)Z@`Q(^E`-0"H"`A#``;-P`````0`/^T`````">E`*`GI@#8#``; -M:`*`("$"@"`A)Z4`H`P`&V@GI@#F`.B/ -MI0#8CZ<`Z`)@("$0`/_U```P(0*`("$GI0"@#``;:">F`.R/I0#L`F`@(2>F -M`/```#@A#`!8(2>H`/2/I0#P#``;-P*@("&/H@#P4$``#H^E`.P"H"`A)Z4` -M^`P`&UF`/`GIP$`#`!8(2>H`/2/I0$`$`#_N@*@("$"("`A)`4``0``,"$, -M`!$9```X(1``_VH``````F`@(0P`!O,GI0"T/`2``@P`<'0DA`ET$J#_:X^_ -M`@P,`"YR`F`@(0*@("$0`/^F`$`H(0)@("$,``E`+00`/].`````">E`*`GI@$$ -M#``;:`*`("$"@"`A)Z4`H`P`&V@GI@$(`H`@(2>E`*`,`!MH)Z8!#`*`("$G -MI0"@#``;F`1"/I0$$CZ8!"(^G`1`,`%#?`F`@(1``_S<`````)Z4`H">F -M`10,`!MH`H`@(0*`("$GI0"@#``;:">F`1@"@"`A)Z4`H`P`&V@GI@$E`*`,`!MH)Z8!/(^E -M`3P"8"`A#``4$">F`+00`/\#``````*`("$GI0"@#``;:">F`42/I0%$#``' -MW0)@("$0`/[Z`````">E`*`GI@%(#``;:`*`("$"@"`A)Z4`H`P`&V@GI@%, -MCZ4!2(^F`4P,``@6`F`@(1``_NP`````)Z4`H">F`5`,`!MH`H`@(0*`("$G -MI0"@#``;:">F`50"@"`A)Z4`H`P`&V@GI@%8`H`@(2>E`*`,`!MH)Z8!7(^E -M`5"/I@%4CZF`6`,`!MH`H`@ -M(0*`("$GI0"@#``;:">F`60GL``0`H`@(2>E`*`,`!MR)Z8!:`(`("$``"@A -M#`!PJB0&`!R/HP%DCZ(!:)>E`6("8"`A`@`P(:^B`!2OHP`D#`!/@*^C`!P0 -M`/ZX``````*`("$GI0"@#``;:">F`6R/I@%L`F`@(0P`3\@``"@A$`#^K@`` -M```,`!VR`F`@(1``_JH``````H`@(2>E`*`,`!MH)Z8!<(^E`7`,`"F>`F`@ -M(1``_J$`````)Z0`,```*"$,`'"J)`8`!@*`("$GI0"@#``;:">F`70"@"`A -M)Z4`H`P`&V@GI@%X`H`@(2>E`*`,`!MH)Z8!?`*`("$GI0"@#``;F`8"/ -MI@&`EZ4`-```@"&4QP`4E,0`!"3#``@XX@`'$*0`,P!B@`L`P(@ACZ,!="QB -M``040``8``,0P`!#$"$``A#``$,0(P`"$(`"8A`A)$/[F"0"``<0X@`B)`(` -M!*1B`18D`@`#$.(`&B0"`!`0X@`8)`(`$5#B`!>48@$6).+__BQ"``(40``" -M)`0`""0$``2D9`$8#``(E0)@("&.8AM4`F`@(0(@,"$D0@`!KF(;5(^E`72/ -MJ`%X#``IO`(`."$,``A^`F`@(1``_ED`````E&(!%B1"``00`/_HI&(!%J1@ -M`1@0`/_KI&`!%I>C`#*4P@`"%&+_S`#`B"&7HP`PE,(``!1B_\<``(@A$`#_ -MQX^C`70GI0"@)Z8!A`P`&V@"@"`A`H`@(2>E`*`,`!MH)Z8!B`*`("$GI0"@ -M#``;:">F`8R/IP&,CZ4!A(^F`8@,`"P_`F`@(8^C`80``A0```(D`RQB``04 -M0/XQ``,0P`!#$"$``A#``$,0(P`"$(`"8A`A$`#^*J1$_*P"@"`A)Z4`H`P` -M&V@GI@%`CZ4!0`P`5W\"8"`A$`#^(0`````GI0"@)Z8!D`P`&V@"@"`A`H`@ -M(2>E`*`,`!MH)Z8!E`*`("$GI0"@#``;:">F`9@"@"`A)Z4`H`P`&V@GI@&< -M)Z4`H">F`9P"@"`A#``;:(^P`9P"@"`A)Z4`H`P`&W(GI@&@CZ8!E(^G`9B/ -MJ`&@CZD!D`)@("$"`%`A#`!0$@``*"$0`/W^`````">E`*`GI@&D#``;:`*` -M("$"@"`A)Z4`H`P`&W(GI@&HCZ4!J`P`+2("8"`A$`#]\0`````GL``X`F`@ -M(0P`+>T"`"@A`J`@(0(`,"$D!0`(#``;/@`````0`/WF``````P`+@0"8"`A -M$`#]X@`````D`@`"KF(;L`P`+A("8"`A$`#]W``````GI0"@)Z8!K`P`&V@" -M@"`A`H`@(2>E`*`,`!MH)Z8!L">E`*`GI@&P`H`@(0P`&VB/L`&P`H`@(2>E -M`*`,`!MR)Z8!M(^C`:PD`O__$&(`)0`#$,``0Q`A``(0P`!#$"./I0&T``(0 -M@`)B$"$D1@`0`*88)3!C``,D1``($&``'R2G`"``X!@AB*(``)BB``.(IP`$ -MF*<`!XBH``B8J``+B*D`#)BI``^HP@``N,(``ZC'``2XQP`'J,@`"+C(``NH -MR0`,N,D`#R2E`!`4H__N),8`$("B``"@P@``#`!2Q0(`*"$6`/VACZ4!M`P` -M+BX"8"`A$`#]G0````",H@``C*,`!(RH``B,J0`,K,(``*S#``2LR``(K,D` -M#"2E`!`4I__V),8`$!``_^H``````H`@(2>E`*`,`!MH)Z8!N(Z"``P00``? -MCZ,!N"0"``408@`()`(`!!1B_80"8"`A```P(0P`+H$D!0`$$`#^(0*@("$" -M8"`A)Z8`0`P`+H$D!0`%CZ(`0">F`%@"H"`AKZ(`6(^B`$0D!0`4KZ(`7(^B -M`$BOH@!@CZ(`3*^B`&27H@!2IZ(`:)>B`%80`/^"IZ(`:H^E`;@"8"`A#``N -M@0``,"$0`/UE``````P`+PX"8"`A$`#^`P*@("$GI0"@)Z8!O`P`&V@"@"`A -M`H`@(2>E`*`,`!MH)Z8!P(^E`;R/I@'`#``RH0)@("$0`/U3``````P`,XT" -M8"`A$`#]3P`````"@"`A)Z4`H`P`&V@GI@'DCZ4!Y`P`,\$"8"`A$`#]1@`` -M```"@"`A)Z4`H`P`&V@GI@'HCF8<_(^E`>@,`#,5`F`@(1``_3RN8AS\)Z4` -MH">F`30,`!MH`H`@(0*`("$GI0"@#``;:">F`3B/I0$TCZ8!.`P`-@4"8"`A -M$`#]+@`````GI0"@)Z8!+`P`&V@"@"`A`H`@(2>E`*`,`!MH)Z8!,(^E`2R/ -MI@$P#``V#@)@("$0`/T@``````P`2'\"8"`AKF(%L"9E&W`,`#KG`F`@(1`` -M_1@`````)[`!Q`*`("$GI0"@#``;:`(`,"$"@"`A)Z4`H`(`,"$,`!MHE[(! -MQB>E`*`GI@'(`H`@(0P`&VB7L0'&`H`@(2>E`*`,`!MH)Z8!S`*`("$GI0"@ -M#``;:">F`=`"@"`A)Z4`H`P`&V@"`#`A`@`P(0*`("$GI0"@#``;:(^P`<2/ -MIP'(CZ@!S(^I`="/JP'$)Z(`M`)@("$"0"@A`B`P(0(`4"&OH@``#`!7EZ^@ -M``00`/SJ``````P`.F<"8"`A$`#\Y@`````"@"`A)Z4`H`P`&V@GI@'4CZ4! -MU`P`0=<"8"`A$`#\W0`````"@"`A)Z4`H`P`&V@GI@'8CZ(!V`*`("$GI0"@ -M``*`P`("@",,`!MH)Z8!W``0B("/H@'<`G&((28Q&E`*"N -M(@`$#``;:">F`=R/H@'<`H`@(2>E`*"OH@"`)Z8!W`P`&VBN(@`(CZ(!W`*` -M("$GI0"@KZ(`A">F`=P,`!MHKB(`#(^B`=P`$(#``H`@(:^B`)`GI0"@KB(` -M$">F`=P,`!MH`G"`(280&'B/H@'F`20"@"`A#``;:(^P`20" -M@"`A)Z4`H`P`&W(GI@$HCZ8!*``0$,``4!`CC,,````"$(``4Q`AK$,9R(S# -M``0D0AG()`<``:Q#``2,PP`(`@F`>"/HP'@`F`@(0`#$,``0Q`C``(0P`!3$"$, -M`$J'C$48G!``_&T``````H`@(2>E`*`,`!MH)Z8![)>B`>X0`/QFIF(;\`+` -M("$,`!L*`@`H(11`_$,`0*@A)`(``A``_&:OH@"T)[W_\*^Q``2OOP`(`("( -M(0P`]__"OL@`(K[$`!*^P``"OOP`,`("`(0P`%4,\ -M$H`#/`6``#P'@`(\"(`"/`N``P!`B"$F2HH()*5F;`(`,"$DYPJ0)0AZ""5K -MBA`D!``!$$``""0)$``"(!`AC[\`#(^R``B/L0`$C[````/@``@GO0`0#`!P -MRP`````,`'#DCD2*"!``__4"(!`A)`(``:R"`#`\`H`"K$5$1#P"@`*L140\ -M`^``"```$"$GO?_0K[0`(*^R`!BOL0`4K[``$*^_`"0\$(`"K[,`'(X%,N`\ -M!H``/`>```"`B"$DQFI0```@(23G:K@GJ@`!)Z@`!`P`66L#H$@A/`*``HQ4 -M1$`\`H`"C$9$.(X#,N"3H@``CZ4`!*QQ``"@8@`(K&4`!).B``&.!#+@``"0 -M(:""``F.`C+@K$8`$*Q4``P\$X`"CG`RX`P`>E<"@"`ACF,RX``2B(`",(`A -MK@(`%`(CB"&.)``4#``;'B92``$J0@`"5$#_\SP3@`*.9#+@#``:VB02``\\ -M$(`"C@(RX"92__\,`'I7C$0`#(X$,N`,`!KW`$`H(09#__@\$(`"C@(RX(^_ -M`"2/M``@C[,`'(^R`!B/L0`4C[``$`/@``@GO0`P)[W_T#"B``\D0@!-)`/_ -M\*^R`!@`H)`A`$,H)`)#&"0`91`A`$,0*Z^Q`!2OOP`@`("((:^S`!ROL``0 -M%$``!P!@("&\<0``)&,`$`"%$"$`0Q`K$$#_^P````"20@`!DD0``)(C`$`0 -M@P`2,%,``8XC`#B.(@`\K&```(XD`#0D0@`!$(``!:XB`#P,`!LIC)```!8` -M__T"`"`AKB``1*X@`#2B(`!`DD(``!1``$(`````DD(``%1```6.(@!$KC(` -M-*XR`#BN(`!$CB(`1)9#``*.)``X`$,0(:R2``"N(@!$%F``"ZXR`#B2(@!` -M)$(``:(B`$"/OP`@C[,`'(^R`!B/L0`4C[``$`/@``@GO0`PKD```(XC``". -M(@`THB``0"1D`"0D4@`$KB``-`.@*"&,<``$#`!QJJ^@``".0P`()`(`$!!B -M``J/H@``5$``"8XB``".`A?8)`,``5!#``6.(@``C@(:M!!#`` -M`D`H(0P`<=`"`"`A$`#_TH^_`"`,`!LI`D`@(1``_\Z/OP`@)[W_\*^_```0 -MX``-,*(`_Q!```8`P"@A#``:(@````"/OP```^``"">]`!",A```#``5:P#` -M*"$0`/_ZC[\``!!```4`P"`A#``;*0`````0`/_TC[\```P`&QX`P"`A$`#_ -M\(^_```GO?_P,*(`_Z^_```40``&`,`H(0P`&Q8`````C[\```/@``@GO0`0 -MC((```P`":*,1``$$`#_^H^_```GO?_PK[\``(RG``",A``$`*`P(0P`6@0` -M`"@AC[\```/@``@GO0`0)[W_\*^_```\`H`"C$(RY`"@,"$00``+D(4`,Y3" -M``(D1P`$#`!:!(R$``2/OP``)`0``3P#@`*L9#+D`^``"">]`!`0`/_W)`<' -M("2"`!PGO?_PK(``)```*"&OOP``#`!QAP!`("&/OP```^``"">]`!`GO?_P -MK[````"`@"$DA``]__"OOP`$K[````P`&N0`H(`AK%``!(^_``2/L``` -M)`,`(*Q#```#X``()[T`$">]__"LH``$K[\```P`&O<`````C[\```/@``@G -MO0`0)[W_\*^_```\`H`"C$(RX`"`,"$``"@A#`!9[HQ$``2/OP```^``"">] -M`!`GO?_PK[\``#P"@`*,0S+@`(`P(3P"B(B090`SC&0`!#1"B(@,`%GNK,(` -M`(^_```#X``()[T`$(R"````@A`AK$4``(R"```D0@`$`^``"*R"```GO?_P -MK[\`"*^Q``2OL````("((8R$````H(`A)`+__`(D("$`P"@AK)````(`,"$D -MA``$)A```PP`<)T"`H`DCB(``(^_``@`4!`A)$(`!*XB``"/L```C[$`!`/@ -M``@GO0`0C(,``"0"`@``0Q`C$*```@"#("&LI```5,```:S"```#X``(```` -M`(R#```DI0`#)`+__`"B*"0`91@A`^``"*R#```0H``"```8(8RC````@Q`A -MC$(`(!"@``(D8P`$K*,```/@``BLP@``C*(```""("$0P``")(0`(*S$```# -MX``(`````">]__"OOP`$K[````P`:_(`@(`A)`,``:X#``RN`@``K@``"*X` -M``2/OP`$C[````/@``@GO0`0)[W_\*^P``"OOP`$C((`.`"`@"$40``F)`0` -M`0P`:LDD!``!#`!K\@````"N`@`L#`!K]20$``*.`@`````H(0P`%-^,1``$ -M%$``$P````".`@`P%$``#```("&.`@`X%$``!0``("&/OP`$C[````/@``@G -MO0`0#`!K#P`````0`/_ZC[\`!`P`:P$`````$`#_\XX"`#@,`&OUC@0`+`P` -M:LD``"`A$`#_[8X"`#@,`&L/`````!``_]@`````)[W_\*^P``"OOP`$C((` -M.`"`@"$40``=)`0``8X"```D!0`!#``4WXQ$``000``%`````(^_``2/L``` -M`^``"">]`!`,`&OUC@0`+`P`:LD``"`AC@(`,!1```@D!``!C@(`.!!`__,` -M`"`A#`!K#P`````0`/_PC[\`!`P`:P$`````$`#_]XX"`#@,`&L/`````!`` -M_^*.`@``)[W_\*^P``"OOP`(K[$`!(S#`"@D`@`!$&(`!@#`@"&/OP`(C[$` -M!(^P```#X``()[T`$*S``#P,`'$T``````P`&[<"`"`AC@(`*!1``"```"`A -M$(``$`````".`@`\/`,``C1C2?`D0@`!K@(`/(X"`#P`8A@K$&``!P````". -M`@``C$(`!(Q1%^@D`@`!$B(`"@`````,`!S\C@0`!"0$``4,`'%)``````P` -M<3L`````$`#_VX^_``@,`!N'`@`@(20$``L0`/_VKA$`*`P`'0..!``$#``= -M(XX$``0\`P`"`$`@(1!```XT8TGPC@(`/"1"``&N`@`\C@(`/`!B$"M00``( -MC@(`*(X"``",0@`$C$,7Z"0"``$08O_-`````(X"`"@40/_I`````!``_\@` -M````)[W_\*^Q``2OL````*"((:^_``@,`'%"`("`(0(`("$"(#`A#``;W@`` -M*"&/OP`(C[$`!(^P```D`@`!`^``"">]`!`GO?_PK[```#P'@```@(`A/`B` -M`"2)`"0DB@`().=PL"0$``LE"&]X```H(:^_``0,`'$(`@`P(8X"`"040``% -M`$`@(8^_``2/L````^``"">]`!`,`'$F`````!``__J/OP`$)[W_\"0#``&O -ML```K[\`"*^Q``00HP`1`("`(5"@`!*,@@`H)`(``A"B``PD`@`#4*(`!HR" -M`"B/OP`(C[$`!(^P```#X``()[T`$%1`__JL@``H$`#_^8^_``BN```\$`#_ -M]H^_``@40/_TC[\`"(R"``",0@`$C%$7Z%8C__"/L0`$#``<]8R$``0,`'%" -M)`0`!0P`&X<"`"`AKA$`*`P`<4DD!``+$`#_Y(^_``@GO?_PK[(`"`"`D"$D -M!`!`K[$`!*^P``"OOP`,#`!Z5P"@B"$`0(`A$@``%```$"$``"@A)`8`0`P` -M<*H"`"`A)@0`+*X2``"N$0`$#``;>:X``"@,`'%))`0`!`P`'#T"`"`AC@0` -M!#P%@``DI7%8#``]`!``0/@)C(0`+!``__N/ -MOP``)[W_\*^_``",@@`H%$``!"0%``&/OP```^``"">]`!``0/@)C(0`+!`` -M__N/OP``)[W_\*^_``",@@`H%$``!"0%``*/OP```^``"">]`!``0/@)C(0` -M+!``__N/OP``)[W_\*^_``",@@`H%$``!"0%``./OP```^``"">]`!``0/@) -MC(0`+!``__N/OP``)[W_\*^_``2OL````("`(8R$``2N!@`L/`:``*X%`"@D -MQG*<#`!9U```*"&.!``$/`:``"3&]__"OOP``#`!:SXR$``2/OP`` -M`^``"">]`!`GO?_PK[\```P`6N",A``$C[\```/@``@GO0`0)[W_\*^_``2O -ML````("`(0P`6M>,A``$#``<_`(`("$,`!T#`@`@(8^_``2/L````^``"">] -M`!`GO?_PK[```*^_``0,`!SU`("`(0P`6MN.!``$C[\`!(^P```#X``()[T` -M$">]__"OOP``#`!:](R$``2/OP```^``"">]`!",@@`````H(8Q"0"`P1@#_ -M/`.``@`%$(`D8S,P`$,@(92"```DI0`!$,(`!2RC``A48/_X/`.``@/@``@` -M`!`A`^``")2"``(D`A0`I((`"B0""9ZD@@`()`(`!:2"`!0D`@`$K((`8"0" -M`!ZD@@`<)`()*J2"`'0D`@`'K((`>"0"``\D`P`")`4``20&``,D!P`\H((` -M4R0"$`"LA0!(H(8`?*"#`'VL@@!4I(<`6JR```2@@P`6H(``%ZR%`'"LA@`` -MK(``:*R``&RL@`!,K(``9*R``#2D@`!]_^"O -ML````("`(20$'`!`&"$``(`A/`*``B12,N@`$!#``%(0(91"```00P`& -M)`(`"280``$J`@`)%$#_]SP"@`(D`@`)$@(`%20#``$,`'I7)`0`O*XB&_00 -M0``0)`/__P``*"$D!@"\#`!PJ@!`("$,`!T\)B0;:``0$,``4A`AC$(`!`!` -M^`D"("`A%$``"P!`@"&N<0```@`8(8^_`!"/LP`,C[(`"(^Q``2/L````&`0 -M(0/@``@GO0`@#`!Z:HXD&_00`/_SKB`;]!``__(D$``")[W_\"0%``X``#`A -MK[(`"*^Q``2OL```K[\`#`P`'B``(40`!K)!0$```4 -M$$`D4?Z`#`!Z5P(@("$`0)@A$$#_YB0$``("(#`A`$`@(0P`<*H``"@AC@(; -M]"01`,`"-!@KK%,`M!!@``P"8)`A`B`H(0(`("$"H#`A#``LKR8Q``$40``* -M`C08*Y>B``*F0@``%&#_]B92``("@"@A#``@YP)@("$00``*`````!)@``8D -M!0`6#`!Z:@)@("&.`AOTK$``M"0%`!80`/_#`*`@(0P`>EB``(0`/^,`H*@)2Q"``440/]U)`0`%A``_VX"`"`A+((``A1`_W`D -M!``6$`#_#S0"@``GO?_PK[$`!*^P``"OOP`,K[(`"(R"&_0`@(@A)`0`(`P` -M>E>,4@"T$$``%P!`@"$`0"`A```H(0P`<*HD!@`@CB(;]`(`*"$"("`A#`!( -M#JQ0``0``(`A`@`H(0(@("$,`"F>)A```2H"`(`40/_[`@`H(8XE&_0,`#\Y -M`B`@(11```\`````$D```P`````,`'IJ`D`@(0P`'WP"("`A)`0`%H^_``R/ -ML@`(C[$`!(^P````@!`A`^``"">]`!`,`#3``B`@(0P`+V0"("`ACB0;]#P# -M@`(D8RRT/!"``CP'@``\"(``/`J``ZR#`!BN(A?$)@E'L"3G2\`E"$VH)4JA -M8```*"$"(#`A#`!Q"```("$,`'$FC@1'L`P`<4D``"`A#`!Z:@)`("&.(QOT -M)`(`"@``("&L8@!H$`#_V:Q@`+0GO?_@K[0`$*^_`!2OLP`,K[(`"*^Q``2O -ML```C)(;](Y0```2```=`("@(8X$``04@`!!`````(X$``@4@``Z`````(X$ -M``P4@``S`````(X$`!`4@``L````````F"$"`(@ACB(`%"9S``$40``B`$`@ -M(8XB`!PF,0`,%$``&@!`("$N8@`#5$#_]XXB`!0,`'IJ`@`@(:Y```".1``$ -M%(``#0`````"@"`A#``_1@)`*"&/OP`4C[0`$(^S``R/L@`(C[$`!(^P```` -M`!`A`^``"">]`"`,`'IJ`````!``__&N0``$#`!Z:@`````0`/_E+F(``PP` -M>FH`````$`#_W8XB`!P,`'IJ``"8(1``_]0"`(@A#`!Z:@`````0`/_,C@0` -M$`P`>FH`````$`#_Q8X$``P,`'IJ`````!``_[Z.!``(C(,;]"0"``XD8P`T -M`^``"``#$`LGO?_0K[0`(*^R`!BOL``0K[\`)*^S`!ROL0`4C)$;]"0%`+\# -MH#`ACB(```"`D"&GH``$#``LKXQ3``0F,``T%$``I@!`H"&.0AOTEZ,``(Q" -M``"N(P`TE$(``"Q"4`,40`"_)Z8`!`)`("$,`"RO)`4`RA1``)D`0*`AEZ(` -M!#!"#\```A%"-$(``:X"`#R.0AOTC$(``)1"```L0E`!$$``IR>F``*GH``" -MEF(`$I9D`!"68P`4``(0@`""("4``QC`EF4```"#("4T@@`"`$4@"I9C``(` -M@"@A-*(`$)>D````0R@*,*(``11```.N!```)`+__0"B*"0PH@`(%$``!"0" -M"0@D`O_O`*(H)"0""0BF`@!$ED(<]C!"`/`L0@`P$$``A*X%``260QSP)`(` -M!Q!B``4D`@G$)`(`"A!B``(D`@G$)`(*K*8"`$:7J``")`(3.*8"`$`D`A?4 -MI@(`0C$#``(D`@`!K@(`8*X``%P48``(```P(99#'/`L8@`&4$``!"0&``$D -M`@`%4&(`8I9#'/*61!SP)`(``:X&`%@L@P`&K@(`4*X``$P08`!8```P(20" -M``50@@!2ED(<\C$$__\`!!!".$(``20'``$P0@`!,0,``:X&`%2N`@!(K@<` -M"*X'``P48``#```P(3"B``D``C`K``00PCA"``$P0@`!,0,`!*X&`!"N`@`4 -M%&```P``,"$PH@`)``(P*Y9B``:.9``8``49`C!C``&N!@`8K@,`(*X'`"2N -M`@`HK@<`'!"```0``"@ACF(`'%1```,D`@`!)`4``20"``$Q`P'PK@(`,*X% -M`"P48``"``,1`B0"``HQ`_``$&``'ZX"`#0``QL")`(``0!B$`2N`@`XCD(; -M](Q#``"7H@`$,$(/P``"(4*48@``+$)0`Q1```.N!``\-((``:X"`#R"8@`@ -M`D`@(:X"`&2"8@`A#``?SJX"`&@"@!`AC[\`)(^T`""/LP`]`#`0`/_D)`(`@"Q"``@40/^N,03__Q``_ZLD!@`!)`(``A!B -M``,L8@`$5$#_G)9$'/`0`/^9)`8``1``_X0D`@G$`D`@(0P`+*\D!0#)%$#_ -MXP!`H"&7H@`"$`#_5*9B`#@"0"`A#``LKR0%`,H40/_;`$"@(9>B``0P0@P` -M``(90JX#`#P0`/]"IZ(`!">]_]"OLP`B -M``"3HP`!``(2`J(#``"B`@`!%(#_\B80``*20P`+)`(`_Q!B``H``(@AHD`` -M#(^_`""/LP`] -M__"OL````("`(:^_``0,`'I7)`0!6*X"``000`!")`,``@!`("$``"@A#`!P -MJB0&`5@,`'I7)`0#9*X"``@00``Y)`,``@!`("$``"@A#`!PJB0&`V2."0`( -M)`(`"B0(``FE(@`4)`(``Z4B`AXE(P`<)`(`"R4(__^D8@``!0'__21C`#0` -M`$`A`2`X(3P#@`(\`H`"``@@0"1C%X0D0A=\`((0(0"#&"&41@``E&,``"4( -M``$`B2`A)`(`"RD%``.D@P(@I(8")J3B`C*DX@+.%*#_[B3G`#0,`'I7)`0` -MB*X"``P00``/)`,``@!`("$``"@A#`!PJB0&`(@,`'I7)`0(`*X"`!`00``& -M)`,``@!`("$``"@A#`!PJB0&"````!@AC[\`!(^P````8!`A`^``"">]`!`G -MO?_@K[\`$*^S``ROL@`(K[$`!*^P``",@AOT`*!((3##__^,4P``EF(``"Q" -M,`,40``ICG``")8&`!0``)`A`D80*U!``!"6`@`4`@`X(0`#$$``21`AE$@` -M`"92``(D8P`!,00`_P`($@("1B@KI.(``*3D``(P8___%*#_]"3G``26`@`4 -M$$``#```D"$"`(@AEB4``)9D`````#`A#``HGB92``&6`P`4IB(```)#&"L4 -M8/_W)C$``H^_`!"/LP`,C[(`"(^Q``2/L````^``"">]`"```Q!``$40(91( -M```D8P`!,&/__P!@*"$`"#%```@8@@`($D(PQ@!_,&,`?P`%($"F!@`$I@(` -M`*8#``(`B2`AE(@``"2E``$PH___`&`@(0`($L(`""C```@9`@#","4PI0!_ -M,&,`?P`$$$"F!0`(I@8`!*8#``8`21`AE$@``"2$``$P@___`&`@(0`($T(` -M"#A```@9@@"B*"4PYP!_,&,`?P`$$$"F!P`,I@4`"*8#``H`21`AE$@``"2$ -M``$PA/__``@I@``(,\(`"!("``@80C"E`'\P0@!_`.8X)3!C`'\`!"!`I@4` -M$J8"``ZF!P`,I@,`$`")("&4B`````@2@@"B*"40`/^HI@4`$B>]_\"OMP`L -MK[4`)*^Q`!2OOP`TK[X`,*^V`"BOM``@K[,`'*^R`!BOL``0C((;]##&__^O -MI0``C%0``*^F``0``+@ACH(`!(Z2``@``(@AE%X`$@``J"$D`@`!```@(1*B -M`'>/HP`$4J``<997`!0D`@`"$J(`9P`````2X`!5``"P(0`#$$"/HP```("8 -M(0!#@"&68@``)B<`"*8B``"6"@``)A```@`*((``"BD"``HR@C"E`#\PA``_ -MIB0`'J8F``2F)0`"E@H``"80``(`"DN"``I!```*$@(`"AB"`(D@)3$(`#\P -M0@`_,&,`/Z8H`"2F)``>IB(`(*8C`"*6"@``)A```@`*&P(`"A&"`0-`)3!" -M`#\Q0P`_IB@`)*8B`":F(P`HE@H``"80``(`"D"```H9`@`*$H(Q"``_,&,` -M/Z8H`"ZF(@`JIB,`+)8*```F$``"``HC@@`*&((`"A("`01`)3!"`#\P8P`_ -MIB@`+J8B`#"F(P`R#``H>I:$``"6)P`&$.``#0``,"$"("@AA*(`'B3&``$` -MQR`K``(80`!B&"$``QC``&(8(0`#&$"DHP`>%(#_]B2E``(FU@`!`M<0*R8Q -M`#040/^Q)G,``B:U``$NH@`#5$#_GR0"``&/OP`TC[X`,(^W`"R/M@`HC[4` -M)(^T`""/LP`]`$!3P/_P)K4``997`AXD8P!& -M)E$"+!``_Y0F1`(@)&,`!291`!80`/^0`D`@(5/`_^4FM0`!EE<"'B1C`#`````":#``$P=/__EB,````4*$``O8@A``,:`H^D`!@``#`AIF(``!!@ -M``H`8"@A#``HG@`````F`P`!,'#__R:#``$P=/__`I(8*Q1@_^*F(@```!(0 -M0@+"$"$P4/__IO0`%!*``&$``$`A``@@0`"($"$`G1@A``(0@)1C````2!`A -M``(00`!7,"$`$"A``)<@(:2#````M2@AI,,`&)2C```F`@`!,%#__P`#$$`P -M0@$`,&,`_P!B&".DPP`$$"/OP!$`$,0(91"`'Z/O@!`C[8`.*;B`!:/M0`TC[<`/(^T`#"/ -MLP`LC[(`*(^Q`"2/L``@`^``"">]`%"4X@``)`,``:3#`!H``AO"``,:```" -M$@(`0Q`C$`#_X:3"`"H`"!!``$D0(91%```E`P`!,&C__R0"`/\`%!A`+08` -M`R:$``$010`#`'T8(3"4__^D90``%,#_\P`($$`0`/]TIO0`%">]__"OL``` -M,+#__P`0$$"OL0`$`("((0!`("&OL@`(K[\`#`P`>E<`P)`AKB(``!!``#,D -M`P`"`!`@@`"0("$`!""``)`@(0P`>E<`!""`$$``,JXB``BF,``$$@``)P`` -M,"$`!D"```880`$&$"$`K0"`8"&GH@`"I*,` -M!J>B````8#@A```P(0``("$`AQ`',$(``1A```@LPP`"$&``@```$"$`!AA` -M),(``0!]&"$P1O__I&0``"2"``$P1/__+((`!!1`__(`AQ`'E8(`%```2"$0 -M0`!QI*(`!``)&$``:1@A``,8@`!I&"$`"4"```,80`$)$"$!@Q@A``(0@(RJ -M``B49``8`$D0(0`"$(``2A`AI$0``"1F`!B4PP`2I$,``I>C``(T`MZM$&(` -M7@``("$!"1@A``,8@`!I&"$`!!"``$00(0`#6(`D@P`!``(0@#!D__\!:C@A -M`$<0(2R#``048/_SI$``!I>C``"4Q``"``,0@`!#$"$``A"``$<0(:1$``B7 -MHP`"``,0@`!#$"$``A"``$<0(20#`!2D0P`(EZ,``@`#$(``0Q`A``(0@`!' -M$"$D`P`CI$,`"I>C``(``Q"``$,0(0`"$(``1Q`A)`,`/Z1#``R7I`````00 -M@`!$$"$``A"``6(0(0!*$"$D1``$)`(`!*2"``*4PP`&E((`!`!#$"&D@@`& -ME,,`"@!#$"&D@@`(E,,`#@!#$"&D@@`*E,(`!*2"``R4P@`(I((`#I3"``RD -M@@`0E,(`$*2"`!*7I``"``00@`!$$"$``A"``6(0(0!*$"$D1``$)`(``Z2" -M``*4P@`4I((`#)3"`!:D@@`.E,(`&*2"`!"4H@`$)2,``3!I__\!(A`K%$#_ -MD@`)&$`D`@`!`^``"">]`!`!"1@A``,8@`!I&"$`!!"``$00(0`#.(`D@P`! -M,&3__P`"$(``ZA@A`$,0(2R#``048/_SI$``!I>D````!!"``$00(0`"$(`` -MXA`A`$H0(21$``0D`@`$I((``I3"``*D@@`$E,,`!@!#$"&D@@`&E,,`"@!# -M$"&D@@`(E,,`#@!#$"&D@@`*E,(`!*2"``R4P@`(I((`#I3"``RD@@`0E,(` -M$!``_\VD@@`2)[W^L*^W`3ROM@$XK[4!-*^S`2ROL@$HK[$!)*^P`2"OOP%` -MK[0!,(R"&_0`@+`A`*"X(8Q"```PT?__`."0(8Q4``0``)@A``"H(0``@"$D -M`@`!4@(`-I:"`!)2```XEH(`$"0"``)2`@`QEH(`%`.@("$``"@A#`!PJB0& -M`1P"P"`A`Z`H(0(@,"$"H#@A`N!`(0P`(E4"`$@AEZ4`%`)`("$,`",F`Z`P -M(0!`F"$40``3`$`8(0.@("$,`"-Q`D`H(1!```XD`___EZ,`%``#$(``0Q`A -M`B(0(18```,P4?__)B(`!3!1__\F$``!+@(``Q1`_]8F4@`,`F`8(8^_`4"/ -MMP$\C[8!.(^U`32/M`$PC[,!+(^R`2B/L0$DC[`!(`!@$"$#X``()[T!4%!` -M_^\F$``!$`#_S205``-00/_K)A```1``_\DD%0`*)[W_P*^W`"ROM``@K[\` -M-*^^`#"OM@`HK[4`)*^S`!ROL@`8K[$`%*^P`!",@AOT,,;__Z^E``",4P`` -MKZ<`"*^F``2.8@`$``"X(0``H"&47@`2)`(``0``D"$``*@A$H(`]`$"60P`$`!`@0@`0*T(`$!'"`&48)3!"`#\0`/_=,(0`/Q``_\@` -M$!#"$`#_O20&``$0`/_=,%'__Q``_[(`$!)"%\``!#!1__\F(@`&$`#_VC!1 -M__^.8@`,)!<``R15`%(0`/^;)%(`5"8B`%4P4?__`&"H(207``@0`/^5)'(` -M`B8B`&4P4?__$\#_\"8B``2.8@`,)!<``B15`'(0`/^,)%(`=">]_]"OM@`8 -MK[0`$*^Q``2OOP`@K[<`'*^U`!2OLP`,K[(`"*^P``",@AOT`*"@(3#1__^, -M50````"P(8ZC``248@$6$$``$8ZR`!``%KA``N,0(91"`1@40``7EJ(``"8C -M``@F)``'+$(P`P!@B"$`@H@+CJ,`!";6``&48@$6`L(0*Q1`__$F4@!`C[\` -M((^W`!R/M@`8C[4`%(^T`!"/LP`,C[(`"(^Q``2/L````^``"">]`#`L0C`# -M%$``0``1$$``5#`A``"8(0)`*"&4R```)G,``BYD``@Q`P#_``@2`J2B``"D -MHP`(),8``B8Q``$4@/_V)*4`$``1$$``5$@A``"8(0)`."&5*```)G,``BYF -M``@`""&"``@2`@`(&X(P0@`_,&,``3"$``$Q!0`_I.(``JSC``2DY0`*K.0` -M#"4I``(F,0`!%,#_[R3G`!```)@A`D"`(8X"``!00``/)G,``8ZB``0"XA`A -ME$(!&#!#``<08``.```P(20"``,08@`,EJ0``)8%```D!@`!#``HGB9S``&F -M`@``+F(`"!1`_^TF$``($`#_LHZC``26I```$`#_]I8%````5!`AE$@``"8Q -M``$`$2!```@I0``(&((`"!)",*4`?S!C`'^F10`0ID(``*9#``@`E"`AE(@` -M`"8Q``$`$3!```@:P@`((,``"!$"`*,H)3"$`'\P0@!_ID0`(*9%`!"F0@`8 -M`-0P(93(```F,0`!`!$H0``(&T(`"#!```@1@@"#("4PQ@!_,$(`?Z9&`#"F -M1``@ID(`*`"T*"&4J```)C$``0`1.$``""/"``@I```($@(`"!B"`,0P)3"E -M`#\P0@!_,&,`/Z9%``JF0@`XID,``J9&`#``]#@AE.@``"8Q``$`$2!```@; -M`@`($8(`HR@E,$(`/S$#`#^F10`*ID(`$J9#`!H`E"`AE(@``"8Q``$`$2A` -M``@@@``(&0(`"!*",(0`/S!C`#^F1``RID(`(J9#`"H`M"@AE*@``"8Q``$` -M"!H"``@3@@""("4P8P`_ID0`,A``_XZF0P`Z)[W_T*^U`"2OM``@K[,`'*^_ -M`"BOL@`8K[$`%*^P`!",@AOT`*`P(0"@H"&,4@```("8(0``J"$,`"8TCD4` -M!)9B'/8P0@#P+$(`,%1```:60@``CD(`!)1"`"@00``I)`,`%I9"```D$`"0 -M)!$`0"Q",`,"`#`A`B(P"P)@("$,`"%$`H`H(99"```"`#`A+$-``"Q",`,4 -M8``&`B(P"XY"``240P`H)`(``1!B`",F1P`4`F`@(0P`(;X"@"@AED,``"QB -M0``40``8+&,P`XY"``240@`L)$+^ZS!&__\"8"`A`H`H(0P`)($#H#@AEZ8` -M``)@("$,`"45`H`H(0*@&"&/OP`HC[4`)(^T`""/LP`F1@#JID(`[*9#`.:F1`#HID4`XJ9'`.0`$1!``%,0 -M(910```F,0`!`9)0(3($`/\`$!H"`!$00*5#`%"E1`!6`%,0(910```F,0`! -M`!$80#($`/\`$!("I4(`7*5$`&(`DH@`"`!$00`!3$"&44```+H5``"8Q -M``$`$!E"`!`@0C!C`/\PA``/,@(``:5"`(2E0P!X%*``!J5$`'X2H`$T`!`3 -M0B0"``(2H@$N`!`30A;``!$N@C`$`!$00`!3$"&44````9(8(0`0$8(P0@!_ -MI&(`S"0"``$2H@$<)C$``2JB``(40`$4)`(``A*B`0T`$!#"+H(P!!1``00` -M%1!``!480`!R&"$`$"-")&,`T``1$$"D9``"`%,0(910```F,0`!`!`0P#!" -M`#@`@B`E)`(``A*B`.VD9``"%J``"2Z"0``4H``'`!`8P@`0$@(P0@`_,&,` -M'Z9"`0*F0P$&+H)``!1``#`FH@`!)`(``1*B`,$D`@`"$J(`:P`1$$`6H``I -M)J(``2Z"0`$40``F)J(``0`1$$``4Q`AE%```"Z#4``F,0`!,@(`/Q1@`!VF -M0@#8`!`1@@`0,T(P0@!_`!$80*9&`$RF0@!"`',8(91P```F,0`!`!$H0#(" -M``<``A#``!`8P@`0(D(`PC`E,&,`/Z)$`&NF1@!,ID,`W@"S*"&4L```)C$` -M`3("``$``A'``((@)0`0$$*B1`!KHD(`<":B``$P5?__+J(``Q1`_O\`%1"` -M4L``$X[B`!0`$1!``%,0(910```F,0`!`!$@0``0$,(R`P`',$(`!Z9#`/JF -M0@#^`),@(920````$!#",$(`!S(#``>F0P#\ID(!`([B`!261P$6``"H(1#@ -M``\D4?]``!$00`!3,"&4T```)J,``@`5$$`P=?__`%(0(3(#`/\`$"("`J,@4`_R8Q``$`$"H"`H`@(20&``$,`"B>ID(!$``1 -M&$``F0P#Z$`#^Y:9" -M`/XP0@`!$`#^T:9"`#`P0@`!$`#^SJ9"`"XP0@`',@,`!Z9"`/80`/Z`ID,` *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 23:14:07 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F948106566C; Sat, 17 Apr 2010 23:14:07 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F22308FC13; Sat, 17 Apr 2010 23:14:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3HNE67q000133; Sat, 17 Apr 2010 23:14:06 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HNE6FF000130; Sat, 17 Apr 2010 23:14:06 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201004172314.o3HNE6FF000130@svn.freebsd.org> From: Weongyo Jeong Date: Sat, 17 Apr 2010 23:14:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206779 - stable/8/etc/devd X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 23:14:07 -0000 Author: weongyo Date: Sat Apr 17 23:14:06 2010 New Revision: 206779 URL: http://svn.freebsd.org/changeset/base/206779 Log: MFC r202610: adds a hardware specific configuration file for uath(4). Pointed by: sam Reviewed by: imp, thompsa Added: stable/8/etc/devd/uath.conf - copied unchanged from r202610, head/etc/devd/uath.conf Modified: stable/8/etc/devd/Makefile Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/devd/Makefile ============================================================================== --- stable/8/etc/devd/Makefile Sat Apr 17 23:04:56 2010 (r206778) +++ stable/8/etc/devd/Makefile Sat Apr 17 23:14:06 2010 (r206779) @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= asus.conf +FILES= asus.conf uath.conf NO_OBJ= FILESDIR= /etc/devd Copied: stable/8/etc/devd/uath.conf (from r202610, head/etc/devd/uath.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/etc/devd/uath.conf Sat Apr 17 23:14:06 2010 (r206779, copy of r202610, head/etc/devd/uath.conf) @@ -0,0 +1,120 @@ +# $FreeBSD$ +# +# Atheros USB wireless network device specific devd events + +# Accton +# SMCWUSB-G and SMCWUSBT-G2 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x083a"; + match "product" "(0x4505|0x4507)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Atheros Communications +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x168c"; + match "product" "0x0002"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Atheros Communications +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x0cf3"; + match "product" "(0x0002|0x0004|0x0006)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Conceptronic +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x0d8e"; + match "product" "(0x7802|0x7812)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# D-Link +# DWL-AG132, DWL-G132 and DWL-AG122 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x2001"; + match "product" "(0x3a01|0x3a03|0x3a05)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# D-Link +# DWA-120 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x07d1"; + match "product" "0x3a0c"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Gigaset +# SMCWUSBT-G +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x1690"; + match "product" "(0x0711|0x0713)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Global Sun Technology +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x16ab"; + match "product" "(0x7802|0x7812)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# BayNETGEAR +# WG111U +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x0846"; + match "product" "0x4301"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Netgear +# WG111T and WPN111 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x1385"; + match "product" "(0x4251|0x5f01)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# U-MEDIA Communications +# TEW-444UB and AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x157e"; + match "product" "(0x3007|0x3206)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Wistron NeWeb +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x1435"; + match "product" "(0x0827|0x0829)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Z-Com +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x0cde"; + match "product" "0x0013"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; From owner-svn-src-stable@FreeBSD.ORG Sat Apr 17 23:48:08 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36681106564A; Sat, 17 Apr 2010 23:48:08 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B4BF8FC12; Sat, 17 Apr 2010 23:48:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3HNm7kN008043; Sat, 17 Apr 2010 23:48:07 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HNm7d6008039; Sat, 17 Apr 2010 23:48:07 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201004172348.o3HNm7d6008039@svn.freebsd.org> From: Weongyo Jeong Date: Sat, 17 Apr 2010 23:48:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206780 - stable/8/sys/net80211 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 23:48:08 -0000 Author: weongyo Date: Sat Apr 17 23:48:07 2010 New Revision: 206780 URL: http://svn.freebsd.org/changeset/base/206780 Log: MFC r205140: fixes a broken software beacon miss handler. There is a race to check vap->iv_bmiss_count == 0 in ieee80211_swbmiss because iv_swbmiss_task is enqueued by taskqueue. Reviewed by: rpaulo Modified: stable/8/sys/net80211/ieee80211_proto.c stable/8/sys/net80211/ieee80211_sta.c stable/8/sys/net80211/ieee80211_tdma.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/dev/uath/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net80211/ieee80211_proto.c ============================================================================== --- stable/8/sys/net80211/ieee80211_proto.c Sat Apr 17 23:14:06 2010 (r206779) +++ stable/8/sys/net80211/ieee80211_proto.c Sat Apr 17 23:48:07 2010 (r206780) @@ -1432,8 +1432,6 @@ ieee80211_swbmiss(void *arg) } else if (vap->iv_swbmiss_count == 0) { if (vap->iv_bmiss != NULL) ieee80211_runtask(ic, &vap->iv_swbmiss_task); - if (vap->iv_bmiss_count == 0) /* don't re-arm timer */ - return; } else vap->iv_swbmiss_count = 0; callout_reset(&vap->iv_swbmiss, vap->iv_swbmiss_period, Modified: stable/8/sys/net80211/ieee80211_sta.c ============================================================================== --- stable/8/sys/net80211/ieee80211_sta.c Sat Apr 17 23:14:06 2010 (r206779) +++ stable/8/sys/net80211/ieee80211_sta.c Sat Apr 17 23:48:07 2010 (r206780) @@ -141,6 +141,8 @@ sta_beacon_miss(struct ieee80211vap *vap vap->iv_bss->ni_essid, vap->iv_bss->ni_esslen); return; } + + callout_stop(&vap->iv_swbmiss); vap->iv_bmiss_count = 0; vap->iv_stats.is_beacon_miss++; if (vap->iv_roaming == IEEE80211_ROAMING_AUTO) { Modified: stable/8/sys/net80211/ieee80211_tdma.c ============================================================================== --- stable/8/sys/net80211/ieee80211_tdma.c Sat Apr 17 23:14:06 2010 (r206779) +++ stable/8/sys/net80211/ieee80211_tdma.c Sat Apr 17 23:48:07 2010 (r206780) @@ -295,6 +295,8 @@ tdma_beacon_miss(struct ieee80211vap *va "beacon miss, mode %u state %s\n", vap->iv_opmode, ieee80211_state_name[vap->iv_state]); + callout_stop(&vap->iv_swbmiss); + if (ts->tdma_peer != NULL) { /* XXX? can this be null? */ ieee80211_notify_node_leave(vap->iv_bss); ts->tdma_peer = NULL;